Team2168 / 2014_Main_Robot

Code for the 2014 FRC season.
Other
2 stars 1 forks source link

Auto reload command problems #90

Open jcorcoran opened 10 years ago

jcorcoran commented 10 years ago

The following observation was made tonight (4/1/14) while operating the practice chassis. While the auto. fire/reload sequence was running, the winch would stop somewhere along its travel downwards during the reload sequence. Both winch motors tested out independently to be operating correctly.

The only thing which should stop this command prematurely is if the winch limit switch is hit. Is it possible that the DSC bus voltage dips low enough to trigger a state change on the digital input for the limit switch?

If this is in fact what is happening, the tusks should retract while the intake is still raised, as that's one of the steps which occur after the winch has been lowered all the way. I can't remember if that was happening or not.

The conditions under which this was repeatable:

If this is in fact a problem with the bus voltage dipping, we should add a capacitor across the 5V rail on the DSC? or possibly just require multiple consecutive reads of the sensor to indicate the switch is pressed before stopping the winch wind sequence.

Also, something that was observed tonight, which may or may not be related, but it appeared as though in some cases the winch was wound all the way down and that it was stalling out and not progressing on to the next step in the reload sequence (the winch retracted limit switch wasn't indicating that it was pressed?). This was observed because there was a noticeable time delay after the winch had finished lowering all the way, and the tusks actually retracted. Also, speed of the drivetrain was affected (indicating the winch motors were stalling).

NotInControl commented 10 years ago

Did we determine the cause of this to be failed motors in the winch where a single motor was operating and could not pull the winch down all the way? Can this issue be safely closed?

Do you think further investigation is needed?

The second part to this failure was an imporperly mounted limit switch.

jcorcoran commented 10 years ago

No, this likely still exists, the mounting of the switch has nothing to do with this issue. A failed motor may help to produce this issue but is not the cause.

Debug statements should be added to the code to see if we get premature/intermittent switch closures prior to the winch being lowered all the way.

NotInControl commented 10 years ago

We can add an "alarm" print statement in the winch lower command that prints if the limit switch is true while the catapult angle is greater than -15 degrees or something like that. I don't think this is something we will be able to reliably reproduce.

Other than that, I believe the solution to this probelm can not be realized by a code modification and is not a software issue. Do you disagree?

Remember, we did change the limit switch on the winch after this date, the one on the winch during these observations I confirmed to be faulty. It may be a good idea to add the capacitors even if we determine voltage brownouts are the issue. However, I believe it is least likely.

jcorcoran commented 10 years ago

I was able to reproduce this problem multiple times (see original bug report). I didn't see what was wrong with the limit switch that was replaced, but this failure only ever happened while the robot was under high load with low bus voltage. a limit switch failure seems to be an unlikely explanation to the behavior observed.

I agree this isn't high priority, and likely isn't a software problem. Until it's investigated further and resolved, it should remain an open issue so that we have a means of tracking it. We don't know for fact that this isn't software related until further investigation.

We didn't run into this problem at NE CMP, but we are usually running with a fresh battery for a short duration. I would expect to see this problem present itself more frequently during driver practice sessions, where a single battery is used for long durations.

jcorcoran commented 10 years ago

Saw this happen again in the pits at CT Champs. Battery was one of the NFC ones, but it was around 12VDC, tried to cause it to happen again on the same battery, ran compressor and wheels (off ground), while reloading, couldn't get it to happen again.