Go to Post I can't really think of a bad FIRST experience, really, I can't. - Joshua May [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 02-12-2002, 07:36 PM
Ulibrium Ulibrium is offline
Registered User
#0920 (Lancers)
 
Join Date: Jan 2002
Location: Philadelphia, PA
Posts: 29
Ulibrium is an unknown quantity at this point
Send a message via AIM to Ulibrium
Voltage Byte -> True Voltage

I remember seeing the formula for this somewhere. Please Help. I'm writing a custom dashboard in VB which takes data direct from the dashboard port from the OI. How do I convert the voltage byte into true voltage?
__________________
Three mathematicians slave over a board full of tensor calculus. One looks to the other and asks... "do you remember what we sent out to prove?"
  #2   Spotlight this post!  
Unread 02-12-2002, 09:50 PM
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Look in the default program listing, just after the c_variable CON 1 listings.

In Initialization Constant VOLTAGE - USER DEFINED,
the number to initialize the voltage constant
is equal to INT((DESIRED .. VOLTAGE + 0.4) * 16.3)

For your purpose, you'll have to reverse the process.
  #3   Spotlight this post!  
Unread 02-12-2002, 09:52 PM
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Unless they removed it when they updated their site, the formula to extract a battery voltage from the 0-254 value was in the FAQ at Innovation FIRST's site.
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #4   Spotlight this post!  
Unread 02-12-2002, 09:56 PM
thedillybar thedillybar is offline
Registered User
#0894 (Chargers)
 
Join Date: Jan 2002
Location: Flint, MI
Posts: 56
thedillybar is an unknown quantity at this point
Send a message via AIM to thedillybar
What's worse, fractional people trying to use metric or base 10 people trying to use base 2?
  #5   Spotlight this post!  
Unread 02-12-2002, 10:26 PM
Ulibrium Ulibrium is offline
Registered User
#0920 (Lancers)
 
Join Date: Jan 2002
Location: Philadelphia, PA
Posts: 29
Ulibrium is an unknown quantity at this point
Send a message via AIM to Ulibrium
I tried the formula in the default code. It doesn't seem to work.
__________________
Three mathematicians slave over a board full of tensor calculus. One looks to the other and asks... "do you remember what we sent out to prove?"
  #6   Spotlight this post!  
Unread 02-12-2002, 10:31 PM
Ulibrium Ulibrium is offline
Registered User
#0920 (Lancers)
 
Join Date: Jan 2002
Location: Philadelphia, PA
Posts: 29
Ulibrium is an unknown quantity at this point
Send a message via AIM to Ulibrium
Ok, I got it. It was on First's web site, FAQ section. I knew I saw it somewhere. There is a difference between the default code and First's web site. If you reverse the default code, as stated above, you get a term of -0.4, while if you look at First FAQ, you get a term of 0.4. And I was off by approximately 0.8 so I see that was my problem.
__________________
Three mathematicians slave over a board full of tensor calculus. One looks to the other and asks... "do you remember what we sent out to prove?"
  #7   Spotlight this post!  
Unread 02-13-2002, 10:33 AM
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
A bit off topic, I'm trying to get my dashboard monitor working , but I haven't programmed in VB for a long time. How do I round the battery voltage to one decimal place?
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #8   Spotlight this post!  
Unread 02-13-2002, 12:22 PM
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Low Bat LED

Quick question: Do you need sensor8 to be active in your program for the Low Bat LED function to work, or do you only need sensor8 if you are using the analog voltage somewhere in your program?

Only reason I wonder is that our low bat LED comes on after about 5 mins and we are not sure if this is because of the much higher drain on the batter this year vs last year.
  #9   Spotlight this post!  
Unread 02-13-2002, 01:17 PM
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Quote:
Originally posted by Manoel
A bit off topic, I'm trying to get my dashboard monitor working , but I haven't programmed in VB for a long time. How do I round the battery voltage to one decimal place?
Assuming your voltage is stored in varVolt, do something like this:

varVolt=(int(varVolt*10+0.5)/10)

Or, if you're just outputting it, do this:
lblVoltage.caption = Format$(varVolt,"##.0")
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
  #10   Spotlight this post!  
Unread 02-28-2002, 12:38 AM
CJMJ CJMJ is offline
Registered User
#0446 (Robodogs)
 
Join Date: Feb 2002
Location: LaPorte, Texas
Posts: 4
CJMJ is an unknown quantity at this point
I found the following formula in the FAQ on the Innovation First website:

Voltage = ((((binary_value*79)/128)+4)/10

Hope this helps.
  #11   Spotlight this post!  
Unread 02-28-2002, 02:47 PM
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,629
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Quote:
Quick question: Do you need sensor8 to be active in your program for the Low Bat LED function to work, or do you only need sensor8 if you are using the analog voltage somewhere in your program?

Only reason I wonder is that our low bat LED comes on after about 5 mins and we are not sure if this is because of the much higher drain on the batter this year vs last year.
The Low Bat LED comes on without regard to whether or not your program uses the battery voltage.

It is my understanding that your program can set the voltage that the LED flashes
Below is from the Default Code from Innovation First:

Quote:
'---------- Initialization Constant VOLTAGE - USER DEFINED -------------------
' This is the 'Low Battery' detect voltage. The 'Low Battery' LED will
' blink when the voltage drops below this value.
' Basically set VOLTAGE = INT ((DESIRED FLASH VOLTAGE + 0.4) * 16.3)
' Example, for a 10 Volt trigger, set Voltage eq 170.

dataInitVolt CON 153 '9.0 Volts
However, at a low enough voltage (I think it is 8 volts or perhaps 8.5 volts), the Low Battery LED comes on and stays on until the RC is reset (as I recall -- it may require the OI to be reset also but I don't think so). The voltage that the LED latches on is fixed and cannot be changed by us mere mortals.

I hope this helps.

Joe J.
  #12   Spotlight this post!  
Unread 03-01-2002, 08:55 AM
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Quote:
Originally posted by Joe Johnson

However, at a low enough voltage (I think it is 8 volts or perhaps 8.5 volts), the Low Battery LED comes on and stays on until the RC is reset (as I recall -- it may require the OI to be reset also but I don't think so). The voltage that the LED latches on is fixed and cannot be changed by us mere mortals.
If I remember correctly, it's a hair above 8.0v when the light stays on. The reason I say a "hair above," is that if the voltage ever gets below 8.0 for more than an instant, the RC does not have enough power to run(minimum 8v required) and resets.
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...
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
FIRST-SME membership archiver 2001 5 06-24-2002 12:41 AM


All times are GMT -5. The time now is 08:52 AM.

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