Has anyone here built an ATMega-based board from scratch?

Has anyone here built an ATMega-based board from scratch?

My next project is to be a hackable, wearable light toy, so I want to provide USB programing by way of using an ATMega32U4 microcontroller and Arduino’s “Caterina” bootloader (i.e. identifying as a Leonardo). I’m looking to minimise the BOM size, so I’ve opted to omit the 16MHz oscillator crystal (and associated capacitors) and instead use the ATMega’s onboard 8MHz oscillator.

While I haven’t yet captured the LEDs in the schematic, I’d like to know if I’ve omitted anything important from this design.

Note: VBUS comes from the USB socket, while VSYS comes from the onboard boost regulator (captured in the schematic, but not pictured here).

I built a 328p board (no usb so I can’t help you there). It never hurts to have a decoupling capacitor between VCC and GND. On my schematic I am using the same cap as for AREF.

I’ve done several iterations of the 32U4, yes.

We use the 32u4 for the BlinkyTape controller: http://shop.blinkinlabs.com/products/blinkytape-control-board

Eagle design file here:

You can skip the pull-down on pin 33, and the pull-up resistor on reset is also optional (it’s got an internal pull-up). For USB it’s strongly recommended to use an external crystal, as the internal 8MHz reference isn’t rated for stability. Also +1 for some bypassing capacitors. If you aren’t using analog inputs, you can also skip the one on AREF.

The Paperduino a the bare minimum you need. You can compare your layout and BOM with this here:

@Matt_Mets I read in the datasheet that the internal RC oscillator will allow the chip to communicate using Low Speed USB (1.5Mbps) – are you saying this is unreliable?

Thanks everyone for mentioning the decoupling caps; I did this with a mild head cold and knew I’d miss a few things.

@Luminous_Elements The 1.5Mbps speed should probably work, however Caterina/Arduino want to use it at full speed, which probably will have issues.

@Matt_Mets Gotcha. I’ve reconsidered, and will be using a crystal (and running the chip at 16MHz) – trading off a small addition to the BOM for a reduction in development time (saves me from recompiling Caterina and adding a custom Arduino board definition, because this board is otherwise electrically a super-basic Leonardo clone)