Go to Post I've found that being outraged on behalf of others is often a misuse of energy. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 21-02-2010, 21:46
Randy Forgaard's Avatar
Randy Forgaard Randy Forgaard is offline
Parent 1729, former mentor 3126
FRC #7129
Team Role: Parent
 
Join Date: Oct 2009
Rookie Year: 2010
Location: Hollis, NH, USA
Posts: 48
Randy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to beholdRandy Forgaard is a splendid one to behold
Has anyone written C++ code to read the temperature sensor on the gyro?

Has anyone written C++ code to read the temperature sensor included as part of the ADW22307 gyro in the 2010 Kit of Parts?

The purpose of the temperature sensor is to allow one to interpret the gyro data while compensating for temperature, since the gyro data varies somewhat depending on the ambient temperature around the gyro itself. We aren't planning (anytime soon) to implement this temperature compensation for the gyro data (although that would be cool and quite doable...maybe someone will submit that temperature compensation code to WPILib someday).

However, we would still be interested in reading the temperature sensor on the gyro, just to find out the ambient temperature around our electronics inside the robot. We would like to display the robot temperature on our custom dashboard, and if we find that it's getting hot in there from the Jaguars and such, we can potentially add one of those nifty fans from the Kit of Parts to help cool down the robot electronics.

The gyro temperature sensor is just a standard 3-wire analog sensor, and can apparently be plugged directly into the analog breakout board on the cRIO, just like the gyro itself. However, WPILib doesn't seem to include any functions that provide a convenient way to read that temperature from the gyro.

Per the datasheet for the ADW22307 gyro, and the FRC 2010 Sensor Manual, the temperature sensor has a nominal output of 2.5V at 25°C (77°F), and the output varies up or down by 9mV per one degree Celsius (5mv per one degree Fahrenheit).

It would not be difficult to write the C++ code to read the temperature sensor on the 2010 gyro. It would involve using the AnalogChannel class in WPILib. We've never written code to use AnalogChannel directly before, but we could start with the Gyro.cpp WPILib source code (which also uses AnalogChannel) and modify it accordingly. But if someone else has already written the code to read the temperature sensor, and is interested in sharing it, we wouldn't have to re-invent the wheel. No big deal either way, we just thought we'd ask.

Many thanks!
Reply With Quote
 


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 to attach the gyro sensor on the robot dazero Sensors 1 02-03-2009 13:16
Gyro Temperature Compensation? Orborde Programming 1 09-02-2008 17:15
Has anyone ever read... Raven_Writer Chit-Chat 6 11-06-2004 15:17
Has anyone craked the code yet Jeremy General Forum 2 09-01-2004 14:12
Has anyone succesfully programed the Gyro? archiver 2001 16 24-06-2002 02:56


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

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