You Are Here:

Community: Developer Discussion Boards

#1 Old Smile Ask for help about accelerometer and SysInfo - 2009-04-26, 09:17

Join Date: Jan 2009
Posts: 16
lspkl
Offline
Registered User
Hi, All,

How are you?

Currently I work on energy efficiency issues on N95. I have two doubts. Hopefully you guys can help me. Thanks!

1. I need to know the current remaining battery energy. I found a sysinfo function, battery(), which shows the energy level from 0 (empty) to 100 (full). Do you know how the total battery capacity is divided into these 101 levels? Is it divided uniformly?

2. Is the accelerometer sensing the position all the time? If it is, then I want the accelerometer to sense for while and then sleep for a while, then sense for a while and sleep for a while. I plan to control this by connect() and disconnect() functions. But how can I achieve this control? Is there some function like timer in Python?

Your help will be appreciated greatly!

Have a nice day!

Peter
Reply With Quote

#2 Old Re: Ask for help about accelerometer and SysInfo - 2009-04-26, 09:40

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Hi,

Quote:
Originally Posted by lspkl View Post
1. I need to know the current remaining battery energy. I found a sysinfo function, battery(), which shows the energy level from 0 (empty) to 100 (full). Do you know how the total battery capacity is divided into these 101 levels? Is it divided uniformly?
Even though it ranges from 0 to 100, the battery level is indicated at every 14.285 points (because the phone's battery indicator has 7 lines, and 100/7=14.285...). So it's not very uniform.

Quote:
Originally Posted by lspkl View Post
2. Is the accelerometer sensing the position all the time? If it is, then I want the accelerometer to sense for while and then sleep for a while, then sense for a while and sleep for a while. I plan to control this by connect() and disconnect() functions. But how can I achieve this control? Is there some function like timer in Python?
Yes, there is. Please read the e32 section of the PyS60 Library Reference and there you will find information about Ao_timer.
Reply With Quote

#3 Old Red face Re: Ask for help about accelerometer and SysInfo - 2009-04-27, 07:55

Join Date: Jan 2009
Posts: 16
lspkl
Offline
Registered User
Thanks a lot! Bogdan!

The capacity of BL-6F battery on N95 is 15984J (3.7V@1200mAh).I wonder whether the energy consumed on each level is 159.84J (15984/100), namely the energy of the batter is uniformly distributed on each level. So I tested the energy consumption on the first line of phone's battery indicator by Energy Profiler. It consumed
7912.08J energy, which is almost half of the total energy of the battery. And the level keeps 100 for almost all the first line life time. Then jump to 85 when there are only 6 lines remained. That means that first 15 levels consumed almost half of the total energy. It seems not to be uniformly distributed on 100 levels.

Actually I want to know how many energy is consumed for each level. Or if we know the currently cumulatively consumed energy, that will also help a lot.

Could Bogdan or someone else can tell me the relationship between energy consumption and levels? or the solution to get the currently cumulatively consumed energy?

Thanks a lot for all your consirations!

Peter
Reply With Quote

#4 Old Re: Ask for help about accelerometer and SysInfo - 2009-04-27, 15:06

Join Date: Nov 2008
Posts: 24
didacgil9
Offline
Registered User
I propose you to make some empirical studies on that.

I'm on the development of an application and I want to share the GPS position with other mobile phones. Well.. I have a thread that get the current position of the mobile phone every 5 seconds and send a request to http://localhost/database/insert_gps.php
That's just an intro to propose my idea.

I think you could make some modifications to your application, and save the values in a database in your mobile phone using PAMP. You will be able to study how long did the battery lived, and which vas the battery level in each moment.
Then just divide the time in sections and check which vas the value at each moment.

If you do this study several times, and with the conditions of just running your Python application and PAMP, you will get a study based criteria to determine if you have 50% of the battery according to the values, even you have all the bars printed on the screen.

I can provide you some code in PHP to solve some problems in the INSERTs, as it seems that MySQL crashes after a table file is bigger that some KBs.

Hope this idea helps

didacgil9@gmail.com

Quote:
Originally Posted by lspkl View Post

The capacity of BL-6F battery on N95 is 15984J (3.7V@1200mAh).I wonder whether the energy consumed on each level is 159.84J (15984/100), namely the energy of the batter is uniformly distributed on each level. So I tested the energy consumption on the first line of phone's battery indicator by Energy Profiler. It consumed
7912.08J energy, which is almost half of the total energy of the battery. And the level keeps 100 for almost all the first line life time. Then jump to 85 when there are only 6 lines remained. That means that first 15 levels consumed almost half of the total energy. It seems not to be uniformly distributed on 100 levels.

Actually I want to know how many energy is consumed for each level. Or if we know the currently cumulatively consumed energy, that will also help a lot.

Could Bogdan or someone else can tell me the relationship between energy consumption and levels? or the solution to get the currently cumulatively consumed energy?

Thanks a lot for all your consirations!

Peter
Reply With Quote

#5 Old Wink Re: Ask for help about accelerometer and SysInfo - 2009-04-28, 05:05

Join Date: Jan 2009
Posts: 16
lspkl
Offline
Registered User
Thanks, didacgil9.

Can you send me the corresponding code? By the way, the link you provided http://localhost/database/insert_gps.php seems not to work.

Thanks!

Have a nice day!

Peter


Quote:
Originally Posted by didacgil9 View Post
I propose you to make some empirical studies on that.

I'm on the development of an application and I want to share the GPS position with other mobile phones. Well.. I have a thread that get the current position of the mobile phone every 5 seconds and send a request to http://localhost/database/insert_gps.php
That's just an intro to propose my idea.

I think you could make some modifications to your application, and save the values in a database in your mobile phone using PAMP. You will be able to study how long did the battery lived, and which vas the battery level in each moment.
Then just divide the time in sections and check which vas the value at each moment.

If you do this study several times, and with the conditions of just running your Python application and PAMP, you will get a study based criteria to determine if you have 50% of the battery according to the values, even you have all the bars printed on the screen.

I can provide you some code in PHP to solve some problems in the INSERTs, as it seems that MySQL crashes after a table file is bigger that some KBs.

Hope this idea helps

didacgil9@gmail.com
Reply With Quote

#6 Old Re: Ask for help about accelerometer and SysInfo - 2009-04-28, 05:10

Join Date: Jan 2009
Posts: 16
lspkl
Offline
Registered User
Sorry for double message. Even I do the empirical studies, I still need to know the energy consumption online and save it to the file. The problem for Energy Profiler is that I can read the energy consumption only after I stop the testing. So it will require human interaction, which also make the energy measurement not accuracy.

Is anyone have good idea to do that?

Thanks a lot!

Have a nice day!

Peter
Reply With Quote

#7 Old Re: Ask for help about accelerometer and SysInfo - 2009-05-22, 12:54

Join Date: Jan 2009
Posts: 48
mikuu's Avatar
mikuu
Offline
Product Specialist
@ Peter:

This might of interest to you. When NEP is in background/running, you can read the power measurements in real-time thru Nokia Energy Profiler External API:
http://www.forum.nokia.com/info/sw.n...rnal_APIs.html
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia