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.

function generator

Status
Not open for further replies.
hi,
To get a variable mark/space ratio square wave, just add a another stage, as shown in this image.
Using a 25K pot you can change the ratio without changing the frequency.
 

Attachments

  • FuncGen1.gif
    FuncGen1.gif
    39.7 KB · Views: 195
Thanks ericgibbs,

Thanks for your effort to help,

Can you let me know how your modification works to change the duty cycle of the waveforms?
Do I need to use the output of THE PWM as my final output for square wave?
 
Thanks ericgibbs,

Thanks for your effort to help,

Can you let me know how your modification works to change the duty cycle of the waveforms?
Do I need to use the output of THE PWM as my final output for square wave?

hi,
U4 is configured as a comparator.
One input is the 'triangle waveform', the other input is a 'dc' voltage set by R18 the 25Kpot.
As the pot is adjusted the comparator threshold switch over point is changed, so the output switches over at a different level of the triangle wave.
This changes the output signal mark/space ratio, which is the output you require .
 
Thanks a bunch,

I want to know for which waveforms we define and specially change the duty cycle, I mean Which waveforms a real function generator is able to change?

Thanks again
 
ericgibbs,

Your modification does work just right, Thanks for it,
I did not add R12, R13 And C3 because they caused the sine wave to be changed to a triangle at the output of U2 when simulating.

Can you please let me know how to add a DC Offset to my circuit too??

Thanks a bunch
 
hi,
Are you wanting DC offset control on all the output waveforms.?
 
HI and thanks,

I prefer so If possible. I want to try all my best to build a nice and as perfect as possible function generator.

By the way Is this possible to increase the freq response of the circuit by a cap and a selector key?

Thanks.
 
HI and thanks,

I prefer so If possible. I want to try all my best to build a nice and as perfect as possible function generator.

By the way Is this possible to increase the freq response of the circuit by a cap and a selector key?

Thanks.

hi,
I will look, it will most likely need another OPA, which will become the 'main' output, you will select the required waveform that is connected to this extra OPA and it will have a level shift control.
 
OK thanks,

No matter if I will need another OP-amp. But I thought maybe the existing op-amps will do so.
Don't you have any idea regarding to the freq question?
 
OK thanks,

No matter if I will need another OP-amp. But I thought maybe the existing op-amps will do so.
Don't you have any idea regarding to the freq question?

hi,
If you try to add a DC offset to the existing OPA's it will most likely stop the oscillator or distort the sine/triang.

I will look and post back suggestions for the freq switch and level
 
hi,
If you try to add a DC offset to the existing OPA's it will most likely stop the oscillator or distort the sine/triang.

I will look and post back suggestions for the freq switch and level

Oh,

Thanks ericgibbs,

Today I worked on this project so that generate ramp and swathtooth waveforms,
I was able to do so by adding a 10k Resistor in series with a 1n4004 diode and connected the other pin of the resistor to noniverting input of the U1 and the other pin of the diode to the output of U1, So I was able to generate ramp and swathtooth by just inverting the bias of the diode in the said position, So it would be very OK if I could improve the circuit yet till have a more perfect function generator, So thanks a bunch for all your efforts.
 
Oh,

Thanks ericgibbs,

Today I worked on this project so that generate ramp and swathtooth waveforms,
I was able to do so by adding a 10k Resistor in series with a 1n4004 diode and connected the other pin of the resistor to noniverting input of the U1 and the other pin of the diode to the output of U1, So I was able to generate ramp and swathtooth by just inverting the bias of the diode in the said position, So it would be very OK if I could improve the circuit yet till have a more perfect function generator, So thanks a bunch for all your efforts.

hi,
Change the 47n across U1 opa to a 22nF or 10nF to increase the frequency.
I will try to post a circuit tomorrow.
 
hi,
Look at this simple option.
Use a 4 position switch to Select the input from the waveforms into the U8 opa.
There are two control pots R21 which is DC offset and R23/24 which is output amplitude
U7 opa is optional, but I would fit it as it will give a 'low' output impedance for the selected signal.
NOTE: the 'raw' sqr, tri, sine and pwm waveforms will still be available for use.
Use the U7 output for your special projects where you need to change the DC offset and amplitude.
 

Attachments

  • FuncGen2a.gif
    FuncGen2a.gif
    43 KB · Views: 290
Last edited:
hi,
Look at this simple option.
Use a 4 position switch to Select the input from the waveforms into the U8 opa.
There are two control pots R21 which is DC offset and R23/24 which is output amplitude
U7 opa is optional, but I would fit it as it will give a 'low' output impedance for the selected signal.
NOTE: the 'raw' sqr, tri, sine and pwm waveforms will still be available for use.
Use the U7 output for your special projects where you need to change the DC offset and amplitude.

Hi ericgibbs,

Thanks a bunch for your help in this project, I think you are a genus.

Now It is able to supply my needs even when I add my ramp/swath tooth wave section.
Just another thing is that I want it to generate a valuable DC output too, Do you have any idea for a simple way to do so? What about using U7 itself to do so by removing its input from another waveforms?

thanks again
 
Hi ericgibbs,

Thanks a bunch for your help in this project, I think you are a genus.

Now It is able to supply my needs even when I add my ramp/swath tooth wave section.
Just another thing is that I want it to generate a valuable DC output too, Do you have any idea for a simple way to do so? What about using U7 itself to do so by removing its input from another waveforms?

thanks again

hi,
Use the 82K.
You could get a DC output as you suggest, just leave the input to R16 open circuit, on say a 5th switch position.
 
Eric,
I Simulated your last modification by Proteus software, Unfortunately I was not able to change the DC OFFSET by changing R21 Value??! when I tried to change its value the amplitude changed and I have no good result to change DC OFFSET by R21?!! Any idea? I don't know the reason but Am thinking on an OP-amp Summer to sum DC with Those waveforms?
DO you have any idea why your mode's behavior is so??! Can you explain me What is the U8 circuitry by your kind??
 
Eric,
I Simulated your last modification by Proteus software, Unfortunately I was not able to change the DC OFFSET by changing R21 Value??! when I tried to change its value the amplitude changed and I have no good result to change DC OFFSET by R21?!! Any idea? I don't know the reason but Am thinking on an OP-amp Summer to sum DC with Those waveforms?
DO you have any idea why your mode's behavior is so??! Can you explain me What is the U8 circuitry by your kind??

hi,
Its because of the DC offset present on the sine/tria/square, is not present when the Select switch is open circuit.
Just add a 220K or 270k resistor from the DC position of the Select switch to +V.
As shown in this image
 

Attachments

  • AAesp01.gif
    AAesp01.gif
    5.6 KB · Views: 198
I do not understand your meaning by this ""Its because of the DC offset present on the sine/tria/square, is not present when the Select switch is open circuit.
""?!

My Switch is always connected to one output of the waveforms and to the noniverting input of U8 via 100k resistor as shown in your modification.Actually I don't know why You added R9 in the circuit?

Can I experience 0 OFFSET by changing R21, and whats the Max of OFFSET I can expect by changing it?

Thanks like alway.
 
Last edited:
I do not understand your meaning by this ""Its because of the DC offset present on the sine/tria/square, is not present when the Select switch is open circuit.
""?!
As you can see from the earlier waveform plots, they swing about 6V, not 0V, so there is always a 6V or so DC offset.
From your earlier post I thought you were saying that the DC didnt work when the DC position was Selected, I must have misunderstood.
My Switch is always connected to one output of the waveforms and to the noniverting input of U8 via 100k resistor as shown in your modification.Actually I don't know why You added R9 in the circuit?
As my note above said, I thought that you had a problem with DC offset Select, thats why I added R9.

Can I experience 0 OFFSET by changing R21, and whats the Max of OFFSET I can expect by changing it?
R21 is a 50K variable, so that you can set the DC output offset.
Thanks like alway.

hi,
I think we had our wires crossed a little...:)

If you build the circuit as shown in FuncGen2a image, it will work, try varying R21.

EDIT:
Post the images of the waveforms on the Vout on your simulation.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top