Author Options:

Circuit for digital time control Answered

In my design classroom project, my students want to build a 230V AC electric immersion heater (for heating water in a bucket) whose duration of heating the user should be able to set.
The user should be able to set the ON duration by pressing up- and down- keys (operating 2 switches) to increase or decrease numbers that show on a dual 7-segment display (for showing 1-99).
The numbers that show in the 7-segment display is the time in minutes the heater should stay on for and then switch itself off.

Please guide me to a circuit that would do the above. All our induction cookers, washing machines, etc have this interface, I know this is not something new, but not being an electronics person I don't know where and with what terminology to look.

Please help.



2 years ago

1. At least in the Uk students wouldn't be allowed to do a project with mains wiring.

2. Mains can and WILL give half a chance kill you, the user and or the student.

3. That said a simple electronic way to do this is to build a 555 timer circuit


drive a suitable relay from the output.

I found this by googling 15 minet 555 timer. You will find many more if you do the same.

If your electronics experience is so low you asked the question I would respectfully suggest that your skill level isn't high enough to do this safely either yourself or with students. Be warned! (retired teacher)

Jack A Lopez

2 years ago

You're right. In my previous reply, I did understand what you had written, but I think I get it now.

I think things like this exist, but they are hard to find, harder depending on where you live. I tried looking for it using Google(r) Images. I am guessing at the words for its likely name.

I don't know its true name. Guessing, "digital energy saving turn off timer"

Or something like that.

If you were to build the whole thing, like, from components, it would probably wind up looking something like this project:


To me, it seems like the most complicated part is the timer, and the buttons for setting the countdown time, and the display for seeing the same.

A kitchen timer,
is a gizmo that counts down some number of minutes, e.g. 1 to 99, then sounds an alarm.

Those are pretty easy to find, and cheap. I mean, I can find those for sale in the town near where I live. Not sure about the rest of the World.

In Hollywood movies, kitchen timers like this are always attached to bombs, because, you, know. Drama. ;-P


Anyway, I imagine it is possible to modify a kitchen timer, with some extra circuits, so does something non-violent, and useful, like turning OFF a relay when it is done counting down.

You know, building the thing that way, you don't have to know how to program microcontrollers. You just have to have an understanding of analog signals, and transistors, and relays, and stuff.


2 years ago

So full_ON counting down from a 1 through 99 entered time units be they seconds or minutes then_shut_off. Of course a micro-processor will easily do it..

Wire two CMOS serial / parallel 4 bit counters together with the buttons and two 7 segment drivers... Use a 555 timer to count down to zero and stop an SSR

Solid_State_Relay on zero carry

Jack A Lopez

2 years ago

If you have a mechanism for switching an electrical load on or off, this can be used as a way to control power dissipated by the load.

Sort of a naive approach is to say, let us turn the load on and off periodically. That is turn it on, for D*T seconds. Then turn it off for (1-D)*T seconds.

This number D, is called "duty cycle", and it is a number between 0 and 1, so that the total cycle time, on and off, is T = D*T+(1-D)*T


So that seems simple enough, and we kind of expect the power dissipated by the load to be proportional to D.

Although for AC power it becomes a little bit more complicated.

The usual kind of switch used for AC loads is a triac, if you need to turn the load on and off quickly; e.g. once every half-cycle, which is 1/100 s, or 1/120 s, or 1/(2*f) where f is the frequecy of your mains power, typically 50 or 60 s^-1.


A relay could be used as the switch, if the switching is slow, e.g. with T measured in several seconds, or 10s of seconds. Of course the trouble with relays is they make clicky sound when they turn on, or off, and after some number of on-off cycles, the contacts will wear out.


Although for an educational project, maybe you want something that turns on and off slowly, and audibly, slow enough so a human can notice it.

In contrast, triacs are kind of tricky. The tricky thing about triacs is that when you turn them on, they stay stuck on, until the line voltage goes to zero. For this reason, triacs are only used with AC power.

You can learn more about how triacs work, by reading about lamp dimmers that use triacs, for example, see figures (2) and (3) on this page,

The usual trick for a lamp dimmer, is to trigger the triac once every half-cycle, for to turn on for part of the duration of that half-cycle. Firing the triac early, gives close to 100% power. Firing the triac late, gives close to 0% power.

I found a graph, in this pdf,
that shows the relationship bewteen a phase angle, (0 degrees being totally late, 180 degrees being totally early) and RMS voltage seen by the load.

That same pdf includes a circuit diagram with a microcontroller (Microchip(r) brand PIC), with two up-down buttons, for switching a triac, for dimming a lamp for this kind of control.

The actual code that makes that micro work, can be found here,

By the way, the reason this kind of control, triggering the triac once each half-cycle, is used for lamp dimming, is because that is the fastest possible way to turn the triac on and off. If the timing were slower than this, the visible appearance of the light would not look like dimming. It would look like flickering, or like on for several seconds, off for seconds off for several seconds.

Note that an electric heater does not have to be fast. If you want to, you can command your triac to turn on for an integer number of half-cycles (by repeatedly triggering it early), and off for some other integer number of half-cycles (by repeatedly not triggering it). In fact doing it that way, would certainly make the math easier. E.g. on for 20 half-cycles, off for 80 half-cycles, corresponding to D=0.2, or on 20 percent of the time.

ranjit_kJack A Lopez

Answer 2 years ago


Thanks, but you might have misunderstood my need.

The water-heater we are looking to build is a 230V coil that is immersed in water in a bucket (see image). The water might be that required for a bath (we have no piped hot water) or for drinking (our houses gets untreated water at their taps, have to boil it to decontaminate it suitably for drinking, sort of like pastuerisation). Depending upon the bucket size, we heat the water for around 15-25 minutes. The problem is that we get busy in doing other things and sometimes forget to turn it off after that period, often to find it evaporated below the danger mark on the heater. So we use the alarms on our mobiles to remind us. We just want that the device be smart enough to turn itself off, that's all. Auto-off versions of the product are not available in the local market.

So we are not talking in AC-cycle-duration but much longer and not frequent switching but a single OFF action after a specified duration.

water heater.jpeg

Answer 2 years ago

You get them with temperature control like those:


or in the simple form like these:


where you connect your own heater to it.
Sorry, but I fail to see the need for time control if for sterilisation the temp is important...
Even if all fails you can get timer modules and temp control gadgets like the above quite cheap over Ebay.
Depending on your location postage might be a pain but should be possible....


2 years ago

$% timer off Ebay in sieries with the heater will do just that....


Answer 2 years ago

Sure, I realise that, and thanks for pointing me to Ebay. Since this is an educational project, I did want circuits built from scratch to know how the electronics in these timers operates. But thanks.