Introduction: Light-Controlled Robot

In this tutorial, you will be making an autonomous robot that will move towards a light source! Here, each motor is connected to a sensor that causes the motor to speed up when exposed to light.

Step 1: Parts List

Be sure to have these parts on hand before starting your project!


  • Breadboard
  • Wires
  • Supplies for body and wheels
    • 1/8" Plywood & Access to laser cutter
    • Access to 3D printer
    • Marble

    • O-rings for traction

    • Zip-ties

Circuit Elements

  • One 556 timer
  • Six Diodes
  • Four 10 nF capacitors
  • Two 1kΩ resistor
  • Two photoresistors
  • Two motors
  • One 9V battery, with holder

To buy your own parts, a list of purchasing links can be found here.

Step 2: Looking at the Circuit

This image shows the circuit diagram of what we are trying to build. Creating this circuit will allow for the operation of the two motors.

To see what this circuit looks like in action, check out this simulation (keep in mind shining a light on the photoresistor will decrease its resistance).

This circuit utilizes a 555 Timer to affect the motor's output. In this Instructable, we will be utilizing a 556 timer in order to save space on the breadboard. For more information about these two timer chips as well as how this circuit works, check out this document.

This diagram has all the necessary connections, but now we have to translate it to the breadboard.

Step 3: Getting to Know the Breadboard

Each hole in the breadboard has a connection to other holes that allows us to connect circuit elements simply by placing them in adjacent holes.

To read more on the set-up of a bread board, check out this short article:

To learn more about making proper connections:

Step 4: Time to Start Our Build!

Now that we know how the breadboard works, lets try making some connections! The above image shows what our final project is going to look like. It may seem complicated, but let's break it down:

Step 5: Setting Up the Breadboard With the 556 Timer

First, we're going to add the 556 timer to the breadboard. Place the chip close to one end of the bread board, as shown. This will allow us plenty of room to make all the necessary connections.

The 556 timer has eight pins, each with a different function. This data sheet has more information on how the chip works.

Step 6: Easy Connections to the 556 Timer

Looking back at the circuit diagram (left), we see that many of the pins are connected to each other. Let's connect those first.

  • Wire 1 shows the connection between the Power (Vcc) and Reset of one side of the 556 chip.
    • Highlighted in green on circuit diagram
  • Wire 2 shows the connection between the Threshold and Trigger
    • Highlighted in blue
  • Doing the same for the other side of the chip, Wire 3 shows the connection between pins 2 & 6, the threshold and trigger pins.
  • These are all shown with yellow wires.

Step 7: Adding the Power Supply

Connect your battery holder to the positive and negative sides to the breadboard. The red wires connects to the rail marked in red. The black wire connects to the blue rail.

Then, for easy access on the breadboard, connect the corresponding rails of either side of the breadboard with wires (shown in red on the left side of the breadboard). Here the negative (blue) rail was connected with the other blue rail on the other side. The same connection goes for the red, positive rails.

Step 8: Connecting the Chip to Power

  1. We also have to connect the power (red rail) to Pin 14.
  2. Then we have to ground the chip, connecting pin 7 to the blue rail.
    • These two are shown with orange wires.

It may also be helpful to push two wires connecting the rails off to the side, as shown, so that way we have full access to the pins on the left side of the breadboard.

Step 9: Adding Photoresistors

Here we are adding the photoresistors to our circuit.

In the top half of the breadboard, we connect one side of the photoresistor to pin 14, the power supply (Vcc). This is show in the blue wire and the connection is shown in the blue highlight on the left diagram.

On the bottom half, however, connecting the photoresistor to Vcc is not as easy, but since that pin is connected to the positive side of the battery, we can connect the photoresistor there instead. This connection is shown with the yellow wire and the yellow highlighted connection.

Step 10: Connecting Resistors

Following along on the circuit diagram, we see that one of the connections that follows the photoresistor is to connect a 1kΩ resistor. On the breadboard, we can connect one end of the resistor beneath one end of the photoresistor. The orientation of the resistor does not matter.

Step 11: Adding Diodes

After the resistor, we are going to connect a diode in series (directly following the resistor).

*** Be sure to check the direction of the diode. The gray line on the diode corresponds with the line perpendicular to the wire on the circuit schematic. For more information on how diodes work, go check out this link!

Step 12: More Diodes

In parallel with the diode we just added, we are going to add a second diode. This means that we are going to add another branch off of the photoresistor. We do this by putting one end of our new diode in the same row as the end of the photoresistor not connected to a power supply. We also want the other end of the diode in line with the end of the diode we previously added.

Step 13: Connecting the Diodes

Now, we are going to connect the two diodes together, making a connection to a new row. On the top half of the breadboard, an orange wire is used and on the bottom half, a yellow wire was used.

This is shown in the orange-highlighted connection on the circuit diagram.

Step 14: Adding Capacitors

Now we are going to add some capacitors, branching off the connection we just made.

The other side must be grounded, connecting back to the negative terminal of the battery.

Step 15: More Diodes...

Moving over to the other side of the breadboard, we are going to add some more diodes, connecting from the corresponding output pins on either side.

Step 16: Connecting Diodes to Power

The diodes you just added connect back to the positive side of the battery. These connections are shown in the rightmost yellow wires, circled in red.

Step 17: More Capacitors...

Here the capacitors connect to the control pin on the 556 timer. This helps control the amount of noise delivered to the motor.

On the top half of the breadboard, the two connections are shown in green wires. On the bottom half, the vertical green wire connects the capacitor to ground and the rightmost purple wire connects it to the control pin.

Step 18: Final Connections

Here, we are going to make our last connections. We have to connect the junction between diodes on the left with the threshold pins on the 556 chip. These connections are shown with the long red wires.

Additionally, in the lower half of the breadboard, we need to connect pin 4 to power, shown in the yellow wire.

Step 19: Connecting the Motors!

Connect the red wire of the motor to the positive (red) rail and the black wire to the output pin. This should be done on both sides of the chip.

We're almost done...

Step 20: Let's Test It Out

Before going any further in the build, let's check to see if our circuit works.

First, lets connect the battery. The motors should start to spin a bit, especially if you are testing this in a bright room (you can also hear the motor begin to buzz).

Then, try shining a light directly onto one of the photoresistors. The corresponding motor on that side should begin to spin much faster. Alternatively, you could try covering one of the photoresistors to see if the corresponding motor slows down, or even stops.

If your motors aren't working as they should, check out this document for some troubleshooting tips.

Step 21: Moving On...

Now that our circuit is done, let's move on to the rest of the build!

Step 22: Making the Body

Using 1/8 inch plywood, laser cut the above 4 pieces using available files. Then, using wood glue, the three pieces on the left can be attached to the largest piece on the right, following the guides etched into the large piece. It may be helpful to apply the glue with a brush for more precise application.

The right image shows the final result.

Step 23: 3-D Printing the Wheels and Caster

Using the available files, 3-D print these three parts!

Then wrap the o-ring around each wheel for traction and force the marble into the caster.

Step 24: Putting It All Together!

Secure the motors on the wooden rails (here painted yellow) with zip-ties. Also glue the battery holder and caster on this side of the body.

Attach the wheels onto the side of the motor.

On the top of the body, use double-sided tape to secure the breadboard.

Thread the motor and battery wires through the rectangular hole.

Step 25: First Test Run

Let's try it out!

Re-plug the battery and motor wires into the breadboard, and grab a light source. Also bend the photoresistors in the direction(s) you want the robot to be sensitive to.

  • Then try switching the directions the photoresistors face to either make them move towards the light or away from the light!

Step 26: You Have Finished the Build!

Now is the time to add your finishing touches and show your robot off!