Log in

View Full Version : Use positive signal to trigger digital input


tgross35
14-02-2015, 22:52
Hello everyone,

My electronics team and I are having some trouble figuring this one out: how do you use a positive input to trigger a digital input on the roboRIO? The sensor we intended to use has a positive digital signal. We thought that it might be easier to just control the sensors to an Arduino (which we have it working through currently) then have three possible digital outputs based on calculations the Arduino does, but same problem here. Could anybody help us out with either how to use a positive input or interface an Arduino with the RIO? Thanks,

T

SousVide
14-02-2015, 23:31
Are you looking to detect a change from 0v to +5v on a line on one of the DIO's ?

http://wpilib.screenstepslive.com/s/4485/m/13809/l/241867-switches-using-limit-switches-to-control-behavior

tgross35
15-02-2015, 00:41
Are you looking to detect a change from 0v to +5v on a line on one of the DIO's ?

http://wpilib.screenstepslive.com/s/4485/m/13809/l/241867-switches-using-limit-switches-to-control-behavior

That is what I am looking to do but by default they detect a change from 0V to -5V. I couldn't find anything on that link about how to make that change and I'm somewhat thinking I would have to wire in a not gate chip to make that work.

rich2202
15-02-2015, 06:17
You short the signal wire of the switch to ground through a resistor.

When the switch is open, the signal is shorted to ground, and thus reads 0 volts.

When the switch is closed, power flows from the switch to the roboRio and it sees +5 volts.

The value of the resistor you use is dependent upon your switch. If you can't find anything in the spec sheet of the switch, try starting with 10K ohms, and work down from there.

I think the RoboRio pulls the signal line to +5 through an internal resistor, and that is what you need to overcome.

Alan Anderson
15-02-2015, 12:09
The sensor we intended to use has a positive digital signal.

What kind of sensor? What voltage is the signal? If it's a 5 volt output, it should connect to the roboRIO's DIO pins without any problems. A part number for the sensor you're talking about would help a lot.