Published:2011/8/10 1:20:00 Author:Amy From:SeekIC
Direction-Sensitive Light Barrier
Robert Edlinger
Model railway hobbyists who want to trigger train-controlled switching operations depending on the direction of travel often have things easy with systems such as Marklin HO or Miniclub Z gauge, since the corresponding switching track sections can be actuated individually in both directions. Things are different with other systems, such as the Marklin Moxi/1 gauge. Here it’s necessary to use selective switching hardware for this purpose. A popular approach is to use reed switches together with permanent magnets fitted to the bases of the vehicles. Unipolar and bipolar Hall switches can also achieve the same objective. However, a permanent magnet must always be present on the train to act as a trigger element.
Although normal light barriers cannot be used for direction-dependent control, with a bit of additional effort and expense they can be built such that trains selectively trigger switching operations in the desired direction. To prevent the gaps between carriages or wagons from generating undesired pulses, an adjustable dead time is added after the sensor.
The light barrier is based on a flip-flop made from the four NAND gates of a 4093 IC, each of which has two Schmitt-trigger inputs. Two of the inputs (pins 6 and 8) are connected to identical photo-transistors [Tl and T2) and collector resistors, and in the quiescent state when the phototransistors are illuminated and thus conducting, they remain Low. Both gate outputs (pins 4 and 10) are then High. If a vehicle now blocks one of the photo-transistors (for example Tl, although the circuit naturally works the other way around as well), the signals on the input and output of gate ICld change levels. The output of gate IC1 c is not affected by this, even though its ’internal’ input (pin 9) goes low. If the vehicle also blocks T2 as well, nothing changes until it has travelled past Tl. When that happens, the pin 4 output goes High again, but the pin 10 output toggles low. When the vehicle has finally passed both phototransistors, pin 10 also goes back to the High level. The flip-flop is then restored to its original state.
For this behavior to take occur, photo-transistors Tl and T2 must be arranged such that v/hen a vehicle passes by, at first only one of them is blocked, them both, and finally only the other one. This means that the distance between the phototransistors must always be less than the length of the vehicle.
When an output level changes, a pulse with a duration of around 10 ms appears at the input of gate IC1 b (pin 12) or IC1 a (pin 1). The time constants are determined by the timing networks (R3/C1 and R4/C2). As a High level (generated by the obscured phototransistor) is required on the other gate input (pin 13 or 2) to allow the pulse to pass through the gate, only one of these two pulses can proceed further to act as a trigger signal for the subsequent timer stage.
The two identically configured timers of the 556 dual timer IC function as mono-stable multivibrators, and thus act as pulse stretchers. Each of them drives an output relay with switchover contacts. The time constants of the monostables can be varied over the range of 3-170 s using the adjustment networks P1/R8/C6 and P2/R9/C5, independent of the supply voltage. RC network R7/C8 ensures that the two timers are in the quiescent stale (outputs Low) after power is switched on. Freewheeling diodes D2 and D4 are essential with inductive loads; they bypass the counter-EMFs generated by the relay coils. Dl and D3 keep the voltage across the freewheeling diodes away from the timer outputs. If you want to have a visual operation indicator, Dl and D3 can be replaced by red LEDs with a voltage drop of 1.6-2.0 V. As the circuit dissipates a fair amount of power, a small heal sink is recommended for the fixed voltage regulator (IC3), to keep it from overheating. We have designed a circuit board layout for this circuit, which can be fitted with components fairly quickly. Don’t overlook the (single) wire bridge between C6 and R5, and ensure that the electrolytic capacitors, diodes, transistors and ICs are fitted the right way around. The ICs can be fitted in sockets if you wish.
As the circuit board is relatively large, it probably should be mounted ’under the floor’. In that case, the phototransistors will have to be fitted off the board. The leads from the phototransistors to the circuit board should be screened and certainly not be longer than around 10 cm.
The values of the two collector resistors (Rl and R2) for phototransistors Tl and T2 can be varied over a wide range (10 kD to 100 kil) in order to match the sensitivity to specific conditions. However, increasing the resistance not only increases the response sensitivity and thus the range, it also increases the susceptibility to interference from stray light (which is any how rather high). If you have to deal with bright stray light (direct sunlight or fluorescent lamps in the immediate vicinity), you should fit the transistors with lengths of small-diameter plastic tubing blackened on the inside and/or IR filters with maximum sensitivity in the invisible spectral range of 800-900 mm.
Small incandescent lamps (16 V, 1 W), which naturally also emit IR light, are suitable as light sources. If a visible light source is undesirable, the lamps can be almost completely ’camouflaged’ using infrared filters. The other option is to invest in IR diodes: high-power types such as the SFH485 (100 mA max, 950 nm) allow barrier widths of more than 10 cm without any lenses. With suitable reflectors (with or without lenses), the range can be significantly increased. A value of 180 Q / 1 W is recommend for the series resistor.
This bidirectional light barrier is suitable for a variety of tasks. For instance, one relay output can serve as a layover switch in one direction, while a train travelling in the other direction can cause a turnout or points to be actuated. A voice recorder prepared with whistle or bell signals can also be triggered by one of the relays. Flashing warning lights can also be driven, or the relays can act as an automated ’signalman’ for barrier gates.
Naturally, this light barrier circuit can also be used for all sorts of counting tasks or as an alarm generator in domestic situations, if the nature of the object to be detected makes this possible. If only relatively short pulses (on the order of a tenth of a second) are needed, for instance to drive a counter, the RC networks that determine the timer values must be correspondingly modified. Photoresistors in miniature packages can be placed so close together that entomologists could even use the circuit to count exactly how many bees or bumblebees fly in or out.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/08/10/Back_to_the_Future__Home_electronics_from_the_(recent)_past_4.html
Print this Page | Comments | Reading(368)
Author:Ecco Reading(30186)
Author:Ecco Reading(3461)
Author:Ecco Reading(3181)
Author:Ecco Reading(3662)
Author:Ecco Reading(5231)
Author:Ecco Reading(3248)
Author:Ecco Reading(3390)
Author:Ecco Reading(3530)
Author:Ecco Reading(3935)
Author:Ecco Reading(3707)
Author:Ecco Reading(3677)
Author:Ecco Reading(3714)
Author:Ecco Reading(6028)
Author:Ecco Reading(3692)
Author:Ecco Reading(4478)