555 timer

AlmightyJu

Joined Oct 14, 2011
20
Hi guys,

I'm trying to create a circuit that will eventually run a stepper motor at 33 RPM or 45 RPM (a turntable!) via a switch so I need a frequency of 26Hz and 36Hz. from what I have discovered (and also through the use of a simulator):

26Hz = R1 = 1K, R2 = 13K
36Hz = R1 = 1K, R2 = 9.5K

and through the simulator it works fine, but if I use a 9.5K res and 3.5K in series the voltage at C2 is 0 I'm guessing its a program problem? I haven't got any of the bits yet to physically build it so I cant check, but does this look ok to you guys?

On a side not the switch is a 3 position one and on one position I want to completly cut the power but I dont know a way to lay it out to work as a power cut and timing change :/

Thank you

Attachments

• 49.6 KB Views: 52

#12

Joined Nov 30, 2010
18,224
1) it's a program problem.
2) I think you'll need a 2 pole switch to do power with one pole and timing with the other.

In addition, if you leave C2 unconnected, the voltage could drift. You should install an intentional leak across C2 to make sure it drifts towards ground. and yes, you will have to allow more current in the timing resistors to make up for the intentional leak...or wire up your 2 pole switch so C2 isn't left unconnected.

SgtWookie

Joined Jul 17, 2007
22,230
555 timers are not all that accurate; maybe within 2% even after you've set the initial frequency.

Components in a simulator are "ideal" - they are exactly the values that you tell them to be. Real world components have tolerances. Capacitors are frequently off by a considerable margin.

You would be better off to change values on the R1 side, as you will have better resolution. R1 only affects timing when the cap is charging, the resistors below pin 7 have current flowing through them both when the cap is charging AND discharging.

You are better off to use small values of capacitance and large values of resistance than the other way around. Smaller caps tend to be more accurate, and they are certainly available in smaller sizes. Resistors' physical sizes don't change much unless you need higher wattages.

AlmightyJu

Joined Oct 14, 2011
20
1) it's a program problem.
2) I think you'll need a 2 pole switch to do power with one pole and timing with the other.

In addition, if you leave C2 unconnected, the voltage could drift. You should install an intentional leak across C2 to make sure it drifts towards ground. and yes, you will have to allow more current in the timing resistors to make up for the intentional leak...or wire up your 2 pole switch so C2 isn't left unconnected.
Hmm, I lost you with "the voltage could drift", what exactly is drifting voltage, or do you know of anywhere I can read up about it? I'm assuming that leaving a cap charged after disconnecting the power causes it and using another resistor is just to drain it?

SgtWookie - would you say the way I have it now is a relatively accurate way?

SgtWookie

Joined Jul 17, 2007
22,230
No, I wouldn't say the way you have it now is a relatively accurate way.

For one thing, have you tried to buy a 2uF capacitor? How about 9.5k or 3.5k Ohm resistors? Those are non-standard values, so if you can even find them they will be quite expensive.

Here is a page that has a decade table for standard resistor values:
http://www.logwell.com/tech/components/resistor_values.html
Refer to the E12 (yellow) and E24 (green) columns. You can use the other series, but you'll find that the E48 and higher will be more expensive than E24 and lower.

Another item is that you are switching R4 in series with R2, or just leaving R4 by itself. You will make it a lot easier on yourself if there are two separate paths for R2 and R4.

Have a look at the attached schematic & simulation. Instead of using 2uF for the timing cap, I'm using 100nF (0.1uF); this is a standard value, extremely common (every IC needs at least one 0.1uF/100nF cap across its' power pins), and available in very small sizes. You should have a number of them on hand if you wish to build more circuits.

You will also notice that all the other values are standard as well; they will be very easy to find.

I used a SPDT switch for R1/R3; they have separate current paths. I suggest you use the pots as I noted on the schematic; otherwise you won't be able to 'fine tune' the output frequency.

I suggest that you use metal film resistors; they are less "noisy" than carbon film resistors. Avoid plain carbon resistors; they will shift over time. If they are carbon film, thick-film or thin-film they will work OK.

C2 should be as close to the power and ground pins as possible; it is a supply bypass capacitor. C3 is also a supply bypass cap, and it should be within about an inch of the timer supply pins.

Attachments

• 139.3 KB Views: 30

#12

Joined Nov 30, 2010
18,224
Capacitor drift, explanation:

In your first drawing, the speed switch simply leaves C2 connected to an INPUT for the "off" condition. The chip is still powered, so the question becomes, "Is current flowing in or out of the input pin?" and so, will the capacitor be full or empty after several hours of waiting for you to come back to the project and connect the timing resistors? You have left the capacitor in an undefined condition.

Without even looking, I'm sure Wookie has shown you how to avoid this trap.

SgtWookie

Joined Jul 17, 2007
22,230
Without even looking, I'm sure Wookie has shown you how to avoid this trap.
I just used a SPDT switch, and moved the time-select resistors and switch to the high side of pin 7. That way it's not possible to leave the timing cap without a current path, except when the contacts of the switch are "in flight" for perhaps 100mS.

AlmightyJu

Joined Oct 14, 2011
20
Its shocking to see how much ... neater... your diagrams are! I've got a fair way to go. But I had a suspicion the cap's and res's would be odd sizes.

I've only got a couple of questions

Am I right thinking using a cap as a "supply bypass capacitor" is the same as using one as a decoupling capacitor just a different name? ( I have read about them)
Why a polarized 100uF cap? - and also why do we need 2 caps as bypass caps?
How come C1 doesn't go straight to full charge because from how I read the circuit its connected to the main 5V in or is the positive side on the bottom?

Edit: so I found out its a polarized cap because of its size, but why do we need such a big cap?

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Its shocking to see how much ... neater... your diagrams are!
I started doing this a few weeks before you did. Seriously though, it comes with practice. Also, note that I'm using a 555 timer symbol that I created specifically to make schematics like this easier to draw and understand. Typical 555 timer symbols leave much to be desired. Pins 2 and 6 are most frequently wired together, so why would one create a symbol that had them on opposite sides? And since the discharge pin is almost always used to discharge the timing cap via a resistor, why not place it above pins 2 & 6 where it'll be convenient?

I have no clue why they put the control pin on the left side for yours; that makes no sense at all. Whomever made that symbol must have had a very different use for it in mind. I suggest that once you get familiar with your schematic program (Multisim?) that you either find or create a 555 timer symbol that is more like the one I have; you will find it much easier to make neat timer circuits with it.

Note that I'm using "power rails" in this schematic; the supply is on the left, and then basically the ground goes straight across along the bottom, and the positive rail goes straight across the top - although I had to locate the switch, R1 & R3 above the positive rail to keep it from getting too cluttered. If a schematic is much larger than that, I'll simply start using ground symbols and V+ or Vcc node labels so that I don't have power wires running everywhere. Using symbols for power/ground helps to eliminate "clutter" and makes a schematic much easier to grasp quickly.

I've got a fair way to go. But I had a suspicion the cap's and res's would be odd sizes.

You can also use that decade table for caps, but just use the E6 (salmon color) columns. Capacitor value selection is quite a bit more limited than resistor values. You might see lots of values that are of the higher E-ranges listed on a vendors' website, but odds are very good that they won't have any stock of those parts.

I've only got a couple of questions

Am I right thinking using a cap as a "supply bypass capacitor" is the same as using one as a decoupling capacitor just a different name? ( I have read about them)
Yes. There's a "sticky" thread in the General Electronics Chat forum that uses both names.

Why a polarized 100uF cap? - and also why do we need 2 caps as bypass caps?
If you look in the LM555 datasheet, you will find that for bypass caps, a 0.1uF/100nF and a 1uF or larger are recommended. This is because the 555 momentarily shorts the supply when it changes states. If the caps are not present, you'll have LOTS of noise on your supply, and the circuit will actually be radiating broadband RF noise due to the inductance of the wiring.

The small 100nF/0.1uF cap should be ceramic, poly metal film or other poly-type cap. The larger cap can be aluminum electrolytic.

The idea here is that the small capacitor takes care of the really high frequency transients, and the large cap takes care of the low frequency transients. They each have their own functions. If you just use one, you'll likely have problems.

I showed 100uF because that's the least I'd recommend. You can use larger if you wish.

How come C1 doesn't go straight to full charge because from how I read the circuit its connected to the main 5V in or is the positive side on the bottom?
I'm not showing the start-up waveform; I had the simulation run for 1.1 seconds, but only save the data occuring after 100mS. This was to ensure that the frequency was stable so the FFT display would show the frequency accurately.

Initially, the low side of C1 is pulled to +6v. This sends the output (pin 3) low until C1's low side has discharged to ~1/3 of Vcc, or about 2v. Since the R1/R3 resistors are so much larger than R2, having C1 start off at 6v helps the frequency to stabilize much more quickly than if it started off at 0v and had to charge via both R1/R2 or R3/R2.

Edit: so I found out its a polarized cap because of its size, but why do we need such a big cap?
Because the 555 shorts out the supply for an instant. Having a large cap there helps to assure it won't drop much.

John P

Joined Oct 14, 2008
2,026
My memory is that the very best turntables* used to have alternating black and white marks around the edge, and there would be an optical system that read the marks and used a phase-lock loop circuit to control a d.c. motor. But for most of us, a dumb old synchronous motor was good enough.

I can't say that a stepper seems like a good way to get perfectly smooth constant-speed rotation. Maybe if the rotating table is very very heavy?

* Or at least, the ones whose manufacturers made the very best efforts to impress people.

AlmightyJu

Joined Oct 14, 2011
20
Initially, the low side of C1 is pulled to +6v. This sends the output (pin 3) low until C1's low side has discharged to ~1/3 of Vcc, or about 2v. Since the R1/R3 resistors are so much larger than R2, having C1 start off at 6v helps the frequency to stabilize much more quickly than if it started off at 0v and had to charge via both R1/R2 or R3/R2
So a non polarized cap can switch its positive and negative sides while its on depending on the current flow?

I can't say that a stepper seems like a good way to get perfectly smooth constant-speed rotation. Maybe if the rotating table is very very heavy?
Its not particularly heavy, I've just got a stepper motor lying around so thought I would use it. getting a smooth speed seems tricky, I've just done loads of reading and it doesn't seem very easy. I've got a plain brushed dc motor on the way so i'll see how well that works. Finding the right motor for a cheap price seems quite hard!

SgtWookie

Joined Jul 17, 2007
22,230
So a non polarized cap can switch its positive and negative sides while its on depending on the current flow?
Perhaps you misunderstood me; the polarity across C1 never changes. When power is first applied, the capacitor is completely discharged; there is 0v across the plates; when Vcc goes to 6v, the capacitor is still discharged (0v from one lead to the other); the upper plate pulled the lower plate along with it. So as weird as it sounds, pin 7 now starts pulling the low side of the cap towards ground... normally, this would be discharging the timing cap (when one terminal is grounded) because the potential across the cap is decreasing - but in this case, the cap is actually charging.