Loading...
Pages: [1]   Go Down
Author Topic: LED Control based on Windows System Values  (Read 42 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I have a very specific hardware/software project that I want to accomplish on my Windows 7 Pro 64-bit system with an i7 CPU.

I have been searching for solutions for weeks but can't find any consumer electronics product that will do what I want, so I guess I'm going to have to build it and program it myself.

I want to install a bank of LEDs in my computer case and drive them under some sort of program control:

1) LED 1: Turn it on when the controlling program starts, then briefly turn it off and back on in a loop so that it "flickers".  As the CPU load increases, increase the flicker rate.  Throw a random element in to avoid the visual appearance of a repeating "script".
2) LED 2: Turn it on when the CPU temp exceeds a certain value.  Turn it back off when it is ok.
3) LED 3: Turn it on when the power supply's various outputs are not within normal parameters.  Turn it back off when it is ok.
4) LED 4: Turn it on when it senses that the computer has crashed (if this is possible).

My question is:  Can I do the above (with maybe the exception of #4) with an Arduino unit?  If so, which one?

I have 35 years of computer hardware, software, and programming experience, so I can handle these aspects with no problem as long as I have a programming language manual or documentation to guide me.  

Another question:  How much electronic fiddling will I have to do?  If it involves more than basic resistors, LEDs and soldering, then I'm in trouble and will have to hire a friend who understands that aspect.

Thank you for your guidance.  
« Last Edit: May 24, 2013, 05:22:52 pm by MossyRock » Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 90
Posts: 9438
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My question is:  Can I do the above (with maybe the exception of #4) with an Arduino unit?  If so, which one?
yes can be made

make a program that monitors the values you want in your favo language (I think for some things you need C++ and kernal acces)
put the found values in a formatted string e.g. "<65%, 25C, 11.3V, 5.0V>", clearly indicating begin of string and end of string and field separators.
send the string over serial to Arduino once per second.

The Arduino waits for a new string and adjusts the leds (intensity or RGB color or blinkrate) according to the values received.

If the Arduino does not get any string LED 4 starts to blink, indicating loss of connection with the mothership smiley-wink

does this make sense?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Netherlands
Offline Offline
Tesla Member
***
Karma: 90
Posts: 9438
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Another question:  How much electronic fiddling will I have to do?  If it involves more than basic resistors, LEDs and soldering, then I'm in trouble and will have to hire a friend who understands that aspect.

- A serial USB cable
- 4 LEDS and 4 220ohm resistors in series with it.
- if RGB leds are used a few resistors more ...

That's all
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 316
Posts: 35575
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My question is:  Can I do the above (with maybe the exception of #4) with an Arduino unit?  If so, which one?
Maybe. Any of them. Reading temperature, with the appropriate sensor, is easy. Turning an LED on and off is easy.
Adding current sensors to the power supply lines isn't trivial, but it isn't that difficult, either. Reading several of them, and determining whether an LED should be on or off is easy.

"Turn it on when the controlling program starts" needs some clarification. If you have some application running on the PC that is monitoring the system, using the existing hardware, and sending data, via the serial port, to the Arduino, then you don't need to add the additional hardware mentioned above. The Arduino can not measure CPU usage. Only a program running on the PC can.

Increasing the flicker rate as CPU usage increases and random flickering don't go together. You need to decide which you want.

As for #4, I don't know how the LED would sense that the PC has crashed. So, I doubt that the LED would be turned on by a crash.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

robtillaart and PaulS,

Yes, this all makes sense.  Thank you for letting me know that this can most likely be done and also for some ideas on how to do it!

I plan to use Aida64 or Open Hardware Monitor which can output or "share" system information it collects, such as CPU and voltage info.  I'm not sure where they store this data, but I know other programs are able to access it.  That is a topic that I will need to research.  It could be that the programming for the Arduino will allow it to access this memory block directly.

"Turning it on when the controlling program starts" means that when the Arduino's program starts, it turns the LED on.

When I said "random flickering", I meant to embed a random element in the flickering loop, like mathematically evaluating a rnd() function's return value to decide whether or not to omit an "off" cycle or something like that.  However, I don't know anything about the Arduino's programming at this point so I'm just conjecturing.

Anyway, I am a complete newbie to Arduino.  I know basically nothing about it.  So, at this point, I need to know 1) what type/variant of Arduino I would need to buy and 2) where to find the unit's hardware and programming manuals - maybe a "Dummies" book, LOL?  Can you help with these two items to help me get started?

Many thanks.
« Last Edit: May 24, 2013, 06:45:13 pm by MossyRock » Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 316
Posts: 35575
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It could be that the programming for the Arduino will allow it to access this memory block directly.
It really seems unlikely that your Arduino will be able to read data stored on your PC, any more than it can read data stored on my PC.

Quote
So, at this point, I need to know 1) what type/variant of Arduino I would need to buy
Any Arduino will have the same issues. Start with a UNO, since they are the most stable/prevalent.

Quote
2) where to find the unit's hardware and programming manuals
The unit's hardware should come in the box with the unit...

The programming manuals are a lot harder to find. There is a reference page, http://arduino.cc/en/Reference/HomePage, for the Arduino-specific functions and libraries. Other than that, the Arduino is programmed using C++, so most any C or C++ function will work. Obvious exceptions, that deal specifically with hardware that the Arduino doesn't have, like a hard drive, or that deal specifically with software that the Arduino doesn't have, like an operating system, exist.

Quote
maybe a "Dummies" book, LOL?
This isn't a project for a Dummy, so a Dummies book would not be too helpful. There are a LOT of Arduino books, though. Google is even able to find one or two of them.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, PaulS.
Logged

Pages: [1]   Go Up
Print
 
Jump to: