WATCH THIS - https://www.youtube.com/watch?v=Wm21Wc7AefM
a small eurorack module with 3 knobs, 4 DC coupled CV inputs (+-5v), an encoder, an 8x8 LED matrix display, stereo AC coupled outputs (+-8v), and stereo AC coupled audio rate inputs. the audio inputs are 'aliased' with two of the CV inputs, so that you can use one or both of them as either CV or audio inputs. for example, the 3 leftmost jacks can be used as CV inputs, then the 3 rightmost jacks are the 'audio' side, with mono in at the top and stereo out at the bottom. alternatively, the top two jacks can be used as stereo inputs.
it has an STM32F405 processor at 168Mhz, which is fast enough to do fun reverby, synthy things. it's also cheap and in-stock at JLC :)
it teaches me module design, and latterly, you - thru a series of (so far 2) youtube streams.
this repo is a dump of the state of the hardware design files and software as written on-stream. the first stream was more hardware centric, but not about this specific design - https://www.youtube.com/watch?v=Xf4CxC8exFM the second stream covered bringing up the entire sw/ folder from scratch for this design - https://www.youtube.com/watch?v=Wm21Wc7AefM
the files are presented in the exact state I showed on stream and submitted to JLCPCB for PCB manufacture and assembly. at the time, all SMT parts were in-stock and from their standard library. the front panel is presented as two designs that can be broken apart. I wasnt sure if 'holes' or 'no-solder-mask-circuitboard' would be better; in the end, only holes worked - so if you are submitting this, you can save yourself some money by removing the 'no-holes' half of the front panel design, by editing the kicad files and regenerating the gerbers.
the main board is a 4 layer design, mostly auto routed (sorry not sorry). It has 3 mistakes, none fatal: the euro power jack isnt perfectly centered, which causes the plastic plug to overhang by a mm or so. annoying, and could be fixed by shuffling it over a bit. it's fine if your case or the adjacent module has a bit of space there :). the I2C bus doesn't have pullups, oops; you need two 2.2k resistors pulling up to 3v3 adding. I work around this in software so it works fine without (I bit bang the I2C and go slow, using the STM's on-chip pullups). lastly, the footprint of the 8x8 LED matrix I mistakenly assumed the pins were in a square; they are not. see second video for more info, but you can just bend them and it fits. Just.
all the SMT positioning (csv) that you can upload to JLC's assembly service is in the assembly/ subfolder; likewise, the SMT BOM with part numbers for the lcsc.com site - all chosen to be available for JLC assembly. Once you receive the board, you need to source and add your own 'hardware':
- 3 linear taper pots, 50k -100k maybe? I got mine from thonk.co.uk, Vertical T-18 https://www.thonk.co.uk/shop/alpha-9mm-pots-vertical-t18/
- 6 thonkiconn jacks, also from thonk.co.uk
- an encoder with clicky button. eg https://www.digikey.co.uk/product-detail/en/bourns-inc/PEC11R-4215F-S0024/PEC11R-4215F-S0024-ND/4499665
- some knobs! from thonk.co.uk again.
- a 0.8" LED 8x8 matrix (single color). I got mine from adafruit, it says 'luckylight' on the side. mine was white, here's a red one: https://www.adafruit.com/product/454. in the UK, pimeroni is a great stockist of adafruit stuff.
- a eurorack 8x2 0.1" spacing male pin header for power. I stupidly soldered a right angled one onto mine- it does fit! but simpler would have just been to use bog standard 0.1" header pins, in 2 rows, and make sure to plug them into a plug before soldering to keep them at the right angle. I object to regulating 12v straight down to 3v3 and boiling the oceans - so its a 16 pin plug (for 5v). tough!
- a programming header - I use the 'STDC14 pinout' (google it), which puts a Uart along with classic SWD pins. The PCB expects a surface mount 7x2 0.05" spacing pin header. for example https://www.digikey.co.uk/product-detail/en/amphenol-icc-fci/20021121-00014T4LF/609-3730-ND/2209080. or you can just solder 4 bodge wires on over to your SWD programmer.
the software is as I left it at the end of the second stream. We've brought up all the hardware except audio input; the only files that differ from the autogenerated project are main.c and codec.h; everything else is ignorable boilerplate. it doesn't do anything musical at this stage, but it should make a good starting point.
you need STMCube32IDE for free from ST.com to do the software side; runs on mac, windows and linux. I used a Digilent Analog Discovery 2 as a scope & signal generator, but you don't strictly need it. you will need some way to flash your board - an ST Link programmer for example; the new ST Link 3 Mini has exactly the right programming header, but I can't seem to find one to buy! instead, I use Nucleo boards (look on amazon for 'nucleo STM32') - they are typically under £20, give you a great prototyping platform AND a built in ST Link programmer you can use on your own standalone boards.
have fun! let me know on twitter if you get something out of this! twitter.com/mmalex
I'm releasing this all into the public domain. the hardware is heavily inspired by the eurorack open source modules, and the codec & cpu parts are pretty generic. I would appreciate if you let me know if you get any value out of this! let me know on twitter @mmalex.