555 Timer duty cycle changing formula
Ask QuestionAsked todayActive todayViewed 47 times-1
I am making a PWM motor speed controller.
I used the Astable mode thinking it would work; it did not. Using an oscilloscope I noticed that I am only changing the frequency not the duty cycle by varying R2 .
After more investigation I found this second schematics that used diodes and it works.
- why the first one did not work?
- what is the role of the diodes?
- is there a formula for this?
- what is this mode called?
555motor-controllermathduty-cycleShareCiteEditFollowFlagedited 1 hour agoasked 2 hours agoHaythem Ltifi2133 bronze badges New contributor
- 1You should provide a proper schematic of the “1” circuit. For example, you have not described what you changed in the first circuit to attempt to alter the duty cycle. And 47uF is hardly a practical value for PWM of most motors. – Spehro Pefhany 2 hours ago
- well i am sure i wrote by varying R2 , and dont mind the 47 uf its in fact 470 pf , thats not the issue here . you are missing the point dude. – Haythem Ltifi 1 hour ago
- 1@HaythemLtifi why exactly are you agressive here? Spehro very sensibly pointed out that you said something didn’t work, but never explained what that was. There’s very many places that you could have a resistor “R2”, and your picture is so compressed I can’t tell which resistor is which, so it’s totally unclear what you did. But, OK, now that we know you’re not planning to improve your question, let me vote to close it as lacking necessary detail. – Marcus Müller 1 hour ago
- i dont know how to edit it. i was mad because of the down vote , i am new here and it was discouraging. R2 is clear right? its the between pin 7 and 6 . – Haythem Ltifi 1 hour ago
- Now can you please help me? – Haythem Ltifi 1 hour ago
- 1@Haythem Ltifi, your investigation leading to the diode version is very good. I read about the diode version which is an improvement over the standard version, which is not used in the cheapy 555 modules, therefore annoyingly not easy to set frequency and duty cycle. #Rohat Kılıç gave a very good explanation. – tlfong01 1 hour ago
- @tlfong01 I don’t know why the cheap DC dimmer modules use a relatively complex circuit. – Spehro Pefhany 1 hour ago
- @Spehro Pefhany 555 timer in normal configuration ,figure 1, cant go below 50% duty cycle , but in your circuit you can , you will have a better control over it it , you just fix the frequency once and then change the duty cycle as needed . its clever – Haythem Ltifi 1 hour ago
- @HaythemLtifi Compared to a couple 1N4148s or a BAV99 the added dual op-amp is quite a bit more complex. There might be an issue with LED dimming where it’s hard to get low enough duty cycle that the LEDs appear to be 100% off even in a darkened room. At full brightness, 99% or 100% doesn’t matter. \ – Spehro Pefhany 59 mins ago
- @Spehro Pefhany, Ah, there is some confusion here. When I said the improved diode version is good, because we can independently adjust frequency and duty cycle easier. I did not find your “complex circuit” anywhere in this question. Perhaps it is removed. Anyway, perhaps I can write up an answer to hopefully clarify things a bit. – tlfong01 42 mins ago
- 1@tlfong01 It’s unrelated to the question, which already has a selected answer. More to your comment about “cheapy 555 modules”, ones like this, which I am using to dim my office fake plant lighting, and I gave another to a friend for some of his boat lighting. The diode version doesn’t allow frequency to be adjusted easily but it doesn’t matter much with a PWM. – Spehro Pefhany 36 mins ago
- @Spehro Pefhany, (1) I know there is already a selected and very good answer. I am hoping my answer can complement the selected answer, (2) I understand you are using the NE555 astable output as a PWM signal to a light dimmer. However, the OP is using it to control the motor speed. (2) I always think that if the OP asks a question, we can (a) guide the OP to improve his question, (b) if there are things that the OP does not know that he does not know, otherwise he might consider other ways to do the job (controlling motor speed). / to continue, … – tlfong01 18 mins ago
- / cont’d, …When I first saw the OP’s schematic of using NE555 as PWM to input a NPN BJT which in turn switches the motor current and therefore changes speed and that he uses a DPDT to control motor direction, my immediate feeling is that he is using a very old, outdated method of doing things. Of course his objective might be learning analog devices and electromagnetic relies. I don’t see any problem on that. / to continue, … – tlfong01 4 mins ago Edit
- / cont’d, … However, if his objective is to learn the up to date and popular tools to control a motor, in this case, eg, using a H-bridge such as L298N, then this is a big problem, because he would definitely fail in a job interview, and damage his college’s reputation. – tlfong01 3 mins ago Edit
For a simple astable oscillator Thi=ln2⋅(R1+R2) CThi=ln2⋅(R1+R2) C and Tlow=ln2⋅(R2) CTlow=ln2⋅(R2) C, and T=Thi+TlowT=Thi+Tlow.
why the first one did not work?
If only R2 varies, Thi varies but also the period, T does. And the amount of change may not be enough to rate it as a duty-cycle change. Or at least, it may not be that distinguishable.
what is the role of the diodes?
is there a formula for this?
For the modified circuit (the one with diodes), the diodes determine which portion of R1 will be taken into account during charging and discharging of the capacitor, C:
- During charging, D2 will be forward biased and D1 will be reverse biased. So only the left-side portion of R1 (let’s call it R1a) will be used: Thi=ln2⋅(R2+R1a) CThi=ln2⋅(R2+R1a) C.
- During discharging, D1 will be forward biased and D2 will be reverse biased. So only the right-side portion of R1 (let’s call it R1b) will be used: Tlow=ln2⋅(R1b) CTlow=ln2⋅(R1b) C.
The period is:T=Thi+Tlow=ln2⋅(R2+R1a) C+ln2⋅(R1b) C⇒T=ln2⋅(R2+R1) C T=Thi+Tlow=ln2⋅(R2+R1a) C+ln2⋅(R1b) C⇒T=ln2⋅(R2+R1) C
And the duty cycle is:D=Thi/TD=Thi/T
As can be seen from the last two equations above, the duty cycle varies with the position of R1’s wiper because T remains constant.
what is this mode called?
I don’t know if it has a specific name. But still, it’s an astable oscillator.ShareCiteEditFollowFlaganswered 1 hour agoRohat Kılıç10.3k33 gold badges1717 silver badges3737 bronze badges
- 1My friend , thanks a lot , now i get it . its a very clever trick , and this makes sense for why the duty cycle can goes below 50% wish is not possible in a simple astable mode – Haythem Ltifi 1 hour ago
- The OP is not happy of the standard NE555 astable, because it is not easy to independently adjust frequency and duty cycle.
- There are two types of NE555 modules in the market. The expensive one uses different sets of resistor pair values for different range of frquencies. The cheap one uses minimal resistors and only a narrow range of frequency can be set.
- Actually both of the above two version does not use the improved versions using two diodes.
- And all version using NE555 are analog devices and therefore not precise compared to digital PWM controller/signal generator (I will talk about it later)
- My main aim here is to explain why the OP’s improved diode version is good. I read about a variety of improved diode versions. Below is one by Electronics Tutorials. This version has an explanation. So I am mentioning it here, to complement the already selected, very good answer, make answers of this question more complete.
ShareCiteEditDeleteFlagedited 1 min agoanswered 28 mins agotlfong011,97611 gold badge77 silver badges1313 bronze badgesAdd a comment
Leave a Reply