View Single Post
  #2   Spotlight this post!  
Unread 10-03-2013, 21:34
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Detecting digital inputs

Ideas:

-Wire between DSC 5v/6v to spare ADC channels to check for voltage supply issues. We do this with the analog 5v supply (with a jumper in ADC 7 between 5v and sig), and could do this with digital 5v supply if we wanted to (6v only makes sense if you use servos or vex motors). The NI ADC card will measure +-10v, so you can connect 6v directly.

-It might be possible to measure the voltage on a DIO pin set to input mode to measure the strength of the pull-up resistor on that pin. A failure upstream of that specific resistor (such as the power supply capacitor in this case) could be detected by measuring a spare pin

-You could jumper two digital pins, one in input and another in output and see if changing the output changes the input. However, this would work even if the pull-up resistors fail, which is likely the fault you saw.
--You can also use a Relay output and digital input, they are low-speed DO's on shift registers (shifted every 5ms).

For encoders, you can do rationality checks based on assumed noise vs expected motion:
-If abs(applied motor power) > 0.1 and count delta for this loop < cal increment error counter for that sensor
-else decrement error counter
-if error counter > error thresh cal then fault sensor
-if disabled reset counter
-if sensor faulted then determine limpin strategy (use other encoder if it's not faulted, ??? if both are faulted)
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack