Introduction: Arduino 433Mhz Wireless Communication Rc Switch

In this instructable we will be seeing how to use the 433 Mhz transmitter and receiver to communicate via the arduino board. We can also use the Ht12 encoder and decoder

Components Required :

433Mhz receiver transmitter module

Arduino Board (Any)

Jumper Wires

Breadboard

Battery 9V or 5V usb adapter. (two)

Step 1: Arduino Library....

There is a library RC Switch library which can be used send and receive rc codes.

All you need is a Arduino, a 315/433MHz AM transmitter (find out where to get one or hack your existing remote control) and one or more devices with a SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527 chipset.

This library also provides a rc sniffer code which allows you to sniff the code the your remote is sending and control the desired devices using the arduino with the existing RF remotes.

Library can be found here - RC Switch

More details on hacking the remote in the next step....

Step 2: Hacking the Existing Remote....

Modification

Open your remote control to take a look inside of it. There should be a encoder chip inside which is labeled with SC5262, HX2262 or PT2262. This chip generates a specific bit stream and sends it out to the transmitter part of the remote control through its DOUT (digital out) pin. What we want to do is to connect a Arduino instead of the built in encoder chip to the transmitter part. The SC5262, HX2262 and PT2262 are compatible, so the DOUT pin is allways the 2nd pin from the upper right side

There is no need to physically replace the chip. It will do to solder a wire to that pin and connect it with any available I/O pin from the Arduino.
Solder another wire to the positive pole (+) and the negative pole (-) of the battery holder. Altough a lot of transmitters were operated with a 12V battery they should also work with 5V, so I think it’s fine to power it directly from the Arduino (5V and GND pins).

Step 3: Hacking Remote (Contd...)

Additional Notes

In all remote controls (and yes, there is also one on the transmitter module - see attached image) there is actually a resistor between the controller chips digital out pin and the transmitter part. I know from users who hacked their remote controls and had problems with the range - it only worked on a distance of a couple of centimeters. The solution is to replace that resistor according to Ohm's law (there is a comment thread about that in the german version of the blog post): R(new) = U(new) x R(old) / U(old) So in a remote control which was powered with 12V before and having a 20k resistor it has to be replaced with a 5V x 20k / 12V = 8,3k resistor. After all it might be neccessary to put a resistor between the arduino and the transmitter but I personally didn't encounter any problems without one using a couple of different transmitters.

Credits : Rc Switch.....

Step 4: Connecting Transmitter Module With Arduino.

Connecting the Transmitter Module:

Tx Arduino

1) Gnd - Gnd

2) Vcc Vcc

3) Data Digital 10

4) Antenna - 17 cm long wire recommended .

Step 5: Connecting Receiver Module With Arduino.

Connecting the Receiver module

Rx Arduino


1) Gnd - Gnd

2) Vcc Vcc

3) Data Digital 2 (Inturrupt)

4) Antenna - 17 cm long wire recommended .

Step 6: Transmitter Code:

Attached transmitter side code for reference.

The transmitter side code has push button connected to pin 2 and pin 3 for sending the test data.

Step 7: Receiver Code:

Attached receiver side code for reference.

The receiver end has a section which is commented in the code this can be used to sniff data from the transmitter remote.
else {

// used for checking received data

/*Serial.print("Received ");

Serial.print( mySwitch.getReceivedValue() );

Serial.print(" / ");

Serial.print( mySwitch.getReceivedBitlength() );

Serial.print("bit ");

Serial.print("Protocol: ");

Serial.println( mySwitch.getReceivedProtocol() );*/ }

Step 8: Notes:

Basic Reading

1) You can read about connecting push buttons to arduino on : https://www.arduino.cc/en/tutorial/button.

2) Installing arduino libraries. : https://www.arduino.cc/en/guide/libraries.

Thanks.

Have Fun!!!!

Credits

RC Switch