One of the interesting parts in building the Line Follower Robot is; you could start it with a very simple version by using just two transistors with the LED and LDR for sensor (Build Your Own Transistor Based Mobile Line Follower Robot – First Part) and enhance it to the programmable version that use microcontroller as the brain for controlling the robot. The reason of using the microcontroller for the Line Follower Robot is we need to make more robust, reliable and flexible robot which you could not have it from the discrete electronics component robot without changing most of the electronic circuit design.
The advantages in building the microcontroller based Line Follower Robot (LFR) is we could take the advantage of microcontroller’s ALU (Arithmetic Logic Unit) to compute mathematics equation to perform the industrial standard Proportional, Integral and Derivative control or known as PID control. On this tutorial we will learn to build the LFR using the powerful Atmel AVR ATMega168 microcontroller and at the same time we will learn to utilize many of the AVR ATMega168 microcontroller sophisticated features to support our Line Follower Robot.
Now let’s check out all the exciting features of this Line Follower Robot that we are going to build:
- Fully implement the industrial standard Proportional, Integral and Derivative (PID) control with flexible PID tuning parameter using the AVR ATMega168 UART peripheral and store the parameter to the AVR ATMega168 microcontroller build-in 512 Bytes EEPROM
- Use five infra red reflective object sensor for the black line sensor with Microchip MCP23008 8-bit I2C (read as I square C) I/O expander chip to talk to the AVR ATMega168 Microcontroller I2C peripheral
- 4.5 Volt to 5 Volt DC to DC Step-Up using Maxim MAX756 for powering both the electronics circuits and the DC motors. This will ensure the electronics circuits and the DC motors keep working properly even though the battery voltage level drops below 4.5 Volt.
- Use the AVR ATMega168 ADC (Analog to Digital Converter) peripheral to control the maximum speed of the robot.
- Use the AVR ATMega168 PWM (Pulse Width Modulation) peripheral to drive the SGS-Thomson L293D chip to control the DC motors speed
BRAM II Chassis Construction
The first version of BRAM (Beginner’s Robot Autonomous Mobile), used CD/DVD for the chassis; in this version of BRAM, I use the acrylic as the base for the chassis; which is easy to shape, drill and it came with transparent look and many color to choose too. You could read more information about the first BRAM version on my previous posted blog Building BRAM your first Autonomous Mobile Robot Using Microchip PIC Microcontroller.
BRAM II construction material parts:
- Acrylic for the BRAM chassis
- Two geared DC motors with wheels rated 4.5 to 5 volt (25-30mA) with the wheel or you could use the modified servo motor (it’s a servo motor without the electronics’s control board)
- One 3 x 1.5 volt AA battery holder with on-off switch
- One plastic bead (usually it use for the neck less) and one paper clip for the caster
- Enough nuts, bolts and PCB (printed circuit board) standoff.
BRAM construction consists of two decks, where the lower deck is used to hold the battery, DC motors and the sensor circuit while the upper deck is used to hold the motor controller circuit and the AVRJazz Mega168 board.
For more detail: Build Your Own Microcontroller Based PID Control Line Follower Robot (LFR) – Second Part