
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
- Adaptive Pin Matrix & Multiplexing Network: Built a 4-layer custom PCB (configured as an Arduino Mega 2560 shield) utilizing 5× 8-channel analog multiplexers (
CD4051B) and high-current bilateral switches (MC14066B) to dynamically route power, ground, and ISP signals across all 40 pins of the ZIF socket. - Pin Safety & Protection Protocol: Implemented hardware-level current-limiting and ESD protection. Guaranteed safe chip probing by restricting detection signals to to prevent forward-biasing internal protection diodes.
- Integrated High-Voltage Step-Up Converter: Designed an onboard DC-DC step-up converter using the
MC34063Aregulator to supply stable pulses for High-Voltage Serial/Parallel Programming (HVSP/HVPP) modes. - Rich User Interface: Features a 0.91” OLED display (
SSD1306) for realtime diagnostic readout/debugging, 4 tactile control buttons, and status LEDs.
Intelligent Chip Detection Algorithm
The detection engine runs autonomously upon chip insertion:
- Capacitive Probing & Alignment: Measures pin-to-ground stray capacitance using microsecond pulse charging () 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.
- Power Pin Identification (VCC vs. GND): Exploit the orientation of ESD protection diodes inside CMOS IO structures by applying low voltage () to pin candidates and reading differential voltage across remaining terminals to reliably distinguish GND from VCC.
- 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
- Software Bit-Banging & Clock Signal: Employs software bit-banging for maximum adaptability across programming protocols. Includes an onboard hardware-timer-generated software oscillator to feed clock signals to target chips requiring external clock sources.
- Standard Protocol Emulation: Emulates the standard Arduino ISP protocol over serial communications at 19,200 baud, ensuring seamless, out-of-the-box compatibility with Arduino IDE and AVRDUDE without requiring custom PC drivers.
Primary Results & Performance
- Tested & Verified: Successfully validated automatic identification and programming across ATtiny (e.g., ATtiny84, ATtiny85) and ATmega (e.g., ATmega328P) microcontrollers.
- Full Signal Isolation: Achieved low-leakage high-impedance state for unused ZIF pins (), preventing interference during chip execution and upload cycles.
- Open Source: Complete hardware schematics, PCB layout files, and firmware source code available on GitHub:
https://github.com/Xmen097/USP