RockBot System


Getting Started

This guide describes how to modify the rock band drums for the bot. A solderless, easy-to-fit version is available in the Shop.

Tools you will need:
  • A Soldering Iron & Solder
  • A Multimeter
  • Wirecutters
  • A PIC Programmer suitable for a PIC12F675 chip

Components Used:

  • 2 x Quad ILQ74 or ISQ74 Opto Isolators
  • 5 x 1k Resistors
  • 1 x PIC 12F675
  • 4 x 2 mm Socket Pair (Optional)
  • 4 x 2 mm Plug Pair (Optional)

How the Drums work

On the Rock Band drum kit there are 4 drum pads and 1 kick pedal.

The Pedal

I will start with the pedal as it is the simpliest aspect of the drums.

In the base of the pedal is a reed switch (which is activated when it comes in range of a sufficiently strong magnetic field, in the plate of the pedal, above the switch is a magnet.

When the pedal is depressed the magnet activates the reed switch and this connection is carried to the headphone-style plug at the end of the cable.

Only two wires are used to interface the pedal with the controller board inside the drums, the connector is a 3.5mm mono headphone jack.

This can be verified wih a multimeter.

The Pads

See the Solderless Drums in the Videos section)!

The four pads are a bit more complicated than the kick pedal.

The pads have piezoelectric sensors in which when compressed (hit by the sticks) briefly emmits an oscilating current. It emmits current for as long as the pads are vibrating (generally a very short time unless you hit them very hard.

Under each drum pad is a 'connector board' which allows the sensor to be connected to the drum control board via a 2mm plug and socket pair. Tapping into these connectors is the easiest way to interface with the pads. Using a socket and plug pair you can make a simple device to intercept the signal wires.

The original connector (you may need to use a knife gently between socket and plug to remove the glue they use when manfacturing it):

The intercepting connector:

The final hook-up:

It is hard to see in the pictures but a wire/side of my board is marked to be on the same side of the white/striped wire. This is crucial due to polarity!

Opto Isolators

I will explain (briefly) how opto isolators work as they are key to the drums and guitars.

The the GH3Bot I used relays for simplicity but they are slower to respond than opto isolators because of the mechanical delay.

From Wikipedia:

In electronics, an opto-isolator (or optical isolator, optocoupler, photocoupler, or photoMOS) is a device that uses a short optical transmission path to transfer a signal between elements of a circuit, typically a transmitter and a receiver, while keeping them electrically isolated — since the signal goes from an electrical signal to an optical signal back to an electrical signal, electrical contact along the path is broken.

The ILQ74 or ISQ74 is a quad optoisolator, four isolators in one housing with NPN phototransistors.

Each opto isolator has 4 pins, two for the light source (usually an infra-red LED) and two for the light sensor (usually a phototransistor).

An NPN phototransistor takes negative and switches it to the output (an PNP one would take positive and switch that). This means that polarity (the negative and positive) pins are crucial.

Be wary if using different opto isolators as they can have different pin configurations, for example a single opto isolator could be like:

Where pin 1 is + LED, 2 is -LED, 3 is the output and 4 is - In. (These are not the techical names).

However some double or quad ones alternate the pin pairs, imagine this is a chip:


2 & 3 would be - and 1 & 4 would be +, and 5-8 would also be similar.


The PIC12F675

PIC Chips are programmable microcontrollers made by a company called Microchip. A PIC12F675 is a simple 8 pin chip (6 I/O ports as 2 are power and no crystal is needed). Only 4 ports are needed for this project.

Microchip provide an IDE for writing the code for these chips (which I used for the Advanced USB Interface) but for the drums I used MikroBasic (the demo version is sufficient).

To program them a PIC Programmer is required, Microchip supply them as do the Mikroelectronica (the company that makes MikroBasic).

How to simulate the Pads

It seems that the signals from the piezoelectric sensors are not the easiest things to replicate, I have currently got them to work at about 99% success rate, if I could afford a digial/PC oscilloscope I may be able to improve that.

The PIC Chip is used to simulate the oscillating frequency the piezos product. It does it at about 1kHz.

Each pad is connected with a pair of wires, a coloured wire (red, green, blue or yellow) and a white and coloured striped wire (same colour as the plain wire). The coloured wires are all a negative common.

To trick the pads into thinking they have been hit the opto isolator connects (when required) one of the output pins of the PIC chip to the drum controller.

So when the drum controller is sitting there waiting for a pad to get it, it gets a brief burst of pulsing current which causes it to think a pad has been hit.

4 outputs are used on the chip. One goes (via an opto isolator) to each pad. One common one could be used for all but I got less misses (the drum controller not recognising the signal as a hit) by using 4 seperate outputs and sequencing them as follows:

Time (ms) Output
0 0000
1 0001
2 0010
3 0100
4 1000
5 0000
6 0001
7 0010
8 0100
9 1111
10 0
etc... etc..

So because no pad activates at exactly the same time the drums are more accurate (god only knows why!).

Simulating the Pedal

This is easy. The drums send out a signal down one of the pedal's wires and wait for it to be recieved on the other wire, counting as a 'kick'. The signal sent out is negative so an opto isolator is used to connect the two wires when required.

When using a headphone jack, the shell is negative and the tip is the switched wire which returns the signal:

The shell connector will be the long one with the whole it and the grips, but you should use a multi meter to check which on the tip is. Check both to be sure.

Circuit Diagram

All schematics and PCB layouts are done using the free version of Eagle and the files are available for download at the bottom of this page.

Be careful when using this as this is for the ILQ74's I bought when I first made the board, check you polarities and datasheets.

For LEDs: Positive -|>|- Negative

On the transistors the arrow from the black bar (pin three on the lowest) is negative.

Power 1 is positive (+5v)
Power 2 is negative (Gnd)

Pedal 1 is positive (tip of the drum connector)
Pedal 2 is negative (shell of the drum connector)

Drumpads 1,3,5 & 7 are the negative commons (coloured wires)
Drumpads 2,4,6 & 8 are the positive signal wires (colour/white striped)

Data 1-6 are to be connected to the USB board output pins.

There is a 1k Ohm resistor beween the common of the optoisolator LEDs and ground.

PIC Code

Below is the MikroBasic Code, the configuration code is 0x3F84, the internal oscillator speed is 4Mhz.

program Sound_Generator
GPIO = 0
GPIO = %00000001
GPIO = %00000010
GPIO = %00010000
GPIO = %00100000
GPIO = 0
GPIO = %00000001
GPIO = %00000010
GPIO = %00010000
GPIO = %00100000
loop until 1=2

Hex code:


Copyright © Paul Ridgway 2009 | Pictures by Amanda Taylor | HTML Layout & Base code by James Ridgway