Go to Post FIRST should never come before school and anyone who thinks otherwise is irresponsible and should not be mentoring the kids - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-05-2008, 22:47
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Dashboard: how to calculate battery voltages?

Hello,

I have been hacking on a small VB app to connect to the dashboard port during matches to record every packet into a CSV file for analysis in Excel. It's a handy little tool, but I'm looking to extend its functionality.

For now, I can't figure out how to calculate, given the 1 byte battery voltage, the actual number of volts. Is there some magic formula I must run the byte through to get the proper voltage?

Thanks.

BTW, I may release this app once it's a bit better. Right now it's just a mash of code I wrote last-minute...I really needed it to figure out why our auto-correction in auton wasn't working.

JBot
__________________
Aren't signatures a bit outdated?
  #2   Spotlight this post!  
Unread 29-05-2008, 23:09
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Dashboard: how to calculate battery voltages?

I have no way to test if this helps you, but I found this in ifi_aliases.h It leads me to believe that you should scale the readings you get back by the same amount as IFI does in this code.

Code:
/*
 *-----------------------------------------------------------------------------------------------------
 *---------- Aliases for Battery Voltage bytes --------------------------------------------------------
 *-----------------------------------------------------------------------------------------------------
 * Formula to calculate voltage in volts: 
 *     current_voltage = battery_voltage * 0.038 + 0.05; 
 */

#define battery_voltage     rxdata.rc_main_batt*15.64/256
#define backup_voltage      rxdata.rc_backup_batt*15.64/256
Closed Thread


Thread Tools
Display Modes 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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i calculate degree/pwmstep? Ianuser Programming 0 17-02-2007 09:58
How to calculate arm angles? SoD Programming 5 31-01-2007 14:17
How to calculate planetary gear ratios? sanddrag Technical Discussion 2 27-02-2005 11:55
How do you Calculate Belt Length? Gabriel Technical Discussion 7 08-11-2004 14:54
Battery Voltages in Dashboard Ian W. Programming 10 07-03-2004 16:50


All times are GMT -5. The time now is 19:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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