Data Corruption from Sensors with Long Wires

In summary, data is transmitted via voltage, and the longer the wire we have, the more voltage is dropped due to wire resistance, which is what we call data corruption. Is that correct? Also, be careful with operating temperatures. The sensor itself can go above 100° F, correct? But the wiring can't? Finally, I'm not sure how to use a Cat5e cable in this case. That's an Ethernet cable, right? For my application, I will have an arduino, sensors, a couple of LEDs, and probably an LCD screen. The arduino will trip the red LEDs when temperature exceeds a certain predefined amount and output the temperature to the screen. But perhaps you are talking about transmitting the data
  • #1
EternusVia
93
10
Hi all,

Hopefully this is the right subforum. I have a question related to Arduino sensors.

Q:Generally, when do you need to be worried about losing data from having long wires from your sensor to your Arduino board?

Details:For example, I've been looking at two sensors.

Sensor 1: MLX90614
Sensor 2: SainSmart Max6675

I need to monitor the temperature of 12 objects. It would be nice to have one Arduino board with wires leading to the temperature sensor. But I'm worried that I might have data corruption / decay over the long wires. The length needed will probably be around 5 - 10 feet.
 
Engineering news on Phys.org
  • #2
Well I think you should have no problem with it for various reasons. Assuming you are working with 24 AWG wire, based on your first sensor criteria the MLX90614 that has a load of 3 or 5 V (they have two different versions) @ 50 mA the voltage drop on a wire of 5 feet will be 6.596 mV with an error of 0.13 % that is nearly nothing, data taken here http://www.bulkwire.com/wireresistance.asp. Also the temperature will have an impact on the resistance of the wire so be careful exceeding the temperature over 100° F. Finally I recommend to you using a Cat5e cable so you can have everything organized without any doubt of data corruption and in addition to this LAN connected networks have Cat5e way more long than yours and doesn't have any problem with data corruption or something like that unless your cable exceeds the 300 ft. Hope this helps you.
 
  • #3
Arnaldy Jr. said:
Well I think you should have no problem with it for various reasons. Assuming you are working with 24 AWG wire, based on your first sensor criteria the MLX90614 that has a load of 3 or 5 V (they have two different versions) @ 50 mA the voltage drop on a wire of 5 feet will be 6.596 mV with an error of 0.13 % that is nearly nothing, data taken here http://www.bulkwire.com/wireresistance.asp. Also the temperature will have an impact on the resistance of the wire so be careful exceeding the temperature over 100° F. Finally I recommend to you using a Cat5e cable so you can have everything organized without any doubt of data corruption and in addition to this LAN connected networks have Cat5e way more long than yours and doesn't have any problem with data corruption or something like that unless your cable exceeds the 300 ft. Hope this helps you.

That's very helpful!

So, let me see if I understand. Data is transmitted via... voltage? And the longer the wire we have, the more voltage is dropped due to wire resistance, which is what we call data corruption. Is that correct?

You also say to be careful with operating temperatures. The sensor itself can go above 100° F, correct? But the wiring can't?

Finally, I'm not sure how to use a Cat5e cable in this case. That's an Ethernet cable, right? For my application, I will have an arduino, sensors, a couple of LEDs, and probably an LCD screen. The arduino will trip the red LEDs when temperature exceeds a certain predefined amount and output the temperature to the screen. But perhaps you are talking about transmitting the data from the arduino over a cat5e cable to the computer. Is this possible? I'm still a newbie.

Thanks!
 
  • #4
The MLX90614 communicates with pulse width modulation (PWM) or on a SMBus. Because they are both digital communications, you do not need to worry unless there is so much noise that the 0-1 discretes get confused. That would take a lot of voltage noise on a 5v line. Because of the speed of the bus, time delays are also important and the length of your cables are limited unless you use repeaters. SMBus is limited to under 20 ft.

PS. Arduino has a large user community on the internet. You can Google "SMBus Arduino" and find a lot of advice that is very specific to your problem. In fact, check this out: http://forum.arduino.cc/index.php?topic=21317.0 It is discussing your MLX90614.
 
  • #5
FactChecker said:
The MLX90614 communicates with pulse width modulation (PWM) or on a SMBus. Because they are both digital communications, you do not need to worry unless there is so much noise that the 0-1 discretes get confused. That would take a lot of voltage noise on a 5v line. Because of the speed of the bus, time delays are also important and the length of your cables are limited unless you use repeaters. SMBus is limited to under 20 ft.

PS. Arduino has a large user community on the internet. You can Google "SMBus Arduino" and find a lot of advice that is very specific to your problem. In fact, check this out: http://forum.arduino.cc/index.php?topic=21317.0 It is discussing your MLX90614.

Thanks for the info. And yes, I have an account on Arduino forums too. The people on Physics forums usually respond very quickly, though, so I decided to post here too :)
 
  • Like
Likes dlgoff, Arnaldy Jr. and FactChecker
  • #6
EternusVia said:

The first sensor looks to use I2C and the second one looks to use SPI. How many of each are you planning to use? Are you going to pick one and use 12 of that one?

I2C running at a slow data rate is probably the best way to go for connecting up 12 sensors to your uC. SPI tends to be a faster serial bus (and requires 12 chip selects out of your uC). SPI would generally also require back-termination resistors on the CLK, MOSI and MISO lines. Back-terminating the CSx lines is probably a good idea too. :smile:
 
  • Like
Likes FactChecker
  • #7
berkeman said:
The first sensor looks to use I2C and the second one looks to use SPI. How many of each are you planning to use? Are you going to pick one and use 12 of that one?

I2C running at a slow data rate is probably the best way to go for connecting up 12 sensors to your uC. SPI tends to be a faster serial bus (and requires 12 chip selects out of your uC). SPI would generally also require back-termination resistors on the CLK, MOSI and MISO lines. Back-terminating the CSx lines is probably a good idea too. :smile:

Thanks for your input!

At this point, I plan on using the I2C sensor. My project involves monitoring the temperature of bearings. I plan on boring a hole a few centimeters deep on the bearing into which I'll place the temperature probe of the I2C sensor. Being physically connected to the bearing, I figure it'll get dependable temperature readings.

That being said, if the SPI sensors are considerably better suited for this project (user friendliness, data retention over long wires, etc.), I would definitely consider using them instead. User friendliness is a big plus as I'm still a noobie.
 
  • #8
Be aware that both SPI and I2C are intended for communicating between ICs on a PCB with the benefit of a ground plane, not communication over cables. There are a number of issues you may run into:

-Outputs not able to drive low impedance of cable.
-Reflections of fast edges of the signals, even if they are toggling at low frequency. For example, you may get double clocking.
-Crosstalk on SPI bus due to sharing of long, common, ground connection. For example, you will probably see an artifact of the SPI clock signal riding on the data signal.
-High impedance of I2C is susceptible to all kinds of noise pickup, together with I2Cs will known propensity for locking up when something unexpected happens. For example, you may find your I2C locking up on you when someone gets a static discharge for a nearby doorknob.

On the other hand it may work for you. You can maximize your chances if you do the following:
1 - Use low data rate and put RC low pass filter on all signals to roll of fast CMOS edges before launching then onto cables.
2 - Use as many cable wires as possible for ground.
3 - Use as smallest I2C pullup resistor that you can (1K on 3.3V system).

If this were an actual product development you would want to use something else altogether, like CAN bus.
 
  • Like
Likes Jeff Rosenbury, FactChecker and berkeman
  • #9
the_emi_guy said:
-Reflections of fast edges of the signals, even if they are toggling at low frequency. For example, you may get double clocking.

That's what the back-termination resistors are for with the SPI bus. However, the fan-out to parallel paths would complicate that strategy a bit...
 
  • #10
Not going to lie, a lot of the conversation is above my head at this point. I'm hoping that once I start experimenting, I see the logic of the topics you two are discussing. I'm sure I'll be glad for the details once I need them!
 
  • #11
  • #12
EternusVia said:
Hi all. I'm having some rudimentary problems with the MAX6675 thermocouple that I mentioned. If you're willing, I'd appreciate input. I posted about the problem in detail here: http://forum.arduino.cc/index.php?topic=334241.0

Ah. Well, I bought two of these sensors. After switching the first one out and trying me second sensor, everything seems to be working fine. False alarm... aside from the fact that one of my sensors is broken!
 

1. What is data corruption from sensors with long wires?

Data corruption from sensors with long wires refers to the loss, alteration, or incorrect interpretation of data collected by sensors due to the presence of long wires in the sensor's circuit.

2. What causes data corruption from sensors with long wires?

Data corruption from sensors with long wires can be caused by a variety of factors such as electromagnetic interference, voltage drops, signal attenuation, and noise introduced by the long wires.

3. How does data corruption from sensors with long wires affect scientific research?

Data corruption from sensors with long wires can lead to inaccurate or unreliable data, which can significantly impact the results of scientific research and potentially lead to incorrect conclusions.

4. Can data corruption from sensors with long wires be prevented?

Data corruption from sensors with long wires can be prevented by using proper wiring techniques, shielding the wires from electromagnetic interference, and using signal amplifiers or filters.

5. What can be done if data corruption from sensors with long wires has already occurred?

If data corruption from sensors with long wires has already occurred, the affected data can be discarded and the experiment can be repeated with better wiring methods. In some cases, data correction algorithms can also be applied to salvage the corrupted data.

Similar threads

Replies
4
Views
2K
Replies
16
Views
2K
  • Electrical Engineering
Replies
2
Views
2K
  • Electrical Engineering
Replies
3
Views
8K
  • Mechanical Engineering
Replies
24
Views
2K
Replies
3
Views
2K
  • Electrical Engineering
Replies
22
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
762
Back
Top