Go to Post Does that mean that the Ultimate Question of Life, the Universe, and Everything is, "How many total tubes will be available to score for the FRC 2011 game, LogoMotion? - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 02-20-2016, 08:26 PM
StewEsho's Avatar
StewEsho StewEsho is offline
Programmer
FRC #4940 (KnightVision Robotics)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Windsor, Ontario, Canada
Posts: 3
StewEsho is an unknown quantity at this point
Limit switches are always on.

Our team is having a difficult problem with the limit switches. While they used to work, earlier today they stopped working correctly and always returned a "true" value, regardless of whether they were pressed or not. We tries rewiring in every possible way, we tried adding the most basic limit switch code into a sample program, we tried looking online for solutions, but nothing works. Does anyone know what the problem could be?

Information
Here is the source code for the sample program we tried running (comments and all):
https://gist.github.com/StewEsho/68871eb0a2c541ee2b07

Here are the images of the wiring (just looking at the wire for the switch in port 1, but all switches have similar problems):
http://imgur.com/a/c02fV

When testing, we tried printing the outputs from all ten ports, even the ones with nothing plugged in, and they all returned "true".

Shortly before this problem arose, we couldn't run the robot and the driver station said "Brownout Error". We were forced to power cycle the robot to continue use. Could this possibly be related to our issue?

All other motors, speed controllers, and encoders work perfectly fine.


Thank you in advance for your time and your help!
Reply With Quote
  #2   Spotlight this post!  
Unread 02-20-2016, 08:35 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,999
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Limit switches are always on.

Quote:
Originally Posted by StewEsho View Post
Our team is having a difficult problem with the limit switches. While they used to work, earlier today they stopped working correctly and always returned a "true" value, regardless of whether they were pressed or not.
Have you tried unplugging the limit switches and testing them with a multimeter?


Reply With Quote
  #3   Spotlight this post!  
Unread 02-20-2016, 08:40 PM
StewEsho's Avatar
StewEsho StewEsho is offline
Programmer
FRC #4940 (KnightVision Robotics)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Windsor, Ontario, Canada
Posts: 3
StewEsho is an unknown quantity at this point
Re: Limit switches are always on.

Yes, we tried using a multimeter and the switches seemed to work just fine.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-20-2016, 08:51 PM
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,886
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: Limit switches are always on.

The inputs pull high (true) when not connected. You need to ground the signal to make it false. The switch should be connected to the white and black.
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
  #5   Spotlight this post!  
Unread 02-20-2016, 09:24 PM
StewEsho's Avatar
StewEsho StewEsho is offline
Programmer
FRC #4940 (KnightVision Robotics)
Team Role: Programmer
 
Join Date: Oct 2014
Rookie Year: 2014
Location: Windsor, Ontario, Canada
Posts: 3
StewEsho is an unknown quantity at this point
Re: Limit switches are always on.

Yes, that solved the problem. Thank you so much!
Reply With Quote
  #6   Spotlight this post!  
Unread 02-21-2016, 09:05 PM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,999
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Limit switches are always on.

Quote:
Originally Posted by StewEsho View Post
Our team is having a difficult problem with the limit switches. While they used to work, earlier today they stopped working correctly
Quote:
Originally Posted by FrankJ View Post
you need to ground the signal to make it false. The switch should be connected to the white and black.
Quote:
Originally Posted by StewEsho View Post
Yes, that solved the problem. Thank you so much!
So... someone on your team played a prank and changed the wiring while you weren't looking?


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 09:00 AM.

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