Showing posts with label Relay Circuits. Show all posts
Showing posts with label Relay Circuits. Show all posts

02 October, 2007

Power-On Time Delay Relay

Here's a power-on time delay relay circuit that takes advantage of the emitter/base breakdown voltage of an ordinary bi-polar transistor. The reverse connected emitter/base junction of a 2N3904 transistor is used as an 8 volt zener diode which creates a higher turn-on voltage for the Darlington connected transistor pair. Most any bi-polar transistor may be used, but the zener voltage will vary from about 6 to 9 volts depending on the particular transistor used. Time delay is roughly 7 seconds using a 47K resistor and 100uF capacitor and can be reduced by reducing the R or C values. Longer delays can be obtained with a larger capacitor, the timing resistor probably shouldn't be increased past 47K. The circuit should work with most any 12 volt DC relay that has a coil resistance of 75 ohms or more. The 10K resistor connected across the supply provides a discharge path for the capacitor when power is turned off and is not needed if the power supply already has a bleeder resistor.

Power-Off Time Delay Relay

The two circuits below illustrate opening a relay contact a short time after the ignition or ligh switch is turned off. The capacitor is charged and the relay is closed when the voltage at the diode anode rises to +12 volts. The circuit on the left is a common collector or emitter follower and has the advantage of one less part since a resistor is not needed in series with the transistor base. However the voltage across the relay coil will be two diode drops less than the supply voltage, or about 11 volts for a 12.5 volt input. The common emitter configuration on the right offers the advantage of the full supply voltage across the load for most of the delay time, which makes the relay pull-in and drop-out voltages less of a concern but requires an extra resistor in series with transistor base. The common emitter (circuit on the right) is the better circuit since the series base resistor can be selected to obtain the desired delay time whereas the capacitor must be selected for the common collector (or an additional resistor used in parallel with the capacitor). The time delay for the common emitter will be approximately 3 time constants or 3*R*C. The capacitor/resistor values can be worked out from the relay coil current and transistor gain. For example a 120 ohm relay coil will draw 100 mA at 12 volts and assumming a transistor gain of 30, the base current will be 100/30 = 3 mA. The voltage across the resistor will be the supply voltage minus two diode drops or 12-1.4 = 10.6. The resistor value will be the voltage/current = 10.6/0.003 = 3533 or about 3.6K. The capacitor value for a 15 second delay will be 15/3R = 1327 uF. We can use a standard 1000 uF capacitor and increase the resistor proportionally to get 15 seconds.

Relay Toggle Circuit Using a 556 Timer

This toggle circuit operates by using a couple 555 timers wired as inverters. Pins 2 and 6 are the threshold and trigger inputs to the first timer and pin 5 is the output. The output at pin 5 will always be the inverse of the input at pins 2 and 6. Likewise, the output at pin 9 of the second timer will always be the inverse of the input at pins 8 and 12. A 100K resistor connects the output of one inverter to the input of the other so the state of one will be the opposite of the other.

In operation, the 1uF capacitor will charge to whatever voltage is present at the output on pin 5. When the button is pressed, the capacitor voltage will be applied to the input of the other timer which will reverse the state of both timers and toggle the relay, either on or off.

To follow it more closely, assume the output at pin 5 is +12 volts and the second output at pin 9 is zero volts. The 1uF cap will be charged to 12 volts. When the button is pressed, the cap will apply +12 to the inputs at pin 2 and 6 which will cause the output at pin 9 to go to zero, turning off the relay. When the button is released, the cap will discharge to zero, since the voltage at pin 5 is now zero. When the button is again pressed, the capacitor will apply zero to pins 2 and 6 causing the output at pin 9 to switch positive and engage the relay, and the cycle repeats.

The advantage of this circuit is the large hystersis range on the inputs. The button can be held closed indefinetly without upsetting the state of the outputs since the input voltage will be 1/2 the supply due to the equal value 100K resistors. The switching points are 1/3 and 2/3 of the supply so that a voltage of 50% has no effect. The circuit will also toggle very fast and needs no switch debouncing. One disadvantage is that it may turn on with the relay either engaged or disengaged. To solve that problem, you could use a resistor in series with one of the reset lines (4 or 10) and add a capacitor from the reset line to ground.

The 100 ohm resistor and 100uF capacitor serve to filter noise on the supply line if the circuit is used in a automotive application. They may not be necessary. The circuit may work well without those parts.

26 September, 2007

Sunrise Lamp

In this circuit, a 120VAC lamp is slowly illuminated over a approximate 20 minute period. The bridge rectifier supplies 120 DC to the MOSFET and 60 watt lamp. A 6.2K, 5 watt resistor and zener diode is used to drop the voltage to 12 volts DC for the circuit power. The bridge rectifier should be rated at 200 volts and 5 amps or more. In operation, a 700 Hz triangle waveform is generated at pin 1 of the LM324 and a slow rising voltage is obtained at pin 8. These two signals are compared at pins 12 and 13 to produce a varying duty cycle rectangular waveform at pin 14, which controls the MOSFET and brightness of the 60 watt lamp. When power is applied, the lamp will start to illuminate within a minute or so, and will slowly brighten to full intensity in about 20 minutes. You can make that longer or shorter with adjustments to the 270K resistor at pin 9. The 2.2 ohm resistor and .015uF cap connected to the lamp serve to supress RFI. The diode at pin 9 and 10K resistor on pin 8 are used to discharge the 3300uF cap when power is removed. Power should be off for a few minutes before re-starting.

Caution: This circuit is connected directly to the AC line and presents a hazard if any part is touched while connected to the line. Use caution and do not touch any parts while the circuit is connected to the AC line. You may want to use a 9 volt battery connected across the 12 volt zener to check the basic operation. The DC voltage at pins 1,2,3,5,6,7 will all be around 4.3 volts if the circuit is working correctly. If the DC voltages are all correct, you can use a variac to slowly apply the full line voltage and check for proper operation.

Photo Electric Street Light

This is basically a Schmitt Trigger circuit which receives input from a cadmium sulfide photo cell and controls a relay that can be used to switch off and on a street lamp at dawn and dusk. I have built the circuit with a 120 ohm/12 volt relay and monitored performance using a lamp dimmer, but did not connect the relay to an outside light.

The photo cell should be shielded from the lamp to prevent feedback and is usually mounted above the light on top of a reflector and pointed upward at the sky so the lamp light does not strike the photo cell and switch off the lamp.

The photo cell is wired in series with a potentiometer so the voltage at the junction (and base of transistor) can be adjusted to about half the supply, at the desired ambient light level. The two PNP transistors are connected with a common emitter resistor for positive feedback so as one transistor turns on, the other will turn off, and visa versa. Under dark conditions, the photo cell resistance will be higher than the potentiometer producing a voltage at Q1 that is higher than the base voltage at Q2 which causes Q2 to conduct and activate the relay.

The switching points are about 8 volts and 4 volts using the resistor values shown but could be brought closer together by using a lower value for the 7.5K resistor. 3.3K would move the levels to about 3.5 and 5.5 for a range of 2 volts instead of 4 so the relay turns on and off closer to the same ambient light level. The potentiometer would need to be readjusted so that the voltage is around 4.5 at the desired ambient condition.

Whistle On - Whistle Off

This is an extension of the CMOS toggle flip flop circuit shown in the "Circuits controlling relays" section with the addition of two bandpass filters and condenser microphone so the relay can be toggled by whistling at it. The condender mic used is a PC board mount Radio Shack #270-090C. The filters are tuned to about 1700 Hz, or the third Ab above middle C on a piano keyboard which is a fairly easy note for me to whistle. Resistor values for the filter can be computed using the three formulas below but we need to assume a gain and Q factor for the filter and the Q of the circuit must be greater than the square root of (Gain/2). The microphone produces only a couple millivolts so the overall gain needs to be around 4000 or around 65 for each filter. The Q or quality factor is the ratio of the center frequency to the bandwidth (-3dB points) and was chosen to be 8 which is greater than 5.7 which is the minimum value for a gain of 65. Both capacitor values need to be the same for easy computation of the resistor values and were chosen to be 0.01uF which is a common value and usable at audio frequencies. From those assumptions, the resistor values can be worked out from the following formulas.

R1 = Q/(G*C*2*Pi*F) = 8/(65*.01^-6*6.28*1700) = 1152 or 1.1K
R2 = Q / ((2*Q^2)-G)*C*2*Pi*F) = 8/((128-65)*.01^-6*6.28*1700)= 1189 or 1.2K
R3 = (2*Q)/(C*2*Pi*F) = 16/(.01^6*6.28*1700) = 150K

The op-amps are biased using a voltage divider of two 10K resistors so the output will be centered around half the supply voltage or 6 volts. The output of the second filter charges a 1uF cap at the base of a NPN transistor (2N3904 or similar). The emitter voltage is biased at 6.6 volts using the 3.3K and 2.7K resistors so that the transistor will conduct and trigger the flip flop when the peak signal from the filter reaches 8 volts. The 8 volt figure is the emitter voltage (6.6) plus the emitter base voltage drop (0.7) plus the diode drop (0.7). The sensitivity can be adjusted by changing the value of either the 2.7K or 3.3K resistors so that more or less signal amplitude is needed to trigger the flop flop.

Single Transistor Relay Toggle Circuit



The circuit below requires a double pole, double throw relay in conjunction with a single transistor to allow toggling the relay with a momentary push button. One set of relay contacts is used to control the load, while the other is used to provide feedback to keep the relay activated or deactivated. Several push buttons can be wired in parallel to allow toggling the relay from different locations.

In the deactivated state, the relay contacts are arranged so the 1000 uF capacitor will charge to about 2.7 volts. When the switch is closed, the capacitor voltage is applied to the transistor base through a 560 resistor causing the transistor to turn on and activate the relay. In the activated state, the relay contacts are arranged so the 3.3K resistor and 560 ohm resistor provide a continous current to the transistor base maintaining the activated state. While in the activated state, the capacitor is allowed to discharge to zero through the 1K resistor. When the switch is again closed, the capacitor will cause the transistor base to move toward ground deactivating the relay.

The circuit has three distinct advantages, it requires only a few parts, always comes up with the relay deactivated, and doesn't need any switch debouncing. However since the capacitor will begin charging as soon as the button is depressed, the button cannot remain depressed too long to avoid re-engaging the relay. This problem can be minimized with an additional resistor connected from the transistor base to ground so that the base voltage is close to 0.7 volts with the button depressed and the transistor is biased in the linear region. With the button held down, the relay coil voltage should be somewhere between the pull in and drop out voltages so that the relay will maintain the last toggled state. This worked out to about 820 ohms for the circuit I built using a 12 volt, 120 ohm relay coil and 2N3053 transistor. Temperature changes will effect the situation but the operation is still greatly improved. I heated the transistor with a hair dryer and found that the relay will re-engage with the button held down for approximately 1 second, but this is not much of a problem under normal operation.