Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   encoder problems...... (http://www.chiefdelphi.com/forums/showthread.php?t=102033)

alb4h 05-02-2012 12:34

encoder problems......
 
We are having a problem that occurs when plugging in an encoder.

The encoder is wired into 2 digital I/O ports on the digital sidecar, with careful attention made to plugging in gnd and signal to one port and 5v and signal to other port. The problem occurs even when plugged into any 2 ports.

With the encoder wired, when the code is enabled, and in teleop mode, the motors start to run, with no joystick input.
With the encoder unplugged, everything works as expected, with no movement until the joystick is moved.

We are using C++ and this happens even when deploying the FRC Default Program (current with imaging tool), which when loaded into workbench is titled BuiltinDefaultCode.
That code does not explicitly reference digital input ports or the encoder classes at all.
Why does hardware plugged into the digital I/O ports effect the motor control?

I'm confused.......

Ann

Alan Anderson 05-02-2012 17:54

Re: encoder problems......
 
Quote:

Originally Posted by alb4h (Post 1120400)
Why does hardware plugged into the digital I/O ports effect the motor control?

It shouldn't.

The only thing I can think of is that maybe your Digital Sidecar is having power issues and the PWM signals are losing integrity. Are the BATT and +5v LEDs lit?

alb4h 05-02-2012 18:52

Re: encoder problems......
 
He +5V LED is solid green and the BATT led seems to be lit as well but it quite dim and with a slight pulse (not quite a flash)

Alan Anderson 05-02-2012 19:02

Re: encoder problems......
 
Quote:

Originally Posted by alb4h (Post 1120598)
He +5V LED is solid green and the BATT led seems to be lit as well but it quite dim and with a slight pulse (not quite a flash)

That sounds like you don't have 12 volts being supplied to the Digital Sidecar. Can you measure the voltage on its power connector? Make sure you haven't accidentally captured the insulation instead of the conductor in the red and black Wago terminals from the Power Distribution Board.

alb4h 06-02-2012 00:15

Re: encoder problems......
 
You win the prize! The sidecar has a short. The hardware folks will have to replace it tomorrow.

Thanks for your help!
Ann

msheffels 13-02-2012 20:52

Re: encoder problems......
 
Our team found out about shorting the digital sidecar this year too. One of them accidentally shorted the PWM signal for a Victor controller to the +12 V power on the Victor. All of the motors on the robot activated momentarily. Scratch one digital sidecar.

Lessons learned:

1) power down the robot before messing with the wiring.

2) Even though FIRST has done a lot to make the control systems safe, there are still failures that can cause the robot to behave unexpectedly. Always make sure everyone that is anywhere near the robot is paying attention whenever you power it up!

bob.wolff68 13-02-2012 21:21

Re: encoder problems......
 
Wow great diagnosis Alan! :-O


All times are GMT -5. The time now is 13:33.

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