Universal Serial Programmer for AVR microcontrollers

Universal Serial Programmer for AVR microcontrollers

Note: This project was originally developed as a high school graduation thesis (Maturitní práce) at Gymnasium Jana Keplera (2021/2022) under the supervision of Bc. Emil Miler and was successfully defended with the highest possible grade (Grade 1 / Výborně).

Executive Overview

The Universal Serial Programmer (USP) is an automated hardware-software platform designed to eliminate manual wiring and breadboard setups when programming microcontrollers in Dual In-line Packages (DIP). By inserting an AVR chip into a 40-pin ZIF socket in any orientation or alignment, the device automatically detects the pin layout, identifies the target chip, configures its internal routing matrix, and enables programming via standard tools (Arduino IDE, AVRDUDE).

Key Hardware Achievements
Intelligent Chip Detection Algorithm

The detection engine runs autonomously upon chip insertion:

  1. Capacitive Probing & Alignment: Measures pin-to-ground stray capacitance using microsecond pulse charging (5 μs5\text{ }\mu\text{s}) via the ATmega2560’s internal pull-up resistors and multiplexed 10-bit ADC. Determines chip package size, socket position, and pin boundaries based on physical capacitance signatures.
  2. Power Pin Identification (VCC vs. GND): Exploit the orientation of ESD protection diodes inside CMOS IO structures by applying low voltage (∼0.4 V−0.5 V\sim 0.4\text{ V} - 0.5\text{ V}) to pin candidates and reading differential voltage across remaining terminals to reliably distinguish GND from VCC.
  3. Database Matching: Compares detected pin signatures against known AVR layout matrices (including ATtiny and ATmega families) to establish orientation and chip identity.
Firmware & Protocol Integration
Primary Results & Performance