We are building this robot to learn how to work with FPGAs work and also to explore advanced features of line followers, such as:
- High resolution sensor - 32bit IR detector array
- PID control algorithm
- Web interface for config and monitoring
- Position tracking with rotary encoders on wheels
- Motor current sensing
Details
This project is kindly sponsored by PCBWay.
Get good quality circuit boards, assembly and machined/3D printed parts at pcbway.com
Soon after we built the first prototype, we realized that we had big changes to make.
Nothing worked as expected. our motor drivers were blowing up, 3D printed gears were unstable and noisy, the robot was getting too heavy.
We designed a better holder for motors with gearboxes, which looked promising.
New motor mount
As we were adding everything together, the robot became quite bulky and heavy. The makeshift tires made from bike inner tube didn't have enough grip, the motor drivers were weak... and we didnt even start tackling the biggest challange, that is programming the FPGA.
We realized that to meet the project deadline, the FPGA has to go.
So, we started working on a v2 redesign, with an ESP32-S2 controlling the whole operation. The v2 design should be much more integrated, ideally we want to have everything except the sensor on one PCB.
It's possible to make a line follower with just 2 photosensors. Such configurations aren't very precise and thus not suitable for high speed. That's why people typically use 4 - 8 sensors.
That's not enough!
The bigger the better! To get even better precision and smooth control, we made an array with 32 infrared reflective sensors. FPGAs have a ton of available inputs, so we can afford 32 parallel channels.
To clean up the signal from our KU163 sensors, we used four 8-channel digital buffers with hysteresis.
The drawback of this approach is that the sensitivity is set by the resistors in series with the phototransistors, which are not easily adjustable.