Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding a dc offset to a signal

1,068 views
Skip to first unread message

Fibo

unread,
Jun 27, 2016, 1:44:18 PM6/27/16
to
Hello,

I'm struggling a bit with adding a DC offset to a slow (100Hz) ac signal. I thought I could feed both signals through series resistors into the non-inverting input of a buffer amplifier, but when I simulate it on LTspice, my offset is low (1.4V rather than 2V) and my input signal is attenuated.

My simulation has a 2V voltage source for the offset, and 1Vp/100Hz sine wave as the signal source

I did the same circuit but added a feedback resistor and a resistor to ground to the buffer op-amp, and it behaved correctly

But when I tried swapping out my 2V source with a 2V reference voltage in the simulation, my waveforms got all distorted

below is a link to what I'm simulating:
https://drive.google.com/open?id=0B57i2560inOAeEEyVEhQM1dMSGs

Can someone tell me where I'm going wrong?

Much thanks!

dagmarg...@yahoo.com

unread,
Jun 27, 2016, 1:56:12 PM6/27/16
to
Your offset voltage V9 should be 1V, not 2V.

1V, divided by the 2:1 divider, multiplied by the 2x gain, = 1V offset.

Cheers,
James Arthur

Fibo

unread,
Jun 27, 2016, 2:24:16 PM6/27/16
to
Thanks James, I overlooked the divider, I am trying to get a 2V offset on my input signal, which the 2nd circuit does because of the gain... and now I'm thinking that when I swap out the 2V source with a reference, the output resistance of that reference is screwing up my gain... is this just the wrong approach?
Message has been deleted

dagmarg...@yahoo.com

unread,
Jun 27, 2016, 2:31:22 PM6/27/16
to
On Monday, June 27, 2016 at 2:24:16 PM UTC-4, Fibo wrote:
> Thanks James, I overlooked the divider, I am trying to get a 2V offset on my input signal, which the 2nd circuit does because of the gain...

Then Bob's yer uncle. (If would help if you'd just say "I want a gain of
X with a 2V offset.")

> and now I'm thinking that when I swap out the 2V source with a reference, the output resistance of that reference is screwing up my gain... is this just the wrong approach?

Your approach assumes equal source impedances. That's fine as long
as it's true. If not true, using 100k input resistors would make the
source impedances 100x less important.

Cheers,
James Arthur

George Herold

unread,
Jun 27, 2016, 2:35:54 PM6/27/16
to
On Monday, June 27, 2016 at 1:44:18 PM UTC-4, Fibo wrote:
Do you care if the output is inverted?
If not then the usual summing amp will work fine.

George H.
(Oh, well you'd have to put in -2V DC.)

Fibo

unread,
Jun 27, 2016, 2:47:40 PM6/27/16
to
I swapped out the series resistor in-line with the input ac signal with a 10uF cap. This prevented the DC offset voltage from getting divided down.

Now I swapped out the 2V voltage source with a voltage reference part, and after adjusting the DC in-line series resistor I was able to get what I was looking for

although I'm not sure if it was just coincidence that the resistor that worked is the same value as the resistor I'm using to feed the voltage reference (45k)

What I ended up doing:
https://drive.google.com/open?id=0B57i2560inOAUks1azFOOTQzV28

**I can't have the output inverted**

dagmarg...@yahoo.com

unread,
Jun 27, 2016, 4:04:09 PM6/27/16
to
(View in a fixed font, like Courier)

+5V
-+-
|R1
[45k]
| R3 |\
+----[45k]----+----|+\
.-' U2 | | >---+-->
^ 2.5V | .-|-/ |
| | | |/ |
=== | '--------'
10uF |
Vin >---||---------'

That works fine. R3's value shouldn't matter--you could make it a
lot larger to improve the low frequency response. You could also
add a resistor to ground at the non-inverting input, to create
exactly 2 volts offset.

You can also bootstrap R3 to increase a.c. input impedance...

Electronics is fun.

Cheers,
James Arthur

Sylvia Else

unread,
Jun 28, 2016, 5:46:29 AM6/28/16
to
On 28/06/2016 4:31 AM, Fibo wrote:
> I've replaced the series resistor on the the ac signal with a 10u
> cap, and its isolated the DC offset voltage from that divider, so it
> added 2V to the output. Thanks! now I tried swapping the 2V source
> with a reference and it's acting goofy again.
>

Does the downstream circuit really depend on that accurate an offset
that you need to use a reference rather than just deriving 2 volts from
your power supply? I wonder because opamps have their own offsets, so
the result won't be exact.

You could buffer your reference with another opamp to avoid issues with
your reference having a significant impedance.

Sylvia.

Jim Thompson

unread,
Jun 28, 2016, 9:41:55 AM6/28/16
to
On Mon, 27 Jun 2016 11:31:01 -0700 (PDT), Fibo <panf...@gmail.com>
wrote:

>On Monday, June 27, 2016 at 1:24:16 PM UTC-5, Fibo wrote:
>> Thanks James, I overlooked the divider, I am trying to get a 2V offset on my input signal, which the 2nd circuit does because of the gain... and now I'm thinking that when I swap out the 2V source with a reference, the output resistance of that reference is screwing up my gain... is this just the wrong approach?
>
>I've replaced the series resistor on the the ac signal with a 10u cap, and its isolated the DC offset voltage from that divider, so it added 2V to the output. Thanks! now I tried swapping the 2V source with a reference and it's acting goofy again.

Could you be more precise in your problem statement? What signal
conditions going in? What desired signal conditions at output?

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I'm looking for work... see my website.

jurb...@gmail.com

unread,
Jun 30, 2016, 9:30:05 PM6/30/16
to
I can't believe all the hulabaloo about this and am not even really an engineer.

You put the input to the plus side of an OP AMP, you DIRECTLY couple the output to the minus side through a capacitor high enough to give you flat response at the working frequency, which actually means lower by a couple octaves. Then you manipulate the DC voltage at the minus side with resistors or Zeners or whatever the hell you want. You can even have a pot to adjust it at will.

billbowden

unread,
Jun 30, 2016, 10:21:42 PM6/30/16
to

<jurb...@gmail.com> wrote in message
news:d193c290-2e70-4cd5...@googlegroups.com...
Not sure I follow that. Seems the output needs to be directly coupled to the
minus input so the output will be 2 volts DC. The input needs to go through
the capacitor, not the output. Sorry I'm so stupid.







Jim Thompson

unread,
Jun 30, 2016, 10:39:59 PM6/30/16
to
You're not stupid... jurb6006 is a village idiot. To do controlled
offsetting, the non-inverting input of the OpAmp should be a virtual
ground, then signals applied via resistors to the inverting input are
summed, amplitude-weighted by the resistor values.

Jim Thompson

unread,
Jul 2, 2016, 7:02:35 PM7/2/16
to
On Mon, 27 Jun 2016 10:44:12 -0700 (PDT), Fibo <panf...@gmail.com>
wrote:
See...

<http://www.analog-innovations.com/SED/DC_Offset_Question_SED.png>

As I opined in...

Message-ID: <vplbnbd04cslrphbp...@4ax.com>

"To do controlled offsetting, the non-inverting input of the OpAmp
should be a virtual ground, then signals applied via resistors to the
inverting input are summed, amplitude-weighted by the resistor
values."

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

Wonder who was better, AG Loretta Lynch or Monica Lewinsky ?>:-}

billbowden

unread,
Jul 3, 2016, 7:09:47 PM7/3/16
to

"Jim Thompson" <To-Email-Use-Th...@On-My-Web-Site.com> wrote in
message news:vplbnbd04cslrphbp...@4ax.com...
> On Thu, 30 Jun 2016 19:20:45 -0700, "billbowden"
> <bpe...@bowdenshobbycircuits.info> wrote:
>
>>
>><jurb...@gmail.com> wrote in message
>>news:d193c290-2e70-4cd5...@googlegroups.com...
>>>I can't believe all the hulabaloo about this and am not even really an
>>>engineer.
>>
>>>You put the input to the plus side of an OP AMP, you DIRECTLY couple the
>>>output to the minus side through a capacitor high enough to give you flat
>>>response >at the working frequency, which actually means lower by a
>>>couple
>>>octaves. Then you manipulate the DC voltage at the minus side with
>>>resistors or Zeners or >whatever the hell you want. You can even have a
>>>pot
>>>to adjust it at will.
>>
>>Not sure I follow that. Seems the output needs to be directly coupled to
>>the
>>minus input so the output will be 2 volts DC. The input needs to go
>>through
>>the capacitor, not the output. Sorry I'm so stupid.
>>
>
> You're not stupid... jurb6006 is a village idiot. To do controlled
> offsetting, the non-inverting input of the OpAmp should be a virtual
> ground, then signals applied via resistors to the inverting input are
> summed, amplitude-weighted by the resistor values.
>
> ...Jim Thompson

But doesn't that cause a phase inversion? I think the OP wants the output in
phase with the input.

.




Jim Thompson

unread,
Jul 3, 2016, 7:56:37 PM7/3/16
to
So add another OpAmp... OpAmp's are cheap >:-}

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

jurb...@gmail.com

unread,
Jul 4, 2016, 7:43:10 AM7/4/16
to
>"Not sure I follow that. Seems the output needs to be directly >coupled to the
>minus input so the output will be 2 volts DC. The input needs to go >through
>the capacitor, not the output. Sorry I'm so stupid. "

Assuming you want a solid and stable DC offset it is better to go DC on the input and then use the capacitor in the feedback. That makes the OP AMP provide the DC offset rather than just a resistor.

I assume you know enough to just put a capacitor in the signal path and use a resistor to set the DC after it. Since you posted, I assume such a simple solution is not acceptable. It has been done for a century, it is called a coupling capacitor. Like betweent the plate of one tube to the grid of the next in a multistage amplifier. It was also done extensively in multistage audio amplifiers, and still is somewhat thought they have gone to as uch DC coupling as possible for better low end response.

Anyway, like this :

https://dl.dropboxusercontent.com/u/29948706/opampdcoff.jpg

The capacitor locks the AC gain of the OP AMP at unity and provides for a low impedance output suitable for almost anything. The resistor sets the DC gain based on whatever the source resistance of your DC is. The potentiometer represents whatever DC source you want to use. You can have it stable or you can have it vary under whatever circumstances you choose.

jurb...@gmail.com

unread,
Jul 4, 2016, 7:51:55 AM7/4/16
to
>"You're not stupid... jurb6006 is a village idiot. To do controlled
>offsetting, the non-inverting input of the OpAmp should be a virtual
>ground, then signals applied via resistors to the inverting input are
>summed, amplitude-weighted by the resistor values. "

I'm the idiot ? You must have read something wrong here. He wants to add DC offset to a signal. You want him to use fifty fucking components to do it. No wonder we can't mass produce anything in this country. Look at the simple circuit I put up and tell me what the fuck is wrong with it.

Didn't they teach you not to waste ? Or it that most of your projects have been special order and cost was not so important ?

I want to know what is wrong with my circuit that does EXACTLY what the guy asked for and only uses what, five components ?

You work for the government or something and sit on those $600 toilet seats or what ?

I used to have alot of respect for you but I am now reconsidering. I know it doesn't mean shit to you because you are like about 80 years old got it made and people keep throwing money at you to get you to work more.

But if you do not see the beauty in simplicity of design I don't know what to tellya. You forgot that the most reliable parts are the ones that aren't there ?

jurb...@gmail.com

unread,
Jul 4, 2016, 7:54:13 AM7/4/16
to
>"But doesn't that cause a phase inversion? I think the OP wants the >output in
>phase with the input. "

I do believe he said that somewhere along the line but am too lazy to look back.

I do pay attention sometimes.

jurb...@gmail.com

unread,
Jul 4, 2016, 7:56:56 AM7/4/16
to
>"So add another OpAmp... OpAmp's are cheap >:-} "

I cannot believe a real engineer said that. Do you faintly remember a saying "Don't waste silicon" ?

You must work for the government, they are the only ones who would support doubling the cost of something for no good reason.

billbowden

unread,
Jul 4, 2016, 8:55:56 PM7/4/16
to

<jurb...@gmail.com> wrote in message
news:918374f3-2188-44e1...@googlegroups.com...
Interesting. I haven't seen it done that way. Not sure how the OP wants the
circuit to behave. In your solution, the output will track the input offset
with the additional 2 volt DC offset. So if the input moves up a volt of
offset, the output will move up a volt to 3 volts DC offset. Maybe that's
what he wants to do. I don't know.





jurb...@gmail.com

unread,
Jul 5, 2016, 5:53:05 AM7/5/16
to
>"Interesting. I haven't seen it done that way. Not sure how the OP >wants the
>circuit to behave. In your solution, the output will track the input >offset
>with the additional 2 volt DC offset. So if the input moves up a >volt of
>offset, the output will move up a volt to 3 volts DC offset. Maybe >that's
>what he wants to do. I don't know. "

That is what I assumed, otherwise it is just a simple capacitor coupling deal like in millions of devices.

Not an OP AMP, but they use some sort of thing like this in some Sony and other audio amps using VFET outputs. With those, since they are depletion mode, you cannot use a dim bulb or variac on them or it will blow the outputs.

There are other examples of DC level shifting all over the place, and most are simple. In most, it is simply AC coupling and the stage receiving the signal resets the level to whatever it likes.

Actually, now that I think about it, Jim Thompson is right. My little drawing, the DC will not track at one to one. Well it could if the resistance values are chosen right - I THINK. If the desired DC offset is constant, it is not hard to make the DC gain unity as well. But if he wants to vary it at will it gets a bit more complicated.

But I assume he was not looking for "Put a capacitor there".
0 new messages