Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-05-2017, 01:22   #1
Registered User

Join Date: Sep 2012
Location: Plymouth, UK
Boat: Dufour 36 Classic
Posts: 13
Linux Config Loss on Power Fail

Hi,

If I lose power to my Raspberry Pi running OpenCPN, then the next time I open the chart plotter I have lost ALL of the config and its like the system is sent back to the beginning....

Is there any way of stopping this from occurring?

Kind regards

Jason
lone_viper is offline   Reply With Quote
Old 15-05-2017, 01:35   #2
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Linux Config Loss on Power Fail

Quote:
Originally Posted by lone_viper View Post
Hi,

If I lose power to my Raspberry Pi running OpenCPN, then the next time I open the chart plotter I have lost ALL of the config and its like the system is sent back to the beginning....

Is there any way of stopping this from occurring?

Kind regards

Jason
What SD card are you using? Are you using openplotter? Might be worth trying another card- no probs on my Pi 3.
conachair is offline   Reply With Quote
Old 15-05-2017, 02:01   #3
Registered User

Join Date: Sep 2012
Location: Plymouth, UK
Boat: Dufour 36 Classic
Posts: 13
Re: Linux Config Loss on Power Fail

Quote:
Originally Posted by conachair View Post
What SD card are you using? Are you using openplotter? Might be worth trying another card- no probs on my Pi 3.
Hi, Yes this is on OpenPlotter, and not sure of the make, but its a branded one 16GB or 8GB, not sure which one I ended up putting in there.... Its still on the boat.

As you can imagine, its very annoying.
lone_viper is offline   Reply With Quote
Old 15-05-2017, 02:29   #4
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Linux Config Loss on Power Fail

Quote:
Originally Posted by lone_viper View Post
Hi, Yes this is on OpenPlotter, and not sure of the make, but its a branded one 16GB or 8GB, not sure which one I ended up putting in there.... Its still on the boat.

As you can imagine, its very annoying.
Yes, annoying...

Might be easier not loosing power...

I changed the power supply to a buck/boost one set to just over 5v so the Pi doesn't loose power when starting the engine.

Also, openplotter has a forum of its' own, might be worth asking in there...
OpenMarine
conachair is offline   Reply With Quote
Old 15-05-2017, 14:09   #5
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: Linux Config Loss on Power Fail

I have built a super cheap "UPS" for the raspberry pi that now have been tested for more than a year sucessfully without any issues.

I'm running the raspberry headless with a dAISy AIS hat so the power consumption is limited.

What you will need:

2 x Backup External Portable USB Power Bank Battery Charger DIY 18650 Case LINK TO EBAY: Backup External Portable USB Power Bank Battery Charger DIY 18650 Case | eBay

1 x bank of two parallel connected 18650 batteries LINK TO EBAY : Panasonic 18650 Li-ion battery 3.7V 6200mAh DIY for Portable Power bank 1S2PT | eBay

You may as well use two regular 18650 batteries and using a short wire and solder them in Paralell as well.

Connect the micro usb port for the charger on the one "bank" and the power outlet to the raspberry pi on the " other bank.

The theory is simple. the Power bank is originally only capable to either be charged, or to supply power output, and is not capable to be charged and supply power at the same time. When connecting two 18650 batteries in parallel and using two " single" 18650 power banks as shown in the photos, one of the power banks will supply the power to the raspberry, and the other will charge both batteries at the same time.

I have tested this for more than a year with the raspberry running
"24/7 /365" and it just works.
No more suddenly crashes of the raspberry when starting the engine or other power problems. It will keep the raspberry running for many hours without mains or other power supply.
You can even use much cheaper batteries than the "expensive" Panasonic ones i bought, but ebay is ebay and you will find a lot of fake and poor quality 18650 batteries there and I hoped for that paying a little bit more for the so called "original" Panasonic batteries that the quality would be fine and it seems that that strategy worked for me.

I would recommend to wrap some electrical tape in each end around the boxes to keep them together - not shown in photos.

Difficulty in a scale from 1 to 6 : 1 - super easy - less than 1 minute work.
Tools required: None.

Quote:
Originally Posted by conachair View Post
Yes, annoying...

Might be easier not loosing power...

I changed the power supply to a buck/boost one set to just over 5v so the Pi doesn't loose power when starting the engine.

Also, openplotter has a forum of its' own, might be worth asking in there...
OpenMarine
Attached Thumbnails
Click image for larger version

Name:	rip-UPS6.jpg
Views:	236
Size:	377.3 KB
ID:	147845   Click image for larger version

Name:	rip-UPS1.jpg
Views:	201
Size:	274.0 KB
ID:	147846  

Click image for larger version

Name:	rip-UPS2.jpg
Views:	276
Size:	253.2 KB
ID:	147847   Click image for larger version

Name:	rip-UPS3.jpg
Views:	176
Size:	407.5 KB
ID:	147848  

Click image for larger version

Name:	rip-UPS4.jpg
Views:	195
Size:	278.1 KB
ID:	147849   Click image for larger version

Name:	rip-UPS5.jpg
Views:	200
Size:	397.3 KB
ID:	147850  

petter5 is offline   Reply With Quote
Old 16-05-2017, 02:08   #6
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Linux Config Loss on Power Fail

Quote:
Originally Posted by petter5 View Post
I have built a super cheap "UPS" for the raspberry pi that now have been tested for more than a year sucessfully without any issues.
Brilliant! Very clever & simple , thanks for sharing
conachair is offline   Reply With Quote
Old 17-08-2017, 12:18   #7
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,414
Re: Linux Config Loss on Power Fail

Why not use 6 ultra capacitors in series with resistors to balance them? They provide power to the 5v regulator.

These capacitors also have a diode (or pfet) to prevent backflow.

The ultracapacitors last much longer than batteries
seandepagnier is offline   Reply With Quote
Old 17-08-2017, 12:25   #8
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: Linux Config Loss on Power Fail

The soultion you suggest is mostly technically better, but out of reach for 99% of the users in this forum - the 18650 hack above is so straight forward that most users will have success.
Quote:
Originally Posted by boat_alexandra View Post
Why not use 6 ultra capacitors in series with resistors to balance them? They provide power to the 5v regulator.

These capacitors also have a diode (or pfet) to prevent backflow.

The ultracapacitors last much longer than batteries
petter5 is offline   Reply With Quote
Old 17-08-2017, 12:38   #9
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: Linux Config Loss on Power Fail

I think corruption can occur if the operating system crashes as well.
I had a situation where the graphics driver was crashing the system and every time the SD card would be corrupted.

It seems like the only way to minimize the possibility of SD card corruption is to use a RAM disk during operation, but unfortunately the RPi has not got a lot of RAM
__________________
Cheers,
JM
nahannivatsea.blogspot.ca
NahanniV is offline   Reply With Quote
Old 17-08-2017, 19:25   #10
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 466
Re: Linux Config Loss on Power Fail

Or use one of the UPS Hats available for the Pi. These things have a small battery built in that runs the Pi for long enough to let it shut down properly when the main power is removed. Some of them also take a 12V input too which is handy.
AedanC is offline   Reply With Quote
Old 18-08-2017, 10:29   #11
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
Re: Linux Config Loss on Power Fail

Quote:
Originally Posted by AedanC View Post
Or use one of the UPS Hats available for the Pi. These things have a small battery built in that runs the Pi for long enough to let it shut down properly when the main power is removed. Some of them also take a 12V input too which is handy.
In principle I would agree. However, I have yet to find a UPS HAT that is at all reliable (and I have tried a few).
duichan is offline   Reply With Quote
Old 18-08-2017, 11:41   #12
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 466
Re: Linux Config Loss on Power Fail

I agree to an extent, I have used two and neither was ideal. However it needs to be remembered that the Pi itself is not a robust design and never will be no matter what you stick onto it. In that context the UPS hats were probably of a similar ilk.

I have used MoPi and Pico UPSs, if you have found a better one please let me know.
AedanC is offline   Reply With Quote
Old 19-08-2017, 02:51   #13
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: Linux Config Loss on Power Fail

The 18650 battery hack above is reliable and very cheap - tested in daily use for a year without any problems.

http://www.cruisersforum.com/forums/...ml#post2393825

Quote:
Originally Posted by duichan View Post
In principle I would agree. However, I have yet to find a UPS HAT that is at all reliable (and I have tried a few).
petter5 is offline   Reply With Quote
Old 19-08-2017, 07:09   #14
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,414
Re: Linux Config Loss on Power Fail

petter,

How does the pi shut down when the battery is low? How long can it run?
seandepagnier is offline   Reply With Quote
Old 19-08-2017, 07:46   #15
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 719
Re: Linux Config Loss on Power Fail

When it's empty - then it is empty. On the other hand, running headless with openplotter/vnc it seems to run "forever" - I have never really tested how long but I left it over night running un connected" and it still was running fine next morning. Before there was a problem with the raspberry rebooting while starting the boats engine - now it is stable as granite.
Quote:
Originally Posted by boat_alexandra View Post
petter,

How does the pi shut down when the battery is low? How long can it run?
petter5 is offline   Reply With Quote
Reply

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Loss in Tohatsu 5HP Outboard ssullivan Engines and Propulsion Systems 64 30-11-2015 13:17
Best config for running rigging s/v Beth Deck hardware: Rigging, Sails & Hoisting 8 15-09-2015 11:43
Grib plugin for Mac - Write and Send Email Config SeattleSail OpenCPN 7 02-09-2015 06:05
Change 12v Solar Config to 24v? deepthought Electrical: Batteries, Generators & Solar 16 09-03-2013 15:05
WiFi Bullet and Linksys Router Config Meck Marine Electronics 1 17-10-2009 08:03

Advertise Here


All times are GMT -7. The time now is 20:19.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.