Linux Duracell CPU Load Monitor
Nixon8Pie writes "Know those little self-testing batteries? How would you like to monitor your computers load with them? Well, now ya can. 'These throwaway testers are quite clever: they use a layer of conductive ink that heats up when an electrical current runs through it, in combination with a layer of thermally-activated dye that turns transparent when heated up, revealing a third layer of colored ink underneath. Because the layers are printed with varying thickness from "0%" to "100%", parts of them become yellow before others, creating a bargraph effect that varies with the current applied, the battery's body itself sinking the heat produced by the conductive ink.' Pretty cool stuff."
The amazing Linux Duracell CPU load monitor
:
:
Turning an AA on-battery tester into a CPU load monitor for Linux
You probably know those onboard testers found on Energizer and Duracell batteries : press the two white dots printed on the wrapper, and magically the battery's state appears on a yellow bar. No need for a separate battery tester, everything is included on the battery itself. While not very precise, it's good enough to know if a battery is brand new, so-so, or completely dead.
These throwaway testers are quite clever : they use a layer of conductive ink that heats up when an electrical current runs through it, in combination with a layer of thermally-activated dye that turns transparent when heated up, revealing a third layer of colored ink underneath. Because the layers are printed with varying thickness from "0%" to "100%", parts of them become yellow before others, creating a bargraph effect that varies with the current applied, the battery's body itself sinking the heat produced by the conductive ink. Informative details about those testers can be found here
HowStuffWorks
The Duracell Battery Tester
AA Battery Tester
Here are instructions to turn such a tester into a not-so-precise analog display to monitor the CPU load on a Linux system, controlled by a serial port.
What you need
# An AA Duracell battery with a tester. Energizer testers should work too, but I haven't tried. I got a pack of Duracell Ultra M3 batteries, product code LR6-MN1500.
# 1 x 3V power cube
# 1 x 2 KOhm resistor
# 1 x 4.7 KOhm resistor
# 1 x 10 KOhm resistor
# 1 x 4N25 or CNY17 optocoupler
# 1 x BC547A or 2N2222A transistor
# 1 x TIP41C transistor
# 2 x 1N4004 diode
# 3 x ON/OFF switche
# 1 x female DB9 connector
# 1 x large-ish breadboard
# 1 x clear plexiglas CD case
# 100 x patience
Instructions to make the display
Cleanly unwrap the tester off the AA battery. Be careful not to pull on any one side too hard, or you'll warp it and it'll be that much harder to connect on the breadboard. Personally, I lift both corners, gently unroll it on 3/4 mm, then use a knife and my thumb to finish taking it off the battery with an even pull. Here's what it should look like, before trimming the warped bit of the packaging
Here's the really hard bit : making a somewhat reliable connection between the tester's conductive ink points and the rest of the circuitry. To do that, place the tester on the breadboard, near the upper edge, and mark out precisely the breadboard holes the wrapper's white dots fall on. Spend some time aligning the right white dot (on the "minus" side), as the patch of conductive ink there is very thin and right on the edge of the tester. The dot on the left ("plus") side is less problematic.
To make the connectors, solder bits of "hairy" copper wire (like that found on common mains electrical cords) in the holes you marked, and leave the "hairs" sticking out where the tester will be installed. They'll help make a correct electrical contact with the tester's conductive ink. Cut out a piece of clear plexiglas from the CD case, tape one edge to the upper edge of the breadboard, and punch a small hole near the bottom edge. This makes a window to hold the tester and press it flat against the breadboad and the connector.
Solder the circuit's components at the bottom of the breadboard, under the window (there should be about 3 cm worth of breadboard left there). Here's the circuit's schematic:
Notice the 2 switches around the 1N4004 diodes : those diodes are there to reduce the voltage fed to the tester, but depending on the individual tester and the quality of the contacts with the conductive ink, you might need to overload the tester a bit to reach 100%, or make it more reactive. With the switches, you can short one or both diodes, adding 0.6V per shorted diode.
Once the circuit is done, feed it 3V and close all the switches. Then carefully align the tester on
... to keep our French friend's bandwidth down... ;)
http://home.cfl.rr.com/fnords/duracell_cpumon/
I hope my ISP doesn't kill me...
In case the site shuts down under the load, I've mirrored the page (including the Video,) to our SQ7.org project server.
Mirror
Good luck, and a cool project. A Hacker in the coolest sense of the word.
Colin Davis
They dont seem to have them on Duracell plus, but Duracell M3 batteries do. I guess its just something you get with the top of the range types :)
such as Gkrellm, which is available for Linux, FreeBSD, Mac OS X, Net BSD, OpenBSD, Solaris, and Windows... if you install gtk, gdk, glib, etc.
But a cheap hardware solution *is* pretty cool.
Now, if you could hook one of those Duracell indicators up to your date for the evening...
"Here's a battery which you can wear out, even before you put it in your flashlight! You don't have to worry about shelf-life or temperature anymore, just squeeze the ends and you have a dead battery. No muss, no fuss, just two minutes from package to trashcan."
what are you talking about?
You can't drain the whole battery with a voltage tester in two minutes. It would take half an hour if you just shorted it out to drain it.
OBVIOUSLY, the tester is there to check to see if those batteries you threw in the drawer months ago are still good.
DUH
boo ya! I knew I made the right choice opening the article instead of going for first post! HA HA I can see all the pretty pictures, I WIN IT!
l _cpumon/download/duracell_cpumon-0.0.1.tar.gz, which of course will already be slashdotted by the time you click on it.
ps the admin is pcoupard at easyconnect.fr, so send him money to buy a bigger webserver. Or if you just want to mock the french.
And more importantly, the link to download the driver for the monitor is http://webperso.easyconnect.fr/om.the/web/duracel
This is OK, but the various Linux LCD projects make for cooler displays.
h p3
Check out:
http://lcdproc.omnipotent.net/screenshots.p
How did this post get modded up? Read the article!
This isn't a temp sensor. It is measuring electrical current, not heat.
"Would you rather have a playstation addicted dork wearing a star wars t-shirt?"
spikes in CPU usage generally don't matter when you are monitoring general CPU load. Spikes are expected, and they happen, and if the processor is mostly running at an acceptable load (like under 50%) they don't matter. If the spikes get frequent enough to have an effect on the temperature of the monitor, then they are probably something to be concerned about. You are correct in that it's good to know about them 'sometimes' but most of the time it isn't.
The load avg. on unix machines filter out 'spikes' - so does this device.
Now if you were using something like this on anything important, I'd say you are crazy, but it's a very interesting concept.
err...this is a project to show system load, not temperature.
Plus, since when is a clever hack not worthwhile just for the sake of doing it? I think it's neat. Next to worthless, but definitely neat.
teeker
No kidding. Ring voltage is around 90Vac at some non-trivial current. That would have been some deep-fryed tongue.
Did you know you can fertilize your lawn with used motor oil?
Typica telephone line DC voltage is 48V and ring voltage is typically 90 vrms or 130V peak but can be upt to 130V RMS. Some modems use 130V RMS rated VDR which starts to conduct at about about 190V peak. Bell system Technical Reference #61100 mentions that a worst case telephone line voltage can be 105 VDC + 130 VAC= 289 V peak. If the MOV voltage is set too low the circuit will not pass "on-hook" requirments because it leaks too much current
Then you've never stripped a live telephone wire with your teeth when you were a kid.
I assure you you're wrong about the voltage. Cisco has 48VDC options on much of their equipment for a reason.
Hmmm, the circuit looks like it will work, but it's rather overdone... You don't need the optoisolator, or the first transistor, just use a plain old 3 amp MOSFET. And then you don't need the diodes or the switches and you can lower the supply voltage to 1.5 volts, as the MOSFET is a near-perfect switch. I havent tried it yet, but it looks like you can replace the whole shebang with a 100K resistor, a power MOSFET, and a 1.5 volt D cell.
Quote the article:
Perhaps it could be used as a temperature guage after all?
uh, a lightbulb isn't AC -- its just a big, simple resistor that heats up and gives off light. It doesn't care which way the current flows through it.
No, I am not an idiot.
0 .h tml
In the context of the discussion, size doesn't matter. because the internal resistance differences from 9V battery to 9V battery make for a insignificant difference in the amount of current passing through one's tongue. At a load of 30kohms (like i measured on my tongue), a 9V battery (even a "consumer" one) will not drop more than a few hundreths of a volt. Try it and see.
It's true, AC is much more dangerous than DC, I was oversimplifying.
>So no, there is zero chance of getting
>electrocuted from licking a 9V battery.
Where did I say there was?
As far as being killed from a 9V battery, consider this:
http://www.darwinawards.com/darwin/darwin1999-5
In this case, it is DC, but consider that at the sudden application of the current, even DC creates high frequency transient that could disrupt one's heart, similar to the way AC does. That my theory of what happened in this rare instance.