Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Ocelot on January 10, 2014, 07:13:48 AM

Title: Single Supply with Non-inverting Amp?
Post by: Ocelot on January 10, 2014, 07:13:48 AM
Hi all,

I've been trying to wrap my brain around this for a couple days now so I thought I'd pose it to more intelligent minds...

What happens when you send an AC signal into a non-inverting amplifier that is powered with a single supply (eg +5V not +/-2.5V)?

Will the negative portion of the waveform simply saturate the lower rail? Essentially working like a active half wave rectifier?

The reason I'm asking is that I'm trying to build a circuit that takes a very small AC signal (+/- 5-10 mV peak voltages) and outputs the positive envelope of the signal that's amplified. I'm using an instrumentation amplifier AD8227 which allows the input voltage to go below ground with a single supply. I've tested this with a +5V supply and it works fine in my application.

My problem now is how to get the envelope of the signal using a single supply. My intent was to rectify the signal using an active full wave rectifier and then smooth the signal using an active low pass filter but I'm not sure how to implement these without a dual supply or using a virtual ground.

I don't want to use a virtual ground because i want the output signal to have the same reference as the power supply's and the input's reference and also have no DC offset in the output signal.

Thanks!
Title: Re: Single Supply with Non-inverting Amp?
Post by: waltr on January 10, 2014, 08:01:07 AM
One method is o apply an Offset to the signal so that it never goes negative.
I suggest downloading LT Spice form Linear Tech to simulate the circuit. This will quickly answer your questions as to what happens.
http://www.linear.com/designtools/software/ (http://www.linear.com/designtools/software/)
Title: Re: Single Supply with Non-inverting Amp?
Post by: Ocelot on January 10, 2014, 08:18:30 AM
One method is o apply an Offset to the signal so that it never goes negative.
I suggest downloading LT Spice form Linear Tech to simulate the circuit. This will quickly answer your questions as to what happens.
http://www.linear.com/designtools/software/ (http://www.linear.com/designtools/software/)

Thanks. Only problem is that I don't want the output signal to be offset. The output signal would have the same offset as the input offset, right?

I guess I could run it through a diode after the initial amplification, then a non-inverting low pass filter, and then amplify it again using a noninverting amplifier to account for the voltage drop through the diode. But this seems like such an inelegant solution and the diode would only act as a half wave rectifier. There must be a better way to do this. I feel like I'm reinventing the wheel here =/

I'll def check out that tool.
Title: Re: Single Supply with Non-inverting Amp?
Post by: jwatte on January 10, 2014, 11:30:48 AM
What is the signal referenced to? If the input AC signal isn't referenced to anything, then can you tie the "low" end of the signal to ground in your system, and thus have the signal be all positive?

If you need isolation, and programmable gain, and offset, the easiest solution is to use a good instrumentation amp, which is like an opamp that's designed for exactly the use case you describe. TI, Analog Devices, Intersil, and others make fine IAs. Try the AD8130 for example. The datasheet shows an output offset/level translator on page 34: http://www.analog.com/static/imported-files/data_sheets/AD8129_8130.pdf (http://www.analog.com/static/imported-files/data_sheets/AD8129_8130.pdf)
Draw-back: Only available in SMD packages, not DIP.
Title: Re: Single Supply with Non-inverting Amp?
Post by: Ocelot on January 10, 2014, 12:52:59 PM
What is the signal referenced to? If the input AC signal isn't referenced to anything, then can you tie the "low" end of the signal to ground in your system, and thus have the signal be all positive?

If you need isolation, and programmable gain, and offset, the easiest solution is to use a good instrumentation amp, which is like an opamp that's designed for exactly the use case you describe. TI, Analog Devices, Intersil, and others make fine IAs. Try the AD8130 for example. The datasheet shows an output offset/level translator on page 34: http://www.analog.com/static/imported-files/data_sheets/AD8129_8130.pdf (http://www.analog.com/static/imported-files/data_sheets/AD8129_8130.pdf)
Draw-back: Only available in SMD packages, not DIP.

If I'm understanding you correctly, then the AC signal would be referenced to ground.

I want to power and measure this sensor with an Arduino. So that would means the power supply reference and the output signal reference are the same. Also, since the input signal needs to be centered on the Arduino ground, then all three need to have the same reference, right? This is why I can't use a virtual ground or offset the input signal.
Title: Re: Single Supply with Non-inverting Amp?
Post by: jwatte on January 10, 2014, 01:20:57 PM
The AD8130 or AD8129 will work great for you, then, as it supports an output voltage offset together with gain. Program it with 100x gain and set the offset to 2.5V and you'll be in business. +15 mV will give you 2.5V + (15 mV * 100) == 4.0V out; -15 mV will give you 2.5V + (-15mV * 100) == 1.0V out. This range should work fine for the ADC input you have.

I think this is illustrated in diagram 140 in the data sheet.

Soldering a SOIC package by hand is doable if you have a fine-pitch tip for your soldering iron.
Title: Re: Single Supply with Non-inverting Amp?
Post by: Ocelot on January 10, 2014, 03:05:12 PM
The AD8130 or AD8129 will work great for you, then, as it supports an output voltage offset together with gain. Program it with 100x gain and set the offset to 2.5V and you'll be in business. +15 mV will give you 2.5V + (15 mV * 100) == 4.0V out; -15 mV will give you 2.5V + (-15mV * 100) == 1.0V out. This range should work fine for the ADC input you have.

I think this is illustrated in diagram 140 in the data sheet.

Soldering a SOIC package by hand is doable if you have a fine-pitch tip for your soldering iron.

 :-\ Wouldn't your example have an DC offset of +2.5V?

The attached picture give you an idea of what I'd like to do.
Title: Re: Single Supply with Non-inverting Amp?
Post by: jwatte on January 10, 2014, 11:48:59 PM
I'm assuming you're sampling this using a microcontroller. If so, you can do the additional signal filtering in software.

The problem with "full-wave rectified" signals is that any diode will have at least a 0.2 V drop (and likely much more.) Thus, you have to boost the signal to the point where such drop won't matter. If 1% loss is OK, then boost it so the p-p is at least 40 V (more like 100V unless you use very specialized low-drop diodes.)

If you need the analog signal out again, then it may still be cheaper to use the AD8130, then an ADC, then digital filtering, then a DAC to generate the signal out.
Title: Re: Single Supply with Non-inverting Amp?
Post by: Ocelot on January 12, 2014, 02:55:26 PM
I'm assuming you're sampling this using a microcontroller. If so, you can do the additional signal filtering in software.

The problem with "full-wave rectified" signals is that any diode will have at least a 0.2 V drop (and likely much more.) Thus, you have to boost the signal to the point where such drop won't matter. If 1% loss is OK, then boost it so the p-p is at least 40 V (more like 100V unless you use very specialized low-drop diodes.)

If you need the analog signal out again, then it may still be cheaper to use the AD8130, then an ADC, then digital filtering, then a DAC to generate the signal out.

Unfortunately, for my application, I want the filtering to be on the hardware side.
Title: Re: Single Supply with Non-inverting Amp?
Post by: jwatte on January 12, 2014, 03:43:21 PM
Then your solution has to be to amplify, rectify, filter, and then attenuate again, because rectification involves voltage drop.

You can build a dual-ended voltage supply using some DC DC voltage converter; there are chips and complete modules depending on how easy you want to make this for yourself.
Build a +/- 15V dual-end power supply, use an opamp with 1000x gain so your 15 mV turns into 15V, rectify and filter the signal, and then use whatever attenuation you need to get to whatever level you need to have in the end. A diode drop of 0.3V out of 15V is about 2% error.

Would probably be cheaper to just add a second CPU that does the ADC, digital filtering, and re-synthesizes the output signal you want, if it has to be analog.