1
\$\begingroup\$

I'm using an Arduino to read analog values from my sensor running at 5V using a voltage divider. The sensor contains a force resistive sheet where the resistance of the sheet decreases as force is applied on it, and the sensor is used to determine whether someone has stepped onto it (it doesn't need to measure the amount of force applied). I'm using a voltage divider to read the voltage change and at the Arduino side I will determine that the sensor is being stepped on when the value exceeds a certain threshold value.

Apart from the sensor, 2 additional parallel wires will be running along the same path as the sensor, and the two wires (12V and GND) are connected to a 12V led strip at 100mA.

The length of the 4 parallel running wires are 10m each, and I've received 2 different sets of advice -

(1)The wires are long so they are acting like antennas and will be affected by EMI, so I should use ADC/comparator placed as close as possible to the sensor to transmit the data digitally.

(2)The wires are running at relatively low voltage and low current, and the application is running at low speed (my Arduino is reading the analog values at 10 times/sec) so it will not be affected by EMI. Hence, reading analog value using the voltage divider will not be a problem.

Can someone advice?

\$\endgroup\$
  • \$\begingroup\$ Include a diagram of the set-up is my advice. \$\endgroup\$ – Andy aka Feb 3 '16 at 9:13
  • \$\begingroup\$ Is there constant voltage potential to your sensor, or is it only energized in "pulses" 10x/sec when the arduino tests it? \$\endgroup\$ – Robherc KV5ROB Feb 3 '16 at 9:18
  • \$\begingroup\$ @RobhercKV5ROB yes it's a constant voltage of 5V supplied to the sensor. \$\endgroup\$ – fred7891 Feb 3 '16 at 9:20
  • \$\begingroup\$ So, have you seen any corruption or bad readings that makes you think there is a problem? A link to the sensor will also be useful. \$\endgroup\$ – Andy aka Feb 3 '16 at 9:40
  • \$\begingroup\$ @Andyaka No I haven't seen any bad readings thus far using the voltage divider method. I did a prototype to test the circuit and I turned on and off the tv and fan nearby, and I've also used my mobile phones near the circuit and they didn't seem to affect my readings. However, given the advice from an electronics engineer that EMI will affect my circuit, I just like to be sure whether I should change my circuit to transmit data digitally or my current method is fine. Btw I'm using Velostat as the force resistive sheet in my sensor. \$\endgroup\$ – fred7891 Feb 4 '16 at 3:18
0
\$\begingroup\$

In the setup you've described, since the only change you're interested in is a "nearly dc" change as the sensor's resistance decreases under pressure, you could simply connect a capacitor across your 2 wires as close as possible to the arduino leads/other voltage divider resistor.

This capacitor will serve to "short out" the (50Hz+) AC EMI/RFI on your wire runs, while having a minimal impact on the far lower frequency (~1-4Hz) signal of interest.

To start, I'd select maybe a 5uf capacitor, then size the capacitor based on observed performance. I.E. if you're still getting "false positives" use more capacitance, and if "stepping fast" doesn't get detected, use less.

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

What, two conflicting pieces of advice are not enough? Let me see if I can contradict both of them at the same time. Well, not really. Neither one is exactly wrong.

In principle, I'd say that converting to digital close to the sensor is the cleanest solution, but it requires that you have a place to put some circuitry there. If that is feasible, then for this application you shouldn't need an ADC at all, just a comparator. (This assumes that the characteristics of the sensor won't change appreciably over time, so that a fixed threshold is adequate.)

You would need to power the comparator. If I understand correctly, you have four wires: LED_12V, LED_Ground, Sensor_5V, and Sensor_signal. If the LEDs are switched on and off while you are reading the sensor, then using the LED_ground for your comparator circuit ground would be a bad idea, because there will be a varying voltage drop on the ground wire that will affect your signal. Even if the LEDs are not switched, any noise on the 12V supply will show up on this ground, which could be a problem. If the 12V is always on, I would use this to power the comparator circuit through a small linear voltage regulator, and convert your Sensor_5V line to be a Sensor_Ground line, making sure to keep the LED return current off of this ground.

The output of the comparator would then just be fed back to a GPIO pin on the Arduino. I say "just", but in reality you would want to have some filtering and ESD protection on this line.

The other approach, just bringing the analog voltage back to the Arduino, could also work, but to say there will be no problem because things are running at a low speed is an oversimplification. You would most definitely want to put some fairly heavy filtering and ESD protection on the line. Even with a hardware low-pass filter, I would plan on doing some filtering in software just in case. This approach does have the advantage that if the sensor characteristics change over time, your software could adaptively adjust the threshold. Remember that any noise on your 5V power supply will directly appear on your sensor signal, so make sure that is as clean as possible at the source.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the advice on powering the comparator. I will keep that in mind. I'm not sure what you mean by filtering. Can you explain or point me in the direction where I can read more about it and how it will help? \$\endgroup\$ – fred7891 Feb 4 '16 at 3:24
  • \$\begingroup\$ @Robherc already talked about adding a capacitor to form a hardware low-pass filter. That's a good place to start experimenting. I still recommend some ESD protection as well. Just putting a diode to ground and a diode to your supply rail is a big improvement over having nothing at all. The diodes need to be oriented so they are normally reverse biased or they will eat your signal. As far as filtering in software, the easiest thing is a simple average of multiple readings, and you can experiment with how many readings to average and over what period of time. \$\endgroup\$ – Entropivore Feb 4 '16 at 8:05
  • \$\begingroup\$ Thank you very much for your advice and explanation. I will try use the capacitor and the diodes in my circuit. @Robherc Thanks once again. \$\endgroup\$ – fred7891 Feb 4 '16 at 8:49

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.