Building CyBot: Autonomous and Manual Navigation in C on a Repurposed Roomba with a M4 Cortex Microcontroller
- Alek Norris
- Oct 18, 2024
- 2 min read
Updated: Oct 25, 2024
As part of small group effort, we developed a CyBot—a robotic platform programmed entirely in C and utilizing UART for communication. Our goal was to build an automated system capable of navigating and performing tasks without human intervention, while also giving manual drivers a way to understand the robot's surroundings.
A significant aspect of our project was the implementation of Wi-Fi connectivity, which allowed for remote control and monitoring of the CyBot. To enhance navigation and provide situational awareness, we created a 2D scanner in Python that connected over Wi-Fi, offering a manual driver the ability to scan the environment ahead of the CyBot without the use of a camera—this was a strict project requirement.
The CyBot featured multiple sensors, including ultrasonic sensors, infrared sensors, and bump sensors, to detect obstacles and navigate through the environment. We also integrated a simple display for providing feedback to users or operators, and a speaker for audio cues. Each of these components was carefully programmed and configured to communicate with the central Cortex-M4 microcontroller.
This project provided a great opportunity for collaboration and hands-on experience in embedded systems, robotics, and low-level programming. It also showcased how a robot can function effectively in real-world scenarios where real-time data interpretation is crucial.
Servo_init() and basic calibration
This image highlights part of the C code we wrote to control the servo motors, focusing on initializing and calibrating them. The servo_init() function configures the hardware for servo control of the sonar and IR lights, while the servo_calibrate() function adjusts the pulse width, which directly controls the servo's movement. By increasing or decreasing the pulse width, we were able to adjust the servo's position allow scanning using IR and Sonar.
My Takeaway
In this project, I worked closely with embedded systems and low-level programming to develop a CyBot, a robotic platform powered by C and UART communication. I gained hands-on experience in integrating sensors and controlling hardware components like servos for real-time navigation. Additionally, implementing Wi-Fi connectivity and creating a 2D scanner in Python taught me the importance of real-time data processing and remote control in robotics. This project enhanced my skills in embedded systems and teamwork, as we built a robot capable of autonomous tasks and manual navigation without using a camera.
Comments