This is our first year using an electric solenoid. We are using the sealed linear solenoid at 12V. How do you control this in code? I can’t seem to find any examples of using this type of solenoid. We are using java. Solenoids are only used for unlocking our climb, motors are used to control our climb.
What device are you using to electrically control it? Spike, automation direct relay, PDH switched channel?
Edit: It’s not legal to use a PDH switched channel to control an actuator, see the post by Nuttyman54 below.
A PDH switched channel
Create a PowerDistribution object and use the setSwitchableChannel function: PowerDistribution (WPILib API 2024.2.1)
Thank you so much
I don’t believe it is legal to control a solenoid from the PDH switchable channel per R504:
R501 defines electric solenoids as actuators.
Whoops! You’re quite correct, I missed the “non-actuator” statement. @AlexT321 you will need to use one of the legal relay options instead of the PDH switched channel to control the solenoid.
Thank you! I will notify my mech team about this
Legal relays don’t give you many options. There’s the automation direct relays or the old Spikes which are not something you can order.
Normal Arduino relays are not legal.
Spike H-Bridge Relay (P/N 217-0220 and SPIKE-RELAY-H), b. Automation Direct Relay (P/N AD-SSR6M12-DC-200D, AD-SSRM6M25-DC-200D, ADSSR6M40-DC-200D)
Instead of switching the power on and off from the PDH, my team used a VictorSPX motor controller (we had lots lying around from old tank drives) to control it. It gives a signal -12-12v and is pretty easy to control in the code.
Right now, we’re only using the solenoids to unlock our climb mechanism, so all we need is a way to give it power. We’re controlling the actual climb with motors. Are legal relays enough for that?
All depends how much force is needed to overcome the friction of the lock, but more than likely yes especially if it’s a larger solenoid. This year the wattage limit was increased so stronger ones are legal
I’ll second this. May not be the most intended use of a Motor Controller, but it would allow you to control the solenoid via CAN rather than having to wire up the relay directly to the RIO. You’d just wire the solenoid to the output of the Motor Controller and use -1, 0, 1 as the “speeds” for an easy -12v, 0v, 12v across your solenoid. (You’d probably only need -1 if your solenoid isn’t some kind of spring-return or something)
Oh! I will also note that according to R505, you can power electric solenoids off the Pneumatics controllers. Though in this case, I don’t think it will supply enough current. Still good to know!
R505 *Don’t overload controllers. Each power regulating device may control electrical loads per Table 8-2.
Unless otherwise noted, each power regulating device shall control 1 and only 1 electrical load.
Those can usually only output about 200 mA per channel. This solenoid is 24W at 12V, so it will need about 2A.
Edited! Leaving it since its still good info for someone who potentially finds the thread in the future for a lower-power solenoid.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.