home |  electronics |  toolbox |  science club |  tuxtalk |  photos |  e-cards |  online-shop


By Guido Socher


24h timer with web interface



Timers are present everywhere. Many industrial control systems needs timers. Your heating system might have one where you can define when to change between day and night profile. Sometimes you might just want a simple timers to switch on/off the lights of the Christmas decoration.

What ever it is, a generic timer is useful for many things. This timer has a web interface. You can program it with a few mouse clicks. Because it is web based you can change the timer remotely whenever you have an internet connection. Even from your smartphone.

_________________ _________________ _________________


What it looks like

The 24h Timer has a "calendar like" user interface. It is a table and you can click onto the table fields. When the field is green then the timer switches it's output on at that time. A field that is not green means output off. To select or unselect multiple fields you can click and drag with the mouse.

The smallest time interval on this 24h timer is 15min.

Here is a simulation of the user interface. Just try it!

Simulation of the 24h timer

To apply the changes you would enter a password and press on "save". Only that would activate any changes made to the table.

24h Timer
Screenshot of the 24h Timer web interface.

Using it from the phone

Traditional mobile phones, even if they have a built in web browser, do often not have a mouse cursor. You can therefore not select or activate fields in the table. All recent smart phones (iphone or any android phone) can be used. You just touch the table fields with your finger.

the 24 hour timer on a smart phone
The 24 hour timer on a smart phone (samsung with android)

Manually changing the output

The 24h Timer has the possibility to attach a push button to the tuxgraphics ethernet board. By pressing that button you can manually switch the relay on or off.

Via the web interface you have as well the possibility to manually overwrite the timer.

The manual overwrite does not switch the timer totally off. It just changes the state of the relay for the moment.
Example: You have selected in the table that the output should be on from 14:00-16:00 and from 17:00-18:00. If you switch the output manually off at 14:30 then the output will be off until 17:00.

manually changing the output
Web interface to manually change the output of the timer (change the state of relay temporarily).

The hardware

The software will run on a tuxgraphics ethernet board with an atmega328p or an atmega644/atmega644p. Older boards with atmega88 or atmega168 are too small for such a big and complicated table.

circuit diagram: relay and optional push button
Circuit diagram with external connections: relay and optional push button. A LED can be attached to pin PB1 and it will blink with a frequency of 0.5Hz. If you want to see the state of the relay then connect a LED with resistor in parallel to the relay coil. The power supply connections for the ethernet board are not shown here. 5-6V DC and at least 0.2A is a good choice for the power supply. Look for an old mobile phone charger. Many of them provide voltages in that range and more than enough current. Those mobile phone chargers are usually compact and easy to get.
Click on the image for a PDF version.


Continuous power

In many places around the world the power grid is quite reliable and will almost never fail. In the rare event that the power fails you have to go around the house and set all clocks again. This is valid for devices like stoves, microwaves, VCRs,... and this 24h Timer.

The 24h Timer can however be powered temporarily from a battery. This way you can bridge power outages that last just for a few hours. If the ethernet board is equipped with a traditional voltage regulator then it will consume the same amount of current no matter the supply voltage. It will need about 170mA. If you equip it with a switched voltage regulator such as the Recom R-783.3-0.5 then it will need less current the higher the voltage is and the regulator will not get warm. At 9V DC the board will consume less than 70mA. A 9V block battery will be able to handle that for about 5-6 hours.

They wiring of such a setup with a battery buffer would look like this:

circuit diagram: 9V battery buffer
The 24h Timer battery buffered. The ethernet board must be equipped with a Recom R-783.3-0.5 switched voltage regulator. Click on the image for a PDF version.

The battery buffering is optional. It is not required if you are happy with the reliability of your power grid.  


Here a few photos of the 24h timer

front view
Front view

back view
Back view, case open

I used an old mobile phone charger as power supply for the ethernet board. It's the little black box on the right besides the ethernet board. The relay is the small black item in the middle. The north american power socket on the left is the output.  


© Guido Socher, tuxgraphics.org

2011-03-19, generated by tuxgrparser version 2.57