Go to Post I'm not suffering from my FIRST "addiction". I enjoy every minute of it. - Katie_UPS [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 07-01-2011, 11:29
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,609
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Jaguar current sensing technical details?

Actually, I'd look move to pages 8 and 9 of the data sheet, on "Accuracy variations as a result of Vsense and common mode voltage".

This amp is apparently most accurate at sense voltages >20mv. Which equates to 20A for us. There's 3 operating cases in this range, and we're not in the worst... So it could be worse? I've attached a snapshot of an example graph. What it boils down to is that the amp goes non-linear below 20mv, and eventually lands on some positive offset voltage at the output, instead of zero. They state the worst case zero offset at the output is 300mv. It looks less linear the closer you get to 0 Vsense, so that's exciting too.

Oh yeah. And both Jags record a zero offset for the current ADC on power up, and then subtract that from current readings forever after. So if you end up with the worst case 300mv offset, then your readings above 20A will read 15A low. We're probably not getting this worst-case scenario, but that's obviously going to affect the accuracy of ALL the current readings. Better might be to just assume/hope that you have little absolute error in the ADC, and just use the zero offset as a linear correction below 20mv Vsense.

Maybe FIRST will let us modify the Jag firmware this year?

Yeah, you're right. That's never gonna happen.
Attached Thumbnails
Click image for larger version

Name:	INA195graph.JPG
Views:	15
Size:	31.4 KB
ID:	9588  
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #17   Spotlight this post!  
Unread 07-01-2011, 11:43
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Kevin Sevcik View Post

Maybe FIRST will let us modify the Jag firmware this year?

Yeah, you're right. That's never gonna happen.
But TI can modify it. Perhaps you could submit the change to them. Bonus points for sending code with the request.
Reply With Quote
  #18   Spotlight this post!  
Unread 07-01-2011, 13:06
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,609
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by EricVanWyk View Post
But TI can modify it. Perhaps you could submit the change to them. Bonus points for sending code with the request.
Oh certainly. I'll probably try playing with some of our jags sometime this season or after and see how trustworthy the current sense is and how good a fix my proposal is. My only concern would be that I'll be modifying the reference firmware and this all might not apply to the FRC firmware. I'll have to see if they're willing to release that source code to interested parties.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #19   Spotlight this post!  
Unread 07-01-2011, 13:46
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Kevin Sevcik View Post
Actually, I'd look move to pages 8 and 9 of the data sheet, on "Accuracy variations as a result of Vsense and common mode voltage".
Where did you find this datasheet? It's certainly not the INA193AID one I attached.
__________________
-- Marshal Horn
Reply With Quote
  #20   Spotlight this post!  
Unread 07-01-2011, 13:53
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Jaguar current sensing technical details?

Kevin,
The reason for the non linearity is the device's inability to drive the output to zero volts. The specification is for a minimum of 3 mV typical but can be as high as 50 mV. The TI datasheet on page 4 has a very descriptive curve showing the errors. In applications where minimum errors are needed, designers would usually add a biplolar power supply to allow driving to zero volts.
http://pdf.chinaicmart.com/3AI/INA193AIDBVR.pdf
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #21   Spotlight this post!  
Unread 07-01-2011, 15:10
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Ether View Post
See attached images. For simplicity, I showed path through only one FET of each pair, and only for + currents. Green path is during ON portion. Blue path is during OFF portion (for high-side switching). Red path is during OFF portion (for low-side switching).

I don't know if the Jags use high-side, or low-side, or some other switching method. Does anyone know, definitively, what switching method the Jags use? I've heard many different claims.
Kevin Sevick has posted information about the Tan and Black Jag switching.

I could not edit my earlier post in this thread to reflect this new information, so I am attaching an updated image here.

Also, there's an error in the Tan Jag image. The blue line should be shown going through the Q10,11,&12 FETs, not their Zener diodes.



Attached Thumbnails
Click image for larger version

Name:	Black Jag current paths - updated.png
Views:	22
Size:	59.0 KB
ID:	9591  

Last edited by Ether : 07-01-2011 at 15:22.
Reply With Quote
  #22   Spotlight this post!  
Unread 07-01-2011, 16:29
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,609
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Jaguar current sensing technical details?

First, here's the datasheet I'm working from. The latest and greatest from TI itself:INA193 datasheet

I see the note about the swing range of the output, but there's additional notes just above that and on page 8 and 9 that declare the output bottoms out at 300mV typ. Perhaps the 300mV thing isn't the dominant issue and it really will swing down to 3mV with increased error. It's kinda hard to decide, which all the more inclines me to just empirically test the thing.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #23   Spotlight this post!  
Unread 07-01-2011, 17:12
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Kevin Sevcik View Post
Actually, I'd look move to pages 8 and 9 of the data sheet, on "Accuracy variations as a result of Vsense and common mode voltage".

This amp is apparently most accurate at sense voltages >20mv. Which equates to 20A for us. There's 3 operating cases in this range, and we're not in the worst... So it could be worse? I've attached a snapshot of an example graph. What it boils down to is that the amp goes non-linear below 20mv, and eventually lands on some positive offset voltage at the output, instead of zero. They state the worst case zero offset at the output is 300mv. It looks less linear the closer you get to 0 Vsense, so that's exciting too.
Quote:
The accuracy of the INA193−INA198 current shunt monitors is a function of two main variables: VSENSE (VIN+ − VIN−) and common-mode voltage, VCM, relative to the supply voltage, VS. VCM is expressed as (VIN+ + VIN−)/2; however, in practice, VCM is seen as the voltage at VIN+ because the voltage drop across VSENSE is usually small.
This section addresses the accuracy of these specific operating regions:
  • Normal Case 1: VSENSE ≥ 20mV, VCM ≥ VS
  • Normal Case 2: VSENSE ≥ 20mV, VCM < VS
  • Low VSENSE Case 1: VSENSE < 20mV, −16V ≤ VCM <0
  • Low VSENSE Case 2: VSENSE < 20mV, 0V ≤ VCM ≤ VS
  • Low VSENSE Case 3: VSENSE < 20mV, VS < VCM ≤ 80V
So we're in Low VSENSE Case 3, where VCM is greater than the 5v supply voltage? That must be why they measure current on the high side.

Above 20A, then, this current measurement is incredibly accurate; within %0.001 if your battery is at 11.5v or greater.

Quote:
Originally Posted by Kevin Sevcik View Post
Oh yeah. And both Jags record a zero offset for the current ADC on power up, and then subtract that from current readings forever after. So if you end up with the worst case 300mv offset, then your readings above 20A will read 15A low. We're probably not getting this worst-case scenario, but that's obviously going to affect the accuracy of ALL the current readings. Better might be to just assume/hope that you have little absolute error in the ADC, and just use the zero offset as a linear correction below 20mv Vsense.
Except for that. They just made it measure low for the WHOLE range. So that means, if you get a reading of 5A or greater, you need to add 15A to make it accurate. XP

Wait a minute. Where did you get the 15A? I see 0.3v on the graph, which equates to 30A.
__________________
-- Marshal Horn
Reply With Quote
  #24   Spotlight this post!  
Unread 07-01-2011, 17:55
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,609
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by kamocat View Post
Wait a minute. Where did you get the 15A? I see 0.3v on the graph, which equates to 30A.
300mV on the output / 20V/V = 15mV = 15A

Again, this is all kinda theoretical. I'd really like to check it all with an actual amp meter. After all, they note the 300mV on the output as a worst case.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #25   Spotlight this post!  
Unread 07-01-2011, 18:45
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Kevin Sevcik View Post
300mV on the output / 20V/V = 15mV = 15A

Again, this is all kinda theoretical. I'd really like to check it all with an actual amp meter. After all, they note the 300mV on the output as a worst case.
I messed up again! (I'm starting to get used to this) I mean 3A, not 30A.

You're right according to the 20V/V spec on the datasheet, but the graph shows 100V/V.
(At 20mV input, it says there's a 2V output)

It appears this datasheet conflicts with itself.

EDIT:
Would you say a Fluke 179 would work for measuring current? Or would you prefer a 0.01 ohm current shunt with analog meter?
__________________
-- Marshal Horn

Last edited by kamocat : 07-01-2011 at 18:49.
Reply With Quote
  #26   Spotlight this post!  
Unread 08-01-2011, 01:27
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Jaguar current sensing technical details?

Quote:
Originally Posted by Kevin Sevcik View Post
My only concern would be that I'll be modifying the reference firmware and this all might not apply to the FRC firmware.
The FRC firmware is directly based on the reference firmware. The only goal of the separate version is to ensure safety (DS / FMS in control). As such you can assume that other aspects of the firmware are the same as the RDK.

Quote:
Originally Posted by Kevin Sevcik View Post
I'll have to see if they're willing to release that source code to interested parties.
In my experience, that's very unlikely.
Reply With Quote
  #27   Spotlight this post!  
Unread 09-01-2011, 07:55
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Jaguar current sensing technical details?

[quote=kamocat;992566]
You're right according to the 20V/V spec on the datasheet, but the graph shows 100V/V.
(At 20mV input, it says there's a 2V output)

[quote]

The graph(s) is data for three different devices. You have to be careful to look at the 193 (20v/V) graph only.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
Reply


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
Motor speed sensing with the Jaguar motor controller? mminutto FRC Control System 5 13-01-2009 18:13
Technical Details for the IR sensor board tuzzer Electrical 1 19-01-2008 08:38
Sensing current and/or voltage drop??? archiver 2001 3 23-06-2002 23:21
StangSense: WildStang's Current Sensing System Dave Flowerday Technical Discussion 12 05-04-2002 07:40


All times are GMT -5. The time now is 05:25.

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