Setting zero volts

Discussion in 'General Electronics Chat' started by paulepc, Apr 12, 2014.

  1. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    I have an output from an lm324 op amp and the voltage swings from +8 to + 1 volt. How do I centre the voltage so I have an even +/- voltage, +/- 3.5 volts?

    The amp is a LM324N + 9 volts rail and ground
    Thanks.
     
    Last edited: Apr 12, 2014
  2. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,503
    380
    You need a +/-5V supply for the LM324.
     
  3. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    Post ur circuit
     
    ErnieM likes this.
  4. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Here is where I am now and getting 2 to 10 volt swing by varying the PWM pulse width. I just need to centre the voltage to get an even +/-

    Thanks Paul
     
  5. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    The LM324 was designed to run well on a single supply such a s 9V, and your output voltages look ok. Questions about your schematic:

    The first stage has a gain of 9.3. With a 4V input and a 9V supply, it is acting more as a comparator than an amplifier. Are you getting a square wave at its output?

    The first stage can drive the last stage directly, without the 2nd stage voltage follower.

    What is the intent of the 350 Hz lowpass filter with an 80 Hz signal?

    To get the output of the last stage to be centered about 3.5V, you need to change the reference for the amplifier. You show the wiper of the pot connected go gnd. Instead, this should go to a voltage divider with an output of 3.5V and an impedance of much less than the minimum value of the pot. As your circuit is shown, the pot can be adjusted down to zero ohms, raising the gain to infinity, or at least very high. Is this important? What is the gain range you need for this stage?

    ak
     
  6. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,754
    760
    You would need a ±V supply to bring the output to negative volts as said earlier
     
  7. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    for opamp signals (low current) you don't need split power supply, you can make a virtual ground using voltage divider and capacitor.
     
  8. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Thank you. first stage outputs the PMW amplified although the PWM outputs 4 volts this drops to .4 volts when connected to the amp.
    I had to use what I have on the RC circuit thats how I ended up with those values I tried various values while looking at the scope for a smooth signal.
    I am really looking for +/- 10 volts. I am using a Radio Control TX and RX and I need the dc voltage to be as smooth as possible and the +/- 10 volt to drive a motion controller.
    Paul
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    Looks like I misinterpreted your original question. You will need + and - power for the circuit, 12 to 15 volts each.

    Capacitor couple the input signal into the first stage with a terminating resistor from the amp + input to GND, 100K or more. This resistor will be a load on the input, and there already is a mystery about why the input drops by 90% when connected.

    Add a capacitor across the 100K feedback resistor in the first stage. The 0.45 uF cap will give a corner freq of 3.5 Hz. This will help smooth your output.

    Increase the 1K filter resistor to 10K and see how you like the output. It will not be very smooth, but you can start to get a feel for how to adjust the components. With larger Rs and Cs the signal will get more smooth, but there also will be more and more of a delay between pulse width changes at the input and the smoothed DC at the output.

    ak
     
  10. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Thanks ak. I have tried several times to use +/- supply, but I can never get it to work. So the positive pin is +12 and the negative pin is -12 volts, does the common (0 volts) now become the ground?
    Paul
     
  11. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Do I understand correctly circuit attached
    Paul
     
  12. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    not sure about your software, but....

    just keep both voltages positive and turn second battery around
     
  13. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Can you explain. What I have is 2batteries in series the positive goes to the + volts the other end which is - goes to minus and the tap in the centre I use as common/ zero volts
    Is this correct?
    Thanks
     
  14. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    In the schematic symbol for a battery, the wide part is the + terminal and the narros part is the - terminal. You want the two batteries in series so they add to 24V, and the center point (upper battery - connected to lower batterry +) is your circuit ground (GND). So in your schematic the lower battey is connected backwards.

    ak
     
  15. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    I have the batteries wired correct it's a mistake on the schematic, does the rest of the schematic look right?
    Paul
     
  16. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    the power should look like this:
     
  17. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,538
    1,251
    So far, ok. Now that the power and the first bit of filtering are in place, lets get back to the original question about offset. Level-shifting a PWM signal is tricky, because you can't just AC couple it unless you are sure that it will spend no more than so many milliseconds at 1% or 99% pulse width. And while you can inject a DC offset into any of your opamp stages, how sure are you that the amplitude of the PWM signal is stable. If it usually is 4V p-p, you inject -2V to center it about GND, and its amplitude drops to 3.5V for some unknown reason, then your output signal is off by 0.25V.

    There are ways to keep it centered automatically, but the circuits are a bit more complex than what we've discussed so far. Do any other members have a trick or two to share?

    ak
     
  18. paulepc

    Thread Starter Member

    Apr 2, 2014
    55
    0
    Well I have made progress, I pushed the PWM into the first op amp then an RC filter, and into the second op amp then into the third. then wire a pot to -12 to ground and out on the wiper. this gives me my +/ 10 volt. One problem left is the RC filter is slow to respond its a fine balance.
    With a frequency of I think is 101.32 Hz any idea's what the ideal values for the R & C. ?

    I think if the PWM is a higher frequency it's easier to filter, is this true can we double the PWM signal?
    Thanks for all the advice
    Paul
     
    Last edited: Apr 13, 2014
Loading...