Drum machine version 3.1 (Circa June 2019)

I haven’t worked on my Drum machine for a long time. So in order that I don’t forget what I did I’m writing it down

I really liked the look of those backlit silicone button sequencers you see all over the place – such as this Adafuit Trellis kit – and wanted to try using them with my drum machine. So I ordered a bunch of them and broke out Eagle CAD

Squidgy buttons!


Elastomer buttons are made of a super flexible silicone material with a conductive ring on the underside. You place them over a pair of contacts on your PCB and when you press them they squish down so the conductive ring bridges the two contacts making the circuit. They also have a hollow inside to allow for an LED to light them up.

This photo is taken from Adafruit

After my relative success with using the 44pin TQFP in version 2.1 and considering all the space I have available I decided to go even futher and use an even more capable PIC32MX in a 64pin package. The PIC32MX170F512H. This part of the same family as the PICs used on my other version with even more GPIO and double the flash (512kb)

Like the previous design the extras pins were used to provide some PWM driven control voltage (CV) output sort of like an analogue sequencer as well as two serial ports. This still leaves a handful of unassigned GPIO which can be used for debugging output.

Here’s the feature set

  • PT8211S 16bit stereo DAC
  • LCD or OLED display
  • 24 silicone buttons in an 8 x 3 matrix
  • 28 LEDs driven by Maxim 6957
  • Rotary encoder with RGB LED
  • Joystick
  • 4 C/V outputs filtered and buffered using opamps
  • 1 Sync input
  • SD card for pattern storage
  • EEPROM for configuration storage

The elastomer buttons require a lot of space on the top side of the PCB so in order to simplify things I decided to go with a two board design. The upper board has all the UI with the top surface given over almost completely to the LEDs and button contact pads . The lower “core” board contains the MCU, DAC, SD card and other supporting circuitry.

Schematics

Lower board schematic (click to see larger version)
UI board schematic (click to see larger version)

I wasn’t sure exactly what SD card size I wanted to use so I made provision for both fullsize SD and a micro SD. The connections are the same but the footprint is different.

I did a similar thing with the display and provided layout to mount either a 1.3″ 128×64 OLED or a 1.6″ 160×128 TFT screen. Both are SPI based and share the same basic connections.

PCB layouts

Upper UI board. Inter board connection is on the left
Lower “Core” board

Assembly

Partially assembled lower “brain” PCB.
Close up of the 64pin TQFP. It’s a bit of a mess

In retrospect the 64pin TQFP package was rather a tough job to solder by hand. The pins are at a 0.5mm pitch. This means that each pad is just 0.3mm wide with 0.2mm space between them. I had used the 44pin package previously which has a 0.8mm pin pitch and hadn’t appreciated quite what the difference would be. Basically 0.5mm is pretty darn tiny and it took quite a while to clear out all the solder bridges. It wasn’t helped by the fact that it turns out that my ancient flux is slightly conductive…

Close up of the upper UI board. Most of the area is given over to the button pads and their LEDs. I based my button pad design on the Adafruit Trellis design.
Underside of the UI board. All the matrix diodes and LED driver are hidden under here.


The two boards are connected by a ribbon cable for easier access during dev. Also shown is a partial print sample of a 3d printed case

3d printed enclosure

I got a bit over excited and created a design for a case in OpenSCAD.

It it formed of a top and bottom shell that interlock.
The basic shell uses the same Sick of Beige box generator I developed for my Chip Stomp case

To get all the cutout locations I exported CAM data from Eagle and manually built a list of component names and positions for OpenSCAD to reference. It’s quite a fiddly job that you have update manually if you change the PCB layout.

The whole thing is held together by screws in the corners that pass through the base of the case, though both PCBs and screw into the top part of the case.

Sample renders from OpenSCAD

Section view showing the arrangement of ribs on the underside of the top part of the shell. This is for strength and also to isolate each button to reduce light leakage.

Conclusion

Sorry to dissapoint you with another unfinished drum machine project but I never made much further than soldering in the MCU and UI components and getting some basic test functionality running.

The most frustrating thing was due to my poor solding of the fine pitch TQFP PIC32. This resulted in lots of intermittant issues during debugging that made development very frustrating. In future I think I will stick to slightly larger chip packages. (Or invest in a hot air station….)

Also I found that the elastomer buttons seem to require a lot more force to make a good contact than I expected. You really have to press quite deliberately to make them work. This could be due to my contact pad design, although I did model it quite closely on Adafruit’s Trellis. It might also be due to oxidization of the contacts. My PCBs are finished in cheap HASL (Hot Air Solder Levelling) maybe gold plated is needed here for proper funcioning.

Anyway having to press the buttons so hard isn’t so nice to use and sort of killed it for me. I suppose I should have gone to one of the music shop around here and tried some of these buttons out in real life before getting this far.

And finally the size of the case doesn’t fit on my 3d printer. I could have designed in some sort of split but I think I’ve reached my personal limits for OpenSCAD. I really like the parametric nature of the system, but it gets to a point where there’s too much mental overhead to create a model.

Shortly after this project I moved over to using Fusion 360. It’s so much faster to create and modify a design plus you can use parametrics to keep things in order too.

It was fun to explore a different design even if in the end nothing much came of it. I find creating schematics and routing PCBs quite relaxing and 3d modelling is always a fun activity so nothing is wasted.

I know it sounds trite but I often find that I enjoy the journey much more than the destination.

The next drum machine post will be about a design that I finished… More or less… I promise!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s