LED case lights reflect CPU usage

A lot of Linux users include system monitor information in their status panel so that they can see when the CPU is grinding away. [Kevin] is taking the concept one step further by changing his case lights based on CPU usage. Above you can see green, orange, and magenta, but [Kevin’s] implementation uses the full spectrum of color.

The project is based on an ATmega48. It’s running the V-USB stack and connects to one of the motherboard’s internal USB ports. This lets him easily push the CPU usage data over to the microcontroller where it is translated into color. One RGB LED has been installed behind each fan panel on the front of the case, with a white LED above and below as an accent. Pulse-width modulation via some MOSFETs lets him mix and match for just the right color. He’s powering the add-on off of the PSU rails rather than USB so that it turns off when the computer goes to standby.

Don’t miss [Kevin’s] explanation of the system, and a demo of it in action after the break.

[Read more…]

Learning to use the V-USB (AVR USB firmware) library

The V-USB library is a pretty handy piece of code that lets you add USB connectivity to ATtiny microcontrollers (it was previously named tinyUSB). But if you’ve ever looked into adding the library to your own projects you may have been stymied by the complexity of the code. There are many examples, but there’s a lack of a concise quick-start for the uninitiated. [Joonas Pihlajamaa] has been working to correct that shortfall with his four-part V-USB tutorial series. It’s not for the absolute newbie; you should already be comfortable working with AVR chips but that’s the only real prerequisite we can see.

He starts the series with a look into the hardware considerations. USB provides a 5V power rail but the data lines expect 3.3V logic so this must be accounted for. With the test rig built on a breadboard he moves on to pick apart the code, covering various user-defined variables that you’ll need to set based on your project’s needs. We’re going to keep this on the back burner and hopefully the Troll Sniffing Rat will get a makeover (although we must say comments have been a lot nicer as of late… keep it up!).

We’ve embedded links to all four tutorial parts after the break.

[Read more…]