Axino home icon

RF controller experiments using 433MHz modules
February 2016

Simple RF controllers may easily be built using readily available and inexpensive RF modules which operate within the 433MHz band allocated to such devices. In New Zealand, this band extends from 433.05MHz to 434.79MHz having a nominal centre of 433.92MHz. Maximum permitted power level is -16dBW (25 milliwatts) EIRP. An example pair of these was bought on ebay for testing.

tx and rx  pic

Extremely cheap, the freight would have cost more, except that, in this case, freight was free. The picture shows the transmitter on the left and receiver at right. The N.Z 20c coin provides a size comparison (it is 21mm diameter).

These modules use ASK modulation (amplitude-shift keying). They can only be used for data; linear operation is not intended. The modules may be operated from a dc supply of 5V to 12V. When the data pin is low, the transmitter is off and when the data pin is high, the transmitter is on (cw). In the picture, the data pin is on the left, marked ATAD. (read it right to left...) On the receiver, the data output is both the middle pins; they are tied together.

With a cw output, the transmitter produced 2mW into 50 ohms when the supply was 4V, and 10mW at a dc rail of 12V. At 4V the frequency was 433.865MHz and at 12V, was 433.903MHz. The frequency also varied with the loading of the antenna. Nonetheless, the frequency stayed within the allowed band and the receiver passband is wide enough to cope. At 12V and cw output, TX current was 30mA. Current is very low (under 1mA) when the data input is held low.

Many applications will interface a microcontroller such as an Arduino to each of the modules and then, data transfer at up to about 8kb/sec is possible. For simple control functions, a microcontroller is not necessary. In the very simplest form, apply a high level to the transmitter data pin, and the receiver data pin will go high, allowing for a single control function. For additional noise immunity, one could use a oscillator such as a 555 astable at the transmitter, and a tone decoder chip like the LM567 fed from the receiver data output. An array of oscillators and tone decoders would provide multiple functions. A better option to encode say a keyboard, will be to use DTMF encoder/decoders. Holtek currently make the HT9200B encoder with both serial and parallel data inputs. This can generate either 16 tone pairs or 8 single tones. The companion decoder is the HT9170B. Older DTMF chips may still be available but you do need a square wave signal to drive the data input of the TX module.

The Holtek HT12E encoder and HT12D decoder

Specifically for simple push-button encode/decode functions, Holtek make the HT12E and HT12D. These have separate addressing and data pins to allow operation with multiple tx/rx modules. A pair of these was interfaced to the 433MHz modules as below to make a proof-of-concept 4-button controller: controller pic The encoder has 8 address pins (A0-A7) on the left, with a corresponding set on the decoder. These provide 256 address combinations. In this case the address was set to 11111100 by setting A6 and A7 to 0V. All address and data inputs have internal pull-up resistors so a logic 1 needs no connection. In a production situation, these address pins are usually set with a bank of DIP switches. For the HT12E encoder, the TE (transmit enable) pin must be pulled down to enable transmission. The TE pin can be used in a variety of ways but for this experimental project, the pin is pulled down when any of the 4 buttons attached to the four data inputs, are pressed, by virtue of the four signal diodes. The HT12E variant may be operated with voltages from 2.4V to 12V. (Holtek do have the HT12A version designed with infrared in mind and incorporating a 38kHz carrier output, but which is 2.4V to 5V only!)

The receive end

The HT12D decoder will operate from 2.4V to 12V and the 433MHz module will also operate down to at least 3.6V, but a 5V logic supply is common. If the decoder receives a valid coded format with the correct address, the Vt (valid transmission) pin goes high, and the four data pins D8 to D11 are set to their corresponding values. The data and Vt outputs can source or sink only 1.6mA and so for driving LED's or relays, some form of buffering is required. In this case, four PNP transistors drive a LED each. The Vt pin controls a common transistor to all LED's so that they light only when transmission is valid. You don't have to use the Vt pin as in this circuit. It could be simply used to light a LED to show a valid transmission has been received. In that case, the four data LED's would all connect directly to 0V and would remain in their last state (latch) until a different valid code was received. This is just an experimental circuit, so lighting LED's for the duration of the keypress on the encoder side is all it does. If you want to operate with other than 5V, you need to adjust the resistor on the OSC pins. At 3V, this should be 56K and at 12V it goes to 120k (assuming the encoder oscillator remains with value as shown). Instead of LED's, relays could be used, so the buffering section will change according to your needs, but bear also in mind that some other form of latching may be needed as well. To expand the system further, one could employ a keyboard or 4-bit binary encoder/decoder so that up to 16 devices might be controlled.

Possibilities are many, but this kind of link is best used for signalling something from momentary keying such as from push-buttons. It is best not to leave the transmitter on for long time periods to signal a static condition. This is because while it is on, other local transmissions in this same RF band will be blocked. You will be unable to employ a second transmitter while the first is transmitting. Nor will your neighbor. There might be circumstances where it could work, but it is unlikely to be consistent in operation. If you use a link like this to signal the state of a switch or other event, then the transmitter should only be keyed briefly when there is a change of state. Alternatively, a polled system could be used where the transmitter is periodically switched on for a second to transmit the current state of a monitored circuit, using a keying signal applied to the TE pin of the encoder, if using the HT12E.

Expected range

Range will depend on (a) the aerials on both TX and RX, (b) the voltage supply to the TX, and (c) the nature of obstacles between TX and RX. In this experiment, the antennas comprised 10cm lengths of wire on both ends. The link worked faultlessly when separated by 12 metres indoors with four intervening walls. Even with the transmitter and encoder voltage reduced to 3.6V, it was still working. To obtain the optimum range, use aerials of about 17cm (6.8") in length and operate the transmitter from 12Vdc. Outdoors, line of sight, this should work at over 500 metres, assuming there is no radio interference to the receiver.

Comments

There are no comments yet

Make a comment via the contact page