An Arduino Without the Arduino?

This project recreates the Arduino UNO on a breadboard and demonstrates how to program a bare ATmega328P using register-level AVR-C.

nickbild
about 24 hours ago • HW101
An Arduino UNO clone on a breadboard (đź“·: Antoine Dubreuil)

The Arduino UNO is such a common sight in makers' toolboxes that we tend to take it for granted. More often than not, we just grab one, fire up Arduino IDE, upload some code, and go on with our project without ever considering what makes it tick. But eventually, curiosity always gets the better of an engineer. That recently happened to Antoine Dubreuil, who decided to dig into the details and recreate an UNO on a breadboard.

Instead of relying on Arduino’s familiar abstractions like pinMode() and analogRead(), Dubreuil stripped things back to the bare ATmega328P microcontroller and programmed it directly using AVR-C on Linux. The goal was simple: understand exactly how analog-to-digital conversion, timers, interrupts, and serial communication work at the register level.

Cloning the circuit

The setup replaces the Arduino board with a standalone ATmega328P microcontroller on a breadboard, complete with a 16 MHz crystal, decoupling capacitors, and a custom six-wire programming cable connected to a SparkFun Pocket AVR Programmer. For serial output, a TTL-232R USB-to-UART cable handles communication with a host computer, allowing data to be streamed and viewed with a simple cat /dev/ttyUSB0 command.

A Timer/Counter interrupt runs in Clear Timer on Compare (CTC) mode, firing roughly every 12 milliseconds. Each timer interrupt triggers an ADC conversion, alternating between two analog channels. One channel monitors a potentiometer, while the other measures the voltage across an LED, demonstrating real-time analog sampling without blocking the main loop.

The ADC itself is configured with a prescaler that balances conversion speed and accuracy, producing 10-bit readings that are then converted into millivolts. Once both channels have been sampled, the results are formatted into a CSV-style line and placed into a circular transmit buffer. A UART transmit interrupt handles sending the data byte-by-byte, ensuring smooth serial output without stalling the system.

Programming the breadboard Arduino

Beyond the electronics, the project also implements a traditional embedded Linux toolchain. Using avr-gcc, avr-libc, and avrdude, the firmware is compiled, linked, and uploaded via a Makefile, demonstrating how much the Arduino ecosystem normally automates behind the scenes.

Dubreuil’s project is a great way to better understand the UNO and the Arduino toolchain, but using a breadboard and DIY programming environment isn’t nearly as convenient as grabbing an UNO. This is one thing I won’t be DIYing anytime soon.

nickbild

R&D, creativity, and building the next big thing you never knew you wanted are my specialties.

Latest Articles