1
\$\begingroup\$

Usually sensors would be close the a microcontroller so it is possible to use SPI or I2C or someother means to read/write them for communication. This is still true even if they are on another board connected to the backplane.

However, how would one get data from sensors that are more than a meter away. This will require one to use long cables that will have a lot of capacitance that will limit the data rate of transmission and make it more susceptible to corruption via noise.

How is this type of problem usually solved?

\$\endgroup\$
  • 1
    \$\begingroup\$ It is more likely that commercial products control costs by NOT using sensors which have the added cost of a SPI or I2C interface. The solution depends on how many sensors you are going to make and what you are sensing. If I were to make a million thermostats, I would use an inexpensive thermistor, an embedded controller with built in ADC and BACnet protocol over an Ethernet network. If I were going to make one I would throw caution to the wind and try to clock in a SPI signal as slow as the master and slave would permit (w/in reason). \$\endgroup\$ – st2000 Jan 28 '17 at 21:28
  • 2
    \$\begingroup\$ You can use a 4-20mA sensor. Or you can use I2C and SPI at 2m. Run a dedicated GND for each signal, and twist GND and signal wires together as a pair. You can also use SPI with LVDS signalling (convert the SPI signals to LVDS before going out over cable). \$\endgroup\$ – mkeith Jan 28 '17 at 23:06
  • 1
    \$\begingroup\$ The answer to this question is application-dependent. It depends on the nature of the sensors and the amount of data coming from them. It also depends on the amount of EMI in the environment. A bottom of the ocean is going to have much less EMI than an arc erlsding shop. (Somewhat related: Memoirs of an overgrown I2C bus.) \$\endgroup\$ – Nick Alexeev Feb 19 '17 at 20:51
5
\$\begingroup\$

One approach is to take a bus such as SPI or UART and use LVDS/RS-485/RS-422 transcievers with properly terminated twisted pairs.

Or you can use a more standard bus such as CAN or Ethernet.

Data rate, synchronization requirements, necessity for noise immunity and error correction, galvanic isolation (or not) and so on will tend to push towards one solution or another. It's usually not worth it to invent a new protocol if you can use or adapt an existing protocol.

\$\endgroup\$
1
\$\begingroup\$

There are too many solutions to mention them all.

A 1-Wire bus (for example for the DS18B20 temperature sensor) can be a many meters long, the maximum length depends on the used cable.

Do you know the twisted pairs inside an ethernet cable ? A twisted pair does weaken the signal but the signal does not get distorted. The RS-485 is a signal for twisted pair and is often used in a industrial environment.

For slow analog signals, a 4-20mA signal can be used.

To (finally) answer your question: the problem is usually solved with a wireless communication. For example RF modules at 433MHz (EU), 868MHz (EU), 915MHz (US) or 2.4GHz. Another good option is two Bluetooth modules when two microcontrollers need to talk to each other.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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