Vol. 17: Random Music Box

Microprocessor organ and servo drum play an endless song.

By Kevin Weekly

Photos by Sam Murphy

+ Downloads & Extras:

Part. No. Value Estimated Price
C1 10uF $0.07
C2 1uF $0.07
C3 20nF (203) $0.02
C4 100uF $0.08
J1 .1" headers $0.10
R1 50K smd pot $0.50
R2 50K smd pot $0.50
R3 50K smd pot $0.50
R4 10K $0.01
R5 10K $0.01
R6 10K $0.01
R7 4.7K $0.01
R8 10K $0.01
R9 10K $0.01
R10 10K $0.01
SP 8ohm spkr $2.49 (radio shack)
U1 OPA4342 $2.27 (digikey)
U2 PIC16F685 $2.58 (digikey)
DIP Socket 14-pin $1.29
DIP Socket 20-pin $0.69
Servo (optional) HS-422 $15 (hobby shop)
Protoboard or Breadboard $5  
Cardboard   look around
Total   $32

Some notes about the materials:

C1, C2, and C4 are minimum (you can replace them with higher valued caps)

The requirement for the potentiometers R1, R2, R3 is that they are the same value. They can even be replaced by equal-valued resistors.

U1 can be replaced by any equivalent op amp, such as the cheaper LM324

The servo can probably be different, but I cannot guarantee another servo will recognize the PWM commands. I tried the HS-325HB servo and it did nothing but twitch.

Join the conversation -- every MAKE article has an online page that includes a place for discussion. We've made these RSS and Atom feeds to help you watch the discussions: subscribe.