Light Following Robot

by IObrizio in Circuits > Robots

327 Views, 5 Favorites, 0 Comments

Light Following Robot

IMG_20221203_102303-01.jpeg
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

IMG_20200419_230456.jpg
  • 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.

Downloads

Block Diagram

robot1.png

Describing the circuit

The are 3 primary stages to make this robot work.


Sensor Input

robot2.png

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.


Control

robot3.png

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.


Power Ouput

robot4.png

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.


The Prototype

IMG_20200419_230436.jpg
IMG_20200419_230450.jpg
IMG_20200419_221632.jpg
IMG_20200419_221512.jpg

I assembly the robot on a breadboard and keeping it in place with tape.

PCB DESIGN

Captura de pantalla 2023-02-08 231821.png
bot pcb robot.jpg
top.jpg
robor.PNG

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.




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.

Unboxing PCB

unboxing pcb line following robot

Testing

testing robot output signal
IMG_20221204_234803.jpg
IMG_20221205_222942.jpg
IMG_20221205_223037.jpg
IMG_20221205_222838.jpg

Testing the board.

Assembly

Ibom robot

Use the interactive iBom file for reference.


It's Alive

light following robot test