# Is there a way to control the PWM duty cycle of a 555 timer without using a variable resistor?

I need to control the duty cycle of a Pulse Width Modulation (PWM) circuit from a DC voltage input. To do this, I've been looking into 555-timer circuits - but every circuit I've come across involves controlling the duty cycle by using a variable resistor/changing resistor values (e.g. changing the value of Rb in the diaram shown below).

I've researched and thought about it a lot, but I can't find a way to use a certain input voltage to give a certain duty cycle in a PWM cicruit with the 555-timer, so any suggestions I may not have thought of or letting me know it can/can't be done would be appreciated.

Thanks

As a note: The requirement of controlling a PWM circuit duty cycle with an input voltage and not by other means is necessary for what I'm doing... I'm not trying to make my life difficult

Also, I forgot to mention I'm also not allowed to use microcontrollers!

• Why does it need to be a 555 and not a µC? Commented Dec 1, 2016 at 22:12
• Other VCO circuits are available, e.g based on opamps. Commented Dec 1, 2016 at 22:15
• @AliChen Just to be clear, I think you mean sawtooth generator and variable threshold. That's actually the first thing that pops into mind, though. Isn't it? I guess this student made their own choice to chase after the 555 as a means. Doesn't sound like it's necessary by the assignment, though.
– jonk
Commented Dec 1, 2016 at 22:45
• @jonk, yes, you are absolutely correct, sawtooth. Commented Dec 2, 2016 at 2:19
• The industry term is 'PWM modulator' they are available as a complete IC geared towards SWPS, or you can build one from scratch. Commented Sep 1, 2017 at 16:28

Yes – simply use your external DC voltage to bias the feedback voltage. Done! (this means connecting it, with a appropriately sized resistor, to the threshold pin).

I'm not trying to make my life difficult

Well, still you're using a NE555 to generate a PWM. I'd simply go, get a cheap microcontroller with an ADC and a PWM unit (these start well below half a Euro), write ten lines of C firmware and be done. No analog circuitry you have to tune, no uncertainty and non-linearity of duty cycle as function of control voltage, just clean software in a microcontroller that doesn't need any external components but a decoupling capacitor for its power supply. Bonus: internal oscillators of microcontrollers these days would usually be much more accurate than a NE555.

Update better late then never: you mentioned you're not allowed to use microcontrollers. I know this will probably mean some learning overhead, but a CPLD-implemented PWM generator with either a resistor-ladder-based ADC implemented with pins and external resistor networks (so you don't have to solder a lot of resistors) or a cheap ADC IC would still be what I'd use. PWM is basically a pretty digital problem, so I'd go digital.

Another easy approach would simply use a quad Opamp IC: Opamp 1 & 2 to generate a triangle wave, opamp 3 to compare the instantaneous triangle voltage to your external DC voltage. Easy PWM, and gotten rid of the NE555.

• so this is homework or an exam question? Commented Dec 1, 2016 at 22:30
• really, if this is just a project, why go the complicated, less accurate, more error-prone, in total probably more expensive, less flexible route instead of just using a microcontroller?! Commented Dec 1, 2016 at 22:45
• Personally, I can understand, but also think it's not a good thing to encourage people to engineer, but then not allow them to properly engineer something, i.e. to use the right tools :) Commented Dec 1, 2016 at 22:47
• @jonk true. "Project" for me is something that's completely up to the executing parties to implement. If the problem can be solved easily, it should be. Otherwise, one might call it "lab exercise". Commented Dec 1, 2016 at 22:55
• Might be a test for employment or to qualify for a change in position within a company, as an alternative that may fit the data available.
– jonk
Commented Dec 1, 2016 at 23:13

If you're allowed to use 2 NE555s, then look at this following schematics:

simulate this circuit – Schematic created using CircuitLab

CLKIN is a square wave obtained with another 555, in the well-known astable configuration. Vin is the modulating signal (or, a voltage to set the DC). PWMOUT is the output signal. In the schematics, C and R values are set "randomly" as I don't know your specs.

If you are allowed for a much "how are you doing" PWM (i.e. where both frequency AND duty cycle varies), but you must use only one 555, then consider modulating pin 5 (control), of the classic astable configuration.

Still, I can't figure out why shouldn't you use a 0.1€ microcontroller, few lines of C/ASM and a decoupling cap for a project...