Custom Search

Wednesday, October 13, 2010

Mains Voltage Monitor

Many electronics hobbyists will have experienced the following: you try to finish a project late at night, and the mains supply fails. Whether that is caused by the electricity board or your carelessness isn’t really important. In any case, at such times you may find yourself without a torch or with flat batteries. There is no need to panic, as this circuit provides an emergency light. When the mains fails, the mains voltage monitor turns on five super bright LEDs, which are fed from a 9 V battery (NiCd or NiMH) or 7 AA cells. A buzzer has also been included, which should wake you from your sleep when the mains fails.

You obviously wouldn’t want to oversleep because your clock radio had reset, would you? When the mains voltage is present, the battery is charged via relay Re1, diode D8 and resistor R10. D8 prevents the battery voltage from powering the relay, and makes sure that the relay switches off when the mains voltage disappears. R10 is chosen such that the charging current of the battery is only a few milliamps. This current is small enough to prevent over-charging the battery. D6 acts as a mains indicator. When the relay turns off, IC1 receives power from the battery. The JK flip-flops are set via R12 and C4.
This causes T1 and T2 to conduct, which turns on D1-D5 and the buzzer. When the push button is pressed, a clock pulse appears on the CLK input of flip-flop IC1b. The output then toggles and the LEDs turn off. At the same time IC1a is reset, which silences the buzzer. If you press the button again, the LEDs will turn on since IC1b receives another clock pulse. The buzzer remains off because IC1a stays in its reset state. R11, R3 and C3 help to debounce the push button signal. In this way the circuit can also be used as a torch, especially if a separate mains adapter is used as the power supply.

As soon as the mains voltage is restored, the relay turns on, the LEDs turn off and the battery starts charging. The function of R13 is to discharge C4, preparing the circuit for the next mishap. If mains failures are a regular occurrence, we recommend that you connect pairs of LEDs in series. The series resistors should then have a value of 100 ?. This reduces the current consumption and therefore extends the battery life. This proves very useful when the battery hasn’t recharged fully after the last time. In any case, you should buy the brightest LEDs you can get hold of. If the LEDs you use have a maximum current of 20 mA, you should double the value of the series resistors! You could also consider using white LEDs.

Power Flip-Flop Using A Triac

Modern electronics is indispensable for every large model railroad system, and it provides a solution to almost every problem. Although ready-made products are exorbitantly expensive, clever electronics hobbyists try to use a minimum number of components to achieve optimum results together with low costs. This approach can be demonstrated using the rather unusual semiconductor power flip-flop described here. A flip-flop is a toggling circuit with two stable switching states (bistable multivibrator). It maintains its output state even in the absence of an input pulse.
Flip-flops can easily be implemented using triacs if no DC voltage is available. Triacs are also so inexpensive that they are often used by model railway builders as semiconductor power switches. The decisive advantage of triacs is that they are bi-directional, which means they can be triggered during both the positive and the negative half-cycle by applying an AC voltage to the gate electrode (G). The polarity of the trigger voltage is thus irrelevant. Triggering with a DC current is also possible. Figure 1 shows the circuit diagram of such a power flop-flop. A permanent magnet is fitted to the model train, and when it travels from left to right, the magnet switches the flip-flop on and off via reed switches S1 and S2.
In order for this to work in both directions of travel, another pair of reed switches (S3 and S4) is connected in parallel with S1 and S2. Briefly closing S1 or S3 triggers the triac. The RC network C1/R2, which acts as a phase shifter, maintains the trigger current. The current through R2, C1 and the gate electrode (G) reaches its maximum value when the voltage across the load passes through zero. This causes the triac to be triggered anew for each half-cycle, even though no pulse is present at the gate. It remains triggered until S2 or S4 is closed, which causes it to return to the blocking state.The load can be incandescent lamps in the station area (platform lighting) or a

solenoid-operated device, such as a crossing gate. The LED connected across the output (with a rectifier diode) indicates the state of the flip-flop. The circuit shown here is designed for use in a model railway system, but there is no reason why it could not be used for other applications. The reed switches can also be replaced by normal pushbutton switches. For the commonly used TIC206D triac, which has a maximum current rating of 4 A, no heat sink is necessary in this application unless a load current exceeding 1 A must be supplied continuously or for an extended period of time. If the switch-on or switch-off pulse proves to be inadequate, the value of electrolytic capacitor C1 must be increased slightly.

Mains Pulser

The pulser is intended to switch the mains voltage on and off at intervals between just under a second and up to 10 minutes. This is useful, for instance, when a mains-operated equipment is to be tested for long periods, or for periodic switching of machinery. Transformer Tr1, the bridge rectifier , and regulator IC1 provide a stable 12V supply rail for IC2 and the relay. The timer is arranged so that the period-determining capacitor can be charged and discharged independently. Four time ranges can be selected by selecting capacitors with the aid of jumpers. Short-circuiting positions 1 and 2 gives the longest time, and short-circuiting none the shortest.

In the latter case, the 10µF capacitor at pins 2 and 6 of the timer IC determines the time with the relevant resistors. The value of this capacitor may be chosen slightly lower. The two preset potentiometers enable the on and off periods to be set. The 1k resistor in series with one of the presets determines the minimum discharge time. The timer IC switches a relay whose double-pole contacts switch the mains voltage. The LEDs indicate whether the mains voltage is switched through (red) or not (green). The 100mA slow fuse protects the mains transformer and low-voltage circuit. The 4 A medium slow fuse protects the relay against overload.

Simple Electrification Unit

The circuit is intended for carrying out harmless experiments with high-voltage pulses and functions in a similar way as an electrified fence generator. The p.r.f. (pulse repetition frequency) is determined by the time constant of network R1-C3 in the feedback loop of op amp IC1a: with values as specified, it is about 0.5 Hz. The stage following the op amp, IC1b, converts the rectangular signal into narrow pulses. Differentiating network R2-C4, in conjunction with the switching threshold of the Schmitt trigger inputs of IC1b, determines the pulse period, which here is about 1.5 ms. The output of IC1b is linked directly to the gate of thyristor THR1, so that this device is triggered by the pulses.

The requisite high voltage is generated with the aid of a small mains transformer, whose secondary winding is here used as the primary. This winding, in conjunction with C2, forms a resonant circuit. Capacitor C3 is charged to the supply voltage (12 V) via R3.When a pulse output by IC1b triggers the thyristor, the capacitor is discharged via the secondary winding. The energy stored in the capacitor is, however, not lost, but is stored in the magnetic field produced by the transformer when current flows through it. When the capacitor is discharged, the current ceases, whereupon the magnetic field collapses. This induces a counter e.m.f. in the transformer winding which opposes the voltage earlier applied to the transformer.This means that the direction of the current remains the same. However, capacitor C2 is now charged in the opposite sense, so that the potential across it is negative. When the magnetic field of the transformer has returned the stored energy to the capacitor, the direction of the current reverses, and the negatively charged capacitor is discharged via D1 and the secondary winding of the transformer. As soon as the capacitor begins to be discharged, there is no current through the thyristor, which therefore switches off. When C2 is discharged further, diode D1 is reverse-biased, so that the current loop to the transformer is broken, whereupon the capacitor is charged to 12 V again via R3. At the next pulse from IC1b, this process repeats itself.

Since the transformer after each discharge of the capacitor at its primary induces not only a primary, but also a secondary voltage, each triggering of the thyristor causes two closely spaced voltage pulses of opposite polarity. These induced voltages at the secondary, that is, the 230 V, winding, of the transformer are, owing to the higher turns ratio, much higher than those at the primary side and may reach several hundred volts. However, since the energy stored in capacitor C2 is relatively small (the current drain is only about 2 mA), the output voltage cannot harm man or animal. It is sufficient, however, to cause a clearly discernible muscle convulsion.

Electrical Isolation For I2C Bus

When the SDA (Serial DAta) lines on both the left and right lines are 1, the circuit is quiescent and optoisolators IC1 and IC2 are not actuated. When the SDA line at the left becomes 0, current flows through the LED in IC1 via R2. The SDA line at the right is then pulled low via D2 and IC1. Optoisolator IC2 does not transfer this 0 to the left, because the polarity of the LED in IC2 is the wrong way around for this level. This arrangement prevents the circuit holding itself in the 0 state for ever. As is seen, the circuit is symmetrical. So, when the SDA line at the right is 0, this is transferred to the left. The lower part of the diagram, intended for the SCL (Serial CLock) line, is identical to the upper part.

Resistors R1, R4, R5, and R8, are the usual 3.3 kΩ pull-up resistors that are obligatory in each I2C line. If these resistors are already present elsewhere in the system, they may be omitted here. The current drawn by the circuit is slightly larger than usual since the pull-up resistors are shunted by the LEDs in the optoisolators and their series resistors. Nevertheless, it remains within the norms laid down in the I2C specification.

Supply Voltage Monitor

A circuit for monitoring supply voltages of ±5 V and ±12 V is readily constructed as shown in the diagram. It is appreciably simpler than the usual monitors that use comparators, and AND gates. The circuit is not intended to indicate the level of the inputs. In normal operation, transistors T1 and T3 must be seen as current sources. 
The drop across resistors R1 and R2 is 6.3 V (12 –5 –0.7). This means that the current is 6.3mA and this flows through diode D1 when all four voltages are present. However, if for instance, the –5 V line fails, transistor T3 remains on but the base-emitter junction of T2 is no longer biased, so that this transistor is cut off. When this happens, there is no current through D which then goes out.

Contactless AC Mains Voltage Detector

This is a CMOS IC (CD4033) based circuit which can be used to detect presence of AC mains voltage without any electrical contact with the conductor carrying AC current/voltage. Thus it can be used to detect mains AC voltage without removing the insulation from the conductor. Just take it in the vicinity of the conductor and it would detect presence of AC voltage.

If AC voltage is not present, the display would randomly show any digit (0 through 9) permanently. If mains supply is available in the conductor, the electric field would be induced into the sensing probe. Since IC used is CMOS type, its input impedance is extremely high and thus the induced voltage is sufficient to clock the counter IC. Thus display count advances rapidly from 0 to 9 and then repeats itself. This is the indication for presence of mains supply. Display stops advancing when the unit is taken away from the mains carrying conductor. For compactness, a 9-volt PP3 battery may be used for supply to the gadget.