+-10V Analog input

Hi guys
I have just received my Arduino Mega board, and am starting on my first project. My first question (many more will follow I am sure) is the best way to interface to a +-10V analog signal (from a CNC controller) I was thinking of using opamps to send a 0-5V signal to one analog input for the "Positive" side and then another 0-5V input for the "Negative" side of the analog signal, but I am not convinced that this is the best option. Any thoughts????


A simple voltage divider using a pair of resistors, say 2 resistors in series each of 3k3ohms (that's 3300). One end of the chain to your 10 volt output, the other end to the arduino 0volts and the centre to the arduino analogue input. You also need to connect your cnc 0volts to the arduino 0volts

Thanks for the quick reply. My problem is that the analog signal can swing either positive or negative. if my signal was only 0-10V that would work but my voltage will go either polarity.


You could use a full wave rectifier (square diode configuration - after the voltage divider would be best) and then account for the voltage drop across the diodes in your calculations. Or do you need to read the voltage accurately in the positive and the negative and be able to distinguish between them?

What exactly do you need to measure from this 10V voltage.

Also in a voltage divider you want to use a few hundred k-ohms as the larger you have it, the smaller the current and therefore power lost as heat.

Is there a possibility this voltage could go above 10V?


This is the standard circuit for that problem:

It converts +-5V to 0 to +5V.

Use larger resistors, that SPICE simulation was to prove to someone that it worked.

Hi Guys

Thanks heaps for your suggestions. This is actually going to be part of a servo motor controller for a cnc machine. I have a CNC controller that outputs +-10V to the motor drive (which I am attempting to build) So what I am wanting to read is the analog command from the CNC control, and I will also be reading in the motors current, and basically have a current control loop for controlling the motors. ie 10V will give full current in one direction and -10V gives full current in the opposite direction. I recently made such a drive using a UC3638 chip by TI, this worked very well, but I would love to get it working just as well with the Arduino insted of the UC3638 so that I can have motor monitoring going back to my CNC controller via ethernet.

Hi babinda01

You please use grand sense op-amp.

  • In the range of 10~-10v,
    I can get a signal of 0~5v if I devise it so that input of the op-amp does not become the negative voltage without using a negative power supply and a different power supply.

AVR cannot treat a signal of 0~5v.

I make it the voltage ratios less than it, e.g., 0.5~4.5v, the 1/5 ratio, and a level of & 2v should shift.


How about the next circuit?
The numerical value proofreading is necessary.
The output protection of the op-amp please relay 510ohm.

Yet another circuit that totally misses the point. If you actually try some of these circuits instead of just simulating them you will see where the assumptions of you simulator break down.

Hi Grumpy_Mike

I am not proficient in English.
Because there is it through an interpreter, expression may be wrong.
The implication of the sentence,
Is it a meaning to tell not to work by the real circuit?

I may not work by the real circuit even if I work in the simulator.

I cannot simulate it even if I work by the real circuit.

I try a simulator for an index by all means before making a real circuit.

Delicate control is done by the real circuit, or the measurement and a thing confirming are difficult.

At first I confirm it in a simulator and make a circuit to be next and confirm movement.

I intend to grasp the property of the degree that the 555th prize considerably uses it for a long time, and there is.

It is possible for the cut and try of the simulator to be early than I calculate when I become the real movement point.
(I confirm the calculating formula afterwards)

What you are forgetting is that the simulators assume things like correctly supplied operational amplifiers. That is amplifiers supplied with the correct split power supply. It also assumes voltage generators that are totally isolated from the rest of the circuit.
This is not the case in real life and by neglecting to take this into account you are generating circuits that will not work in real life.

The problem here is that you are giving advice to beginners, people who know very little about electronics. If they then try your circuits and find they don't work you have not only done them a great disservice but also cost them time, money and maybe there enthusiasm. When you give advice you have the responsibility of giving the best advice you can and not to mislead.

Due to your poor English the explanations of what the circuits are trying to do are incomprehensible. Coupled to the fact that you don't appear to know about real circuits makes the usefulness of your contributions doubtful.

Most of that last post can not be understood in English. :frowning:

That is amplifiers supplied with the correct split power supply.

Please overlook what English cannot express definitely.

The op-amp evolves.
Curtain rod and the to curtain rod type amplifier can use most of the power supply voltage in input and the output.
The op-amp of an old type cannot do it.

I set input in the movement range of the power supply voltage by the circuit, and the output is confined to the range that should be effective between the power supply voltage from GND.

This is a curtain rod!! :-

Here are some more pictures of curtain rods:-

This is getting silly

There is a page of the rail to rail op-amp.
Is this true?


I want to try what I thought of before I am over because it is an old man.
Because there is time still more, as for the young person, it is good to try the method that it is easy from handed-down convention.

Please tell us what language you are using and what software translator you are using to create the english translation. If you send your last message, about curtain rods, in your original language we may be able to try a different translator.

Hi Guys
Thanks heaps for your input on this problem I have. I thought I had the idea clear in my head, but after rereading these posts this morning I am a little confused (again).
I am trying to achieve two separate analog inputs into my Arduino, so as to keep as high a resolution as possible as opposed to having 0 to 2.5V represent - and 2.5 to 5v reprent +.
The first analog input to the Arduino represents the + (forward) side of my Analog signal from my motion controller(+-10V) the second analog input into the Arduino represents the - (reverse) side of my analog siganl from my motion controller.
I had originally thought that if I had two opamp circuits, one inverting the other not inverting, powered by +12V and Gnd. The input to the opamps are fed from my motion controller +-10V. That should give me two ouputs to feed into the Arduino through a voltage divider and a zener to cap it at 5V.
Is this not the case????


Following, infoseek translation
Do you want to say that the thing which cannot speak English definitely must not talk?
I read an English technical book, and there is a lot of it; may not understand it.
However, to see a connection diagram, I know the contents to see a calculating formula and let I quote it and revise a circuit, and the purpose work. This is the truth beyond words.
Is the content wrong?

Below, google translation
You shall not speak English properly, you would like to say do not talk?
I know sometimes I read a lot of technical books in English.
But looking at the schematic, look at the formula, knowing what causes the behavior you want to quote to fix the circuit. This is the truth beyond words.
Do what is wrong.


I do not understand you well the entire circuit.
Suppose your motion controller "and + and the" two powers had.
The signal "+ and and" polarity occurs.
Signal "Common = GND" signal an Arduino "Common = GND" connected to,
Arduino's "power and common" use of power between
"Rail to rail op-amp" by using, Arduino's "power and the common" You can get a little smaller than the signal range.
The schematic circuit "inversion" and "not reverse the circuit" includes.

Furthermore you, "rail to rail op-amp" using
, Few, you can also finish.

Arduino's "a / d conversion voltage range" has been as follows.
Schottky clamped for a series resistor after the input signal
"Power and GND" Please do not be so far beyond the range.
Forward the "2.56v internal reference voltage" and "-10v" GND dividing the divider, please be provided below.
It is simple math and "100kohm" "25.6kohm> 24kohm" is.
0.129v-10v signal consists of the time.
4.0v 10v signal consists of the time.
The combination of the reference voltage range with input voltage, the combination of magnification, dividing by the resistance of the other combinations, such as bias resistors, the proper a / d conversion range of the signal we use your brain, we can get the best combination it.
To get an accurate result, if it is relative to the reference voltage, there is no change, the resistance error is the error at the time.
You can use the stable resistance will be stable, with correction in the calculation.

? Differential mode with selectable gain at 1x, 10x or 200x (1)
? Optional Left adjustment for ADC Result Readout
0 ? - VCC ADC Input Voltage Range
? 2.7 - VCC Differential ADC Voltage Range
? Selectable 2.56V or 1.1V ADC Reference Voltage

if I had two opamp circuits, one inverting the other not inverting, powered by +12V and Gnd.

The point here is that as you only have these voltages across your op-amp then trying to feed it with a -10V will be a problem.
I know you can use a potential divider to +5V and when the input is at -10V the resistors are arranged in such a way that the centre tap voltage is at 0V but it is a fairly ropey arrangement, as when that signal went up to +10V you would have more than 5V on the input. You would then have to use diodes to clamp the voltage.
The way to go is for an op-amp using +/- 12V supply.

And a simple strategy followed by the basic circuit and figures
Write a variety of compensation measures.
Inverting amplifier
Non-inverting amplifier
Reference point

Even if the op amp rail to rail
Works more stable than the inner rail.
Does not exceed the input voltage range operation points,
It is recommended in the Schottky clamp.

Rate and offset correction is not practical notation.