|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
If your sample time is fast and stable enough that the encoder could never turn 180 degrees from one sample to the next, then "all ya gotta do" at each sample is assume the encoder turned through the shortest angle, and keep track of zero crossings.
|
|
#2
|
|||
|
|||
|
Re: pic: Small CIM in wheel swerve
Quote:
Since there's really never a need for analogTriggers save for this one strange case, that was broken too. Thank god for the fantastic people at WPI that got it fixed so quickly. I know sanddrag said that it worked well enough at competition, I have to say the headache caused by this is greater than he may have noted, and took a lot of time out of the season. It's generally just not a good idea to do incremental sensing of anything if it is at all possible to have absolute sensing. Zeroing sensors are a must. |
|
#3
|
|||||
|
|||||
|
Re: pic: Small CIM in wheel swerve
Quote:
We never have to manually zero sensors, there are no magic numbers in code, and we know we can replace a sensor/system at any time with no new work required. Every position system 973 has ran all the way back to 2012 has been on an incremental sensor that assumes a zero at start (plus sometimes a manual or automated routine to hardstop zero). We always mean to add the zeroing sensors, but never do as the functionality isn't needed. |
|
#4
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: pic: Small CIM in wheel swerve
Quote:
However, if you are there are two likely causes. 1) Mechanical slip. Somehow the encoder is slipping, easy to fix w/ better design. 2) Voltage brownout causing the supply voltage to the encoders to drop out. We use a regulated supply for all of our encoders for this reason. |
|
#6
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Quote:
Adam listed two likely causes. A third, fourth, fifth, and sixth might be 3) using an encoder outside its operating range (edges per second), 4) a damaged encoder (dirty / scratched optical disk), 5) improperly assembled / mounted (optical disk alignment / concentricity), and 6) incorrect programming (resetting the counts rather than letting the FPGA accumulator run freely). Last edited by Ether : 09-05-2015 at 16:18. |
|
#7
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
I'm going to guess that #2 was our problem. I am surprised I've never heard of this issue before.
|
|
#8
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
If you could work out the incremental encoder setup, it would free you up to put a slip ring module at the top. That trade off would solve the motor wiring issue, and not restrict you to partial rotations.
|
|
#9
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Quote:
You begin by choosing an integer gear ratio for the encoder, because that will make things much easier. Then you mount the encoder or slip the gears so that when the full circle of the swerve is cut into slices of pie, one of the edges of a pie slice ends up facing true zero. Then you write software that takes that edge to be the zero for the match. So now, before each match you don't have to get the wheels perfectly aligned, you just have to aim it in the sector that is to one side of the zero position. It's just an idea, and maybe that was already blatantly obvious, or maybe its not useful, but I figured I would try to explain my idea so that I could at least find out if people though it was useful or not. Let me know If I need to try to explain it one more time. Quote:
(P.S. Thanks. Your post is much more constructive and helpful with the edit.) Last edited by Bryce2471 : 10-05-2015 at 14:17. |
|
#10
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Quote:
Quote:
Code:
/**
* Reset the Encoder distance to zero. Resets the current count to zero on
* the encoder.
*/
public void reset() {
if (m_counter != null) {
m_counter.reset();
} else {
ByteBuffer status = ByteBuffer.allocateDirect(4);
// set the byte order
status.order(ByteOrder.LITTLE_ENDIAN);
EncoderJNI.resetEncoder(m_encoder, status.asIntBuffer());
HALUtil.checkStatus(status.asIntBuffer());
}
}
|
|
#11
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Deleted
Last edited by bobcroucher : 10-05-2015 at 15:32. Reason: Posted in wrong account. |
|
#12
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
Oh, I see what you mean now. Although I have never heard of that issue before, we were not reseting the counts each cycle. We only reset them when necessary.
|
|
#13
|
|||
|
|||
|
Re: pic: Small CIM in wheel swerve
Which slip ring would you use? Mercotac's are banned.
Last edited by Dunngeon : 11-05-2015 at 00:19. |
|
#14
|
|||||
|
|||||
|
Re: pic: Small CIM in wheel swerve
I was thinking of a custom solution when I suggested a module no taller than the wheel diameter. A quadrature encoder or a CAN controller wired in the traditional method would require 6 wires. Is it possible to make a CAN talon work with only two control wires that branch a bit away from the talon? If so, you could reduce the connection to four wires, if you could figure out a place to park the talon on the far side of the sliprings with the motor, gearbox, encoder, and wheel.
|
|
#15
|
||||
|
||||
|
Re: pic: Small CIM in wheel swerve
There are quite a few Gold on Gold, or Silver on Silver contact designs that don't contain Mercury. The Wind turbine industry has lots of low cost high current options.
http://www.amazon.com/Sunwin-Wires-2...ords=Slip+ring Company Specs http://www.moflon.com/mw.php?a=1 Just one option, lots of other low cost (no-mercury) models. Moog would be nice, but really expensive. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|