At the end of 2022, Benjie from Benjiao Modular released an Atari Punk Console synthesizer using a couple of 555 timer chips and a handful of other components. Now, there are lots of 555-based synthesizers out there, but in this case he printed it onto a PCB the size of a business card and added his contact information into the silkscreen of the PCB. Thus the SynthCard was born!
This clearly genius idea gained traction and soon others followed. Karltron created a triple VCO/LFO SynthCard, and Juanito Moore of Modular for the Masses created an 808 Kick Drum and MS-20 style filter.
Now, I don’t want to get too side tracked here because ultimately, we are still trying to build a YM3812 EuroRack module. But, all of the hardware we’ve needed for the first eight articles of this series fit nicely onto a single breadboard. And that got me wondering… would it be possible to fit all that onto a SynthCard sized PCB? What if it could only use through-hole components?
Well, this wouldn’t be much of an article if you couldn’t, so… yes! You totally can!
The YM3812 SynthCard
This business card sized module takes a MIDI input, generates sound using a YM3812 OPL2 sound processor and then outputs that sound through a mono jack. The schematic for this is basically the same as the one we created all the way back in article 4, but I’ve included a status LED and also a 5v voltage regulator.
It also has all of the same great features implemented so far:
- Support for the General MIDI 1.0 patches and instrument selection
- Support for percussion patches on MIDI channel 10
- Support for level control for on each incoming note
What can I do with it?
My favorite use case for this module is to send it General MIDI music from video games. While you might think it would sound the same as an Adlib card—because it has the same OPL2 sound chip—the instrumentation can be quite different. For example, take a look at this side by side comparison of Leisure Suit Larry 3:
Notice how the original Adlib instrumentation uses far fewer voices than the General MIDI? I find that very strange because both the Adlib card and this SynthCard use the same OPL2 chip. While the OPL2 chip is clearly capable of playing more sophisticated music, the Adlib instrumentation doesn’t take advantage of it. This leads me to believe that perhaps the original Adlib composition statically assigned patches to each voice and kept them the same throughout the song. Perhaps dynamically reassigning them was too CPU intensive? If anyone knows the answer here, I’d love to hear it!
Bottom line, General MIDI music rendered on an OPL2 chip sounds very different in this game. (I dare say, even better!)
How do I get one?
This turns out to be incredibly cheap and easy. Go to my GitHub and download the YM3812_SynthCard.zip file.
Then go to JLCPCB (or p C B WAAAAaaay!) whichever PCB manufacturer you like best, and drag the zip file onto the “Add Gerber File” box. After a few seconds, you will see an order form. There are only a couple of key changes to make:
The most important change is to select LeadFree HASL. Sure it adds $1 to the price, but since this is supposed to be like a business card that you can pass around and handle… with your hands… you really want to avoid getting lead poisoning. And with my name on it… I just don’t want to feel responsible for that. So please, go unleaded. (And print at your own risk).
OK, enough disclaimers. From here you are able to select your favorite color and then you can also choose “Specify Location” for the Remove Order Number option. (I specified a location in the Gerber File).
From there, just go ahead and place your order! For the low, low price of $3 (plus ~$16 shipping and handling) you get not one… but TWO boards. And if you act now, they will MORE THAN DOUBLE YOUR ORDER and send you FIVE BOARDS! Juuuuust kidding. This deal lasts forever (it’s their minimum order quantity). It’s still a pretty great deal though. So get 5 and pass the extras around to your friends!
How do I build one?
First, you are going to need a few parts. If you have been following along, you probably have most of these parts already—especially the AVR microcontroller, the YM3812, Y3014b, and other chips, as well as the passive components. This board adds just a few new components that you’ll need to source. Specifically, a 78L05 voltage regulator (in a TO-92 package), a 1N4001 rectifier diode, and a mono (black) thonkiconn jack and a stereo (green) thonkiconn jack. For U6 I’m using an OPA2604 operational amplifier instead of a TL072 because this is a single power rail design, but in theory, you might be able to get away with an alternative op-amp. Just play with it a bit.
Bill of Materials
Here is the full list of materials that you will need to populate the board:
CAPACITORS: | ||
• 100 nF (Ceramic) | x9 | C1-C6, C11-C13 |
• 4.7 uF (Electrolytic) | x1 | C7 |
• 10 uF (Electrolytic) | x3 | C8-C10 |
RESISTORS: | ||
• 220R (Axial) | x2 | R1, R2 |
• 100K (Axial) | x1 | R3 |
• 2K (Axial) | x1 | R6 |
• 1K (Axial) | x3 | R4, R5, R7 |
DIODES: | ||
• 1N4148 Signal Diode(Axial) | x2 | D1, D2 |
• 1N4001 Rectifier Diode (Axial) | x1 | D4 |
• LED (3.0mm) | x1 | D3 |
JUMPERS: | ||
• Pin Header 01×02 2.54mm Vertical | x3 | J1, J2, J6 |
• Pin Header 01×04 2.54mm Vertical | x1 | J3 |
JACKS: | ||
• MIDI IN: Green Thonkiconn Stereo 3.5mm Audio Jacks (PJ366ST) | x1 | J4 |
• AUDIO OUTPUT: Thonkiconn Mono 3.5mm Audio Jacks (PJ398SM) | x1 | J5 |
SWITCHES: | ||
• RESET: 6mm Push Button Switch | x1 | SW1 |
• MIDI Input Type: DPDT E-Switch EG2271 | x1 | SW2 |
ICS & SOCKETS: | ||
• AVR128DA28, DIP 28 7.62mm | x1 | U1 |
• 74HC595, DIP 16 7.62mm | x1 | U2 |
• 6n138, DIP 8 7.62mm | x1 | U3 |
• YM3812, DIP 24 15.24mm | x1 | U4 |
• Y3014b, DIP 8 7.62mm | x1 | U5 |
• OPA2604, DIP 8 7.62mm | x1 | U6 |
• L78L05, TO-92 | x1 | U7 |
• 3.58 Mhz Crystal Oscillator, DIP-8 (Square) | x1 | X1 |
Putting it together
Hopefully the labeling is mostly self explanatory. On the front, I’ve listed all of the component values, and on the back, you’ll find all of the component reference numbers. Here are the usual tips and gotchas for building modules:
- Start with the smallest / flattest components first—This is a pretty densely populated board, so soldering things on in the right order will make your life easier. Start with the resistors, diodes, capacitors, and voltage regulator. Then move on to the switches, ICs and the oscillator. Finally solder on the jumpers and Thonkiconn jacks.
- Check the alignment of polarized components. The line on the diode should match the line on the board. The strip on the electrolytic capacitors should match the white silk screen on the board. The 78L05 should align to the shape in the silk screen. The longer pin of the LED should go in the round hole. The notch in the ICs (or IC sockets) should match the notch on the board. The square corner of the oscillator should match the corner on the silk screen.
- Sockets vs. No Sockets – This is totally up to you. I personally use sockets, but I know there are lots of arguments on why NOT to use sockets (the connections fall out, sometimes they cost as much as the chips, etc.). I would recommend using a socket for the YM3812, Y3014b and the AVR128DA28 as those are either the rarest and/or most expensive chips on the board. To be on the safe side, you might want to power up the board and test the voltages before plugging them in.
- Stereo (Green) Thonkiconn jack is used for MIDI In, and the Mono (Black) Thonkiconn jack is used for the Audio Output.
Powering Up!
The 5v regulator allows you to power this device using anything from 6v to 12v DC. No negative voltages are required, so you could use a 9v battery, an external power supply, or even just plug it into the positive end of a EuroRack connector.
Alternatively, you can plug a regulated 5v supply into the UPDI header at the top of the card. This allows you to power the device directly from an USB to FTDI cable or even an external Li-Po battery.
CAUTION: The regulated power connectors on the left and right side of the board have reverse polarity protection, but the 5v connector on the top does not. Be sure to only use 5v and make sure you plug it in the right way around!
Uploading the firmware
The firmware for this module is exactly the same as what we’ve built throughout the article series thus far. Just go find the latest code from Article 8 and then upload it from the Arduino IDE using an FTDI cable. There are lots of details on how to do that throughout this series, but especially in Article 2.
Usage and Troubleshooting
To use a MIDI cable, you will need an adapter. These are pretty easy to find online, but there are several different versions. You will want a version that connects pins 4 and 5 of the MIDI connector to the tip and ring of the 3.5mm jack. I talk more about the different standards in Article 4 if you want some more background. Depending on which version of the adapter you get, you may need to change the direction of the Korg/Art switch on the left side of the SynthCard. If you have a beat step pro or another device that uses a TRS jack for MIDI output, you may be able to connect it directly using a 3.5mm stereo audio cable (no adapter required!).
If you turn the device on and the red activity light just stays on, press the reset button a bunch of times until it turns off. I have yet to track down why that happens. If you guys have any ideas, let me know in the comments!
If things still don’t work, check that all of the polarized parts are in the right way around.
You want some more?
Well, you are in luck! Benjie put together a website, synthcard.com, to host other SynthCard projects! I hope others will join in the fun and create even more mini-synth business card goodness. If you want jump into the conversation, then head on over to the Modular for the Masses discord community.
Errata
- The microswitch was labeled as an EG1271 which is an SPDT switch. The correct part should be EG2271 which is a DPDT switch. Many thanks to Peter for debugging this one and identifying the issue!