Electronic Birthday Candle

20,872

Electronic Birthday Candle
Electronic Birthday Candle

The concept involves mounting a microphone on a stick with an LED and designing a circuit that responds to loud noises detected by the microphone input (such as blowing) to turn off the LED. The schematic is straightforward, powered by a CR2016 3V coin cell battery, which continuously supplies power to the circuit without a power switch. While the battery may deplete if left in the circuit when the LED is off, this is acceptable for a device intended for limited one-time use. The left side of the circuit features a gain stage/envelope follower, with a low pass filter (R6 and C7) included, though it is not strictly necessary. Unlike typical setups, there is no gain on the microphone, as blowing on it usually clips the mic, producing the largest electrical signal possible. After experimenting with various gain levels, it was determined that anything over 0dB gain made the LED too sensitive, causing it to turn off from its own noise.

The second half of the circuit comprises a standard BJT flip flop, a bi-stable circuit that maintains one of two states. In this configuration, either Q2 is on, allowing current to flow through D2 (the LED) while keeping Q1 off, or Q1 is on, which turns Q2 off. Although modeling might suggest the circuit can balance between states, in practice, noise will trigger it to settle into one state. To switch states, a signal must be applied. This flip flop can also be termed a "Set-Reset Latch," where one signal "sets" it to one state and another "resets" it to the other. Typically, low pulses are used for these signals on the transistor bases. When Q2 is on and pulls the base of Q1 low, applying a low pulse to Q2 will turn it off, allowing current through R5 to raise the base of Q1 and turn it on.

In this design, the "set" signal is a high pulse from the envelope follower, applied to the base of the currently off transistor (Q2). Once the pulse reaches about 0.7V (a diode drop), the BJT turns on. Although this method is generally discouraged due to potential instability and excessive power draw from both transistors being on simultaneously, it suffices for this application. The envelope follower's output is directed to the base of Q1 to activate it, with a switch connecting the voltage rail to the base of Q2 to turn it on.

Attention must be paid to resistors R7 and R8, as equal collector loads are essential for the bistable circuit's operation. If R7 is too large, it may not provide sufficient current to keep Q2 on if its collector current is too high. Ideally, the load on each collector should be approximately equal; however, the presence of the LED's diode drop complicates this. With a 3V rail, the current through D2 is about 5mA, leading to the selection of R7 to provide a similar current to Q1's collector. This setup is contingent on maintaining a 3V rail.

The circuit can be visualized as follows: the microphone feeds into the gain stage, which is followed by the envelope follower. The output of the envelope follower is then connected to Q1's base. A switch mechanism allows the voltage rail to connect to Q2's base. The LED is positioned in series with Q2, ensuring that when Q2 is active, the LED illuminates. The careful balance of resistors ensures that the circuit operates reliably, maintaining the desired functionality of turning off the LED in response to the noise detected by the microphone.So the concept here is pretty simple. I wanted to mount a microphone on a stick with an LED and design a circuit that would react to a large amount of noise on the microphone input (blowing) to turn off the LED. As you might expect, the schematic for this thing is very straight forward. The device is powered by a CR2016 3V coin cell battery which always supplies power to the circuit (there`s no power switch). If left in, even when the LED is turned off, the battery will die, but I figure for something with such a limited one-time use, it was an acceptable requirement. The left side of the circuit is the familiar gain stage/envelope follower that you`ve seen in many of my sound reactive circuits.

I left the low pass filter in (R6 and C7), though it`s not really necessary. The only difference this time is that there is no gain on the microphone. Typically, blowing on a microphone actually clips the mic which means you`re producing the largest electrical signal possible. I experimented with different gain levels until I realized that anything more than 0dB gain caused the candle to be too sensitive and made it blow itself out.

Originally, I was hoping to flex my analog muscles and make a straight up FET gain stage, but I realized that with a CR2016 battery as my voltage source, there would be too much variability on the rail to set a good bias point. The second half of the circuit is a standard BJT flip flop. You probably saw a lot of these in my transistor clock posts. This is a "bi-stable" circuit which means it must always exist in one or two states. Specifically, either Q2 is on and pulling current down through the D2 (the LED) and keeping Q1 off, or Q1 is on which keeps Q2 off.

If you try modeling a circuit like this, you might find that it can balance between states, but in reality, this never happens as a tiny bit of noise will cause it to fall into one of the two states. So once the flip flop is in a state, you have to apply a signal to flip it to the other state. This type of flip flop can also be called a "Set-Reset Latch" which means that you have a signal to "set" it in one state and then a different signal to flip it to the other state ("reset" it).

Typically with this kind of circuit, these signals are low pulses on the bases of the transistors. Imagine Q2 is turned on and pulling the base of Q1 low. If you were to apply a low pulse to the base of Q2 for a moment, Q2 would immediately turn off. While off, current would begin to pass through R5 and raise the base of Q1 turning it on. I had to change this around a bit because my "set" signal would be a high pulse (the output of the envelope follower) instead of a low pulse. Instead of applying a low pulse to the transistor`s base that is currently turned on, I applied a high pulse to the transistor that`s currently turned off.

Once that pulse hit about 0. 7V (a diode drop), the BJT would turn on. This is generally frowned upon because for a moment, you have both transistors turned on which can cause excessive power draw as well as instability in more complicated circuits, but for my needs, it works fine. So I pass the output of the envelope follower to the base of Q1 to turn it on and have a switch connecting the voltage rail to the base of Q2 to turn it on.

The other thing to watch out for is R7 and R8. In order for a bistable circuit like this to work, the load on the collector of each BJT must be more or less equal. For example, if R7 is too large, it might happen that the current through it is not enough to keep Q2 turned on if Q2`s collector current is too big.

Nominally, you`d want the load on each collector current to be a resistive load of approximately equal value, but I didn`t have this option as I had an LED`s diode drop on one side. With a 3V rail, the current through D2 will be about 5mA ( ), so I chose R7 to provide approximately that much current to Q1`s collector.

This will only work if the rail is 3V. 🔗 External reference