Monday, August 19, 2013

Tutorial: Arduino + Kit rf 433Mhz(Part 2: Set up)

Today we are making the setting up for our RF link kit. If you don't now what's it an RF link kit please read the part 1 of this tutorial. So let's start then:


Software Set Up


Arduino Folder
First of all we have to install the library Virtualwire on the arduino IDE. We have to open a folder named "libraries" and copy the folder VirtualWire, that you download before, inside. This folder is in the arduino folder where the program files are kept. Then we have to restart the arduino IDE. Let's prepare the hardware.


Transmitter Set Up


Transmitter
First we going to set up our transmitter. In my case I will use an arduino Uno. We only need to connect the pin 12 from your arduino to the transmitter data pin. You have to look the data sheet because in function of the manufacturer the collocation of the pins could change.

If you want to have good range you should connect the transmitter to a 9v battery. This modules can be powered between 3 to 12 V. More volts means more range.If you use more than one battery you must connect the grounds, if not it won't work.

Antenna
Also, you have to put an antenna. For this modules a simple piece of wire with 15 cm long will be enough. I found some antennas for this modules, so another option it's to buy the antenna.I couldn't try them yet.


Receiver Set Up


Receiver
However, we have to connect the receiver. The connection it's similar. You have to attach the date pin to the pin 11 on your arduino board  and power the receiver. In this case you can power directly from your arduino because the receiver works with 5v. Also, you should put an antenna, the same as the transmitter will be enough.

Equal to the transmitter, the receivers from different manufactures could have different pins distributions.


Test


 Now it's time to charge the code. To be sure that all works fine, we will charge the example code. They two code examples are   File =>Examples=> VirtualWire=> transmitter   and    File => Examples=> VirtualWire=> receiver.

Then open the serial monitor and if you receive the data your set up it's correct.If not read "A tip for solve possible problems"

This all for this part of the tutorial, on the next part we will read the code and understand all the functions on the VirtualWire library. Leave some comments and propose ideas writing to controlrobotics@rodrigomompo.com


A tip for solving possible problems

A good form to test if the problem is form your code or from your hardware, its making the connection trough a wire. Again you need to make sure that all the grounds are connected if you want a positive result.

No comments:

Post a Comment