2
\$\begingroup\$

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.)

\$\endgroup\$
13
  • 4
    \$\begingroup\$ 10% deviation seems very reasonable for such an ancient low-accuracy device. \$\endgroup\$
    – StarCat
    Nov 2 '20 at 18:49
  • 5
    \$\begingroup\$ Keep in mind that the 555 is a "precision" timer, but that's "precision" compared to other 1970's technology circuits. \$\endgroup\$
    – TimWescott
    Nov 2 '20 at 19:18
  • 1
    \$\begingroup\$ @Justme Sorry about that. Ti NE555 ti.com/lit/ds/symlink/ne555.pdf \$\endgroup\$
    – Parker
    Nov 2 '20 at 19:28
  • 4
    \$\begingroup\$ 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. \$\endgroup\$ Nov 2 '20 at 19:38
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Fredled
    Nov 2 '20 at 22:05
10
\$\begingroup\$

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.

\$\endgroup\$
5
  • \$\begingroup\$ 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. \$\endgroup\$
    – Parker
    Nov 2 '20 at 21:42
  • 1
    \$\begingroup\$ 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 \$\endgroup\$ Nov 3 '20 at 9:27
  • \$\begingroup\$ 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? \$\endgroup\$
    – user253751
    Nov 3 '20 at 11:59
  • \$\begingroup\$ 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. \$\endgroup\$ Nov 3 '20 at 17:26
  • \$\begingroup\$ After lots of digging. Would a PWM controller (LTC6992) work for this? I want to maintain the 54% duty cycle. \$\endgroup\$
    – Parker
    Nov 3 '20 at 18:38
4
\$\begingroup\$

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.

\$\endgroup\$
-2
\$\begingroup\$

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.

\$\endgroup\$
8
  • 3
    \$\begingroup\$ 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. \$\endgroup\$ Nov 3 '20 at 4:01
  • \$\begingroup\$ @Ken Shirriff 10 Volts +/- 1 is still 10% tolerance, which is bad even though that Voltage is produced by the resistor ratio! \$\endgroup\$ Nov 3 '20 at 4:43
  • 1
    \$\begingroup\$ Alex, the timing is independent of the three 5K resistor values, only the ratios matter (assuming Vcc is held constant during the timing cycle). From this site, with annotation added. \$\endgroup\$ Nov 3 '20 at 9:52
  • \$\begingroup\$ @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? \$\endgroup\$ Nov 3 '20 at 16:23
  • 1
    \$\begingroup\$ The ratios are such that the typical accuracy is +/-1% and the worst case is +/-3%. According to the datasheet. \$\endgroup\$ Nov 3 '20 at 16:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.