aka programmable 8 step tone sequencer
This is my first build using an arduino microcontroller. I wanted to create a simple tone output device along the lines of the 555-based atari punk console, but using solely the mcu as the tone generator. Unfortunately, that was just too simple a task with amicrocontroller to play with--it was done in about five minutes and my mind was alreadyforging ahead with a bunch of new ideas.
Since coding the arduino is simple, Idecided to set up eight tone "slots" andthen sequence through them. A frequency knobwould control the freq of each slot, and aseparate tone duration control would allow me to get awesome eighties video game tones.Figuring out the component wiring wasn't too tough once I'd figured out the basics of reading analog pots and digital switches.
I also thought it would be fun to add a 2 line x 16 character backlit LCD display. The one I used is from sparkfun electronics and includes a serial I/O board so writing to the display is super easy.
Here it is in action:
There are four potentiometers, one each for frequency, duration, tempo, and volume. The first three are simple 100K linear pots wired as voltage dividers. The fourth is a 100k audio taper wired in the traditional volume circuit. The switches for each of the slots are simple momentary SPST devices and another is added for the start stop function. A central red LED is wired in as a tempo indicator.
Here's the wiring diagram.Larger Image
I built it first on the breadboard to make sure I had everything correct. Quite a mess.
After that, I designed a front panel using clear acrylic panel. I set everything up in Visio, printed the front panel, and taped it to the acrylic sheet to use as a drilling template.
Once the drilling was done, I cut a second piece of acrlyic to be the bottom panel and a couple of strips of red oak. The hole thing is held together with black sheet metal screws.
I built two rails using stand-offs and a length of copper wire--one for V+ and one for ground. This greatly simplified the wiring since each of these rails has lots of connections to the pots and switches. I mounted the LCD display with stand-offs and finished all the wiring, trying to keep it fairly clean with heat-shrink tubing.
After fixing a few wiring mistakes, I hooked it up to the arduino board, and used the USB port to upload my program. Success!
Parts of the source code were tricky as I learned the little tricks of analog inputs, digital outputs, generating frequencies and keeping the loop code as tight as possible. Here's the code:
Here are some pictures of the completed device.