Function Generator question

IamSmooth, Sat Sept 02 2006, 09:06PM

I can precisely control the frequency and duty cycle with my function generator. I also know that for a basic 555 circuit the reistance (Ra and Rb) and capacitance across the proper pins control the frequency and duty cycle. How does the function generator vary these parameters while keeping the other fixed with just two knobs (frequency knob and duty cycle knob)?

Using the 555 as an example, I would like two knobs to smoothly control frequency and duty cycle:
If one wants the frequency fixed, the duty cycle is varied by changing values of Ra and Rb (diode across pins 6&7). I could use a three-pin trim pot for this. How then, could I smoothly vary the frequency? I don't think there are variable capacitors with a sufficient range. Would I have to link two variable resistors to change simultaneously across 6&7 and 8&7?
Re: Function Generator question
Avalanche, Sat Sept 02 2006, 10:30PM

You basically need to not use a 555, or at least don't take the output from pin 3 smile

To vary your duty cycle independent of the frequency, or vice versa, you need two things - a sawtooth or triangle generator (you can take the signal from the timing capacitor on the 555) and a comparator. Altering the frequency of the sawtooth is as simple as altering the frequency of your oscillator, whatever your are using - vary either the capacitor value or the resistor. To alter the duty cycle you change your reference voltage that you are using on the comparator - so it swings high or low at a different voltage on each cycle of the sawtooth, resulting in a change of duty cycle, or pulse width, depending on where the switching takes place. I'm probably not the best at explaining things, but I hope that makes some sense. The TL494 basically does this, it might help if you look at the functional block diagram in the TL494 datasheet.
Re: Function Generator question
IamSmooth, Sat Sept 02 2006, 10:53PM

Maybe the eassiest solution would be to use two 555 timers. One would provide an input trigger which can control the frequency. THe second 555 can be used to vary the duty cycle.
Re: Function Generator question
Hazmatt_(The Underdog), Sat Sept 02 2006, 11:06PM

you might want to have a look at the ICL8038. There is a NTE cross to it, I forget the number. It is one of the chips that generates sine/triangle/square with duty and VCO. Its sorta like its own function generator all in one.

It looks very promising sometimes, but it can be picky depending what your VCO input voltage range is. Sometimes you have to set limits for min/max voltage so that it doesn't stop oscillating.

Anyways, that chip and a counter setup will give you basically a commercial generator to 2MHz.
Re: Function Generator question
IamSmooth, Sat Sept 02 2006, 11:11PM

I don't actually need a chip to solve the problem. I aminterested in how one would design a simple circuit from basic parts to control both frequency and duty cycle. THis is one of those "I want to know how to do it" things.

Again, just to be clear, I would like two control knobs to control frequency and duty cycle independent of each other.

One solution might include a 555 astable for frequency control and a monostable 555 for duty cycle. The problem is that I need to make sure the monostable pulse duration is always shorter than the astable period.
Re: Function Generator question
Avalanche, Sat Sept 02 2006, 11:56PM

IamSmooth wrote ...

Maybe the eassiest solution would be to use two 555 timers. One would provide an input trigger which can control the frequency. THe second 555 can be used to vary the duty cycle.

Yes you can do that. The only problem with that is when you adjust the potentiometers in a way that the trigger pulse to the second timer is longer than the overall frequency will allow. If you do it, it's best to aim for the shortest trigger pulse duration possible, like less than 1uS, which would mean using a 7555, the CMOS version of the 555.

If you want to do it yourself, you can create a simple oscillator with an inverter chip and use a comparator for the duty cycle, or simply use a TL494 with a pot on the timing resistor, and another acting as a potential divider on the input to the PWM comparator. I know what you mean about wanting to make everything yourself from scratch, but then you soon realise what a lifesaver things like comparators are!
Re: Function Generator question
IamSmooth, Sun Sept 03 2006, 12:16AM

Avalanche wrote ...


If you want to do it yourself, you can create a simple oscillator with an inverter chip and use a comparator for the duty cycle, or simply use a TL494 with a pot on the timing resistor, and another acting as a potential divider on the input to the PWM comparator.

How does one use a comparator to control the duty cycle for a variable timing input?

Edit:
How is this? Link2
Re: Function Generator question
HV Enthusiast, Sun Sept 03 2006, 03:49AM

Just use two 555 timers. One controls PRF, and the other pulsewidth, so you can control frequency and duty cycle independently.
Re: Function Generator question
Bennem, Sun Sept 03 2006, 06:52AM

Take a look at Steve Wards site,
under 'DRSSTC interrupter'.
for an example of two 555 timer ics controlling
both frequency and pulse width independently.
Re: Function Generator question
Carbon_Rod, Sun Sept 03 2006, 08:54AM

I am not sure where this thread was headed so I will answer the initial question.

If you want to know about waveforms generation look at the LM8038 analog chip design (rather simple actually.) Why the duty cycle does not change (well at least in theory it shouldn’t) the fundamental frequency of operation should be immediately obvious.

You may want to look at linear control designs in oscillators and amplifiers. Some clever folk simply used a “stereo” pot to adjust the parameters and or remained balanced with crude internal calibration (as even good op-amps can have bizarre shifts with temperature.) If you find a schematic you will see complexity made precision instrumentation expensive.

The j-fet amps they have now with excellent slew rates and rather astonishing gains. Some are also anti-DC-biasing.

When DSP, chopper controlled analog amps, and SOCs arrived you can imagine how much designers were relieved -- almost everything is digital these days as its cheaper to build.
Re: Function Generator question
IamSmooth, Sun Sept 03 2006, 05:13PM

EastVoltResearc wrote ...

Just use two 555 timers. One controls PRF, and the other pulsewidth, so you can control frequency and duty cycle independently.

I know that I can use two 555s. The question then becomes "if I can vary the PRF on the first 555 with a pot, how do I ensure the pulse width on the second 555 does not exceed the period of the first 555 and still allow close to 0-100% duty variation?"

I think the link I posted earlier will solve the problem.
Re: Function Generator question
Avalanche, Sun Sept 03 2006, 06:00PM

I couldn't view the PDF for some reason, it said it was corrupt rolleyes

I still think you need to move away from 555s for what you're doing, instead of trying to patch the problems that are caused by using 2 like that. 555s are only good up to a point, but there are better ways to achieve independent variation of frequency/duty cycle probably using less components than are contained within a single 555. this page explains it pretty well, look at 2.1.1. the comparator. You vary the frequency of the 'triangle wave generator' for your frequency, and the voltage of the 'DC Level' for your duty cycle.
Re: Function Generator question
IamSmooth, Mon Sept 04 2006, 03:53AM

Thanks Avalanche. The linkI posted showed PWM using the triangle waveform of a 555 and a comparator.
Re: Function Generator question
teravolt, Mon Sept 04 2006, 04:01AM

I use a 555 to generate F and a 4538 to generate width
Re: Function Generator question
IamSmooth, Mon Sept 04 2006, 05:52PM

I just rigged up a crude setup that works just fine. I used the 555 to set up the frequency and a 741 opamp to control the pulse width. If I ever need this for a project I will just fine tune the components.