Adjust the Duty Cycle of the 555 Timer without Changing the Frequency

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone its Jason from skinny research and development today what we're going to do is take a look at a better way for the triple five timer to control the duty cycle of a signal now if you're unfamiliar with a triple five timer or the triple five timers ability to control duty cycle of a circuit I have two videos in the past you can go watch right now and catch up there's a quick review when we talk about the duty cycle of a signal what we're talking about is the amount of time that signal is on versus the amount of time that signal is off in this case you can see the duty cycle is roughly 50% 50% of the time it's all and 50% of the time it's off now in the last video when we talked about controlling the duty cycle of the triple 5 timer what we did was we set up the circuit so that we held the pulse going high to the same amount of time so this pulse was always on for the same amount of time but in between the pulses we used a variable resistor to vary how often that pulse was off so if we turn that variable resistor one way we would increase the amount of time that these pulses were apart and the other way would decrease the amount of time now this accomplishes the task of changing the duty cycle because when these pulses get closer together the duty cycle increases when these pulses get further apart the duty cycle decreases the problem is though is that we are changing the frequency of the signal or how often these pulses occur so what we would really like to do is hold the same time between where the pulses are starting so that this time value is always the same therefore the frequency would always be the same what we want to change is how often are say how long this pulse is on so where this pulse drops we would like to take and say increase this and drop it here so we have a duty cycle of only 75% or decrease this to here so that we have a duty cycle of say 25% but the frequency when these pulses coming on that interval always remains the same that way we always get a constant frequency but we're changing the duty cycle so it's been over a year since my last video but they were gonna take a look at a circuit it does just that I've got the same paper bag ready it's always so let's take a look at the subject here's our triple five timer chip we have our eight pins pins 1 2 3 4 5 6 7 8 so the first thing we want to do is to fill out the four corners with ground and power where they need to be so pin number one should go to ground pins four and eight should go to your power source in this case we're going to use a nine volt power source finally pin five the voltage control pin will go to ground through a capacitor and we'll call this capacitor c2 for a lot of my projects with a triple five timer I use a capacitance of point zero to two micro farad's for the voltage control pin now I start putting some timing components the first thing is going to be resistor between eight and seven this is going to be r1 and now we're going to draw on the portion of this that makes it unique for an a stable timer off of r1 we're gonna put in a diode off the other side of the diode we're gonna put in a potentiometer the third leg of the potentiometer we're gonna have it come up this way next we need to put in another diode finally we're going to round this out by adding another resistor here and we're gonna call this resistor r2 off the middle leg of this potentiometer we're going to take and run a line over and around it looks kind of awkward because I just need this space to go to do this and this is going to hook into pin six on the triple five timer but not all by itself because now we need a capacitor coming off of pin six this is your timing capacitor and it's going to be called c1 and it goes to ground finally we just to make sure that we hook the comparator pin here up to this pin six over here so pen two it needs to go to pin six so I'm just going to represent that by drawing a little box here indicating that pin two should go to six and pin six should go to two so just imagine there's a line drawing all the way over to the other side you're gonna see a lot of similarities to the last video and how to control the duty cycle of the triple five timer the diodes are the same we still have a timing resistor we have a timing capacitor but there is a small variation and it's with this potentiometer here so remember in order to make this work like the triple five timer and get the characteristic square wave out of the output we have to charge this capacitor up and then we have to discharge this capacitor in order to get that square wave output the way this is going to work is bringing it current flow through this a non volt source down through this resistor is then going to flow over this direction because it can't flow through the chip yet because this transistor is turned off so it's going to flow through this direction and then head this diode path it won't go this way because this diode is set up to block conventional current flow in that direction so current will flow this way it will hit this potentiometer it will then flow down this path through this direction over to here and begin to charge up c1 our capacitor as it's charging up the output here will be high as soon as this charges up to two-thirds the value of the source which is nine volts it's then going to discharge back the opposite direction because this transistor is going to turn on so all the voltage that it's built up into c1 will then flow back out of the capacitor down this line this way to this potentiometer and then instead of flowing this branch it's going to flow through this branch it will pass through r2 and then down seven and out to ground so the current flow you just saw might not mean much to you but let's look at an example so let's say I have a waveform here and with a triple five timer you have a high and you have a load the high is governed by something we're gonna call t1 and the low the amount of time the lower zone is governed by a value we're gonna call t2 the amount of time that this waveform is high is directly equivalent to the amount of time it takes this capacitor to charge up to 2/3 the voltage stores so that charge time is governed by any obstacles in the way between this non volt source and this capacitor so in this case the things in the way are r1 this potentiometer and the capacitor so we can write that as a formula and all this formula really is it's just a variation of what you're gonna find in the triple five time or datasheet so in this case T 1 equals 0.693 R 1 plus the resistance of the potentiometer times C 1 in case you've never seen a potentiometer before what you have is a component with dial and three pins so this potentiometer is a 50 kilowatt in geometry I have the dial directly in the center then what happens is this branch of the circuit sees 25 killer homes and the other branch of the circuit can this way sees 25 kilo ohms if I turn it all the way one direction then one side of this branch will see 50 kilo ohms the other side of this branch will see absolutely nothing so the rx here all depends on how you have this dial turned but we're still going to be able to figure out the frequency of this output with this formula here we'll just continue on I'll show you what I mean so we have the formula here for how long it takes to charge this capacitor now let's look at how long it takes to discharge it to discharge this capacitor we're saying how much stuff is in the way of this capacitor discharging in this case we have to consider the capacitor itself we come back through here we have to consider this potentiometer and then we have to consider r2 r1 is not in the way because it's over here and so the current will just flow straight through to seven and go to ground and just to help things out I'm going to label this potentiometer here we're gonna label this side of potentiometer is X as we did in the formula and this side as our Y so in this case T - it's going to equal 0.693 this numbers from the datasheet this is going to be x in this case R 2 plus R Y and all of this is going to be multiplied by C 1 so if we want to achieve a certain value of T 1 or T 2 we can plug in these formulas and we can get those values that we're looking for then we can adjust potentiometer and as we adjust the potentiometer it will adjust the duty cycle and to kind of show you that let's just plug in some numbers so in the circuit I'm going to show you in a minute t1 equals 0.693 [Music] color Hertz or 10 kilo ohms I should say let's assume that the potentiometer the 50k potentiometers the dial is turned completely in towards the direction to allow t1 to see all of the resistance so we'll say 50 K and this is all multiplied by C 1 which in my case is 820 picofarad this is all equal to roughly 35 point 3 microseconds now t2 once again the formula is going to be a lot of the same I'll use a different color here 0.693 times r2 in this case which in my circuit is going to be 10k so I have 10k for r1 and 10k for r2 so I thought turned that 50k potentiometer completely in one side so that t1 is going to see all of the 50k ohm resistance of that potentiometer then that means the other side of it I won't see anything so this is going to be zero ohms for the t2 side of things so on the discharge path that means that there's no resistance left so when it comes back this direction there is no resistance that's being seen here and then we multiply it by the capacitance value for c1 this comes out to a time - five point six eight microseconds now to figure out the total frequency all you need to do is to take the total time here which is T equals 1 plus T 2 this is going to equal approximately 41 microseconds and if we go 1 over T we can get the frequency and that will equal a little more than 24 kilohertz point of this video was to show you that with this circuit we can change the duty cycle but also keep the frequency the same so really if we turn this potentiometer what will happen is that let's say we turn it half way now this becomes 25k and this 0 down here becomes 25k because the dial is in the center but when you do all this math and you add it back up you're gonna find out that the time still stays around 41 microseconds if you turn the dial so that this becomes 50 K and this becomes zero well now you'll see that all you've done is you've just switched these two formulas around the time will still add up to 41 microseconds and the frequency will still be 20 point 24 kilowatt so when you put this potentiometer in the circuit what happens is that these two times will always add up to 41 microseconds now what's happening though is you are changing the charge time you are changing the discharge time and so this waveform these two rising edges are going to remain in the same spot however this falling edge will float down this way when it takes more time to charge or it will fall back behind whenever it takes more time to discharge so let's take a look at the actual circuit so here's the circuit the triple five timer is here we have a little jumper going from six to two four corners we've got nine volts on the control voltage pin ground on pin 1 the capacitor here is for the voltage control pin and then at the top is feeding nine volts from this little yellow jumper here the two resistors are both 10k apiece and then a potentiometer here that is at 50k two general-purpose diodes or you can use Schottky diodes it might be a little bit more helpful either want to work and then the eight hundred twenty Pico farad capacitor so show you how this works I'm gonna adjust the potentiometer here on the circuit and then show you on the o'the scope what it looks like right now you'll notice that the duty cycle is roughly fifty percent and we have our waveform there and it says it's coming in at about twenty nine kilohertz so pretty close to what we calculated I have the rising edge marked on the O scope so I'm gonna go ahead and turn the potentiometer and what you'll see is that rising edge stage roughly in the same spot but you can see now that our duty cycle is going up to eighty four point eight percent it won't go to a hundred percent because we do have those 10k resistors kind of keeping that from occurring but if I go to the other direction you'll see it goes to the left and those pulses get smaller but the frequency and say here still remains the same so now we're down to seventeen eighteen percent duty cycle and then we can go back to fifty by pulling the dial halfway and right back you'll notice that there's a small variance in the frequency that seems to happen when you're playing with this circuit it will vary a bit to both sides so you do get that when you turn it through but the frequency is stable and you're able to adjust the duty cycle perfectly and also in the last video we talked about how this could be a type of pulse width modulation and you could increase or decrease a DC voltage value by taking the average of that pulse so multimeter is hooked up right here you can see right now it's at 50% duty cycle we're at 3.8 volts and if I adjust this one direction we can go as high as six point two remember we can't achieve 100% duty so it's not going to go up to its full voltage as when we go to the opposite direction and drop it down it won't go all the way to zero either it goes to one point three volts so we have a bit of a way of varying the DC voltage you can do some interesting stuff with LEDs hopefully this tutorial has been helpful for you I know after looking at the comments last time and seeing some of the questions about being able to hold the frequency solid that changed the duty cycle I kind of wanted to find that out myself and so this has been kind of a fun thing to put together if you have any ideas thoughts or questions just leave them in the comments below and once again thanks for watching [Music] [Applause] [Music]
Info
Channel: Skinny R&D
Views: 31,639
Rating: 4.9358025 out of 5
Keywords: 555 Timer, Electronics, Frequency
Id: Q5tcf1pYZRc
Channel Id: undefined
Length: 14min 47sec (887 seconds)
Published: Sun Jun 17 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.