Line Following Robot

The aim of this project was to design and build a line-following robot with custom designed chassis, attachments, PCBs, and code to traverse a black and white track with coloured markers, signalling the start, stop and speed zone locations. SolidWorks was used to create mechanical components, Altium Designer was used to create the custom breakout board, sensor array and marker sensors, and the code was written in Arduino code and C/C++.

The final product used a rectangular laser-cut acrylic chassis with dual rear motor drive and a single front caster wheel. This was powered by a 7.4 V 2-cell Lithium-Ion battery to a Spark Mk. II microprocessor board with a voltage regulator, dual motor drivers and controller, and ATMEGA32U4 chip. This board was placed on top of a custom designed breakout board which received signals from custom marker sensors and sensor array.

Mechanical Design

The mechanical system was designed in SolidWorks. The chassis was designed to be made of acrylic as this was cheap and quick to manufacture, and required little effort to source. Although there were limitations using acrylic, which meant that the motor mounts had to be designed for 3D printing as these needed to be secure to ensure maximum torque output. The battery was raised above the main body to allow for improved heat dissipation. Alternate wheel designs were trialled to reduce costs, using 3D printed designs and rubber bands, although the loss in functionality proved not a viable solution.

Electrical/ PCB Design

Three custom PCBs were designed: a breakout board; a sensor array; and a marker sensor. The breakout board design contained five main subsystems: ‘power’, ‘Spark’, ‘motor outputs’, ‘sensor array & marker sensor’, and ‘buzzer’. The system has multiple protection circuitry components including fuses and multiple protection diodes. The system also uses a buzzer which was used to signal when the device was on a straight. The sensor board had a simple design, with only two subsystems, the ‘sensors’ and ‘power & sensor output’. This board has seven surface-mount IR emitters and receivers which are used to detect the line. Like the sensor array, the marker sensor is simple in design, with only two subsystems, the ‘sensor’ and ‘power & sensor output’. The design consists of one through-hole LED and phototransistor, although, two marker sensors will be required in the integration of this PCB.

Software

The code was written in Arduino and C/C++. For effective performance around the track, the device used a control feedback system, namely the PID control system, which stands for proportional, integral, and derivative and represents the main components of the system. There are many different applications of this system, however, in the case for a line-following robot, the most effective method is to calculate the error from the sensor values from a set value and aim to minimise this error. The figure below demonstrates the logic behind a control feedback loop.

Asier Goni

My name is Asier! I am a student engineer and wanted to find a way to share my projects in a slick way :)

https://asiergoni.com
Previous
Previous

Mini Tone Adjusting Piano Keyboard