Notifications
Clear all

Pi turns off

21 Posts
5 Users
0 Reactions
2,418 Views
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi.  My new RPi4 2GB runs fine 24/7 for the last week.  I just finished and mounted my UPS PIco HV4.0B/C Advanced with both SCAP and battery.  Pico software not yet installed.  Turn on the Pi and after 2 to 4 minutes the Pi shuts down without warning (5 times in a row).  Remove the Pico and the Pi runs as normal.  Reinstalled the PIco and just the SCAP, no battery, but again PI shuts down after a few minutes.  Any ideas please?


   
Quote
Topic Tags
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

Hi,

If have not installed the PIco software, then if after a time of 5 minutes (you can program shorter or longer time) PIco is not see any activity on the I2C assume that Raspberry Pi is shut down by user, so entering the whole system to LPR (Low PoweRing)mode. During that mode the Raspberry Pi PE pin is low in order to decrease power consumption. 

The solution is to install Daemon, this Daemon via I2C regular reads inform the PIco that Raspberry Pi is running and avoid LPR mode.

You definitely need to have installed Daemons.

Please keep us informed

BR Pi Master

 


   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi. Thanks for your reply.  I installed the software and the Pi no longer shuts down! 

Some other beginner questions.

1) Can I check the firmware version supplied with the PIco or should I just update it to the latest version?

2) My PICo is fitted with both the battery and capacitor I got with the PiCo.  The RPi and Pico are powered from the standard RPi transformer only. Do any of the factory settings need to be modified for this setup or are they ok as supplied? 

3) My Pi saves data 24/7 from a weather station and I need the UPS for safe shutdown and to minimise loss of data.  The mains power supply where I live often goes off for up to an hour. The PiCo user manual says that after 60 seconds on battery power, the PiCo performs a safe shutdown.  Is it possible to increase the 60 seconds based on battery voltage? (the Pi should easily run for an hour with the battery only)

 


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

Hi @ajl,

Posted by: @ajl

1) Can I check the firmware version supplied with the PIco or should I just update it to the latest version?

Run our latest status script, s you will see all parameters including PCB version, Firmware Version as also Bootloader Version. You can download it from here:

https://pimodules.com/download/61/public/3616/pico_status1-2_hv4-0.zip

 

Posted by: @ajl

2) My PICo is fitted with both the battery and capacitor I got with the PiCo.  The RPi and Pico are powered from the standard RPi transformer only. Do any of the factory settings need to be modified for this setup or are they ok as supplied? 

1. It depends what model do you have. If you like to use both Super Capacitor and Battery at the same time you need

Each model can be Assembled as Model B/BC and D. The assembly defined the handling of the Supercapacitor. Therefore, assemblies are defined as: 

  • Assembly B that supports Both Power Sources (Supercapacitor and Battery), but only one back up power source can be used at once
  • Assembly BC that supports Both Power Sources (Supercapacitor and Battery), and both can be used at the same time
  • Assembly D that supports only Battery as power Back-up, and does not support Supercapacitor at all

So, you need to check what model do you have. We released until now 2 models to the market:

B and BC, D has been not released yet

If you have model B, you cannot use both power back up source at the same time, only one can be used at the time. 

Regarding your question, depending to the model you have need to setup backup power source

to Super Capacitor, or Battery, or Super Capacitor and Battery by setting the proper letter (code) in battery type.

Posted by: @ajl

3) My Pi saves data 24/7 from a weather station and I need the UPS for safe shutdown and to minimise loss of data.  The mains power supply where I live often goes off for up to an hour. The PiCo user manual says that after 60 seconds on battery power, the PiCo performs a safe shutdown.  Is it possible to increase the 60 seconds based on battery voltage? (the Pi should easily run for an hour with the battery only)

I assume that your system is working outside or speaking clearer in a non-regulated temperature condition. Therefore, independent of what model you have (B or BC), you need to use only the Super Capacitor as power Backup sources, as this is the most resistive energy source for hard temperatures environment. 

So, solder the Super Capacitor, do not use the battery at all, and set the power source to Super Capacitor with below command:

sudo i2cset -y -1 0x6b 0x07 0x43

and that is it, just take it and use it. Remember that Super Capacitor of 100F is not for a long time, but enough to safety shutdown your system. Also, with Super Capacitor the embedded RTC is not working.

If you like to have system working for a longer time, note that next 2 weeks we release a special new type of super capacitors with similar environmental conditions, but with much higher capacity, of 3000F and 4000F. Price will be low. We have them here, but we are testing them extensively before releasing them for sales.

Please do not hesitate to ask whatever you need again

BR Pi Master


   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi.  Many thanks for the clear information.

I tried the firmware update but got the following.  Can you please let me know what is wrong here?  Thanks 

ajandco@raspberrypi:~/pi/Bootloader $ sudo python UPS_PIco_HV4_BL.py -l -f ups_pico4_main_Firmware_0133_12062022.hex

2022-09-17 14:28:55,971 [WARNING] PICO PCB version: 0x41 PICO model: BC Advanced

2022-09-17 14:28:55,971 [WARNING] RPi model: Raspberry Pi 4 Model B Rev 1.5

2022-09-17 14:28:55,972 [WARNING] MD5 of the firmware file: 74ffe9faeb89ccecd375ff1eaec63a96

2022-09-17 14:28:56,094 [WARNING] Firmware file verification OK

2022-09-17 14:28:56,096 [WARNING] Current firmware release: 0x115

2022-09-17 14:28:56,839 [ERROR] Failed to recieve data ACK from UPIS

Traceback (most recent call last):

  File "/home/ajandco/pi/Bootloader/UPS_PIco_HV4_BL.py", line 352, in wait_ack

    for line in self.pico_serial:

  File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 577, in read

    raise SerialException(

serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

2022-09-17 14:28:56,965 [ERROR] Failed to send data to PICO UPS

Traceback (most recent call last):

  File "/home/ajandco/pi/Bootloader/UPS_PIco_HV4_BL.py", line 338, in send_line

    self.pico_serial.write(line.encode())

AttributeError: 'bytes' object has no attribute 'encode'

2022-09-17 14:29:28,268 [ERROR] Failed to establish serial communication with PICO UPS

ajandco@raspberrypi:~/pi/Bootloader $


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

Hi,

The most possible reason is that you have not activated serial port in the Raspberry Pi for User Applications.

To do that please use raspi-config.

As you seen

Posted by: @ajl

2022-09-17 14:28:55,971 [WARNING] PICO PCB version: 0x41 PICO model: BC Advanced

Your model can handle both Power Backup sources at the same time, or one of them

Please keep me informed

BR Pi Master

 
This post was modified 2 years ago 2 times by PiAdmin

   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 
Posted by: @ajl

File "/home/ajandco/pi/Bootloader/UPS_PIco_HV4_BL.py", line 338, in send_line

Please use newer version of Bootloader, it just much better, attached also here

BR Pi Master

This post was modified 2 years ago by PiAdmin

   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi

I enabled serial port:

The serial login shell is enabled │
│ The serial interface is enabled

and used the new bootloader but got an error:

ajandco@raspberrypi:~/pi/Bootloader $ sudo python UPS_PIco_HV4_BL03A.py -l -f ups_pico4_main_Firmware_0133_12062022.hex
2022-09-19 11:12:57,027 [WARNING] PICO PCB version: 0x41 PICO model: BC Advanced
2022-09-19 11:12:57,028 [WARNING] RPi model: Raspberry Pi 4 Model B Rev 1.5
2022-09-19 11:12:57,031 [WARNING] MD5 of the firmware file: 74ffe9faeb89ccecd375ff1eaec63a96
2022-09-19 11:12:57,151 [WARNING] Firmware file verification OK
2022-09-19 11:12:57,154 [WARNING] Current firmware release: 0x115
2022-09-19 11:12:57,897 [ERROR] Failed to recieve data ACK from UPIS
Traceback (most recent call last):
File "/home/ajandco/pi/Bootloader/UPS_PIco_HV4_BL03A.py", line 586, in wait_ack
for line in self.pico_serial:
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 577, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2022-09-19 11:12:58,019 [ERROR] Failed to send data to PICO UPS
Traceback (most recent call last):
File "/home/ajandco/pi/Bootloader/UPS_PIco_HV4_BL03A.py", line 572, in send_line
self.pico_serial.write(line.encode())
AttributeError: 'bytes' object has no attribute 'encode'
2022-09-19 11:13:29,335 [ERROR] Failed to establish serial communication with PICO UPS
ajandco@raspberrypi:~/pi/Bootloader $

 

I rebooted the Pi and tried again .  This time I got:

ajandco@raspberrypi:~/pi/Bootloader $ sudo python UPS_PIco_HV4_BL03A.py -l -f ups_pico4_main_Firmware_0133_12062022.hex
2022-09-19 11:34:33,442 [WARNING] PICO PCB version: None PICO model: UNKNOWN(None)
2022-09-19 11:34:33,443 [WARNING] RPi model: Raspberry Pi 4 Model B Rev 1.5
2022-09-19 11:34:33,448 [WARNING] MD5 of the firmware file: 74ffe9faeb89ccecd375ff1eaec63a96
2022-09-19 11:34:33,637 [WARNING] Firmware file verification OK
2022-09-19 11:34:39,657 [ERROR] Failed to read current FW version from UPIS via I2C. Is UPIS in running mode?
NoneType: None

Now the green U2 and orange TMP LEDs remain lit and will not go out even when the Pi is shutdown.

What should I do next?


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

@ajl 

Hi,

Do you have any hardware attached on top. that are using Serial port GPIO14/15 ?

BR PiM


   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Nothing else attached, just the Pico UPS.


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

Hi,

Let me think little bit. I will solve it today by the evening

BR PiM


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 

@xani thank you !!!


   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi.  Thanks for the suggestion.  I changed the serial options and got:

The serial login shell is disabled │ The serial interface is enabled

Unfortunately I still get the same error:

ajandco@raspberrypi:~/pi/Bootloader $ sudo python UPS_PIco_HV4_BL03A.py -l -f ups_pico4_main_Firmware_0133_12062022.hex
2022-09-20 07:42:29,499 [WARNING] PICO PCB version: None PICO model: UNKNOWN(None)
2022-09-20 07:42:29,499 [WARNING] RPi model: Raspberry Pi 4 Model B Rev 1.5
2022-09-20 07:42:29,502 [WARNING] MD5 of the firmware file: 74ffe9faeb89ccecd375ff1eaec63a96
2022-09-20 07:42:29,690 [WARNING] Firmware file verification OK
2022-09-20 07:42:35,711 [ERROR] Failed to read current FW version from UPIS via I2C. Is UPIS in running mode?
NoneType: None
ajandco@raspberrypi:~/pi/Bootloader $


   
ReplyQuote
(@piadmin)
Member Admin
Joined: 5 years ago
Posts: 68
 
Posted by: @ajl

Failed to read current FW version from UPIS via I2C. Is UPIS in running mode?

Hi,

This information seems yours I2C interface is not working.

Two reasons are possible:

1. Your last time (yesterday or former) firmware upload was not successfully, and system stay still in the boot loading mode, so I2C is not working. Logically cannot as we have watchdog implemented for such cases.

2. You have not activated I2C on the Raspberry Pi. Logically you should have it activated, as before system was working so interaction via I2C was proper.

I think that your case is the (1).

Therefore, please follow below steps:

https://pimodules.com/community/ups-pico-hv4-0b/ups-pico-hv4-0b-stack-can-no-longer-be-accessed-via-i2c

 

Note, the bootloader is in protected memory part and cannot be erased, so you ALWAYES will be able to upload newer firmware.

Keep us informed BR PiM


   
ReplyQuote
 AJL
(@ajl)
Active Member
Joined: 3 years ago
Posts: 12
Topic starter  

Hi. Nice! -thanks for that, it worked great, see paste below. Not clear why I2C doesn't seem to be working, it's a new Pi.

Last question.  I want to use the battery for powering the Pi for as long as possible when the mains power fails (the Pi is indoors in a heated room).  How can I program the UPS to shut down the Pi when the battery level falls to a certain value and then restarts when  the power returns?
 
thanks
 
***********************************
        UPS PIco HV4.0 Status         
 Version 1.2   Relase Date 04.09.2022 
Compatible with Firmware 0x0140 and up
***********************************
 
  UPS PIco Firmware..........................: 0133
  UPS PIco Bootloader........................: 41
  UPS PIco PCB Version.......................: 41
  UPS PIco PCB Defaut Battery................: Battery LiPO+SC 'l' 0x6C
  UPS PIco Set Battery.......................: Battery LiPO 'L' 0x4C
 
  Raspberry Pi Core Temprature...............: 47 C
  Embedded Fan Temp. Threshold...............: 50 C
  Embedded Fan Speed.........................: OFF % of Total RPM
 
  Powering Mode..............................: Cable POWERED
  Power Backup Set Mode......................: Battery Backup
 
 

   
ReplyQuote
Page 1 / 2
Share: