Electrical – Why is the relay oscillating for over a half-second

bjtoscillationrelay

I'm building a circuit that can turn on a relay when the variable resistor cools down.

Its operating principle is cooling down the variable resistor increases its resistance, causing the voltage at Node 1 to increase until BJT 2 turns on, driving BJT 1, driving the relay. The LED is there as a visual indicator.

schematic

simulate this circuit – Schematic created using CircuitLab

However, when I built, I observed some strange behavior: upon cooling the variable resistor, after about 2 seconds the LED begins to glow and over the next second increases in brightness. Then, when the relay turns on, instead of a single "click", over the next second I hear a buzzing sound as the relay oscillates on and off before staying turned on.

When turning off (letting the variable resistor warm up), first the LED begins to grow dim, and then the relay, instead of cleanly turning off, oscillates for a second before remaining open. Moreover, when the relay is bouncing, the LED grows very slightly brighter (I don't think this is just my imagination).

My current understanding of the circuit is that as the resistance of the Variable Resistor increases, the current is amplified by the two transistors and gradually increases the current flowing through the relay until it turns on. While I know that relays can experience contact bounce, especially when run at less than rated voltage, I have no idea why it should oscillate for so long, or why the LED should grow brighter.

What circuit effect is responsible for the relay bouncing for so long?

EDIT: I'm not looking for how to fix my problem – I did that simply by making the relay a latching relay. What I want to know is the why – the reason it was bouncing for so long.

EDIT 2: The relay is driven by a 5V switching step-down regulator that draws power from a 8.4V battery. It turns on a 30W heating coil (driven by the same battery).

Best Answer

This kind of oscillation is called "chattering".

To avoid this you should add bypassing across the 5V line to ground (maybe 1uF ceramic in parallel with 100uF electrolytic).

Add a 100nF across the variable resistor.

And add some hysteresis. That is a bit difficult to do with your present circuit, one way is to add a PNP transistor as follows:

schematic

simulate this circuit – Schematic created using CircuitLab

Pick Rx to add a bit of hysteresis compatible with your desired switching points.

You may wish to try this without the 100nF or add a series resistor to the base of perhaps 5-10K and retain the cap across the variable resistor, to keep from slowing the positive feedback. Basically you want the hysteresis to take effect immediately and the changes from the variable resistor to be slowed a bit.