Introduction: Light Following Robot
Light following robot
Robotics was the first topic that got me to electronics, I was amazed how small devices with all kinds of wheels, legs and sensors work together to achieve a specific task, sometimes climbing, driving or even fighting & cooking.
Today I’m working on several robots for STEM electronics, the first of them is the light following robot, it should be easy, fun & cheap to build, this is my way to share the same way I was introduced to electronics and I hope you enjoy it.
Supplies
- 470uF Electrolitic Capacitor x 1
- 100nF Ceramic capacitor x 1
- 10k Photoresistor x 2
- 2.2k Resistor x 2
- 560ohm Resistor x2
- RED LED x 2
- 1N4148 x 2
- LM358 x 1
- Switch DPDT x 1
- Terminal block Pitch 5.08mm x 3
- BC547C x 2
- 10k Potentiometer_Bourns_3386F_Vertical x 1
- Pololu bracket N20 x 2
- Free wheel x 1
- Pololu motorN20 x2
- PCB directly on this link
Use the iBOM file as reference for assembly, it's interactive. Check the video.
Attachments
Step 1: Block Diagram
Describing the circuit
The are 3 primary stages to make this robot work.
Step 2: Sensor Input
This stage “reads” the information from the sensors; in this application, we use two LDR “light dependent resistors” or “photoresistors”; these sensors change their resistance concerning the light they receive.
Step 3: Control
Control
This stage decides if the motor must be turned on or off according to the sensor reading; the heart of this module is an operational amplifier, better known as “opamp” in a comparator configuration.
An opamp in comparator mode compares input X to input Y and brings an output state; as a result, 1 = TURN ON or 0 = TURN OFF.
Vref is a voltage divider that sets our trigger to turn on a motor.
The two sensor forms a voltage divider that swings the value from 0 to 5v depending on the amount of light received.
If the voltage from the sensor signal is bigger than Vref, the output will be ON or 1, true or close to VCC.
This circuit tends to oscillate, that’s means that it will be on and off constantly; this is because one side tries to be in equilibrium and, when it reaches, the other side tries to do the same, like a back-and-forth in a forever loop. When they have the same amount the light on both sensors, the robot will be going straight; if one side receives less light, it will try to correct the course.
Step 4: Power Ouput
The power stage boosts the control signal, wich makes it stronger; the opamp output hasn’t enough power to drive a dc motor directly, thats why we use this part of the circuit.
There is an LED in parallel with the output to show the status of the stage.
Step 5: The Prototype
I assembly the robot on a breadboard and keeping it in place with tape.
Step 6: PCB DESIGN
The board was designed with Kicad, it's a 2 layer PCB.
The PCB was manufacture by Seeedstudio , I've been working with them for long time ago,I'm pleased with the result, great quality and service.
- If you want to order the PCBs directly on this link, the files are ready & tested.
- The main files for the gitlab project link.
It's a 2 layer board with through hole components, the pads are bigger to easy the soldering
You can power upthe robot from 3v.
Step 7: Unboxing PCB
Step 8: Testing
Testing the board.
Step 9: Assembly
Use the interactive iBom file for reference.