View Single Post
  #2   Spotlight this post!  
Unread 24-01-2016, 02:23
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 264
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Action of kOff in DoubleSolenoid

Quote:
Originally Posted by viggy96 View Post
Does anyone know if setting a DoubleSolenoid to kOff closes both valves? I wanted to use that in conjunction with some flow control valves to provide more minute control over the position of the piston.
No, it does not (but keep reading). A "double" solenoid is mechanically the same as a "single" solenoid (e.g. it has one valve). The difference is only in how that valve is actuated.

A "single" solenoid has one electromagnetic coil, which when energized, actuates the valve in one direction; when de-energized, a spring return pulls the valve back in the other direction.

A "double" solenoid, on the other hand, has two electromagnetic coils, combined with passive magnetic latches. Energizing one coil actuates the valve in that direction. De-energizing that coil (once the valve has actually transitioned) results in no valve movement due to the magnetic latch. Energizing the other coil actuates the valve to the other direction.

In software, the Solenoid and DoubleSolenoid classes essentially follow this methodology. The Solenoid class commands a single coil (e.g. output), while the DoubleSolenoid commands two coils (outputs). Note that the DoubleSolenoid class is basically a convenience class.. it's possible to do the same thing with two Solenoid classes. In the DoubleSolenoid class, the effect of kOff is to de-energize both outputs (coils). If the two outputs are connected to a double solenoid valve, this results in no movement of the valve (presuming the previously energized coil was energized for a sufficiently long period of time to actuate the valve to the new position).

It is possible to pulse width modulate a solenoid coil (by alternatively energizing and de-energizing the coil) to "flutter" the valve and effectively result in an intermediate amount of air flow. This was done by a number teams in 2014 to control their pneumatic shot force, although it may be more difficult to achieve in the PCM compared to the cRio. I think this is most easily done with a single solenoid as you can rely on the spring return rather than energizing the opposite coil.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)

Last edited by Peter Johnson : 24-01-2016 at 02:28.