Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Witty Pi 4 L3V7 Flash Memory Reset

9 Posts
2 Users
0 Likes
585 Views
(@andrew-simpson17)
Posts: 106
Estimable Member Customer
Topic starter
 

Hi

I have purchased 50 units of this product. I am using it as a UPS. I am using a lipo 110mHa battery and a USB Power Bank connect to this HAT.

I have configured as following:

7. Set low volatge threshold [4.2v]
8. Auto-On when USB 5V is connected [Yes]

Everything else is set at the default settings.

Every now and then when the USB Power Bank fully discharges and I connect another fully charged one the HAT does not start the Raspberry Pi.

I assume the settings I make are written to the flash memory?

To get it to start up I have to press the latching button. Then when I check my settings I can see that

7. has been reset to default and
8. has been reset to default.

I use your HAT inside a case that powers a Raspberry Pi Zero 2 and its camera. It will not be user friendly for my customers to have to keep on pressing the power button. The product needs to come on whenever a charged UBS Power Bank is connected.

I was hoping to release my camera product this month and this 'flaw' is stopping me doing so.

Can you advise please?

Kind Regards

Andrew D Simpson

 
Posted : 02/01/2024 4:34 pm
(@admin)
Posts: 512
Member Admin
 

It seems you are using external power bank as the main power source, while the lipo battery is just as a backup.

A more popular use case is to use lipo battery as main power source and use the type-c port to charge the batter (and power the device while charging).

Although it is less popular, your use case should also work. I have a feeling that 110 mAh bettery may be too small, and it may not deliver the current required to run the whole device. Have you tried using the battery only and see if it can power the Pi up?

Those settings are saved in EEPROM in ATtiny841 and it should be kept even after losing power. Although option 8 is "yes" by default.

The device need to be powered (by the battery, with enough voltage to keep MCU running) when the external power bank is connected, otherwise it will not turn on the deivce.

 

 

 

 
Posted : 03/01/2024 2:49 pm
(@andrew-simpson17)
Posts: 106
Estimable Member Customer
Topic starter
 

@admin 

Hi thanks for replying. I need to use at least a minimum of 20,000mHa which is not easy to find  with LiPo. Also, the idea is to swap usb power banks in and out and charge the discharged one at home. I use it only as a UPS so as soon as the main battery is removed it shuts down. Thus no reliance on the LiPo to run my software.

But, I believe I am an idiot.  I copied the image onto the SD card. And although it had my 'Witty Settings' I had to reset them to be saved to the flash memory. So, i will create a script to set these settings (on start up) so I know for sure it is written to flash.

In [11] other settings, option [1].  I do not need to set this to [on] do I if [8] (main menu) is [yes]?

 

Thank you for your time.

 
Posted : 04/01/2024 7:29 pm
(@admin)
Posts: 512
Member Admin
 

@andrew-simpson17 The sub-option [1] (Default mode when powered) under [11] (Other settings) is to decide whether to turn on the Pi when the whole device is powered for the first time. If it is set to [On], when you connect a battery or a power bank to Witty Pi 4 L3V7, it will turn on your Pi.

[8] (Auto-On when USB 5V is connected) is different, it assumes your device has been powered by a battery, and it turns on your Pi when you connect a power bank to USB-C.

 
Posted : 05/01/2024 9:24 am
(@andrew-simpson17)
Posts: 106
Estimable Member Customer
Topic starter
 

@admin And if I am using it as just a UPS then I would only ever want it powered on by USB-C. Is that correct? Sorry, to play dumb... I like to make sure. This is how i understand it.

 
Posted : 05/01/2024 9:58 am
(@admin)
Posts: 512
Member Admin
 

@andrew-simpson17 I think yes, the battery only keeps the MCU powered, and you turn On your Pi by connecting a power bank to USB-C.

 
Posted : 05/01/2024 10:07 am
(@andrew-simpson17)
Posts: 106
Estimable Member Customer
Topic starter
 

@admin Thanks.

 

 
Posted : 05/01/2024 11:05 am
(@andrew-simpson17)
Posts: 106
Estimable Member Customer
Topic starter
 

Hi, A follow on issue which I have just discovered.

My app serves a local website.  The user can press a button on a web page to shutdown the Rpi. But, if I then disconnect the usb power bank and reconnect the UPS does not start the Rpi. I have to press the button on your power board for it to startup. Do you know why I have this behaviour and is there a work around I can use?

 
Posted : 08/01/2024 2:29 pm
(@admin)
Posts: 512
Member Admin
 

@andrew-simpson17 I would suggest to test the use case without involving the web application yet. We have tested this many times: as long as the battery is still powering the MCU, and the Pi is in shutdown mode (power cut/red light off), plugging in 5V at USB-C will turn Pi on.

 
Posted : 08/01/2024 4:49 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.