Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Signal Generator 1vp-p with a DC offset

Status
Not open for further replies.

Chris_P

New Member
I posted this same question at the end of another topic, but I thought I'd start a new topic with it. Sorry about the double post.

I have built, with a lot of help, a digital thermostat using an LM335 temp sensor and an LMC662 opamp as a differential amplifier, to give me the full 10 bit accuracy on an AVR ADC over a restricted temp range. But calibrating it is a puzzle to me. My understanding of electronics is pretty basic. I have been reading and studying a lot but I am still stuck at a level where most of it goes over my head.

What has been suggested, and would be ideal is to build a signal generator with a 1V p-p amplitude that I can offset. Basically I need to go from 2.532V to 3.532V pretty accurately. Once I have this I can calibrate my thermostat circuit to output 0 - 5V.

Any suggestions on how I build something like this would be greatly appreciated.
 
pc88 said:
How about start with something like this circuit:

https://www.electro-tech-online.com/custompdfs/2007/06/K23-1.pdf

Then to add an offset voltage you can use another op-amp like this page describes for the "summing amplifier":

http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/opampvar5.html

To generate the offset voltage, just use a pot (like 10K) connected between Vcc and GND. The wiper terminal will be your offset voltage.
Thanks for the tips. I sort of get the idea with the first diagram to build a function generator. All I really need would be the square wave generator. What I am not sure on is how I restrict the wave to 1V peak to peak? Is that something so obvious I should see it?

How does the summing amplifier provide a DC offset? I'll keep reading ....
 
You can provide the offset and the 1v p-p amplitude using just one op amp. The summing amplifier use of the op amp performs a weighted sum and amplification. So, if you are generating, say, a 9v p-p signal, just amplify it by 1/9. In the example above, set R1 = R2 = R and R3 = 1/9 R. Then

Vout/R3 = V1/R1 + V2/R2 or Vout = 1/9*(V1 + V2).

V1 is your signal and V2 is a voltage you've established using a pot.

For a good in-depth treatment of op amps try this out:

https://www.electro-tech-online.com/custompdfs/2007/06/slod006b.pdf

It also goes over some very useful circuit theory which will make your electronics life a lot easier!
 
Last edited:
I should mention that in practice there will be some complications due to
real-world operating limitations of op amps. For instance, an op amp cannot
produce a voltage outside of its supply rails. So, if you start with a 9v p-p
signal and want a 1v p-p output with a 0-9v variable offset, you might have
to use two op amps: the first to attenuate the input signal to a 1v p-p level
and the second to add the offset. Also, things are a little more complicated if
the op amps you want to use are single supply instead of dual supply, but the
basic idea will be the same.
 
Thanks for all the info pc88. I am reading the info on op amps that you linked to. I think I need the dummies guide. I'll start by building the square wave generator and then go from there.
 
Do you have an accurate voltmeter? If not, you won't be able to calibrate your circuit.
I personally don't think the square wave generator/scope method will be accurate enough. You can't measure 5 volts accurately on a scope. I would just generate the two DC reference voltages and connect them one-at-a-time to your thermostat circuit. Measure the output with your voltmeter.
 
Ron H said:
Do you have an accurate voltmeter? If not, you won't be able to calibrate your circuit.
I personally don't think the square wave generator/scope method will be accurate enough. You can't measure 5 volts accurately on a scope. I would just generate the two DC reference voltages and connect them one-at-a-time to your thermostat circuit. Measure the output with your voltmeter.
I was wondering about this Ron. I have only just bought a scope and was working out how to use it yesterday. Soon came to realise that they are not that accurate. So I ordered a new multimeter, one that measures 0 to 5 in mV. And I'll do exactly as you have recommended, make 2 reference voltage points and calibrate to them. I'll probably play with the other idea too, a good learning experience. Thanks.
 
Chris_P said:
I was wondering about this Ron. I have only just bought a scope and was working out how to use it yesterday. Soon came to realise that they are not that accurate. So I ordered a new multimeter, one that measures 0 to 5 in mV. And I'll do exactly as you have recommended, make 2 reference voltage points and calibrate to them. I'll probably play with the other idea too, a good learning experience. Thanks.
You should buffer your references. see below.
 

Attachments

  • ref sw.PNG
    ref sw.PNG
    10.4 KB · Views: 264
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top