Hi everyone,
after purchasing my first A-Star Micro I want to make it 3.3V IO compatible.
I already found a post on an Orangutan where the change seems easily made and try to build a little step-by-step thread here describing the required changes for A-Star Micro.
The first steps I took before changing any hardware on the board:
- Decrease brown-out voltage to 2.6V via AVR ISP programmer (like for Orangutan)
- Made no change on CKSEL fuses because they should work with 8-16 MHz resonator range.
Afterwards I replaced the 16 MHz crystal resonator with an 8 MHz resonator to allow 3.3V operation of the ATMega32U4. Power supply is still 5V up to here.
This leads to the USB malfunctioning. I suppose this is due to all bootloader code and clock divider settings of USB interface are built with 16 MHz.
Therefore, I compiled the Caterina bootloader from https://github.com/pololu/a-star/tree/master/bootloaders/caterina with F_CPU = 8000000 instead of 16000000 and VID=0x1FFB and PID=0x0101. Afterwards renamed Caterina.hex to Caterina-A-Star8Mhz.hex and programmed it to the board with AVR ISP.
Afterwards the USB is working again and I added the following lines to the boards.txt file in \Arduino15\packages\pololu-a-star\hardware\avr<version>:
[details=boards.txt]a-star32U4_8.name=Pololu A-Star 32U4 8MHz
a-star32U4_8.vid.0=0x1ffb
a-star32U4_8.pid.0=0x0101
a-star32U4_8.vid.1=0x1ffb
a-star32U4_8.pid.1=0x2300
a-star32U4_8.upload.tool=arduino:avrdude
a-star32U4_8.upload.protocol=avr109
a-star32U4_8.upload.maximum_size=28672
a-star32U4_8.upload.maximum_data_size=2560
a-star32U4_8.upload.speed=57600
a-star32U4_8.upload.disable_flushing=true
a-star32U4_8.upload.use_1200bps_touch=true
a-star32U4_8.upload.wait_for_upload_port=true
a-star32U4_8.bootloader.tool=arduino:avrdude
a-star32U4_8.bootloader.low_fuses=0xff
a-star32U4_8.bootloader.high_fuses=0xd0
a-star32U4_8.bootloader.extended_fuses=0xcb
a-star32U4_8.bootloader.file=caterina/Caterina-A-Star8Mhz.hex
a-star32U4_8.bootloader.unlock_bits=0xFF
a-star32U4_8.bootloader.lock_bits=0xEF
a-star32U4_8.build.mcu=atmega32u4
a-star32U4_8.build.f_cpu=8000000L
a-star32U4_8.build.vid=0x1ffb
a-star32U4_8.build.pid=0x2300
a-star32U4_8.build.usb_product=“Pololu A-Star 32U4”
a-star32U4_8.build.usb_manufacturer=“Pololu Corporation”
a-star32U4_8.build.board=AVR_A_STAR_32U4
a-star32U4_8.build.core=arduino:arduino
a-star32U4_8.build.variant=arduino:leonardo
a-star32U4_8.build.extra_flags={build.usb_flags}[/details]
This contains the changed 8MHz CPU clock, the changed brown-out detection to 2.6V in the fuse settings, and the new built caterina/Caterina-A-Star8Mhz.hex, which has to be placed accordingly.
Now after choosing the “Pololu A-Star 32U4 8MHz” and the corresponding serial port, the board was directly programmable via Arduino IDE 1.8.1.
Now the Board is fully functional at 8 MHz but ist still using 5V internal supply voltage. Therefore, I replaced the voltage regulator with an LP2985-33, removed the transistor and bridged the VBUS_IF pad to the VIN pad to also get 3.3V supply via USB.
Afterwards the LEDs light up a little darker and the board is now on 3.3V including IO voltage
with 8MHz.
I hope that someone might find this little tutorial useful, but I don’t give any warranties.
USE THIS ON YOUR OWN RISK!
Best regards,
Chris
P.S.: Here are the boards.txt file and the compiled Caterina (packed together with the blink example sketch like described here: https://github.com/pololu/a-star/blob/master/bootloaders/caterina/Caterina-A-Star.txt) for 8MHz:
boards.txt (3.3 KB)
Caterina-A-Star8Mhz.hex (22.2 KB)