Posts Tagged ‘line follower’

A line follower is just like a hello world in robotics. Many have been made and nowadays are based on arduino boards, this time I want to go old school and build this simple line follower from parts on my bin. The DS89C430 is a fast 8051 core variant from Maxim, before the era of arduino these are the microcontrollers that only requires UART connection and do not require a external programmer to load the bootloader because it is loaded with bootloader already from the factory and only a terminal program is required to load the hex file generated from the assembler or compiler.

This line follower consist of 3 TCRT5000 reflective IR sensors that goest to a LM339 quad comparator that gives the microcontroller a high or low signal when a black line is detected or not. A L9110S motor driver module was used to drive the two DC motors in differential drive mode. The whole project is powered by a single 3.7V 18650 battery from an old laptop battery pack. The output is fed to a boost converter based on the classic MC34063 to boost the battery voltage to 5V. The complete schematic is show below.


Schematic Diagram

The whole project is built on a strip board with mixed thru hole and surface mount components depending on what I have on my bin.



And now the code! Basically a logic based on its position on the track. One motor is stopped to make a turn. The code is compiled with SDCC.


Voila! a nice line follower that can navigate even a complicated track! See the video demo below

Getting started with mobile robots, we definitely need a platform where we can fit the electronics of our robot and make it move. In this tutorial we will be making a cheap mobile robot platform from a toy commonly called as tumbling car here in the Philippines. It can be bought almost anywhere specially on Chinese discount stores at 40-50 pesos.

The Materials:

2 – Tumbling car

1 – Small screwdriver

1 – Side Cutter or small saw

1 – Super glue


Let’s get started:

First, unscrew the top cover by removing the two screws at the bottom side of the toy

Toys with top cover removed

Next, remove the wheels opposite the motor and the gearbox as shown

Trim down the shaft for proper alignment

Put super glue all around on one of the cars


Align and put them together

You may add a plastic or metal link for more strength and ruggedness against bumps like the one shown below

Wait for the superglue to dry and voila!, you now have a less than 200 Pesos robot platform in less than 30 minutes

Line Follower
Here is a low cost line follower for steer type chassis like the one used in remote control car toys.

The circuit consist of three parts, the sensor, logic, and speed controller for the drive motor. The sensor is formed by two IR pairs and fed to a comparator to condition  the signal before it goes to the logic circuit. The logic circuit is basically a SR latch formed from NAND gates. Since the output of the SR latch is logic 1 for Q and ~Q when the input is both logic “0” we invert this to protect the h-bridge. We used the two remaining NAND gates to become an inverter. Thus the logic circuit is only a single chip using a quadruple two input nand gate 74LS00.  The logic truth table is show below:

One problem that I encountered during my early design of this kind of mobot is controlling the speed of the drive motor.  When the mobot is too fast and the steering  of the car is not good the mobot might get out of track. In this version I added a PWM controller using a 555 timer with varying pulse width to control the speed of the drive motor.