arduino punk console:
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 a microcontroller to play with--it was done in about five minutes and my mind was already forging ahead with a bunch of stupid ideas.

Since coding the arduino is simple, I decided to set up eight tone "slots" and then sequence through them. A frequency knob would control the freq of each slot, and a separate 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:

The Controls

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.

The Wiring Diagram

Here's the wiring diagram. Click on the image for a bigger picture.

 

Prototyping & Building

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.

Wiring and Boot Up

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!

The Source Code

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:

All Done

Here are some pictures of the completed device.

 



(c) 2005-2012. Some Rights Reserved - This work is licensed under a Creative Commons License