# 555 astable operation not getting stable frequency

I needed a 38 kHz wave no matter the shape. So I started off with a 555 timer to produce a 38 kHz rectangular wave using its astable mode. Here's the circuit:

For that I used R1=9.8kohm, R2=17.6kohm, and C=820pF. At the beginning, the frequency I measured was right at 38.2 kHz but as time passes by the output frequency started scaling up for as much as 2 kHz. I mean, the frequency increased by 2 kHz in less than half an hour. I tried to change the type of the capacitor just to make sure that the capacitor was ok. But I didn't get a constant freq. either. Maybe it's with 555 timer that makes it behave like that?

• Have you checked that no components are getting hot? Are you sure that your frequency meter is stable? Is Vcc stable? Jan 26, 2017 at 20:04
• @dirac16 power supply? I don't even know – most capacitors are rated for 20%, 10% or, best-case, 5% tolerance. 2 kHz of 40 kHz error is actually 5% – so I'd simply say, "your circuit is operating within the expected accuracy. Move on." Jan 26, 2017 at 20:45
• @MarcusMüller nice idea. But I want it outdoor. I want to modulate an IR LED. So it's for communication purposes. I can't use it there! Jan 26, 2017 at 20:45
• @dirac16 ... that is a crucial information. I added it to the question. Jan 26, 2017 at 20:47
• @dirac 16 Do you have a decoupling capacitor directly between the power and ground pins of the 555. .1-.01uF should do.
– RoyC
Jan 26, 2017 at 22:07

If you're building an oscillator for communication purposes, C-charge based oscillators won't do – aside from a very few speciality devices, capacitors are rated for 5%, 10% or even 20% tolerance. So I'd say your circuit operates well within the physical boundaries of what your components offer.

I'd strongly recommend just getting something that has a trimmed internal oscillator – that something might actually be an 38 kHz oscillator, or, even simpler, a microcontroller generating 38 kHz with e.g. a PWM unit. This option sounds twice as reasonable considering that when communicating over IR, you most probably already have some digital logic!

• even though it may have some tolerance the capacitance should not change. But why does the frequency keep jumping up and down? The inly thing that can change the frequency in my circuit is the capacitance. Do you mean its capacitance changes a little bit during operation? Jan 26, 2017 at 20:56
• Probably, or your resistors heat up, or, also possible, the silicon die heats up and changes the characteristics Jan 26, 2017 at 21:20
• No, nothing has got hot yet. I just replaced the cap with a tantalum one. I see the same thing. It increased by 1 Hz in less than 5 mins. Quite strange Jan 26, 2017 at 21:25
• 1 Hz is an accuracy of 25ppm. That's what a good quartz-based oscillator achieves. Really, settle your expectations. Jan 26, 2017 at 21:27
• I want to let the circuit be on till tomorrow. Then I will check to see where it gets to. I don't expect it to go far beyond 42 kHz. Jan 26, 2017 at 21:31

May be a shot in the dark, but could this be due to dc bias on the capacitor lowering its capacitance? You say you tried changing the type of the capacitor. Did you change it something other than ceramic - such as a film capacitor, which experiences less effect from dc bias?

• NP0/C0G ceramic capacitors are often good choices for your amount of capacitance as well, and are often rock solid. If you're using a Y5U dielectric capacitor the dc bias effect is more likely. Jan 26, 2017 at 20:38
• I am using a ceramic cap. I don't have a film cap in my stock. Instead, I used a 1 uF Tantalum cap just to observe that how it would behave. Does it have any advantage over the ceramic cap? Jan 26, 2017 at 21:11
• Tantalums shouldn't have any dc bias effect. If you saw a similar increase in frequency over time with the tantalum as the capacitor, then dc bias is unlikely to be the issue. Jan 26, 2017 at 21:33