Go Down

#### babinda01

##### Oct 17, 2010, 10:26 am
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?

Andrew

#### jackrae

#1
##### Oct 17, 2010, 10:43 am
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

#### babinda01

#2
##### Oct 17, 2010, 10:49 am
Hi
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.

Andrew

#### mowcius

#3
##### Oct 17, 2010, 12:13 pm
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?

Mowcius

#### Leon Heller

#4
##### Oct 17, 2010, 12:29 pmLast Edit: Oct 17, 2010, 12:35 pm by leon_heller Reason: 1
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.
Leon Heller
G1HSM

#### babinda01

#5
##### Oct 17, 2010, 01:09 pm
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.
Regards
Andrew

#### apollo21

#6
##### Oct 17, 2010, 05:45 pm
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.

kyoji

#### apollo21

#7
##### Oct 20, 2010, 07:04 am
Hi
The numerical value proofreading is necessary.
The output protection of the op-amp please relay 510ohm.

#### Grumpy_Mike

#8
##### Oct 20, 2010, 10:48 am
@apollo21
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.

#### apollo21

#9
##### Oct 20, 2010, 12:00 pm
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)

#### Grumpy_Mike

#10
##### Oct 20, 2010, 12:10 pmLast Edit: Oct 20, 2010, 12:12 pm by Grumpy_Mike Reason: 1
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.

#### apollo21

#11
##### Oct 20, 2010, 01:33 pm
>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.

#12

#### apollo21

#13
##### Oct 20, 2010, 03:26 pmLast Edit: Oct 20, 2010, 03:40 pm by apollo21 Reason: 1
There is a page of the rail to rail op-amp.
Is this true?

http://www.swarthmore.edu/NatSci/echeeve1/Ref/SingleSupply/SingleSupply.html

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.

#### jackrae

#14
##### Oct 20, 2010, 11:36 pm
Apollo
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.
jack

Go Up

Please enter a valid email to subscribe