Go to Post This special is supposed to promote science, not convert the world to gracious professionalism (though that wouldn't be such a bad idea). - Karibou [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 03-02-2012, 18:29
gurdy2 gurdy2 is offline
Registered User
FRC #1325
 
Join Date: Feb 2012
Location: Canada
Posts: 7
gurdy2 is an unknown quantity at this point
Encoder Wiring Help Needed

This is our team's first time using encoders and we are encountering issues as to where on the robot/cRio we should be connecting the encoder wires. If anyone can please help and show what part of the robot we should wire our encoders to (electrically) and more specifically how.

Please Note: we are using the kit of parts E4p encoders for our shooter.

Thanks in advance!
  #2   Spotlight this post!  
Unread 03-02-2012, 18:49
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

The encoders in the KOP have 4 wires. +5, GND, A and B. You can connect the encoders either to the Jaguars directly (if you are using the Jaguars as your motor controllers) or to the digital input channels on the digital sidecar.

For connecting to the Jaguar, crimp a 5-pin header connector with the 4 wires ("+" goes to +5, "-" goes to GND, "A" goes to A and "B" goes to B, "I" has no connection).

If connecting to the cRIO, each encoder needs two digital channels. On the first digital channel, "+" goes to +5 (red), "Gnd" goes to "GND" (black) and "A" goes to signal (white). For the second digital channel, "B" goes to signal (white).
__________________
  #3   Spotlight this post!  
Unread 03-02-2012, 18:58
nitneylion452's Avatar
nitneylion452 nitneylion452 is offline
Registered User
AKA: Joe Lee
FRC #3167 (Environmental Tectonics Crusaders)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Philadelphia, PA
Posts: 596
nitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud ofnitneylion452 has much to be proud of
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by mikets View Post
The encoders in the KOP have 4 wires. +5, GND, A and B. You can connect the encoders either to the Jaguars directly (if you are using the Jaguars as your motor controllers) or to the digital input channels on the digital sidecar.

For connecting to the Jaguar, crimp a 5-pin header connector with the 4 wires ("+" goes to +5, "-" goes to GND, "A" goes to A and "B" goes to B, "I" has no connection).

If connecting to the cRIO, each encoder needs two digital channels. On the first digital channel, "+" goes to +5 (red), "Gnd" goes to "GND" (black) and "A" goes to signal (white). For the second digital channel, "B" goes to signal (white).
Is there any advantage to wiring the encoders one way over the other? I only ask because we used encoders last year and had no idea they could go to the jags.
__________________
Joe
"The ones who will one day rule the world rule the basketball court today."

http://www.fatherjudgerobotics.webs.com

Volunteer 2012 MAR Region Championship - Field Reset
Volunteer 2013 MAR Region Championship - Field Reset
  #4   Spotlight this post!  
Unread 03-02-2012, 19:00
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

If you wire the encoders to the Jags, you must use CAN or you can't access them. The benefits are pretty much the CAN versus PWM arguments such as: cleaner wiring, not taking 2 digital channels per encoder, can optionally use the Jag's built-in PID control etc.
__________________
  #5   Spotlight this post!  
Unread 03-02-2012, 19:22
its da PAT!!!'s Avatar
its da PAT!!! its da PAT!!! is offline
Registered User
AKA: Pat Miller
FRC #0829 (Digital Goats)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: indianapolis
Posts: 186
its da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura about
Send a message via AIM to its da PAT!!!
Re: Encoder Wiring Help Needed

Is there a point to access both channels?
__________________

2012 Boilermaker Engineering Excellence Award
2010 Boilermaker Rockwell Automation Innovation in Control Award
2009 Buckeye J&J Gracious Professionalism Award
2009 Boilermaker J&J Gracious Professionalism Award
2008 Boilermaker J&J Gracious Professionalism Award
2007 St. Louis Regional Champion


  #6   Spotlight this post!  
Unread 03-02-2012, 19:25
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by its da PAT!!! View Post
Is there a point to access both channels?
Don't understand your question. What channels? Are you talking about the two digital input channels? If so, you need two channels per encoder in order to determine the position/speed as well as the direction of the rotation. the FPGA will handle the two channels and give you the resulting count and direction.
__________________

Last edited by mikets : 03-02-2012 at 19:28.
  #7   Spotlight this post!  
Unread 03-02-2012, 19:27
its da PAT!!!'s Avatar
its da PAT!!! its da PAT!!! is offline
Registered User
AKA: Pat Miller
FRC #0829 (Digital Goats)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: indianapolis
Posts: 186
its da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura about
Send a message via AIM to its da PAT!!!
Re: Encoder Wiring Help Needed

Yes that's what I mean. But if you use PWM and use either A or B channel is it less accurate?
__________________

2012 Boilermaker Engineering Excellence Award
2010 Boilermaker Rockwell Automation Innovation in Control Award
2009 Buckeye J&J Gracious Professionalism Award
2009 Boilermaker J&J Gracious Professionalism Award
2008 Boilermaker J&J Gracious Professionalism Award
2007 St. Louis Regional Champion


  #8   Spotlight this post!  
Unread 03-02-2012, 19:28
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by its da PAT!!! View Post
Yes that's what I mean. But if you use PWM and use either A or B channel is it less accurate?
What are you going to use it for?

  #9   Spotlight this post!  
Unread 03-02-2012, 19:33
its da PAT!!!'s Avatar
its da PAT!!! its da PAT!!! is offline
Registered User
AKA: Pat Miller
FRC #0829 (Digital Goats)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: indianapolis
Posts: 186
its da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura about
Send a message via AIM to its da PAT!!!
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by mikets View Post
If connecting to the cRIO, each encoder needs two digital channels. On the first digital channel, "+" goes to +5 (red), "Gnd" goes to "GND" (black) and "A" goes to signal (white). For the second digital channel, "B" goes to signal (white).
Just as a general question. But I may have miss read he post. Do A and B both go to white or is it one or the other?
__________________

2012 Boilermaker Engineering Excellence Award
2010 Boilermaker Rockwell Automation Innovation in Control Award
2009 Buckeye J&J Gracious Professionalism Award
2009 Boilermaker J&J Gracious Professionalism Award
2008 Boilermaker J&J Gracious Professionalism Award
2007 St. Louis Regional Champion


  #10   Spotlight this post!  
Unread 03-02-2012, 19:33
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by its da PAT!!! View Post
Yes that's what I mean. But if you use PWM and use either A or B channel is it less accurate?
It's not a matter of accuracy, without two channels, it won't know the direction of rotation. Besides, unless you are writing code to "count" the pulses from the one digital channel yourself, the Encoder module provided by the WPI library expects both A and B channels.
Code:
Encoder(UINT32 aChannel, UINT32 bChannel, bool reverseDirection=false, EncodingType encodingType = k4X);
__________________

Last edited by mikets : 03-02-2012 at 19:38.
  #11   Spotlight this post!  
Unread 03-02-2012, 19:36
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by its da PAT!!! View Post
Just as a general question. But I may have miss read he post. Do A and B both go to white or is it one or the other?
A and B goes to the white of a different digital input channel.
__________________
  #12   Spotlight this post!  
Unread 03-02-2012, 19:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by mikets View Post
unless you are writing code to "count" the pulses from the one digital channel yourself, the Encoder module provided by the WPI library expects both A and B channels.
Are you saying the FPGA running the FRC firmware cannot be configured to count pulses on one channel and make that count available to the CPU? Or just that the high-level encoder class is not designed to do that?

  #13   Spotlight this post!  
Unread 03-02-2012, 19:40
its da PAT!!!'s Avatar
its da PAT!!! its da PAT!!! is offline
Registered User
AKA: Pat Miller
FRC #0829 (Digital Goats)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: indianapolis
Posts: 186
its da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura aboutits da PAT!!! has a spectacular aura about
Send a message via AIM to its da PAT!!!
Re: Encoder Wiring Help Needed

Makes sense to me. My team since i've been involved, never really used anything more than just a limit switch. So I just figured I ask for future.
__________________

2012 Boilermaker Engineering Excellence Award
2010 Boilermaker Rockwell Automation Innovation in Control Award
2009 Buckeye J&J Gracious Professionalism Award
2009 Boilermaker J&J Gracious Professionalism Award
2008 Boilermaker J&J Gracious Professionalism Award
2007 St. Louis Regional Champion


  #14   Spotlight this post!  
Unread 03-02-2012, 19:44
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 675
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by Ether View Post
Are you saying the FPGA running the FRC firmware cannot be configured to count pulses on one channel and make that count available to the CPU? Or just that the high-level encoder class is not designed to do that?
I am not sure if it can or cannot. After all, the FPGA is programmable, the firmware can configure it anyway it could. My understanding is that the FPGA implements the counter for the encoders and the Encoder module in the WPI library is expecting both channel A and B. There is no method in the Encoder module that accepts only one channel. So I am making a speculation that it does not support one channel. However, it is probably possible to implement a software counter. But I don't know the innards of the FPGA enough to be able to do that.
__________________
  #15   Spotlight this post!  
Unread 03-02-2012, 19:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by its da PAT!!! View Post
Makes sense to me.
You linked your response to my two-question post#12. Was that intentional? If so, not sure what part made sense to you.

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 19:44.

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