Samsung Moment Forum
  
Welcome, Guest. Please login or register.

News: Do you like Samsung Moment?
Advanced search
Scratch-Proof your Samsung Moment        Best Price on Sprint Phones      Screen Protection Latest Ringtone for your mobile
Pages: 1 2 [3] 4 5 ... 7
Print
Topic: Working on the battery issue... I think - New battery code based on BEHOLD II  (Read 6560 times)
numus
Pro Member
****

Cookies: 3
Posts: 279


View Profile Email
« Reply #30 on: December 30, 2009, 05:46:01 PM »

So, here's what I'm going to do as long as I get the master of electricity (numus) to tell me it looks ok.  These values should spit out an exponential curve and give us more accuracy toward the bottom of the spectrum.

   100% = 4.04V
   90% = 3.97V - 4.04V
   80% = 3.90V - 3.97V
   70% = 3.85V - 3.90V
   60% = 3.79V - 3.85V
   50% = 3.74V - 3.79V
   40% = 3.70V - 3.74V
   30% = 3.66V - 3.70V
   20% = 3.63V - 3.66V
   10% = 3.58V - 3.63V
   5% = 3.49V - 3.58V
   1% = 3.40V - 3.49V


Numus, I noticed additional s3c_get_bat_level methods below the one I changed.  Lines 572 - 679 have another method.  Is that one not to muck with?  I would believe this needs it as well?


Lol not even close to a master of electricity.. just spent a lot of time studying batteries Sad

Those numbers should be right.. i really hope nothing else depends on bat_lev but can't debug the whole entire OS right? None of this is going to be an exact level.. but it is better then what they gave us in the first place (a little close to accurate to).. You able to add those levels into the header file? That was the only thing that held me back from doing levels between 50 and 15

Those lines look like the recharge stuff.. i wouldn't mess with them...
Edit: Tbone you might have to get a 15% in there.. not sure how that works with the low power notification and dimming and everything
« Last Edit: December 30, 2009, 05:56:51 PM by numus » Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #31 on: December 30, 2009, 05:51:00 PM »

the whole os is in debug mode sadly
Logged
numus
Pro Member
****

Cookies: 3
Posts: 279


View Profile Email
« Reply #32 on: December 30, 2009, 06:02:29 PM »

Anyone else find it sad we got the majority of this diagnosed and done within 1 day.. and it has been 2 months and sprint/samsung have still not even acknowledged it?
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #33 on: December 30, 2009, 06:06:59 PM »

Anyone else find it sad we got the majority of this diagnosed and done within 1 day.. and it has been 2 months and sprint/samsung have still not even acknowledged it?

add to that how much we've all done in the past week.

s*** that we coulda done in a day if we had the source code.
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #34 on: December 30, 2009, 06:40:02 PM »

WTF IS THAT?!?
I can't even begin to attempt to figure out what they are trying to calculate.. consider they have ((())/100)*100 which is redundant cause they cancel each other out
That's how you round down to the nearest 100. Wink
« Last Edit: December 30, 2009, 06:45:47 PM by peepsalot » Logged
TBone
Jr. Member
**

Cookies: 2
Posts: 74


View Profile Email
« Reply #35 on: December 30, 2009, 06:49:05 PM »

Noticed a logic bug in my previous posting...anyone with that flashed may notice the battery meter jump around a bit.  Sorry.  Sad

The attached file should result in the following measures: (I didn't need to modify the header)

100%   4.04V      46      FULL
90%   3.97V - 4.04V            
80%   3.90V - 3.97V      34      ALMOST_FULL
70%   3.85V - 3.90V            
60%   3.79V - 3.85V      24      HIGH
50%   3.74V - 3.79V      20      MED
40%   3.71V - 3.74V            
30%   3.68V - 3.71V      15      LOW
20%   3.65V - 3.68V            
15%   3.63V - 3.65V            
10%   3.58V - 3.63V      10      CRITICAL
5%   3.49V - 3.58V      -2      MINIMUM
1%   3.40V - 3.49V            
0%   3.40V      -8      OFF

* s3c6410_battery.c (60.31 KB - downloaded 19 times.)
Logged
mrjones98
Newbie
*

Cookies: 0
Posts: 7


View Profile
« Reply #36 on: December 30, 2009, 07:34:19 PM »

I haven't begun to look through the code as others have but does anyone find it surprising that they are looking at voltage to determine remaining capacity?  The only batteries that I have worked with are in medical devices and I thought all modern electronics use some form of coulomb counting to determine remaining capacity (http://en.wikipedia.org/wiki/Smart_Battery_System).  We were using COTS laptop batteries as an external power source (which supported the SMBus-based system) and it's just odd that as advanced as cell phones are, we're still looking at voltage curves. 

Interesting nonetheless...
Logged
numus
Pro Member
****

Cookies: 3
Posts: 279


View Profile Email
« Reply #37 on: December 30, 2009, 07:36:29 PM »

I haven't begun to look through the code as others have but does anyone find it surprising that they are looking at voltage to determine remaining capacity?  The only batteries that I have worked with are in medical devices and I thought all modern electronics use some form of coulomb counting to determine remaining capacity (http://en.wikipedia.org/wiki/Smart_Battery_System).  We were using COTS laptop batteries as an external power source (which supported the SMBus-based system) and it's just odd that as advanced as cell phones are, we're still looking at voltage curves.  

Interesting nonetheless...


Voltage is the only true way to measure a battery.. you CAN NOT measure current (amps).. Notice on that wiki article they say "estimate".. the moment does have that feature through the battery calibration.. but for the purpose of these meters it is using direct voltage reading..  
Basically it comes down to.. inorder to measure current, the meter has to be installed in series.. which then requires a 0 resistance inorder to be accurate.. 0 resistance is almost impossible.. voltage on the other hand is wired in parallel, thus has to have a resistance close to infinite.. this is simple to accomplish..
Noticed a logic bug in my previous posting...anyone with that flashed may notice the battery meter jump around a bit.  Sorry.  Sad

The attached file should result in the following measures: (I didn't need to modify the header)


For the sake of learning (so i can learn how to get around the header issue) how did you get the new groups to work without header values?
Edit: Nevermind.. i see how you did it

TBone:
Using microsoft wordpad so can't give line number but check
      
Code:
if (bat_vol > (batt_medium + temp))
/* bat_level = 40; */
/*
bat_level = 60;
else
bat_level = 50;

/* bat_level = 30; */

bat_level = 50;
Looks like you have bat_level = 50; in there twice.. one of those should be removed correct?
« Last Edit: December 30, 2009, 08:09:13 PM by numus » Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #38 on: December 30, 2009, 08:10:55 PM »

Noticed a logic bug in my previous posting...anyone with that flashed may notice the battery meter jump around a bit.  Sorry.  Sad

The attached file should result in the following measures: (I didn't need to modify the header)

100%   4.04V      46      FULL
90%   3.97V - 4.04V            
80%   3.90V - 3.97V      34      ALMOST_FULL
70%   3.85V - 3.90V            
60%   3.79V - 3.85V      24      HIGH
50%   3.74V - 3.79V      20      MED
40%   3.71V - 3.74V            
30%   3.68V - 3.71V      15      LOW
20%   3.65V - 3.68V            
15%   3.63V - 3.65V            
10%   3.58V - 3.63V      10      CRITICAL
5%   3.49V - 3.58V      -2      MINIMUM
1%   3.40V - 3.49V            
0%   3.40V      -8      OFF


This revision is in the released ZE05 so all can test.

Looking forward to the linear version with 1-100 for ZE06 Smiley
Logged
numus
Pro Member
****

Cookies: 3
Posts: 279


View Profile Email
« Reply #39 on: December 30, 2009, 08:24:40 PM »

Gotta love samsung

From Twitter:
Me:
@samsungmobileus Why is the moment coded to report 15% bat_lev when the battery reads 3.74V when the bat itself is nominal at 3.7?

Samsung:
@numus We are looking into your question and will be in touch. Thank you!

TBONE: I am going cave diving tomorrow so not going to be near my computer until late friday earliest.. But i had an idea for 2 digit reads.. It would be simplier if we take the current bottom reporting levels...
take 4.04V for 100% and 3.97 for 90% and 3.90 for 80% and so on..
Then create an equation for EACH integer of 10.. then we can do a linear ratio expression like you suggested earlier.. Will be more accurate since we are only taking the derivative of much smaller curves vs me trying to make a general equation for the whole curve... Think that might work?
Gotta love samsung

From Twitter:
Me:
@samsungmobileus Why is the moment coded to report 15% bat_lev when the battery reads 3.74V when the bat itself is nominal at 3.7?

Samsung:
@numus We are looking into your question and will be in touch. Thank you!


thats bs they ignore me Tongue
LIES!!!
@zefie It seems to be working in Firefox, which we are using. Feel free to direct message us with the issue and your contact info.
« Last Edit: December 30, 2009, 08:34:01 PM by numus » Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #40 on: December 30, 2009, 08:31:40 PM »

Gotta love samsung

From Twitter:
Me:
@samsungmobileus Why is the moment coded to report 15% bat_lev when the battery reads 3.74V when the bat itself is nominal at 3.7?

Samsung:
@numus We are looking into your question and will be in touch. Thank you!

thats bs they ignore me Tongue
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #41 on: December 30, 2009, 08:36:58 PM »

@zefie It seems to be working in Firefox, which we are using. Feel free to direct message us with the issue and your contact info.

Yeah and that took them like 4 days. lol
Logged
Flipper
Newbie
*

Cookies: 0
Posts: 24


View Profile
« Reply #42 on: December 30, 2009, 11:22:32 PM »

First off, thanks a bunch guys for all of your efforts. Being the tinkering type, I wish I had more time to allocate to REALLY learn this stuff rather than just copying the steps like a monkey.....

But in any event, I know I've seen this question posed here and in other forums. Any chance that anyone out there can figure out how to incorporate a ROAM ONLY option? I know Sprint's older phones used to have that option but it seems like it's not available with any of their latest phones... and living in an area with fringe Sprint coverage, I know people would like the option to jump on the big red's network....

Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile Email
« Reply #43 on: December 30, 2009, 11:25:38 PM »

First off, thanks a bunch guys for all of your efforts. Being the tinkering type, I wish I had more time to allocate to REALLY learn this stuff rather than just copying the steps like a monkey.....

But in any event, I know I've seen this question posed here and in other forums. Any chance that anyone out there can figure out how to incorporate a ROAM ONLY option? I know Sprint's older phones used to have that option but it seems like it's not available with any of their latest phones... and living in an area with fringe Sprint coverage, I know people would like the option to jump on the big red's network....



Sadly this would involve messing with modem.bin, this won't happen for two reasons

1) We don't have any source code, at all, and wouldn't know where to start. Thats mostly Qualcomm stuff.
2) We don't really want to mess with the Cell side of things.
Logged
TBone
Jr. Member
**

Cookies: 2
Posts: 74


View Profile Email
« Reply #44 on: December 31, 2009, 12:21:22 AM »

TBone:
Using microsoft wordpad so can't give line number but check
      
Code:
if (bat_vol > (batt_medium + temp))
/* bat_level = 40; */
/*
bat_level = 60;
else
bat_level = 50;

/* bat_level = 30; */

bat_level = 50;
Looks like you have bat_level = 50; in there twice.. one of those should be removed correct?
[/quote]

You're correct.  Too much copying and pasting I guess, while trying to Alt-Tab to a different window when coworkers walk up to my desk.  :-0

I'll fix that and re-release tomorrow.

I'll do my best to understand what you're talking abut w/ regards to linear transformation, however I believe I understand what you're talking about.  It does seem simple to just go 80% = x - x instead of dividing by 2, etc.

We'll see if anyone reports anything weird with this latest build, however I can tell you spare parts reports 70% battery and the battery indicator appears > 70%.  It's hard to tell 7 slices out of 10 on that tiny thing though.

Logged
Pages: 1 2 [3] 4 5 ... 7
Print
Jump to:  

Samsung Moment SPH-M900 (Full Body)






Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC