“Bare Metal” Raspberry Pi Synth – Part 3

This project uses an off-the-shelf analog IO board for the Raspberry Pi for my “bare metal” Raspberry Pi v1 (model B) synth.

Full index of posts in this series:

IMG_5550

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

These are the key tutorials for the main concepts used in this project:

If you are new to microcontrollers and single board computers, see the Getting Started pages.

Parts list

  • Raspberry Pi v1 (in my case).
  • 128Mb or greater SDHC SD Card.
  • Linux installation (I use Ubuntu in a virtual machine on my Windows PC).
  • Rasp.IO AnalogZero (see: https://rasp.io/analogzero/)
  • Several 10k potentiometers.
  • Optional HDMI monitor (for testing).
  • Amplification and lead for the headphone socket on the Pi.
  • Solderless breadboard and jumper wire.

Hardware

RaspPIO Analog Pots_bb

Image of AnalogZero taken from the user manual.

This is essentially repeating the circuit from “Bare Metal” Raspberry Pi Synth – Part 2 but I’ve found a neat add-on board for the Raspberry Pi that provides a much neater solution for the MCP3008 than solderless breadboard – the AnalogZero from RasPiO (https://rasp.io/analogzero/).  I’m not going to go into details of how to build or use it here, as there is a very comprehensive set of documentation on the original site, including a full “manual” that includes some projects to get your started if you’re new to such things and several videos on how to build and use it.

The AnalogZero is actually designed for use with the Raspberry Pi Zero but it will still work with the oldest Raspberry Pi v1 Model B I’m using, but you need to note that the IO connector provided with the board will be too long. There are two options:

  • Use a 26-way stacking header as a “spacer” between the AnalogZero and the Pi V1 model B.  This makes it look a little weird, so isn’t a long-term solution.
  • Solder on a 26-way “long” (or “tall”) header in  place of the provided 40-way header, leaving the rest of the IO pins unconnected.

In both cases the AnalogZero will need to be high enough to clear the older Pi’s composite video out port. If you are planning to use with with any later version of the Pi (V1 Model B+ onwards, including the Zero) you’ll be fine ‘as is’.

I’ve soldered on the 40-way connector and am using a 26-way header as a “spacer” as I want to be using this with my Pi Zero at some point , so a temporary solution to prove the point is fine for me at the moment.

IMG_5551

The Code

This is using exactly the same code and SD card image as used in part 2.  The AnalogZero is literally a drop-in replacement for my breadboard, and I’m driving it using a USB MIDI keyboard.

Find it on GitHub here.

Closing Thoughts

I have a few different boards from RasPiO and I think all of them will prove interesting for use with my “bare metal” Raspberry Pi experiments.

As I said earlier, I’d like to use this with a Raspberry Pi Zero, but I’d need to add some circuitry that will provide a useful audio output, as the Pi Zero only has native audio out via the HDMI port.

Kevin

Leave a comment