Introduction: Radio Frequency Cloning 2
In this chapter, will be learning how to emit the signal that we learned to clone in the past chapter. We will be using an Arduino and a RF emitter (see the image). As i mentioned in the last chapter, I have a series of lights controlled by a remote. I so far I cloned that signals, so now we need to test them.
So here we go.
Step 1: Stuff
Extracted from the previous chapter:
"For this work we will be needing an Arduino uno or Arduino nano (Should be working with every Arduino, I have been testing this with Uno thought... mostly).
And of course a RF receiver and emitter modules. They usually come together and you can buy it a very low price."
Bare in mind that it comes in two 'flavors' 315MHz and 433MHz. My control works in 433 range so I bought that one. Make sure to know what frequency you will need. You can know this by opening the remote control and checking the emitter. The frequency should be printed in the metal circle shape component (check the picture of the emitter).
Step 2: Connections
As you can see the connections are fairly simple. Usually you will see info printed in the pin modules: data/atad vcc and gnd. So ground will be connected to the ground in Arduino, data/atad will be going to pin 4 (this is configurable from the code) and finally the vcc pin to 5v pin of the Arduino.
Step 3: The Sketch
The sketch if as simple as possible. So DO NOT EXPECT performance an all. The purpose is to give an idea of how the thing works. The code loops expecting character 1 to execute the method that sends the cloned signal stored in an array. You will be using this sketch with the sketch in the past chapter in order clone and test the times needed. Bare in mind that you will have to repeat this process perhaps 3, 4 or 5 times. I you are lucky, you will have it at once. Do not get frustrated eventually you will have it. This is the kind of signal that we are looking for:
So you will have to remove the 255's and 0's and add a 0. Remember that this signal works in pairs. That is why you will need to add zero. Again, sorry this is not the best code but it works, it only for testing purposes and you are free to work around, make it better and publish it.
Step 4: What Is Next?
So what is next?.
Well the idea is to try to work with the signals to compress them and make it easier to handle. Because if you need to send this signal from a computer for example, you need to store it and send it. If you use a transceptor module like nRF24L01, you will find out that you have limitations in the amount of information you send. So you will have to shorten the signal some how, and it can be shortened. This kind of modules are very cheap, but they are very powerfull and you will be able to send the signal from wherever in your house to wherever else.