This circuit is used for automating a day/night scheduled security system which, best of all, could only cost cost you $0.25 a YEAR to run. (All electricity prices based on a 2009 national average cost found here .) If you have a security system circuit you would like to run for a long time, then you probably don't want to pay more than you need to pay nor do you want to have to switch it on and off manually in order to save money and have it run at nighttime. This circuit takes care of both those problems. The circuit can be changed around to run on a daytime or nighttime schedule and is low cost to run along with the other circuit. (I'll explain how to calculate these prices of run time in the last step).
Materials differ depending on which of the two circuits you plan to build, but here are the components used by both circuits:
1x 555 timer
3x resistors (1x 470 ohm; 2x 470K)
1x non-Zener diode
various jumper wires
For the 5v relay circuit, you will need these in addition to the components listed above:
1x 5v relay
1x 12v regulator
at least 2 high rated capacitors with voltages ratings of 20 volts or above)
For the 12v relay circuit, you will need these in addition to the components listed above:
1x LM741 op amp
1x NPN type transistor
1x 12v relay
2x 65K resistors
Step 1: Building the 5 Volt Relay Circuit
Here is a series of mini steps to help build the 5 volt relay circuit. Keep in mind the higher the values of capacitors you use the better off you'll be in the long run.
Step 1. Plug the 555 timer into board.
Step 2. Apply power and ground wires to timer chip.
Step 3. Plug 5v relay (I'm using the reed switch style) into the board, applying 555 timer output to relay power and ground to ground.
Step 4. Connect pin 2 and pin 6 of the 555 timer with a jumper wire.
Step 5. Connect 470K resistor from power to pin 2.
Step 6. Connect 470K resistors from power to pin 4.
Step 7. Connect photoresistor from pin 4 to pin 6.
Step 8. Connect pin 6 to ground with jumper wire.
Step 9. Connect a non-Zener diode so that the cathode connects to the power side of the relay and the anode connects to the ground side of the relay. (This is used to keep sparking from happening when the relay turns on and off)
Step 10. Connect 470 ohm resistor from power to an open end of the switching contact. This step differs depending both on relay rating AND what you plan on switching with the relay.
Step 11. Connect LED to other open contact and ground it. This step differs depending both on relay rating AND what you plan on switching with the relay.
Step 12. Plug 12v regulator into board.
Step 13. Connect the ground of the regulator to ground and the output pin to power on the board. (Your wall source power is connected to the power INPUT on the REGULATOR.)
Step 14. Connect a capacitor from output to ground on the regulator.(Remember: Your capacitors must be rated to handle your source voltage.)(Remember: Your capacitors must be rated to handle your source voltage.)
Step 15. Connect one or more capacitors to the power side of the relay, remember the higher the rating (to an extent) the better! (I'll explain why in the last instructable step)
Step 16. If you plan on using a wall supply, DO NOT JUST GO BY WHAT THE WALL WART IS RATED!!! (As evidenced by two of the photos above) Even I didn't believe that the wall wart was immune to differences in its rating, so use a multimeter to check for the ACTUAL voltage and amperage.
Step 2: Building the 12 Volt Relay Circuit
Here is a series of mini steps to help build the 12 volt relay circuit. Keep in mind the higher the values of capacitors you use the better off you'll be in the long run.
Step 1. Plug your 555 timer into board.
Step 2. Apply power and ground wires to timer chip.
Step 3. Plug LM741 op amp into board
Step 4. Connect 470K resistor from power to pin 2 on the 555 timer.
Step 5. Connect 470K resistor from power to pin 4 on the 555 timer.
Step 6. Connect pin 2 to pin 6 on the 555 timer with a jumper wire.
Step 7. Connect photoresistor from pin 4 to pin 6.
Step 8. Connect output of 555 timer to pin 7 on the op amp and connect the op amps ground to ground.
Step 9. Connect pin 3 on the op amp to power via a 65K resistor.
Step 10. Plug an NPN type transistor onto the board.
Step 11. Connect the Emitter of the transistor and pin 6 of the 555 timer to ground.
Step 12. Connect pin 6 of the op amp to the Base of the transistor via a 65K resistor.
Step 13. Plug your 12v relay onto the board so that one of the coil pins connects to the Collector of the transistor, then connect the other coil pin to power.
Step 14. Connect a non-Zener diode so that the cathode connects to the power side of the relay and the anode connects to the ground side of the relay. (This is used to keep sparking from happening when the relay turns on and off)
Step 15. Connect one or more high rated capacitors to the ground side of the relay and ground. (Remember: Your capacitors must be rated to handle your source voltage.)
Step 16. Connect a 470 ohm resistor from power to an open end of the switching contact, then connect the LED to other open contact and ground it. This step differs depending both on relay rating AND what you plan on switching with the relay.
Step 17. If you plan on using a wall supply, DO NOT JUST GO BY WHAT THE WALL WART IS RATED!!! Even I didn't believe that the wall wart was immune to differences in its rating, so use a multimeter to check for the ACTUAL voltage and amperage. In this circuits case, if your wall source is able to turn the relay on by itself either get a regulator to step the voltage down to about 9 volts or get a wall source with a 9v output.
Step 3: Samples and Explanation of the Circuits
Now, it's time to explain how this circuit works. Our circuits' heart is comprised of a 555 timer set up as a Schmitt Trigger. This is actually the triggering opposite of the Laser Tag circuit I created and activates only when it is dark. How? By placing the photoresistor on the reset pin of the chip we create an imbalance in resistance so the chip will only be on when the resistance is HIGHER on the RESET PIN. The way the trigger and reset pins are set up creates the imbalance, where the lower resistance on the trigger pin would basically always trigger the chip no matter what. However, the reset pin is set up so that when there is light the resistance on the reset pin will be lower than the resistance on the trigger pin, thus when there is light the chip constantly resets itself and stays off. The lower the light on the photoresistor creates a higher resistance on the reset pin and thus triggers the chip to an ON state constantly. This gives the circuit its dark triggering properties. By swapping the photoresistor and jumper wire connections that branch from the reset and trigger pins, you can create a light triggered circuit that only operates in the light and shuts off in darkness.
There are also many ways of using the light/dark Schmitt Ttrigger to turn other things on, such as the relays. for the 5v relay, a nominal voltage of about 3 volts will turn it on and the output of the 555 timer is about 3 volts so the relay could be turned on and off directly with the 555 timer. However, the 12v relay needed about 9 volts to turn on and about 5 volts to hold the connection which the 555 timer ( in this case) could not produce alone, so we used an op amp and transistor to take the current and voltage up a little higher to use the 12 v relay. By using the 555 timer's output to turn the op amp on and off we could control the relay indirectly.
There were also a couple more peripheral components that made things run smoother though they were not exactly necessary. The diode, for example, was placed to keep sparking from occurring when the relay turned on and off. The capacitors were used to keep in-between voltages from switching the relay too fast and burning out the contacts. These capacitors would slow the oscillations that occurred during those in-between voltages so they were fewer than a couple hertz.
Lastly, before we talk about calculations let's talk about possibilities. The two circuits I have instructed you on are just for those applications were you either have too few volts to run something directly from the battery you use for this project or your need to separate a higher voltage than this circuit can handle. Just for a sample, the picture provided is what it would look like using the relay to switch on an external circuit, which could stand for a MOSFET switching circuit, a computer, a lamp, a microcontroller circuit (if an input use a resistor), the possibilities are nearly endless with the many things you can turn on with a relay (or MOSFET) and this circuit.
Time for calculations. You probably don't believe me when I said that it would only cost you a quarter a year to run these circuits day and night of a wall power supply. Well, I'll show you how to calculate these figures in this paragraph. First, you'll need to find the amperage of this circuit when the schmitt trigger is off and then test it again when it is on. Convert your answer so that it is in amps. Now take your circuit of choice that you want to run for a year and find the amperage used when it is on and convert it to amps. Now find the initial amount of volts (before the voltage is converted by the regulator) both circuits use. Take the on and off amperages of the Schmitt Trigger switching circuit and multiply them by the initial voltage the circuit uses, then do the same for the external circuit, you answers will be in watts. The rest is a simple function that can be easy to use in a graphing calculator or Excel spreadsheet. The formula: ((12X(A + B + C))/1000) will give you the kilowatt/hours (kWh) that are used over X amount of days. The average amount of time the switching circuit stays on/off (A and B respectively) is about 12 hours each and the on time for the external circuit (C) is the same as the on time for the switching circuit. The division by 1000 turns the answer into kilowatts while the 12 produces the hours part. To find price I'm using the national average from 2009 (11.55 cents) and multiplying it by the kWh to get cost. Depending on how many days you plan to run the circuit you can determine how much it will cost you. I'll use the circuit in the picture as an example, (12(365)((.026) + (.001425) + (8.93))/1000) = 41.283 kWh 41.283 * .1155 = $4.75 per year
Now that you know that you can calculate your costs you can see that this circuit is definitely a welcome addition to your security system. Hope you enjoyed this circuit and have a good time building!