lectronic Construction

Miniture
electronic
xylaphone
project


About the project
This years electronic construction project is a miniature electronic xylophone, which has 8 touch sensitive keys (just over one octave) and allows a number of simple tunes to be played.

Electronic projects
In order to record the information about an electronic circuit, you need several different things:

Schematic diagram

How it works
The switches shown on the schematic are tracts on the PCB, these have been placed close together so that when a finger is placed on them there is a resistance between the pads. The typical resistance of a finger is around 2 - 8 Meg ohms. Two 5 Meg ohm resisters are used to make a potential divider, the center of which will have half the voltage of the power supply. The switches are placed across these resistors and causes the voltage at the center of the potential divider to move up or down, depending on which switch is pressed. This voltage is fed into an operational amplifier that has unity gain, this means that the output of the op amp is the same as the input. Whilst this might sound a little pointless the drive power of the input at 10 M ohms is very weak and not good enough to drive the microcontrollers inputs. What the op amp does is impedance match the switches so they can be read by the micro-controller.
The Microcontroller reads the four channels (two keys per channel) and decides if voltages has moved from the default center position. If the voltage it reads is above or below the center voltage it sounds the appropriate note for the key that has been pressed.
This is done by turning a transistor on and off very quickly, depending on which note is being sounded somewhere between 400 and 1000 times each second. The transistor acts as a switch to drive the speaker, this is needed because the micro controller is not powerful enough to drive the speaker directly.

PCB layout

Parts list
PCB Ref(s) Description Quantity
R1 - R8 5M resistor8
R9 3K3 resistor1
IC1 PIC 12F675 (microcontroller)
8 pin DIL socket
1
1
IC2 LM324 (op amp)
14 pin DIL socket
1
1
Q1 BC337 (transistor)1
Conn1 battery clip (for x2 AA holder)1
Conn2 Speaker (8 Ohm) connection1

Operating instructions


Back to electronic construction index