musical beat detector prototype circuit board
musical beat detector schematic
This circuit is used for synchronizing a variety of LED displays to music and other sources of sound. It picks up the sounds with a small electret condenser microphone, processes the audio information and isolates changes in the sound which correlate to the rhythm of the music. It is designed to be sensitive to drum beats, bass lines and periodic changes in loudness.
The circuit outputs a low-going pulse with every beat, this can be used to trigger a microprocessor or a discreet digital circuit. The external circuit can be used to step through a variety of patterns on an LED display or any other type of output device. An example program that runs on a Motorola 68HC05K1 microprocessor can be seen in the Resources section below. An Arduino processor board would be a suitable modern alternative to use as the platform for an LED sequencer.
The beat detector runs on regulated 12VDC power and the output uses an open-collector transistor circuit which is compatible with 3.3V, 5V and higher voltage CMOS logic circuitry.
The beat detector is typically used for stepping an LED light sequencer through its patterns while synchronizing with music. It could also be used to sequence stage lighting in live music performances. There may be other non-musical applications for the circuit if you need to detect repetative thumping sounds.
This is a fairly complex analog and digital circuit with numerous stages. If you build the circuit, it is a good idea to observe the signal path by connecting an oscilloscope to the various test points shown in the schematic. Probing the test points can also be helpful for de-bugging the circuitry.
The power supply section uses a 470uF capacitor to filter the incoming 12VDC supply. A simple two resistor voltage divider and filter capacitor are used to produce 6VDC for biasing several of the op-amp stages. The beat detector will work with supply voltages between 8VDC and 15VDC.
Audio is picked up by a miniature electret microphone, the microphone's internal FET transistor is biased with a 39K resistor. Different resistor values may be used to optimize the sensitivity of diffent microphones. The microphone is fed to a variable-gain class-A audio amplifier that is built around a 2N3904 NPN transistor. The input and output transistors use 1uF feedthrough capacitors to insure good bass response.
The amplified audio signal is run through a constant-volume circuit (compressor). This circuit was found in a Nuts and Volts magazine article by author Ray Marston (see below).
The compressed audio circuit is fed into a two pole lowpass filter based around one of four sections of an LM324 quad op-amp IC. The filter attenuates much of the high frequency information from the audio signal in order to enhance the low frequency bass notes.
The lowpass filter feeds into an op-amp inverting amplifier and associated peak hold circuit. This circuit further filters the audio into a slow-moving waveform that tracks the loudness of the audio's bass information.
The peak hold circuit's output feeds a differentiator circuit. The differentiator is used to track and amplify small changes in the audio's bass information.
The differentiated bass signal is run through the final op-amp stage which is wired as a threshold comparator with positive feedback for hysteresis. The threshold circuit produces a low-going digital signal which turns on when the input signal pulses close to zero volts. This happens when louder bass notes make their way through the preceeding audio stages.
The threshold comparator output drives one stage of a CD4538 CMOS one-shot circuit to produce an approximately 50mS pulse on the output of the one-shot. The one-shot is re-triggerable, if other pulses arrive while the 50mS output pulse is active, the one-shot output will stay active and the output pulse will be longer than 50mS. The output of this one-shot turns on the red LED which indicates a detected beat. The one-shot also turn on the open-collector output transistor circuit which is used to trigger the external sequencer circuitry.
The second CD4538 one-shot circuit triggers when the first one-shot's output pulse ends. It produces a 50mS hold-off pulse which is wired to the reset line on the first one-shot to prevent extra trigger pulses from occuring during this time. The hold-off one-shot guarantees a 50mS or longer dead-time period between beat pulses. This limits the maximum speed of the beat pulses and produces a well-defined pulse waveform for driving the external sequencer circuitry. The hold-off one-shot also drives the (optional) green LED.
Two prototype versions of the beat detector have been built. The first version was built on a piece of bare copper circuit board material using the Dead Bug construction method. The grounded side of various components were soldered to the copper surface and the rest of the wiring was done between the parts.
The second prototype (shown above) was built on a single-sided PC board using iron-on Press-N-Peel blue laser transfer film and FeCl etchant. This can be seen in the above photo. This is the first revision of the PC board. There are a number of bodges a.k.a. modifications that are visible on the board. The IC that is in a socket on its side is the MC4538 dual one-shot, this replaced a CD4001 (empty socket) that was used in an earlier version.
Alignment of the beat detector is straightforward although it does require an oscilloscope. Connect the scope to ground and TP1. Put the microphone near a sound source such as a speaker from a stereo system. Play some music with a well defined beat through the stereo. Observe the audio waveform as the stereo's volume is turned up and down. Adjust the Mic Gain control so that clipping just starts to happen when the stereo is turned up to a loud volume.
Next, connect the oscilloscope to ground and TP7 and put turn the volume on the stereo to a typical listening level. Play some music that has a well defined beat or bass line. Adjust the sensitivity control on the thresold comparater so that you see frequent negative pulses on the scope. This control can be further adjusted to make the beat detector more or less sensitive as you listen to your favorite music.
The beat detector and LED sequencer can be placed in any location where you want to detect repetative sounds and control something. The most common use is making a color organ for a stereo system. For best results, the detector should be placed near a loudspeaker or a drum. Turn the beat detector on and watch the lights dance in sync with the music.
Back to FC's LED Circuits page.