Go to Post [You know you're proud to be a FIRSTer when...] You explain to someone how do do something, they go off and do it, come back and ask, "is this right?" and you say, "Yes." . - NorviewsVeteran [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 25-10-2006, 15:05
cprogrammer's Avatar
cprogrammer cprogrammer is offline
Registered User
FRC #1595 (Gremlins)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Washington
Posts: 42
cprogrammer will become famous soon enoughcprogrammer will become famous soon enough
Why does the gyro need the ADC?

Maybe I am just confused about this but why does the gyro require the adc to function. I know that the gyro measures speed of rotation.
  #2   Spotlight this post!  
Unread 25-10-2006, 15:19
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: Why does the gyro need the ADC?

If my memory serves me, the output of the gyro is analog. It outputs some voltage proportional to the rotational velocity. Hence, you need the ADC to turn the analog value into something that the processor can actually use.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #3   Spotlight this post!  
Unread 25-10-2006, 15:45
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: Why does the gyro need the ADC?

They gyro outputs analog values. I have never used the gyro but, im not quite sure why you would have to use and ADC (Analog to Digital Converter) for it to work. Maybe thats just how Kevin decided to do it and so people just do that since it makes it easy.
  #4   Spotlight this post!  
Unread 25-10-2006, 20:31
Noah Kleinberg Noah Kleinberg is offline
Registered User
FRC #0395 (2TrainRobotics)
Team Role: Driver
 
Join Date: Jan 2006
Rookie Year: 2006
Location: New York
Posts: 196
Noah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to beholdNoah Kleinberg is a splendid one to behold
Send a message via AIM to Noah Kleinberg
Re: Why does the gyro need the ADC?

The ADC is, as far as my understanding, basically what measures the voltage and "tells" the processor what it is, but in a digital signal. I think you'd have to use this for any analog measurement with the PIC
  #5   Spotlight this post!  
Unread 25-10-2006, 20:38
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Why does the gyro need the ADC?

sciguy125 is correct. The gyro is an analog sensor. To convert the analog values to a digital value you need to use the Analog Digital Converter.

Kevin's ADC code also supports oversampling. This allows the 10 bit ADC in the 18F8722(processor in the RC) to accurately measure up to 16 bits of precision. More accuracy means better gyro data and less gyro drift.

[EDIT] Noah Kleinberg was right too, it just took me to long to post. [/EDIT]
If you need any help PM or e-mail me.

[EDIT] Here is the datasheet for the gyro included in the 2006 KOP. http://ifirobotics.com/docs/analog-d...0Datasheet.pdf [/EDIT]
__________________
Eric Haskins KC9JVH

Last edited by EHaskins : 25-10-2006 at 20:47.
  #6   Spotlight this post!  
Unread 25-10-2006, 21:39
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Why does the gyro need the ADC?

Has anyone tried running the output of the Gyro through a Darlington/Double Darlington transistor amp?

I know that most the values of the gyro are very low, so it seems like it would be a good idea to try amplifying them. If no one has i'll try it and see how it does.

-Q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #7   Spotlight this post!  
Unread 25-10-2006, 22:33
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Why does the gyro need the ADC?

The gyro puts out a voltage, typically from 0 to 5 volts indicating the rate of rotation of the sensor along its sensing axis. When it's not moving the output ideally rests at 2.5 volts (no positive or negative rotation speed) and when it goes in one direction the voltage goes down and in the other it goes up. Since computers are digital they can only sense if the voltages is greater then about 4 volts (binary 1) or less than about 1.2 volts (binary 0) (Those numbers are fuzzy blurbs of memory, might be a bit off). The ADC converts that value to a number in the code, from 0 (0v) to 1023 (5v) for use in the integration calculations (For more info about integrating see the numerous whitepapers on gyro and PID use.)
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #8   Spotlight this post!  
Unread 25-10-2006, 23:44
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: Why does the gyro need the ADC?

Quote:
Originally Posted by Qbranch
Has anyone tried running the output of the Gyro through a Darlington/Double Darlington transistor amp?
I haven't actually done much work with it, so I don't know how low the values get. However, if you do want to amplify it, you'd be better off with an opamp than a transistor. The opamp will be more linear (and actually predictable).
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #9   Spotlight this post!  
Unread 26-10-2006, 00:08
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Why does the gyro need the ADC?

the full scale output of the gyro matches the full scale input range of the ADC: 0 to 5V.

Darlingtons have very high gain. Depending on where you centered the bias you would greatly expand a small portion of the gyros output, and cause the rest of its signal to be over or under the range of the ADC.

If you want a more sensitive gyro there are different versions available.
  #10   Spotlight this post!  
Unread 26-10-2006, 01:21
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Why does the gyro need the ADC?

Quote:
Originally Posted by KenWittlief
the full scale output of the gyro matches the full scale input range of the ADC: 0 to 5V.

Darlingtons have very high gain. Depending on where you centered the bias you would greatly expand a small portion of the gyros output, and cause the rest of its signal to be over or under the range of the ADC.

If you want a more sensitive gyro there are different versions available.
Two of the more common ones used are the Analog devices 150 and 300 degree/second models. The 150 has a smaller range of measurable rotational velocity, but twice the resolution. Since 150/2.5 = 60 degree/second per 0.1 volts whereas the 300 degree/second model has a greater operating range, but half resolution of the 150 since 300/2.5 = 120 degrees/second per 0.1 volts.

I used 2.5 because half of the range is one direction (above 2.5v) and the lower half is the opposite direction (below 2.5v)
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #11   Spotlight this post!  
Unread 26-10-2006, 09:28
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,721
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Why does the gyro need the ADC?

Quote:
Originally Posted by Matt Krass
(For more info about integrating see the numerous whitepapers on gyro and PID use.)
Speaking of gyro whitepapers...
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #12   Spotlight this post!  
Unread 26-10-2006, 09:36
yongkimleng yongkimleng is offline
deus ex programmeur
AKA: James Yong
FTC #0747
Team Role: Mentor
 
Join Date: Aug 2006
Rookie Year: 2004
Location: Singapore, West
Posts: 134
yongkimleng is a jewel in the roughyongkimleng is a jewel in the roughyongkimleng is a jewel in the rough
Send a message via MSN to yongkimleng
Re: Why does the gyro need the ADC?

Because, the gyro returns a signal ANYWHERE between 0v to 5v (e.g. 2.2v). So using an ADC would allow you to translate that particular voltage at a certain point in time into a numerical value (e.g. 0 to 255 for 8 bit) so that your program can translate that into a human related reading (like 0 to 300 degrees)
__________________
| jamesyong.net |
FVC2007, FTC2008
  #13   Spotlight this post!  
Unread 26-10-2006, 10:21
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,633
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
Re: Why does the gyro need the ADC?

In the future an ADC may not be required to get the data out of the gyro.

There are a number of SPI* based gyros and accelerometers that are coming out. Infact, they are becoming more and more common (and cheaper too).

It is possible that IFI may offer an SPI port on future RCs. If you don't want to wait, it is also possible to make a custom circuit to act as a bridge between the SPI and one of the traditional serial ports that are already on the RC.

One of the things I like a lot about these digital communication between sensors and the RC is that you don't have to worry about how well the analog curcuit for the ADC is designed. Some allow for zeroing, offsets, and scaling to be handled by writing to the control registers of the sensor. Very cool. It solves a lot of issues staying all digital.

Joe J.


*SPI = Serial Peripheral Interface -- a standard interface defined for communiciation. I2C is another standard that many sensors use.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2

Last edited by Joe Johnson : 26-10-2006 at 10:25.
  #14   Spotlight this post!  
Unread 26-10-2006, 13:53
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Why does the gyro need the ADC?

Quote:
Originally Posted by Joe Johnson
In the future an ADC may not be required to get the data out of the gyro.

There are a number of SPI* based gyros and accelerometers that are coming out. Infact, they are becoming more and more common (and cheaper too).

It is possible that IFI may offer an SPI port on future RCs. If you don't want to wait, it is also possible to make a custom circuit to act as a bridge between the SPI and one of the traditional serial ports that are already on the RC.

One of the things I like a lot about these digital communication between sensors and the RC is that you don't have to worry about how well the analog curcuit for the ADC is designed. Some allow for zeroing, offsets, and scaling to be handled by writing to the control registers of the sensor. Very cool. It solves a lot of issues staying all digital.

Joe J.


*SPI = Serial Peripheral Interface -- a standard interface defined for communiciation. I2C is another standard that many sensors use.
I don't really know much about this topic, but I would think there would still be an ADC involved... it would just be abstracted more from the user.

Correct?
__________________
http://www.mikesorrenti.com/
  #15   Spotlight this post!  
Unread 26-10-2006, 14:05
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Why does the gyro need the ADC?

the ADC would be inside the gyro itself, with the data sent to the robot controller digitally.

the biggest advantage of this for robotic applications is that its easy to corrupt an analog signal on a wire that is running through a robot chassis. Esp if the wire happens to run along side the power wires going to motors. To keep an analog signal clean on a long wire you really need to use coax cable (which our electronics are not wired for).

Noise injection on analog signals can be very difficult to debug and isolate. You could, for example, have a steering control system that works very well most of the time, but acts up when some unrelated function is operating, like when the compressor turns on, or when a motor is under a full load.

A digital signal is not as easy to corrupt, and if it is corrupted the first effect is dropped data bytes here and there, not noise injected into the signal.

Last edited by KenWittlief : 26-10-2006 at 14:08.
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
Why do i realy need the accelerometer?? TEAM1949 Electrical 4 30-01-2006 15:18
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
With gyro need to access ADC for poteniometer mrozek Programming 0 21-02-2005 13:39
Why isn't the FIRST website the place to get up to the minute regional information? Don Knight General Forum 7 12-03-2003 02:42
Does the submission entry need to fit into the ten minutes?!?! Jenni Chairman's Award 0 02-02-2002 18:00


All times are GMT -5. The time now is 09:57.

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