Hi,
I have a 12v power-source connected to the VIN terminals, and 5v to VUSB. My ideal scenario is to have VUSB as a variable primary power-supply, and the 12v as backup.
However, when configuring VUSB as the primary power in wp5 and then disconnecting VUSB, the Raspberry Pi reboots. After booting everything works fine with VIN, but reconnecting and disconnecting VUSB makes the device reboot again.
Is this a known issue?
Additionally, it seems like setting the shutdown voltage limit has no effect if the power source goes to 0v, or is removed. Is this by design, or a bug?
Additionally, it seems like setting the shutdown voltage limit has no effect if the power source goes to 0v, or is removed. Is this by design, or a bug?
The low-volt shutdown (in my scenario set to 10v) seems to work fine if the volt is higher than about 5v, but does not trigger if it's lower. Could this be reported as a bug somewhere?
On page 9 in the user manual, you can find useful information in chapter 4.1 (How Witty Pi 5 Powers Raspberry Pi). It is recommended to read it first, if you have not done so yet.
However, when configuring VUSB as the primary power in wp5 and then disconnecting VUSB, the Raspberry Pi reboots. After booting everything works fine with VIN, but reconnecting and disconnecting VUSB makes the device reboot again.
The logic of handling power source switching is in the power_source_polling() function in firmware:
https://github.com/uugear/Witty-Pi-5-Firmware/blob/main/src/power.c#L386-L476
It doesn't define a reboot action, but it could behave like a reboot by combining a shutdown (for voltage low) and a startup (for power recovery). The actual behavior depends on your power sources and the configuration. By reading the source code you may find out why it behave like that.
The low-volt shutdown (in my scenario set to 10v) seems to work fine if the volt is higher than about 5v, but does not trigger if it's lower. Could this be reported as a bug somewhere?
The MCU can work as long as the votage is higher than 3.3V. However Witty Pi 5 doesn't come with a boost DC/DC converter (it has a buck/step-down DC/DC instead), if the input voltage is lower than 5V, there is no way you can still power your Pi with 5V. In order to let Raspberry Pi boot up properly, Witty Pi 5's power source should not be lower than 5V.
Witty Pi 4 L3V7 has boost DC/DC converter on board, that's why it can work with input voltage lower than 5V.
The logic of handling power source switching is in the power_source_polling() function in firmware:
https://github.com/uugear/Witty-Pi-5-Firmware/blob/main/src/power.c#L386-L476
It doesn't define a reboot action, but it could behave like a reboot by combining a shutdown (for voltage low) and a startup (for power recovery). The actual behavior depends on your power sources and the configuration. By reading the source code you may find out why it behave like that.
Hi, the power-sources used here are a bench powersupply (Set at 13v 2a) and a 5v 2a USB supply. It seems like the WittyPi fails to fail over the power from VUSB to VIN in time after the disconnect, and the power-drop is what reboots the device. Reading page 9 indicates to me that the WittyPi should handle failover for both VUSB and VIN, but in my case only failover from VIN->VUSB works.
For now I've worked around this by using VIN as primary power and VUSB as backup instead, as this failover works. (however I would have preferred the opposite)
The MCU can work as long as the votage is higher than 3.3V. However Witty Pi 5 doesn't come with a boost DC/DC converter (it has a buck/step-down DC/DC instead), if the input voltage is lower than 5V, there is no way you can still power your Pi with 5V. In order to let Raspberry Pi boot up properly, Witty Pi 5's power source should not be lower than 5V.Witty Pi 4 L3V7 has boost DC/DC converter on board, that's why it can work with input voltage lower than 5V.
Yes, that is clear. The goal for me here is that the device should shut down when VIN is less than 5v, even if powered by VUSB. This is because VIN for me will now be the primary powersource, and VUSB is available only then as a powerbuffer for shutting down. (Ideally I would prefer it to be opposite, but that is blocked by the issue mentioned above)
However, I've worked around this for now by having a script checking I2C 11 (Powermode) and calling I2C 71 (Shutdown request) with argument 1 if the powermode is USB and not VIN.
It seems like the WittyPi fails to fail over the power from VUSB to VIN in time after the disconnect, and the power-drop is what reboots the device.
I think I understand why this would happen, although we did not see this behavior in our lab.
The DC/DC is disabled by default if VUSB has priority:
https://github.com/uugear/Witty-Pi-5-Firmware/blob/main/src/power.c#L154
And it will be enabled when VUSB is too low while VIN is high enough:
https://github.com/uugear/Witty-Pi-5-Firmware/blob/main/src/power.c#L188
In our lab, this works fine. However I can imagine this may not work all the time: the DC/DC takes time to startup and the voltage may drop before it gets stable.
In your use case, the DC/DC should be set to always-on. There is a similar configuration option in our Zero2Go Omini product. I think we need to add it to Witty Pi 5 HAT+'s firmware too.
