ATmega32U4

Tuesday, Aug 13, 2024 | 5 minute read | Updated at Friday, Feb 21, 2025

Will Rohren

A custom ATmega32U4 dev board designed in Altium, manufactured by JLCPCB. USB-C fought back. ICSP won.

STATUS: V1.1 Complete!

Back to Home Page

Background

The ATmega32U4 is the same chip at the heart of the Arduino Leonardo, a well-documented, capable microcontroller with native USB support built in. The difference between buying a Leonardo for $25 and designing your own board around the same chip is that buying one teaches you nothing about why it works.

This project is heavily inspired by The Curious Scientist . He pointed me toward the ATmega32U4 in the first place. I didn’t use any of his designs directly, but his work was the catalyst. All the schematic and layout decisions here are my own.


Project Timeline

Motivation & Goals (August 2024)

I’d been curious about digital PCB design for a while but had never had a concrete reason to sit down and actually do it. The dev board concept solved that. It’s a contained problem with clear success criteria (does it enumerate? does firmware upload? do the pins work?) and enough complexity to actually teach me something.

The specific goals going in:

  • Learn Altium Designer from a blank schematic to manufactured board
  • Understand what it actually takes to get a bare microcontroller running. Crystal oscillators, decoupling, USB pull-up resistors, the works
  • Flash firmware without relying on a bootloader-equipped board as a crutch
  • End up with something usable for future embedded projects I went with a 4-layer stackup (signal / ground / power / signal) to keep the power planes clean and give the high-frequency USB lines a proper reference.
V1 Design (September 2024)

The first layout had the pin headers arranged in two perpendicular rows. Once I started placing the actual chip footprint and routing traces, it became obvious there was a lot of wasted board real estate. The geometry didn’t make sense for the chip’s pinout.

V1 early layout Early layout iteration. Perpendicular pin headers, too much dead space

I switched to a staggered pin header arrangement, which let me pull the overall board footprint in significantly. I also added a dedicated 2×4 header block: six pins for ICSP (In-Circuit Serial Programming) and two more for TX/RX. The plan was to use ICSP only for burning the initial bootloader, after which the USB-C port would handle everything.

V1 final layout Final V1 layout. Ground and power planes hidden. They live on the inner two layers

V1 First Prototype & The USB-C Problem (November 2024)

The boards came back from JLCPCB, I ordered components from DigiKey, and spent about two hours hand-assembling the first prototype. Got the bootloader flashed via ICSP without any issues.

V1 assembled board Assembled V1 Board

Workbench during assembly Workbench at the MEEN Rapid Prototyping Studio


Then I plugged in the USB-C cable and nothing happened. Posted about it in the Starforge Discord , a local makerspace here in College Station, and got the answer within a few minutes: I’d left the CC pins floating.

USB-C uses the CC (Configuration Channel) lines to negotiate the connection before anything else happens. With them floating, the host-side controller never sees a valid handshake, and the port stays silent. The fix is a pair of 5.1kΩ pulldown resistors on CC1 and CC2, a detail I’d missed entirely when designing the power delivery section.

ICSP still worked fine, so the board wasn’t dead, just permanently tethered to a bundle of six wires any time I wanted to upload new firmware. Inconvenient, but workable enough to keep going.

ICSP programming setup ICSP wiring setup

LEDs blinking on V1 Onboard LEDs turn on!

I got some LEDs blinking, verified the GPIO pins were responding correctly, and started noting everything I wanted to change before spinning a second revision.

V1.1 Redesign & Second Prototype (January 2025)

The redesign in Altium addressed the CC pin issue and a handful of layout annoyances that had been bothering me since the first prototype:

  • CC pulldown resistors added: 5.1kΩ on CC1 and CC2, the standard fix for USB-C device-side implementation
  • IO header layout changed from staggered to inline. Cleaner and more breadboard-friendly
  • Pin spacing audited across the whole board to make sure everything would actually land on 0.1" breadboard pitch
  • Component placement tightened up to reduce dead space

V1 vs V1.1 comparison V1 (left) vs V1.1 (right). Inline headers, CC resistors added, tighter layout overall.

The boards shipped from Hong Kong with some delays, but eventually arrived. Assembly went smoothly.

V1.1 assembled V1.1 PCB assembled & powered on

And then I plugged in USB-C again. Still nothing.

The CC resistors were present and correct, so the handshake issue from V1 should have been resolved. My best guess at what went wrong is signal integrity on the D+/D- differential pair. USB full-speed has tight requirements around impedance control and trace length matching, and I don’t have high confidence that I routed those lines cleanly enough to meet spec. USB-C in general is less forgiving than most people expect: the physical layer has to be right before any of the protocol layer even gets a chance to run. I never fully diagnosed the root cause.

ICSP remained the programming path for V1.1 as well. After uploading the Arduino Leonardo bootloader, the board ran firmware without any issues, just without the convenience of USB.

Where Things Stand (2025)

V1.1 is functional as a bare-metal development platform when used with ICSP. The GPIO pins work, firmware uploads cleanly, and the board does everything a dev board needs to do except enumerate over USB the way it was supposed to.

If there’s a V1.2, the priority list is:

  • USB-C signal integrity: properly controlled impedance on the D+/D- pair, careful trace length matching, and potentially a USB-C ESD protection IC to give the interface a better chance
  • Width reduction: the current board spans the full width of a standard breadboard, which means no room on either side for jumper wires. Shaving 0.1" off the width (at the cost of a slightly taller board) would make it significantly more usable

The bigger lesson from this project is that USB is harder than it looks. There are two or three distinct layers where something can go wrong (the physical layer, the enumeration handshake, and the device descriptor) and if any of them fail, the host side just sees nothing. Buying a Leonardo and treating it as a black box would have been faster and cheaper. It also would have taught me none of this.


Back to Home Page

© 2026 Will's Portfolio

Powered by Hugo with Dream.

Me

Howdy!

I am William Rohren, I am a senior Mechanical Engineering Major at Texas A&M University.

This site serves as a portfolio to display my various projects, as well as a blog so that I can have a log of the things I do.

pic of me

One More Note

I try to do my best to keep this reasonably updated, but my priorities are in the projects themselves. Documentation unfortunately tends to be a retroactive effort.

Changelog

5/11/26 - Content & structure overhaul

9/4/25 - Major content update

4/21/25 - Minor tweaks

3/8/25 - Initial portfolio created

Contact Information

Email: wmrohren@gmail.com

Resume: here (last updated 5/13/26)

Google Sites Portfolio Warning: There’s a reason I abandoned the old portfolio & remade it with Hugo.

Additional Reading

It’s because google sites kinda sucks in terms of how customizable it is. As you’ll see if you visit my old portfolio, there’s a navigation bar at the top, some with drop downs. But as far as the actual content goes, it’s really space inefficient. Under ‘Personal Projects > Big Projects’, to even see the SECOND item requires scrolling past all of the content in the first item.

I didn’t like it. So I thought of trying Hugo, and was given the idea by seeing other people using it (namely various Starforge members Brandon and Ismael to name two examples). I found a theme I liked, with blog-like posts and decided that was a suitable way to display my content.

One last note about formatting, once I have a lot more projects under my belt, I’d like to switch to a grid-like format, similar to one used by mitxela

Anyhow, the google sites portfolio linked above has a lot of my smaller projects on it. From 3D prints to school engineering club events, to VEX Robotics.

I expect that I will make posts dedicated to grouping these together. This is relatively low priority right now though, since the projects I have been able to do in college have been much more impactful than the projects I did in middle or high school. This is mostly related to money, as working on the RPS is allowing me to spend my own money on projects.

Feel free to email with any questions :)