Light Sensor

 

You have previously used the LEGO® light sensor in your programming.  You will now build a light sensor using what is called a photocell.  The difference between the LEGO® light sensor and the photocell is that the LEGO® light sensor reads the reflection of light off a surface; the photocell reads the intensity of ambient light (normal lighting).  Placing the photocell inside of a LEGO® brick allows us to be able to use it as if it were a normal part of our LEGO® kit.

 

Parts:  Photocell, 2x2 LEGO® Brick, LEGO® Metal Plate.

Tools: Wire Cutters, Solder, Soldering Iron, Exacto Knife, LEGO® Cutting Guide, Pliers, Glue, Helping Hands, RCX

            (LEGO® cutting guide is made up of 2 2x4 plates & 2 1x2 plates)

 

Steps:

·   Refer to previous warnings.

·   One group will need to turn off their computer’s monitor and unplug it (this is not true for all sets of tables).

·   Put the soldering iron stand together by unscrewing the wing nut and attaching the metal coil holder.

·   Plug the soldering iron in where the monitor plug was located --- BE CAREFUL the soldering iron will start to become hot immediately).

·   Wet the small sponge and place it on the soldering iron stand.

 

 

1.    Need: LEGO® Cutting Guide, Exacto Knife, Metal Plate

*This step involves cutting the LEGO® metal plate to size to allow for a perfect fit on the 2x2 LEGO® brick. 

·        Place the metal plate inside the cutting guide so that on one side a 2x2 plate is sticking out.

·        Cut the 2x2 amount off the rest of the plate.  Using the guide allows us to have a perfectly cut plate.

·        Set this piece aside for later use.

 

    2.    Need:  2x2 LEGO® Brick, Cutters, Pliers

*This step involves removing the cylinder from the inside of the LEGO® brick.  This will create space in which to place the wires.

·        A hole should have already been drilled in your 2x2 LEGO® brick. If there is not already a hole, ask a lab assistant to drill a hole into the LEGO® brick.

·        If you look at the bottom of the LEGO® brick you will see a cylinder inside of the brick.  Take the cutters and clip slits around the cylinder.  Use a pair of pliers to pull out the cut sections.

 

 

    3.    Need: cutters, homemade 2x2 LEGO® metal plate

   *This step involves making room to place the wires onto the metal plate.

·        If you look at the bottom of the metal plate, you can see that the metal plate is split into two sections.  This is to make sure that one wire receives voltage and the other receives ground.

·        Take the metal plate and, with the cutters, peal back the plastic and trim it away. Make sure that you removed enough plastic so that some metal shows.  Cut off the excess plastic. 

·        Do this again on the bump that is diagonal from the one you just did.

 

              

    4.    Need:  enhanced 2x2 LEGO® brick, photocell

     *This step involves placing the photocell inside the brick.

 

·        Place the photocell’s wires through the precut hole in your 2x2 LEGO® brick

·        Make sure that the photocell is flat against the brick and that the wires are spread apart (not touching).

 

    5.    Need:  solder, soldering iron, enhanced brick, metal plate, helping hands

     *This step involves soldering everything together.

·        FOR THIS STEP YOU MUST WEAR THE GOGGLES!

·        For the following steps you may want to use the helping hands by placing the brick in one and the metal plate in the other.

·        Place one wire on a bump that has the metal showing and the other wire on the other metal-showing bump. 

·        When placing the wires, make sure that the cut edge of the metal plate lines up with the face of the LEGO® brick that the photocell is on.

·        You may need to trim your wires before soldering so that they fit inside of the brick.

·        Solder the wires to their corresponding metal bump.  Heat up the wire and metal bump (be careful not to melt the LEGO®) with the soldering iron and put some solder on the wire; this should cause the solder to melt, binding the wire to the metal bump.

·        You do not need to use very much solder. 

·        Be careful not get the solder anywhere but the bump, or you will not be able to close your sensor.

·        Once you are finished with the soldering iron wipe it off on the wet sponge and unplug it.

·        Plug the monitor back in.

                       

 

    

 

 

 

 

 

 

 

 

 

6.      Need:  RCX, The Almost Finished LEGO® Sensor, glue

      *This step involves testing the sensor to see if it works.

·         Before gluing your sensor together, test it.  It is very important that we test each sensor.

·         Remember the bottom of the metal plate is split into two, so you need to make sure the photocell is facing the same direction as the infrared port.  This allows the sensor to receive ground and voltage correctly.

·         In order to test the sensor we need to set the input port to raw values.  We do this by saying the following: SetSensorMode(SENSOR_1,SENSOR_MODE_RAW);

·         Don’t forget to run the program to change the sensor type.

·         Once the wires are in place and everything works okay, close the sensor and apply some glue.  

You have now finished your first sensor, congratulations!

 

Back to Contents