Uncategorized

555 timer notes

555 Timer duty cycle changing formula

Ask QuestionAsked todayActive todayViewed 85 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?
enter image description here

555motor-controllermathduty-cycleShareCiteEditFollowFlagedited 14 hours agoasked 14 hours agoHaythem Ltifi2144 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 14 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 14 hours 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 14 hours 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 14 hours ago
  • Now can you please help me? – Haythem Ltifi 14 hours 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 14 hours ago    
  • @tlfong01 I don’t know why the cheap DC dimmer modules use a relatively complex circuit. – Spehro Pefhany 13 hours 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 13 hours 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 13 hours 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 13 hours 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 13 hours ago 
  • 1@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 12 hours ago   
  • 1/ 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 12 hours ago   
  • / 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 12 hours ago   
  • 1@ tlfong01 by OP you mean the 555 timer its not an op as far as i know?? xD well this is a simple and cost efficient method 555 are the way to go . if fact my goal is to control a 400 w motor that consumes almost 10 A , i made a circuit with a power mosfet and it work , i just wanted to know why it works not just , ah it works . – Haythem Ltifi 5 hours ago 
  • @Haythem Ltifi, (1) Ah, “OP” means the “Original Proposer” of this question. (2) Yes, my interest is to know (a) Why it works? and (b) How it works?. (c) Can it work better? Now in your research, you found two diodes can work better. I was also very mad some two years ago I found it difficult to independently adjust frequency and duty cycle, and after some research, I also found that two diodes can solve the problem. That is why I appreciate your question to inspire other 555 newbies weeping in the dark can hear your good news and share of joy of playing with the 555 toy! 🙂 – tlfong01 14 mins ago   
  • Just 2 comments on your using DPDT and NPN BJT to control 400W, 10A motor. (1) DPDT switching 10A would cause huge back EMF and EMI, needs big Shottky flybacks and perhaps MOV to absorb energy. (2) Using BJT with big Vce(Sat), say 2V, would waste energy (2V * 10A) = 20W. (3) You might try (a) power N-channel MOSFETs, eg IRL540N with very low R(on) on resistance of order of mΩ to save energy. (4) I have more suggestions on (a) using cheapy power MOSFET H-bridge eg BTN7970B, (b) cheapy digital precise, remote (UART) control PWM/sig gen instead of amateurish, old school NE555. / to continue, … – tlfong01 19 secs ago   Edit   

Add a comment

2 Answers

ActiveOldestVotes1

For a simple astable oscillator Thi=ln2⋅(R1+R2) CThi=ln⁡2⋅(R1+R2) C and Tlow=ln2⋅(R2) CTlow=ln⁡2⋅(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=ln⁡2⋅(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=ln⁡2⋅(R1b) C.

The period is:T=Thi+Tlow=ln2⋅(R2+R1a) C+ln2⋅(R1b) C⇒T=ln2⋅(R2+R1) C T=Thi+Tlow=ln⁡2⋅(R2+R1a) C+ln⁡2⋅(R1b) C⇒T=ln⁡2⋅(R2+R1) C 

And the duty cycle is:D=ThiT=1−R1bRtotal      ; Rtotal=R1+R2D=ThiT=1−R1bRtotal      ; Rtotal=R1+R2

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.ShareCiteEditFollowFlagedited 9 hours agoanswered 14 hours 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 14 hours ago

Add a comment0

Question

  1. The OP is not happy of the standard NE555 astable, because it is not easy to independently adjust frequency and duty cycle.
  2. 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.
  3. Actually both of the above two version does not use the improved versions using two diodes.
  4. 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)
  5. 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.
enter image description here

ShareCiteEditDeleteFlagedited 12 hours agoanswered 13 hours agotlfong012,00411 gold badge77 silver badges1414 bronze badgesAdd a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.