I am currently trying to interface a input voltage with an Arduino that reads between +10v and -10v after it has been brought down to appropriate levels. The original use of this voltage drives a motor forward or backward based on the bias of the voltage.

My current idea to interface with the Arduino is to use a voltage divider to lower the voltage to the 5v range, and then to split the positive and negative voltages to separate analog input pins.

I have successfully pulled down the voltage to +5v to -5v, but I am struggling to convert the -0.01v to -5 to its own 0-5v analog input for the Arduino.

Does anyone have an idea on where to go with this? Or a better idea on where to start?

  • \$\begingroup\$ Using two op-amps, ideal rectifier. \$\endgroup\$ – Marko Buršič Jun 1 '17 at 10:51

You can attenuate the input to +/-2 volts with a resistor voltage divider then add an offset of 2.5 volts (via an op-amp or a more sophisticated voltage divider) to get a range from 0.5 volts to 4.5 volts. Feed this into your analogue input and now you have -10 volts remapped to 0.5 volts and +10 volts remapped to 4.5 volts (leaving a bit of headroom either side).

  • \$\begingroup\$ Why do you mention a op-amp ? All that is needed is three resistors. See the calculation by 'jonk' in his answer here : electronics.stackexchange.com/questions/266786/… In my opinion the dual 0-5V is not needed if it can be done with with a single 0-5V output. \$\endgroup\$ – Jot Jun 1 '17 at 12:08
  • \$\begingroup\$ @Jot Sure, three resistors is optimum/minimum but some folk may include an op-amp as a buffer and sometimes an op-amp is used to provide hard signal limiting to the ADC's supply rails to prevent ADC damage should the input voltage (-10V to +10V) become excessively large. My answer also suggests using a single input and not two inputs. \$\endgroup\$ – Andy aka Jun 1 '17 at 12:10
  • \$\begingroup\$ What I am trying to do is control a arm that drives to the left when the voltage is positive, and right when the voltage is negative. I need it to be able to move smoothly as the voltage increases, or goes negative, which is why I think having a dual input would work best. What I am working on is a slipball assembly for a level c full flight simulator. Right now I have it set up to drive when I set the pin voltage via code, but I am designing a pcb that will connect to the input. Any kind of circuitry that could do what I need can be used, I'm just at a loss on how to split the voltage up. \$\endgroup\$ – Jeff Joyce Jun 2 '17 at 12:28
  • \$\begingroup\$ I don't think having two inputs would work well at all. For instance, if you have slight discrepencies between the two inputs and one is producing a non-zero digital value when it should be zero, how do you deal with that. ADCs are not perfect and just because you feed 0 volts to its input it doesn't mean you get binary zero as the result so, how do you deal with this? \$\endgroup\$ – Andy aka Jun 2 '17 at 12:31
  • 1
    \$\begingroup\$ No, just use a single input as I propose and don't worry about ambiguities. \$\endgroup\$ – Andy aka Jun 2 '17 at 12:44

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.