Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Reading battery voltage in software (http://www.chiefdelphi.com/forums/showthread.php?t=43860)

RyanN 20-10-2007 18:32

Re: Reading battery voltage in software
 
Quote:

Originally Posted by htwiz2002 (Post 567287)
:yikes:Wait! What type of variable is it?!?! When I try to read it it outputs a number greater than 16k!
I'm building a terminal interface (for debugging) it outputs a really strange value when I do:
Code:

printf("%d",battery_voltage);
Can anyone help?:ahh:

I'm having the same problem, and I cannot figure it out at all!!! I've contacted our main programmer, I tried the code earlier (which gave me a reading of 70), and I've looked over and over in the code.

Bomberofdoom 21-10-2007 05:21

Re: Reading battery voltage in software
 
Holy cow! I know it's possible (it sounds possible), but I never knew there was such a thing in the code. Thanks!

Qbranch 21-10-2007 13:07

Re: Reading battery voltage in software
 
I have, in the past, used the main battery voltage to formulaicly modify the multiplier on the P term in the PID for the wheel motors (rate control). Worked great!

Also have used it to make power limits on non-servo systems vary to have the same power output (mechanical) regardless of lower battery voltage.

I.e., 25% power limits that stay constant regardless of battery voltage.

-q


All times are GMT -5. The time now is 17:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi