loading
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>after uploading my sketch if i disconnect mt arduino from PC and give an external power source to it, will it work? And how can i use received data in an application?</p>
<p>Your arduino doesn't have to be attached to a PC but for most applications you need to have one arduino+rf connected to a computer in order to control and/or read data from the other arduino+rf units. But I suppose there could be rare situations where it would make sense to have an autonomous system where arduinos only communicate with eachother. If you have such a use case - yes, it is possible. As for how to use received data in an application - that is really hard to answer. It is up to you. It is just data. Use it like you would any other data.</p>
<p>My one arduino with receiver is going to be attached to PC. </p><p>Thanks a lot!</p>
<p>Another option is to grab an Arduino clone with built-in RF, like this one: <a href="https://talk2.wisen.com.au/product-talk2-whisper-node-avr/" rel="nofollow">https://talk2.wisen.com.au/product-talk2-whisper-n...</a></p><p>No wire connections and you can even run on a single AA batteries.</p>
<p>can it work in multiple transmitter to one receiver friend?</p>
I have not had that use case myself but yes, I can't see why not. It should work.
<p>What wireless module did you use for this? What would you suggest? I would like to be able to turn my Arduino sketch on and off by sending text over serial.</p>
<p>To be honest. Things have happened since I wrote this. I would now recommend a different solution. Currently I use esp8266 wifi modules with mqtt. Sometimes I use the esp as a communication module to Arduino but mostly as a standalone unit.</p>
<p>Nice @ sticking component on lcd @video :P</p>
I'm planning to do this with a nRF24L01+. This might be obvious, but I'm a little new to this. I noticed that there aren't any pins on the nRF24L01+ labeled &quot;TA&quot; or &quot;RB.&quot; There are &quot;VCC&quot; &quot;GND&quot; &quot;CSN&quot; &quot;CC&quot; &quot;MOSI&quot; &quot;SCK&quot; &quot;IRQ&quot; and &quot;MISO.&quot; Which do I use instead of the &quot;TA&quot; and &quot;RB&quot; pins?
Well, I never got round to using the nRF24L01+ (even though I have a bunch). I do know, however that it won't be a pug and play replacement. The module uses Serial Peripheral Interface (SPI) which works differently and is also wired in a different way. A quick search produced this link: http://www.elecfreaks.com/203.html. I will also offer a bit of advise. Since I wrote this tutorial, the world has evolved. IoT is going IP. Personally I have moved most of my own stuff to ESP8266 on WiFi, either in standalone (using IO on the ESP module) or in combination with Arduino. For comms I use MQTT. There are probably good tutorials on that already. If there isn't, maybe I'll get around to writing one. Good luck with your project!
<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 did you do it ?<br>I want to apply for similar application where I can control my home appliances and monitor their state as well.</p>
<p>Bought TWO of these: <a href="http://www.aliexpress.com/item/Lowest-Price-433Mhz-RF-transmitter-and-receiver-kit-for-Arduino-Project-Drop-Shipping-TK0460/1754885635.html" rel="nofollow">http://www.aliexpress.com/item/Lowest-Price-433Mhz...</a></p><p>and one of these: <a href="http://www.aliexpress.com/item/5PCS-Free-Shipping-Serial-Converter-USB-2-0-To-TTL-UART-6PIN-Module-CP2102/1085900882.html" rel="nofollow">http://www.aliexpress.com/item/5PCS-Free-Shipping-..</a></p><p>Hooking one pair:</p><p>USB TTL Tx pin --&gt; 1st transmitter --&gt; ***air*** --&gt; 1st reciever --&gt; arduino reciever pin</p><p>Other pair:</p><p>arduino transmitter pin --&gt;2nd transmitter --&gt; ***air*** --&gt; 2nd reciever --&gt;Rx pin on USB TTL</p><p>Basically in the image, one Rx/Tx pair is replacing the yellow wire, the other is replacing the blue wire. Then each side will need it's own power and gnd.</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>

About This Instructable

126,638views

124favorites

License:

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:Cheap 3D Delta Printer Improvements Motorize IoT with ESP8266 Two way MQTT-SMS Bridge (Linkit One) 
Add instructable to: