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.

pwm circuit for function generator

Status
Not open for further replies.

qwerty68

New Member
Hello,

I have bought an arduino DDS funcion generator and I am looking for a solution to add pwm to the signal.

With a 555 timer circuit this is rather easy to do by adding two diodes and a variable resister and I was wondering if a standard solution like this exists to do the same with function generator TTL output?

I have been searching the net for quite some time but I couldn't find a standard circuit or solution for this purpose.

I don't have the intention to change the generator itself, just to create a seperate circuit.

Does it exist?
 
I don't understand your question. Doesn't the function generator generate pwm directly?
 
unfortunately not. The duty cycle is standard 50% and not adjustable.
I might need a 10% duty cycle.
I hadn't taken the non adjustability of the duty cycle of the generator into account.

this is the generator

so I'm looking for a way to build it in somehow.

I could use a 555 circuit but the signal I got was not really beautiful, almost triangle like.
I used my pc as an oscilloscope so this might be the problem.
I tested the oscilloscope however on a nice clear signal and it worked fine so I ruled that out.
 
I use a 555 to gen pwm signals over 200KHZ. Unless yours is alot higher it shouldn't be a problem. Since the software is open source, I'd just get a copy and modify it for a pwm output.
 
I have the 555 built and was thinking of taking it to a shop in the neighborhood and ask if it is ok to use their scope to check the signal.
I don't quite understand what you mean by modifying scope software for pwm output to use with a 555 timer.

I just found something that could work for the generator. Have it produce a triangle and use an opamp as comparator.
I saw several pwm controller circuits based on a traingle input, then, in the last stage put through an op-amp comparator to create the square.
As I understand, this is all quite new for me, mostly four op-amps are used in these circuits of which the first 3 are for creating the triangle which can bean be replaced by the generator.
That leaves 'just' a comparator.

How does that sound? does that make sence?
 
I have the 555 built and was thinking of taking it to a shop in the neighborhood and ask if it is ok to use their scope to check the signal.

Post a schematic so we can see if you've made a mistake. What is the frequency?

I don't quite understand what you mean by modifying scope software for pwm output to use with a 555 timer.

No, modify the signal gen software to generate a PWM wave.

I just found something that could work for the generator. Have it produce a triangle and use an opamp as comparator.
I saw several pwm controller circuits based on a traingle input, then, in the last stage put through an op-amp comparator to create the square.

Those would work, though I would stick with the 555 solution, as that should work very well.

As I understand, this is all quite new for me, mostly four op-amps are used in these circuits of which the first 3 are for creating the triangle which can bean be replaced by the generator.That leaves 'just' a comparator.

Good point, you just need a comparator and some resisitors to set the swtich point.

How does that sound? does that make sence?

Yup!
 
Last edited:
Post a schematic so we can see if you've made a mistake. What is the frequency?

there are two variants of the astable with variable duty-cycle I found. Both should work the same as I understand. The resistors will be different for each circuit in order to produce the same frequencies but that's just calculating.

**broken link removed**

**broken link removed**

I just simulated the comparator version i.c.w. a schmitt trigger and some resistors for use with the generator.
perfect, well on the simulator that is.:)
 
Ive used the first circuit to get a working PWM generator, without R1. Trying to get both frequency and phase width adjustment doesn't really work. I've simulated a circuit that gvies both adjustable frequency and duty cycle ( see attached ) I uses two op-amps in addition to the timer. Never built it though.

( the two resistors on the far left side model a center-tapped variable resistor )

( also, the opamps must be chosen for high enough slew rate so you have a rectangular signal )
 

Attachments

  • VarFreq&Duty.JPG
    VarFreq&Duty.JPG
    178.4 KB · Views: 990
Last edited:
I managed to get both the 555 circuits to work. I could adjust both frequency and duty cycle. The catch was that the duty cycle doesn't remain constant, it changes when the frequency changes so it's not very useful.

Thanks for the circuit you provided.
I have never worked with opamps so I have no clue to their properties in use or what is required. What would you have chosen? Could you suggest some models you think might work?
With the resister the duty cycle can be changed, I suppose as with the standard astable that the R1 and R2 are for frequency adjustment?

And does this design keep the duty-cycle constant when the frequency is changed?

Another idea that might work well is to use the saw tooth at the 555 astable's trigger and put it through a comparator just as I thought of with the function generator. I read that suggestion somewhere last night.
I saw on my pc that it produces a nice tooth and the duty cycle remains constant as far as I can theoretically overview it.
I read something about the general purpose of the 741 being appropriate for comparing the sawtooth. Do you have any experience with the 741? In a simulation it works well.
 
qwerty68 said:
I managed to get both the 555 circuits to work. I could adjust both frequency and duty cycle. The catch was that the duty cycle doesn't remain constant, it changes when the frequency changes so it's not very useful.

I wouldn't waste my time with those circuits.

I have never worked with opamps so I have no clue to their properties in use or what is required. What would you have chosen? Could you suggest some models you think might work?

It depends on your performance requirements. If, for example, you're driving +/-12V square wave at 100Khz, and you want the 'switching' portion to be, oh say 1% of the waveform, then you can calculate the required slew rate as follows:

1/100Khz = 10uS period

10uS*.01 = 100nS switch time.

So, you need to slew 24V/100nS or 240V/uS. If you used a slow 741 at .5V/uS, you wouldn't get much of a signal. Use this analysis, then use one of the opamp manufacturer's web search facilities to find an amp that has the minimum performance capabilities.

And does this design keep the duty-cycle constant when the frequency is changed?

The duty cycle in this design is totally dependent on the center-tapped variable resistor. The frequency is totally dependend on the other variable resistor (shown as "gain" on the drawing)

Another idea that might work well is to use the saw tooth at the 555 astable's trigger and put it through a comparator just as I thought of with the function generator. I read that suggestion somewhere last night.

That's another good way to do it.

I saw on my pc that it produces a nice tooth and the duty cycle remains constant as far as I can theoretically overview it.
I read something about the general purpose of the 741 being appropriate for comparing the sawtooth. Do you have any experience with the 741? In a simulation it works well.

The 741 is a bad choice, as shown in the above discussion.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top