Go to Post RoboRIO brownout (v, n): The GDC's alternative to limiting the number of motors allowed on a robot. - GeeTwo [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-02-2004, 02:25
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Wiring "3-pin" Shaft Encoder.

Hey everyone. We ordered a few of these shaft encoders from http://www.newark.com and are having a heck of a time trying to figure out how they should be properly wired. Does anyone have suggestions or experience with this unusual encoder?
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #2   Spotlight this post!  
Unread 25-02-2004, 03:01
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,801
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: Wiring "3-pin" Shaft Encoder.

Quote:
Originally Posted by Joel J.
Hey everyone. We ordered a few of these shaft encoders from http://www.newark.com and are having a heck of a time trying to figure out how they should be properly wired. Does anyone have suggestions or experience with this unusual encoder?
Did you purchase the quadrature version rather than the BCD or Gray code versions?
It looks like it's a quadrature encoder with the quad signals on A & B, power on C. I'll have to verify with another electrician in the morning to see if he's had personal experience with this model before.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 25-02-2004, 03:07
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: Wiring "3-pin" Shaft Encoder.

Quote:
Originally Posted by Mark McLeod
Did you purchase the quadrature version rather than the BCD or Gray code versions?
It looks like it's a quadrature encoder with the quad signals on A & B, power on C. I'll have to verify with another electrician in the morning to see if he's had personal experience with this model before.
Yes. Thats how it is supposed to be setup. How do we go about porting that to the digital inputs? Should there be a ground connection somewhere? We connected A to the signal of one digital input and B to the signal of another digital input and C to the +5v on the digital input. We are getting a constant 1 as the input of the encoders no matter how many times the wheels rotate (it does not go through each state). I conclude that this is happening as a result of the pin pulling itself to high (since thats how IFI set things up), because its not getting any input, which hints at an improperly wired system. Is this the case?
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #4   Spotlight this post!  
Unread 25-02-2004, 03:18
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,801
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: Wiring "3-pin" Shaft Encoder.

Quote:
Originally Posted by Joel J.
Yes. Thats how it is supposed to be setup. How do we go about porting that to the digital inputs? Should there be a ground connection somewhere? We connected A to the signal of one digital input and B to the signal of another digital input and C to the +5v on the digital input. We are getting a constant 1 as the input of the encoders no matter how many times the wheels rotate (it does not go through each state). I conclude that this is happening as a result of the pin pulling itself to high (since thats how IFI set things up), because its not getting any input, which hints at an improperly wired system. Is this the case?
Yes, I also believe it's the IFI pull-up that's defeating you. It's high when the circuit is open and high when it's closed by the encoder.

You should be able to connect A/B to signal as you are doing and C to ground. Then the digital input will be high when there is no circuit and low when signal is passed through the encoder to ground.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 25-02-2004, 03:30
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: Wiring "3-pin" Shaft Encoder.

Quote:
Originally Posted by Mark McLeod
Yes, I also believe it's the IFI pull-up that's defeating you. It's high when the circuit is open and high when it's closed by the encoder.

You should be able to connect A/B to signal as you are doing and C to ground. Then the digital input will be high when there is no circuit and low when signal is passed through the encoder to ground.
Aha! I switched the C connector from the +5v pin to the ground pin, as you suggested, and it works properly now. Thanks.
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #6   Spotlight this post!  
Unread 25-02-2004, 03:31
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Wiring "3-pin" Shaft Encoder.

Actually the pull-ups are internal to the PIC. You can disable them using a register.

But yeah, try connecting C to ground. It should work then.

[Edit] Hm.. looks like I'm a bit too slow.
  #7   Spotlight this post!  
Unread 25-02-2004, 12:55
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: Wiring "3-pin" Shaft Encoder.

Quote:
Originally Posted by Jay Lundy
Actually the pull-ups are internal to the PIC. You can disable them using a register.
Well, yes and no. The 18F8520 does have programmable weak pull-ups, but only on port b, which is mapped to digital I/O pins 1-6 on the FRC-RC and interrupts 1-6 on the EDU-RC. IFI has also included 100K pull-ups on most, if not all, I/O pins.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #8   Spotlight this post!  
Unread 27-02-2004, 17:21
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Wiring "3-pin" Shaft Encoder.

That encoder advertises a life of 100,000 cycles. I think it is designed to be an electronic knob, and connecting it to a spinning shaft might rack up the cycles pretty fast.

On the other hand, it doesn't have to work for ten years.
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
Problem with 5/8 in. shaft in this years kit echos Kit & Additional Hardware 5 14-01-2004 21:21
Need Help on Shaft Mounting... archiver 2001 3 23-06-2002 23:29


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

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