Door Triggered Automatic Light Switch

About: Exploring the cosmos one synapse fire and one mouse click at a time.

Oh drat! I need to enter that dark scary room, what if a monster leaps forth from the blackness to burglarize me of my chocolate morsel encrusted biscuits whilst I'm fumbling for the light switch?!? If only my light would switch on automatically when I open my door...

Whether you're trying to evade a cookie monster, or you have a room such as a basement that could benefit from the convenience of an automatic light switch, this project may interest you.

Note: The light will still have to be switched off manually with this device.

Important!Well guys I've been working on this right up until now (11:00 PM April 20th). With the deadline for the Automation contest rapidly approaching, I regret that I don't have a functioning device yet. There are still some bugs to work out. I'm confident that I will be able to get it working, and revise this documentation soon. Please check back for updates.

Step 1: Make a Solenoid Coil

A solenoid is an electromagnet with a movable plunger, instead of a fixed pole piece. The movable plunger slides into the coils core in a linear fashion when the coil is energized, producing either a push or pull motion. For this project we're after a pull motion to lift a light switch from the off to the on position.

Gather Materials:

  • 1 - Ball Point Pen Tube with 1/4" ID & 5/16" OD
  • Small piece of thin plastic or wood to make bobbin stops.
  • Super Glue
  • Spool of magnet wire. Approximately 26 gauge. (I recycled wire from an old hand mixer motor.)
  • Tape


  • Drill
  • 3/4" Hole saw or Spade Bit
  • 5/16" Brad Point or Forstner Bit
  • Hacksaw
  • Screwdriver

Make the bobbin stops:

  1. Cut the 3/4'' OD bobbin stop discs with your hole saw or spade bit.
  2. Using 3 screws, fasten each disc to a scrap piece of wood to clamp it down (see image).
  3. Carefully center your 5/16" drill bit, and drill out the center hole.
  4. Slide the bobbin stops onto the pen tube.
  5. Space them 1 - 1/2" apart, leaving more than 1/2" of tube extending past the stops.
  6. Super glue the discs in place.

Wind the coil:

Finally, trim the ends of the pen tube with a hacksaw, to the dimensions indicated in the annotated image.

Step 2: Make a Solenoid Plunger

Gather Materials:


  • Permanent Marker
  • Vise
  • Hacksaw
  • Soldering Iron, Solder & Flux
  • Wires Cutters
  • File
  • Sandpaper

Fabricate the Plunger:

  • Measure 3 - 3/8" from the threaded end of the hex bolt and make a mark.
  • Clamp the bolt horizontally in a vise, and cut it to length removing the head.
  • Clean up the cut with a file.
  • Use wire cutters to clip off the crimp end of one ring terminal.
  • Shape the ring into a washer.
  • Mark the bolt 3/4" from the top end of the threads.
  • Rough up the shank of the bolt here. Apply some solder flux.
  • Clamp the the bolt in a vise vertically, with the thread end down. Align the mark with the top edge of the vise jaw. Make sure the bolt is square in the vise. Slide the washer down the bolt until it's flush against the vise jaw. Solder the washer to the bolt. This can be challenging because of the amount of surface area that will be sinking the heat. Be patient and keep heating a spot until you can accomplish fusion. Two spot solders is adequate.
  • The other ring terminal and spring will be used in later steps.

Step 3: Make the Metal Brackets

I repurposed a small sheet metal plate from an old DVD player to make my brackets. If you can't find something similar, small pieces of sheet metal can purchased from most hardware stores. I measured and drew the layout for the two brackets where they best fit, given the shape of the metal I was working with.


  • Pencil & Ruler
  • Tin Snips
  • Center Punch
  • Drill Press
  • Drill Bits: 5/16", 1/4", 3/16", 1/8" (or a step drill)
  • Countersink
  • Grinder or Rotary Tool
  • File
  • Sandpaper
  • Hammer
  • Pliers

Layout, Cut, & Drill:

  1. Referring to the annotated image, draw the layout on your metal.
  2. Carefully rough cut the shapes with tin snips, leaving a little of the pencil line.
  3. Fine tune the shapes to the lines.
  4. Deburr the edges as needed.
  5. Center punch the hole locations.
  6. Carefully drill the holes on a drill press, clamping the piece down where possible.
  7. Countersink the switch plate mounting hole on the front. Countersink the back side of the two holes where the wood enclosure bottom piece fastens.

Note: There are different sized light switch plates. Because of this, it's best if you measure the distance between the top of your switch plate to the center of the top screw hole. This is the distance from the bottom of your enclosure you want to drill the 3/16" mounting hole in the large metal bracket.


The bend points are indicated by broken lines in the annotated image. I Held the edge of a chewed up chisel against the bend line, then pried the tabs up to 90*. The bends can be fine tuned with a hammer and pliers.

Note: The second tab of the U shaped bracket with the 1/4" hole was intended for mounting a limit switch. I didn't use it but it's nice to have for possible future mods.

Step 4: Machine the Enclosure Parts

Gather Materials:

  • Approximately 1 square foot of 1/4" plywood or equivalent.
  • 1 - CD Case, or a 4" X 4" piece of plywood for the enclosure front panel.


  • Pencil & Ruler
  • Table Saw
  • Drill Press
  • Drill Bits: 7/8" Forstner, 3/8" Forstner, 5/16" Brad Point, 1/4" Forstner, 1/8", Countersink
  • Utility Knife

1/4" Plywood Cut List:

  • 1@ 4" X 4"
  • 1@ 3 - 11/16" X 1 - 1/4"
  • 2@ 4" X 1 - 1/4"
  • 2@ 3 - 9/16" X 1 - 1/4"

Referring to the annotated image, and the cut list, carefully cut the parts on a table saw. Mill dados where indicated. Notch the edge of the bottom piece to fit around the metal bracket. All of these operations can be done with a single saw blade, carefully nibbling away material to the pencil lines. Drill holes and counter-bores as indicated. The 3/8" counter-bore for the compression spring only needs to be about 1/16" deep. The same applies to the 1/4" counter-bores.

CD Case Front Panel:

The acrylic material can be cut using a score and snap technique. Using a sharp utility knife, make several score passes on each cut line. Then gently flex along the line until the waste piece snaps off. The final dimensions need to be 4" X 4". Smooth up rough edges with sandpaper. Drill and countersink 4 holes for #4 X 3/8" wood screws around the perimeter as seen in the image.

Step 5: Construct the Solenoid Plunger Sub-Assembly

Assemble the parts as shown in the images. Drill pilot holes in the edge of the bottom plywood piece to accept two #4 X 3/8" wood screws through the metal bracket.


  • Drill & 1/16" Bit
  • Screwdriver

Step 6: Assemble the Enclosure

Gather Materials:

  • Wood Glue
  • 4 - #6 X 1/4" Truss Head Screws


  • Screwdriver

Assembly Procedure:

  1. Using wood glue, glue the sides and top to the back panel as shown.
  2. Temporarily position the solenoid plunger sub-assembly and drill pilot holes for mounting. Attach it with two #6 X 1/4" truss head screws.
  3. Fit the solenoid coil in place.
  4. Fit the U shaped bracket on the other end of the coil.
  5. Align it with the center line on the back panel, and drill mounting pilot holes
  6. Remove the solenoid plunger sub-assembly.
  7. Take the coil back out.
  8. Fasten the U shaped bracket in place with two #6 X 1/4" truss head screws.
  9. Reassemble in the reverse order.

Step 7: Make the Control Circuit

Gather Materials:

Referring to the schematic and images, build the circuit. You can solder the components together point-to-point, or use a circuit board. For now I've done the former, but I intend to make a PC board later. I recommend using a board since the enclosure was designed to accept one.

I've presented a version of the circuit that is simpler than what I originally had in mind. I've run short on time and wasn't able to build and test what I had planned to go with. One addition that would be useful is a Photoresistor to inhibit automatic switching when there is ambient light.

Step 8: Make a Door Switch

This is what will sense when the door is opened and signal the control circuit to switch the light on.

Gather Materials:

  • 4 foot (or longer as needed) 4 wire phone cable.
  • 2 - SPDT Micro Limit Switches
  • Scrap wood to make brackets.
  • Screws to mount the switch bracketry.
  • 2 - finish nails to mount the switches.


  • Table Saw
  • Drill & Bits
  • Screwdriver

Step 9: Make the Light Switch Linkage

You'll need a 6" length of 14AWG solid copper wire to make the linkage. Follow the pattern to bend and shape the wire. Modify the other 1/4" ID ring terminal as shown in the images. Nut the modified ring terminal to the solenoid plunger.

Step 10: Installation

Mount the door switch as shown. Remove the top screw from the switch plate. Position the automatic switch unit, aligning the mounting hole with the switch plate, and fasten it with the original screw. If there is a clearance problem, the head of the screw can be filed flat. Install the switch linkage as shown. The spring tension can be adjusted by threading the nuts up or down. Up = more tension, down = less.

Automation Contest

Third Prize in the
Automation Contest



    • Weaving Challenge

      Weaving Challenge
    • Paper Contest

      Paper Contest
    • Epilog X Contest

      Epilog X Contest

    3 Discussions


    4 months ago on Step 10