|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
we currently have a didgital limit switch wired to that it's normally open and we've wired it in to our kicker system but when we tested the limit switch it doesn't seem to work right. can someone possibly post a link to a wiring diagram....... much thanks from team 818
![]() |
|
#2
|
|||||
|
|||||
|
Re: wiring the 2010 digital limit switches
One wire from the limit switch goes to signal on a Digital Input on the Digital Sidecar.
One wire from the limit switch goes to ground on a Digital Input on the Digital Sidecar. |
|
#3
|
||||
|
||||
|
Re: wiring the 2010 digital limit switches
What Mark said... if you post a picture of your wiring, we may be able to see what the issue is.
|
|
#4
|
|||||
|
|||||
|
Re: wiring the 2010 digital limit switches
If you actually mean "it dosen't work right" instead of just "it dosen't work at all", maybe its a simple software thing you overlooked.
All inputs on the DSC are pulled high. That means when unconnected, they will be 1 and not 0. Since you have the limit switch wired NO, between GND and SIG, when the switch is not pressed it will be 1. Then when it is pressed it will be 0. If you are wiring this to a PWM cable, connect the White and Black wires to the COM and NO on the limit switch. Put something on the black wire so it dosen't touch anything, electrical tape works. It dosen't matter which way you insert it or what wire goes to what because the circuit is either made or broken between the outer two pins. How are you reading it in software? |
|
#5
|
|||
|
|||
|
Re: wiring the 2010 digital limit switches
Visuals are always awesome!
![]() So here's the explanation... NC = Normally Closed NO = Normally Open When you push the switch, it disconnects COM and NC and connects COM and NO. Otherwise, NC and COM are connected. The Digital Sidecar has something called "Internal Pull-ups". This means that when the signal wire (the white one) isn't connected to anything, it will read logical true. However, when you push the switch, the connection to ground (the black wire) overrides this internal pull-up and pulls it to logical false. The heatshrink on the red wire is to prevent any shorting. In reality, it's not a big deal, but it's safer that way. What does this mean for code? Well, here's some pseudocode to explain it: If limitSwitch is False Do what you're supposed to do when the switch IS triggeredElse Do what you're supposed to do when the switch is NOT triggeredI know it seems backwards, but you'll get used to it. If you need language specific help, feel free to message me (or post back, whatever you're most comfortable with). |
|
#6
|
||||
|
||||
|
Re: wiring the 2010 digital limit switches
Quote:
we are now trying to use the limit switch. However, do you know how to program it? Or where to find the file in WPILib. By the way, I'm using C++. THANKS |
|
#7
|
|||
|
|||
|
Re: wiring the 2010 digital limit switches
We have set up our robot exactly how you did this, wiring wise and then we had setup our limit switch exactly how the frcmastery.com video said to do it.
How we have our robot setup. - a kicker is pulled back(by a victor) until limit switch is pushed - victor then reverses until a limit switch 2 is pushed - then waits for a button to be pushed (and the kicker is released.(this is irrelevant)) We can't get step 1 to even happen. From everything we have looked up it looks good multiple tutorials past examples above examples. How do we get (this) to happen (when) (limitSwitch) is pushed? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wiring Switches to the PSoC board | Raj1977 | Electrical | 13 | 07-02-2010 23:24 |
| IEC 2010 limit switch wiring | captainking | Electrical | 1 | 02-02-2010 21:01 |
| Using Limit Switches with the Arm | iwin2000 | Programming | 3 | 18-02-2008 03:52 |
| Anyone got info on the new limit switches contest??? | waialua359 | General Forum | 1 | 18-02-2008 00:07 |
| Question about wiring digital switches. | DemonYawgmoth | Electrical | 3 | 08-02-2007 17:57 |