Fork me on GitHub

Project Notes

#226 MusicBoxKit

Build and test a Music Box kit, and run a demonstration under Arduino control.

The Build

Notes

This is a pretty common kit available from multiple sources, although it appears to have been originally produced by icstation.

The heart of the kit is a custom sound generator board with a potted chip, like this one. This is one of a range of boards - all with potted chips - that I believe are primarily produced as the sound effects generators used in toys.

This kit basically adds supporting circuitry on a PCB to:

  • drive a piezo speaker
  • decode 4 switch inputs into the necessary signals required to drive the sound board.

I demonstrate driving the module with an Arduino - very simple matter of pulling the inputs A-B-C-D high/low accordingly, master on/off thrown in for good measure. Of course, if you really wanted to use a sound chip like this with an Arduino, you could just control it directly.

Does this generate good sound effects? No! Twee at best, horribly poor immitation at worst. But if you want to sound like a cheap toy, this may be exactly what you need;-)

Kit Specs

  • Suite name: 16 Music Box
  • Kit Model: BOX-16
  • Operating voltage :4.5-5V
  • PCB size: 48mm (length) * 42mm (W)
  • Control modes: manual coding + external coding

16-tone box under your control, arbitrarily issued 16 kinds of interesting analog sound, both an electronic toy can also be used as a doorbell or alarm.

Kit Parts

The kit I received contained all the parts required, including some extra resistors and a random capacitor!

MusicBoxKit_kit_parts

The piezo buzzer supplied with the kit proved to be very poor match for the circuit. I replaced it with another I had available and improved the sound quality significantly - though it is still not great.

Sound Library and Demo Program

The four switches A-B-C-D select the sound to be generated:

ABCD coding Sound
0000 Machine gun voice
0001 Fire truck voice
0010 Ambulance voice
0011 The police car voice
0100 Crickets sound
0101 alarm
0110 Electronic signal sound
0111 koh
1000 Insect song
1001 whistle
1010 Telegraph sound
1011 Bird song
1100 ChongJi gunfire
1101 Car sirens
1110 Bass instruments sound
1111 Racing sound

Breakout pins for A-B-C-D are provided. With the switches open, these pins can be used to control the board from an external sources. The pins are low by default, and just need to be pulled high.

CK9561 sound effects module

The KD9561/CK9561 effects module is widely available.

It’s a potted chip on a board, primarily intended to be used in toys. Details are hard to come by. the best information I’ve found is this:

CK9561_application_schematic

How Switch Inputs are Multiplexed

Perhaps the most interesting as pect of the module is the way it uses the two CMOS ICs to decode the switch inputs in order to control the sound module.

  • CD4011 is a quad two-input NAND gate
  • CD4066 is a quad bi-lateral switch. Each control pin (active-high) switches the path between the two associated IN/OUT pins.

I haven’t traced the entire circuit. But for example, here’s the equivalent circuit for the part that controls the “RF” resistance between connections 8 and 9 on the sound module:

circuit_analysis_part1

Switch A input Switch B input 4066/1 Out 4066/3 Out RF Resistance
0 0 0 1 270kΩ
0 1 0 1 270kΩ
1 0 1 1 50kΩ
1 1 1 0 670kΩ

Driving the Module with an Arduino

The MusicBoxKit.ino sketch is a simple demonstration of the module. It runs a demo that cycles through the 16 sounds.

To drive with an Arduino:

  • 5V power is supplied from the 5V pin of the Arduino. The board can draw a peak of near 100mA, but that is within the capabilities of the Uno
  • a low-side n-channel MOSFET is used to switch the board on and off (controlled by a digital pin)
  • 4 digital pins are used to provide the inputs A-B-C-D
  • (optional) LEDs are included to indicate the state of the 4 A-B-C-D inputs and the MOSFET gate signal

Construction

One unclear aspect of the build is how the MusicBox ASIC board is to be connected to the main PCB.

Here’s what I figured out after some study:

MusicBoxKit_connections

The finished build:

Module

Wired up with an Arduino for the demo (includes LEDs to indicate signal state):

The Schematic

Credits and References

About LEAP#226 MusicArduino
Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.