Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Homebrew microcontroller based hard drive LED bar graph

Homebrew microcontroller based hard drive LED bar graph

The HD LED is just a single, boring light. Yeah, maybe it comes in blue or purple on your fancier cases, but it’s still just a boring light. I wanted something a bit more flashy and dynamic. So the LED bargraph HD light idea was born!
This is a PIC microcontroller project I did some time ago which turns my computer’s hard drive LED into a more interesting 10 LED bargraph display.

I first got the LED unit, socket for the PIC16C84, and basic wiring done on the perfboard. The clock is provided by a 4MHz ceramic resonator and for good measure, I put an opto isolator on the input from the motherboard LED connector. I figured that the optoisolator would present a similar load to the mobo’s drive circuit since it’s just a very small LED in essence.

Next, I started to work on the software. I normally do most of my microcontroller work in the native PIC assembler, but this seemed like a good project to try a compiled language since the project is not timing critical. The compiled language let me not worry about counting higher than 255 or messing with multiple registers to assemble long delays. I had been hearing some good talk about JAL (Just Another Language) which targets these lower to mid-range PIC devices, so I figured I’d give it a try. It’s a GPL project and is free.

JAL was very easy to use, especially for this simple project. It made working on the timings of the lights very easy, which was important as the speed of the rise and decay of the LEDs is critical for the finished result to look cool. The code is basically an accumulator type setup where the HD signal from the mobo is polled and if it’s on, a number is added to the internal counter. If it’s off, a number is subtracted. In between polling, that counter value is divided to determine how many LEDs on the bargraph to light.

I had to do a bit of tweaking for aesthetics, such as making the first LED very “sensitive” (it lights immediately) so that you can see the minor blips that are common under a modern operating system. I also made the 10th LED very fast to turn-off or else the display would appear to lag since it is pretty common for the indicator to peg at LED 10 and decrementing the counter like the other LEDs would take too long.

Visit Here for more.







 

More Articles to Read

Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface

Top


Shares