Slashdot Mirror


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."

20 of 327 comments (clear)

  1. Text of Page by Anonymous Coward · · Score: 4, Informative

    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

    1. Re:Text of Page by ttldkns · · Score: 5, Informative

      mirror with the pictures...
      here

      --
      How many computers are too many?
  2. A Mirror by trp642 · · Score: 5, Informative

    ... to keep our French friend's bandwidth down...
    http://home.cfl.rr.com/fnords/duracell_cpumon/
    I hope my ISP doesn't kill me... ;)

  3. Mirror by E1ven · · Score: 4, Informative

    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
  4. Re:No more for Duracell or others? by superpeach · · Score: 4, Informative

    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 :)

  5. Or you can use software... by moquist · · Score: 3, Informative

    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...

  6. you're no genius by Anonymous Coward · · Score: 5, Informative

    "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

    1. Re:you're no genius by Anonymous Coward · · Score: 2, Informative

      Alkalines drop off very fast at the end if life, so it's not the problem you seem to think it is. I'm not sure what your "20%" means. From looking at the pictures of the back of the gauge and voltage drop off curves, I'd say it's pretty fair. For a real drop off cursed, check here.

  7. Re:Instantly slashdotted by Anonymous Coward · · Score: 5, Informative

    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!

    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/duracell _cpumon/download/duracell_cpumon-0.0.1.tar.gz, which of course will already be slashdotted by the time you click on it.

  8. Something cooler... by Anonymous Coward · · Score: 1, Informative

    This is OK, but the various Linux LCD projects make for cooler displays.

    Check out:
    http://lcdproc.omnipotent.net/screenshots.ph p3

  9. Re:No more for Duracell or others? by Urox · · Score: 1, Informative

    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?"
  10. Re:Useless on a quickly varying load. by babyrat · · Score: 2, Informative

    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.

  11. Re:No more for Duracell or others? by teeker · · Score: 4, Informative

    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
  12. Re:Ah-may-zing by Rolo+Tomasi · · Score: 4, Informative

    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?
  13. Re:Ah-may-zing by Anonymous Coward · · Score: 1, Informative

    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

  14. Re:Ah-may-zing by kableh · · Score: 2, Informative

    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.

  15. Re:Changes... by Ancient_Hacker · · Score: 2, Informative

    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.

  16. Re:No more for Duracell or others? by srvivn21 · · Score: 2, Informative
    Quote the poster:
    How did this post get modded up? Read the article!

    This isn't a temp sensor. It is measuring electrical current, not heat.

    Quote the article:
    ...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.


    Perhaps it could be used as a temperature guage after all?
  17. Re:Ah-may-zing by Jotham · · Score: 3, Informative

    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.

  18. Re:Ah-may-zing by mister+matt · · Score: 2, Informative

    No, I am not an idiot.

    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-50 .h tml

    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.