Why use HT12E?

Status
Not open for further replies.

dc740

Active member
Quick question. I was looking at some cheap RF 433Mhz transmitters-recievers. And saw a few people using HT12E encoders.

Can anyone explain why they need it in simple words a newbie electronic hobbyist can understand?

Aren't the transmitter and reciever enough?

Thanks!
 
Those cheap RF parts are extremely basic. The transmitter just turns on or off. The receiver just outputs a 1 or 0, depending on whether it hears any transmitter at any given moment.

If you only want to control 1 thing, and only turn it on/off, you might think that's great. But you're not supposed to leave the transmitter turned on for any long period of time. It needs to be turned on only in short bursts. So you might use a short pulse to indicate whatever's connected to the receiver toggle its state, for example if you're remotely controlling lights... a short pulse means "turn the lights on" and another short burst means "turn them off". But what happens if there's noise or temporary interference? Then your lights could turn off. If your sender remember whether they're on or off, it could get out of sync, turning them off when it wanted them on, and vise-versa. So to be reliable, you'd need to send a sequence of bursts and design the receiver to recognize 2 different patterns, one pattern to turn the lights on, the other to turn them off, so the system doesn't get out of sync. When you want the lights off, you always send a pattern that tells the receiver to turn them off, even if they're not currently on. Using distinct patterns also greatly reduces the likelyhood of random interference accidentally being interpreted to turn your lights on and off accidentally. So even though the radio receiver just outputs a 1 or 0, to make a reliable system, you need to decode incoming patters of 1 and 0 at specific speeds to recognize distinct codes.

As if that's not complicated enough, consider turning dozens of things on and off, all needing different patterns that need to be recognized, and all (hopefully) with low likelihood of being mistakenly received or mistaken for each other when there's radio interference. On top of all that, not all patterns are created equal. Ones where the transmitter pulses roughly equal amounts of on and off during the pattern are able to travel farther than simpler patterns without that symmetry property. These issues are all solvable, but hopefully you can see how it gets pretty complicated?

Those encoder chips take care of a lot of those details.

The VirtualWire library also does these things for you. So if you're using a Teensy or Arduino, you can use the free VirtualWire library to get all the nice advantages to send multi-byte messages using low cost hardware.
 
Last edited:
Thanks. That clears it up. I supposed its purpose was to simplify things.

Here is a page about getting "good" speeds with those things:
http://www.romanblack.com/RF/cheapRFmodules.htm


Basically the encoders are made to avoid doing lots of work like that guys did. Right?

Thanks for your detailed explanation. It was really useful.
 
Status
Not open for further replies.
Back
Top