Notebook battery as UPS


Forum: Cool Things
Topic: Notebook battery as UPS
started by: jrader

Posted by jrader on Aug. 07 2005,02:08
Here's a little history on my project... I'm stripping an older notebook down and mounting on a pic frame to make a digital picture frame. Also, it will be my mp3 server. I know Linux doesn't like having power cut, so I thought I could use the battery as a UPS. I have limited experience in scripting though, so I was wondering if anyone could help me out. For example, if someone unplugs the frame or the power gets cut, I want the computer to execute shutdown once it hits 20% battery left. If anyone has an idea they could throw my way, it'd be much appreciated.  :) Thanks.
Posted by mgmont on Aug. 10 2005,02:55
Here are my thoughts on your project.

I can't help you with the battery control, but I have a suggestion.  You could replace the hard drive with an ide to cf adapter and do a frugal install to the cf.  You could partition the cf into two partitions, one for frugal and one for pictures, mp3s and  programs and/or you could put pictures and mp3s on a thumb drive if the laptop has a USB port.  This way you could lose power or pull the plug and nothing would be corrupted or damaged.  The operating system is read only and if installed on a cf, there is no hard drive to crash or get corrupted.  

I have been running the laptop that I am typing this response on for several months with that configuration with great success.  If I pull the plug or hit the off button, I only loose what was changed in ram in the current session.  Also every thing runs much faster from a cf than a hard drive.

Good luck, let us know how your project turns out.

Posted by TomTheGeek on Dec. 26 2005,06:00
I am doing the same thing with a laptop and I was wondering if there is a way to have it automatically shut down when it goes to battery power. That way all i'd have to do is pull the plug if I wanted it to shut down.
Posted by cbagger01 on Dec. 27 2005,19:34
I'm sure that there is a way to execute a script to do this.

Basically, it would execute a "halt" command when it sensed battery power.

Reading up on the subject with google search for linux APM power script or linux ACPI power script might help.

Posted by 300c_pilot on Jan. 09 2006,06:10
I am no help on your question, but a battery will last a lot longer if only a cf card is drawing juice, instead of a hd. Good luck, would like to know what you end up doing?
Posted by Breadman on Jan. 13 2006,19:08
Maybe its a lot easier than you think:

on my gericom notebook there is a special option in the bios which does the following:

it halts the system and copies everything from the ram in a special partiton on hd. So you can reboot your system at the state were you shut it off.
If your bios does not support it, maybe a bios update will help.

BTW: your harddisk will not crash if you only switch off power. the power supply in a "normal" desktop or notebook system does exactly the same. Only a few systems support a "nice" switch off using special electrical circuits.


Breadman
< www.bread-n-linux.de.vu >

Posted by TomTheGeek on Jan. 14 2006,16:21
Funny you should say that, my laptop is a Dell and everytime it boot it complains there's no "suspend to disk partition". I don't think it's used the way your is but it's similar.

I know it won't crash if I pull the plug but I wolld jsut like it to shut down gracefully. I formatted the drives using Ext3 so it checks the drive for me automatically after an improper shutdown but since it's a laptop I just wanted to avoid that if possible.

Posted by Breadman on Jan. 14 2006,20:34
A improper shutdown is nothing which might damage the hardware.
Your problem is rather the software: When your system is running it has to create certain temporary data.
If you boot it after it crashed it checks itself. Then the error message (or whatever) appears.

This check procedure is nothing bad, it only checks whether your drive is physically damaged and it deletes old temporary data.

Much more dangerous than an improper shutdown is the switching on of the harddisk.
I have got a 2.5' HDD in an external disc case which i run via USB. After booting it needs about some houndred mV. if i switch it on it can be a dozen times of it.

What I want to say by that is: for your drive it is no problem if it is abruptly cut off energy. It can also stand high (to certain extend) energy impulses.

if you have not a script for power-shut-off included in your bios you surely will have to create a script for your current os.

Since I am a linux-noop i cannot help you with that. Sorry!

Breadman

< www.bread-n-linux.de.vu >

Posted by DUCK on Jan. 23 2006,18:44
Gotta remember: don't use a swap file on a CF!
Flash memory has limited number of writes per sector before it dies. Without a swap, that sort of setup can practically run forever.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.