Building a limit switch
Go to Home Page

You can build your own limit switch.  The picture below shows a homemade switch next to the Lego sensor switch.
Consider the instructions below as guidelines.  This project is esay to modify to parts you may have on hand.
Before you start this project, read and understand the theory of limit switches.

If you prefer, Techno-stuff sells an adapter that lets you use Lego switches as limit switches.

Home made switch with Lego Mindstorms sensor switch

Home made limit switch for Lego motor

Equipment and skills

Building your own limit switch requires a few inexpensive parts, and some common hand tools.  You will need to be able to cut and file plastic Lego bricks.  You will also need to solder wires onto the switch.

Typical tools:
Soldering iron
Xacto knife
Small file
Wire cutter/stripper

Materials:
Switch  -  Hosfelt  51-374
Diode  1N4001
Lego motor wire (#5111)
2x2 Lego brick
2x2 Lego plate

There is nothing special about the switch, except it must have normally closed contacts.  You can use any switch that is easy to press and can be mounted in or on a lego piece.


How

First modify a Lego brick to house your switch.  This example uses a 2x2 brick.  Cut out the plastic so the switch actuator will be extend outside the brick.  Remember to cut a hole in the back for the wire.

Limit switch shell

Use a lamp or electrical tester to find the terminals that are normally closed.  (Terminals are connected when the switch is not pressed)  Solder a diode across these terminals.

Limit switch with diode attached
 

Cut a Lego motor wire to the desired length.  Attach the wires as shown.

Limit switch schematic

Limit switch with wires attached

Limit switch with two Lego connectors

Tape or heat shrink the wire junction that is not attached to the switch.
Insert switch into Lego brick, and glue in place.  Glue on the bottom plate.