Need guidance with Adjustable PWM with 555 Timers

Thread Starter

ahchah08

Joined Nov 13, 2008
11
Hello All,

I am working on a project where I have to make a PWM generator (adjustable with a pot) using a 555 timer. What I need done is to create a circuit that keeps the output at 200hz while being able to adjust the duty cycle from 10% to 100% using a pot or rotary switch actually.

I'm relatively new with electronics. I've read the data sheet for the 555 and read up astable operation. So far from what I've come up with, adjusting resistor values will change both duty cycle and frequency. I need to be able to keep the frequency stable at around 200 hz, while changing the duty cycle. Also, another problem with that is that, I can't calculate it to get below 50% duty cycle for some reason.

Does anyone have any recommendations? I am not very creative with this.

Thanks a lot
 

wayneh

Joined Sep 9, 2010
17,498
Take a look here. Should help you along.

Also, you might be interested in this, thanks to another recent thread here. Tough to justify building something when you can buy so cheaply.

And while we're at it, if you want to drive a larger current than the 555 can handle itself, this might help you (bottom of the page).
 
Last edited:

Thread Starter

ahchah08

Joined Nov 13, 2008
11
Hi, I looked at those links you gave me.

That first article doesn't really mention that I am able to adjust the PWM while keeping the frequency constant. That's my main issue at the moment. It does mention the ability to adjust frequency while not changing duty cycle.

Do you have an idea on how to do it? I think the circuits that were given in the article all effect frequency when the duty cycle is adjusted. Thanks
 

wayneh

Joined Sep 9, 2010
17,498
That first article doesn't really mention that I am able to adjust the PWM while keeping the frequency constant.
Maybe the words don't specifically address that issue but I think that's why there are those 2 diodes on the timing pins of the 555 in PWM#1.
 

wayneh

Joined Sep 9, 2010
17,498
If you need tight frequency control, you may want a different approach. I think you could use a crystal oscillator as your clock to ensure precise frequency control. Then trigger the 555 as a one-shot monostable with adjustable "on time".

For example, let's say the clock is running at 1Hz and thus produces a negative going trigger every second. Your 555 could be set to produce a pulse from microseconds to a full second from that single trigger. It would wait for the next negative going trigger before producing another pulse.
 

MrChips

Joined Oct 2, 2009
30,794
I would break the task down to two separate functions:

1) 200Hz clock

2) variable pulse width

Don't attempt to tackle both functions with one 555 timer chip. Use one 555 timer to generate the stable 200Hz clock. If you need very high accuracy, you can use a crystal oscillator and obtain accuracy and stability to 5 parts per million.

For the variable pulse width you can use a monostable multivibrator or a second 555 chip in monostable mode.
 

wayneh

Joined Sep 9, 2010
17,498
According to everything I've read, using the two diode method of 555 PWM does NOT give a stable frequency, when the pulse width is adjusted. To do that, you need to put a comparator into the circuit.
You're right, I sent the OP to the wrong circuit on that page. The comparator approach should give 0-100% control with almost no effect on frequency.

But the two-step approach Mr. Chips and I both suggested may be the better way to go anyway. It could be accomplished with a single 556 IC.
 

Thread Starter

ahchah08

Joined Nov 13, 2008
11
Here is what I got so far:



I've tackled the problem with the two diode method. The problem now is getting the output to output a constant 200mA. The output seems to change current as I adjust the duty cycle with the pot. I have the ammeter into it correctly right?
 

JoeJester

Joined Apr 26, 2005
4,390
Using one 555 timer you can produce this PWM. The frequency is 1 kHz and the modulation is 50 Hz. The signal Original Ckt is the Williamson Lab's 50% duty cycle circuit. I left it there to illustrate the frequency did not change with a modulation index approaching 1.
 

Attachments

Thread Starter

ahchah08

Joined Nov 13, 2008
11
The meter measures the time-average current, so it's responding as you would expect.
Okay. I need it to output a constant 200mA after the NPN transistor though. It's outputting different values as I change the pot. What would you suggest to output a constant current at the output?
 

wayneh

Joined Sep 9, 2010
17,498
Sorry, am I being an idiot? Am I supposed to measure the current in AC?
It depends what you're trying to accomplish. If you were lighting LEDs that can handle 200mA, you'd want to have each pulse hit 200mA for the time that it is on, but the meter would show the average, maybe 100mA if the duty cycle is 50%. And the LEDs would be dimmed compared to fully on.
 
Top