3

I am trying to convert some 5v Leonardo-compatible boards to run at a lower 3-3.7v voltage, so that I can power my project using LiPo batteries.

As far as I can tell, the default Leonardo settings (and pro-micro settings) will not run at this voltage. When I power the boards (which expect 5v) from a lithium battery, typically the system does not start at all. My two theories are that either the 16 Mhz xtal oscillator does not start resonating, or that the brown-out detection of the boards precludes booting at the lower voltage.

I would like to modify the boards to run on lower power. Since the pro-micro exists in a 3.3v variant, I presume there is some way to get the Atmega32u4 chip working at lower voltages. I have reviewed the Atmega32u4 datasheet and schematics from sparkfun, as well as examined the fuse bit differences between the 3.3v and 5v versions of the pro micro. As far as I can tell, the only difference in configuration is the brown-out detection. The clock source settings are configured for a crystal between 8Mhz and 16Mhz, so this could be the same for both boards.

I wasn't quite able to understand the build system for the Catarina bootloader, which might give hints as to how the clock is handled. It seems like both the 3.3v and 5v boards bootloaders are built from the same source, but with a different "CPU frequency" variable. However, there are quite substantial differences in the .hex file outputs and I wondering if there is something fancier going on.

As far as I can tell, it's possible to get an 8MHz clock on the Atmega32u4 either by using a 16MHz xtal with a clock divisor of 2, or using an 8MHz xtal with a clock divisor of 1.

Since the pro-micro 3.3v is the "mainstream" supported board using the Atmega32u4 at a lower voltage, I would like to configure my project to be compatible. Which means I need to build in a compatible clock source, if possible.

Does anyone know more details of the pro-micro 3.3v/8Mhz configuration that might help clarify how to set this up?

4
  • When a 16MHz xtal is used with a clock divisor, then the clock part of the atmega32u4 is still running at 16MHz. I doubt if it is documented what it will do with lower voltages. You need a 8MHz xtal (or the internal resonator) to run it at 8MHz. The bootloader is described in the file 'boards.txt'. Not every atmega32u4 bootloader at 8MHz needs to be the same. Adafruit has an atmega32u4 at 8MHz as well: adafruit.com/product/3675 Try to use the official arduino boards if possible for the best and long lasting support.
    – Jot
    Jan 28, 2018 at 15:42
  • So the pro-micro 3.3v uses an 8MHz external crystal?
    – MRule
    Jan 28, 2018 at 16:31
  • I'd assume Adafruit uses different crystals. Not doing so would be weird. When building the bootloader, the compiler knows the crystal's speed by the F_CPU constant. It uses this to set F_USB, and (make the leds blink in the same interval](github.com/adafruit/Caterina-Bootloader/blob/…). I think, before building these, some Adafruit employee changes the makefile to have the correct F_CPU, PID, and fuses for either the 3V of 5V version.
    – Gerben
    Jan 28, 2018 at 17:12
  • I have a partial solution: one can simply overclock (i.e. allow the Leonardo to run at 16MHz despite the lower power). Presumably this is risky and could lead to bad things eventually. (I've bricked one board actually by not setting a slower baud rate for writing fuses). One must simply set the brown-out detector for the lower voltage. The fuse configuration for this is E:CE, H:D8, L:FF. This is the same fuse configuration used on the pro-micro 3.3v, with an 8MHz XTAL. It turns out that the same clock fuse settings work with both the 8MHz and 16MHz xtals.
    – MRule
    Feb 10, 2018 at 13:48

1 Answer 1

2

On the schematic of the Sparkfun Pro Micro 3.3V/8 Mhz (here) a resonator of 16 MHz is drawn. But also is stated there: "Board is marked with combination of resonator frequency and regulator voltage". From this you can deduct that the 3.3V/8MHz and the 5V/16MHz versions don't have the same resonator and that the 3.3V/8MHz version most probably has a 8MHz resonator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.