This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Switching off devices when voltage drops
#1
There was discussion in another thread that it is important to have reliable power supply for OP to work without surprises.
I made the same experience! - its the first thing I check once something isn't behaving as expected Smile

This leads me to the question/idea if I could switch off selectively e.g 2nd USB WIfi, or AIS dongle when voltages drops.
eG I leave the vessel unattended, so I may only need some sensors/switches working, not the whole SingnalK stuff.
 
Having this nice trigger/switch settings in OP I was thinking about set there a priority of switching off suppliers - get informed by SMS and so on.  

Any ideas if this can be done?
Reply
#2
Well, you can not unplug by software any device and they will be always plugged into your hub and drawing current. But you can stop services in OP and make devices use less current. There are services that save current because save work to the raspberry processor. Stopping access point, signal k, kplex and SDR-AIS... you can save a lot of power.

Solution, set a switch in "switches" tab, connect a toggle switch to GPIO pins and set actions stopping services to state OFF and starting services to state ON.

When analog sensors are implemented on v0.9.0 you will be able to set triggers for voltage/current and start/stop services according to its levels.
Reply
#3
... but it is possible to power off|on by software each devices connected on usb socket (on B+,PI2,PI3 ), and wifi i/f of PI3 on the same way too.

Anyway on the firmware V4.5 it will be implemented a power control management for the GPU.
Other people ( like me) are studying different ways to handle the PM for the raspberry world.
Davide
Reply
#4
oops, do you have any link or info?
Reply
#5
(2016-05-03, 05:58 PM)Sailoog Wrote: oops, do you have any link or info?

Yesss,


On the old A/B the control was in :
/sys/devices/platform/bcm2708_usb/buspower
then to power ON|OFF simple commands was:
Poweroff
echo 0x0 > /sys/devices/platform/bcm2708_usb/buspower
Poweron
echo 0x1 > /sys/devices/platform/bcm2708_usb/buspower

Now on PI2/PI3 the cut off of power on usb sockets may be handled by:
/sys/devices/platform/soc/3f980000.usb
pi@raspb13:/sys/devices/platform/soc/3f980000.usb $ cat buspower
Bus Power = 0x1


On the simplest way you can see how is implemented the below library useful to control many usb controllers( and rpi too):
https://github.com/codazoda/hub-ctrl.c


Instead about GPU PM for BCM2835/BCM2836 please check the specific kernel ml:
https://lists.freedesktop.org/archives/d...00294.html
http://anholt.livejournal.com/45752.html


Davide
Reply
#6
Ohh what amazing discovery.

According to your links and this info: https://www.raspberrypi.org/forums/viewt...29&t=93463

You could turn on/off the 4 raspberry ports and probably a connected hub (even the ethernet port). That means that we could add an action to control any port triggered by any data like batteries voltage.

That must be added to next v0.9.0!

Thanks!
Reply
#7
(2016-05-04, 01:24 PM)Sailoog Wrote: Ohh what amazing discovery.

According to your links and this info: https://www.raspberrypi.org/forums/viewt...29&t=93463

You could turn on/off the 4 raspberry ports and probably a connected hub (even the ethernet port). That means that we could add an action to control any port triggered by any data like batteries voltage.

That must be added to next v0.9.0!

Thanks!
I agree, in order to limit the average current it's a very nice and useful feature.
Keep in mind that RPI PI2/PI3 uses GPIO35 to check voltage supply, threshold 4,65V. But I don't understood how I can trap this (and if it's possible).
Davide

Ps.: waiting kernel 4.5 to improve the performance....
Reply
#8
Yes, maybe another future improvement, Raspberry voltage should be a new trigger, as well as temperature, etc. because these are measurable.
Batteries banks, solar panels, wind generator... should be triggers from the future analog sensors system.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)