Build a Speedy Light-Tracking Robot (BlueBot Project #2)
|Areas of Science||
|Time Required||Short (2-5 days)|
|Prerequisites||You will need to know how to use a breadboard to do this project. See the Science Buddies reference How to Use a Breadboard if you have not used a breadboard before.|
|Material Availability||A kit is available from our partner Home Science Tools.|
|Cost||High ($100 - $150)|
|Safety||Short circuits can get very hot and present a burn hazard. Be careful to follow the directions in the Procedure in order to avoid short circuits when building your robot.|
AbstractHave you ever seen a cat chase a laser pointer or a flashlight beam? What if you could make a robot do that? In this project, you will build a robot that can automatically drive toward a bright light source. The robot uses a simple electronic circuit to track light, so there is no computer programming required! You can also do three other robotics projects using the same kit of parts, so this is a great way to get started with robotics before moving on to more advanced projects.
Build a light-tracking robot and make adjustments to improve the robot's performance.
Ben Finio, PhD, Science Buddies
Thanks to Howard Eglowstein, Science Buddies, for help with circuit design.
Cite This PageGeneral 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.
Last edit date: 2018-09-21
Have you ever wanted to build your very own robot, but did not know where to start? In this project, you will build a fun, relatively simple robot, with no computer programming required. The robot in this project uses light sensors, which are electronic components that can detect light; they will help the robot follow a flashlight beam—just like a cat uses its eyes to track a laser pointer. Figure 1 and the video show what the robot looks like and how it works.
Figure 1. The light-following robot that you will build in this project.
Can you figure out how you would steer the robot, based on watching the video? Figure 2 shows a diagram of how the robot reacts to a flashlight. A flashlight can be used to "guide" the robot by steering it forward, left, or right.
Figure 2. A diagram showing how the robot reacts to light.
How exactly does this work? The robot uses a special electronic circuit to control the speed of two motors through the use of two light sensors. The motors are connected to the robot's wheels, which allow it to drive around. Figure 3 shows a simplified diagram of this process (continue reading for a more detailed description of the circuit). If both light sensors detect the same amount of light, the wheels spin at the same speed, so the robot goes straight. If one light sensor detects more light than the other, one wheel will spin faster, which will make the robot turn.
Figure 3. A simplified diagram of how the robot works. The robot's circuit detects bright light (for example, from a flashlight). The circuit then sends electrical signals to the robot's motors to turn them on. The motors drive the robot's wheels, which make the robot move and steer.
In this engineering project, you will follow step-by-step directions to build a light-following robot. You will then follow the Engineering Design Process to make some adjustments to your robot to improve its performance. While previous experience with electronics will be helpful in building the robot, it is not required. If you would like to get started building your robot right away, you can move on to the Procedure. For more information about how the robot works and what the different parts of the circuit do, continue reading the rest of the Introduction. For a detailed explanation of the robot's circuit (for advanced students or robotics/electronics hobbyists), including a complete circuit diagram, see the Help section.
The rest of the Introduction contains more details about the electronic components used in the circuit. The following information is provided as a reference, and you do not need to fully understand it in order to do the project. If are ready to just start building the robot, you can move on to the Procedure.
If you would like to read the rest of the Introduction, it will help if you are familiar with basic electronics terms like voltage, current, and resistance. Science Buddies has many beginner and intermediate level electronics projects, an Electronics Primer, and an Electricity, Magnetism, & Electromagnetism Tutorial that can help you learn more about these topics. You can also refer to the Bibliography for more information.
For a complete technical explanation of how the circuit works, including a circuit diagram, see the Help section.
The circuit you will build in this project uses a variety of electronic components. All of the components are combined on a chassis, or plastic base for the robot, which includes wheels. Some of the components, like batteries and switches, you probably use every day (even if you do not notice it). Others, like diodes and transistors, might be new to you if you have not done an electronics project before. Table 1 has pictures and descriptions of each component you will use in this project. For a more detailed explanation of what each component does in the circuit, see the Help section.
||This is the power supply for your robot. Battery packs come in all shapes and sizes. The one in this project holds 4 AA batteries.|
||A breadboard allows you to quickly and easily connect wires and electronic components in order to build a circuit. The connections are not permanent, so you can easily move things around if you make a mistake.|
||You use switches every day to turn lights and appliances on and off. This is a tiny switch that fits on a breadboard, to let you turn your robot on and off.|
||Jumper wires are short wires used to make electrical connections on a breadboard. They come with many colors of plastic insulation, which makes it easy to color-code and organize complicated circuits.|
||Electrical current causes a motor to spin. Two motors drive the robot's wheels. This type of motor runs on direct current (DC) from a battery (as opposed to alternating current [AC] from a wall outlet).|
||A MOSFET is a special type of transistor, which acts like a control valve to let electrical current flow. As an analogy, think of how a valve can control the flow of water through a garden hose. In this circuit, the MOSFETs control the flow of current through the motors. See the Help section for more detailed information about MOSFETs, including what MOSFET stands for.|
||A diode is like a one-way valve for electricity. It only lets current flow in one direction. In this circuit, diodes are used to protect the MOSFETs from voltage spikes that can be caused by abruptly stopping the motors.|
||A potentiometer is a type of variable resistor. Resistors resist the flow of electrical current. Turning the knob adjusts its resistance. In this circuit, potentiometers are used to adjust the robot's sensitivity to light levels.|
||A photoresistor, also called a "photocell" or "light-dependent resistor (LDR)", is a resistor that is sensitive to light. In darkness, it has a very high resistance. In bright light, it has a very low resistance. In this circuit, two photoresistors are used to detect light and help the robot steer.|
So, how exactly do you combine all of these different components into a circuit that allows you to steer a robot left and right? There are two main parts to the circuit that can be connected together:
- The potentiometer and photoresistor (which are both a special type of resistor) are combined to make something called a voltage divider (see the Help section for more details about voltage dividers). The photoresistor is used to detect light. When the photoresistor does not detect much light, the voltage divider outputs a low voltage. When the photoresistor is exposed to bright light, the voltage divider outputs a high voltage. The potentiometer is used to adjust the threshold between "bright" and "dim" light (you will learn more about this in the Procedure).
- The MOSFET acts like a valve that controls the motor. When the input of the MOSFET receives a low voltage, the motor is off. When the input of the MOSFET receives a high voltage, the motor turns on.
Can you see how these two things can be connected to control a robot that responds to light? The trick is to connect the output of the voltage divider to the input of the MOSFET. Figure 4 shows a diagram of this process.
Figure 4. A diagram illustrating how the circuit works.
Remember that the robot actually has two copies of this circuit, one on the left and one on the right. A light sensor that detects more light will cause the motor to spin faster. So, when the two sensors detect different light levels, one motor will spin faster than the other, causing the robot to turn.
There are different factors that influence the robot's performance. The potentiometers are used to adjust the sensitivity of the light sensors (meaning, change the voltage they output for a certain amount of light). The photoresistors are on long, flexible leads (kind of like antennas) that let you aim them in different directions. How do you think these factors could affect how the robot performs? In this project, you will build your own robot and find out. Move on to the Materials and Procedure sections to get started building your robot.
Remember that if you would like a complete technical explanation of how the robot works, including a full circuit diagram, see the Help section.
Terms and Concepts
- General electronics and robotics terms:
- Light sensor
- Circuit components:
- Battery pack
- Barrel jack
- Barrel jack breadboard adapter
- Jumper wires
- DC motor
- Advanced terms (see Help section):
- Voltage divider
- Ohm's law
- Threshold voltage
- N-channel MOSFET
- P-channel MOSFET
- What is a robot? What different kinds of robots are there, and what do they do?
- How can light sensors be used to steer a robot?
- How do you think adjusting the robot's sensitivity to light will affect its steering?
- How do you think adjusting the aim of the light sensors will affect the robot's steering?
- Advanced questions:
- How does a voltage divider work?
- How does a MOSFET work?
- How does the robot's circuit work?
These beginner references will be useful if you are just starting out with electronics and robotics:
- Finio, B. (2015, September 5). How to Use a Breadboard. Retrieved June 23, 2016, from http://www.sciencebuddies.org/science-fair-projects/breadboard-tutorial
- Science Buddies staff (n.d.). Electronics Primer: Introduction. Retrieved September 8, 2015 from http://www.sciencebuddies.org/science-fair-projects/project_ideas/Elec_primer-intro.shtml
These references will be useful for students who want to learn more about how the circuit works, and about electronics in general:
- Lindblom, J. (n.d.). How to Read a Schematic. SparkFun Electronics. Retrieved June 2, 2014, from https://learn.sparkfun.com/tutorials/how-to-read-a-schematic
- Taylor, C. (n.d.). Voltage, Current, Resistance, and Ohm's Law. SparkFun Electronics. Retrieved June 2, 2014, from https://learn.sparkfun.com/tutorials/voltage-current-resistance-and-ohms-law/electricity-basics
These references contain specific information about some of the circuit components used in this project:
- Lindblom, J. (n.d.). Voltage Dividers. SparkFun Electronics. Retrieved June 4, 2014 from https://learn.sparkfun.com/tutorials/voltage-dividers
- Storr, W. (2014, June 2). The Mosfet. Electronics Tutorials. Retrieved June 4, 2014, from https://www.electronics-tutorials.ws/transistor/tran_6.html
- Lindblom, J. (n.d.). Resistors. SparkFun Electronics. Retrieved June 19, 2014, from https://learn.sparkfun.com/tutorials/resistors
News Feed on This Topic
- BlueBot: 4-in-1 Robotics Kit, available from our partner
Home Science Tools.
You will need the following components from the kit (the kit also contains additional parts for three other projects). See the
Background tab for pictures if you are not sure what a part looks like.
- Blue plastic robot chassis (includes wheels, motors, and 4xAA battery holder)
- AA batteries (4)
- Jumper wire kit
- Power switch
- Diodes (2)
- MOSFETs (2)
- Photoresistors (2)
- 10 kΩ potentiometers (2)
- You will also need the following materials, not included in the kit:
- Small Phillips-head screw driver
- Double-sided foam tape
- Lab notebook
- Optional: Wire cutters (can be used to shorten the metal leads on some parts of your circuit, making the circuit "neater")
- Optional: Needle-nose pliers or tweezers (will make it easier to handle small circuit components)
Recommended Project Supplies
Assembling Your BlueBot Chassis
- Follow the instructions in the video to assemble your robot chassis.
- Your kit comes with printed directions for assembling the chassis, but we recommend watching the video so you fully understand how all the parts fit together.
- The blue plastic parts come with a thin layer of protective plastic coating. Peel this coating off before assembling your chassis.
- We also recommend using double-sided foam tape to attach the battery holder to the top of the chassis, as shown in Figure 5. The printed directions recommend putting the battery holder in-between the two chassis plates, but this makes it harder to change the batteries.
- You will have some extra parts when you are done, including screws, nuts, and blue plastic gears. Put these parts aside for now; you will not need them for this project.
Figure 5. A completed BlueBot chassis with breadboard and battery pack on top.
Figure 5. A completed BlueBot chassis with breadboard and battery pack on top.
Assembling Your Circuit
- To build your circuit, you will need to know how to use a breadboard. Watch the video and see the Science Buddies reference How to Use a Breadboard to learn how to use a breadboard.
- Now that you know how to use a breadboard, you are ready to assemble your BlueBot circuit. Table 2 shows a list of all the components in the circuit and where they go on the breadboard.
You can download and print a PDF of this table—complete with checkboxes to track each step—to use while you are building your robot.
You can also view a slideshow that shows breadboard diagrams of the circuit. Follow along in the table and/or slideshow to build your circuit one component at a time. Your finished circuit should look like the one in Figure 6. Pay attention to these notes:
- Remember to push all components firmly into the breadboard.
- All references to orientation (up, down, left, and right) assume you have the breadboard "right-side up," so the writing is facing you.
- Your jumper wire kit comes with an assortment of colors, and the colors may vary. It does not matter what color jumper wires you use. Your colors do not need to match the colors in the diagrams. In general, you should use the shortest wires possible, to help keep your circuit neat.
- Insert the batteries last. If you see or smell smoke when you insert the batteries, you have a short circuit somewhere. Immediately remove the batteries and re-check your wiring.
||F1, F2, F3||The direction in which it is facing does not matter, but make sure to slide the switch down (toward row 30, away from row 1), this is the "off" position.|
||J2 to (+) bus||Color does not matter.|
||J12 to (-) bus||Color does not matter.|
||J19 to (-) bus||Color does not matter.|
||Left side (+) bus to right side (+) bus||Color does not matter.|
|Jumper wire||Left side (-) bus to right side (-) bus||Color does not matter.|
|Potentiometer||G11, G12, G13||Direction matters; pins should be on the left.|
|Potentiometer||G18, G19, G20||Direction matters; pins should be on the left.|
|Jumper wire||E11 to F11||Color does not matter.|
|Jumper wire||E18 to F18||Color does not matter.|
|MOSFET||C11, C12, C13||Writing should face to the left, large silver tab should face to the right.
Note: the writing on your MOSFET may differ from the picture. This is OK.
|MOSFET||C18, C19, C20||Writing should face to the left, large silver tab should face to the right.
Note: the writing on your MOSFET may differ from the picture. This is OK.
|Jumper wire||A13 to (-) bus||Color does not matter.|
|Jumper wire||A20 to (-) bus||Color does not matter.|
|Photoresistor||A11 to (+) bus||Direction does not matter.|
|Photoresistor||A18 to (+) bus||Direction does not matter.|
|Diode||A12 to (+) bus||Gray band must face to the left.
Optional: Shorten the leads.
|Diode||A19 to (+) bus||Gray band must face to the left
Optional: Shorten the leads.
|Top motor||Red lead to (+) bus
Black lead to E19
|When the robot is driving forward, this is the "right" motor.|
|Bottom motor||Red lead to (+) bus
Black lead to E12
|When the robot is driving forward, this is the "left" motor.|
|Battery holder||Red lead to J1
Black lead to (-) bus
|Do not insert batteries until the circuit is complete.|
|AA battery||N/A||Insert into battery holder. Make sure (+) signs on batteries line up with (+) signs in battery holder.|
Slideshow with step-by-step instructions viewable online.
Click through the slideshow for step-by-step breadboard diagrams of the circuit.
Figure 6. Your completed circuit should look like this.
Testing the Robot
You are finally ready to start testing your robot! Remember that now you will need to follow The Engineering Design Process to get your robot working. Follow these steps to learn how to use your robot.
- Double-check your circuit against the breadboard diagrams in the previous section. Remember that just one misplaced wire can prevent the circuit from working properly.
- Hold the robot's chassis in one hand so the wheels are off the ground. Turn the robot's power switch "on" by sliding it up, toward row 1 on the breadboard. Check Table 3 to see what you should do next.
|Observation||What to do|
|I see or smell smoke.||Immediately turn your robot off. You have a short circuit somewhere. Re-check your wiring against the breadboard diagrams in the previous section.|
|The wheels spin forward.||Your robot works! Move on to the next step.|
|One or both wheels spin backwards.||Reverse the red and black wires for that motor if a wheel is spinning backwards.|
|The wheels do not spin at all.||Try holding the robot's light sensors up to a bright light. Turn the potentiometer knobs all the way clockwise. The wheels should start spinning.|
|The wheels still do not spin.||Part of your circuit is connected incorrectly. Re-check your circuit against the wiring diagrams, and see the Help section for more details.|
- The potentiometers adjust your robot's sensitivity to ambient light levels (the normal light levels in a room). Your goal is to make sure the robot does not respond to regular ambient light, and that it does follow around a brighter flashlight beam.
- Turn both potentiometers all the way counterclockwise. This should turn the motors off (for more information on how the circuit works, see the Help section).
- Slowly turn the potentiometers clockwise, one at a time. This gradually increases the circuit's sensitivity to ambient light. Eventually, the motors should start spinning slowly.
- Turn the potentiometers slightly counterclockwise again, until the motors just turn off. You have set the motors just below the threshold for detecting ambient light.
- Now, aim a flashlight directly at your robot's light sensors, or hold the robot very close to a light. This brighter amount of light should activate the sensors and cause the motors to spin.
- Depending on the lighting in the room, you may need to continue to adjust the potentiometers slightly. For example, an open window on a sunny day or a bright lamp in a corner might cause the robot to move. Your goal is to make sure the robot does not respond to these light sources, and that it only responds to your flashlight. If your potentiometers are adjusted asymmetrically (one is turned farther than the other), this may cause your robot to steer more in one direction.
- Put the robot on the floor and try guiding it with a flashlight. Make sure you aim the flashlight at the photoresistors and not at the front of the robot or the floor in front of the robot. Can you control whether the robot goes forward, left, or right? It might be rather difficult to steer; go to the next step to find out why.
- The photoresistors have long, flexible leads that let you adjust their aim. Which way they are facing can have a big impact on how easy the robot is to steer. If they are right next to each other, they will always get hit by the same amount of light, so it will be very hard to steer the robot left or right. If they are too far apart, it will be hard to illuminate them evenly, so it will be hard to make the robot go straight. You can also adjust whether they are aimed forward or up, straight ahead or outward, or even diagonally. Try adjusting the photoresistors to different positions, and see which position makes it the easiest to steer your robot. Figure 7 shows several different positions for the photoresistors.
Figure 7. Different positions and orientations for the photoresistors. Top left: Photoresistors close together, facing forward. Top right: Photoresistors spaced apart, facing forward. Bottom left: Photoresistors spaced apart, facing upward. Bottom right: Photoresistors spaced apart, facing diagonally outward.
- Continue to make adjustments to the photoresistors and potentiometers until you can easily guide your robot around with a flashlight. Can you navigate the robot through a maze or obstacle course using the flashlight?
- There are several other robotics projects you can do with your chassis. See the Variations section for some ideas.
Looking for more robot fun? Explore the World of Robotics with This Suite of Projects!
For troubleshooting tips, please read our FAQ: Build a Speedy Light-Tracking Robot (BlueBot Project #2).
Keep the fun going! Find local opportunities related to this project.Register on ActivityHero
If you like this project, you might enjoy exploring these related careers:
- There are three other projects you can do with your BlueBot kit. Since you have already assembled your chassis, all you need to do is build a new circuit.
- Use the long male-female jumper wires that came with your kit, and mount the light sensors to the front of your robot's chassis, angled down toward the floor. Can you now get the robot to "chase" a flashlight beam aimed at the floor in front of it (kind of like a cat chasing a laser pointer)?
- A "bristlebot" is a small robot that uses vibration motors instead of geared DC motors, and toothbrush heads instead of wheels. You can put the same circuit you used in this project on a bristlebot to build a miniature version of the robot. See the Science Buddies project Build a Light-Tracking Bristlebot for directions.
- The Arduino is a very popular type of microcontroller used in robotics. It lets you write a computer program that can read inputs from sensors and use them to control motors. This gives you more precise "control" over you robot's behavior. Can you build a programmable light-tracking robot by adding an Arduino to your chassis? See our Getting Started with Arduino page to learn more.
Looking for more robot fun? Explore the World of Robotics with This Suite of Projects!
Frequently Asked Questions (FAQ)
- My wheels do not spin at all. What should I do?
- Only one of my robot's wheels is spinning. What is wrong?
- My robot is going backwards! What should I do?
- I have double-checked everything and my robot still does not work. How can I check if something is broken?
- How does the light sensor work?
- How does a MOSFET work?
- How does the circuit work? What is the circuit diagram?
- What are the circuit diagram symbols for the components in this project?
- How did you make the breadboard diagrams for this project?
- Double-check your circuit to make sure that it exactly matches the breadboard diagrams from the Procedure.
- Make sure all of your jumper wires and component leads are pressed firmly into the breadboard. You can read about other common breadboard mistakes in the the Common Mistakes section of the Science Buddies reference How to Use a Breadboard.
- Make sure your batteries are properly inserted into the battery pack, and that the "+" symbols on the batteries line up with the "+" symbols on the battery pack.
- Make sure the power switch for your robot is toggled "on" (the slider should be pushed toward row 1 at the top of the breadboard).
- Turn both potentiometers all the way clockwise, then hold the robot directly up to a bright light source. Do the wheels spin?
- If not, turn both potentiometers all the way counterclockwise (just in case you put them in the breadboard backwards). Hold the robot directly up to a bright light source. Do the wheels spin?
- If you have been using your robot for a long time, or did some of the other BlueBot projects first, your batteries may be dead. Try putting fresh batteries in your robot if none of the other steps work.
- If your robot still does not turn on, follow these steps to see if the problem is with your power switch:
- Remove the power switch from the breadboard, flip it around, and put it back into the same breadboard holes (F1, F2, and F3). If you are confused about which way to rotate the switch, see this video.
- Slide the power switch to the "on" position ("up" towards row 1 of the breadboard) and try testing your robot again. If your robot works after making this change, you can continue with the project, but please contact us at firstname.lastname@example.org to let us know this happened.
- If your robot still does not work after flipping the power switch around, bypass the power switch entirely. Connect the battery pack's red lead directly to the breadboard's power bus instead of hole J1. This connects the battery pack directly to the rest of the circuit. To turn the robot off again, you will have to temporarily disconnect this wire.
- Now, re-try testing your robot. If your robot works, you can continue with the project, but please contact us at email@example.com to let us know the switch did not work in either direction.
- If your robot still does not work, even after you have tried the previous steps, the problem is elsewhere in your circuit and not with the power switch. If you are having trouble figuring out what is wrong with your robot, you can ask a question in our Ask an Expert: Answers to Your Science Questions forums.
Figure 8. On the top, the motor's red wires are connected to the power bus, and the black wires are connected to the MOSFET's drain pins (holes E12 and E19). If this configuration makes your robot drive backwards, just switch the red and black wires for each motor, to match the image on the bottom. Connect the black wires to the power bus, and the red wires to the MOSFET drains. Do not worry about violating standard color-coding conventions; all this does is reverse the direction in which the motors spin.
- Try plugging your motor's leads directly into the buses on your breadboard (for each motor, one lead to the power bus, one lead to the ground bus). If the motors turn on, then you know that they are working, and the problem is elsewhere in your circuit. If the motors do not turn on, that does not necessarily mean they are broken. There might be a problem with your power supply (see next point).
- Check your breadboard's power supply.
- Set your multimeter to measure DC volts. Four fresh AA batteries should provide just over 6 V.
- Turn your power switch on and measure the voltage between the breadboard's buses. If you do not read a voltage, there may a problem with your power switch (see the first question in this FAQ), but you should also double check that your power switch and the red jumper wire from hole J2 to the power bus are in the right place.
- Unplug the red and black battery pack leads and measure the voltage of the battery pack directly. If you get a reading, then you know your battery pack is working, and the problem is with your breadboard connections or the power switch. If you do not get a reading, make sure all the batteries are in the correct orientation in your battery pack, and that none of the metal clips and springs that hold the batteries in place are loose.
- Check the output of the light sensor.
- Measure the voltage between the first MOSFET's gate (row 11 on the left side of the breadboard) and ground. This is the output of the light sensor. The voltage should change when you turn the potentiometer. It should also change when you shine bright light on the photoresistor. If the voltage does not change at all, then your photoresistor and potentiometer may be wired incorrectly. Repeat this for the second half of the circuit (MOSFET gate at row 18).
- If the voltages changes, and goes above roughly 3–4 V with bright light, then your motors should turn on. If you previously checked to make sure your motors work (see above), and they still will not turn on, then the problem is elsewhere in your circuit. You know the individual components are functioning so nothing is "broken." Double and triple-check all your breadboard connections. Remember that just one misplaced wire can prevent the whole circuit from working.
- 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 (Ω).
Figure 9. 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.
Figure 10 shows a simplified explanation of how a MOSFET works. A votage 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.
Figure 10. 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.
Figure 11. A complete circuit diagram for the light-following rbot.
The circuit diagram might look confusing at first, but if you look closely (refer to the symbols in Table 3 if necessary), you will see that 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 four AA batteries, which provide about 6 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 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.
- Finally, each motor has a diode connected across its terminals. Motors can create large voltage spikes when they abruptly come to a stop (this has to do with the relationship between electrical current and magnetic fields, if you want to do more research on the explanation). The diodes help prevent damage to the MOSFET by safely discharging the current generated by the voltage spike.
|Item name||Picture||Breadboard Diagram Symbol||Circuit Diagram Symbol|
Ask an ExpertThe 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 UsIf 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:
- What is your Science Buddies kit order number?
- 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?
News Feed on This Topic
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
Explore Our Science Videos
Stretchy Balloons! Fun STEM Activity
BlueBot 4-in-1 Robotics Kit
Make a Water Strider - STEM Activity