Convert a 0v to +5v signal to -5v to 5v - Page 1
Forum section: electronics / beginners

author: cj9
author_rank: Contributor
timestamp: November 24, 2011, 07:17:19 pm
content: Hi!I have a quick question which is simple, but I can't get the differential op amp to work.I'm trying to convert a 0v to +5v signal to -5v to 5v, can anyone help me with this please?Thanks.

author: Zero999
author_rank: Super Contributor
timestamp: November 24, 2011, 07:47:06 pm
content: You need both a positive and negative power supply.Is this just a squarewave?

author: IanB
author_rank: Super Contributor
timestamp: November 24, 2011, 08:59:01 pm
content: What exactly is a -5 V to 5 V signal?If the signal is conveyed on two wires with no external reference then it's just a 5 V signal with the polarity reversed over half of the range. Is it an analog or digital signal? If it is digital, you don't need a positive and negative power supply, you just need an H-bridge. Even for an analog signal the H-bridge might be fine.It all depends on what the signal is, what it is being used for, what kind of quality and precision it needs to have, and (probably) what kind of frequency range or bandwidth it needs to cover."Simple" and "quick" questions like the one in the OP are frequently neither quick nor simple. Most people dashing off questions like this fail to provide sufficient and complete information about the problem. It's a classic scenario that happens over and over: someone asking a question assumes that the wealth of contextual and background information in their head will magically be transported telepathically into the minds of the readers allowing complex and detailed answers to be provided without any need for further explanation.

author: cj9
author_rank: Contributor
timestamp: November 24, 2011, 09:30:58 pm
content: Sorry....It's an analogue signal on a single line from a DAC, that ranges from 0 to 5v referenced to ground.I am looking for a way to convert this signal to -5v to 5v referenced to ground, still on a single line.In other words, amplify with gain of 2 but shift/offset the voltage by -5v, so that it ranges from -5v to 5v. This is why I thought it's pretty simple, I just didn't explain enough. I heard it's possible with the differential amplifier, but just can't get it to work!

author: IanB
author_rank: Super Contributor
timestamp: November 24, 2011, 09:55:07 pm
content: Hmmm...Thoughts here from a non-expert then.Mathematically, you need to multiply by 2 and subtract 5, or you need to subtract 2.5 first and multiply by 2 afterwards.That suggests to me you will need to construct a fixed 2.5 V or a fixed 5 V reference somewhere in the circuit.How about if you construct a fixed 2.5 V reference and apply that to the negative input of the op amp, apply your 0-5 V signal to the positive input, and arrange the op amp to have a gain of 2?

author: Zero999
author_rank: Super Contributor
timestamp: November 24, 2011, 10:07:07 pm
content: You need a level shifter: it's a very basic op-amp circuit.I'd normally just refer you to Google but I'm feeling more helpful to I'll do some of it for you, here are some links:http://www.edaboard.com/thread171596.htmlhttp://www.daycounter.com/Circuits/OpAmp-Level-Shifter/OpAmp-Level-Shifter.phtmlhttp://pdfserv.maxim-ic.com/en/an/AN4836.pdfhttp://www.controlsystemslab.com/doc/electronics/analog/sigcon_opamp.pdfhttp://www.ti.com/lit/an/sboa092a/sboa092a.pdf

author: IanB
author_rank: Super Contributor
timestamp: November 24, 2011, 10:22:54 pm
content: Those links do look helpful. But sometimes Google can't help you until you know what keywords to look for, such as "level shifter" in this case.I assume, from quickly browsing them, that some kind of fixed voltage reference is always needed somewhere, such as a fixed 5 V, even if it is only a power supply rail? When you need to shift a signal level up or down by a certain amount, you are going to need an offset voltage to add or subtract from your signal at some point...?

author: BravoV
author_rank: Super Contributor
timestamp: November 25, 2011, 04:42:01 am
content: As Achmed pointed out, as long your op-amp's power supply is at 0 to +5 volt, there is no way it can produce negative signal below 0 volt.Though I'm not the expert, believe you need to supply your op-amp with full range positive to negative rails like +5 down to -5 volt, of course with the assumption your op-amp capable of rail-to-rail output.If there is no mcu involved, the easiest way is to use the popular dirt cheap classic switch pump ic like ICL7660 which is usually enough to generate the negative supply rail you need from the positive rail.

author: Zero999
author_rank: Super Contributor
timestamp: November 25, 2011, 05:10:54 pm
content: Here's another link:http://www.ti.com/lit/an/sloa097/sloa097.pdfYes, you'll need a negative supply but there are plenty of ways to get that from a positive supply.

author: cj9
author_rank: Contributor
timestamp: November 25, 2011, 09:25:02 pm
content: I've managed to get it working thanks to all the information given here! I very much agree Google is great... but sometimes you just don't know what to search for, or how to phrase it!I ended up using a summing amplifier (-2.5v offset input), which with basic maths for the resistors, can also have a gain of 2. Then fed this into the other amp (inverting configuration), and it works perfectly.I'm really grateful for your help and wish there would something I could do to show my thanks.