Pablo Estrada

A Home-Built Analog Synthesizer

Sound Lab Mini–Synth

Music from Outer Space

Music from Outer Space, self–described as “your synth DIY headquarters,” is a fantastic place to spend hours learning about analog sound synthesis. Run by Ray Wilson, MFOS includes tutorials and guides on analog synthesizer theory & operation, has a collection of projects ranging from introductory single–purpose musical toys to advanced, cabinet–sized modular synths, and even has an online store that sells specialty parts and whole synthesizer kits. Many projects caution that at least a basic level of electronics proficiency and knowledge is assumed and projects do not have step-by-step instructions to follow. The site’s mid 90s–style design fits it perfectly. There’s even a warning on the home page for mobile users: “You may experience difficulties navigating MFOS using a mobile device…We have our top people working on this.” Awesome.

Sound Lab Mini–Synth

I built the Sound Lab Mini–Synth, described by MFOS as “fun for someone with intermediate to advanced electronics skills who wants to make cool sounds.” It has two VCOs, an LFO, a variable filter, a VCA, an attack–release envelope generator, and a noise generator—all on a single PC board. There are plenty of cool knobs and switches to play with, but not so many as to overwhelm someone new to synths.

Parts

MFOS includes artwork drawings to make PC boards from scratch, but you can also purchase naked etched boards for your project. This makes it easy to get started—and while you wait for the PC board to arrive you can order all the electronic components to complete the kit (and wait for those, too).

To get the most precise tuning performance, stick to the recommended tolerances for resistors and other components. Otherwise, you can substitute 5% for the recommended 1% tolerance components. Things will still work, though you may not get linear voltage across an octave range, for example.

Enclosure and Panel

MFOS provides a very useful panel wiring diagram and a suggested front panel design, and he also includes front panel designs contributed by other builders. Of course, if you use someone else’s front panel design, the panel wiring diagram from MFOS won’t directly apply, but it’s you can still use it as long as you’re methodical and double–check your work. MFOS doesn’t give any more guidance on enclosures other than the panel designs, so this means you have to make or find your own. The enclosure, and especially the panel, are a key part of the design and should be carefully considered.

I used a 6” x 12” x 2” bamboo drawer organizer from The Container Store to house the synth. Its open–top design allows a front panel to be easily fitted, and it costs only $7.

After studying the user–contributed panel designs on MFOS, I designed my own in Adobe Illustrator, mostly because I needed to fit the front panel to the drawer organizer’s top opening. I made the panel from 1/8” white acrylic. I’m lucky to have access to a laser engraver at my office. Here’s a preliminary test fitting with a few knobs, switches, and buttons in place:

Preliminary test fitting This was the first time I tried to use the laser cutter to engrave (instead of just cut) on white acrylic, and I wasn’t sure how readable the engraved design would be the acrylic, so I first tried a few pieces of scrap acrylic. The laser engraver doesn’t burn acrylic like it does wood, so it was nearly unreadable because it doesn’t produce any contrast (like burnt wood edges) to show the lettering. I used black acrylic paint to fill in the engraved areas, quickly wiping off the excess with a cloth before it dried. I later realized it’s not necessary to quickly remove the excess before it dries, and I found it slightly easier to wait for the paint to dry, and then use a paper towel to scrub off the excess. Getting the paint into all the lettering’s nooks and crannies required two or three coats (and wiping), with final edits gently made with a very fine–tipped paint brush.

Applying acrylic paint

Close–up of the lettering:

Integration and Testing

The clean front panel design hides a mess of wires behind it. Assembling the panel starts off easily with the mounting of switches, knobs, and potentiometers. From then all the work is done on the underside. It’s a clean, organized start:

Back of panel with elements mounted

Midway through wiring:

Wiring partially complete

It’s pretty busy once connected to the PC board:

Panel wiring connected to PC board

After finishing wiring I applied power and started testing. Not everything worked exactly as expected, so I carefully rechecked every single wire from point to point. MFOS provides very useful troubleshooting information with instructions on PC board probe points and the expected voltage or waveform to verify on an oscilloscope. I found and corrected a couple of mis–routed wires and one incorrectly placed resistor (I misread the color bands).

Sounds

Here’s a short video of the synth.

AM/FM Radio Update

The radio has been in operation for a while, sitting above the sink in the kitchen. It’s pre-programmed to a favorite FM station, so each time it’s turned on it is tuned to this station. It’s loud enough to be usable while cooking or running water in the sink.

Enclosure

I decided not to use a wooden hardboard enclosure because I don’t have the tools to make precise cuts into it. Instead, the enclosure is made of 1/8 inch white acrylic, laser–cut to make a box about 12”x6”x3”. The speaker grill is made of a grid of tiny holes each about 2mm in diameter. I wasn’t sure if the laser cutter would be able to cut fine holes with enough precision they wouldn’t bleed into each other, and I wasn’t sure if the acrylic would be strong enough to hold together once the holes were cut. It worked out very well and the acrylic is surprisingly strong, even with the dense perforation of the holes.

Acrylic enclosure On the bench Top view In operation

Reception

The telescoping FM antenna receives local stations quite well. Sometimes it needs to be rotated to get very clear reception but this is usually easy and doesn’t require much trial and error.

The internal ferrite loop AM antenna is heavily affected by local noise. It’s frequency dependent, drowning out most of the lower half of the AM band including strong local stations like KNBR 680, sometimes called “The 50,000 Watt Flamethrower,” according to Wikipedia. The noise may be coupled in through the power supply. I’m using an inexpensive AC/DC adapter delivering 12V and up to 1.5A, and it’s probably unregulated and poorly filtered. When powering the radio through USB (via the Arduino directly), most of the noise goes away.

Improvements and What’s Next

AM reception could use a lot of improvement. I could find a quieter power supply or add filtering on the supply line. A higher quality antenna would probably help, too. Adding internal shielding could also mitigate noise being coupled in through wires and boards inside the enclosure.

While it’s fun to listen to local favorites, I also enjoy listening to distant radio stations, like WWOZ from New Orleans or the BBC. I’m thinking of overhauling the radio to add streaming audio, probably with a handful of pre–programmed stations instead of a searchable directory. I’m not sure the Arduino UNO can handle streaming audio, so this might require a different controller, and a (preferably wireless) network connection. Ideally, the radio would have AM/FM and streaming audio. A slightly bigger speaker would probably be in order—maybe even stereo?

A personal MUNI display

iPhone-4S-muni-San-Francisco-0079

 

I recently built a device that displays MUNI bus and train arrival predictions in real-time. I live in a rare pocket of MUNI route richness in San Francisco, the Lower Haight, and am lucky to be within short walking distance of nine MUNI lines. When a line is delayed, has three buses backed up in a row, or I simply need to go downtown, I can pick from a number of options. The NextBus website is easy to use, and iPhone transit apps abound, but it’s still nice to just glance up to a screen as I’m running out the door and see which bus or train I should take.

The display shows up to three upcoming times for inbound and outbound routes I selected. Each route and its predictions are shown for three seconds before the display shows the next route. At the end of the route list, the display returns to the beginning of the list and starts over. A single button lets the user cycle quickly to a route of interest instead of waiting through each route in the list. The prediction times are updated about once per minute.

 

Hardware

The core is an Arduino Uno Ethernet, which is very similar to the Arduino Uno with an Ethernet shield, except the Ethernet interface is integrated into the same board as the Uno. A protoboard shield holds a few peripheral components, such as a potentiometer for setting the LCD contrast and hardware button de-bouncing. The LCD is a 16×2 character amber-on-black display to keep in style with SFMTA’s bus shelter indicators. The single button is an SPST momentary on-on switch.

 

Software

The NextBus API is reasonably documented and gives not only MUNI predictions, but also info for transit agencies in a few other cities. The API can give route details, such as a list of all the stops in a route, or even the list of all the routes in a transit agency, from which one could systematically build a list of all the stops for all the routes. All that’s needed for this project is to call the API for a particular route and stop ID pair, and handle the response from the server. For the curious, I’ve made the Arduino code available on Github.

The API response for a single route and stop, which can hold several prediction times, is often in the range of 800 bytes. Since the Uno has only 1 kB of RAM, it’s a bit of a challenge to accept and manipulate the response to find the times of interest. I started using Arduino String objects, but wasn’t able to get it to work reliably with the long string responses returned by the NextBus API. I eventually used character buffers and C string.h substring matching and copying instead. Rather than holding the entire response in memory, the device captures single line responses from the server and extracts prediction times from each line, if available. After the third route time is extracted, the rest of the route API response is discarded.

The list of route and stop pairs is hard-coded into the Arduino sketch. The Nextbus API format is also hard-coded into the UNO, but I assume this changes very infrequently.

 

Enclosure

The enclosure is made of layers of laser-cut 0.5mm thickness wood from Ponoko (timber core with a timber veneer on each side). I designed each layer in Illustrator, stacked them on top of each other, and glued them together. This is how the laser-cut wood came shipped from Ponoko:

iPhone-4S-muni-San-Francisco-0076

 

Prototype showing the layers before they were glued together:

iPhone-4S-muni-San-Francisco-0077

After gluing the layers together, I added wood fill to smooth the gaps between the layers, then sanded it down to smooth it further, and stained it to give it a darker look.

 

Enhancements

I’m considering adding a few things now that the display works reliably and is installed in the hallway:

  • A great enhancement would be to add a software-based route and stop selector / menu that updates the UNO’s sketch so users can add or delete routes and stops.
  • Over-the-wire firmware updates would allow for tweaks, such as updating routes and stops, without needing to connect a computer directly to the device.
  • Moving from wired to wireless: this certainly isn’t necessary, but would allow for installation in many more locations and without requiring connecting the device with an Ethernet cable.