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

Lektüre #SSD1306 vs #SH1106
Oder umgangssprachlich „wie kommen die Pixel richtig aufs OLED(isplay)?“

So, I finished making my fluid sim gift on ESP32!

https://corteximplant.com/@zeyus/114095311805576694

Please excuse my nails, I was literally working with bitumen and managed to clean it off my hands, but it started to hurt scrubbing

Sorce code (including 3d printed case design): https://git.cyberwa.re/zeyus/FLIP-ESP32-I2C-OLED

@seali

#esp32 #flipfluids #fluidsim #fluidsimulation #3dprint #oled #ssd1306 #imu #mpu #electronics #embeddedsystems #embedded #arduino

#100дописівукраїнською

Трішки котиків вам у стрічку 

#ch32v003 #ssd1306 #cat

@ua @rada

Библиотека для OLED1306 с русским языком на RPi

Здравствуйте люди! Я сделал библиотеку под названием "SillyOled" для работы с OLED-дисплеями SSD1306 через I2C и SPI. Библиотека может показывать текст, фигуры, бит-мапы, а также управлять дисплеем. Вот главные особенности:

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

#oledдисплей #ssd1306 #raspberry_pi_pico #thonny #python #библиотека

Библиотека для OLED1306 с русским языком на RPi

Здравствуйте люди! Я сделал библиотеку под названием "SillyOled" для работы с OLED-дисплеями SSD1306 через I2C и SPI. Библиотека может показывать текст, фигуры, бит-мапы, а также управлять дисплеем....

Хабр

#100дописівукраїнською

А от і гіфка під'їхала 

Не дивився це аніме, але думаю, що в найближчому майбутньому все можливо 

#ch32v003 #riscv #spi #ssd1306

@ua @rada