Go to Post -Our engineering mentor, Mr. Wittel- *crossing arms and sitting down* "Ahhh. I love work. I could watch it all day." - OverdriveAdge [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-06-2013, 23:00
tyler34 tyler34 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Michigan
Posts: 11
tyler34 is an unknown quantity at this point
Trouble with limit switches

So basically we can't get a change in value when the limit switch is pressed.

We have one end of the limit switch wired to signal and the other to ground on the Digital Inputs on the Digital Sidecar.

We are using Java for our programming.
Heres the code pulled out from robotInit and teleopPeridodic:
Code:
private DigitalInput limit; 
limit = new DigitalInput(1);        
System.out.println("ingest switch: " + limit.get());
We tried connecting the ground a signal wires together without the limit switch, tried different cables, and different ports. Nothing seems to work.

If someone has any idea on what to try it would be helpful.
We are gonna try a new digital sidecar tomorrow and see if that works.
  #2   Spotlight this post!  
Unread 18-06-2013, 00:44
Teamcodeorange's Avatar
Teamcodeorange Teamcodeorange is offline
Registered User
FRC #3476
 
Join Date: Jan 2011
Location: US
Posts: 236
Teamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant future
Re: Trouble with limit switches

One symptom of a broken ribbon cable is bad I/Os. Do a continuity test on each of the pins. This exact thing happened to us and cost over an hour at competition.
__________________
Try Code Orange's electronics tutorials!
---------------------------------------------------------
2015 - Tesla Division Champions
2015 - Inland Empire Engineering Inspiration Award
2015 - San Diego Regional Chairman's Award
2014 - San Diego Regional Chairman's Award
2013 - Newton Division Champions
2012 - San Diego Regional Winners
  #3   Spotlight this post!  
Unread 18-06-2013, 07:56
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: Trouble with limit switches

Measure the voltage on the DIO signal pin. It should change when you flip the switch.

Is the Digital Sidecar correctly powered? The 5V light needs to be shining bright in order for the inputs to work.
  #4   Spotlight this post!  
Unread 18-06-2013, 11:31
androb4's Avatar
androb4 androb4 is offline
..is trying to take this year off.
AKA: Andrew A.
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2003
Location: Houston, TX
Posts: 220
androb4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to behold
Re: Trouble with limit switches

Quote:
Originally Posted by tyler34 View Post
We have one end of the limit switch wired to signal and the other to ground on the Digital Inputs on the Digital Sidecar.
It's not working because you are supposed to connect the switch to SIG and POWER.
__________________
FRC 441 Mentor 2012-2015
FRC 441 Alumni 2009-2012
FTC 4673 Alumni 2011-2012
FRC 1484 Alumni 2006-2008

  #5   Spotlight this post!  
Unread 18-06-2013, 11:36
tyler34 tyler34 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Michigan
Posts: 11
tyler34 is an unknown quantity at this point
Re: Trouble with limit switches

Quote:
Originally Posted by Alan Anderson View Post
Measure the voltage on the DIO signal pin. It should change when you flip the switch.

Is the Digital Sidecar correctly powered? The 5V light needs to be shining bright in order for the inputs to work.
The 5V light was lighting up like it should be.

Quote:
Originally Posted by androb4 View Post
It's not working because you are supposed to connect the switch to SIG and POWER.
Everywhere I've looked says to connect ground to signal, so I'm not sure that is correct. Connecting the power to signal doesn't do anything either anyways.

Quote:
Originally Posted by Teamcodeorange View Post
One symptom of a broken ribbon cable is bad I/Os. Do a continuity test on each of the pins. This exact thing happened to us and cost over an hour at competition.
We have other IO pins being used with encoders that are working perfectly fine. Whenever we try to use a limit switch on any of the pins, it doesn't work. I can try a new ribbon cable later today and see if that works.

Last edited by tyler34 : 18-06-2013 at 11:40.
  #6   Spotlight this post!  
Unread 18-06-2013, 11:43
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Trouble with limit switches

Quote:
Originally Posted by androb4 View Post
It's not working because you are supposed to connect the switch to SIG and POWER.
That's not correct. The digital sidecar has a pullup to 5v on the signal line. Connecting a switch between signal and power means that signal will never change from 5v. You need to connect the switch between signal and ground, so that signal will switch from 5v (when open) to ground (when closed).

I also guess that something is wrong with power. Follow Alan's suggestions.
  #7   Spotlight this post!  
Unread 18-06-2013, 12:08
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,753
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Trouble with limit switches

Quote:
Originally Posted by tyler34 View Post
The 5V light was lighting up like it should be.



Everywhere I've looked says to connect ground to signal, so I'm not sure that is correct. Connecting the power to signal doesn't do anything either anyways.



We have other IO pins being used with encoders that are working perfectly fine. Whenever we try to use a limit switch on any of the pins, it doesn't work. I can try a new ribbon cable later today and see if that works.
Some thoughts:
1. Double and triple check the code to make sure you aren't assigning something else to that pin as well.
2. Try creating a whole new software project that has nothing in it but the limit switch code, to make sure you aren't running into any issues with other stuff interfering.
3. Unplug your limit switch and verify it's working as intended - use a multimeter to measure resistance between the two pins on the PWM connector - you should see the resistance value switch between infinite and 0 ohms when pressing the switch (as for which one is which, that's up to how it's wired - normally connected or normally open).
4. Check the LED's on the DSC - all three should be brightly lit (5V, 6V and Power), and you should see the RSL working correctly.
5. Take spares of other parts (DSC, DSC-cRIO cable, etc) and swap them out to make sure the problem isn't in one of them.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
  #8   Spotlight this post!  
Unread 18-06-2013, 12:40
androb4's Avatar
androb4 androb4 is offline
..is trying to take this year off.
AKA: Andrew A.
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2003
Location: Houston, TX
Posts: 220
androb4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to beholdandrob4 is a splendid one to behold
Re: Trouble with limit switches

Quote:
Originally Posted by Joe Ross View Post
That's not correct. The digital sidecar has a pullup to 5v on the signal line. Connecting a switch between signal and power means that signal will never change from 5v. You need to connect the switch between signal and ground, so that signal will switch from 5v (when open) to ground (when closed).

I also guess that something is wrong with power. Follow Alan's suggestions.
Ooooowwh...it pulls up.
In my defense, I don't think I've used a custom digital input.
__________________
FRC 441 Mentor 2012-2015
FRC 441 Alumni 2009-2012
FTC 4673 Alumni 2011-2012
FRC 1484 Alumni 2006-2008

  #9   Spotlight this post!  
Unread 18-06-2013, 13:18
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,404
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Trouble with limit switches

Quote:
Originally Posted by Jon Stratis View Post
Some thoughts:
3. Unplug your limit switch and verify it's working as intended - use a multimeter to measure resistance between the two pins on the PWM connector - you should see the resistance value switch between infinite and 0 ohms when pressing the switch (as for which one is which, that's up to how it's wired - normally connected or normally open).
You can also use that same multimeter to measure the voltage potential on and across the limit switch while it's plugged in. If it's changing how you expect it to, you likely have a software problem. If it isn't changing, you likely have a wiring problem.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
Closed Thread


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 11:19.

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