2

This is a problem I have been slowly chasing down.

At first I was using 10% caps that caused the poor output accuracy. After changing the capacitor to a 1% I thought the problem would be fixed, but it was not fixed.

enter image description here

Here is the circuit ignore values because they are old.

Important values:

  • R1: 649 1%
  • R2: 3.24k 1%
  • C1: 10nf 1% (12063A103FAT2A) (ceramic)
  • f = 1.44(R1+2R2)C1
  • Pw = .693(R1+R2)C1

After plugging all of this in I should get (mathematically) f = 20kHz with Pw = 27u (the values I want.)

In reality I get f = 18kHz and Pw=28us.

This value is completely unusable for the application.

I considered the surrounding circuit to possibly cause issues so I breadboarded just the 555 circuit. This circuit obtained exactly the same f and Pw as the one on the PCB.

After some more digging I found that a small R1 could be the problem. I added two pots to the breadboard and picked some random R values. Then checked f and Pw vs the calculation and it had worse accuracy than the hand picked resistors. (I understand the pots could be the reason they were more wrong.)

Is there anything I am doing wrong? Is there a better solution for this?

I have a uC controlling other things, but I want to keep it isolated from this circuit because the load is a flyback circuit (20kV.)

JRE
  • 67,678
  • 8
  • 104
  • 179
Parker
  • 439
  • 3
  • 11
  • Which specific 555 version/model you have? Can you link to a datasheet? Although, I am not entirely sure if word precision applies to any 555 circuit. – Justme Nov 02 '20 at 18:46
  • 4
    10% deviation seems very reasonable for such an ancient low-accuracy device. – StarCat Nov 02 '20 at 18:49
  • Sorry this is the ne555 – Parker Nov 02 '20 at 18:57
  • There are better ways to get close to 50% duty-cycle from a 555 which don't require small 'R1' values, but do typically require a CMOS 555 variant. Even these however are not likely to give 'precision' results. – brhans Nov 02 '20 at 19:05
  • @Parker NE555, but from which of the dozens of manufacturers of NE555? Is that the exact part number or does it have more letters to specify the part even better? – Justme Nov 02 '20 at 19:15
  • 5
    Keep in mind that the 555 is a "precision" timer, but that's "precision" compared to other 1970's technology circuits. – TimWescott Nov 02 '20 at 19:18
  • 1
    @Justme Sorry about that. Ti NE555 https://www.ti.com/lit/ds/symlink/ne555.pdf – Parker Nov 02 '20 at 19:28
  • 4
    Why is there a resistor, R3, between the 12v bus and the 555 Vcc terminal? This will make the trigger threshold change depending on the output load on the 555. Try removing. – Mark Leavitt Nov 02 '20 at 19:38
  • i remember seeing a programmable 555 timer some years back ... looking for it .... here it is ... https://www.nutsvolts.com/magazine/article/february2016_CSS555TimerICs – jsotola Nov 02 '20 at 19:52
  • 1
    There are more modern and hopefully more precise variants of the 555. But they don't come as cheap (if cost is a concern). Using crystal oscillators as stated in the answers below is necessary if you need serious precision and regularity. – Fredled Nov 02 '20 at 22:05
  • Closely related to @MarkLeavitt's point, I've found unstable Vcc to cause no end of problems with 555s. I needed a crude, low-precision, monostable from the scrap parts bin for an automotive application but while Vcc was always in spec through cranking, the delay time was highly unpredictable. – Chris H Nov 03 '20 at 09:14
  • Do you need the slightly asymmetric 27us / 23us duty cycle? – Ralf Kleberhoff Nov 03 '20 at 09:21
  • @RalfKleberhoff It would be prefered. – Parker Nov 03 '20 at 16:52

3 Answers3

10

The 555 timer uses an analog RC as its timebase, but that's never going to be very stable. Even with high precision resistor (0.01%) and capacitor (10%), there is poor initial accuracy and significant drift with temperature.

There are improvements such as Analog Devices LTC6900CS5#TRMPBF, which can generate 20kHz using a single 100k resistor to determine the frequency. But this kind of device is still only about 0.1% stability, it may be ok depending on your requirements, but this kind of thing is usually targeted at very cost-sensitive high-volume applications.

Improve the timing accuracy by using a quartz crystal based timebase instead. Either a quartz crystal driven by an oscillator circuit, or a whole "crystal oscillator" component which includes everything.

For example, one solution for generating 20kHz with good stability is to use a 10MHz crystal oscillator (ECS-2200BX-100, Mouser Part # 520-2200BX-100 is +/-50ppm, 0C ~ 70C), then divide by 500 using a 74HC4040 12-bit binary counter (clear at code 0001_1111_0011). Use a bunch of 74HC86 XOR gates to drive the 74HC4040 CLR clear input when when the 74HC4040 output code matches the target code.

Each of the 74HC chips as well as the 10MHz crystal oscillator requires a local 0.1uF ceramic capacitor, within 5mm, to act as a power supply bypass. This is a commonly known construction technique that usually isn't stated in the datasheet, but is required for reliable operation.

MarkU
  • 14,413
  • 1
  • 34
  • 53
  • Alright so I'm going to be honest not exactly sure how to build the comparator with XOR gates, but I have an idea with and gates. I wanted to make sure you can simplify the code like this: XXX11111XX11 Then all you need is to compare all the 1's to each other using 6 and gates. – Parker Nov 02 '20 at 21:42
  • 1
    If you use a 10.24MHz oscillator with the 4040, you don't need any reset logic, you get a symmetric 20kHz signal from the Q8 output – Ralf Kleberhoff Nov 03 '20 at 09:27
  • 10% is a high-precision capacitor? If your capacitor has 10% tolerance then how will you ever get better than 10% tolerance for the whole circuit? – user253751 Nov 03 '20 at 11:59
  • If OP goes for the oscillator/divider solution, then it might be worth playing around with different crystal frequencies and dividers to get the best available approximation of both the 20kHz output frequency and the 27us / 23us duty cycle. E.g. a 480-divider will give nearly the desired duty cycle, but needs an (unusual) 9.6MHz oscillator. – Ralf Kleberhoff Nov 03 '20 at 17:26
  • After lots of digging. Would a PWM controller (LTC6992) work for this? I want to maintain the 54% duty cycle. – Parker Nov 03 '20 at 18:38
4

The NE555 is not great for this kind of a application, though 10% is a bit much for "typical" error. I would expect it to typically be within a few percent and maybe change a few percent more over temperature and a couple percent more with worst case timing component values. The bipolar version also draws large current surges at switching which can muck up things, for example it could interact with the capacitor on pin 5 to alter the timing. If you removed that 10nF you may get a significantly different timing.

You won't go too far wrong using a regulator, an 8-pin PIC or other small MCU and a gate driver.

Using the internal oscillator will give you 1% or 2% type accuracy on a lot of such chips.

Use a crystal or resonator to get much higher accuracy. If duty cycle is your main concern you can probably use the internal oscillator.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
-2

The reference Voltages in the 555 come from internal resistors. I doubt these resistors have 1% tolerance. edit: I mean I'm sure they don't according to the datasheet. The resistor generated control Voltage level which comes out of pin 5 on the IC and controls the threshold comparator has a range of 9 to 11 Volts where Vcc = 15V according to the datasheet.

You may want to use your own comparators and a 555 or a flip flop to create your own 555 so that you can use your own precision resistors.

Have you tried using a trimmer pot? You have to account for a 10% variation in the internal reference Voltages inside the IC.

Alex Cannon
  • 264
  • 2
  • 6
  • 3
    The 555 is designed (like many analog ICs) to depend on the ratio of the resistor values (which match pretty well on an IC die), rather than the absolute values of resistors (which have terrible accuracy on an IC). So its performance will be better than that of the individual resistors. – Ken Shirriff Nov 03 '20 at 04:01
  • @Ken Shirriff 10 Volts +/- 1 is still 10% tolerance, which is bad even though that Voltage is produced by the resistor ratio! – Alex Cannon Nov 03 '20 at 04:43
  • 1
    Alex, the timing is independent of the three [5K resistor](https://i.imgur.com/u9ylY0Q.jpg) values, only the ratios matter (assuming Vcc is held constant during the timing cycle). From [this](http://www.righto.com/2016/02/555-timer-teardown-inside-worlds-most.html) site, with annotation added. – Spehro Pefhany Nov 03 '20 at 09:52
  • @Spehro PefhanyYes that is obvious. The ratios are so bad that it produces a 10% tolerance on the Voltage output on pin 5. What is your point? – Alex Cannon Nov 03 '20 at 16:23
  • 1
    The ratios are such that the typical accuracy is +/-1% and the worst case is +/-3%. According to the datasheet. – Spehro Pefhany Nov 03 '20 at 16:26
  • @Spehro Pefhany, Look at https://www.ti.com/lit/ds/symlink/lm555.pdf . It lists the Control Voltage Level as ranging from 9 to 11 Volts from 15V supply. How can there be such a large range if the worst case is 3%? – Alex Cannon Nov 03 '20 at 16:39
  • Because it's a loose specification. I don't think I have one, but it would be interesting to measure the typical voltage. I bet it's within 1%. – Spehro Pefhany Nov 03 '20 at 16:40
  • The OP may have a part where that Voltage is nearly 10% from the typical value, which means that the ratio is not even, and that would directly affect the frequency. A design must account for the full range of values given in a datasheet! – Alex Cannon Nov 03 '20 at 16:45