This is a nice and simple versatile on/off timer built around atmel microcontroller Atmega 328 chip.
As the name suggests, it is very versatile timer with N number of applications you can think of.
It can be used to,

  • Switching lights in your house on and off (to deter thieves) when you are away
  • Controlling your garden lights,
    Switching your Air Conditioning on and off Or Room heater On/Off
    It can also be used to control the temperature of electric ovens, irons, barbeque or even your soldering iron...
    I am using it to control my humidifier in the room and the barbeque temperature in the garden.

This circuit does not contain any temperature sensor but still it does the work of maintaining a fairly constant temperature of electrically operated heaters/coolers by switching them on and off at regular intervals which is of course programmable by the individual user.
Once the system is on and programmed and started.. it continuously shows the time remaining (in seconds) in current mode, updated every second.

Max Delay : 12 Hours
Min Delay : 1 second

The timer operates in 3 modes
1) INITIAL -- This is the time for which the relay will be in ON state when you run the timer first time.
2) OFF -- This is the time for which the relay will be in OFF state.
3) ON -- This is the time for which the relay will be in ON state

so the relay always cycles as following sequence

INITIAL --> OFF --> ON --> OFF --> ON --> OFF --> ON --> . . . . . Indefinitely

Are you thinking where is this INITIAL mode useful??
In case of using it for Barbeque ..
When you switch the barbeque grill on.. it does not heat up immediately.. Mine takes around 4 minutes to heat up to full. so I set INITAL to 4 minutes and OFF to 40 Sec ad ON to 15 Sec to get a controlled heat..

PROS: There are no up and down and Plus and Minus buttons as I have tried to keep it very simple to operate. There is only one white knob(Rotary Encoder) on the top of the instrument which does the all work for me.

CONS: I don't see any.. you tell me ;) I am all ears...

What will you need ?

Here you go...

A)The list of the materials/tools needed is as follows:
wooden sheets 2mm thick 12x12 inches -- 2 numbers, Hack saw blade, a ruler, Drilling machine with 3mm , 5mm bits, a pencil, eraser, sand papers (one fine and one medium grit), P.C.B., 25w soldering iron, soldering wire, wire cutter, a plyer, glue, glue stick and gun

B) Components needed for making PCB:
A copper clad, Ferric chloride powder, PCB drill with drill bits 0.8mm and 1mm, a glossy photo paper, monochrome laser printer, a pair of hand gloves, soap water, scrubber

C) Electronic components needed for making circuit:
IC Atmega 328p - 1 no
IC LM7805 - 1 no
Ic Base 28pin - 1 no
Diodes 1N4001 - 3 nos
Resistors 10k, 2.2k all quarter watt - 1 each
Capacitors 1000/35v, 1000/25v - 1 no
Ceramic disk capacitor 22pf - 2 no
Ceramic disk 0.1uf - 1 no
Crystal 16MHz -1no
Rotary Encoder (with integrated push switch) - 1 no
5pin PCB connector male & female - 1 no
40 pin break-away header(Male) - 1 no
Solid state relay rated@ 240VAC 20Amps - 1no
16x2 LCD display module(Oriole) - 1no
Transformer 9-0-9/500mA - 1no
Copper clad (approx. 4x2 inches) - 1 no

Step 1: PCB Layout

Making PCB for the circuit is the first step. I am not going to teach you here about how to make a PCB as you must be knowing it. The PCB layout is attached in the file timer.pcb which is designed using Express PCB software.
Just print the PCB layout on any glossy photo paper using a monochrome laser printer and transfer the layout on to the copper clad using the old trick of hot Iron(used for pressing clothes) and then etch the PCB using Ferric Chloride solution and you are done.

Step 2: Mounting Components on the Board

Now solder the components on the PCB . The completed circuit looks like Figure 3
except Atmega IC.. as it needs to be programmed

Step 3: Programming Your Arduino

Connect your arduino board to the computer , load the attached program into the microcontroller using Arduino IDE 1.6

Step 4: Device Assembly

After uploading the program into the microcontroller, take out the IC and put it into the IC base of the PCB shown aside. Fit the LCD using the break away header pins as shown in the photo. Notice the angle in which pins are bent for the proper fitting of LCD board over the one we made.
Assemble the complete circuit and test it by powering it ON.

Step 5: Fitting LCD in Case

The photos aside shows.. how to fit the LCD in front panel of the box.
I recommend to not to glue it to the box.
The rectangular slot cut in the wooden sheet should be so perfect that the LCD fits very tightly in it.

Step 6: Box Making

Cut the wooden sheets as per your requirement of size of the box.
I have made the box of size wxdxh , 11x12x8 Cms
Keep some holes in the box for heat dissipation due to SSR and transformer.

Step 7: Electrical Connections Inside Box

See how the complete circuit is fitted inside the box with all the electrical connections secured tightly.

Step 8: Ready to Go...

The wooden box is finally brushed thoroughly using a very fine sand paper and then coated with clear varnish spray to give it a good look.
Now the device ready for the operation...

Step 9: Stay Tuned..

Watch this video for detailed operation.... Thanks

<p>I like to put the controller up in the ceiling to control the exhaust fan. In case of power failure, I have to climb up to the ceiling to reset the controller. Is it possible to save the setting so that the unit start with the same setting every time in case of power failure ?</p>
<p>Hi there..<br>There are two ways to achieve what you need.</p><p>A) Install a battery backup (lipo) with a charger module so that when the power goes out it not just retain your settings but it keeps on running the cycle as programmed.<br>B) This is easier method which does not need any additional hardware.<br> You can modify the code and make it work as follows<br> After switching ON the power to this timer, if there is no attempt made to program it for (say ..2 minutes for e.g.) it should enter the DEFAULT mode where the code will automatically take the defaulted ON and OFF periods and start automatically.<br><br>does that solve your problem?<br> <br> </p>
<p>Hi Temp512 .. <br>See my another instructable.. &quot;Garden sprinkler controller&quot;<br><br>The thing which you needed is added in this program..</p><p>Cheers!!</p>
<p>pls tell me encoder swtich interfacing which pin connected to arduino</p>
<p>If you look at the PCB layout , you would understand it .. but its ok.. see the attached image here.</p>
<p>You did not mention but perhaps the 3 legged chip (that looks like transistor) is a voltage regulator of kind.</p><p>You got misspelled &quot;Rotory Encoder&quot; perhaps RotAry Encoder.</p><p>However perhaps using potentiometer could be much simpler - because Arduino has analog inputs.</p><p>Also for having exact time intervals you could use RTC clock module - also that module ca give the timer exact time in the date to tun on - like 17:50 (5:50 PM) .</p><p>You could mention that the SSR might be overkill for some projects - if the grid is 220Volts then it is 220*20=4400Wats that is more then a oven in full power - all hotplates and all the heaters in the oven - if 110V then 2200Wats like some powerful hotplates - I would probably use it to switch a blue/red lamp for plant grow which is most of 10-100Wats. However the price of SSRs are drastically low for 1-5Ampers - like 2 dollars or so. </p><p>Good job thou. It is not for baginner in Arduino.</p>
<p>Hi dear, Thanks for pointing out the typos.. I will correct those.</p><p>I missed out the regulator IC LM7805 ..now added.</p><p>Well, potentiometer instead rotary encoder- Nope. It just complicates the design more.. The timer has 3 modes and 9 settings total Initial (Hr, Min and Sec), On(Hr, Min and Sec), and Off(Hr, Min and Sec). and this goes in succession on each press on encoder. So now imagine I am using pot instead of encoder.. Pot can turn to max may be 290 degrees and then it freezes. Consider I have set Initial timer as 0, 0 and 45 Secs. Now for going to next mode I will require one more button to press, even after that I have left the pot somewhere halfway rotated already so now it reaches the next mode i.e. ON time Hour set up. It will not display &quot;0&quot; I would need to rotate it back to starting position to make it read &quot;0&quot; Is it user friendly? I don't think so. Thus encoder adds lots of simplicity here.</p><p>Power consumption? it is not a killer... I did not understand your calculation of 220*20 one..Why do you multiply that? what is 20 ? is it Amps ? to get power wastage?? then I am afraid your formula doesn't seem right to me.<br>SSR uses optocouplers and a zero crossing detectors inside. So basically it requires very low voltage and current to trigger it. maybe in Microamperes..<br>and furthermore High wattage SSR allows me to use this device to control big current eater monsters like Barbeque grills and room heaters or Air conditioners without any problems. <br>My main motto here is to reduce current consumption of this device to few mA.<br>I am going to modify this device later to make it work on a battery backup(Lipo) so when the power is interrupted when it is running... it does not loose the settings..<br>But anyways... thanks for your reply. cheers..</p>
So you are using rotary encoder that has an integrated switch - I have none of those and I expected that there is no such encoders.<br>Sorry about that.<br>The power formula is Voltage of the grid (i.e. 220V or 110V) * (The current SSR switches) 20A = Wattage of the consumer that can be safely switched on and off.<br>That is why I pointed it is a overkill for some applications - like switching a LED lamps or activating motors or so...<br>Thanks for the instructable.
<p>That's neat :) We should make one for our humidifier!</p>
Thanks !!
<p>Nice, I did a similar project as a part-time alarm clock as I work 3 days a week. </p>
Hmm.. intetesting TinyT2.. I would love to see your project..send me the link please
<p>In Swedish only. Maybe you can use Google translate. Sorry for that. </p><p><a href="http://elektronikforumet.com/forum/viewtopic.php?f=3&t=81388&hilit=+deltids" rel="nofollow">http://elektronikforumet.com/forum/viewtopic.php?f...</a></p>
<p>Very nice work. There is only one tiny snafu: your LED screen still reads &quot;SYSTEM ON&quot; when it's in the OFF state.</p>
Slight confusion... but that is obvious..<br>It actually does not show the current state of the connected appliance..<br>It just means that the &quot;system&quot; meaning the controller is functional now i.e. &quot;on&quot; and it is cycling through on and off as per the program... <br>I did not put any LED to show the on and off state as I wanted the apparatus to consume as low power as possible.<br>If you noticed.. I have also taken care that the backlight of LCD is also switched off once it is programmed and started running..<br>But I liked your observation.. :)
<p>Nice project.</p><p>Suggestion: Expand it to produce a full-fledged chess clock.</p>
Thanks dear.. I will consider your suggestion
<p>Thanks Kavish.. </p>

About This Instructable




Bio: I am an electronics engineer and electronics is my first love. I have been dismantling all sorts of gadgets right from my childhood just to ... More »
More by Amardes:Garden Sprinkler Controller Arduino Controlled Versatile Timer/controller 
Add instructable to: