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.
I used the following parts:
- FRDM-KL25Z board
- HC-05 Bluetooth module
- Arduino Motor Shield
- 2 Micro-DC motors (1:50) (Pololu #998)
- Wheel and Encoder Set (Pololu #1218)
- QTR-5RC Reflectance Sensor Array (Pololu #961)
- Ball Caster (Pololu #951)
- Solid Black Robot Chassis (Pololu #1501)
- 5V Step-Up/Step-Down Voltage Regulator (Pololu #2119)
- 2 cell LiPo 7.4V 1000 mA battery (Conrad 209051 – 62)
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:
On the bottom of the chassis, a reflectance sensor array with 8 sensors:
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.
The software is written with Eclipse based CodeWarrior, using Processor Expert and FreeRTOS as operating system:
The shell is used to inspect the system status with USB CDC over OpenSDA or using the Bluetooth serial bridge:
The software and components are available on GitHub.
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 🙂