Maple Bot

Summary of Maple Bot


Summary (under 100 words): A radio-controlled, map-learning line-following robot was built using ATmega1284p microcontrollers and nRF24L01+ transceivers. The robot learns a map of line intersections with four IR sensors, follows lines using a PD control algorithm, detects node types, and reports them to a PC-based Python GUI. The GUI displays discovered nodes, computes shortest paths with NetworkX, and sends movement commands via a base station. An application-layer acknowledgement protocol and handshake were added to improve unreliable wireless links. Hardware includes custom wooden chassis, continuous-rotation servos, QTI IR sensors, and separate power supplies for servos and electronics.

Parts used in the Maple Bot:

  • ATmega1284p microcontroller (robot)
  • ATmega1284p microcontroller (base station)
  • Nordic Semiconductor nRF24L01+ radio transceiver (Sparkfun breakout)
  • Parallax continuous rotation servos (two front wheels)
  • Parallax QTI infrared sensors (four sensors)
  • 6V battery pack (4 AA) for servos
  • 9V battery for robot electronics
  • Custom wooden two-tier robot chassis with standoffs and velcro platform
  • Breadboarded robot circuitry and custom PCB for base station
  • Serial-to-USB cable for base station to PC communication
  • Sparkfun 3.3V level-shifting breakout for nRF24L01+
  • Diagnostic LEDs
  • Passive rear wheel
  • Timer 1 hardware (ATmega1284p fast PWM for servo control) [software/hardware feature]

Introduction

Quick Solutions to Questions related to Maple Bot:

  • How does the robot communicate with the PC application?
    Via a base station ATmega1284p that translates UART commands from the Python app into 1-byte radio packets sent over nRF24L01+ transceivers.
  • Can the application direct the robot to a selected node?
    Yes; clicking a node in the GUI computes the shortest path and sends the sequence of instructions to the robot with acknowledgements.
  • What sensors are used for line following and node detection?
    Two center Parallax QTI IR sensors are used for analog line following, and two wing QTI IR sensors are used for digital node detection.
  • How does the robot determine node types?
    By digital readings of the wing sensors: both on = branch, right on = right turn, left on = left turn.
  • What control algorithm is used for line following?
    A proportional-differential (PD) controller using the difference of analog readings from the two center IR sensors.
  • How are the servos driven?
    Continuous-rotation servos are driven by PWM from ATmega1284p Timer 1 fast-PWM mode with pulse widths around 1.3–1.7 ms.
  • Does the system handle unreliable radio links?
    Yes; an application-layer acknowledgement system with sequence numbers and a handshake at initialization was implemented to improve reliability.
  • What software libraries are used by the host application?
    Python with PySerial for serial communication and NetworkX plus matplotlib for map generation and pathfinding.
  • How are base station and robot payloads formatted?
    App–base station uses 2-character commands; base station–robot uses 8-bit single-byte commands; robot reports use 8-bit responses, and base station replies to app are 2-character strings.

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top