Thursday, February 08, 2018

How I created a latching on/off output from a Deltang Rx102 receiver

The outputs from the Deltang Rx102 receiver can be reprogrammed so the default servo outputs become on/off outputs (see How I reprogrammed a Deltang Rx102 receiver). This means the outputs can be used to directly trigger sound effects on a sound card (such as the whistle) or can be used to turn on and off LEDs and other accessories. However, the outputs are momentary - ie they stay energised only while the button is pressed on the transmitter or the switch is clicked. The outputs revert to their original states when the button is released or the switch is turned off.

To change this situation, I decided to experiment with a couple of latching bistable (flip flop) modules which can be purchased through eBay for a modest price (just search for latching bistable module). Once energised, these modules keep the supply connected until they are energised again - ie they are latching as opposed to momentary. They range in price from around £1.50 to £5-£6. I bought a couple of different types of reasonably priced modules and went for solid-state versions rather than relay operated ones, as they operate from 3v and are smaller in size.

They both seemed to have a similar spec. - (3-24v, up to 5A load) - though one had six legs and the other had five.

I had previously used a couple of these modules to operate the interior lighting in some of my coaches (see How I added interior lights to my coaches). I didn't want to mount switches on or underneath my coaches and so decided I wanted the lighting to come on when a magnet was waved over their roofs. A reed switch triggers the module and the lights stay on until the magnet activates the reed switch again.

As with sound cards, the modules are activated by connecting the trigger input to the 0v (ie negative) supply from the battery. As I had already reprogrammed the Rx102 to provide 0v outputs on three of the pins, the Rx102 was already set-up for the module (see How I reprogrammed the outputs of a Deltang Rx102).

The wiring for the module is very straightforward.
The negative supply is shared by the receiver, the module and the LEDs. The positive supply is shared by the receiver and the module. The switched output from the module is connected to the positive legs of the LEDs and the trigger input on the module is connected to the Pin on the receiver which has been reprogrammed to provide a 0v output in response to a signal from the transmitter.

Note: The value of the load resistor protecting the LEDs will vary depending on the voltage of the batteries (the Rx102 has a maximum voltage of 10v!)

The connections on the module were made using a couple of JR servo plugs.

Once everything had been wired-up, the circuitry was tested. Pressing the bind button on the transmitter (Channel 5), makes the output from Pin 5 go low (ie down to 0v) which activates the latching module and turns on the LEDs. They remain on until the bind button is pressed again.

[Awaiting video]

However, when I tried exactly the same circuitry with one of the five-pin modules, it did not work in response to receiving 0v from the receiver. By-passing the output from the receiver and connecting the trigger input on the module directly to the negative lead from the batteries was successful. The output from the pin on the receiver must somehow confuse the second module - it might be because the internal voltage of the receiver is 3.2v while the supply is 6v and so the differential between high and low is insufficient to trigger the module. Fortunately, this does not seem to confuse the first module or the soundcards with which I have used the 0v outputs from the receiver (ie the MyLocoSound and the MTroniks Digisounds cards).

If you use two battery packs (eg a 6v pack for the receiver and a 12v pack for the accessory you want to switch on and off), then negative leads from both battery packs must be connected to the latching module. Do not connect both positive leads together!

No comments: