Raspberry Pi Pico Synth_Dexed? – Part 5

Ok, ignore my last comment about Part 4 being my last post on this topic. I thought I ought to pull together all the hardware notes on how to build one as I haven’t really written that down anywhere.

So this shows the connections required between the Pico, I2S DAC and MIDI IN.

  • Part 1 where I work out how to build Synth_Dexed using the Pico SDK and get some sounds coming out.
  • Part 2 where I take a detailed look at the performance with a diversion into the workings of the pico_audio library and floating point maths on the pico, on the way.
  • Part 3 where I managed to get up to 16-note polyphony, by overclocking, and some basic serial MIDI support.
  • Part 4 for the full MIDI implementation, voice loading, SysEx control and USB-MIDI.
  • Part 6 includes details of how to use PWM output.

The latest code can be found on GitHub here: https://github.com/diyelectromusic/picodexed

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

If you are new to microcontrollers, see the Getting Started pages.

The Circuit

The easiest way to get a PicoDexed up and running for me, is to use one of my MIDI Proto PCBs and the Pimoroni I2S Audio Pack. This does not allow for any debug output.

Note the jumpers are set to use UART 1 on GP4 and GP5.

If only USB-MIDI is required, then the Audio Pack can be plugged directly onto the back of the Pico, in which case simply plugging into the Pico via USB to a computer and connected up the audio out will work.

It is also possible to use any 3V3 compatible MIDI module. The following shows the use of a Pimoroni “dual expander” with a MIDI module connected to GND, 3V3_OUT and GP5 (RX1).

This has the advantage that all other GPIO pins are available, so it is relatively straight forward to include a debug link via GP0/GP1 for UART 0.

A Solderless Breadboard Circuit

Of course it is also possible to build everything on a solderless breadboard.

The diagram below shows how a cheap GY-PCM5102 module can be used as the I2S DAC and a serial MIDI interface (optional) can be built using my standard 3V3 MIDI IN circuit.

This also allows for some debug output using UART 0 (GP0/GP1).

Things to note:

  • The PCM5102 board will have to have solder jumpers on the rear set as follows: 1=L, 2=L, 3=H, 4=L. Sometimes these come preconfigured with solder bridges, sometimes with zero-ohm SMT resistors, and sometimes with no connection made at all. More details here.
  • I always get pins 4 and 5 mixed up on MIDI DIN sockets. Here is my MIDI Connections Cheat Sheet which may help.

Pico GPIO Usage

The following GPIO pins are in use or allocated:

GP0Debug UART TX (unused at present)
GP1Debug UART RX
GP4MIDI TX (unused at present)
GP5MIDI RX
GP9I2S Data (DATA, DIN)
GP10I2S Bit Clock (BCK)
GP11I2S “Left/Right” Clock (LCK, LRCK, LR_CLOCK)
GP20Optional: PWM output
GP22Optional: Mute pin for the Pimoroni Audio Pack (not used)
VSYS5V power to DAC (if required)
3V3_OUT3V3 power to MIDI IN (if required)
GND

PWM Audio Output

It is possible to use PWM audio output on the Pico. Full details can be found here: Raspberry Pi Pico Synth_Dexed? – Part 6.

But this is a lot more limited than I2S and the quality is a lot poorer too. As a DAC can be obtained quite cheaply, the use of an I2S DAC is strongly recommended.

Closing Thoughts

I’ve uploaded a prototype UF2 file to GitHub in case anyone wants to give it a go: everything can be found here: https://github.com/diyelectromusic/picodexed

Hopefully there is enough information in the above to get something up and running.

Kevin

Leave a comment