Pololu Line Following Robot with Freedom Board

Because my first line following robot was this week at the Embedded World conference in Nürnberg, I have constructed another one around the Freedom FRDM-KL25Z board. It is based on Pololu part items and the Arduino motor shield, plus using a Bluetooth module I have used in an ealier post.

Pololu Line Following Robot

Pololu Line Following Robot with FRDM-KL25Z

I used the following parts:

Power Supply

The LiPo battery is connected to the power terminals of the Motor Shield, providing the power for the motors. To generate the needed 5V and the 5V input for the FRDM-KL25Z board, a Step-Up/Step-Down voltage converter is used. It generates the required 5V out from the V_Bat. To save space, I have directly attached the voltage converter on the backside of the Arduino Motor Shield:

5V Voltage Converter

5V Voltage Converter

Line Sensors

On the bottom of the chassis, a reflectance sensor array with 8 sensors:

Reflectance Array

Reflectance Array

The line sensor has been modified to work with the 3.3V logic level of the Freedom board: for this a trace has been cut on the sensor board.

The software is measuring the discharge time of each sensor, which depends on how much light is reflected.  Connecton is made with a flat cable and patch wires to the Motor Shield, same for the Bluetooth module. The Bluetooth module is used to control and monitor the robot if not attached to the host system.

Front of Robot with Bluetooth Module

Front of Robot with Bluetooth Module

Software

The software is written with Eclipse based CodeWarrior, using Processor Expert and FreeRTOS as operating system:

Project Components

Project Components

The shell is used to inspect the system status with USB CDC over OpenSDA or using the Bluetooth serial bridge:

System Status

System Status

The software and components are available on GitHub.

Summary

The robot works very well so far. The quadrature encoder hardware has been changed and recalibrated for 3.3V operation, but is not used yet. I want to replace the Arduino Motor shield with a smaller motor driver breakout board, plus adding distance sensors for obstacle detection. The PID closed control loop needs some fine tuning, but the software is prepared for the next challenge: line maze solving :-).

Happy Following 🙂