Timer 555 vs. Micro-controllers at Long Timing Applications (hours): Technical Overview & Tips

Islam Negm (Mr.Bit)
6 min readOct 17, 2016

--

There was a question on a group that I’ve been following on Facebook. The question was highlighting a critical application for the famous timer 555.

The question was:
“ If I’ve a load that I want to turn it on for 8 hours and off for 16 hours, is that possible by a circuit based on 555 ic? and it will be for industrial environment.”

Image courtesy: amandaghassaei @ instructable.com

Short answer for the question (in my opinion) is : “NO”

In the long answer I will go through some technicalities about the timer 555 and the micro-controllers in general.

PS : all the information here are based on my opinion, I don’t clam that my answer is perfect. So, please enrich my knowledge with your precious comments :)

The Long Answer

Let’s break the question into pieces to be able to focus on every problem by itself. When I am breaking a problem to be solved, I am asking myself some questions. And here’s my questions and main headlines:

  1. Does the timer 555 support stability at low frequencies?
  2. How I can test my prototype?
  3. Engineering tip : “Do it with the lowest cost and the highest achievable quality
  4. For industrial environment, what are the precautions that should I take?
  5. Other solutions?

Timer 555 and Low Frequencies

If you’ve checked how the timer 555 work you’ll find that it works in two modes, of course we’ll stick with the “astable mode” that doesn’t have stable state (also known as square wave mode) as we are going to repeat ourselves.

Astable mode operation timer 555 — Picture courtesy : 555-timer-circuits.com

As we know the timer 555 timing is based on an RC circuits. So, technically I didn’t find any papers or sources that limits the lowest frequency. But I will elaborate why it’s a hard thing to determine this.

1. The R & C tolerances

The first problem in timing the timer is the RC tolerances, in best cases if you’ve used metal film resistors and good capacitors with very low leakage currents.

You’ll have at least ±0.1% factory tolerance add to this the non-linear value change with temperature. So it’s always a wise habit to not to deal with changing quantities with temperature (the industrial environment can change in temperature a lot).

2. The capacitor leakage current

The leakage current is an indication of the insulation resistance. The insulation resistance is expressed as a parallel resistor with the capacitance.

So if you’ve an ideal capacitor, you’ll have the insulation resistance is infinity, and the leakage current = 0. But this isn’t the case in real life. The leakage current will try to discharge the capacitor, so if the charging current isn’t enough -which is the case by the way when you use timer 555 for large intervals, you seem to use larger resistors-. This will make it impossible for the timer to reach the 2/3 volt to switch the state of the output wave.

3. Power of timer 555 is interrupted = time reset

If the power cable for the timer circuitry is interrupted for some reason, you’ll find your self restarting the whole timing process, which is very frustrating!

4. Cost of circuitry & frequency division

If we’ve managed somehow to find the proper components with accepted tolerances and leakage currents then managed to isolate it from the effect of temperature. The question is “How much will it cost?”.

Let’s say if I’ve managed to make the timer 555 to output square wave of 1/600 Hz (T= 10 min), this means that I need something like frequency divider.

The frequency dividers that can be used are:

  1. Binary counters, not decade ones
  2. T flip-flops

As I will divide the frequency by 2 at each stage, this means that I want about 96 divisions or (binary bits). This means that I will use 96 T-flip-flops(12 Octal T-flip-flops) or (12 binary counter).

It’s cumbersome to do all the connections and worse when making the payment!

5. Testing time = 16 hours

If you’re planning to test you circuit, I think you’ll spend the worst 16 hour of your life. You’re torturing yourself to test it? Come on!

From all the above problems, it’s a very wrong decision to depend on the timer 555 to do this job for you.

Solutions?

Yes, there’re lots of solutions using the micro-controllers, you can use one of these small and low cost micro-controllers:

  1. PIC 10F200 / PIC 12F675
  2. ATiny 4 / ATtiny 25 /45/85

I will post some tips to consider.

1. Basic solution: using delays and some while loops

You can go simple as programming delays with the largest time you can type (always set by the parameter type

2. Nested loops

If can’t make it up for big periods just use nested loops, as nested loops are multiplied in each other. Ex:

for(i=0; i<300;i++)
for(j=0; j<200; j++)
// code will be executed 200*300 times

3. Use low level assembly code

Write the program using simple assembly code that the supplier will provide, this will make you able to calculate the time of loops overhead and calculate how exactly every line will take to execute. This is the power of assembly code!

More Robust solution

If it’s up to me to do this project I will use the lowest cost microcontroller that have both ROM and RTC (Real Time Clock) interface protocol and just program it and I will not worry about the precision and the power interrupts, yes It might be costy compared with the microcontroller solution, but it worth it!

RTC Real Time Clock and EEPROM DS3231 AT24C32 Module with SPI Interface

More Tips to Consider When Designing for Industrial Environment

You should take care when you’re designing your circuits for the industrial environment

1. Good ventilation & dirt immune

You can choose a box that has good holes and ventilations in the right angle that will not make the dirt and sand pass with ease.

2. Vibration immune

If your circuit will be fixed on a vibrating surface (maybe near a rotating motor), you should double check that your connections won’t be lose if the circuit is vibrating.

You can use damping balls that’re used in damping the vibrations in the FPV (First Person View) cameras.

Vibration damping balls

3. EMI (Electromagnetic Interference) Shielding [will be updated]

I don’t have any time to write this section, so it will be updated soon.

Summary

We have talked about the inappropriateness of using timer 555 for large periods of time. And we have discussed the suitable microcontroller based solutions. And in the last sections is about tips for industrial environment circuit design.

If you’ve any comments or feedback, please write it down in the comment section :). I am looking forward to read your precious comments.

Alsalam Alaikom

--

--

Islam Negm (Mr.Bit)

Software Engineer (Developing , Electronics, Embedded, Linux , Git, js, python).