585,727 active members*
4,205 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2006
    Posts
    2420

    Analog +-10v to 0-5v conversion

    Hi, as the title suggests I would like to take a +-10v analog signal and convert it to a 0-5volt output to feed into a micro.

    I would like to have the output linear so that with 0v input gives 2.5v out.

    I imagine an op-amp would be the best option and I have been doing some research but have to admit I know very little about them. If anybody has a schematic to achieve this and is willing to share I would be very grateful.

    Cheers.

    Russell.

  2. #2
    Join Date
    Jan 2006
    Posts
    2985
    Op amps will indeed work.

    You first want an amplifier with a gain of 1/4. The output of that amplifier will be +/- 2.5V. Then you will use and op amp adder to add 2.5V to the signal so you will get 0-5v out. Then you probably want to run that through another op amp as a buffer so you have some meaningful current available.

    Matt

    Edit:

    Non-inverting amplifier: http://www.electronics-tutorials.ws/opamp/opamp_3.html

    Summing amplifier (adder): http://www.electronics-tutorials.ws/opamp/opamp_4.html

    More: http://www.eecs.tufts.edu/~dsculley/...s/opamps5.html

  3. #3
    Join Date
    May 2006
    Posts
    2420
    Hi Matt, thanks for the reply.

    I think I am getting the hang of it...

    So if I were to choose an op amp, would the LM348M - Quad 741 Op-Amp - SMD be suitable ?

    From the datasheet it looks like the voltage range is OK, and I can use three of the op amps in the same package, is there anything I have missed ? The third stage you mention may not be necessary as the micro shouldn't draw a lot of current to do the ADC, but I guess since it is there I may as well use it.

    While I am at it, would it be bad to use the fourth unused op amp in that package for the current sense side of things ? I am thinking this could also be fed into the micro to monitor current.

    This is all for a servo power stage as you probably have guessed already.

    Cheers.

    Russell.

  4. #4
    Join Date
    May 2010
    Posts
    0
    Quote Originally Posted by epineh View Post
    Hi, as the title suggests I would like to take a +-10v analog signal and convert it to a 0-5volt output to feed into a micro.

    I would like to have the output linear so that with 0v input gives 2.5v out.

    I imagine an op-amp would be the best option and I have been doing some research but have to admit I know very little about them. If anybody has a schematic to achieve this and is willing to share I would be very grateful.

    Cheers.

    Russell.
    Hi, Russell,

    as keebler303 described, you will need 2...3 OpAmps.

    You can make it with only one:

    Netlist:
    R1 (50 kOhms) : OpAmpOut --- OpAmp(-)
    R2 (50 kOhms) : OpAmp(+) --- GND
    R3 (100 kOhms) : OpAmp(-) --- GND
    R4 (200 kOhms) : Ref(+10V) --- OpAmp(+)
    R5 (200 kOhms) : Signal(+-10V) --- OpAmp(+)

    Every single OpAmp should do the job.
    Supply Voltage : ( add min. 2V to Output-Range ) e.g. -2V/+7V or better -2V/ +10V so you can take +10V for Ref too.

    Check if your ADC can handle (faulty) negative input voltage.

    Cheers

    Erhard

  5. #5
    Join Date
    Jan 2006
    Posts
    2985
    Russell

    I think most any op amp will work for this circuit. If you are looking for high bandwidth, there may be better options. I think as long as the bandwidth of the op amp is above your A/D rate, you should be fine. You may want to incorporate some trimpots in your design so you can correct for errors caused by resistor tolerances.

    Matt

  6. #6
    Join Date
    May 2006
    Posts
    2420
    Cheers guys, I will take that all that onboard, I do think that a better quality op amp is called for in this application, time for more research.

    Russell.

  7. #7
    Join Date
    May 2006
    Posts
    2420
    Actually I just had a thought, all I am really after is something I can use to drive a H bridge, I could use an analog to PWM conversion and skip the micro altogether, basically what I am after is a class D amplifier, that may be a quicker way to go, I was going to use the deadtime built into the micro I was using but I could just use IR2184 or equivalent with built in deadtime.

    Russell.

  8. #8
    Join Date
    Jan 2006
    Posts
    2985
    Russell

    I'm not sure if chips exist to directly convert +/- 10 to PWM. I would think there would be but not sure. Digikey has over 400 "class d" amplifiers but I'm not sure if a chip for audio applications would be usable for this. It might be worth looking at a couple datasheets. The old school way to convert voltage to duty cycle is to compare the analog signal to a triangle wave.

    The frequency of the triangle wave sets the frequency of the PWM. The higher the analog voltage, the longer the triangle wave voltage is under the analog voltage and the longer the duty cycle of the PWM. You can achieve all of this with a few more op amps.

    http://www.play-hookey.com/analog/tr...generator.html

    Matt

  9. #9
    Join Date
    Jan 2006
    Posts
    2985

  10. #10
    Join Date
    Dec 2008
    Posts
    226
    Just thought I'd mention OP-Amps in general are not "IDEAL" as in they wont go to the rails... If you want the output to go 0V to 5V the -V supply must be less than 0V and the +V supply more than 5V .. by as much as 2 volts for Some OP-AMPs...
    but seeing as you want to convert +/- 10V you will most likely be using a +/- 12V supply for the circuit....

    To convert a Hypertherm plasma torch output from -7 to 0 volts, to a +V up and down signal (Torch height control) I used an old PC power supply as it has a low current -12V and ample +12V for the rest of the circuits and relays in my control box...

Similar Threads

  1. Analog controll options
    By zoeper in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 10-24-2009, 03:36 PM
  2. No Spindle 0-10v analog
    By adam12000 in forum Milltronics
    Replies: 0
    Last Post: 07-12-2008, 10:35 PM
  3. analog +/-10V signal gen
    By visky in forum Want To Buy...Need help!
    Replies: 4
    Last Post: 05-01-2008, 03:40 AM
  4. PWM to analog
    By Drew in forum Machines running Mach Software
    Replies: 7
    Last Post: 10-10-2007, 04:40 AM
  5. Getting analog signal from pc
    By roni21702 in forum Computers / Desktops / Networking
    Replies: 1
    Last Post: 06-15-2006, 07:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •