New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bone and rpi2 development snapshots 2017-09-30 shutdown shortly after brickman starts due to brickd detecting a low battery level when the board is powered by a source other than the battery #989

Closed
kortschak opened this Issue Oct 22, 2017 · 19 comments

Comments

Projects
None yet
4 participants
@kortschak
Member

kortschak commented Oct 22, 2017

What are you trying to do?

Boot stretch development snapshot of 2017-09-30 on BrickPi+, BrickPi3 and FatCatLab beagle bone black.

What did you expect to happen?

Successful boot.

What actually happened?

Successful boot into brickman (via HDMI for PrickPi+/BrickPi3, via built-in screen on FatCatLab), then a couple of seconds later a clean power down.

What hardware and software are you using (including version numbers)?

Information on for hardware and image - other infomormation not available due the issue.

BrickPi+:

Image file:         snapshot-ev3dev-stretch-rpi2-generic-2017-09-30
Board:              Raspberry Pi 2 Model B Rev 1.1
Revision:           a21041

BrickPi3

Image file:         snapshot-ev3dev-stretch-rpi2-generic-2017-09-30
Board:              Raspberry Pi 3 Model B Rev 1.2
Revision:           a02082

FatCat:

Image file:         snapshot-ev3dev-stretch-bone-generic-2017-09-30
Board:              TI AM335x BeagleBone Black
Revision:           00c0

In all cases appropriate boot configuration text was modified:

BrickPi+: uncomment dtoverlay=brickpi, init_uart_clock=32000000 and dtparam=brickpi_battery=okay
BrickPi3: uncomment dtoverlay=brickpi3
FatCat: uncomment cape=evb

@dlech

This comment has been minimized.

Member

dlech commented Oct 22, 2017

How are you powering these devices?

@dlech

This comment has been minimized.

Member

dlech commented Oct 22, 2017

Also see: #861 (comment)

@kortschak

This comment has been minimized.

Member

kortschak commented Oct 22, 2017

That makes sense, though leads to some surprising behaviour. I'm powering the device by USB through the main board just for testing kernel behaviour (with the full understanding that the capes won't drive anything). Is there some way to distinguish 5V through the main board from a low power through the cape?

@dlech

This comment has been minimized.

Member

dlech commented Oct 22, 2017

The "right way" to fix it would be to write power supply drivers for the USB ports that power the device.

This is complicated by the fact that all existing ev3dev programs assume that there is only one "System" power supply.

@kortschak

This comment has been minimized.

Member

kortschak commented Oct 22, 2017

OK. So in the interim, where is brickd started so I can remove that service on the card at least temporarily (I'm spelunking at the moment).

@dlech

This comment has been minimized.

Member

dlech commented Oct 22, 2017

I don't have time to look at the moment, but I think you can mask systemd services by creating a symlink from brickd.service to /dev/null in /etc/systemd/system/.

@kortschak

This comment has been minimized.

Member

kortschak commented Oct 23, 2017

Thanks, that works.

Does this close or become a feature request for richer power handling?

@dlech

This comment has been minimized.

Member

dlech commented Oct 23, 2017

Does this close or become a feature request for richer power handling?

You tell me 😉

If someone wants this bad enough to do the work, then sure, I don't see a reason why we could not make this happen.

@kortschak

This comment has been minimized.

Member

kortschak commented Oct 23, 2017

In the short term I've just uninstalled brickd, so I'm fine to leave the situation as it is, but the plan for brickd looks like it's going to be an integral part of ev3dev. If that happens, then it may be difficult to have an ev3dev install without brickd and this would be needed. So either I change the name here for a long term issue, or we close it and make a new issue later. I'm easy for either of these.

@dlech dlech added brickd bug labels Oct 24, 2017

@dlech dlech changed the title from bone and rpi2 development snapshots 2017-09-30 shutdown shortly after brickman starts to bone and rpi2 development snapshots 2017-09-30 shutdown shortly after brickman starts due to brickd detecting a low battery level when the board is powered by a source other than the battery Apr 14, 2018

dlech added a commit to ev3dev/brickd that referenced this issue Apr 15, 2018

Don't shut down when battery is not connected
On some platforms, it is possible (but not recommened) to power from
USB. Try to detect when this happens and don't shut down in that case.

Issue: ev3dev/ev3dev#989
@dlech

This comment has been minimized.

Member

dlech commented Apr 15, 2018

Fixed in brickd_1.1.2.

@dlech dlech closed this Apr 15, 2018

@zombiezen

This comment has been minimized.

zombiezen commented Apr 21, 2018

This is not fixed for me. Booting up the BrickPi3 with just USB power to the main Raspberry Pi board will shut off. I can confirm I am running brickd 1.1.2.

@dlech

This comment has been minimized.

Member

dlech commented Apr 21, 2018

Can you boot with battery power, then disable brickd:

sudo systemctl disable brickd

then reboot with USB power and check the voltage levels. For example here is what I have on BrickPi3 + RPi2B:

$ for f in /sys/bus/iio/devices/iio\:device0/in_voltage_*; do echo -n "$f: "; cat $f; done
/sys/bus/iio/devices/iio:device0/in_voltage_3V3_input: 3310
/sys/bus/iio/devices/iio:device0/in_voltage_5V_input: 4734
/sys/bus/iio/devices/iio:device0/in_voltage_9V_input: 9162
/sys/bus/iio/devices/iio:device0/in_voltage_VCC_input: 4016

@dlech dlech reopened this Apr 21, 2018

@zombiezen

This comment has been minimized.

zombiezen commented Apr 21, 2018

robot@ev3dev:~$ for f in /sys/bus/iio/devices/iio\:device0/in_voltage_*; do echo -n "$f: "; cat $f; done
/sys/bus/iio/devices/iio:device0/in_voltage_3V3_input: 3355
/sys/bus/iio/devices/iio:device0/in_voltage_5V_input: 5028
/sys/bus/iio/devices/iio:device0/in_voltage_9V_input: 9095
/sys/bus/iio/devices/iio:device0/in_voltage_VCC_input: 4347
@dlech

This comment has been minimized.

Member

dlech commented Apr 21, 2018

This is with RPi 3B+ correct?

@zombiezen

This comment has been minimized.

zombiezen commented Apr 21, 2018

Yes.

dlech added a commit to ev3dev/brickd that referenced this issue Apr 21, 2018

@dlech

This comment has been minimized.

Member

dlech commented Apr 21, 2018

Should be fixed now in brickd_1.1.3. I increased the minimum voltage from 4.2V to 4.5V.

@dlech dlech closed this Apr 21, 2018

@zombiezen

This comment has been minimized.

zombiezen commented Apr 22, 2018

I can confirm this fixes the issue on my RPi 3B+. Thanks!

@tcwan

This comment has been minimized.

tcwan commented May 31, 2018

On a fresh RPi 3B+ with BrickPi3 and using the recommended RPi MicroUSB power source (max 2.5A output), I'm seeing the automatic shutdown.

This is with snapshot-ev3dev-stretch-rpi2-generic-2018-05-24.img.xz and config.txt updated for BrickPi3.

Brickman Battery menu reports 4.61 to 4.62 as the voltage.

The system is stable if I power it via the BrickPi3 barrel power connector with 9V.

Note: I was using a RPi2 with the BrickPi3 previously on the 2018-04-04 
snapshot and it was working fine. Unfortunately I didn't check the 
voltage level before disassembling it.

@dlech dlech reopened this May 31, 2018

dlech added a commit to ev3dev/brickd that referenced this issue May 31, 2018

@dlech

This comment has been minimized.

Member

dlech commented May 31, 2018

Bumped the voltage up to 4.75V in brickd_1.1.4.

@dlech dlech closed this May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment