Go to Post A clean pit is a happy pit, a clean pit is a controlled pit, a clean pit is a safe pit. - DjAlamose [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 12-01-2006, 11:47
Nitroxextreme's Avatar
Nitroxextreme Nitroxextreme is offline
Relation to Mrs. Steve
AKA: Jon
FRC #1626 (Falcon Robotics ; 190 (Gompei and The Herd))
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Bedminster, NJ
Posts: 276
Nitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to beholdNitroxextreme is a splendid one to behold
Send a message via AIM to Nitroxextreme
Speed Sensor

I'm looking for some kind of sensor that can measure speed/velocity of a moving wheel. I considered encoders/gear teeth sensors but I'm out of interrupts.


Ideally I'd like to find something that would return an analog value based on the speed...

Any ideas?


Thanks
__________________



"He needed a chuck norris lesson in FIRST"...."I will give him a round house kick to the face...with gracious professionalism"
  #2   Spotlight this post!  
Unread 12-01-2006, 12:24
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: Speed Sensor

What about using a seperate board, and have it communicate to the IFI board via a serial connection?
__________________
http://www.mikesorrenti.com/
  #3   Spotlight this post!  
Unread 12-01-2006, 13:57
Shu Song's Avatar
Shu Song Shu Song is offline
Melodious Footware
AKA: *Crash!* Shuuuuuuuuuuuu
FRC #0639 (Code Red Robotics)
Team Role: Mentor
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Ithaca, NY
Posts: 539
Shu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud of
Send a message via AIM to Shu Song
Re: Speed Sensor

You can use accelerometers, which you have to integrate to get the speed. I don't know if they are included in the kit this year, but they were definitely in the kit last year.
__________________
Code Red Robotics - Team 639
Ithaca High School| Ithaca | New York | USA | Earth | Sol System | Milky Way | Universe | Some Alien's Locker

WINNER of the 2005 Finger Lakes Regional, thanks to teams 191 and 494.
WINNER of the 2004 Canadian Regional, thanks to teams 33 and 1112
WINNER of Delphi: Driving Tomorrow's Technology Award at the 2007 Finger Lakes Regional.
  #4   Spotlight this post!  
Unread 12-01-2006, 13:58
Chriszuma's Avatar
Chriszuma Chriszuma is offline
Jack of all trades
AKA: Chris Hammond
FRC #0068 (Truck Town Thunder)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Clarkston, MI
Posts: 290
Chriszuma is just really niceChriszuma is just really niceChriszuma is just really niceChriszuma is just really nice
Send a message via AIM to Chriszuma
Re: Speed Sensor

Quote:
What about using a seperate board, and have it communicate to the IFI board via a serial connection?
Well then you would lose your serial port. What you could do is get one of those fancy 360-degree position sensors (they run about $50 though), because it outputs analog voltages, looping back to zero when it gets to the top of its range. You could take the difference in position to get the speed. You would have to gear it down substantially though, since it would be mighty hard to detect limit resets when it's going half a turn every loop.
__________________
2006 T3 World Tour: Great Lakes - Waterloo - Palmetto - IRI
2006 Awards: Motorola Quality - RadioShack Innovation in Control

My website: http://zuma.phire.org/
Truck Town Thunder's website: http://trucktownthunder.com/
  #5   Spotlight this post!  
Unread 12-01-2006, 14:21
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Speed Sensor

There is a 2 axis accelerometer in the kit this year.

An accelerometer will give you an accurate velocity reading (after a simple integration. Remember: position, velocity, and acceleration are all interconnected) for the robot as a system. If you are checking overall velocity, this will be fine. If you need each individual wheel's velocity, it may not be the best solution.

If you can tell me, how are you out of interrupts? There's good ol' interrupts 1 and 2 (as configured in Kevin's encoder code), but you can also set your code to run interrupts off pins 3-6. Do you really have 6 interrupt driven sensors? I'd be afraid of interrupt overflow before I ever worried about not having enough hardware interrupts to work with. See the interrupt source at www.kevin.org/frc for more info.


Quote:
Originally Posted by Chriszuma
Well then you would lose your serial port. What you could do is get one of those fancy 360-degree position sensors (they run about $50 though),
There is also a gyro included in the kit this year.

Last edited by Tom Bottiglieri : 12-01-2006 at 14:24.
  #6   Spotlight this post!  
Unread 12-01-2006, 16:49
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Speed Sensor

Quote:
Originally Posted by Tom Bottiglieri
If you can tell me, how are you out of interrupts? There's good ol' interrupts 1 and 2 (as configured in Kevin's encoder code...
Actually, I've got updated encoder code that can use any of the interrupts. The first two are just like last year's (optimized for velocity control) plus the upper four are optimized for position control, but can also be used for velocity control. I'll have it up after I finish some documentation.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 12-01-2006, 17:44
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Speed Sensor

The Kit includes a accelerometer, a gyro, and two gear tooth sensors. You can use EasyC and drag and drop them into the code. There is also information in the help file on getting them going.
  #8   Spotlight this post!  
Unread 13-01-2006, 00:49
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: Speed Sensor

Quote:
Originally Posted by Kevin Watson
Actually, I've got updated encoder code that can use any of the interrupts. The first two are just like last year's (optimized for velocity control) plus the upper four are optimized for position control, but can also be used for velocity control. I'll have it up after I finish some documentation.

-Kevin
Will that work with any encoder, or only quadrature encoders?
  #9   Spotlight this post!  
Unread 13-01-2006, 01:34
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Speed Sensor

Quote:
Originally Posted by Workaphobia
Will that work with any encoder, or only quadrature encoders?
Quadrature only.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 13-01-2006, 05:44
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 589
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Speed Sensor

Quote:
Originally Posted by Workaphobia
Will that work with any encoder, or only quadrature encoders?
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.

For example, in the interrupt service routine for EasyC you connect the A channel to pins 1-6. When the interrupt on the A channel happens, the code reads the B channel to decide whether to count up or down. It doesn't matter if the B channel is actually connected to an encoder - it only sets the count direction.

If you decide to use EasyC it has built-in encoders that only look at a single input.

Brad
  #11   Spotlight this post!  
Unread 13-01-2006, 11:56
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Speed Sensor

Quote:
Originally Posted by BradAMiller
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.

For example, in the interrupt service routine for EasyC you connect the A channel to pins 1-6. When the interrupt on the A channel happens, the code reads the B channel to decide whether to count up or down. It doesn't matter if the B channel is actually connected to an encoder - it only sets the count direction.

If you decide to use EasyC it has built-in encoders that only look at a single input.

Brad
Actually, the new software I described, and Jon had a question about, does require a quadrature input.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #12   Spotlight this post!  
Unread 13-01-2006, 13:51
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: Speed Sensor

Quote:
Originally Posted by BradAMiller
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.
That's what I thought initially, but then I figured that if the phase B input is constant, then every change in the phase A input will be interpretted as the encoder moving back and forth repeatedly, instead of always forward.

Quote:
Originally Posted by BradAMiller
If you decide to use EasyC it has built-in encoders that only look at a single input.
That's good to hear. I graduated last year and had no chance to check out the new tools for this year, so I still think of these problems in terms of hand-typed code.

Last edited by Workaphobia : 13-01-2006 at 13:53.
  #13   Spotlight this post!  
Unread 13-01-2006, 21:07
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: Speed Sensor

This maybe a little of topic but can a PIC output a analog value directly?
It would make life a lot simpler.
  #14   Spotlight this post!  
Unread 13-01-2006, 22:24
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: Speed Sensor

You can use onboard PWMs or software/timer generated PWMs to create a make shift ADC. Simply feed the output to a small capacitor connected to an analog input with a resister between the capacitor and the analog input that leads to ground.

Take a look at this: http://www.piclist.com/techref/sceni...pwm/pwm_vp.htm
__________________
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!)
  #15   Spotlight this post!  
Unread 14-01-2006, 03:05
Tatsu Tatsu is offline
Audiophile and Physicist.
AKA: Tatsu Hashimoto
FRC #1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Woodside
Posts: 49
Tatsu will become famous soon enough
Send a message via AIM to Tatsu
Re: Speed Sensor

Just use a DAC. big deal.
DACs arnt very hard to make, you could even just take a reference esign from TI or AD
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
air speed sensor for rc plane Greg Needel Technical Discussion 19 07-10-2005 23:43
Speed of banner sensor Kashi Chan Electrical 7 06-03-2005 20:00
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 26-04-2004 21:27
Quick Optical Sensor Question zorro Technical Discussion 10 21-01-2003 06:39
What else do we want? archiver 2000 63 23-06-2002 23:19


All times are GMT -5. The time now is 21:55.

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