Go to Post So many possibilities so many different meanings and soo many different opinions. LOL but i guess this is what FIRST is all about. - Bcahn836 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-02-2012, 12:34
alb4h alb4h is offline
Registered User
FRC #3862
 
Join Date: Dec 2011
Location: MO
Posts: 27
alb4h is an unknown quantity at this point
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

Last edited by alb4h : 05-02-2012 at 12:46.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2012, 17:54
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: encoder problems......

Quote:
Originally Posted by alb4h View Post
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?
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2012, 18:52
alb4h alb4h is offline
Registered User
FRC #3862
 
Join Date: Dec 2011
Location: MO
Posts: 27
alb4h is an unknown quantity at this point
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)
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2012, 19:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: encoder problems......

Quote:
Originally Posted by alb4h View Post
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2012, 00:15
alb4h alb4h is offline
Registered User
FRC #3862
 
Join Date: Dec 2011
Location: MO
Posts: 27
alb4h is an unknown quantity at this point
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
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2012, 20:52
msheffels msheffels is offline
Registered User
AKA: Mike
FRC #2498 (Bearbotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Minneapolis
Posts: 3
msheffels is an unknown quantity at this point
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!
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2012, 21:21
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: encoder problems......

Wow great diagnosis Alan! :-O
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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