I have a specific problem :

  1. I'm working on a testing platform. It has to be absolutely isolated, so I cannot wire it back to my PC. I again reiterate it. There is no way to wire it to my PC. IT HAS TO BE ABSOLUTELY ISOLATED

  2. It has about 10 different sensors on it and I need to read sensor's data simultaneously at 100Hz. It is currently working fine with 16Hz, but I need to improve it further, so I think maybe in future sampling rates higher than 100 is beneficial. 7 Hz is the lowest possible value that doesn't botch the whole things up.

  3. I have a laptop on the platform which reads the sensor data via RS232, then it processes them in a fraction of a second and produce a control signal and send it to the actuators. It has to happen at real-time. Control algorithm is not heavy, it is several PIDs.

  4. It has 6 actuators with the fastest possible reaction time of 0.005 second.

  5. The main sensor currently is Microstrain 3DM-GX1. It is a very good sensors.

  6. I want to add a GY-80 sensor in parallel to 3DM-GX1. I want to test various filtering algorithms on the GY-80's output and compare them to 3DM-GX1.

  7. Platform has 6 degrees of freedom so I think laser transmission is not practical.

  8. Distance between the computer and the platform is at most 3 meters.

For some reasons I am not able to use the laptop anymore. I want to read the sensor's data with an Arduino, preferably Arduino Mega 2560. My problem is that I don't want to load the control algorithm to the Arduino.

IMHO the perfect solution is going to be a Wireless link between the Sensors via Arduino to my PC. This way my PC logs data and also the Control Algorithm can promptly calculate the feedback signal and send it to Arduino which will send them to the actuators. This immensely makes things easier for me.

I think I need a RS232 shield for the 3DM-GX1 & Arduino, + some wireless solution for sending data from both sensors to my computer. Then I need to send back the control signal back to the actuators wirelessly.

Now what is the fast and easy way to transmit the data between PC and Arduino in real-time?

Thank you in advance !

  • \$\begingroup\$ Having a wireless radio link link in a relatively high-frequency control loop is not a good basis for a solid design. That said, you could look at typical RF transceivers like NRF24 and ESP8266 (WiFi). \$\endgroup\$ Apr 18, 2015 at 10:38
  • \$\begingroup\$ nRF24L01 \$\endgroup\$
    – Jon
    Apr 18, 2015 at 10:38
  • \$\begingroup\$ but why not an optocoupler? \$\endgroup\$ Apr 18, 2015 at 10:59
  • \$\begingroup\$ Which one do you suggest with latency and speed in mind? ESP8266? or NRF24? and which one is easier to use? Do I need two Arduinos? to use ESP8266 and NRF24? \$\endgroup\$ Apr 18, 2015 at 11:42
  • \$\begingroup\$ A friend of mine suggested: R-R012SA link. He said that it doesn't need a library and it works very easily with single line serialread and write. Does anybody have any experience with this?! \$\endgroup\$ Apr 18, 2015 at 13:02

3 Answers 3


Easiest and fastest to laptop? I use RN42 or HC05 serial of arduino to bluetooth. then nearly any pc, laptop, phone or tablet can get the data.

You could also use HC05 and custom api to directly sample the data without an arduino.

You could use xbee, but then you need another xbee at pc. With bt that is likely already there.

  • \$\begingroup\$ What is the typical latency of RN42 or HC05? And do you I need a specific bluetooth compatibility on my laptop?! like Bluetooth 2.0? 3.0? \$\endgroup\$ Apr 21, 2015 at 7:16
  • \$\begingroup\$ @RN42 per the data sheet "Bluetooth v2.0+EDR support" and "Baud rate speeds: 1200bps up to 921Kbps". I normally run it at 56K, I have ran it at 115K. Don't recall off top of my head what UNO's max serial speed is. \$\endgroup\$
    – mpflaga
    Apr 21, 2015 at 14:10
  • \$\begingroup\$ I have easy access to HC 05 06 08 & 09. Which one do you recommend? in order: 7.45$, 7.78$, 6.36$, 4.39$ . Money is not important at all. Which one is the best? Also could you please provide a link to a website that teaches how to easily start things with this bluetooth modules? I am also concerned about their TTL voltage, 3.3 and 5 v? I want to be able to use it on UNO and MEGA. Thank you very much in advance \$\endgroup\$ Apr 22, 2015 at 13:35
  • \$\begingroup\$ HC06 can only run as Slave mode. Here is a nice write up mcuoneclipse.com/2013/06/19/using-the-hc-06-bluetooth-module \$\endgroup\$
    – mpflaga
    Apr 22, 2015 at 15:03
  • \$\begingroup\$ Do I have to be concerned about the TTL voltage?! Some of them list 3.3V TTL only. Which one do you suggest among these? I want to be sure that is works on MEGA and UNO. Thank you. \$\endgroup\$ Apr 22, 2015 at 15:33

Have one arduino connected with the sensors and a nRF24L01 wireless transmitter, and another with a nRF24L01 receiver connected to a PC.

  • \$\begingroup\$ Is two nRF24L01, one on Arduino and one on my PC enough for sending and receiving? Because I need to calculate the feedback and send it back to Arduino. I ask because you mentioned the one on Arduino as Transmitter and the other as receiver. Or do I need 4 of them? Also another question. Do I need two Arduino?! What you said is a little vague. \$\endgroup\$ Apr 18, 2015 at 11:34
  • \$\begingroup\$ Oh, and to see sensor data on my pc (for visualization and further processing), I don't want to use serial monitor in Arduino IDE. I have to make a separate program. Is it going to be a problem!? I have to write the control software in C# that is able to read the wireless data and send back the signal. I ask this in case you are suggesting me to connect the second Arduino to my PC. Because I know that USB connection latency is very high!! Were unable to get the required results with USB to Serial ports. \$\endgroup\$ Apr 18, 2015 at 11:46
  • \$\begingroup\$ Haven't used those modules in a while. I know they are TRANSCEIVERS but you have to set them up as either Tx or Rx. I think you can switch between those but not sure how fast. There's also a trick for the receiver to send back data in an ACK packet. Look for more stuff on this guy's channel youtu.be/wlhuO82IZjQ About the speed. The nRF module goes up to 2MHz so it's not a problem, but you can't escape the serial limitation (115200 baudrate) with Arduino. You can write C# code for serial communication. I also suggest you make the bulk of your calculations on your PC, not arduino. \$\endgroup\$ Apr 18, 2015 at 11:57
  • \$\begingroup\$ So as you suggest, it is still possible to use four Arduino. A pair for receiving sensor data from sensors, and a pair for sending back the signal to actuator. Am I right? There won't be any additional processing on Arduinos. Only the computer does the main processing. It only reads and send and on a pair, and read send and read on the other. \$\endgroup\$ Apr 18, 2015 at 12:53
  • \$\begingroup\$ Honestly, I don't know. You'll have to read about the SPI protocol the nRF uses to talk to the Arduino. You'll have to modify some libraries, it's gonna be a lot of work. It might not be possible to use 2 modules on the same microcontroller. But, as I said, you should be able to switch between transmitter and receiver on the same nRF module. In case that isn't fast enough, you can have the receiver transmit info in an ACK (acknowledgement) packet back to the transmitter. I think that's your best bet. You should give this a read arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo \$\endgroup\$ Apr 18, 2015 at 13:38

I run into this problem on a regular basis. My technique is to use plastic 1mm optical fibre.

These are available from a variety of sources. The Industrial units that I use are marked HP (although these are old - now probably Avago) and the consumer-level stuff that I do uses products from a company called Industrial Fibre Optics.

You would need two fibres for a bi-directional data path but most of the stuff I've done is uni-directional - the data travels from one box to another.

This gives a voltage isolation that is many thousands of volts. Short runs of the fibre and the appropriate drivers and receivers will also give a fast data rate - one particular pair of devices is good for 155 Mbps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.