Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Encoders on Drive Train DON'T WORK. (http://www.chiefdelphi.com/forums/showthread.php?t=105661)

Ether 14-04-2012 21:58

Re: Encoders on Drive Train DON'T WORK.
 
Quote:

Originally Posted by JamesTerm (Post 1158037)
http://www.usdigital.com/first

This link shows 166 rps...

For the E4P, the maximum output frequency is 60 kHz (60,000 cycles per second). A 360 CPR encoder produces 360 pulses on each channel per revolution. To solve for how fast the encoder's shaft must turn per second to reach the maximum output frequency, divide the maximum frequency by the pulses per revolution. 60,000 / 360 = 166 revolutions per second. To convert to RPM multiply by 60 (10,000 RPM).

That's an encoder limit. I'm talking about the FPGA.

This is from WPILib Encoder class:

Code:

/**
 * Common initialization code for Encoders.
 * This code allocates resources for Encoders and is common to all constructors.
 * @param reverseDirection If true, counts down instead of up (this is all relative)
 * @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X decoding. If 4X is
 * selected, then an encoder FPGA object is used and the returned counts will be 4x the encoder
 * spec'd value since all rising and falling edges are counted.
If 1X or 2X are selected then
 * a counter object will be used and the returned value will either exactly match the spec'd count
 * or be double (2x) the spec'd count.
 */



JamesTerm 14-04-2012 22:37

Re: Encoders on Drive Train DON'T WORK.
 
Quote:

Originally Posted by Ether (Post 1158041)
That's an encoder limit. I'm talking about the FPGA.

Ah ok, good to know... In the RateDump1.txt attachment I posted earlier even the slower 10rps speeds were exhibiting the symptom using GetRate()... And using the GetDistance() technique any rps showed the symptom (e.g. turning by hand).

Michael Blake 15-04-2012 13:28

Re: Encoders on Drive Train DON'T WORK.
 
Here is the encoder we are using:

http://www.andymark.com/product-p/am-0174.htm

remulasce 15-04-2012 14:14

Re: Encoders on Drive Train DON'T WORK.
 
Have you ensured you have wired it correctly? Can you get your two robots together and plug the known good encoders into your new robot, and vice versa, to test where the difference lies?

Matthew Blake 15-04-2012 14:46

Re: Encoders on Drive Train DON'T WORK.
 
Quote:

Originally Posted by Mark McLeod (Post 1157965)
Another thing to look for with the Kit encoders is extra play in the encoder shaft. If the shaft can be push/pulled even a little bit, then the encoder discs can shift into and out of range to disrupt your readings.

The problem is not that we have wonky readings, but that we have none at all. We either have readings from the left side and none from the right side, or readings from the right side but none from the left side.

Quote:

Originally Posted by slijin (Post 1157985)
Just to clarify, "ds" here refers to the digital sidecar here, right? (In my experience, DS is used for the Driver Station and DSC for the digital sidecar). It's probably not your problem, but was your ribbon cable checked and fixed correspondingly?

Yes, ds is digital sidecar, and the ribbon cable was checked and fixed (Victor's weren't blinking).

Quote:

Originally Posted by slijin (Post 1157985)
What, if anything, did you change to switch which encoder you can read data from?

We switched out what we thought was a faulty encoder on the drive train after we were only getting readings from one encoder at a time by switching the wires only at the encoder, not on the ds.

Quote:

Originally Posted by slijin (Post 1157985)
Were they the ones received in the KoP this year or from AM FIRST choice? If the answer is yes to either, then you're using the E4P encoder with a 360 CPR wheel.

http://www.andymark.com/product-p/am-0174.htm


Quote:

Originally Posted by Bongle (Post 1157986)
Is your digital sidecar fully powered?
We had a very similar problem, but with PWM outputs in the offseason - we could power one side of the 2011 robot or the other side, but it would fail if we tried to drive all 4 drive motors. It turns out the DS can draw enough power from the data cable to power up to 3 PWM outputs, but once you try for 4 it fails. Once we figured out the power problem, everything worked. Maybe this failure mode applies to the digital inputs too?

Don't think so, as we have had 4 working encoders before earlier in the season and both sides of the drive train (2 CIMS on each side) works great.

Quote:

Originally Posted by remulasce (Post 1158243)
Have you ensured you have wired it correctly? Can you get your two robots together and plug the known good encoders into your new robot, and vice versa, to test where the difference lies?

The encoder wires we are using for the drive train are soldered together the same way the encoder wire for our shooter is, which works. (1 PWM white-yellow, the other PWM black-brown, red-orange, and blue-white) We have even replaced one of the encoder wires that we believed was faulty with no results.

JamesTerm 21-04-2012 00:22

Re: Encoders on Drive Train DON'T WORK.
 
We solved quite a few mysteries tonight, and I figure I should share here in case anyone else happens to find yourself in a similar situation.

We were able to work with the shooter encoder and work out the following:
1. The shooter encoder itself worked, but was damaged and impacted its reading (I'll address this in more detail in thread 103631)... we fixed the damage and with this good connection determined several points of failure:

2. Determined all 3 wires (2 drive, one shooter) all valid
3. The encoder on the right driver side does not work period (defected)
4. Slots 1-4 and 9-12 all do not work on the digital side car

I left at the moment we swapped the dsc, so hopefully tomorrow we'll be able to work this out. Thanks everyone for your help and be sure to go over to 103631 for the shooter as I believe this will impact more people if their shooter vibrates a lot like ours.

Alan Anderson 21-04-2012 17:21

Re: Encoders on Drive Train DON'T WORK.
 
Quote:

Originally Posted by JamesTerm (Post 1160747)
4. Slots 1-4 and 9-12 all do not work on the digital side car

That sounds like you might have a faulty cable between the cRIO's DIO module and the Digital Sidecar. Is it a Kit of Parts ribbon cable that you reworked? It's not hard to put it back together with some of the pins not quite connected.


All times are GMT -5. The time now is 05:49.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi