Thursday, March 18, 2010

ATtiny84 RGB LED Mixer: Part One

This is a little project that I came up with. I've wanted an excuse to use some fancy knobs for my rotary encoder and this pot that I had, so I built an RGB color mixer with them and an ATtiny84 controlling the PWM side of things. This being my second foray into AVR programming, I had help close by: Eric Agan via #sparkfun on irc.freenode.com. I would have been sunk without his close and patient code checking and debugging. Thanks a ton, Eric! But the basic premise is this: The user uses the rotary switch to select one of the three LEDs and then the potentiometer adjusts the color. There are two unused poles on the rotary switch, so in the future I may add a master brightness feature, preserving the mix, but reducing overall intensity, and a "mute" feature that temporarily dims/shuts down the LEDs. It's programmed in my case with an STK500v2 over USB through WINAVR (I recently switched back from Ubuntu 9.10 to Windows 7) The whole conglomeration runs at 5v for now on the breadboard, but the next version will buffer the high-power real LED through transistors and will run right in its 3.6v power band. The pictures will show two LEDs: One red and one green. The third IO line has a pin in it for my oscope to look at. I am fairly fanatical about clean breadboarding, so the only bit of disorderliness that I will tolerate is in the Pot and switch wiring, simply because it has to be.

No comments:

Post a Comment