There are many ways to communicate with remote Arduinos. I have found that many of them hit a slightly higher price point than what I would like. Also, ethernet shields (and wifi dito?) consume many valuable hardware pins. I will describe how to communicate host to Arduino using commercially available wireless serial ports. They are cheap(ish) and only use the rx/tx pins. The drawback is that the air-protocol isn't encrypted so I wouldn't use it for sensitive applications. I use it to control lighting. I would be more impressed than offended if a neighbour hacked my indoor lighting. Serial ports (even wireless) are designed for point to point communication. It is possible to use in one-to many or other constellations but certaing design consideration have to be taken. My Arduino library referenced in step 5 supports one-to many.

The described project is for one-way or two-way communication using (i. e. transciever). If you know you will only send commands "blindly" you can attach a transmitter to the PC end and a receiver to the Arduino. Those modules are really cheap.

Step 1: What you need

  1. USB serial adapter
  2. Two or more Wireless RS232 modules (e. g. EWRF 3022)
  3. Arduino. It's a Nano in the picture but any model should due.
  4. A gadget box
  5. Soldering equipment
  6. Basic Arduino skills
<p>Using 2 pairs of Tx/Rx's, can you do two way communication?</p><p>Say I want to:</p><p>&quot;as for data from a pin&quot;</p><p>then have the arduino serial print the result back to the computer</p><p>Thanks</p>
<p>If I interpret you question correctly - you want to use the command interpreter without the wireless stuff? Yes, that works. See point-to point mode here: https://bitbucket.org/ehsmaes/cmdcallback/wiki/Home</p>
<p>I may have asked my question in a confusing way.</p><p>Basically I want to be able to run simple 2 way serial communication wirelessly.</p><p>(Example: <a href="http://arduinobasics.blogspot.com/2012/07/arduino-basics-simple-arduino-serial.html" rel="nofollow">http://arduinobasics.blogspot.com/2012/07/arduino-...</a>)</p><p>That would require 1 Tx and 1 Rx on the arduino, and 1Tx and 1Rx on the USB/Computer. </p><p>How would I wire them up to have one pair of transmitters send instructions to the arduino, and the other pair send serial data from the arduino to the computer.</p>
<p>To give some background, I want to make an RC vehicle with lots of sensors. Rather than using a traditional R/C Tx &amp; Rx (like these <a href="http://ep.yimg.com/ay/yhst-17210252890263/exceed-rc-2-4ghz-4-channel-transmitter-6ch-reciever-complete-radio-system-for-rc-helicopters-airplanes-1.jpg" rel="nofollow">http://ep.yimg.com/ay/yhst-17210252890263/exceed-r...</a>) which are limited by the number of channels (Move forward/back, Turn left/right, etc), I was wondering if I could communicate with the arduino-bot via data, so I am not limited by number of channels. So I could send commands to it to turn left/right as well as receive data from the sensors in real time.</p><p>Maybe there is a better way of going about this.</p>
<p>Nevermind, I think I figured it out.</p>
<p>How fast is this thing? I am making a timer that will use a laser/photo resistor on each side to start and stop the timer. I am trying to make it accurate to the hundredth of a second. Also, I want to put a sensor in the middle so that I can measure my 10yd dash and 40yd dash in the same run, so can I us three of these at once? Thanks a lot for any help.</p>
<p>Do you really need instant responses? Couldn't you buffer the values and send while you finish the run? The only thing that has to be instant or nearly instant is the photo resistor.</p>
Hi bruin would like too make a timer with similar functionality as urs had some success but would like to make it better.
<p>I am hoping to make an instructable pretty soon, but tell me about how you have yours set up and hopefully I can give you some advice.</p>
It depends on the payload and baud rate. I run my transcievers @ 9600bps. That would make for just over 1000 bytes per second or 10 bytes per 100ms interval. You could go much higher with baud if you want. In your case, two-way transcievers would be overkill, though. You just need three transmitters and one receiver.
Hi again,<br>Do u think it would be possible to send video over this thing?<br>Thanks
Hi,<br>Do you think this Transceiver would work the same as yours?<br>http://www.amazon.com/gp/aw/d/B00KKQHQKQ/ref=mp_s_a_1_2?qid=1436893166&amp;sr=8-2&amp;pi=AC_SX200_QL40&amp;keywords=433mhz+transceiver&amp;dpPl=1&amp;dpID=41ZV9YBrRLL&amp;ref=plSrch<br><br>Thanks!
I would look into the Nordic wireless transceivers. they run on 2.4ghz and are pretty beastly chips with a robust feature set like idle/power down/standby modes/auto retransmission/etc. they are only 1.10$ each on eBay when you buy in bulk of 10 units. there is also many libraries which make using them a breeze. I personally program them in assembler most of the time.
<p>Thanks AbDuCt, I was looking at the Nordic 2.4ghz modules just last night and I was starting for formulate some ideas for world domination ... It's great to hear that they are a breeze to use. Also, Nordic have a pretty helpful looking Wiki about the RF that looks like it would be good to read more thoroughly when I get me some of these useful looking modules. They make pretty heavy comments about making sure that you use a smoothing capacitor to clean up the signal ... and that they should be used as 3.3v. Anyway, I'm ordering some soon!</p>
I forgot to ask. Could you link to a couple of the libraries?
<p>https://github.com/kehribar/nrf24L01_plus</p><p>http://maniacbug.github.io/RF24Network/</p><p>The first is one library and then there is another named Mirf. The second link is a library that allows you to link the transceivers in a binary tree like structure to create a zigbee like mesh network (good for automating a house for example). There are a bunch of tutorials on the internet what shows the usages of the libraries, the general usage is the same as standard file IO in C. There is a READ() function and a WRITE() function and the library does the rest. In assembler the transceivers are also easily controlled if you know how to communicate with them (specific sequence of pins that need to be toggled to tell the module what you're attempting to do, etc). As for range I haven't had a chance to play with them yet, but I know people who can easily cover a pretty standard sized house. One article on the internet said that the NRF24L01+ model does around 200 meters open air. There are more beefy versions, costing 6-7 dollars per transceiver) that include amplifiers and a RP-SMA connector for external antennas to boost wireless gain which boast 1000 meters of range but I haven't seen proof of that yet. I have 10 being shipped to me right now and I am in the process of revamping a colleagues assembler code to make wireless Nintendo 64 controllers powered by an attiny2313. Even if you only buy 2 transceivers to play around with, I highly suggest it.</p>
<p>@AbDuct</p><p>Could you forward me the link of transcievers which give a range of around 1000-2000 m and if possible their interfacing with Arduino</p>
<p>I put an order in for 10 nrf24l01+. I may make a version of the command/response library for these if the range is decent. By decent I mean from one end of the house to the other. Maybe a good mesh topology will help.</p>
<p>Nice! Mine just came in yesterday along with my new universal USB programmer for avr/pic/bios/eeprom/etc. Going to go look for my breadboards so I can start playing with these chips. I have to finish reorganizing the macros and functions in my assembler project so I have a dedicated radio library instead of all my code in one file with my actual project code. </p>
Thanks for the pointer. Are you referring to NRF24L01+ devices? I have been thinking of trying SPI devices. I am guessing the range will suffer though at 2.4 GHz. What is your experience on that?
<p>HI there,</p><p>is there any method to send bulk amount of datat through it? i measn sending a file on sd card to a computer like thing?</p><p>i have tried to send but i was only able to send one double type number per one time.</p><p>whenever i include more than that amount it reads as some wierd stuff by reciever.</p><p>i hope the buffer size may be a obstacle.</p><p>is there any method to solve this or to send bulk amount of data throuh two of this serial devices?</p><p>thanks again</p><p>shirantha</p>
Anything is possible but it could proove difficult. You are right. If you try to send it all at once you would flood the buffers. You could implement you own transfer protocol which so the receiving end would acknowledge each chunk before the next. Or you could slow it down on the sender. Shouldn't be too hard. However, in both cases you could loose data and you would have to implement checksums and re-send in the protocol for it to be useful. To sum it up. Possible? - yes, Practical and worth while? -no.
<p>hi there</p><p>can this be used for wireless midi?</p><p>cheers</p><p>tanc</p>
Sorry, I don't know enough about midi to answer that. If the midi uses rs232 as a carrier, I suppose it could be done but I am not the one to help you.
<p>nice tutorial mate!! just what i want. but i have a problem i bought two of this modules</p><p><a href="http://www.lankatronics.com/modules-and-sensors/rf/cc1101-rs232-wireless-data-transceiver-module-1703.html" rel="nofollow">http://www.lankatronics.com/modules-and-sensors/rf...</a></p><p>i was able to connect one module to pc via usb to serial successfully.but unfortunately i found none of arduino example codes which can be successfully compiled so that i could send serial data wireless to the PC.these were the pages i tried <a href="https://code.google.com/p/panstamp/wiki/LowLevelLibrary" rel="nofollow">https://code.google.com/p/panstamp/wiki/LowLevelLi...</a></p><p><a href="http://labalec.fr/erwan/?p=497" rel="nofollow">http://labalec.fr/erwan/?p=497</a></p><p>and some others too but none of them worked(codes give compile errors)i am sure that i have correctly installed the libraries. please can you help me and direct me to simple arduino code snippet so that i can send data to pc remotely from a distance</p>
Well, if all you want to do is send data from one arduino point-to point to your PC, you can just use Serial.print from the arduino. No lib's required. If you want command/response, you could try my library (used in the demo-video). There is a link in the instructable.
<p>one more question can we use it to program the arduino</p><p>?</p><p>thanks</p>
I haven't given it much thought but i am pretty sure it won't work. Not unless you trick the ardu into flash mode, for sure.
<p>one more question can we use it to program the arduino</p><p>?</p><p>thanks</p>
<p>thanks mate that helped...</p>
<p>Hi </p><p>I wonder can this be used for wireless 1 to many midi? ( 1 arduino master to many arduino slaves)</p><p>cheers</p><p>tanc</p>
<p>Can anyone post some links about transcievers having a range of 1000-2000 metres and their interfacing with Arduino</p><p>And does the problem of frequency matching occur if many transcievers are sending their data to a single Arduino</p><p>And how can we increase the range of a normal Nordic transciever if the above range isnt available</p>
<p>I haven't heard of any such long range trancievers. I think you would have to play around with directional antennas (maybe some version of a pringles can antenna or parabolic). If you need omni-directional range you would need high powered transcievers which would not be legal in most countries. Countries regulate output wattage. As a general rule, lower frequencies carry longer. There is a range/speed trade-off in wireless comms. In other words, 433MHz devices have better range but at lower throughput than 2.4GHz devices. If you want unlimited range go for a GSM module.</p>
<p>Hello,</p><p>Great project! I was wondering how I could adapt this to fit my project. I have one mcu that is transmitting serially to another mcu which receives the data so the data flow is one way. The communication would be asynchronous at 115,000bps baud. Can your setup shown here be simplified at all in this case or is there another wireless unit you would consider for such a setup? Low cost is also a concern for me.</p><p>Thanks,</p><p>Aaron</p>
Hi Aaron,<br><br>This setup is for two way comms. For the most part, one end would be a server of some sort but it could also be two ardu's where one is commanding the other. However, if you just stream one-way data from one mcu to the other, you could go cheap with something like this: http://www.ebay.com/itm/HSTY-New-1pc-433MHZ-RF-Transmitter-And-Receiver-Link-Kit-For-Arduino-Sca-1710-/221548991371?pt=LH_DefaultDomain_0&amp;hash=item339559538b. You should look for a lib to fit the part. My lib is not built for your purposes. Another cheap alternative could be the NRF24L01+ units referenced in previous comments. Good luck with your project!
<p>Thanks for your help. Can you tell me if I have this correct?</p><p>Option #1 (433MHz RF): I can basically cut the wire between uart1 tx and uart2 rx and insert these devices. Also, needs no antennae.</p><p>Option #2: (NRF24L01): Uses SPI protocol and cannot be used between two uarts (which is okay I need to learn SPI to use an SD card anyway). Also, needs an antennae.</p><p>Aaron</p>
<p>Option #1 - I think this will get you started: <a href="http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/" rel="nofollow">http://www.instructables.com/id/RF-315433-MHz-Tran...</a></p><p>Option #2: Yes, these use SPI. No you don't need an antenna unless you want to extend range. The ones I have seen have PCB-antennas.</p>
I am working on my project which requires to have a communication between 7 arduino boards. can you guide me to achieve this. currently I am trying to achieve this using Bluetooth but so far I am not even able to communicate two microcontrollers. please Help me.
<p>It depends. Is every arduino supposed to communicate with every other or is a server responsible for the communication with all? Is range important? I get great range with the wireless serial ports since they are on 434MHz. You could use wireless serial with my lib (https://bitbucket.org/ehsmaes/cmdcallback/wiki/Hom... It supports addressing so you can communicate from one point with many arduinos and potentially many to many (but I haven't tried it). If cost is more important than range, you may want to have a look at the RF24 circuits and lib's referenced in other comments below. I have 10 of them in a box but I haven't started experimenting. I would definitely only attempt to use bluetooth in one-to-one applications. If you will be passing sensitive information between you Arduinos, you should keep looking. Neither solution discussed here is encrypted (except for bluetooth which is bad for other reasons).</p>
Very nice <br>could you tell me what the wireless range is <br>and perhaps where you bought them? <br>thanks
The range is actually really good. I think it is rated around 200 meters in open spaces. Of course, I use it indoors. I have no problem from one end of the house to the other. It is considerably better than wifi. The modules I got are from a webshop in Sweden. http://swechtrading.se/zencart/index.php?main_page=product_info&amp;cPath=52&amp;products_id=614. You probably don't live in sweden. This should work too: http://www.ebay.com/itm/CC1101-RS232-RF-wireless-transmission-transceiver-module-433MHZ-/190941834424?pt=LH_DefaultDomain_0&amp;hash=item2c75052cb8. You can probably find cheaper if you shop around. <br> <br>I might look into SPI units instead of serial at some point. They seem to be cheaper.

About This Instructable


97 favorites


Bio: IT-professional by day, DIY hobbyist (among other things) on my free time. I allways have one or more projects going on. Usually something to do ... More »
More by ehsmaes: Two way MQTT-SMS Bridge (Linkit One) Panic Button with SMS+GPS (Linkit One) Portable SMS Motion Alarm (Linkit One)
Add instructable to: