Introduction: Simple Line Follower Robot With No Programming - Analog Line Follower

About: I'm 20 years old and a 3rd year Electronics Engineering student at ITBA, Argentina

Hi! This is a line follower robot that requires no programming, instead, the behaviour of the robot is determined by an electronic circuit. This build is fairly simple and if you have all the materials it will most likely take less than 2 hours to build and test it.

Tools needed:

  • Soldering Iron and solder
  • Wire Snips
  • Needle Nose Pliers
  • Hot Glue Gun

Materials needed:

  • 1 x Perfboard / Dot PCB
  • 2 x low-voltage small DC motors
  • 2 x plastic bottle caps
  • 1 x Double AA battery holder
  • 1 x 5mm LED
  • 2 x CNY70 infrared sensors
  • 2 x 220 ohm resistors
  • 2 x 10k ohm resistors
  • 2 x 1k ohm resistors
  • 1 x 10k trimpot
  • 1 x Dual Operational Amplifier IC such as the LM358
  • 2 x BC547 NPN transistor (could be another NPN transistor)
  • 1 x pin strip
  • Some cables, I used some from an UTP/Ethernet cable

Step 1: Making the Circuit

The circuit for this robot consists of 3 parts. The first is the CNY70 sensors, and the circuit for them is in the first image. Where it says A0, the voltage changes analogically to the amount of light reflected on the surface. To distinguish between black and white surface, we will need a comparator which outputs a HIGH or LOW voltage depending on the voltage threshold determined with the trimpot. The second image shows the circuit for the comparator, you can later adjust the trimpot to set the correct sensitivity for your surface. In the last image, there is the circuit to drive two motors from the output of the comparator and using 2 transistors to manage the current.

VERY IMPORTANT: You should connect the left sensor with the right motor and the right sensor with the left motor, you can see an explanation of why this will make the robot work in the pictures.

Tip: You can solder a LED on the front just as a supporting point so that the sensors don't scrape with the floor.

Step 2: Assemble and Test the Robot

The battery holder and the motors can be hot glued to the board. Two bottle caps can work as wheels and if they slip a simple rubber band wrapped around will fix it. The caps can be screwed on in some motors or hot glued.

You can now test your robot, don't forget to connect your motors and put on batteries. Also, make sure to turn the trimpot to the position where the robot works the best.

Good luck!