How to Make Music Box With 555 Timer

Building an electronic music box doesn’t require programming, microcontrollers, or complex digital synthesizer chips. Using two classic 555 timer ICs and a CD4017 decade counter, you can create a fully analog sequencer that plays looping melodies through an external speaker.

How the Circuit Works

The circuit operates using a conductor-and-musician topology split into three functional stages:

  1. Tempo Clock (First 555 Timer): Configured as a slow astable multivibrator using a 33 kΩ resistor and a 10 μF capacitor. It oscillates at roughly 1.5 Hz (flipping states about every 0.65 seconds), sending steady square-wave clock pulses to advance the sequence.
  2. Step Sequencer (CD4017 Decade Counter): Receives clock pulses on pin 14. With each rising pulse edge, it shifts a single high output across its pins sequentially (Q0 through Q9). Outputs Q3 and Q6 are left unpopulated to create natural musical rests. The remaining 8 outputs represent the sequenced musical notes.
  3. Tone Generator (Second 555 Timer): Configured as a fast audio-frequency astable oscillator using a 33 kΩ resistor and a 10 nF ceramic capacitor. The active counter outputs feed through isolating diodes and specific resistor values into pin 5 (Control Voltage). By pulling pin 5 up or down, each step shifts the internal comparator reference levels, altering the charge/discharge time of the 10 nF capacitor and modulating the audio pitch.
  4. Audio Output: The tone output from pin 3 passes through a 10 ÎĽF capacitor (blocking direct current to protect the speaker coil) directly into a 5W speaker.

Required Components

  • Integrated Circuits:
    • 2Ă— 555 Timer ICs
    • 1Ă— CD4017 Decade Counter IC
  • Resistors:
    • 2Ă— 33 kΩ (timing loops for both 555 ICs)
    • 3Ă— 10 kΩ (pitch selection ladder)
    • 3Ă— 15 kΩ (pitch selection ladder)
    • 2Ă— 22 kΩ (pitch selection ladder)
  • Capacitors:
    • 2Ă— 10 ÎĽF electrolytic capacitors (one timing, one audio DC-block)
    • 1Ă— 10 nF ceramic capacitor (tone timing)
  • Diodes:
    • 8Ă— 1N4148 fast-switching signal diodes
  • Audio & Power:
    • 1Ă— 5W speaker
    • 1Ă— 4Ă—AA battery holder (yielding 6V supply)
    • 2Ă— Alligator test clips
    • 17Ă— Breadboard jumper wires
    • 1Ă— Standard solderless breadboard

How to Make Music Box With 555 Timer

Step 1: Wire the Clock (First 555 Timer)

Place the first 555 timer IC across the breadboard’s center notch near the top. Pin numbers run counterclockwise starting from pin 1 (marked by the circular dot/notch).

  1. Connect pin 1 (GND) to the negative power rail.
  2. Connect pin 8 (VCC) to the positive power rail.
  3. Bridge pin 4 (Reset) to pin 8 (VCC) to prevent accidental resets.
  4. Bridge pin 2 (Trigger) to pin 6 (Threshold).
  5. Place a 33 kΩ resistor between pin 3 (Output) and pin 6 (Threshold).
  6. Connect a 10 ÎĽF capacitor between pin 2 (positive anode lead) and the negative power rail (negative cathode lead).

Step 2: Configure the CD4017 Sequencer

Mount the CD4017 IC straddling the center divider a few rows below the clock timer.

  1. Connect pin 16 (VDD) to the positive rail and pin 8 (VSS) to the negative rail.
  2. Tie pin 13 (Clock Enable/Inhibit) and pin 15 (Reset) to pin 8 (negative rail / ground) so the chip counts freely on rising clock edges.
  3. Run a jumper wire from pin 3 of the first 555 timer to pin 14 (Clock Input) of the CD4017.

Step 3: Wire the Tone Generator (Second 555 Timer)

Position the second 555 timer IC on the lower half of the breadboard across the center notch.

  1. Connect pin 1 (GND) to the negative rail.
  2. Connect pin 8 (VCC) to the positive rail.
  3. Tie pin 4 (Reset) to pin 8 (VCC).
  4. Bridge pin 2 (Trigger) to pin 6 (Threshold).
  5. Place a 33 kΩ resistor between pin 3 (Output) and pin 6 (Threshold).
  6. Insert a 10 nF ceramic capacitor between pin 2 and the negative rail.

Step 4: Build the Pitch Selection Ladder

To allow multiple outputs to drive pin 5 without back-feeding current into neighboring counter stages, each note path requires an isolating 1N4148 diode (anode to counter pin, cathode toward the resistor) paired in series with a tuning resistor. Connect the other side of all tuning resistors to a shared junction row connected directly to pin 5 of the second 555 timer:

  • Step 1: CD4017 Pin 4 → 1N4148 Diode → 10 kΩ Resistor → 555 Pin 5
  • Step 2: CD4017 Pin 6 → 1N4148 Diode → 22 kΩ Resistor → 555 Pin 5
  • Step 3: CD4017 Pin 2 → 1N4148 Diode → 15 kΩ Resistor → 555 Pin 5
  • Step 4: CD4017 Pin 3 → 1N4148 Diode → 10 kΩ Resistor → 555 Pin 5
  • Step 5: CD4017 Pin 10 → 1N4148 Diode → 22 kΩ Resistor → 555 Pin 5
  • Step 6: CD4017 Pin 9 → 1N4148 Diode → 10 kΩ Resistor → 555 Pin 5
  • Step 7: CD4017 Pin 11 → 1N4148 Diode → 15 kΩ Resistor → 555 Pin 5
  • Step 8: CD4017 Pin 1 → 1N4148 Diode → 15 kΩ Resistor → 555 Pin 5

(Outputs Q3 and Q6 remain disconnected to provide musical rests between sequences).

Step 5: Connect Speaker and Power

  1. Place a 10ÎĽF capacitor with its positive anode lead connected to pin 3 (Output) of the second 555 timer, placing the cathode lead in an unused tie row.
  2. Connect one alligator clip lead between the capacitor’s cathode row and the speaker’s positive terminal.
  3. Connect a second alligator clip lead from the negative breadboard rail to the speaker’s negative terminal.
  4. Connect the 6V AA battery pack (red wire to positive rail, black wire to negative ground rail).

The circuit will immediately begin cycling through its programmed melody sequence, looping continuously as long as power is applied. You can modify the tempo by changing the first 555’s 33 kΩ resistor or adjust individual notes by swapping any of the resistor values in the ladder.

Why do the CD4017 output lines require 1N4148 diodes before connecting to the shared resistor ladder, and what would happen without them?

The CD4017 decade counter operates by setting only one output pin HIGH at a time, while all other output pins are actively driven LOW (tied internally to ground).

Because the pitch selection network connects multiple counter outputs to a shared junction point at pin 5 of the tone-generating 555 timer, the 1N4148 diodes serve as critical one-way gates:

  • Preventing Short Circuits: When one pin goes HIGH to send a voltage through its tuning resistor, the other non-active pins sit at ground potential (LOW). Without the diodes, current from the active HIGH pin would flow backward through the shared node into all the LOW pins, pulling down the control voltage and potentially overloading the counter’s output stages.
  • Isolating Individual Musical Notes: The diodes ensure that only the active step’s resistor affects the control voltage at pin 5. Without this directional isolation, all the resistors in the ladder would end up in a parallel voltage divider network to ground, destroying the individual pitch values and resulting in unintended, muddy tones or no sound at all.

Frequently Asked Questions

What controls the tempo and speed of the music box melody?

The first 555 timer operates as an astable oscillator that generates steady clock pulses to advance the sequencer at a fixed beat.

How does the circuit produce different musical notes without a microcontroller?

The CD4017 sequencer routes high output signals through isolating diodes and distinct resistors to modulate the second 555 timer’s control voltage pin (pin 5), shifting its audio pitch on each step.

Why are diodes placed between the CD4017 counter outputs and the tuning resistors?

The 1N4148 diodes prevent current from back-feeding into inactive outputs, isolating the step signals so only one note resistor sets the pitch at a time.

Alex Klein Author

Author

Alex Klein is an electrical engineer with more than 15 years of expertise. He is the host of the Electro University YouTube channel, which has thousands of subscribers.