Go to Post I tried, but our freshmen lost enthusiasm about filing the blocks of aluminum I gave them into Andymark Performance Wheels after only a few hours! - Greg Woelki [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 18-02-2007, 11:42
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: Gear Tooth Sensor Help

Quote:
Originally Posted by BLP View Post
I'm using the encoders code from his site but im only getting it to work on the first and second input and also only when rotating in one direction...
The GTS signal doesn't have a Phase B, so using it with code intended for quadrature encoders is not always going to work. Specifically, the first two inputs can deal with it because they only trigger on one edge of the signal, but the other four will trigger on both edges and think the encoder is moving slightly back and forth at one spot. Since there's no information on direction from the GTS, you'll always count up (or down, depending on defaults) no matter which way the gears are turning.

If you must use digital inputs 3-6, you'll have to remove a lot of the code in the interrupt service routine that deals with relationships between the two phases of a quadrature signal.
Quote:
I've wired the J2 part to the digital inputs and J1 to a circuit breaker for the 12V and still it doesn't work properly...
The digital inputs? There's only one digital signal from the GTS.
  #2   Spotlight this post!  
Unread 18-02-2007, 12:16
BLP BLP is offline
Registered User
FRC #1943
 
Join Date: Feb 2007
Location: Israel
Posts: 2
BLP is an unknown quantity at this point
Re: Gear Tooth Sensor Help

Quote:
Originally Posted by Alan Anderson View Post
The GTS signal doesn't have a Phase B, so using it with code intended for quadrature encoders is not always going to work. Specifically, the first two inputs can deal with it because they only trigger on one edge of the signal, but the other four will trigger on both edges and think the encoder is moving slightly back and forth at one spot. Since there's no information on direction from the GTS, you'll always count up (or down, depending on defaults) no matter which way the gears are turning.

If you must use digital inputs 3-6, you'll have to remove a lot of the code in the interrupt service routine that deals with relationships between the two phases of a quadrature signal.

The digital inputs? There's only one digital signal from the GTS.
Oh yeah, was a typo hehe, I meant to a single input.

The reason I wanted the 3rd input is because the readme says they are better for getting position.

Anyway I got it to work but it counts only once every 3 teeth, it's really strange
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
Gear Tooth Sensor Nathan Programming 4 12-01-2008 15:09
Gear Tooth Sensor? Raikon Kit & Additional Hardware 3 09-02-2007 16:40
Gear Tooth Sensor nukem Programming 9 04-02-2006 20:21
Help with Gear Tooth Sensor RedOctober Electrical 3 27-01-2006 18:38
Gear Tooth Sensor Talha Electrical 1 23-01-2006 21:29


All times are GMT -5. The time now is 04:48.

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