UPS3 issue with android

Moderators: odroid, mdrjr

UPS3 issue with android

Unread postby monizks » Thu Jan 25, 2018 2:22 am

Hi I'm having some issues with the ups3 and ordroid c2. I've followed the wiki to activate the ups3.sh on boot of android, when I remove the AC power it drains the battery down to 3.7V as expected and initiates the poweroff. But after poweroff the C2 reboots again and again for about and hour. totaling probably 60 + reboots before the the battery is completely dead and it stops rebooting.

I have tried setting the POWER_LATCH to 0 before the poweroff command. and it doesn't help

I'm also getting inconstant results when manually setting the power latch to 0 VIA the CLI. yesterday it was removing power from the board when I echo 0 to gpio225/value and today it is keeping the board powered.

Am I missing something on how the ups3 should operate?

How do I stop the multiple reboots?

The operation I'm looking for is when AC power is removed the C2 will run for a bit of time then safely shut it's self down until AC power is returned. I believe this is how the ups3 should work?

UPDATE1: the android version I'm using is "selfinstall-odroidc2-eng-s905_6.0.1_master-87-v3.6.img"


Thank you

Kevin
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby monizks » Thu Jan 25, 2018 6:17 am

Update2: I seem to be having the same issue as discussed in this post: viewtopic.php?t=22489. but there was no resolution.

I need to scope the GPIO pins but in looks like something in Uboot is setting the POWER_LATCH pin high so the momentary spike in voltage once the load from usb and other devices is removed after the poweroff causes the BATT_OK pin to jump high then the ups3 outputs 5 volts and the C2 to start booting.. Then whatever in uboot at a certain point Sets the power_latch high and it keeps booting.

Correct me if I'm wrong. But I don't think accepting a board rebooting until the battery is dead as standard operating parameters makes any sense. what will that do to the file system and sd card??? the whole point of the ups3 and ups3.sh script is to keep the file system clean.

Even in the case that you remove the AC power and then issue the power off right away, it will eventually get in to this constant rebooting situation. If you wait for a long time eventually the battery will drop low enough and the BATT_OK will go low, but as soon as the C2 load is removed BATT_OK shoots high for a second and you in the reboot loop again. But I will say for less reboots this time because the battery was more depleted and the load was less in this case.


If anyone can help it would be much appriciated.


Thank you

Kevin
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby Luke.go » Thu Jan 25, 2018 2:25 pm

Hi there.

To avoid reboot, you should modify the ups.sh files.
To edit the ups3.sh, please follows the cmds.
Code: Select all
$ su
$ mount -o remount,rw /system
$ vi /system/bin/ups3.sh


then, please update ups3.sh files from the attached files.

Please let me know result.:)
Attachments
ups3.sh
(1.47 KiB) Downloaded 56 times
Luke.go
 
Posts: 221
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english

Re: UPS3 issue with android

Unread postby monizks » Thu Jan 25, 2018 11:06 pm

Hi Luke.go

thank you for your time but I'm sorry to say it made no difference. I had thought along the same lines of delaying the poweroff, but regardless of the amount of delay I still have the problem of the BAT_OK jumping high after the C2 shuts down and Uboot setting the AC_LACTCH to high during the boot process and then the boot continues.

I can't understand what hardkernel was expecting with this ups3. It seems that there is no practical way of it working.

Let me know your thoughts?

Thank you

Kevin
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby monizks » Sun Jan 28, 2018 7:41 am

Can anyone help with this? has anyone got the ups3 to work?

Much appreciated.

Kevin
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby odroid » Sun Jan 28, 2018 11:31 am

We will check the functionality of the UPS3 script early next week.
User avatar
odroid
Site Admin
 
Posts: 27970
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: UPS3 issue with android

Unread postby monizks » Mon Jan 29, 2018 2:32 am

Thank you for looking into it. here is my exact configuration because I believe the problem is much more evident when drawing a lot of power from the C2..

C2 + UPS3 + RTC Shield

Devices Connected to Main USB PORTS:
-Hardkernel USB GPS Module
-Vu5
-Bluetooth Module 2
-Wifi Module 3

Device Connected to OTG USB Port:
-USB-CAM 720P

With All of these devices connected there is a large power draw both when the UPS3 is on AC and on BATT. The problem recreation steps are as such.

1. The C2 is plugged in to AC power for enough time to fully charge the UPS3 Battery.
2. AC power is removed and AC_OK goes LOW. C2 runs on UPS3 Battery fine.
3. After about 5 mins the the Battery the voltage drops below 3.7 and BAT_OK goes LOW.
4. at this point the script initiates the poweroff. (NOTE: I have tried setting the POWER_LATCH to 0 here and in both states the result is the same.)
5. on the poweroff completes the C2 red light flashes very quickly off then back on and the boot of the C2 begins.
6. this boot continues until the ups3.sh script is started by init. and because the battery is below 3.7V the poweroff run.
7. on the poweroff completes the C2 red light flashes very quickly off then back on and the boot of the C2 begins.

Basically you get stuck in a loop between step 5 and 6. for around 55+ reboots.

Then after about 55 reboots the battery is so low that the C2 enters a state where the red light flashes on and off very quickly for about 30 seconds, with each flash starting Uboot and then lossing power and starting uboot again. Some of the time uboot gets far enough to set the POWER_LATCH HIGH and this will force the C2 to boot to a point where the power runs out and the rapid flashing of the red light start again.

This total process from first reboot until the devices is completely dead takes about an hour.


I apologize for the verbosity but I hope this helps. I really do believe this has something to do with the amount of power load on the C2 during the fully booted stat drawing hard on the battery causing the BAT_OK signle to fall low. When the poweroff occurs the load is momentarily removed causing the BAT_OK to go HIGH and starting the boot to the point where the POWER_LATCH gets set high by uboot and forcing the boot to continue until ups3.sh shuts it down again if there was enough power to get the boot that far.

hope this helps.

Thank you in advance
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby odroid » Mon Jan 29, 2018 1:25 pm

When the BAT_OK is low and the system turns off, the battery level goes high again because the load is quite light. It is a characteristic of the Li+ rechargeable battery.
The cell voltage will rise somewhat every time the discharge is stopped. This is due to the diffusion of the acid from the main body of electrolyte into the plates, resulting in an increased concentration in the plates.
If the discharge has been continuous, especially if at a high rate, this rise in voltage will bring the cell up to its normal voltage very quickly on account of the more rapid diffusion of acid which will then take place.

So we had to wait around 10~20 minutes before making the system off.
We will do further tests for updating the script and WiKi page.
User avatar
odroid
Site Admin
 
Posts: 27970
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: UPS3 issue with android

Unread postby monizks » Tue Jan 30, 2018 12:55 am

thank you. But what do you do in this 10 to 20 mins? Allow the C2 to just keep rebooting? or put a delay in the script to wait 10 to 20 mins before issuing the poweroff??

in both cases it doesn't seem good for the board?
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4

Re: UPS3 issue with android

Unread postby Luke.go » Tue Jan 30, 2018 9:55 am

please apply this script. :)
Attachments
ups3.sh
(1.5 KiB) Downloaded 52 times
Luke.go
 
Posts: 221
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english

Re: UPS3 issue with android

Unread postby monizks » Wed Jan 31, 2018 7:11 am

Hi Luke.go

Same result with the new one.. just 45+ reboots instead of 60+.

I think I may need to find a different ups for my application.
monizks
 
Posts: 12
Joined: Fri Dec 29, 2017 11:36 pm
languages_spoken: english
ODROIDs: C2, XU4


Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 2 guests