https://github.com/tibordp/shiny-pwm
Voltage feedback PWM controller for ATtiny85
https://github.com/tibordp/shiny-pwm
attiny85 boost-converter buck-converter pwm-controller
Last synced: 11 months ago
JSON representation
Voltage feedback PWM controller for ATtiny85
- Host: GitHub
- URL: https://github.com/tibordp/shiny-pwm
- Owner: tibordp
- License: mit
- Created: 2021-02-15T22:33:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T10:54:24.000Z (almost 4 years ago)
- Last Synced: 2025-07-14T03:59:58.762Z (11 months ago)
- Topics: attiny85, boost-converter, buck-converter, pwm-controller
- Language: C
- Homepage:
- Size: 178 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Shiny PWM
Highly tunable voltage feedback PWM controller for ATtiny85. Useful for DIY switch-mode DC/DC converters.
## Features
- Configurable switching frequency range from 10 Hz - 32 MHz
- Feedback sampling rate of ~20 kHz
- Rolling averaging of feedback ADC readings or higher resolution and stability
- Configurable duty cycle limits
- Configurable voltage reference (internal 1.1V, internal 2.56V or VCC)
## Usage
Connect pin 6 to the switch and connect the feedback voltage to pin 3. The controller will continuously adjust the PWM duty cycle so as to keep the feedback voltage at half the reference voltage.
Simplified schematic for an example application (DC/DC boost converter). Vout is determined by the trimmer potentiometer. In real world you probably want to include a gate driver between the MCU and the MOSFET and add some sort of overvoltage protection.

## Configuration
See comments in [`config.h`](./include/config.h) for documentation of different configuration parameters.
## Building
This project uses PlatformIO. See [`platformio.ini`](./platformio.ini) for optimal fuse settings.