Cruisers Forum
 


Join CruisersForum Today

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

Join Date: Sep 2012
Location: Plymouth, UK
Boat: Dufour 36 Classic
Posts: 12
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, 02:35   #2
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,494
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 online now   Reply With Quote
Old 15-05-2017, 03:01   #3
Registered User

Join Date: Sep 2012
Location: Plymouth, UK
Boat: Dufour 36 Classic
Posts: 12
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, 03:29   #4
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,494
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 online now   Reply With Quote
Old 15-05-2017, 15:09   #5
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 570
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:	62
Size:	377.3 KB
ID:	147845   Click image for larger version

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

Click image for larger version

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

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

Click image for larger version

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

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

__________________
petter5 is offline   Reply With Quote
Old 16-05-2017, 03:08   #6
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 3,494
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 online now   Reply With Quote
Old 17-08-2017, 13:18   #7
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,790
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
__________________
boat_alexandra is offline   Reply With Quote
Old 17-08-2017, 13:25   #8
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 570
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, 13:38   #9
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: On the Boat
Boat: Finnsailer 38
Posts: 1,114
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, 20:25   #10
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 150
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, 11:29   #11
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 45
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, 12:41   #12
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 150
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, 03:51   #13
Marine Service Provider

Join Date: May 2013
Location: Norway
Posts: 570
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.

Linux Config Loss on Power Fail

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, 08:09   #14
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,790
Re: Linux Config Loss on Power Fail

petter,

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

Join Date: May 2013
Location: Norway
Posts: 570
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
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 14:17
Best config for running rigging s/v Beth Deck hardware: Rigging, Sails & Hoisting 8 15-09-2015 12:43
Grib plugin for Mac - Write and Send Email Config SeattleSail OpenCPN 7 02-09-2015 07:05
Change 12v Solar Config to 24v? deepthought Electrical: Batteries, Generators & Solar 16 09-03-2013 16:05
WiFi Bullet and Linksys Router Config Meck Marine Electronics 1 17-10-2009 09:03



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 06:53.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.