Project Ideas Project Guide Ask An Expert Blog Science Careers Teachers Parents Students

Build a Light-Tracking Bristlebot

Recommended Project Supplies
Get the right supplies — selected and tested to work with this project.
View Kit
Time Required Very Short (≤ 1 day)
Prerequisites none
Material Availability A kit containing all the electronics parts needed for this project can be found in a kit from our partner Home Science Tools.
Cost Average ($40 - $80)
Safety No issues


Sometimes engineers get ideas to build robots from animals in nature. There are robot dogs, robot snakes, robot birds, robot cheetahs, and even tiny robotic insects! In this science project, you will build a robot insect of your own. The robot will automatically drive toward a light source, mimicking a behavior called phototaxis, seen in some insects. You will build your own robot and then make adjustments so it can reliably drive toward a light.


Build a light-following bristlebot and make adjustments so it can accurately follow a light source.

Share your story with Science Buddies!

I did this project Yes, I Did This Project! Please log in (or create a free account) to let us know how things went.


Ben Finio, PhD, Science Buddies

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Science Buddies Staff. "Build a Light-Tracking Bristlebot." Science Buddies, 26 Apr. 2018, Accessed 21 Aug. 2018.

APA Style

Science Buddies Staff. (2018, April 26). Build a Light-Tracking Bristlebot. Retrieved from

Last edit date: 2018-04-26


Have you ever seen swarms of insects fluttering around a streetlight at night? What about little bugs that quickly seek out a new hiding spot when you look under a rock? This type of behavior is called phototaxis, which means movement in response to light (animals that move toward light have positive phototaxis, and those that move away from light have negative phototaxis). Although it might not always seem like a smart move to make—such as when a mosquito flies into a glowing, electric bug zapper—moving toward or away from light can be a simple way for an insect to successfully decide where to go most of the time.

Now, you might be thinking, "I thought this was a robotics project, so what do insect behaviors have to do with robots?" It turns out that sometimes, engineers like to design robots based on things they see in nature. For example, there are robots that use legs to run like animals and robots that fly by flapping their wings like a bird. Robots that are modeled after animals are called biologically inspired robots (or "bio-inspired" for short). In this project, you will build your own miniature, bio-inspired robot, like the one in Figure 1: a robot "bug" that will automatically drive toward a light source, just like some real bugs do! The robot is a type of bristlebot, which gets its name because it uses bristles from a toothbrush as feet.

A light-following bristlebot.
Figure 1. A light-following bristlebot.

So, how do you get a robot to drive toward a light? The robot will use two light sensors, which are special electronic parts that are sensitive to light. The light sensors are connected to an electrical circuit, or collection of electronic components that serve a specific purpose, and acts like the robot's "brain." The circuit in your robot will control two vibrating motors, which is like how an insect's brain controls its muscles. The motors will make the robot vibrate and buzz along, and can also steer the robot left and right. All of this might sound complicated, but do not worry! The Procedure for this project will show you, step-by-step, how to build the robot and assemble the circuit, and you will learn about the different circuit parts as you go along. (For a detailed explanation of how the circuit works, including a circuit diagram, see the Help section). You can also check out the Science Buddies Electricity, Magnetism, & Electromagnetism Tutorial to learn more about electricity in general.

Terms and Concepts

These terms are used in the Introduction:

  • Phototaxis
  • Biologically inspired (or bio-inspired)
  • Bristlebot
  • Light sensor
  • Circuit
  • Motor

These circuit terms are referenced in the Procedure:

  • Breadboard
  • Jumper wires
  • Potentiometer
  • Resistor
  • Switch
  • Photoresistor

These terms are used in the advanced explanation in the Help section:

  • Voltage divider
  • Ohm's law
  • Terms related to the MOSFET:
    • Gate
    • Drain
    • Source
    • Threshold voltage
    • Saturation
    • N-channel MOSFET
    • P-channel MOSFET


  • What is phototaxis? What are the different kinds of phototaxis?
  • What are some examples of different types of biologically inspired robots? Hint: Do an internet search for "biologically inspired robot," or think of an animal and do a search for that type of robot, such as a "cheetah robot")
  • What are the main parts of the light-tracking bristlebot, and how are they similar to the parts of an insect?
  • How is the light-tracking bristlebot able to steer left and right?


These references will be useful if you are just starting to learn about circuits and electronics:

These references will be helpful for advanced students who want to learn more about circuits, including the specific circuit concepts used in this project:

News Feed on This Topic

, ,
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Materials and Equipment Product Kit Available

  • Advanced Bristlebots Robotics Kit, available from our partner Home Science Tools. You will need the following components from the kit:
    • Mini breadboard
    • 2xAAA battery holder
    • AAA batteries (2)
    • Mini vibration motors (2)
    • Toggle switch
    • 10 kΩ potentiometers (2)
    • N-channel MOSFETs (2)
    • Photoresistors (2)
    • 1/2 inch yellow jumper wires (2)
    • 1/2 inch red jumper wire
    • 1/2 inch black jumper wire
    • 3/4 inch black jumper wires (2)
    • 1 inch black jumper wires (2)
    • Note: This kit also contains materials to build a Build a Solar-Powered Bristlebot
  • You will also need the following materials, not included in the kit:
    • Identical toothbrushes with slanted bristles (2)
    • Scissors or wire cutters
    • Double-sided foam tape
    • Optional: Craft materials to decorate your robot (such as googly eyes, colorful pipe cleaners, etcetera)
    • Flashlight
    • Smooth surface for testing the robot (the toothbrush bristles will get stuck on rough surfaces)
    • Lab notebook

Recommended Project Supplies

Get the right supplies — selected and tested to work with this project.
Project Kit: $59.95
View Kit

Remember Your Display Board Supplies

Artskills materials poster making kit

Poster Making Kit

ArtSkills buy now button
ArtSkills supplies trifold

ArtSkills Trifold with Header

ArtSkills buy now button
ArtSkills supplies poster lights

Poster Lights

ArtSkills buy now button

Experimental Procedure

Assembling Your Robot's Body

Follow the steps in this slideshow to build your robot's body. Make sure you read the captions below each image for important notes about each step. You can also watch a video that shows how to assemble the robot.

Toothbrush head with slanted bristles Toothbrush head with straight bristles Peeling paper backing off breadboard Battery holder attached to breadboard AAA batteries in battery holder Toothbrushes attached to breadboard Motors attached to breadboard

Assembling Your Robot's Circuit

If you have never used a breadboard before, you should refer to the Science Buddies resource How to Use a Breadboard before you continue.

Build the circuit on your robot's breadboard by following along with the slideshow. Make sure you read the captions below each image for important notes about each step. You can also skip to this part of the video to see the circuit assembly steps.

Circuit parts Robot body with battery wires facing to right Jumper wire bent into U shape Blank breadboard Yellow jumper wire E1 to F1 Red jumper wire E8 to F8 Black jumper wire E11 to F11 Yellow jumper wire E15 to F15 Black jumper wire F2 to G11 Black jumper wire H11 to F16 Black jumper wire C3 to C11 Black jumper wire D11 to C17 Potentiometer into H1, H2, H3. Potentiometer into H15, H16, H17. MOSFET into D1, D2, D3 MOSFET into D15, D16, D17 Photoresistor into A1 and A8 Photoresistor into B8 and A15 Switch in G7, G8, G9. Motor leads to J8 and E16 Motor leads to I8 and E2. Battery pack red lead to J7, black lead to J11.

Testing Your Robot

To learn how to use your robot, you can watch this video, or follow the steps below. If you run into trouble and your robot does not work as described, the video also includes troubleshooting information, and you can check out the FAQ section of this project.

  1. Make sure you slide your robot's power switch down toward row 17 when holding the robot, as shown in the circuit assembly slideshow. This is the "off" position.
  2. Bend the photoresistors' leads so they face up, outward, and slightly away from each other. The photoresistors sense light and help your robot steer left and right. If they are directly next to each other, they will have trouble sensing different amounts of light.
  3. Turn the white knobs on both of your potentiometers all the way counter-clockwise.
  4. Turn the robot on by sliding the power switch up.
  5. Slowly start turning one of the potentiometers clockwise. You should eventually see one of the motors start to spin, and feel and hear the robot vibrate. Make sure your hands are not blocking light to the photoresistors when you do this.
  6. Turn the potentiometer back down until the robot just stops vibrating.
  7. Repeat steps 5–6 with the other potentiometer.
  8. You have just set the robot's sensitivity to light slightly below the ambient light levels in the room (for more details on how this works, see this question in the FAQ). That means that the motors will only spin if they are exposed to brighter light. You can test this by holding the robot directly up to a lamp.
  9. Now, if you aim a flashlight directly at the robot's photoresistors (not at the ground in front of the robot), it should move, and you should be able to steer it left and right by aiming at only one photoresistor at a time.
  10. Practice steering your robot around with a flashlight. It might not work perfectly at first, and may require some tinkering on your part. If your robot has trouble steering:
    1. Try adjusting the aim of the photoresistors. Make sure they are not too close together or it will be difficult to make the robot steer left and right; or too far apart or it will be difficult to make the robot go straight.
    2. Try adjusting the potentiometers to change the robot's sensitivity to light.
    3. If your robot has severe steering problems (for example, it will only turn sharply to one side), make sure the toothbrushes are mounted symmetrically.
    4. If your robot does not work at all (does not respond to changes in light, or moves all the time regardless of light), there is probably something wrong with your circuit. See the FAQ section for help.
  11. Slide the power switch back to the "off" position to save battery power when you are not using your robot.

Using Your Robot in a Science Fair Project

If you want to enter your robot in a science fair, just building it might not be enough. How could you use your robot to do an experiment? Here are a few ideas:

  • Build a maze or obstacle course for your robot and challenge people to guide the robot through it using a flashlight. Is there a learning curve to operating the robot? Do people complete the maze faster on subsequent runs?
  • Measure how fast the robot moves when exposed to different intensities of light.
  • Measure how fast the robot moves on different surfaces.
  • Measure how fast the robot moves or how easy it is to steer with different types of toothbrushes for feet. Be very careful when peeling toothbrush heads off the bottom of the breadboard, as this can ruin the sticky tape if you do it too quickly.
  • If you have access to a multimeter, use it to measure the resistance of the potentiometers. How do they affect the robot's speed when exposed to a constant source of light? How does the threshold at which the motors start spinning change?

Explore More!

Looking for more robot fun? Explore the World of Robotics with This Suite of Projects!


For troubleshooting tips, please read our FAQ: Build a Light-Tracking Bristlebot.

Communicating Your Results: Start Planning Your Display Board

Create an award-winning display board with tips and design ideas from the experts at ArtSkills.
ArtSkills button poster gallery 350
ArtSkills button design tips 350
ArtSkills button for more tips 210 h

If you like this project, you might enjoy exploring these related careers:

female robotics engineer adjusting robot

Robotics Engineer

Have you watched "The Transformers" cartoon series or seen the "Transformers" movies? Both shows are about how good and evil robots fight each other and the humans who get in the middle. Many TV shows and movies show robots and humans interacting with each other. While this is, at present, fantasy, in real life robots play a helpful role. Robots do jobs that can be dangerous for humans. For example, some robots defuse landmines in war-stricken countries; others work in harsh environments like the bottom of the ocean and on the planet Mars. At the heart of every robot is a robotics engineer who thinks about what a robot needs to do and works with several engineering disciplines to design and put together the perfect piece of equipment. Read more
Mechanical engineer building prototype

Mechanical Engineer

Mechanical engineers are part of your everyday life, designing the spoon you used to eat your breakfast, your breakfast's packaging, the flip-top cap on your toothpaste tube, the zipper on your jacket, the car, bike, or bus you took to school, the chair you sat in, the door handle you grasped and the hinges it opened on, and the ballpoint pen you used to take your test. Virtually every object that you see around you has passed through the hands of a mechanical engineer. Consequently, their skills are in demand to design millions of different products in almost every type of industry. Read more
electrical engineer aligning laser

Electrical & Electronics Engineer

Just as a potter forms clay, or a steel worker molds molten steel, electrical and electronics engineers gather and shape electricity and use it to make products that transmit power or transmit information. Electrical and electronics engineers may specialize in one of the millions of products that make or use electricity, like cell phones, electric motors, microwaves, medical instruments, airline navigation system, or handheld games. Read more
female biologist plotting animal range data on computer


Life is all around you in beauty, abundance, and complexity. Biologists are the scientists who study life in all its forms and try to understand fundamental life processes, and how life relates to its environment. They answer basic questions, like how do fireflies create light? Why do grunion fish lay their eggs based on the moon and tides? What genes control deafness? Why don't cancer cells die? How do plants respond to ultraviolet light? Beyond basic research, biologists might also apply their research and create new biotechnology. There are endless discoveries waiting to be found in the field of biology! Read more


Explore More!

Looking for more robot fun? Explore the World of Robotics with This Suite of Projects!

Share your story with Science Buddies!

I did this project Yes, I Did This Project! Please log in (or create a free account) to let us know how things went.

Frequently Asked Questions (FAQ)

If you are having trouble with this project, please read the FAQ below. You may find the answer to your question.
Q: Why are my motors not spinning at all?
A: If your motors do not spin at all when you turn the power switch on and adjust the potentiometers, the most likely cause is simply a misplaced wire. Just one wire pressed into the wrong breadboard hole can prevent the entire circuit from working. For an overview of some other common mistakes you can make when using a breadboard, see the Common Mistakes section of the breadboard tutorial. Here are some specific things you can check with this robot:
  • Double- and triple-check your robot's wiring against the breadboard diagrams provided in the Procedure. Remember that you need to accurately count rows and columns since your breadboard does not have labels printed on it.
  • Make sure all the wires are pressed firmly into the breadboard's holes. You should be able to turn your robot upside-down, and even shake it, without anything falling out. A single loose connection can prevent the robot from working.
  • Make sure you properly inserted the batteries into the battery holder. The "+" symbols on the batteries should line up with the "+" symbols inside the battery holder.
  • Make sure the MOSFETs are facing the right direction. When the robot as oriented as shown in the slideshow in the Procedure, the writing on the MOSFETs should face to the left, and the large metal tabs should face to the right.
  • Make sure you turned your robot "on" by sliding the power switch "up," towards row 1 on the breadboard when the robot is oriented as shown in the slideshow.
  • Make sure you are holding the robot in a well-lit room or near a bright source of light, like an open window or a lamp. The robot will not work in very dim light.
Q: I think my motors are broken. How can I check?
A: Remove all of the motor leads from the breadboard, but leave the rest of the circuit assembled. Testing only one motor at a time, connect one of the motor's leads to hole I7 and the other lead to hole I11. This connects the motor directly to the battery pack, "skipping" the rest of the circuit, and should make your motor spin. Note that it does not matter which color lead you connect to which hole; reversing the colors will just reverse the direction in which the motor spins. Test each one of your motors. If they both spin, you know that your motors are not broken and the problem is elsewhere in your circuit if your robot is not functioning.

If your motors do not spin, that does not guarantee that they are broken. You could have the batteries inserted into the battery holder incorrectly. Double check that the "+" symbols on the batteries line up with the "+" symbols inside the battery holder.

Q: Why does my robot not drive forward at all?
A: If your robot curves slightly off to one side when driving forward, this is normal and nothing to worry about. If your robot goes backwards, sideways, or curves very sharply to one side, the problem is most likely your toothbrushes. Here are some things you can check:
  • Make absolutely sure you are using toothbrushes with the longest bristles slanted in one direction. If you use toothbrushes with straight bristles, or toothbrushes with equal-length bristles slanted in both directions, the robot will probably not drive forward.
  • Make sure you are using two identical toothbrush heads. Even small differences between different types of toothbrush can affect the robot's steering.
  • Make sure the toothbrush heads are mounted straight and parallel to each other. If one or both of the toothbrushes are mounted crooked, this could prevent the robot from going straight.
Q: Why does my robot only turn in one direction?
A: If your robot only turns in one direction, the problem could be that only one-half of your circuit is wired correctly. Try the following:
  • When viewing the robot from behind, turn the left potentiometer all the way down (counterclockwise) and the right potentiometer all the way up (clockwise).
  • Put the robot down on a flat surface in a well-lit area. It should turn to the right (drive in clockwise circles).
  • Now, reverse the potentiometers. Turn the left potentiometer all the way up (clockwise), and the right potentiometer all the way down (counterclockwise).
  • Put the robot down again. It should turn to the left (drive in counterclockwise circles).

If your robot only turns in one direction, and does not turn in the other direction at all, then there is probably a mistake in your wiring for one half of your circuit. Double-check the diagrams in the Procedure to make sure your robot matches them. If the robot turns more sharply in one direction than the other when you do this, the problem is probably that one or both of your toothbrushes are mounted crookedly. This can cause the robot to veer off to one side. Make sure your toothbrush heads are mounted straight and parallel to each other.

Q: Why can I not get my robot to go straight when using the flashlight?
A: Remember that in order to get the robot to drive straight, you need both motors to vibrate at the same time, which means you need to shine your flashlight beam on both photoresistors. If the photoresistors are spaced too far apart or angled sharply away from each other, it might be impossible to hit both of them at once with the flashlight. Try moving the photoresistors closer together or pointing them more forward instead of outward.
Q: Why can I not get my robot to turn left and right when using the flashlight?
A: Remember that in order to get the robot to turn, you need just one motor to vibrate, which means you only need to hit one photoresistor with your flashlight beam. If your photoresistors are too close together and facing in the same direction, it might be impossible to hit just one of them without also hitting the other. Try spacing your photoresistors farther apart or angling them away from each other more.
Q: How does the light sensor work?
A: Note: To understand this answer and some of the following answers about how the circuit works, it will help if you are familiar with voltage, resistance, and current. See the references in the Bibliography to learn more about these topics.

In order to make a light sensor, the photoresistor and potentiometer are combined to make a voltage divider. A voltage divider is a simple circuit made from two resistors, R1 and R2 (Figure 2). It takes an input voltage (Vin) and outputs a different voltage (Vout), according to Equation 1 (which can be derived based on Ohm's law—see the Bibliography):

Equation 1:

  • Vin is the input voltage in volts (V).
  • Vout is the output voltage in volts (V).
  • R1 is the first resistance in ohms (Ω).
  • R2 is the second resistance in ohms (Ω).
resistive voltage divider
Figure 2. Circuit diagram for a voltage divider.

In your circuit, the photoresistor will be R1 and the potentiometer will be R2. Remember that the resistance of a photoresistor decreases when it is exposed to bright light. From Equation 1, we can see that when R1 is very large (R1 >> R2), Vout gets very small (Vout << Vin). When R1 is very small (R1 << R2), Vout is roughly equal to Vin (Vout ≅ Vin). This means that the light sensor outputs a high voltage when it detects light, and a low voltage when it does not.

Q: How does a MOSFET work?
A: MOSFET stands for metal-oxide-semiconductor field-effect transistor (so you can see why it is a lot easier just to say "MOSFET"). The three pins of a field-effect transistor are called the gate, drain, and source. Unlike a bipolar transistor, which is controlled by a small current applied to the base pin, a field-effect transistor is controlled by a voltage applied to the gate pin, but the gate does not actually draw any current. A voltage applied to the gate causes current to flow between the drain and source pins.

Figure 3 shows a simplified explanation of how a MOSFET works. A voltage is applied to the gate pin in order to control the flow of current between the drain and source pins. When the voltage between the gate and source pins (VGS) is below a certain limit, called the threshold voltage (Vth), no current flows. When VGS exceeds Vth, the MOSFET begins to conduct, allowing current to pass through. This is what allows you to use the gate voltage of a MOSFET to turn a DC motor on and off. For this robot, the MOSFET's gate voltage is controlled by the voltage divider.

how a MOSFET works
Figure 3. Simplified explanation of a MOSFET's operation.

The exact description of how a MOSFET works is more complicated than this. As VGS increases past Vth, the current through the MOSFET will continue to increase. Eventually the MOSFET will reach saturation, where no additional current can flow, even if VGS continues to increase. The MOSFET's behavior will also depend on the type of load to which it is attached. The MOSFET used in this project is an N-channel MOSFET, which requires a positive gate voltage to turn on. A P-channel MOSFET requires a negative gate voltage to turn on. Advanced users can refer to the Bibliography for more information on MOSFETs.

Q: How does the circuit work? What is the circuit diagram?
A: The two questions above explain two key components of the circuit: voltage dividers and MOSFETs. How do you combine these, along with all the other components listed in the procedure, into a single circuit that can control two motors to allow a robot to steer left and right in response to light? Figure 4 shows the complete circuit diagram for the entire robot (refer to the reference "How to Read a Schematic" in the Bibliography if you are not familiar with circuit diagrams). Look closely and you will see that it is actually two copies of the same circuit, one for each motor.
circuit diagram for light following robot
Figure 4. A complete circuit diagram for the light-following robot.

The circuit diagram might look confusing at first, but it just consists of things you have already read about. Let us just look at the left-hand side of the circuit (the same explanation applies to the right-hand side):

  • The battery pack supplies a voltage Vbatt to the circuit. For this project, you will use two AAA batteries, which provide about 3 V.
  • The switch controls whether or not the battery pack's positive terminal is connected to the circuit. When the switch is open, V1 is "floating" (not connected to anything), so the circuit has no power. When the switch is closed, V1 is equal to the battery voltage.
  • The photoresistor (R1) and potentiometer (R2) form a voltage divider. The input to this voltage divider is V1, and the output is V2.
  • The potentiometer can be used to tune the voltage divider's output (can you figure this out by examining how Equation 1, above, depends on R2?). This allows you to adjust the robot's sensitivity to ambient light levels.
  • The output of the voltage divider is connected the input (the gate) of the MOSFET. The source of the MOSFET is connected to ground (0 V). So, for this circuit, VGS = V2. When V2 exceeds the threshold voltage Vth, the MOSFET will turn "on."
  • The motor is connected between the positive voltage supply and the MOSFET's drain pin. When the MOSFET is "off," the drain pin's voltage is close to the battery voltage, so no current can flow through the motor. When the MOSFET is "on," the drain pin's voltage drops, allowing current to flow through the motor, into the MOSFET's drain pin, then out of its source pin to ground.
Q: How did you make the breadboard diagrams for this project?
A: The breadboard diagrams for this project were created using Inkscape, a free vector graphics program. You can find free scalable vector graphic (SVG) files for many circuit components on Wikimedia Commons. There are other free programs specifically for making breadboard diagrams, such as Fritzing.

Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Ask an Expert

Contact Us

If you have purchased a kit for this project from Science Buddies, we are pleased to answer any question not addressed by the FAQ above.

In your email, please follow these instructions:
  1. What is your Science Buddies kit order number?
  2. Please describe how you need help as thoroughly as possible:


    Good Question I'm trying to do Experimental Procedure step #5, "Scrape the insulation from the wire. . ." How do I know when I've scraped enough?
    Good Question I'm at Experimental Procedure step #7, "Move the magnet back and forth . . ." and the LED is not lighting up.
    Bad Question I don't understand the instructions. Help!
    Good Question I am purchasing my materials. Can I substitute a 1N34 diode for the 1N25 diode called for in the material list?
    Bad Question Can I use a different part?

Contact Us

Related Links

News Feed on This Topic

, ,
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Looking for more science fun?

Try one of our science activities for quick, anytime science explorations. The perfect thing to liven up a rainy day, school vacation, or moment of boredom.

Find an Activity