This repository contains the test firmware for the boost driver found in the hardware repository.
For a detailed explanation of this project, check out the video series on the Engineer Bo YouTube channel.
The test firmware includes a demonstration of the following features:
- Brightness control
- DAC with dynamic VREF
- Switching between two current sense resistors a.k.a. high dynamic range (HDR)
- Smooth brightness ramping from off to maximum brightness
- Power switch click counting
- Using RC discharge for off-time estimation
- ATtiny1616 internal EEPROM
- Temperature sensing
- NTC thermistor
- ATtiny1616 internal temperature sensor
- Battery level sensing and undervoltage lockout (UVLO)
This firmware is meant for testing and development, and serves as a reference for anybody interested in learning about flashlight boost drivers. I don't recommend actually using this build.
Instead, have a look at the schematics and source code, and leave me a comment on YouTube if you have any questions.
If you really want to try this firmware out:
- Acquire the necessary hardware
- Build the firmware using Microchip Studio
- Flash the ATtiny1616 via UPDI.
- Cycle through the demonstration modes:
- Click 1: Ultra low (minimum brightness)
- Click 2: Low
- Click 3: High
- Click 4: Ultra high (maximum brightness)
- Click 5: Smooth ramp
- Further clicks: Cycles back to first mode