LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-17-2010, 04:05 AM   #1
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Powerfailure proof PC


I am building a system for my boat. It will run either xubuntu or gentoo. I can't have a ups as the computer will be running off the boat's 12v battery which is charged by solar panels. I would like some sugestions as to how to configure the system to make it reliable in the very likely event of a power failure or brownout. Idealy I would like to configure it to boot as soon as it gets power and just shut off the power without a shutdown. The computer in question will run the OpenCPN gps chartplotter along with mplayer and maybe some emulators; nothing too critical. I was thinking maybe making most of the filesystem read only might work?
 
Old 07-17-2010, 06:05 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Power is going to be a factor for a PC system. Why not use a laptop? Your display for the PC is going to require a source. A laptop or even a netbook would use minimal power and allow ease of acpi to power control plus have a display subsystem.

The use of a inverter would allow you the source for the PC. But for a laptop the converter would not be necessary, just a plug for the DC power plug input.

Hopefully you have a charge controller for the solar system. If so there will be a charge control output (level status) from the controller that could be used to indicate level for the system. You can use 'acpi' and configure the system to sleep when not in use for a period. Control the spin-down for hdd or use a 'SSD'. Minimize the power needs of the system. Run the applications from the console for independence if possible or use a minimal DE.
 
Old 07-17-2010, 08:09 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
FYI it depends on the laptop but most of the ones I use i.e Dell and Panasonic power converters output 19 V DC. I agree that a netbook or laptop would be a good choice.
 
Old 07-17-2010, 01:19 PM   #4
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Original Poster
Rep: Reputation: 46
Well the display in question is a 23" LCD mounted to the bulkhead and running off a 400w inverter (it doesn't draw nearly that much.) I need to use this screen so I can read the map from the cockpit while sailing. I like xfce a lot but in this case I'll probably go with something more minimal, in fact I'd like everything to run fullscreen and will be running few enough apps that I can probably just launch them all from the keyboards media keys.

Currently the setup uses an old 650mhz laptop with 128mb of ram and xubuntu this runs the Chartplotter just fine but has a few problems: the battery is shot so it always pulls more juice then it needs to try to charge itself (not to mention it runs of the inverter that steps it up to 120v then a power brick that drops it back down to 19v), I have to push alt-f3 to get it to use the external monitor every time, It has only 1 usb port which is used by the gps so a wireless keyboard and mouse are out of the question so Instead of being tucked away somewhere it must sit out and that means one less seat for guests and a tripping hazard, and last but not least; it's so old the kernel dropped support for the sound card, no sound means no movies or music or mooring alarm.

The computer I want to use (and already have) is a MiniITX: 800Mhz ViaC3 with 256mb of ram and a 40Gb 2.5" Laptop drive; it only consumes about 30w and runs off 12v directly no converter needed. I could mount it to the back of the bulkhead out of the way, Set the bios to reboot after a powerfailure and it has 4 usb ports and an AC'97 sound card. Power consumption is an issue because the boat sits out on lake michigan all the time and there's no alternator so the solar is pretty much it, but the current system is working and draws more power so this will be an improvement. I would like to be able to just turn it on and off with the breaker switch on the boats main control panel. I understand that I could loose and unsaved data when I cut the juice, but can I protect the system so It can still reliably boot back up the next time? I was thinking just /home and /var could be writable? maybe select the filesystem for this purpose?
 
Old 07-17-2010, 01:54 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Either way you should be working with a converter between the battery bank and the system. The 12 VDC battery system controller should provide shutdown & sense. Your laptop or single board system should not be connected to the battery system directly but through a converter or controller.

The isolation is for protection of the battery system as well as the computers. What is the total draw and the duration of charge?

You should be able to control the laptops display and output only via the external VGA port.
 
Old 07-17-2010, 02:12 PM   #6
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Original Poster
Rep: Reputation: 46
There will be a 12v voltage stabilizer between the battery system and the computer, but the battery voltage is much more stable then in a car. The electrical system is all solar the solar panels dump about 4amps into the 120Ah Lead-Acid battery whenever the sun is up unless it's fully charged. The battery doesn't start the engine or charge off the engine; It's an isolated system just for the lights/radios/computer. the board in question is a fanless thinclient it draws less power then a laptop and I could hide it neatly away due to its small size.
 
Old 07-18-2010, 06:14 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,965

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Almost every laptop that has input of 19V can actually run on 12 battery. 12 batteries are normally more than 13 volt and with a charger can go near 16.
I have run laptops off cig ligher adapters, they just don't see to fully charge batteries.
 
Old 07-18-2010, 09:53 PM   #8
jaydot
LQ Newbie
 
Registered: Jan 2007
Distribution: PCLinuxOS 2009.2
Posts: 5

Rep: Reputation: 0
i'll just throw this out as if i knew what i was talking about - could you not connect the computer directly to the battery?
 
Old 07-18-2010, 11:52 PM   #9
bendib
Member
 
Registered: Feb 2009
Location: I'm the rat in your couch.
Distribution: Fedora on servers, Debian on PPC Mac, custom source-built for desktops
Posts: 174

Rep: Reputation: 40
Quote:
Originally Posted by johnson_steve View Post
I am building a system for my boat. It will run either xubuntu or gentoo. I can't have a ups as the computer will be running off the boat's 12v battery which is charged by solar panels. I would like some sugestions as to how to configure the system to make it reliable in the very likely event of a power failure or brownout. Idealy I would like to configure it to boot as soon as it gets power and just shut off the power without a shutdown. The computer in question will run the OpenCPN gps chartplotter along with mplayer and maybe some emulators; nothing too critical. I was thinking maybe making most of the filesystem read only might work?
Mount "/" with rw,sync. Writable, AND tolerant of power failures, or in my case, cord trippings. There will be a little performance loss.
 
Old 07-19-2010, 06:10 AM   #10
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Quote:
Originally Posted by johnson_steve View Post
There will be a 12v voltage stabilizer between the battery system and the computer, but the battery voltage is much more stable then in a car. The electrical system is all solar the solar panels dump about 4amps into the 120Ah Lead-Acid battery whenever the sun is up unless it's fully charged. The battery doesn't start the engine or charge off the engine; It's an isolated system just for the lights/radios/computer. the board in question is a fanless thinclient it draws less power then a laptop and I could hide it neatly away due to its small size.
Most modern solar controllers have the ability to control selectively the input source. If you have a genset of some sort then that could be utilized whenever the solar system has no source. I'm surprised with the use of Lead-Acid batteries. Be sure to vent the battery compartment. What about gel or even lead-calcium for better reserve and deep cycle. How many panels do you have? 4A is a lot of panel. How big is the array? How many cells? Just curious!

Do you have the specs on the 'MiniITX' or a link? Passive cooling? The use of a 'SSD' would lower the load as compared to even a laptop drive which would extend service. As for the power cycles of the system, should not be a problem to setup with acpi & apic. A simple circuit could be devised to sense power levels via the controller to trigger things. Somewhat like the UPS can provide power status. You could setup a simple script to monitor. As for filesystem(S), be sure to use a journal. I would use ext3 but that's me. Most 'MiniITX' SBC do have toolboxes along with the GNU/Linux to provide a lot of utility for what you desire to do.

This sounds like a fun project. I would suggest that you look at some of the 'remote weather stations' that are implemented by using a SBC or data loggers . Should provide some good insight and show some of the obstacles to avoid.
 
Old 07-19-2010, 11:31 PM   #11
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Original Poster
Rep: Reputation: 46
4 panels, 18" x 12", 12w each. I made the charge controller & the voltage stabilizer so they don't have any of the frills of a store bought unit. There is a car stereo and Vhf radio as well as all the lights running off this battery so I'm not picky enough about power consumption to go with a ssd especially since I've got a 60gb hdd on the shelf. It's looking like I'm going to try xubuntu 10.04 with the rootfs mounted with the sync option.

Edit:
Forgot to mention there is no other power source; no genset, no alternator and no outlets within a quarter mile.

Last edited by johnson_steve; 07-19-2010 at 11:33 PM.
 
Old 07-20-2010, 01:39 AM   #12
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Suggestion for some extra hardware that basically simulates a UPS (for a minute or so).

Add a timed relay to power the computer; when you throw the switch, the relay will keep the laptop powered for a while.
Add a detector to monitor the 'switch' and a daemon to monitor the detector. Not sure what the daemon must do but /etc/inittab has options for powerfail, so I assume the daemon must trigger something somewhere.

Just a thought.

PS Some research shows it might have to generate a SIGPWR
PPS According to http://linux.about.com/od/commands/l/blcmdl8_init.htm use of SIGPWR and related files is discouraged.

Last edited by Wim Sturkenboom; 07-20-2010 at 01:59 AM. Reason: added PPS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid cannot start after powerfailure perfectpol7 Linux - Networking 8 03-04-2009 05:54 PM
CRC error after powerfailure Koetsier Linux - Software 2 04-26-2006 02:25 AM
Firewire powerfailure - device not recognised - what files to flush? redness Linux - Hardware 0 01-28-2005 04:23 AM
Firewire powerfailure - device no recognised - what files to flush? redness Linux - Networking 0 01-28-2005 01:39 AM
Proof that LQ is just the Best Jadasin LinuxQuestions.org Member Success Stories 10 04-30-2003 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration