I’m calling this the Nielsen Speaker, for no particular reason.
In February, a Facebook friend sent me a link to the Moog Circuit Bending competition:
I’ve been rolling a few ideas around my brain and this gave them a focus:
- Motor controllers and their matching motors make neat (often octave-ish) noises. In essence, a motor driver is a synthesizer of sorts.
- Motor drivers are basically the same as amplifiers.
- Plastic toy guitars are often horrible anti-instruments and need rehabilitation.
- I’ve always had a soft spot for the Leslie speaker.
So here’s what I made:
Bill of materials:
- ATMega328 microcontroller: $3.38 USD
- L293D Quad H-bridge: $3.90USD
- Craptastic kids’ plastic toy guitar: $4.99 CAD
- Small speakers x 3: $2.28 USD
- C1: .1uF capacitor: $0.50 USD
- Chip sockets x 2: $0.50 USD
- CD-ROM motor: $1.00 USD
- 7805 5-volt voltage regulator: $0.35 USD
- 100uF Capacitor: $0.15 USD
- 16MHz Crystal: $0.75 USD
- 18-22pF Capacitor x 2: $0.20 USD
- 200 ohm resistor: $0.10 USD
- 100 ohm resistor x 3: $0.30 USD
- 9V battery clip: $0.75 USD
- Slip ring: $5.59 USD
Throw in some protoboard and a bit of wire, and the Bill Of Materials sneaks in under $25 USD.
Software-wise, I started with this synthesizer library. It uses one timer at the audio frequency to advance to the next sample, and another for the PWM output. The ATMega328 chip supports 3 timers, and we’re going to need them all to run 3 PWM outputs simultaneously. The meat of the change adapts the single output and does three instead. For the moment I’ve dropped the number of simultaneous channels from 4 down to 2; it’ll still run with 4, but things outside the interrupt handler run mighty slowly. My current code only requires 2 channels for the moment so no loss.
Photos of the build:
Here’s how to build it, in a nutshell:
- Breadboard the circuit and adjust the code and circuit to suit your guitar. This will allow you to experiment with the controls of the guitar — every one will be different — and test the motor, before committing to building the perfboard with all the potential mistakes there. In this stage, you can run exclusively off the 5V Arduino supply and upload the code via the Arduino. The motor will not turn as strongly with 5V — just put a spare disc on the spindle, the speakers will come later — but you’ll be less likely to fry something if you make a wiring mistake. (To run off the Arduino supply, ensure that you temporarily connect the motor power supply on the L293D to the +5 supply.)
- Mount the speakers on a mini-CD. As per the video, I used a Dremel to cut down the disc; that’s not necessary, of course. Hot glue sticks readily to CDs, though not as well to the metal of the speakers. Be careful to keep the weighting symmetrical; the end result will be sensitive to imbalances.
- Build the perfboard. You will now be feeding 9V to the motor and supplying the integrated circuits via the 5V regulator, so double-check to make sure that your power supply connections are correct. One useful and low-risk way to verify is to leave the chip sockets empty and test the power and ground pins using a multimeter to ensure that they’re receiving the correct voltages.
- Try it out! I bent a clothes hanger into a simple frame to hold the slip ring from above; this took some tuning to balance it but was easy enough to adjust and offered enough stiffness to hold everything reasonably steady. You’ll want to leave as much weight as possible on the spindle to maintain friction between the motor and disc.
OK, so an important question: if I’ve basically built my own synthesizer, is it circuit bending? I suggest that this project does meet the spirit of the contest by making pretty much every part of it behave in a way it’s not supposed to. Here are elements that are “bent”:
- I’m adapting a synthesizer library to act as a motor controller. (Call this “code bending”?)
- I started with a kids’ toy guitar. OK, so I’m only using the I/O stuff, but anyway.
- I’m forcing the L293D quad H-bridge to act as an audio amplifier.
- I’m grafting in a scrap CD-ROM motor for musical purposes (not to mention running audio signals through it).
Beyond that, I like how this project refers to the Leslie speaker without really sharing any technical DNA.
As mentioned in the video, this is basically a scale model of a proper build. I suspect the low frequencies will be stunning if run through big speakers. I hope the full size version will follow soon — though Moog’s thumbs-up [hint hint] would be a guarantee!
Categorized as: Uncategorized