A remote control system

Continued from: A remote control system part 1, which gives details of the radio transmitter and receiver modules.

The first part of this article in Electronics in Meccano issue 11 explained how radio transmitter and receiver modules can be used to send a signal. The signal from the receiver module was capable of switching on and off one device, so how can we make it control more than one?

The answer is to send a train of pulses serially using the transmitter, receive them using the receiver and decode them in order to switch on and off several devices.

This is what the Holtek HT12E and HT12D ICs do - the HT12E is an encoder and the HT12D is a matching decoder.

Both ICs require a regulated 5V DC power supply because of the oscillator resistor values chosen for each IC.

Figure 2: HT12E encoder pinoutThe HT12E Encoder

Click here to read this datasheet in Adobe Acrobat format HT12E Encoder Datasheet
927Kb

The pinout diagram of the HT12E is shown in figure 2.

The D0 - D3 Data inputs (pins 10 to 13) to the encoder have been connected to two centre-off Single Pole, Double Throw (SPDT) switches as shown in the transmitter circuit diagram of figure 4. These switches will form the on/off/direction controls for the two motors that we will be controlling remotely.

There are eight inputs to the IC (pins 1 to 8) called the Address inputs. These tell the encoder which address to send. The decoder IC HT12D also has these inputs - the addresses on both ICs must match for the Data to be valid.

Each Address pin may be connected to 0V or 5V. In this project I have connected them all to 0V, so the address is set to 0d on both ICs.  If you were to connect all the Address pins to 5V, then the address would be 255d - thus there are 256 possible addresses available. So, if you wanted to, you could set up switches to control one or more of the encoder Address pins, and then have several decoders, each set to a different address.

There are two more pins on the encoder. Pin 14 is an input called Transmit Enable (TE). Only when it is connected to 0V will the encoder send a transmission. We always want it to send a transmission, so it is permanently connected to 0V.

The final pin, pin 17, is Data Out (DOUT) which is the serial stream of pulses containing the address and data. This is connected to the Data Input of the radio transmitter module.

Figure 4: The full circuit diagram of the transmitter circuit

Click to enlarge

Figure 3: HT12D decoder pinoutThe HT12D Decoder

Click here to read this datasheet in Adobe Acrobat format HT12D Decoder Datasheet
326Kb

The pinout diagram of the HT12D is shown in figure 3 and is in many ways the opposite of the HT12E pinout.

As mentioned previously, the eight Address inputs are present. Pin 14 is now Data In (DIN) and is connected to the Data Output of the radio receiver module.

Pin 17 is now called Valid Transmission (VT) and goes high (to 5V) when ever there has been a valid transmission received by the IC. This will be useful later on.

Pins 10 to 13 are the Data Outputs which we will use to control two motors. When a Data In pin on the HT12E is taken high, its corresponding Data Out pin on the HT12D will also go high.

Losing the signal

The Data Outputs of the HT12D are known as ‘latching outputs’ because even if there is not a valid transmission, they will stay in the same state as they were from the previous valid transmission.

This behaviour poses a problem in our remote control application: Supposing you have just turned on the power to your Meccano model car. The motor turns and the car moves away from you. The car moves out of range and the radio receiver cannot pick up the radio signal. You transmit the “Stop” signal, but the receiver cannot pick it up and the HT12D output to the motor stays latched on. The car crashes!

What is needed is a way to cut the power to the motor if there is no valid transmission.

This facility is provided by the VT pin, which will be continually pulsing when there is a radio signal being received. However, it can’t do the job on its own because the duration of each pulse is too brief.

We will use a 555 monostable (see EiM issue 4) that will be continually triggered by the VT pulse so that its output is always high when there is a radio signal being received.

Because the 555 is triggered when its trigger input goes low, the pulses from the VT pin need to be inverted. We could use a NOT gate from a 4069 (see EiM issue 6), but the other five gates in the IC would be wasted. Instead, a NOT gate has been fashioned from a single BC108 transistor.

Driving the motors

ICs can’t normally power devices such as motors directly, and the HT12D is no exception. In fact, its Data Outputs can only supply 1.6mA - not a lot of current!

We could get the outputs to switch on relays via a transistor driver, but since this part of the project will be powered by batteries, normal relays will probably be too power hungry.

A more elegant solution is to use reed relays, so we shall take a look at them before going any further...

Reed relays

A reed relay is a reed switch (see EiM issue 6) surrounded by a coil. Current passing through the coil produces a magnetic field that is large enough to move the small contacts of the reed switch.

Advantages of reed relays

Disadvantages of reed relays

Back to Driving the motors

So, if you wish to change the direction of a motor that requires no more than 250mA, you can use the change-over type reed relay available from Farnell, connected as shown in figure 5a.

If you wish to simply switch a motor or another device on and off, you can use the 1A single-throw reed relay available from Maplin, connected as shown in figure 5b.

If you want to buy all your components from Maplin, you could use the Maplin single-pole single-throw reed relay to switch on a standard change-over relay, as shown in figure 5c. You would need two reed relays and two standard relays to control the direction of one motor.

In all cases, the reed relays are switched on and off by BC108 transistor drivers and the 0V side of each reed relay coil passes through another BC108 transistor.  This implements the signal loss cut-out mentioned before, since the BC108 is switched on and off by the output of the 555 monostable.

Figures 5 & 6: Wiring up various types of reed relay, The full circuit diagram of the receiver circuit

Click to enlarge

Goto top of page


Title: Shopping ListThe following lists the electrical parts that are discussed in the articles. Prices and order codes given are taken from the current Maplin catalogue, which is the probably best source of electronic components for the hobbyist in the UK, and the Farnell catalogue, a supplier to the electronics industry.

If you have access to a company account with Rapid Electronics or RS Electronics you may find these companies are cheaper.

A remote control system
 
Parts required to build the complete transmitter circuit shown in figure 4:
Maplin Order Code Price Page
HT12E encoder IC AE17T 99p 289
418MHz transmitter module GT39N £9.99 697
7805 Regulator CH35Q 39p 270
560W 0.6W metal film resistor M560R 7p 221
4 x 1KW 0.6W metal film resistor M1K 7p 221
1.1MW 0.6W metal film resistor M1M1 7p 221
22pF variable tuning capacitor WL70M 99p 96
2 x 0.1mF metallised polyester film capacitor BX76H 15p 91
220pF metallised ceramic plate capacitor WX60Q 13p 89
18-pin IC holder HQ76H 19p 304
 
Parts required to build the complete receiver circuit shown in figure 6:
Maplin Order Code Price Page
HT12D decoder IC AE18U £1.49 289
555 Timer IC QH66W 29p 292
418MHz receiver module CR75S £9.99 697
4 x 1N4148 signal diodes QL80B 8p 246
6 x BC108C NPN transistors QB32K 30p 247
6 x 10KW 0.6W metal film resistor M10K 7p 221
1 x 62KW 0.6W metal film resistor M62K 7p 221
1 x 200KW 0.6W metal film resistor M200K 7p 221
3 x 0.1mF metallised polyester film capacitor BX76H 15p 91
10mF 15V low profile electrolytic capacitor AT98G 15p 93
7805 regulator CH35Q 39p 270
18-pin IC holder HQ76H 19p 304
8-pin IC holder BL17T 14p 304
 
Standard relays and reed relays from Maplin (4 sets depending on your desired driving method, see text):
Maplin Order Code Price Page
5V 500W DPST reed relay JH15R £1.49 220
5V 500W SPST reed relay JH12N £1.49 220
12V 400W SPDT standard relay YX94C £1.29 214
 
Standard relays and reed relays from Farnell (4 sets depending on your desired driving method, see text):
Farnell Order Code Price Page
5V 1000W SPCO reed relay .103-597 £4.25 352

Maplin charge £2.50 for delivery on orders under £30.00 ex VAT.
Prices are taken from the September 2000 - August 2001 Maplin catalogue, and include VAT at 17.5%

Contact their order line on 0870 264 6000 or visit one of their shops.
Their customer service line is 0870 264 6002 and they have a website at www.maplin.co.uk where on-line ordering is available.

Farnell have a £10.00 minimum order charge for non-account holders.
Prices are taken from the May 2001 Farnell catalogue, and include VAT at 17.5%

Contact their order line on 0870 1200 200 or visit their website at www.farnell.com/uk

Goto top of page


EiM Logo

www.eleinmec.freeserve.co.uk

Electronics in Meccano April 2001 -- Issue 11

Edited by Tim Surtell
E-mail: timsurtell@eleinmec.freeserve.co.uk


| Home | Contents of Issues | Index | About | Letters | Printed Edition | Wizards | SELMEC | Links |