AVR USB RGB LED Controller Project
This project uses an ATtiny45 microcontroller to control an RGB LED strip based on CPU usage. It’s a cool-looking project that uses the V-USB library to communicate with the PC without needing a USB-to-TTL serial converter.
Hardware
The project uses an ATtiny45 microcontroller and ZVN4306A MOSFETs to control the RGB LED strip, with each color consuming only about 90mA of current. The MOSFETs are more efficient and produce less heat, allowing for more current to flow.
Firmware
The firmware uses Timer 0 and Timer 1 to implement PWM control of the LED strip at 500Hz, and Timer 0 also keeps track of milliseconds for idle timeout. The EEPROM saves the delay setting every 4 seconds, which helps extend the lifespan of the EEPROM and the LED color transition time. When the idle timeout is reached, the LED strip starts cycling through blue, green, and red colors until it receives USB data again.
Host Program
The host program is written in C and is compatible with Windows and Linux. It can set the LED color based on CPU usage or set a single static color. The setting is saved to the EEPROM, so it will restore to the previous setting when the PC is restarted.
Alternative…