4
\$\begingroup\$

I am using an ultrasonic sensor with Arduino. I also want the Arduino to turn on an LED bar graph strip to show a level.

But the issue is sensor needs to be placed very far (Around 100m) from the arduino, and also the bar graph led is also around 70-100m away from the Arduino. Arduino is placed in a control room with some other equipments. Will this distance have any impact on the operation or the performance of the siganl? if so how can I override it without moving the position of any of the items (Arduino, Sensor, LED graph). There is another output which is actually a 25A relay with coil voltage of around 24V which is also far from Arduino.

\$\endgroup\$

2 Answers 2

9
\$\begingroup\$

Actually, you should use multiple Arduinos (or microprocessors). One for the sensor, one for the bar led. And if the Arduino controlling the coil is at a different position use an Arduino for that one too.

All these Arduinos need to talk to each other. I assume you don't need much data to transport (or maybe you do, this depends on the frequency the sensor need to be read out).

If you are new to Arduino, split your project in parts:

  • Control with an Arduino the led graph
  • Control with an Arduino the sensor
  • Control with an Arduino the coil
  • Establish a (wireless) connection between two Arduinos
  • Implement the connection to all of them.

Anyway, you should find a way to let these Arduinos communicate. Since the distances are far, if you don't like wires, find an RF that might work. There are several frequency bands and transceivers (like nRF24L01 for 2.4 GHz, and others for sub 1 GHz bands). Each have their cons and pros. Note that 100 m is quite a distance, so using only an nRF24L01 without decent antenna might not work.

As seen in the comments (and above), you have to make a decision to use wired or wireless communication.

Pros for wired

  • More reliable (less interference)
  • Easier to implement (e.g. CAN, RS485)
  • You might have to spend tests what RF will work (best)

Pros for wireless:

  • No need to lay wires
  • Easier to change positions (in case cables need to be attached)
  • Less costly (no cabling)
\$\endgroup\$
9
  • 5
    \$\begingroup\$ +1. But I wouldn't rule out a wired connection using RS485 which will cover 100m easily. \$\endgroup\$
    – Steve G
    Aug 18, 2017 at 9:27
  • 5
    \$\begingroup\$ The wired connections listed (at least RS485) are designed to deal with such situations. So if they are used properly, there will be no troubles. \$\endgroup\$
    – Edesign
    Aug 18, 2017 at 10:15
  • 2
    \$\begingroup\$ @sforsandeep -- both RS-485-based stuff and CAN are used as fieldbuses in industrial environments -- running 100m in a house is a cakewalk for 'em \$\endgroup\$ Aug 18, 2017 at 11:38
  • 1
    \$\begingroup\$ @sforsandeep for CAN you can either use a shield, or get the components needed yourself (this might involve some, like a CAN transceiver, but I think more is needed since the Arduino does not com with a CAN builtin). For RS485 you need a MAX RS485 IC. Probably there are also RS485 shields. \$\endgroup\$ Aug 18, 2017 at 12:11
  • 1
    \$\begingroup\$ @sforsandeep All CAN transceivers (as the name implies) include both RX and TX. Search for MCP2515 (CAN controller) with TJA1050 (transceiver); cheap boards are available (shields probably not so cheap) which are easy to handle. The MCP2515 is controlled via SPI and takes much of the CAN related processing off of your µC. \$\endgroup\$
    – JimmyB
    Aug 18, 2017 at 13:10
2
\$\begingroup\$

The length in itself will have little effect on your circuit, since the associated propagation delay will still be in microseconds. Other things however will have an effect:

  • the resistance of the wires and the associated voltage drop
  • the electromagnetic interference such long wires will pick up
  • the transmission line effects

Resistance is the easy part: you can calculate it based on your wires AWG rating and length, and you can easily test if such a resistance is a problem by adding actual resistors on a breadboard.

EMI are harder to estimate or measure. If your environment doesn't include powerful wireless communication devices, microwave or induction equipment, you're typically safe. Twisting pairs of long wires also helps to reduce such kind of interference by quite a lot.

Transmission line effects appear when the length of the wires exceed 1/10 of the wavelength of your fastest signals. For a 16 MHz controller the wavelength is about 20 meters, so wires exceeding 2m can be affected. Long line effects are typically dealt with using termination, but that only works if the properties of your transmission line are known and stable. Practically, this means you'll have to use industrially made twisted pairs or coaxial cables with known impedance.

\$\endgroup\$

Your Answer

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

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