hamishcunningham / pi-tronics

Source code for Raspberry Pi GATE projects.
http://pi.gate.ac.uk/
42 stars 15 forks source link

Using MoPi as UPS #83

Closed occuPi-d closed 7 years ago

occuPi-d commented 8 years ago

MoPi can be used as a UPS (Uninterruptible Power Supply) in two ways. If the Pi is powered over its 5V micro-USB socket and that power drops while MoPi is active, the supply fails over transparently, allowing the Pi to continue work uninterruped

With the following configuration:

The 9V battery drains out very quickly even though the Raspberry Pi is mains powered throughout. Is this correct behaviour? I've tried a couple of different Raspberry Pi models with the same result.

Many thanks

hamishcunningham commented 8 years ago

If you're using a PP3 note that these aren't really up to the job of supplying a Pi; I've had them work for a short while in the past but gave up in the end. This will be more true with Pi 3 and/or running peripherals. But no, the mains supply should overpower the battery when it is connected. Do you have a multimeter? Check the voltage from the PSU, and the current on both lines? HTH H

occuPi-d commented 8 years ago

Many thanks for the reply. I've tried it with 9V PP3 and also 6 x AA.

The problem isn't whether the batteries are able to power the Pi, it is that the batteries discharge even when the Pi is mains powered.

I've been cross-referencing the status page of MoPi with the output of various PSUs. When the PSU output is slightly less than 5V (common albeit not ideal) the rate of battery discharge is much quicker. When 5.1V is mains supplied, the rate of battery discharge is minimal. I should add: all these PSU's will power the Pi without any apparent ill effects, even if outputting slightly below 5V.

I am wondering what is the threshold for the MoPi to step in, and can this be modified? i.e. Is it the mains supply falling below a certain voltage, or when the mains supply voltage starts to decrease etc.

Many thanks once again.

hamishcunningham commented 8 years ago

I'm afraid we're at the mercies of the vaguaries of 5V PSUs :-(

changing the threshold requires reflashing the firmware, which is not currently an end-user option :-( (hopefully it will be in the nextx version)

can you use a 5.1V PSU in your application?

cheers

h

On 31 May 2016 at 20:11, occuPi-d notifications@github.com wrote:

Many thanks for the reply. I've tried it with 9V PP3 and also 6 x AA.

The problem isn't whether the batteries are able to power the Pi, it is that the batteries discharge even when the Pi is mains powered.

I've been cross-referencing the status page of MoPi with the output of various PSUs. When the PSU output is slightly less than 5V (common albeit not ideal) the rate of battery discharge is much quicker. When 5.1V is mains supplied, the rate of battery discharge is minimal. I should add: all these PSU's will power the Pi without any apparent ill effects, even if outputting slightly below 5V.

I am wondering what is the threshold for the MoPi to step in, and can this be modified? i.e. Is it the mains supply falling below a certain voltage, or when the mains supply voltage starts to decrease etc.

Many thanks once again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hamishcunningham/pi-tronics/issues/83#issuecomment-222789952, or mute the thread https://github.com/notifications/unsubscribe/AEMQlEr8wM3cU89SOYptPc64qCpag185ks5qHIfbgaJpZM4IjxuK .

Hamish Cunningham Professor of Computer Science, University of Sheffield, UK

BBC Radio Sheffield say I'm a fish poo boffin (http://www.bbc.co.uk/programmes/p03v9nyv 2 hours 37 mins in; also on vid: http://bbc.in/20x2C5J & scroll down a little)

Phone: +44 7740 149 842 hamish@gate.ac.uk https://twitter.com/@HCunningham https://hamish.gate.ac.uk https://wegrow.social https://wegrow.social/ https://gate.ac.uk https://pi.gate.ac.uk http://www.dcs.shef.ac.uk/cgi-bin/makeperson?H.Cunningham

occuPi-d commented 8 years ago

Thanks for the reply once again. Ultimately, I wanted to use the MoPi as a way to cleanly shutdown the Pi once a standard USB power bank (connected directly to the Pi) is depleted. Unfortunately, the output of these powerbanks also dip below 5V too. Oh well - looking forward to the next version with flashable firmware! :)