Превращаем MIDI клавиатуру в синтезатор. Часть 1. Железо

Все началось со статьи Как собрать клон Yamaha DX7 за 10$ . Так как я достаточно давно занимаюсь музыкой, и люблю конструировать всякие электронные штучки, меня эта статья заинтересовала. Я тут же начал прикидывать по цене возможные варианты. RPI2040 конечно же очень дешево, но посмотрев пару обзоров на Picodexed на YouTube, меня не привлекла простенькая синтезаторная составляющая. Понятно, что это полная эмуляция движка Yamaha DX7, но слишком уж звук невзрачный и простой. После просмотра вариантов эмуляторов синтезаторов на RPI на YouTube меня больше заинтересовали проекты MiniDexed , MT32-pi и Mini-JV880 .

https://habr.com/ru/articles/982570/

#синтезатор #midiконтроллеры #roland_mt32 #Roland_JV880 #Minidexed #dyi

Превращаем MIDI клавиатуру в синтезатор. Часть 1. Железо

Mini-JV880pi В первой части я бы хотел рассказать про железную составляющую проекта. Вторая часть будет посвящена программному обеспечению и проблемам, которые возникли при этом. В видео на ютубе все...

Хабр
Nareszcie skończyłem budowę swojego #MiniDexed w pudełku po mydełku

I've posted an update to my MiniDexed SSD1306 based IO board for the Raspberry Pi.

https://diyelectromusic.com/2025/09/27/minidexed-raspberry-pi-io-board-v2-design/

#RaspberryPi #MiniDexed #SynthDIY #MIDI

MiniDexed Raspberry Pi IO Board – Part 2

This is the set of build notes for the smaller of my MiniDexed Raspberry Pi IO Boards.

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.

Bill of Materials

  • Raspberry Pi 3 or 4 with associated power, uSD card, etc.
  • You’ll need the smaller (SSD1306 version) of the PCB: MiniDexed Raspberry Pi IO Board (GitHub link below).
  • 1x 128×32 I2C OLED SSD1306 display (see photos).  Note it requires the pinout SDA-SCL-5V-GND.  WARNING: Similar looking modules have been seen with different variations of this!  Also, ensure it has built-in level shifting for 3V3 I2C operation.
  • 1x GY-PCM5102 module (see photos).
  • 1x H11L1 optoisolator.
  • 1x 220Ω resistor.
  • 1x 470Ω resistor.
  • 1x 1N914 or 1N4148 signal diode.
  • 2x 100nF ceramic disk capacitors.
  • 5x 10nF ceramic disk capacitors (not 10pF as stated on the PCB).
  • 1x rotary encoder with switch (see photos).
  • 1x 5-pin 180 DIN PCB mounted socket (see photos).
  • 2x “button” push-switches (see photos) – optional.
  • 2x 2-way header pins – optional.
  • 1x 6-way DIP socket – optional.
  • 1x extended 2×20-way GPIO header socket for the Raspberry Pi.
  • 1x 4-way header socket – optional.
  • 1x 6-way header socket – optional.

As always, a socket are recommended for the H11L1, and the SSD1306 and PCM5102 modules can either be used with sockets or soldered directly, depending on how brave (or lucky?) you’re feeling.

Build Steps

This should be a relatively straight forward “through hole components” build.  I did things in the following order:

  • Resistors and diode.
  • 6-pin DIP socket.
  • Capacitors.
  • Buttons (if used).
  • If you are using headers for the SSD1306 and PCM5102 then do them next.
  • If you are using header pins for the switches, do them next.
  • MIDI socket.
  • Rotary Encoder.
  • PCM5102 and SSD1306 (if you aren’t using headers) – WARNING: see note below about the PCM5102 solder bridges before soldering.
  • GPIO socket.

Note that an extended GPIO header is recommended to give the board a little extra clearance from the Raspberry Pi, but it means that if you don’t want the extra pins above the board, they should be cut off once soldered in place.

PCM5102 configuration:

The GY-PCM5102 modules I’m using, as shown in the photos, as the same as used for the Clumsy MIDI project and you have to be sure the configuration jumpers on the back of the modules are correctly set up before soldering in place.  Full details of what is required can be found on the Clumsy MIDI pages here (see the important note about the “DAC solder bridges”): https://github.com/gmcn42/clumsyMIDI.

SSD1306 OLED Logic Levels

Several versions of these modules exist, but to use it with a Raspberry Pi requires one with 3V3 level shifters included.  The 128×32 variety used in the photos often seems to include these, but the 128×64 variety often won’t!

The level shifters can be spotted on the back as follows:

In this case, marked “U2”.  But to be sure, power the unit from 5V and measure the voltage on the SCL and SDA pins to see if it is pulled up to 3V3 or 5V.

Testing

I recommend performing the general tests described here: PCBs.

I used the “fishing wire trick” to be able to plug in the SSD1306 and PCM5102 without soldering and require using headers (nylon fishing wire in the holes gives enough traction to be able to push a header pin in, have it grip and make contact, without soldering.  This allowed me to check everything was working, including the modules, whilst still giving me options for debugging.

It is probably also worth attempting to power up the board without connecting it to the Raspberry Pi as a “smoke test”.  The PCM5102 and SSD1306 are powered from the 5V line, whilst the H11L1 is powered from the 3V3 line.

PCB Errata

Functionally, all seems ok, but there are a couple of markings I’d change.

  • First off, an error in the capacitor values – the debouncing capacitors should be 10nF not 10pF.
  • I labelled the switches Home and Select, but given the flexibility in the configuration (and the fact that typically the encoder’s switch will be “select), maybe they should just be “button 1” and “button 2”.
  • The diode is labelled 1N914 but I believe 1N9148 tend to be preferred?
  • I suspect I ought to use better capacitors (I know the Clumsy MIDI board recommends “X7R or film (e.g. WIMA MKS2)”).
  • It might be worth adding a larger capacitor for the power to the board in general.

You can find the PCB design files on GitHub here:  https://github.com/diyelectromusic/sdemp_pcbs/tree/main/RpiMiniDexedSSD1306

MiniDexed Configuration

I’m not going through how you set up and run MiniDexed.  My own notes on it can be found here: “Bare Metal” Raspberry Pi MiniDexed DX7.

The following settings are required in the minidexed.ini file (correct as of time of writing, but the MiniDexed project shifts pretty quickly!).

For the SSD1306 LCD:

SSD1306LCDI2CAddress=0x3CSSD1306LCDWidth=128SSD1306LCDHeight=32LCDColumns=20LCDRows=2

For the Rotary Encoder:

EncoderEnabled=1EncoderPinClock=10EncoderPinData=9

For the two buttons, and the rotary encoder switch itself:

ButtonPinBack=5ButtonActionBack=clickButtonPinSelect=11ButtonActionSelect=clickButtonPinHome=6ButtonActionHome=clickButtonPinShortcut=11

If you don’t want to use the buttons, but would rather use the button on the rotary encoder for everything, then I suggest (which is the default, at the time of writing):

ButtonPinBack=11ButtonActionBack=longpressButtonPinSelect=11ButtonActionSelect=clickButtonPinHome=11ButtonActionHome=doubleclickButtonPinShortcut=11

Closing Thoughts

I love the idea that all I need is power, an audio output and a MIDI link (either USB or serial) and I have eight DX7s on hand and ready to go in this small, neat unit!

This one doesn’t really lend itself to being put in a case, although I guess it could if you extended the link to the display and buttons.  But my next build, using the larger of the two PCBs, hopefully will!

As always, I have a small number of prototype boards, so if you might be interested in having a go yourself, ping me a private message somehow and we can talk.

Disclaimer: Once again, I used the Seeed Fusion service as I had some discount coupons I’d been sent, and once again I have absolutely no complaints about their quick, cheap service.  I’m very pleased with these boards.

I am in no way connected to or affiliated with Seeed, but if they (or any other manufacturer for that matter) want to send me discounts, I for one am very happy to receive them.

Either way I’ll always post things here as I see them and make it clear when I’ve taken advantage of any special offers or vouchers.

Kevin

#midi #minidexed #pcb #pcm5102 #raspberryPi #ssd1306

MiniDexed Raspberry Pi IO Board

I’ve been toying with the idea of some kind of IO board for my MiniDexed experiments for use with a Raspberry Pi.  I initially wanted something fully self-contained – i.e. just pop it on a Raspberry Pi and you’re good to go.  But then it was pointed out that having all the IO connections on one side is much more friendly from a “putting it all in a case” point of view.

In the end, I used many of the same circuit elements and came up with two designs.

Update: Here are links to the build guides for these PCBs:

There is a version for the Raspberry Pi V1 here: MiniDexed Raspberry Pi V1 IO Board and my pseudo TX816 can be found here: MiniDexed TX816.

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.

Basic Requirements

I wanted a board to do the following:

  • Include a screen or display.
  • Have MIDI IN.
  • Optionally include MIDI OUT and THRU.
  • Have a rotary encoder for input.
  • Incorporate a PCM5102 DAC for audio output.
  • Optionally include a couple of buttons.

As I mention above, I was initially after something that would fit within a normal “HAT” type footprint for a Raspberry Pi, which is pretty constraining, but following on from the Clumsy MIDI board, should be possible with a small SSD1306 OLED display.

But I was also keen to try to build something that would allow all the IO to line up along the back, so I’ve also designed a larger board that overhangs the Pi and allows for a full three MIDI din sockets.  This larger board can accommodate a HD44780 LCD display as used in the original MiniDexed setup.

I’m happy for the whole thing to receive power via the Pi and of course USB and ethernet connections are also available on one side.

MiniDexed RPi IO Board (SSD1306 Version)

Starting a new project in KiCad, there is already a “Raspberry Pi 40-pin Extension Board” template which provides the basic outline, PCB footprint for the GPIO, and cut-outs for the display and camera.

Here is the schematic I’m working to.

Points worthy of note:

  • A H11L1 based MIDI IN circuit connected to RX0.
  • A rotary encoder (not a KY-040 module) is used with 10pF capacitors for debouncing the connections.
  • A PCM5102 in the “GY module” format (as used by Clumsy MIDI).
  • Two optional button push-switches which are also broken out to headers, also with debouncing capacitors.
  • I’ve included the header for the SSD1306 in SDA-SCL-VCC-GND format.

This is the GPIO map used:

If the rotary encoder seems to be “backwards” then swap RE_A and RE_B in the configuration.  Note that at the time of writing, I2C SSD1306 displays are in development but hopefully will be available in MiniDexed by the time you read this.

Here is the board that has been sent off for manufacturing.

Design notes:

  • I used the GY-PCM5102 symbol and footprint library from the Clumsy MIDI GitHub repository.
  • The H11L1 is upside down as that made routing easier.
  • I’ve included footprints for two push-buttons (the very common “through hole” type used in many maker projects) but also included two sets of header pins so these could be wired off to something else if required.
  • I’m using a 32×128 OLED (again the same one used with Clumsy MIDI).  As I say, MiniDexed doesn’t support this directly at the time of writing, but I’ve submitted a PR for support that is waiting to be accepted, so hopefully it will be fully supported soon.
  • Unlike my previous boards, I used a filled zone to create a link to the GND net and provided a ground plane on the rear copper layer of the board.
  • Both the SSD1306 and PCM5102 modules I’m using have a built-in regulator to take 5V down to 3V3.  This is particularly critical for the SSD1306 as it includes pull-ups for the I2C connection to the 3V3 level (not 5V).  But this is why they are hooked up to 5V yet I’m not using level-shifters to interface to the (3V3 logic) Pi.

Here is an early “space test” (without the buttons) with a paper printout to give you an idea of what I’m aiming for.

And an image of the Gerbers as sent off for manufacture:

MiniDexed RPi IO Board (HD44780 Version)

Again starting a new KiCad project from the Raspberry Pi 40-pin extension board template, this is the circuit I’m working with for this one.

Schematic Notes:

  • This is using the same PCM5102, rotary encoder, and switches as above (although I’ve just realised I never swapped the schematic and pcb over to use the GY-PCM5102 module symbol and footprint – oh well, for this board it is a 6-way set of headers!).
  • This uses the “data interface” version of the HD44780. I did think about using the I2C version, but thought this would be the simplest case to build if it could be made to work.
  • There is MIDI IN, OUT and (optional) THRU.
  • The MIDI circuit borrows heavily from Clumsy MIDI and includes a 74HCT14 hex inverter as an output buffer for OUT and THRU (although it is labelled as a 74HC14 on the schematic and pcb).
  • THRU is optional, in which case the unused inputs to the 74HCT14 should go to GND instead (selected by solder jumpers).
  • OUT can optionally be changed to a(nother) THRU rather than an OUT, in which case it can be switched via solder jumpers to be connected to RX0 rather than TX0.

To simplify the routing of the PCB, the pinouts for the various components have changed.  Here is the pinout being used (this is now quite different to the original MiniDexed pinout).

So this is the design for the pcb that has been sent off for manufacture:

Design notes:

  • The PCB is designed to be used with a Raspberry Pi “upside down”.  That is, with the connectors at the top, and GPIO at the bottom.  This means the USB/RJ45 ports will be on the left hand side, as shown.
  • The MIDI THRU section is optional.  If only two MIDI sockets are required that part of the board can be cut off along the line indicated.  If that is done then the solder jumpers beneath the 74HC14 must be changed as follows:
    • Cut the “THRU” jumper (this disconnects the 74HC14 from RX0).
    • Solder the “NO THRU” jumper (this connects the unused 74HC14 port to GND).
  • The MIDI OUT port can be changed to a THRU too.  If the original THRU is removed, this means you can just have MIDI IN and THRU instead of IN and OUT if you wish. If the original THRU is retained, then you can have a MIDI IN and two THRUs. To turn the OUT into a THRU change the two solder jumpers near the H11L1 as follows:
    • Cut the “OUT” jumper (this disconnects the OUT circuit from TX0).
    • Solder the “THRU” jumper (this connects the OUT circuit to RX0 to make it a THRU).
  • Whilst on the subject of MIDI sockets, all three sockets are oriented to go underneath the board so they will go alongside the RPi.
  • The optional buttons are not provided on the PCB, but via two sets of headers on the left hand side of the board.
  • As mentioned above, annoyingly I forgot to change the PCM5102 footprint to that of a GY-PCM5102 module, so there are no holes for the additional 9-way header.  These are not used electrically, but they would have provided some additional physical support.  Instead I might solder some header pins and use the plastic pin spacer as a support under the board (but I’ll look into that when I get the boards back).
  • I’ve included a simple “preset” pot to control the contrast for the LCD.
  • Once again I used a filled zone to create a link to the GND net and provide a ground plane on the rear copper layer of the board.  Note that I left a cut-out under the traces to the THRU part of the circuit, to reduce the chance of a short if the board is cut off at this point.
  • Most LCD1602/HD44780 modules are 5V parts, with 5V required to ensure the LCD actually illuminates successfully. However, as described here, it is usually ok for a 3V3 output to drive a 5V input, so as long as the LCD isn’t attempting to drive the IO pins for the Pi, the Pi should be fine talking 3V3 to the LCD. So that is the approach I’m taking. It does mean that this won’t accept a 3V3 LCD module. But in all this, remember my level of electronics experience, and make up your own mind…

Manufacturing

Both boards should be built using the standard, cheapest manufacturing options.  Both are fine with a 6/6 mil constraint on track width and separation.

The second board is somewhat larger than the common “cheap” tier.  For me, all my other boards were $4.60 plus postage for 10 boards, but the larger one has jumped up to around $27 plus postage.

On the back of my first blog post, having used Seeed Fusion to produce my first boards, they sent me some money off vouchers, so I’ve used them once again here.  That was particularly welcome given the increased cost of the larger board!

I still don’t really have a space to store these designs.  But I’ll update this post when I do!

Closing Thoughts

Although either of these designs could potentially be used in a case to make a nice, small, self-contained unit, I can’t guarantee that the spacing of connectors and components will really allow it.  I’m also not sure what will be required in terms of cooling for the Pi, so I’ll have to see how I get on.  It may be that I’ll need more spacing between the Pi and the IO board.

I’m still learning with KiCad, so am fully expecting continued mistakes or odd design choices, but I think both of these will be interesting to try.

Update: mistakes already spotted since sending them off:

  • The afore-mentioned GY-PCM5102 footprint error.
  • Labelling on the board states 74HC14 and it really has to be a 74HCT14.

So that is the walk-through of the design of these boards.  Of course I won’t really know if they are successful until I get the boards back from manufacturing!

Kevin

#hd44780 #midi #minidexed #pcb #pcm5102 #raspberryPi #ssd1306

MiniDexed Raspberry Pi IO Board V2 Build Guide

Here are the build notes for my MiniDexed Raspberry Pi IO Board V2 Design. The previous version can be found here:

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 electronics and microcontrollers, see the Getting Started pages.

Bill of Materials

  • MiniDexed SSD1306 IO Board V2 PCB (GitHub link below)
  • 1x SSD1306 OLED 132×64 display, pin order SDA, SCL, VCC, GND (see notes below on voltage levels)
  • 1x GY-PCM5102 module
  • 1x H11L1 optoisolator
  • 1x 1N4148 or 1N914 signal diode
  • Resistors: 1x 220Ω, 1x 470Ω
  • Capacitors: 3x 100nF, 5x 10nF
  • EITHER: 2x 3.5mm stereo TRS sockets (see PCB and photos for footprints)
  • OR:1x 3.5mm stereo TRS socket and 1 5-pin DIN socket (see PCB and photos for footprints)
  • 2x tactile buttons: 6x6x12 mm (suggested, see notes)
  • 1x switched rotary encoder (see PCB and photos for footprint)
  • 1x 2×20 GPIO extended header socket
  • Pin headers
  • Optional: 1x 6 pin DIP socket

Some SSD1306 OLED displays require 3V supplies and some require 5V. This requires a 5V version, but then there might be issues interfacing it to a Raspberry Pi if the display doesn’t include level shifters for the I2C lines.

There is a detailed discussion of what to look out for here: MiniDexed Raspberry Pi IO Board – Part 2.

Build Steps

Taking a typical “low to high” soldering approach, this is the suggested order of assembly:

  • Diode and resistors.
  • DIP socket (if used) or optoisolator (if not).
  • TRS socket(s).
  • Disc capacitors.
  • GY-PCM5102.
  • 2×20 way extended GPIO header.
  • OLED display (maybe – see notes).
  • Tactile buttons.
  • Rotary encoder.
  • DIN socket (if used).

Here are some build photos and additional notes.

Normally I would recommend the use of a DIP socket to protect the chips used, but in this instance, if this board is to be used with a case it may be that a DIP socket raises the optoisolator too high.

For once, I opted to skip the use of the DIP socket and soldered the optoisolator directly to the PCB. But the photo below shows a build in progress using the socket.

The MIDI IN socket is a dual footprint TRS or DIN mount. I’m using TRS here, so that is soldered on at the same time as the other TRS socket. If using DIN, then that should probably be the last thing to be soldered.

Unlike the previous board, this one uses the audio output pins of the GY-PCM5102 module. The simplest way to mount the module is the fix the pins as shown below and then fit the module over the top.

Not all the pins need to be connected, but the photo shows the minimum number required and their position.

Warning: The GY-PCM5102 may require some solder jumpers setting prior to installation. Full details of what is required can be found on the Clumsy MIDI pages here (see the important note about the “DAC solder bridges”): https://github.com/gmcn42/clumsyMIDI.

I’m suggesting 12mm high 6x6mm tactile buttons (that is 12mm total height, so around 8mm button height) but the exact height will depend on the encoder used and where any case would sit height wise with the encoder, display and buttons accessible.

Although I’m not using the extended pins of an extended GPIO header, they are slightly taller than a non-extended header which is useful here. I’ve just cut off the excess pin lengths once fixed on. Being able to cut off the outer row of pins also makes soldering the inner row a bit easier.

I’ve used longer pins for the display which allows me to set the height to a suitable level to fit with the height of the encoder and buttons. I’ve soldered them to the PCB and will add the display and trim the pins down to size once I know how tall I want to make it.

Here is a side-on view. As just mentioned, I’ve soldered the long pins in place for the display but won’t solder the display itself in place until I know the exact height I’ll need. As can be seen below it is unlikely to need the full height of the longer pins.

The completed board looks something like this. There are optional pin headers for the two buttons either in addition to or instead of the buttons themselves, but I’m not using them here.

Testing

I recommend performing the general tests described here: PCBs.

PCB Errata

There are no known issues with this PCB at this time.

Enhancements:

  • None 

Find it on GitHub here.

MiniDexed Configuration

The MiniDexed configuration is unchanged from the first version of the board. Details can be found here: MiniDexed Raspberry Pi IO Board – Part 2.

3D Printed Case

There is now a version of my MiniDexed 3D Printed Cases for this version of the PCB when fitted with the MIDI TRS socket and used with a RPi 3A+.

Closing Thoughts

I’m really pleased with this update. It already feels a lot slicker than the first version.

It remains to be seen if this is easier to design a case for, but at the very least, not having a large gap for a MIDI DIN socket I’m sure will be an improvement1

Kevin

#midi #minidexed #pcb #raspberryPi #ssd1306

MiniDexed Raspberry Pi IO Board V2 Design

My two MiniDexed PCBs were some of the earliest ones I made and so I’ve wondered about revisiting them for a while now.

This is a respin of the SSD1306 version of the IO board that is, hopefully, slightly nicer to build a case around!

Here is the link to the original PCB: MiniDexed Raspberry Pi IO Board. There is the original version for the Raspberry Pi V1: MiniDexed Raspberry Pi V1 IO Board and scattered around the blog are boards for a Pi Zero, a RPi 400, a TX816 style device, a dual Pi version, and a version for a Pi5 that supports quad stereo audio output, among other things.

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.

Basic Requirements

As a bare minimum I’m after a revision of the SSD1306 version of the board that is slightly more case-builder friendly than the original.

I’d also like to add or change the following:

  • MIDI TRS.
  • Better audio output socket.
  • Fix the minor errata from the original board.

It still has to fit within a normal “HAT” type footprint for a Raspberry Pi as I’d like to be using it with a Pi 3A+ again.

I’d also like to arrange the connectors to be on the same side as much as possible.

The Circuit

This is the same schematic as before with the addition of a TRS audio output direct from the PCM5102 module. I’ve also fixed a few of the non-functional errata such as some erroneous component values.

The GPIO map remains unchanged, although “SELECT” is now labelled “BACK”:

PCB Design

I’ve updated the MIDI socket footprint to my dual DIN-TRS footprint. I’m probably going to use the TRS version myself, but it is nice to keep DIN as an option. I’ve had to move the buttons to allow for a second TRS socket for the audio output and have consequently moved the GY-PCM5102 module back away from the edge of the board.

With this arrangement all of the IO is now on the same side of the board apart from the RPi’s own USB (and ethernet if using a B+ version).

Getting the height of the components correct will be a bit fiddly as the display and buttons will be determined by the height of the encoder’s body.

As I keep forgetting which GPIO is used for what, I’ve added details on the underside of the PCB.

As the GY-PCM5102 has an analog GND to support the analog OUT, I thought it might be prudent to keep that part of the PCB GND isolated from the main digital areas. But I’ve also seen that two GND planes separated by a thin non-conducting strip also has another name – “antenna”…

This is where my experience meets peak ignorance, so I’ll have to see how it goes and if I end up reconnecting everything, then I’ll patch something through somehow

Closing Thoughts

Ultimately I won’t know if this is any easier to use than the V1 board until I start designing a new case. But the addition of MIDI TRS at least removes the need for accommodating a large DIN socket on the board and having all the connectors on the same side will be better I think.

I have wondered about a Pi Zero version that could have DIN sockets on the underside of the PCB, mirroring what I did for the HD44780 version of my original board.

I might still give that a try as that would make for quite a nice compact unit too.

Kevin

#midi #minidexed #pcb #pcm5102 #raspberryPi #ssd1306

I'm making my own minidexed case. For a setup using a PCM5102A DAC, SSD1306 OLED, KY-040 encoder, 3 low profile key switches and TRS MIDI in. #synthdiy #electronics #minidexed #dx7

MiniDexed 3D Printed Cases

I’ve used my modular Raspberry Pi 2,3,4 A+/B+ Synth Case to create a variant for the two versions of my RPi Zero MiniDexed IO Board PCB Design. There is also now a version for my MiniDexed Raspberry Pi IO Board V2 Design too.

The OpenSCAD file should allow for a range of variants to be produced, but I’ve gone for the following:

  • HD44780 PCB for Raspberry Pi 4
  • SSD1306 PCB for Raspberry Pi 2B+, 3B+
  • SSD1306 PCB for Raspberry Pi 3A+

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.

OpenSCAD Design

This uses the core Raspberry Pi Case OpenSCAD module, but includes the details for the additional PCBs.

One thing I had to watch out for – the HD44780 version actually extends the whole box quite significantly past the end of the RPi, so this meant the following:

  • I needed a way to extend the PCB and case within the original RPi module.
  • I needed an option to not include a SD card cutout (as it would now be in the middle of the bottom panel).
  • I had to support some components on the underside of the addon board that might extend past the original RPi circuit board (in my case the three MIDI DIN sockets).

This proved a little tricky, but I’ve managed to update the original module to allow the above.

The box height is now governed by the following:

  • Thickness of the box – top and bottom (th).
  • Padding around the Pi PCB in the z direction (pad.z).
  • Thickness of the Pi PCB (board.z)
  • Gap between the Pi PCB and the addon PCB (md_pad.z).
  • Thickness of the addon PCB (md_board.z).
  • Additional padding above the addon PCB (md_ext.z).

The md_ext parameter also allows the box to be extended in the x-direction (past the SD card) and y-direction (past the GPIO connector).

The addon board components are defined in a similar manner to the original RPi board definitions. There is a 4-element array detailing the original x,y,z position (with respect to the addon board itself), the original x,y,z dimensions, and then additional position and size parameters for the cutout for the component.

I’ve had to be somewhat conservative with the overall height of the box, aiming for something that is tall enough to encompass all components, but not so tall that the switch on the encoder won’t work!

In terms of the SSD1306 this means that the MIDI socket pokes out of the top slightly.

There is one additional “hack” for the HD44780 version. I’ve added two additional PCB supports to the base that reach up to the addon PCB. For some reason, I’ve not been able to calculate the height. They should be pad.z+board.z+md_pad.z, when assuming they start at the thickness of the outer box. But for some reason I always come up short. So I’ve just hacked on an additional 1mm.

Find it on GitHub here.

SSD1306 Build V2

This is a version for the rebuild of my SSD1306 PCB as described here: MiniDexed Raspberry Pi IO Board V2 Build Guide. This only supports the MIDI TRS variant at this time.

The critical part of the PCB build is getting the height of the OLED display correct.

In terms of fixings, the following are required:

  • 2x encoder nut and washers – one below the case and one above.
  • 4x 6x6x12mm 2.5M mounting posts
  • 4x 2.5M nuts

SSD1306 Build V1

Some decisions have to be made about the PCB when it is constructed. Namely, the OLED display will require extending somehow to meet the display. It may be that simply using a pin header socket raises the display enough. Some experimentation will be required.

It will also be necessary to extend the buttons up to meet the case. I estimate a 12mm button would do it, but some experimentation is required here too.

In my case I 3D printed a couple of extensions to use, which has the added advantage that the buttons will match the case.

Also required are some M2.5 12mm spacers (and nuts/washers to adjust) between the boards.

HD44780 Build

As already mentioned, I had to strike a balance between having a box tall enough to allow all the components to fit, but not so tall that the encoder didn’t poke through enough.

In the end my compromise was as follows:

  • Use a pin header socket for the HD44780 display.
  • Remove the plastic spacers from he HD44680 pins.
  • Trim the pins down slightly.

This can be seen below.

Two sets of spacers are required:

  • 15mm between RPi and the IO board.
  • 10mm between the IO board and the display.

As the display headers have been slightly shortened, it may be necessary to adjust the retaining lugs on the rear of the display so that they avoid the optoisolator. This was only an issue for me as the optoisolator was in a DIP socket, so was a little higher than the other components.

Closing Thoughts

These PCBs weren’t particularly designed with a case in mind, and it has proved a little tricky to get something that seems to work.

The HD44780 is much more suited to a case like this, and it shows, but I think both are relatively credible options really.

Kevin

#minidexed #raspberryPi

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

picoDexed + StackyPi + MiniDexed EuroRack

Now that I have a picoDexed with a display an encoder it is very tempting to create a version of my MiniDexed EuroRack PCB for it. But as a short diversion, there is another possibility – can…

Simple DIY Electronic Music Projects