Arduino Integer Transmission Simplified

16,183

91

25

Posted

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.

"C:\Program Files\Arduino\libraries"

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.

Share

  • Wow, I have been str...-Bamaan

    Bamaan made it!

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

24 Comments

i got only mid value of transmitter . what should i do?

Hello,

For me is not working, and the RX-TX pair is functional, tested with another sketch.

What I want, is to send the data over wireless from 4 inputs, and activate 4 outputs on the receiver, one for each input, but can't get them working.

Any tips would be appreciated.

could you tell us more about your antenna? I soldered a 17cm copper wire to both the RX and TX, but i can't seem to get more than a meter of range between them, before the signal dies

Do you have any trouble with this library and the LCD5110_Graph.h or LCD5110_Basic.h library?

The VirtualWire and the Servo libraries don't work together but apparently RadioHead does, can you make for that one or explain how to? Thanks

Nice project!

I am worried about the range. I tried many wireless bells at home and none of them has an acceptable range.

You say that increasing the input voltage will increase the range, but how can you do that?

Thanks

the transmitter has a operating range of 3v- 12v on the VCC pin , but i found powering it with 7v works best for range.

I understand that, but afaik the Arduino only has 5 V and 3.3 V pins. How can you power the transmitter at 7 V or even 12 V without damaging the Arduino?

Sorry, maybe a silly question, but I am a newbie and I never used an Arduino before (never made an electronic DIY project, actually) and I'd really like to try this one (or similar projects with 433 MHz transmitters).

I am running my No.1 Arduino with the Transmitter module on battery. My No.2 Arduino is connected to my Receiver module and that is connected to the IDE running my Serial Monitor. I have NO data flowing or any communications from what I can tell. I verified the correct baud rate for the serial monitor and the sketch is the same. This is my second set I ordered from China and was hoping this set would work. I am wondering at this point what stupid thing that I did on my end. Do I have to have two serial monitors up for both Arduinos for this to work? Is there some way to test if it is transmitting? Thank you, humbley ... JOE

i am not sure from what i see in the source code of the receiver , their is no assignment for the received data to variable aka , what i beleive (i may be wrong) , receivedData.Sensor1Data will remain 0 .