loading

This is an arduino based repeating cycle timer. The times are set in the sketch and cannot be modified during operation.

It is durable, reliable, simple and cheaper than a comparable unit.

This relay is rated for 10 amps. The relay will melt if you exceed the maximum load. a space heater, water pump or large fan will draw more current and should be used carefully.

Step 1: Arduino Repeat Cycle Timer

The parts list:

Arduino: 26$

http://www.canadarobotix.com/arduino-microcontroll...

1 Channel Relay: 5$

http://www.canadarobotix.com/mechanical-switches/1...

Project Box: 6$

http://www.walmart.ca/en/ip/lock-lock-800-ml-recta...

Re-purposed Xbox 360 cord: Free$

Cable Grip: 2.5$

http://www.digikey.ca/product-search/en/cables-wir...

Jumper wire kit: 13$

http://www.digikey.ca/product-detail/en/bud-indust...

Outlet: 1$

https://www.lowes.ca/building-supplies/electrical/...

I've used some risers for the relay and rigged my own risers for the Arduino from a Windex bottle straw and some nuts and bolts

Step 2: Install Into Box and Wire

i'd like to make a fancy wiring diagram with http://fritzing.org/home/ and add it here but....

The 12v wiring is

3.3v to VCC

Gnd to gnd

Pin 2 to IN

For the 120 v I've included a image of how I've wired the relay. you just run the common wire into the centre of the relay and then connect the N/C (normally closed) side of the terminal block to the outlet.

maybe ill update my Instructable with some diagrams in the future but for now this is what you get.

first I used a drill and file to create a hole for USB port and dc barrel jack to fit

second I marked the arduino's holes on the bottom of the project box for the risers to go into.

I've used a lighter and hair dry to soften the plastic when reaming or threading any holes to avoid the plastic cracking

I've also used a lighter the soften the risers into the plastic

I've also added a few air holes to allow heat to escape the box and used the cord grip to secure the power source the relay will get hot

I then used my dremel to cut the lid of the box to allow the 120v outlet fit.

Step 3: The Code

Here is the code

Change the offTime and onTime values to adjust the cycle times they are in milliseconds here's a link to a converter

https://www.google.ca/?ion=1&espv=2#q=minutes%20to...

I have plagiarized this code from other arduino projects and it works. the other project included multiple simultaneous functions and inputs this one does not.

I am aware of the the option to use delay instead of complex timer values and math.

<p>Great project. I really like the project box. For safety I might break the Black &quot;HOT&quot; cable through the relay instead of the White &quot;Neutral&quot; </p>
<p>what difference would it make ?</p>
For safety reasons and I would change the normally close to the normally open connection and change the program with the inverse times as well
<p>As someone who went to school to become an apprentice electrician, NEVER EVER switch a neutral. There is a good chance that if something goes wrong, YOU WILL DIE as the hot is still energized. </p>
<p>you will not die i'm a power engineer and i've been shocked enough times</p>
<p>It would make a difference between &quot;DEAD or ALIVE&quot;!!!!!! If you brake the &quot;neutral&quot; the &quot;HOT/black&quot; is still alive, and if you are gounded to something &amp; touch that lead/black = DEAD YOU ARE!!!!</p>
<p>I think a 5v switched 120v solid state relay would be better for longevity and you could get a higher output capicity </p>
<p>Re: &quot;what difference does it make?&quot;</p><p>In the USA, it's the convention and required the National Electrical Code. </p><p>It's doubtful these low cost relay modules meet any electrical standards.</p><p>The below info is from a medical source. Skin resistance does play a roll. </p><p>1 mA;<br>Barely perceptible </p><p>16 mA; Maximum current an average man can grasp and &ldquo;let go&rdquo; </p><p>20 mA Paralysis of respiratory muscles </p><p>100 mA; Ventricular fibrillation threshold </p><p>2 A; Cardiac standstill and internal organ damage </p><p>15/20 A; Common fuse breaker opens circuit</p>
<p>This is an awesome Arduino timer.</p>
<p>This would be a really cool way to make a simple automation system.</p>

About This Instructable

4,326views

55favorites

More by fahking:Precision Arduino 120v Incubation Temperature Controller / Thermostat Arduino Repeat Cycle Timer 
Add instructable to: