Add DC bias to sinusoidal signal

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Add DC bias to sinusoidal signal

Post by redrocker »

What is the proper way to add a DC bias to a sinusoidal signal? I ask this question because I am trying to condition a complementary signal pair for input into an ADC. The goal is to perform the conditioning with a single +5V supply. My plan is to boost the small signals to ride on a 2.5 V DC bias, put them through a differential amplifier (instrumentation amp), and then amplify the result to produce a 0 to 5 V sinusoidal signal. <p>I have tried mightily to get this to work, but have failed. In full disclosure, I was able to get it to work by going to a dual-polarity power supply. However, I am still curious as to whether my first approach was a sound idea and if I just failed to execute properly. I am still in the design stage, and if I can avoid a -5V inverter on my eventual circuit board, I am still open to ideas.<p>Signal description:
V1 = 0.3V + 0.1 sin (12878 t + 0)
V2 = 0.4V + 0.1 sin (12878 t + 180)
i.e, Vamplitude = 100 mV peak, freq = 2048 Hz, V2 is the complement of V1, and they each ride on 0.3 V and 0.4 V DC bias, respectively.<p>Image<p>Here is a DC simulation of the circuit where V8 is a proxy for the DC component of one of the two signals. It appears to work.<p>Image<p>In the real world, however, the sinusoidal signal never appeared on the output. What seems strange to me is that the feedback current sourced by the opamp goes through R4 toward V8, yet V8 is supposed to source current, not sink it. I think this is what dooomed my real circuit. Am I right and should I have used a different circuit?
bridgen
Posts: 196
Joined: Sun Aug 25, 2002 1:01 am
Location: Camberley, United Kingdom
Contact:

Re: Add DC bias to sinusoidal signal

Post by bridgen »

What op-amp are you using?
Robert Reed
Posts: 2277
Joined: Wed Nov 24, 2004 1:01 am
Location: ASHTABULA,OHIO
Contact:

Re: Add DC bias to sinusoidal signal

Post by Robert Reed »

Not sure what the battery is for. Cannot see detail on sine graph to make it out. So I'll take a wild shot at it any way. Could you bias the circuit like most single supplied op amps,that is resistively split the supply and return both inputs to that point. They would be capacitively coupled of course.
I assume you are amplifying the differential signal 0.4-0.3v =0.1v times x1 and x 2 respectively, but I don't know which is which.
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: Add DC bias to sinusoidal signal

Post by Chris Smith »

Diodes are generally used for signal injection in a DC mode. <p>They block and yet they can add a DC component to a line with out a feed back problems.
redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: Add DC bias to sinusoidal signal

Post by redrocker »

David: I am using LM324's.<p>RR: The battery is merely a proxy for the DC component of the signal source for the purposes of illustration. Please reread my original post. I had given thought to using a specialized "rail splitter" IC. I have used them successfully in the past. I am told that in my application, however, that the circuit will only be receiving a +5 V source. If it were to receive a +12 V source, I would split the rail. Unfortunately, this option is not available to me.<p>CS: I thought about diodes but the voltage is insufficient to forward bias them, even if they were Germanium or Schottky.<p>terri: Get some rest!
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Add DC bias to sinusoidal signal

Post by MrAl »

Hi there,<p>If you are saying that you are intending to
output sine waves that swing from 0 to 5v and
you need to use a +5v supply then
you can't use an LM324 ic because it doesnt
have what's called a "rail to rail" output.
You'll first need to get one of the ic's that
does have this feature.<p>Second, are you saying that:<p>V1 = 0.3V + 0.1 sin (12878 t + 0)
V2 = 0.4V + 0.1 sin (12878 t + 180)<p>are the two existing signals and that you want to convert them to swing from
0 to 5v riding on a 2.5v dc bias?
In this case you'll have to remove some or
all of the existing dc bias before you amplify
because the gain of the amp needs to be 2.5/0.1
and that will also amplify the dc offset unless
you can capacitively couple...is that possible?<p>Take care,
Al
LEDs vs Bulbs, LEDs are winning.
ezpcb
Posts: 98
Joined: Tue Apr 19, 2005 1:01 am
Contact:

Re: Add DC bias to sinusoidal signal

Post by ezpcb »

The circuit won't work as your wish. the output will be frozen at 2.5V. You should use "additive circuit". if the internal impendence of signal source is high, use a follower before the additive circuit. LM324 won't work if you want to get 0-5V swing. you can use LMV324, it's low voltage R-R version LM324,
http://www.EzPCB.com
High Quality PCB for Electronics Hobbists, Pay for Chrokee, Get Land Rover
redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: Add DC bias to sinusoidal signal

Post by redrocker »

Al: Point taken. I chose the LM324 for three reasons: 1) availability at work; 2) good single-supply, low Vdd operation; 3) swings to negative rail. In the eventual application, the opamp feeding the ADC will need R-R output since its supply voltage will be +5.<p>As to amplifying the DC bias, indeed that becomes very tricky to work with. But as soon as you capacitively couple the signal, the signal swings about the ground reference which makes it into a dual-polarity situation.<p>ezpcb: My original thought was to add the DC using a voltage summing circuit, but when I looked at the circuit in a book, its output function is -Vin*(Rf/Ri), once again implying that the output would swing into the negative supply range.
Gorgon
Posts: 325
Joined: Wed May 04, 2005 1:01 am
Location: Norway
Contact:

Re: Add DC bias to sinusoidal signal

Post by Gorgon »

Hi Beaker.
I would have used the complemetary input directly. Use a end-of-line resistor (depending on the output impedance of the generator) like 1k or less. Use a standard instrumentation amplifier construction with a gain of less than 1. Depending of the offset you want to get rid of. 1:10 gives a range of approx. +/-20v, depending of the output swing of your selected amp.<p>The instrumentation amp must have an artificial signal ground at 2.5v. Just use the midpoint of 2 equal resistors between 5v and 0v. You will than have an output symetrical aroud 2.5v.<p>To correct and boost the level use a standard inverting amp. as the second amp. This must also use the same 2.5v signal ground point.<p>
TOK
Gorgon the Caretaker - Character in a childrens TV-show from 1968. ;)
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Add DC bias to sinusoidal signal

Post by MrAl »

Hello again Beaker,<p>If you bias the non-inverting terminal of
the op amp to a positive level it doesnt matter
if a capacitor couple causes plus and minus
signals because the op amp will only see plus
signals. The left side of R4 will see plus
and minus, but who cares :-)<p>Solution 1
The simplest circuit is to bias the non inverting
input to slightly less than 0.1 volt by choosing
R1 and R2 to give you about 0.096 volts at pin 3
and change R6 to 250k, and add capacitive coupling
at the left side of R4. This solution will be
a bit sensitive to the op amps input offset voltage
however so your op amp will have to have a very low
input offset voltage spec.<p>Solution 2
You may wish to bias pin 3 to 2.5v and
capacitively couple the signal to the left side of
R4 and add a 1 Megohm resistor from pin 3 to the
left side of R4 as well as change R6 to 250k.
This solution is not very sensitive to the op amp's
input offset voltage.<p>
Take care,
Al
LEDs vs Bulbs, LEDs are winning.
redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: Add DC bias to sinusoidal signal

Post by redrocker »

Gorgon: Yes, I agree. I am going to go with your idea of going into the instrumentation amp first because the common mode noise on the complementary pair is signifigant. The i-amp will help to eliminate much of the noise from getting amplified in later stages of the circuit.<p>However, I am unclear about the interface circuit at the input to the i-amp. My understanding is that I should use a capacitor to a resistor to the artificial ground. The junction of each C-R combo goes into the i-amp. Is this correct?<p>MrAl: I simulated Solution 2 and it looks pretty good. However, I think this way would offset the advantages of the i-amp, so while it does address my original question, I am going to try the ideas above first.
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Add DC bias to sinusoidal signal

Post by rshayes »

Restating your input signals:<p>V1 = .3 V + .1 Sin(12878t)
V2 = .4 V - .1 Sin(12878t)<p>Therefore:
(V1-V2) = -.1 V + .2 Sin(12878t)<p>The sine wave is .4 volts peak to peak and you want an output of 5 volts peak to peak. The gain needed is 12.5 times. This can be obtained by using 1.00K input resistors and 12.4K feedback resistors.<p>The offset the output will be -1.25 V due to the uncancelled DC terms. The desired offset is +2.5 volts. The additional offset needed is +3.75 volts. If this is derived from a +5 V reference, the gain for the offset needs to be .75 times. This would require input resistors of 16.5K.<p>Connections:<p>R1 1.00K from V1 to noninverting terminal
R2 1.00K from V2 to inverting terminal
R3 12.4K from noninverting terminal to ground
R4 12.4K from inverting terminal to output
R5 16.5K from +5 V to noninverting terminal
R6 16.5K from inverting terminal to ground<p>As already noted, for operation on +5 V you will need a rail to rail type of op amp to get the full output range. If a 1K input impedance is too low, additional unity gain buffers can be added to the inputs.
rstofer
Posts: 115
Joined: Sun May 15, 2005 1:01 am
Contact:

Re: Add DC bias to sinusoidal signal

Post by rstofer »

I don't have much to add to the technical bits above but...<p>TI has a book "Op Amps For Everyone" that can be downloaded from their site. Chapter 4 deals with the issues of offset and scaling.<p>It is possible to take a signal like -3 to -3.5 and offset it and rescale to 0..5 with a single op amp and 4 resistors (generally).<p>This type of thing comes up all the time in A/D conversion for PICs and such.
redrocker
Posts: 87
Joined: Fri Oct 29, 2004 1:01 am
Location: Pennsylvania
Contact:

Re: Add DC bias to sinusoidal signal

Post by redrocker »

Here is a version of the circuit I just built and tested based upon Gorgon's comments. I am not going to use capacitive coupling because this circuit will be used at low frequencies, but it really was not needed, as I see now. Because I don't have rail-to-rail opamps yet, I am limited to about +4 V on the output. I plan to replace U1A with a pre-packaged i-amp from Analog Devices. But so far, so good.
Image<p>[ May 18, 2005: Message edited by: Beaker ]</p>
Post Reply

Who is online

Users browsing this forum: No registered users and 54 guests