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.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Arduino Repeat Cycle Timer
The parts list:
1 Channel Relay: 5$
Project Box: 6$
Re-purposed Xbox 360 cord: Free$
Cable Grip: 2.5$
Jumper wire kit: 13$
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
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.