As part of one of my classes at UTN, an autonomous vehicle named "Cucatesla" was developed, named after its behavior of autonomously moving toward dark areas. (Cucaracha means cockroach in spanish)
The project consisted of designing and implementing an embedded system based on an NXP LPC845 microcontroller, capable of operating in two modes (remote control from a PC and autonomous operation), detecting obstacles through ultrasonic sensors, responding to ambient light variations, and maintaining bidirectional communication with a user interface.
The system architecture is organized around two entities: a base station (PC with a user interface) and the embedded node (LPC845).
The control logic was structured around two main state machines: mde_mov (motion management) and mde_com (frame parsing and configuration). The system supports manual commands (movement and steering) as well as an autonomous mode that evaluates distance measurements to determine obstacle avoidance maneuvers.
Since the standard NXP SDK was not used, low-level drivers were implemented for the following peripherals:
leerTrama).
This project represented my first experience in embedded systems development, involving a significant learning curve. In particular, we faced two major technical challenges.
One challenge was that the vehicle responded correctly to every command except moving forward. Whenever it started moving, communication would be lost for a few seconds. After extensive trial and error, we discovered that the motors' startup current exceeded the power supply's capabilities, causing the system to momentarily shut down. This experience taught me the multidisciplinary nature of embedded system debugging, where software, mechanical, and electrical issues must all be considered before identifying the root cause.
Another challenge involved implementing the microcontroller's CTIMER peripheral. Despite following the few example codes we could find online and repeatedly reviewing the corresponding section of the reference manual, we ultimately got it working through trial and error, using a configuration that differed from the recommended approach. I remember that only a few weeks after completing the project, ChatGPT was released, and one of my teammates shared screenshots showing that it solved the CTIMER configuration exactly as we had done, but in just a few seconds.
This project was full of first experiences and helped consolidate skills in microcontroller programming, critical interpretation of documentation, firmware architecture design, and hardware-software integration troubleshooting.
Access to the source code repository can be found here.