picoDexed + MiniDexed EuroRack
Since attempting my picoDexed + StackyPi + MiniDexed EuroRack build and failing, I’ve found another Pico-to-Zero board that is provided as open source, so I’ve had some made.
This post details how to get that running with my MiniDexed Zero Eurorack module.
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 and single board computers, see the Getting Started pages.
Pi Zero RP2040s
As mentioned last time I found a number of options for a RP2040 based dev board in a Raspberry Pi Zero form factor. But this post is about this one:
It is fairly simple to build. It just requires a Pico and GPIO header pins.
There is an option for pull-ups on the I2C bus, but I’ve not bothered with them here. There is also a breakout header for a reset switch if required (it will support two sizes of switch by the looks of things).
Mapping over to MiniDexed/RPi Zero
The pinout is slightly different to the Stacky-pi, so here is an updated table of the GPIO mappings and which are required to be used with my MiniDexed board.
RP2040UseRPiRpiUseRP20403V35VGP2LCD SDAGP2 SDA5VGP3LCD SCLGP3 SCLGNDGP4GP4GP14 TXDGP0GNDGP15 RXDMIDI INGP1GP5GP17GP18I2S BCLKGP18GP6GP27GNDGP7GP22GP23GP83V3GP24GP28GP11RE BGP10 MOSIGNDGP12RE AGP9 MISOGP25GP27GP10RE SWGP11 SCLKGP8GP9GNDGP7GP26ID_SDID_SCGP22SW BACKGP5GNDGP13SW HOMEGP6GP12GP21GP14GP13GNDGP19I2S LCLKGP19GP16GP20GP15GP26GP20GP17GNDGP21I2S DATAGP16
The two key problem areas will be the I2S interface and encoder, which both require consecutive GPIO pins for the PIO code to do its magic.
The encoder should be fine – pins RE A and RE B map onto the Pico’s GP11 and 12.
The I2S interface might be ok – with a BCLK on GP18, it will be expecting LCLK on GP19. Data on GP21 should be ok.
Unlike the previous attempt, I’m hopeful I can just get this running ok with the correct pin mappings…
Changing I2C Bus and UARTs
Unlike the first attempt, I2C is mapped onto GP2 and GP3 which is what I was using in the original picoDexed. So that is all fine, multiplexed onto the I2C bus 1.
There is an issue with the UART however as picoDexed uses the following by default:
- UART 0 – GP 0,1 – Serial debug
- UART 1 – GP 4,5 – MIDI
I can swap these over so that UART0 (GP0,1) is MIDI, but that has to be matched with a change in the debug serial port too. But unfortunately, as far as I can see, that has to be configured in the master CMakeLists.txt file (as I talked about in Part 3).
New picoDexed GPIO Configuration
Given the above, the following new GPIO pins should be defined in config.h:
#define PWM_PIN 10
#define I2S_DATA_PIN 16
#define I2S_BCLK_PIN 18
#define I2S_LRCLK_PIN 19 // Implied by BCLK=12
#define MIDI_UART 0
#define MIDI_TX_PIN 0 // Not used
#define MIDI_RX_PIN 1
#define DEBUG_UART_TX_PIN 8
#define DEBUG_UART_RX_PIN 9
#define DISPLAY_I2C_BUS 1
#define DISPLAY_I2C_SDA 2
#define DISPLAY_I2C_SCL 3
#define DISPLAY_I2C_ADDR 0x3C
#define DISPLAY_W 128
#define DISPLAY_H 32
#define ENCODER_A_PIN 11
#define ENCODER_B_PIN 12 // Not used
#define ENCODER_SW_PIN 10 // Not used
In addition to this, to keep using the debug output requires the following lines adding to ‘target_compile_definitions’ in CMakeLists.txt.
PICO_DEFAULT_UART=1
PICO_DEFAULT_UART_TX_PIN=8
PICO_DEFAULT_UART_RX_PIN=9
I’ve added a separate configuration file (config-ER.h) in the repository to allow this version to be built, but the CMakelists.txt change above has not been included.
I’ve also added a picodexed-v0.03-ER.uf2 file in the build area which can be downloaded and installed directly onto the Pico to provide the above configuration ready to go.
Bringing it all together…
The nice thing about this PCB is that I can map everything nicely over to the pinouts used with my MiniDexed EuroRack PCB meaning that once the Pico has the custom firmware installed, it will just plug in and work and no hardware changes or patching is required at all!
I was slightly concerned that the USB port of the Pico might clash with the two installed electrolytic capacitors on the MiniDexed PCB, but in my case I can just about get away with it!
Here is the final assembled unit.
Closing Thoughts
I finally have my Eurorack picoDexed which is pretty neat. Big thanks to bablokb for putting that PCB up online. That saved me a job. And it was particularly nice that things like assuming consecutive pins for the I2S mapping was included as that made using the PIO I2S code a lot easier.
I’d like to see what the power usage is like now as I’m really after a lower power Dexed engine compared to the full Zero version.
Naturally at some point I might still make my own picoDexed Eurorack PCB, but this is a pretty good solution as far as I’m concerned, so that wouldn’t really add much for me now.
Kevin
#midi #minidexed #pcb #picodexed #raspberryPiPico