I do this by striping and attaching the white wire to one of the outlets ‘silver’ terminals, then attaching the outlets to the metal faceplate such that the white wire is between the two outlets. In my case I used a four inch piece of 12 gauge solid copper wire. Next add a small wire connecting the white terminals of the two outlets together. This bar allows the power to flow to both outlets whenever one outlet is connected and since our relays will power each separately we must cut this connecting bar or both outlets will receive power if either outlet is enabled. Next cut the connecting bar on the ‘gold’ colored contacts. Remove the 4 tabs from each of the outputs by bending them with the needle nose pliers until they break off. The tabs have a little crease in them which helps the user remove them. These tabs are used to secure the outputs in a different enclosure and are not used for the metal enclosure. I begin by breaking off the four metal tabs attached to the outlets. In US household wiring, the green wire is ground, the white wire is return, and the black wire carries the power. Repeat the wires for the other three relays and other outlets, using ULN2803A Pins 3 & 16, 5 & 14, and 7 & 12. NOTE: for simplicity the schematic only shows a single outlet connection. The TTL control lines are wired to the inputs of the ULN2803A which can handle the relay coil current needs and also contains diodes to safely manage the back EMF produced by the relay coils when switched off. A separate 5 volt wall-wart is used to power the outlet box (the outlet box relay activation coils will consume nearly 500 milliamps and a separate wall wart is used here so as not to stress the Arduino power supply). Five wires are connected from the Arduino to the outlet box, four wires being connected to four Arduino output pins and the fifth to the Arduino’s ground pin. The electricity flow to each outlet of a four-outlet household current box is controlled via TTL level signals (such as the output pins of an Arduino). Household current rated wire with a male three-prong connector at one end. I hope this instructable helped you out and if you have any questions or need some help just leave a comment and ill get back to you ASAP!!!.Four 5v 10Amp relays (such as Jameco’s 843155)Ī 5volt – 500ma Wall Wart (such as Jameco’s 164101)Ī length of 5-conductor wire (I used Cat5 cable) If everything is working properly your fan or motor should be spinning, just remember if your starting from zero (fan off) you will probably need to enter a number of 20 or higher to get the devise spinning. Now that you have the code load it onto your arduino then open the serial monitor, Type in a number between 0 & 255 and hit enter. Int fan = 9 //fan on pin 9 int spe //fan speed void setup() Now that you have the circuit built lets upload the code and try it out, just copy the code below and paste it into your Arduino ide. Just use a rectifier diode with the positive end connected to the negative of the fan or motor and the negative side of the diode to the positive side of your devise. If you are using a big fan or motor you might want to place a diode between the positive and negative of your devise so if the power gets cut the power generated by the fan or motor does not exceed the reverse voltage of your transistor (if the power is cut and your motor is still spinning it will act like a generator until it stops spinning). The transistor I recommend for this instructable is a 2N2222 but any transistor that will handle the voltage and amps of your fan or motor will work fine, If you are going to be using a motor or devise that has high current pull I suggest using a Darlington transistor like the TIP120. The second 220Ω resistor limits the current flow through the phototransistor in the chip, the SHARP PC817 will handle 35 volts at 50mA but it will get very hot and not last long under those conditions so I put a current limiting resistor in the circuit to keep it way under those conditions. If you use a different optocoupler than the SHARP PC817 you may need to adjust this resistor to compensate, the PC817 has a Max led input voltage of 1.4 volts and the resistor brings the arduino 5 volts down to 1.25 volts. The first 220Ω resistor is connected between pin 9 on the arduino board and the positive side of the optocouplers led in the chip, this resistor cuts down the voltage from the board so it does not over power the led and burn it out. a 12 volt power source or a 9 volt battery will work if you don't have one. 1 X PCfan or motor you want to control (make sure it will handle the power supply your using). 1 X SHARP PC817 optocoupler (or any similar one will work). 1 X 2N2222 transistor (or any similar one that will handle the current of the devise you want to power). The picture above shows the circuit you will need to build.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |