Go to Post kids these days, with their fancy aluminum sprockets, don't know how good they have it. - AllenGregoryIV [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 18-01-2011, 14:13
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
How can we wire the Gear Tooth sensor?

Hey.
Today I was told by our mentor we need to use the Gear Tooth sensor we received in the 2008 KOP:



but no one remembers or knows how to wire and program this (we're using LabVIEW), so I'd appreciate any tips.

Thanks.
  #2   Spotlight this post!  
Unread 18-01-2011, 14:40
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How can we wire the Gear Tooth sensor?

The 2008 Sensor Manual is still on the FIRST web site. I found it by going to the Competition Manual page and following the link at the bottom to older documentation. The GTS is detailed on page 2.

To read it in LabVIEW, use a Counter.


Why do you need to use a gear tooth sensor? There might be better ways to do what you want using other sensors provided in this year's kit.
  #3   Spotlight this post!  
Unread 18-01-2011, 15:11
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: How can we wire the Gear Tooth sensor?

There's a pole made out of aluminum and on it are a lot of screws at a constant distance. our "claw", the part of the robot that hold the tube, moves on that pole. the idea is that the sensor will rest on the claw and move with it, and that way we could count the response we get for every screw on the pole the claw passes, and thus knowing at what height the claw is located at.

When I try opening a Counter in LabVIEW it asks me for some kind of source, where do I get it from?
Edit: yeah, I just saw the "Dig Src" vi. is that what converts a digital input to the source needed?
and anyway, that makes me skeptic, because I tried using the sensor just with a regular digital input and it didn't work (always gave false value)

If I'm still using the digital input, why would it work now?

Last edited by Itamar : 18-01-2011 at 15:14.
  #4   Spotlight this post!  
Unread 18-01-2011, 15:27
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: How can we wire the Gear Tooth sensor?

The counter operates much faster than the control software (it has dedicated FPGA hardware to handle it). Thus, it never misses counts.

On a related note, an analog potentiometer seems like a better choice. You attach it to a shaft, and it measures the absolute angle of the shaft, which you read from an analog channel.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #5   Spotlight this post!  
Unread 18-01-2011, 15:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How can we wire the Gear Tooth sensor?

Quote:
Originally Posted by Itamar View Post
I just saw the "Dig Src" vi. is that what converts a digital input to the source needed?
and anyway, that makes me skeptic, because I tried using the sensor just with a regular digital input and it didn't work (always gave false value)

If I'm still using the digital input, why would it work now?
You found the right thing. The reason you always see "false" on the digital input is that the GTS output is a very short pulse. You probably won't notice it unless you watch it with an oscilloscope. The FPGA in the cRIO can monitor the signal continuously and increment the counter every time it appears.
  #6   Spotlight this post!  
Unread 18-01-2011, 16:03
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: How can we wire the Gear Tooth sensor?

I understand know how it works, thank you.
but for some reason it doesn't work. Here's how I wired it:



And here's the LabVIEW code:



there was kind of a bug that confirmed some values are passed: we accidentally put the sensor on an aluminum plate that caused it to always pass a positive value, so the counter raised it's value (quickly, like anticipated).
but when we figured out the mistake we have made we removed the sensor from the plate and now it doesn't pass any values at all (the counter doesn't rise)
  #7   Spotlight this post!  
Unread 18-01-2011, 16:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How can we wire the Gear Tooth sensor?

The Gear Tooth Sensor output is a digital signal. Your code is expecting to see it on DIO 1. That's the first General Purpose I/O pin on the Digital Sidecar. Your connection drawing indicates that you have wired it to an analog input instead.

Remove it from the Analog Breakout and connect it to the Digital Sidecar.

I think the "bug" you saw was just a coincidence unrelated to the aluminum plate. It would happen if something was touching the DIO pin and causing it to pick up random noise, triggering the counter repeatedly.
  #8   Spotlight this post!  
Unread 19-01-2011, 01:01
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: How can we wire the Gear Tooth sensor?

I'm so sorry, I've made a mistake. This was an old drawing, it is now connected to the first DIO in the sidecar (as it was when I posted the last message)
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


All times are GMT -5. The time now is 07:12.

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