Step #1: Assemble the circuit.PrevNext
- Download the project schematic at http://www.makezine.com/17/diymusic_rand....
- You can solder it onto protoboard or put it together temporarily on a solderless breadboard. I placed and connected the components in this order: sockets, resistors, capacitors, power wires, signal wires, potentiometers, and finally the off-board connections to the speaker and servo. The web page has sketches showing each step.
Step #2: Program the microcontroller.PrevNext
Download the project code from makezine.com/17/diymusic_random and use your PIC programmer to burn the firmware onto the microcontroller. You can either program it directly from the hex file main.HEX or compile the program from the source code main.asm.
Step #3: VerificationPrevNext
- Before inserting the ICs into the sockets and powering on, it’s important to make some sanity checks, to avoid destroying the expensive ICs. First, check connections on the circuit with the digital multimeter.
- Next, make sure the power and ground rails aren’t shorted out. Then power on the circuit and make sure each chip’s power pin (Vcc) is getting 5V.
- Finally, plug in the ICs. If you don’t hear music output, disconnect power immediately to avoid any magic smoke.
Step #4: Add the drum.PrevNext
- You should now have a noisy circuit happily playing chords. To add percussion, the servo output alternates between maximum and minimum deflection every beat. The music box MAKE built uses a metal case as both project box and drum.
- For my original version, I soldered the circuit onto protoboard and taped everything into a cardboard box.
- For those with some PIC coding experience, the source code for the firmware is mainly driven by lookup tables, which you can easily modify to do other musical things such as playing songs, scales, etc.
- For the schematic, a GIMP file with wiring, compiled firmware, source code, and an audio sample, go to http://www.makezine.com/17/diymusic_rand....