First I will show you how to make the enclosure, and route the wires. Then I will show you how to hook up the Servo & Arduino.

Project Steps

Using a Drill & Nibbler Tool, make a square hole in the Project Enclosure as shown in the picture (In the red box).

You want it big enough so the sliding lock has enough room to move freely all the way into the project enclosure.

Next, Drill a hole just big enough for the wires to go through (All 3 of them).

You want this hole to be as close to the door as possible, so the conduit will line up with it.

Don’t make the mistake I did and drill the hole in the wrong end! The hole should go on the end that is INSIDE the enclosure.

Drill a small hole through the end of the slide lock as shown.

Try to get the hole as close to the end as possible!

This is important because it needs that extra room to slide.

Drill a hole in the servo gear just big enough for the wire to go through (Blue Circle in the picture).

Mount the Servo inside the project box, and attach a strong wire (Coat Hanger?) to the servo and slide lock as shown in the picture.

Don’t Permanently mount it until you can test it out. (Alignment is the key)

You can use a small dab of hot glue to mount it if you have nothing else.

Using Project Wire, attach very long lengths of wire to the wires on the servo. (Be sure to connect all 3).

Run the wires through the small hole in the project box that we drilled in step 1.

Run a piece of conduit on the door itself, from the project box to the other end of the door.

Next, Run the 3 wires through the conduit.

Leave about 2″ of space between the end of the conduit and the edge of the door.

Be sure to align the conduit to the hole we drill in the project box.

Run the rest of the conduit along the “outside” of the door.

Now we’re going to run the wires through the flexible tubing as shown.

Next, slide the flexible tubing inside the ends of the Conduit as shown in the picture.

You can use hot glue to hold the tubing inside the conduit if needed.

What this tubing does, is allows the wires to flex when the door is opened and closed.

Now that we have the conduit and wires all run, and the servo is attached the slide lock, we can hook up the wires!

Attach the Power wire on the servo to the +5v on the Arduino.

Attach the Ground wire from the servo to the GND on the Arduino.

Attach the Signal wire from the Servo to Digital Pin 12.

Test it out using the Example on Arduino IDE called “Sweep”.

You may have to adjust the alignment a bit to get it working right.

If all is working well, place the cover on the enclosure, and job well done!