How can I control a 5V relay with the roborio, the DIO doesn’t seem to works
There’s the Relay pins on the RoboRIO, that you can control with the Relay class in WPILib.
2 Likes
Those pins won’t run a high amperage relay, FYI. Check your current ratings!
A Spike relay will play well, if you have one.
To clarify for OP - the roboRIO relay ports are themselves “light-duty” relays that can switch small loads. Typically you want to switch more load and that can be done by switching another heavy load relay as the OP suggests. For example, you can get a solid state 65A relay that requires only 30mA input that the roboRIO can easily provide.
1 Like
If you find a relay which includes an optocoupler (search for optocoupler relay), there are very good odds it will work (but double check the input voltage and current specs to be sure).
1 Like