Ac control

If you have ever wanted to control electronic devices from your computer ac control control or regulate your environment, this instructable will guide you. 60 watt light bulbs from a PC program. First off — Any time that you work with 120V voltages, safety is paramount.

If you are not comfortable working with mains power, please seek the assistance of someone who is. This instructable is intended only for someone experienced and confident in wiring high voltages. Do not attempt to do this if you are not. Household current can kill or badly injure you if you who do not understand the danger.

The relay screw terminals are isolated from the other circuit connections. DO NOT touch the U451 when there is 110V AC present. The example project will control two independent 110V AC lights with the two relays on the U451. The U451 and lights will be mounted on a wooden plank. The lamp sockets are placed on either side of the wooden plank used for this project.

The location of the lamps are copied to the plank and traced with a pen. A center line is drawn through the circle to aid in mounting the lamps. Four adhesive-backed felt pads are added to the bottom side of the board. This will prevent the board from scuffing the surface that the board is placed upon.

The lamp sockets in this example setup will rest on some washers to provide some space for the wires that lead out from the under side of the socket and to the U451. The lamp sockets are positioned and the screw locations marked with a pen. The screws and two washers are added and partially screwed in place. The lamp sockets loosely mounted as a «dry fit» just to see that they fit in place nicely. Pictured are the two 3-screw headers — one for each relay.

Because of the high voltage and current involved with this example, you must use a wire of sufficient diameter. In this case 16 gauge will suffice. The pair of wires from the two-wire plug consists of «hot» and «neutral» represented by black and white respectively. Hot connects to each of the two common «c» terminals on the U451.

One black wire connects from the N. Mount the lamp sockets, tighten the screws. Other more energy sensible light bulbs could be used. Once you are sure about the 110V AC connections, attach the USB cable to the U451 and your PC. Plug the AC plug into an outlet. This project is brought to you by the magic of RobotBASIC. It has support for controlling the USBmicro U451.

You can write a program in the RB IDE and then save it as an . I’m not going to get into the details of the program in this instructable. The entire program is the 35 lines in the image below. The program is easy to copy into the IDE and simply run.

When the program runs you are presented with two boxes that you can click on or off. If everything works the bulbs follow suit! Step 13: Let There Be Light! You now have control of two lights in this example instructable.