klintkrossa
Posts: 81
Joined: Tue Nov 10, 2015 3:06 pm

Core Voltage

Wed Nov 23, 2016 7:56 am

What is the safe core voltage?
upper and lower.

Code: Select all

import os,re
stream = os.popen("sudo bash volt").read()
print (stream)
volt = re.findall("\d{1}\.\d{1,4}", stream)
volt = list(map(float, volt))
volt1 = volt.pop()
if volt1> 1.0:
    print('greater that')
else:
    print ('less than')
This script should create a shut down for battery operation. replacing print with os,..halt
of course that is what I get for typing late at night. forgot this code

Code: Select all

#! /bin/bash


for id in core
do
    echo "$(vcgencmd measure_volts $id)"
done




Last edited by klintkrossa on Wed Nov 23, 2016 2:53 pm, edited 1 time in total.
Thanks
This is not like any other bulletin boards that I have been on. Been flamed on other BB's so bad I was afraid to ask.

All my Raspberry Pi's are like the Hessian artilleryman of Sleepy Hollow.

User avatar
davidcoton
Posts: 5028
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Core Voltage

Wed Nov 23, 2016 9:47 am

klintkrossa wrote:What is the safe core voltage?
upper and lower.

Code: Select all

import os,re
stream = os.popen("sudo bash volt").read()
print (stream)
volt = re.findall("\d{1}\.\d{1,4}", stream)
volt = list(map(float, volt))
volt1 = volt.pop()
if volt1> 1.0:
    print('greater that')
else:
    print ('less than')
This script should create a shut down for battery operation. replacing print with os,..halt
You can't monitor battery state by looking at core voltage. The core voltage is regulated and won't go down until the battery resembles a pancake.
You have to monitor the 5V supply, there is no onboard A2D to give a value. You can monitor the low voltage (4.63V IIRC) warning, and shut down when that appears. Whether there is enough time left to shut down when the warning appears will depend on the converter circuit used with the battery. Otherwise you will need an add-on A2D, preferably monitoring the actual battery voltage rather than the 5V converter output.
Signature retired

klintkrossa
Posts: 81
Joined: Tue Nov 10, 2015 3:06 pm

Re: Core Voltage

Wed Nov 23, 2016 3:02 pm

davidcoton wrote:
klintkrossa wrote:What is the safe core voltage?
upper and lower.

Code: Select all

import os,re
stream = os.popen("sudo bash volt").read()
print (stream)
volt = re.findall("\d{1}\.\d{1,4}", stream)
volt = list(map(float, volt))
volt1 = volt.pop()
if volt1> 1.0:
    print('greater that')
else:
    print ('less than')
This script should create a shut down for battery operation. replacing print with os,..halt
You can't monitor battery state by looking at core voltage. The core voltage is regulated and won't go down until the battery resembles a pancake.
You have to monitor the 5V supply, there is no onboard A2D to give a value. You can monitor the low voltage (4.63V IIRC) warning, and shut down when that appears. Whether there is enough time left to shut down when the warning appears will depend on the converter circuit used with the battery. Otherwise you will need an add-on A2D, preferably monitoring the actual battery voltage rather than the 5V converter output.
:cry: :cry: that is no good. how would I find the IIRC in script?
Thanks
This is not like any other bulletin boards that I have been on. Been flamed on other BB's so bad I was afraid to ask.

All my Raspberry Pi's are like the Hessian artilleryman of Sleepy Hollow.

User avatar
DougieLawson
Posts: 39126
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Core Voltage

Wed Nov 23, 2016 3:36 pm

IIRC means "If I remember correctly" it's not something you can search for.

You will need to use external hardware to monitor your battery, you can't do it using anything on your RPi. The only indication of low voltage/current is the lightning bolt icon on screen and a GPIO signal, but by the time you reach that point with your flat battery your RPi will already be crippled and your SDCard will be at risk of corruption. You need to trigger a shutdown while you still have enough power budget to achieve an orderly poweroff.

On old Raspberries it was GPIO35. That's probably not true with a RPI3 and may not be true with a RPI2V2.
viewtopic.php?t=82373
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Advanced users”