CHEAPSYNTH – external module
how to use – how it sounds – how to build (easy) – how to fix – how to expand
External MIDI-controlled USB/battery-power Arduino synth module (in pioneering photo-schematic format, which could still catch on…)
Probably the cheapest (and almost no soldering required) way to make these is to put everything on a small “170 tie point” breadboard as follows. As you’ve probably spotted, you need an Arduino Nano (ATmega328 version) and a breadboard to start off with – here’s how to install and download software for the Arduino, plus here’s where you can hear and download our synth sounds and safety advice for using this design.
Then the rest of the components are as follows – more detailed instructions below the diagram…
(a) and (b) MIDI cable with a plug on the end
MIDI pin 5 (immediately to the left of plug pin 2) carries the data to Nano RX0, the central ground pin 2 goes to Nano GND (ultimately not needed if you end up powering the Nano from the keytar batteries), and you also need to connect pin 4 if you’re using one of those Rock Band keytars (though you probably don’t need this if you’re only going to use the module with more conventional MIDI instruments).
We’re not going to get into it now, but apparently there is a reason why MIDI plug pins are numbered in the counter-intuitive way that they are – the one here is being viewed from the back, with the pins curving away from you, as in this invaluable diagram. Bear in mind that the colour coding on your cable is likely to be different (3-core MIDI cables should also work), and that ground pin 2 is sometimes the screen wire around the other cores, and sometimes it isn’t.
Oh and you don’t have to be quite as bad at soldering as the example shown here – you might get away with just soldering the ends, and/or sticking the MIDI cables directly into the breadboard, though it’s annoying if they fall out.
NB You also have to disconnect MIDI pin 5 from RX0 when downloading to the Nano as the USB link uses the same pin (eg by unplugging the MIDI cable from the controller instrument – just switching the controller off doesn’t seem to be enough).
(c) 1K resistor
NB You shouldn’t need this (or even a pin 4 connection) if you’re controlling the module via a normal MIDI instrument, in which case you should leave it out. It’s only to convince the Rock Band keytar that it’s in a proper MIDI circuit, otherwise it automatically reverts back to being a game controller again. Also, it makes more sense to snip the legs a bit so it’s not sticking into the 16kHz filter described later if you’re using one of those…
Don’t have a 1K resistor? Try a small diode or 3mm LED instead (…and which way round? the way that works, obviously!)
(d) Audio ground connection
Probably self-explanatory (in practice this only needs to be about 4cm long, and you could even use it to separate the two filter assemblies). We’ve superglued one of those PCB-mounting mono 3.5mm jacks on to the end of the breadboard, and initially advise connecting it to cheap PC-style powered speakers that you’d be able to easily replace in the (unlikely) event that it shorts them out or something. It should also drive most kinds of unpowered speakers or headphones, at potentially excessive volumes.
(e) Skeletal 16kHz notch filter – for demonstration purposes only
This is a prototype implementation of the recommended Notch filter for STANDARD mode carrier frequency, made from 4x 1K resistors and 4x 0.01uF (ie 10nF) capacitors. If you (or your children, pets, hearing aid etc) are annoyed by the the near-ultrasonic 16kHz carrier tone, we’d advise constructing a sturdier version (or using a £1 digital-to-analogue converter DAC chip) on a bigger breadboard (see further down this page) – the literal circuit-diagram shown here does work, but is prone to loose connections. Apparently you can also keep feeding the output through 1 or more additional filters if the carrier tone is still audible (eg in higher-quality speakers).
Alternatively – if you just want to hear how it sounds, you can take the audio direct from GND and pin 9, ideally via a 100 ohm resistor though in our experience you may survive without one.
(f) External power supply
Obviously not required if you’re always using it connected to USB – in this case it’s a PP3 battery connected to GND and VIN. Nanos we’ve tried also run happily off the 3x AA keytar batteries (including rechargables) connected to GND and 5V (or, bizarrely, the current between MIDI pins 4 and 2 on non-keytar devices), though there is a known issue with some Nanos giving “USB device not recognised” errors when reconnecting to a PC after running them off non-USB supplies.
March 2014 update: If you have another Arduino, probably the easiest “USB not recognised” solution is to use the other Arduino to program the CheapSynth, via the Nano pins Reset and D11-D13 (or the Nano “ISP” 6-pin block). “Upload Using Programmer” sometimes needs a second attempt after it’s first connected but handily you can even leave the MIDI cables connected while uploading – the only disadvantage we’ve discovered so far is that you can’t read serial-printed debug info back through the ArduinoISP programmer?
Other possible solutions include: using a different USB cable (the short ones supplied with Nanos appear to be better); disconnecting the Nano from MIDI instruments (and disconnecting/reconnecting the external 5V source); rebooting the PC and reconnecting the cable (not ideal); soldering the (tiny) FTDI Pins 26 to 25 (not the main Nano pins, that would be too easy).
March 2014 update: connections for MCP4811/MCP4801/MCP4821 DACs (and probably MCP4901/4911/4921 series too)
This is a cheap and relatively easy way to avoid the 16kHz tone via a Digital-Analogue Converter, though you also need to edit some of the Mozzi output code. The 10-bit MCP4811 is an obvious choice (as Mozzi outputs nearly 9-bit audio) – main connections are as follows, with a bit of explanation underneath…
1. Vdd (shown here in red) – goes to Nano +5V
2. Chip Select (brown) – goes to Nano pin D10 (ie the numbers against light grey backgrounds, the ones against dark grey should be the ATmega328 pins though I’m not sure if they actually match up here)
3. Serial Clock (orange) – goes to Nano D13
4. Serial Data Input (left-hand yellow) – goes to Nano D11 (ie MOSI: Master Out Slave In)
5. Latch DAC sync input (green) – goes to ground
6. Shutdown mode (not shown) – for MCP49.. series, connect this Vref pin to Vdd; doesn’t seem to be required for MCP48.. series but connect to Vdd if you like!
7. Vss (green) – ground
8. Vout (right-hand yellow) – audio output (in the pic I’ve also connected the yellow audio ground to LDAC pin 5 which is of course connected to GND pin 7)