Introduction: Timer With Preset Durations Using a 555

This simple project is useful if you are just tinkering and learning electronics. I use a 555 integrated circuit (IC) to create a timer with three presets: 4, 6 and 10 minutes. There are many tutorials and YouTube videos of the 555 timer in a one-shot, monostable configuration, but most of them show a single duration, or it being varied by a generic potentiometer which is fiddlesome to be able to change the durations and still be reproduceable. So, I wanted to demonstrate something simple, but with easy reproduceable timing options. I know there are many inexpensive timers one could buy that are much more accurate than this one, and every smart phone has a timer app on it, but I wanted to make my own that was quick and convenient and that did not rely on a microcontroller. I put the device on a perf board, but if you want to test it out, I will include a picture of the same set up on a solderless breadboard. The device is not absolutely precise to the second, but fairly close and good enough for my intended purpose.

How I use the device: Putting eggs into boiling water for six minutes will give you soft boiled eggs where the yolk is still liquid (yum). Boiling eggs for ten minutes is enough for hard boiled. Sometimes I want both, where I set the timer for six minutes, take out the eggs I want for soft boiled and plunge them into cold water, and reset the timer for another four minutes to hard boil the remaining eggs – hence the three present durations.

How to operate: On the right side, there are four male header pins and if you use a jumper connector to connect an outer pin to the centre pin, you are selecting one of the preset durations. When powered on through the slide switch, the buzzer will start up, so you have to press the reset button to start the timer. This turns off the buzzer, but turns on the LED to indicate it is working. When the time runs out, the LED turns off while the buzzer sounds continuously until either the reset is pressed again to re-start the timer, or the device is turned off.

Supplies

Components

  • 555 timer IC
  • Battery Holder for four AA batteries
  • 4 NiMh AA rechargeable batteries
  • 5V active buzzer
  • LED (I used green, 3mm)
  • 100 nanofarad (nF) ceramic capacitor
  • 220 microfarad (uF) electrolytic capacitor
  • Slide switch, single pole (single throw, but mine was double)
  • Tactile pushbutton
  • 1 kOhm resistor for the LED
  • 10 kOhm resistor for the pull up resistor for pin 2
  • Resistors for the timing: 120 kOhm x1, 300 kOhm x4, 820 kOhm x1
  • Jumper connector x1
  • Male header pins x4
  • Perf board (3cm x 7cm)
  • Hook up wire to make the connections
  • M3 screws (x2) with a nut and lock washer each

Tools

  • Soldering iron and solder
  • 3mm drill bit and drill
  • Crazy Glue or equivalent
  • Wire cutters/strippers
  • Hobby knife, pliers and file (optional, only if you want to trim the edges off the board)
  • Solderless breadboard and jumper wires (optional, only for prototyping)
  • Multimeter (optional, very useful for checking voltages, resistance, capacitance, and connections)

Step 1: Putting the Circuit Together

The basic configuration of the 555 in this device is a monostable circuit, which I will briefly review in this paragraph. There are 8 pins on the 555 timer (see picture). Basically, when the slide switch is turned on, the output pin (pin 3) of the 555 starts low, meaning zero volts. The cathode (-) of the buzzer is connected to the output pin, and the anode (+) side of the buzzer is connected to the positive voltage of the battery. This means that current flows through the buzzer and the output pin, so the alarm is immediately on. When the button is pressed, this gives a low signal to the trigger pin (pin 2). This causes the output pin to switch to high, which turns off the buzzer, and the timing begins. This high voltage on the output pin also means that current will flow to the LED through 1000 Ohm resistor to ground. So, the LED will be lit up when the device is on but the buzzer is not sounding. The timing capacitor (220 uF in this case) should initially not have an electrical charge. However, this capacitor now will charge through some resistors (see next section) and as it does so, the voltage of the capacitor increases. When the voltage in the capacitor reaches 2/3 of the battery voltage, the threshold pin (pin 6) will also be at 2/3 of the battery voltage. This causes the 555 timer to toggle the output pin to low and the buzzer is on again to signal the end of the timer. The capacitor discharges through pin 7. The buzzer stays on until either the device is switched off, or the button is pressed to restart the timer which immediately starts again.

When making the device, centre the perf board to the battery holder and to determined where the two M3 screws will go to mount the perf board to the underside of the holder. Widen these two holes with the drill enough to accommodate the width of the screws. For aesthetic reasons, I cut the edges of the board off by scoring straight lines through the outer rows/columns of holes several times, then breaking them off with pliers. These edges were filed to remove an sharp edges. Knowing where those holes will be, place the components on the board, keeping in mind which component connects to which to make the connections as straight forward as possible. When you are pleased with the layout, solder the components and the connections as per the circuit diagram.

Since the four header pins were not in a line, you can Crazy Glue the single pin to the centre pin of a group of 3 pins. Then solder them to the correct place on the board. Gluing them just gives that one pin a little more support.

There is a 100 nF ceramic capacitor right below the 555. This connects the control volts pin (pin 5) to ground. It may not strictly be necessary, but since I have many of these capacitors, and it could help with consistency of the timer, I included it.

Step 2: Modifying the Duration of the Timer for Your Own Use

The duration of the timer depends on the capacitor and the charging resistor(s). The general formula is:

Time = 1.1 * R * C

Where R is the resistance in Ohms, and C is the capacitance in Farads (so my 220 uF capacitor is 0.00022 F).


In my device, I use several resistor combinations for R, to get the preset timing. These combinations are selected with the position of the jumper connector and the configuration of the 4 male header pins on the right side of the board. The central pin is connected to the positive battery voltage (through the on/off switch). The bottom pin is connected to three 300 kOhm resistors in series, which add to 900 kOhm. So, if I connect the center and bottom pins with the jumper connector, the timing is theoretically:

              Time = 1.1 * (900 000 ohm) * (0.00022F)

              Time = 217.8 seconds

                       = 3 minutes and 38 seconds

The header pin on the right is connected to a 300 kOhm and 120 kOhm resistor, which then connected to the three 300 kOhm resistors mentioned above. This gives a combined 1.32 MOhm (MOhm = megaohm = million ohms) of resistance. So, if the centre and right pins are connected, the timing is theoretically:

              Time = 1.1 * (1 320 000 ohm) * (0.00022F)

              Time = 319.4 seconds

                       = 5 minutes and 19 seconds

Finally, the top header pin is connected to an 820 kOhm resistor, which is then connected to all five resistors mentioned above. This gives a combined 2.14 MOhm of resistance. So, if the centre and top pins are connected, the timing should be:

              Time = 1.1 * (2 140 000 ohm) * (0.00022F)

              Time = 522.7 seconds

                       = 8 minutes and 42 seconds

 You will notice these calculated timings all fall short of the actual desired times. However, when the device is first switched on after being off for a long time, the duration is longer than the subsequent timings if the timer is reset over and over. Eventually it will stabilize at a fairly consistent duration closer to what I calculated. Thus, the resistor values I use are to accommodate for this longer first run of the timer. For example, if I set the device for the “6 minute” timer, power it on and immediately press the reset, I get 6 minutes and 8 seconds. And that is pretty consistent each time for the first run. However, if I then immediately reset the device after this first run, I can get 5 minutes and 45 seconds. And a third run might be a little faster again, but it will become very consistent, ending within a second on every successive run. So since I typically only use the device a single time and put it away for another day. I settled on resistors based on that first run. I am not sure why the first run is longer, I tried to see if the IC or other components warms up with use and therefore changes the timing, but I wasn’t able to prove that to myself. I wondered if one of the pins, or the capacitor starts at a different starting electrical charge level with repeated trials. However, I wasn’t able to show that either. It would be nice if it were ALWAYS the same duration but how it works right now is pretty close to the 4, 6 and 10 minutes I wanted, and is good enough for boiling eggs.

If you want to create this timer with your own presets, I have included pictures of the circuit on a breadboard. The yellow jumper wire that goes across the breadboard is used to select the total resistance for charging the timing capacitor and thus selecting the duration. Start with a capacitor and calculate the required resistance. Since there is a larger variety of resistors to choose from compared to the number of capacitors it is easier to start this way than to start with a known resistance and calculate a needed capacitance. Then use the following re-arranged equation to calculate the resistor for your selected time.

R = Time/ (1.1 * C)

This formula is useful as a starting point to determine where to start. Basically, if you want the timer to be longer or shorter, then you can experiment with the charging capacitor and resistor(s). The higher the capacitance of the capacitor, the longer it takes to charge up. The larger the resistance of the resistor(s), the less current that passes through them to the capacitor, then longer (slower) it takes for the capacitor to charge up. A reminder that resistors in series (connected end to end) means the resultant resistance is additive, but if the resistors are in parallel (all one side of the resistors connected together, and the other sides all connected together) and the resistance is less. The opposite is true for capacitors and their capacitance. I have previously published an Instructable on using an Arduino to time the duration of the 555 timer which can be found here. It is useful if you are experimenting with different resistor-capacitor combinations, and testing repeat reliability. If you want to try this but want more precise timing, I suggest using a multi-turn potentiometer and after adjusting it to get the time you want, glue the potentiometer dial in place so it does not change over time. Or you can include the potentiometer in series with combinations of resistors to have presents, and the ability to alter the duration. You would have to fiddle with the potentiometer and an accurate timer, exactly what I wanted to avoid when I made this, but then you would not be limited to three durations. Lastly, there is a limit to the length of time you can select if you want it to be reliable. If you try for a really large resistance, and the capacitor leaks current, then the leakage may be as fast as the charging current which means the timer will never reach the 2/3 threshold.

Step 3: Conclusion

Well, that is the device. I included a video of attaching the perf board to the battery holder, and testing the 4 minute timer. You can see it is within seconds. It was a nice project to make as it is always rewarding soldering up a little project, and allows me to do other things while cooking eggs. I did end up putting a piece of tape over the timer because it was pretty loud. I don’t want my neighbours to think a fire alarm is going off, but it is nice to know that I can remove the tape if I want a loud alarm.

If you have a question, please leave a comment. Also, if you know why the timing is slower the first time around, please let me know. I would love to understand why. Otherwise, thanks for reading.