Introduction: Arduino Integer Transmission Simplified
This tutorial is all about the cheap Chinese data radios that is available on Ebay , during the past few years I have read and tried many libraries with these devices, and with mixed success on some and bad on others.
In this tutorial we will be looking at the most simplest Arduino Sketch to get a integer( only whole number no floats!) from point A to point B with definitions on how to increase your range and reliability.
Step 1: Setting Up
First off we need the hardware get your self a set( RX and Tx ) of the cheap chinese data radios of Ebay or preferred supplier.Secondly you will need two Arduino boards, Mega 2560 or a Uno will do fine its your choice.
Once you have your hardware you need to make an antenna for your Rx and TX radios.
Step 2: Antenna's and Connections.
On the Antenna port you can attach a copper wire of 164mm in length (tested for best performance ) this wire can be solid wire or soft braided strand both work very well. once you have the Antenna's attached it is time to connect your radios with the Arduino's.
On the TX side( the small PCB is the TX unit)
Pin VCC => 5v
Pin DATA => 11
Pin GND => GND
On the TX side( the Larger PCB is the RX unit)
Pin VCC => 5v
Pin DATA => 11 (Any of the middle two pins)
Pin GND => GND
Now you are ready to load the code.
Step 3: Installing the Library and Running the Code.
Once you have the connections made you are ready for the Code ! IF you do not have the Virtual Wire library installed then here is what to do.
Attached is a file called "VirtualWire.zip" extract this file and copy content in the file directory below.
Now you are ready for the code! start up two instances of the Arduino IDE and load the to files attached called
RX_STRIPPED and TX_STRIPPED into each IDE and upload into your Arduino boards( Make sure that your TX code is installed on the Arduino with the TX unit attached and the same for the RX unit.
Once uploaded start your serial monitor and you should start seeing data flowing from the TX to the RX Serial monitor.
Whala! your done ! now its time to get your head working and changing the code to do what you want !
Hope this helped !
Step 4: Factors That Decrease/Increase Range
Okay so your Radios are working and now now you want the maximum range yes?
Okay well here is a list of steps to take to get maximum range.
Step 1 ) Decrease baud rate that the radios work at to between 1000 and 2000bps
Step 2) Make the packet(payload) size to be sent smaller
Step 3) Increase the input voltage on the Transmitter to between 7.2 and 12v (7.2 works best for me )
Step 4) Make your antenna's of a higher quality wire and try to stay with in line of site.
I have personally with this code and settings above achieved 110 meter reliable communications with these units.
Participated in the