We’re testing out a limit switch and at seemingly random times when it’s pressed, all the wheels on the robot (including on an arm) turn on. We replaced the sidecar to see if there was a short in it but no such luck, it still bugged. Any ideas what may be going wrong?
How did you wire the limit switch? I would guess you wired 5v to it, and are shorting the sidecar when it is pressed. You should wire the signal and ground.
Try replacing the ribbon cable between the sidecar and the digital module on the cRio
Update: the switch seems to control the power to the components–when it’s not pressed, the light is off and nothing can be controlled
It’s highly likely that you have the 5v+ and ground wired to the normally closed pins/terminals of the switch. This will short the DCS and prevent it from working. Take a look at the DSC’s documentation for the correct wiring example.
The good news is this is a pretty easy fix and the DSC’s power supply components are pretty hardy, so you probably haven’t done any lasting damage.
Thanks Joe Ross! That was our problem! We are forever grateful!
*Cut the red wire! No, not the red wire, the blue one. Too late, I cut it. *
- reference to every Hollywood movie with a bomb-defusing scene.
Most of us get so used to wiring things up with PWM cables, that we think we need to use all three wires.
Passive limit switches, like the ones in the KOP, and any that are just a set of contacts, only need two wires to operate.
One is your common, which is the black wire. No surprise there.
The other is the white wire, which goes to the signal input on the DIO input. The DIO inputs are forced (“pulled”) to 5v internally to the Digital Sidecar, so that with nothing connected, or an open circuit, they read a “high” or logical 1.
To make them “low” or 0, the input needs to be brought to 0v or “common.” Shorting the white and black wires through the switch contacts will do this.
There is no need for the red wire, as the input is already connected to it through a current limiting resistor inside the DS.
The only reason to use the red wire on a DIO would be if you had an active sensor that operated off of 5v, such as a photoeye or proximity switch. Most require a higher voltage for operation, though.
If you are not using 5 volts in this application, you may cut the red wire, preferred at the DSC end of your PWM and insulate the cut wire with voltage on it. If you short this 5 volt line, the DSC gets very unhappy.