Inspiration

This project track fit at Physical AI, and is inspired by real-world autonomous industrial and military robotics, such as the Seekur and MDARS (Mobile Detection Assessment and Response System) autonomous robots. The primary goal was to take those large-scale industrial ideas and scale them down into an educational, compact, and efficient robot car using cutting-edge machine learning and advanced control theory.

What it does

The project features an autonomous robot car that can navigate through a track or around obstacles independently without crashing into walls. It achieves this by combining two critical systems:

  • Machine Learning (Neural Network): Acts as the "brain," evaluating spatial input data to make real-time, high-level navigation decisions at various nodes (e.g., whether to move forward, reverse, or turn left/right).
  • PID Controller: Acts as the "steering guide," automatically centering the car along its path by calculating errors from infrared distance sensors and continuously adjusting individual wheel speeds.

How we built it

The project was constructed across several domains:

  • Hardware: The physical stack includes a SparkFun RedBoard Artemis ATP (powered by an ARM Cortex-M4F processor) paired with an L298N Full-Bridge Motor Driver Breakout, two 120 rpm gearmotors, and a 7.2V rechargeable battery. A SparkFun Micro OLED Breakout screen was integrated to monitor active tasks in real time.
  • Sensors: Three Sharp Infrared Distance Sensors (GP2Y0A41SK0F and GP2Y0A51SK0F) were mounted to monitor the left, front, and right fields of view.
  • Chassis & Assembly: Custom structural parts and an enclosure were designed, 3D printed using STL files, and assembled onto a ball caster base.
  • The Software Stack: a) A Python script (NeuralNetwork.py) was written from scratch to simulate a neural network (5 inputs x 5 hidden nodes x 4 output nodes) with tanh activation; b) The network was trained in Python over 40,000 iterations to match specific obstacle patterns against direct motor actions; and c) The final trained connection weights and biases were extracted and hardcoded into an Arduino sketch (Self_Driving_Car.ino) using forward propagation to execute real-time decisions on the RedBoard Artemis board.

Challenges we ran into

  • Mapping Analog Sensor Data to Neural Network Inputs: Converting analog voltage levels from infrared sensors into clear binary triggers (1 or 0) required deliberate threshold engineering. The sensors had to reliably identify wall proximity (e.g., checking if the left/right sensors were under 13 cm, or the center sensor under 16.7 cm) to prevent erratic neural network responses.
  • Resource Mapping for Microcontrollers: Transitioning neural network architecture (typically run on powerful computers) down to a localized micro-level script meant ensuring the forward-propagation code was lightweight enough to process instantaneously alongside the PID math calculations.

Accomplishments that we're proud of

  • First Place Win: The project successfully won 1st Place (Wildcard) in the Machine Learning in the Real World contest hosted by SparkFun (Apache License 2.0).
  • Efficient Embedded AI: Successfully deploying a fully functioning, standalone artificial neural network running directly on an affordable ARM Cortex-M4F microcontroller without requiring external PC computation or cloud dependence.
  • The Synergy of ML and Control Theory: Getting a discrete-action Neural Network to handshake perfectly with a continuous-adjustment PID controller to deliver exceptionally smooth autonomous driving.

What we learned

  • Neural Network Mathematics from Scratch: Deepened understanding of neural network theory, forward propagation, backpropagation, cost functions, and optimizing epochs to safely decrease the training cost curve.
  • Embedded Machine Learning: Gained practical insights into how powerful, low-energy modern microcontrollers (like the 48MHz/96MHz Apollo3 BLE processor on the Artemis) can easily handle complex math operations when programmed efficiently.
  • Data Synthesis: Learned how to process physical ambient data through a combination of datasheet calculations and algorithmic constraints.

What's next for Self Driving Car Using ARM Cortex-M4F

Moving forward, potential future expansions for this ARM Cortex-M4F automated system include:

  • Upgrading to TensorFlow Lite for Microcontrollers: Porting the neural network structure into formal frameworks like TensorFlow Lite to utilize complex multi-layer deep learning.
  • Advanced Computer Vision: Capitalizing on the Artemis ATP's massive array of GPIOs and processing power to integrate a small camera module (like a Pixy2 or Arducam) for visual lane tracking and traffic sign recognition.
  • Wireless Fleet Analytics: Utilizing the onboard BLE (Bluetooth Low Energy) radio of the Artemis chip to broadcast real-time telemetry data, sensor maps, and PID performance charts straight to a mobile app or local dashboard.

Built With

Share this project:

Updates

Submission history