Go to Post I once heard someone say that Dean is "building an army of engineers." I disagree. I think he is building an army of the informed. - Gope [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
  #16   Spotlight this post!  
Unread 03-02-2012, 19:47
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

I dont recall doing that, but no it wasn't to your two part question.
__________________

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


  #17   Spotlight this post!  
Unread 03-02-2012, 19:48
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

Wait...
I just found a different class module (GearTooth class). This one accepts one channel. So it does support counting one channel. I suppose you can connect the A channel to one digital input and use the GearTooth class to access the count.
__________________

Last edited by mikets : 03-02-2012 at 19:51.
  #18   Spotlight this post!  
Unread 03-02-2012, 19:51
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

To honest with you I know nothing about code. The most i know is that we use Java lol. I'm more of a mechanical/ electrical guy.
__________________

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


  #19   Spotlight this post!  
Unread 03-02-2012, 19:55
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

Interesting...
From reading the source code of the GearTooth class, it seems the GearTooth sensor can even tell the direction. It supports different pulse widths on different directions. I wonder how does that work? But I am sure it is only specific to the GearTooth sensor. If you use one channel of the optical encoder, since the pulse width doesn't change in both direction (except for changing speed), it cannot decode the direction from the pulse width.
__________________
  #20   Spotlight this post!  
Unread 03-02-2012, 19:55
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
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.
Just found this thread:

http://www.chiefdelphi.com/forums/sh...d.php?t=101587
  #21   Spotlight this post!  
Unread 03-02-2012, 19:58
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
Yep, there is also a counter class that can be used for this purpose.
__________________
  #22   Spotlight this post!  
Unread 03-02-2012, 20:01
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
Yep, there is also a counter class that can be used for this purpose.
I am assuming that the counting is being done by the FPGA hardware. Otherwise you'd swamp the cRIO with interrupts.

  #23   Spotlight this post!  
Unread 03-02-2012, 20:03
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
I am assuming that the counting is being done by the FPGA hardware. Otherwise you'd swamp the cRIO with interrupts.
Yep, the counting is done by the FPGA.
__________________
  #24   Spotlight this post!  
Unread 03-02-2012, 20:47
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
Yep, the counting is done by the FPGA.
Does it say that explicitly in one of the documents you've just been reading?

  #25   Spotlight this post!  
Unread 04-02-2012, 06:46
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
Does it say that explicitly in one of the documents you've just been reading?
It's in the source code of counter.cpp. It's accessing the FPGA all over.
__________________
  #26   Spotlight this post!  
Unread 04-02-2012, 11:26
jmailhot jmailhot is offline
Registered User
FRC #0303 (Panther Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Bridgewater, NJ
Posts: 2
jmailhot is an unknown quantity at this point
Another issue with encoders to keep in mind is the "sense" of forward and backwards. Especially if using the encoders with jaguar PID loops, but even with cRIO PID loops, the encoders need to be increasing when the motor is going forward, and the control input sense of forward needs to match the encoder. And the jaguar's sense of positive voltage needs to match also. You may need to reverse the A and B lines of the encoder, or the polarity of the motor, to get these things all having the same definition of "forward". If you add limit switches to the mix, the forward and reverse limit switches must also correspond.
  #27   Spotlight this post!  
Unread 04-02-2012, 13:53
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 254
BitTwiddler is on a distinguished road
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by mikets View Post
Yep, there is also a counter class that can be used for this purpose.
Very timely discussion. I am going to make the assumption the LabView VIs associated with the counter implement this class for us to use to count shooter revolutions.
Thanks guys.
  #28   Spotlight this post!  
Unread 04-02-2012, 16:14
gnichols gnichols is offline
Registered User
FRC #3862
 
Join Date: Feb 2011
Location: Missouri
Posts: 4
gnichols is an unknown quantity at this point
Re: Encoder Wiring Help Needed

Not sure where to go. I have wired these encoders using the 2 channels on the sidecar. When I do, the robot goes nuts. It spins one side drive backwards and the second side does nothing and never works. Have wired +5, gnd, signal A to first channel and signal b to second channel on both sides. Anyone have an explanation as to what is going on.
  #29   Spotlight this post!  
Unread 04-02-2012, 18:12
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 254
BitTwiddler is on a distinguished road
Re: Encoder Wiring Help Needed

Quote:
Originally Posted by BitTwiddler View Post
Very timely discussion. I am going to make the assumption the LabView VIs associated with the counter implement this class for us to use to count shooter revolutions.
Thanks guys.
An Update:

For you Labview programmers only interested in looking at one input to count pulses to determine the rate of rotation, the WPI counter library works great. Just make sure you take the time to read the help file on the counter VIs thoroughly.

When I got to the shop earlier today the team programmer complained that the software based counter he had built couldn't keep up at high motor speeds. I explained how the FPGA offloaded this work to the hardware and the counter VIs in the WPI library took advantage of this capability. We tried them and they worked all the way up to the 4000 RPM speed with no problem. We found it helpful to use one of the low-pass filters from the PID library.

Last edited by BitTwiddler : 04-02-2012 at 18:17.
  #30   Spotlight this post!  
Unread 04-02-2012, 20:31
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: Encoder Wiring Help Needed

Quote:
Originally Posted by gnichols View Post
Not sure where to go. I have wired these encoders using the 2 channels on the sidecar. When I do, the robot goes nuts. It spins one side drive backwards and the second side does nothing and never works. Have wired +5, gnd, signal A to first channel and signal b to second channel on both sides. Anyone have an explanation as to what is going on.
What is your program doing to control the drive motors? Are the encoder readings used to compute the commanded motor power?
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