View Single Post
  #3   Spotlight this post!  
Unread 18-02-2007, 21:14
Bochek's Avatar
Bochek Bochek is offline
Registered User
AKA: Adam Bochek
FRC #2200 (MMRambotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Burlington, Ontario, Canada
Posts: 577
Bochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud ofBochek has much to be proud of
Re: Contorl Solenoid direct from computer

Quote:
Originally Posted by RKElectricalman View Post
actually you can control a double solenoid with ONE spike as opposed to, two. All you need is two rectifier Diodes, and the double solenoid (along with some crimps, wire cutters, blah, blah, blah)

the double solenoid has two 12volt coils on it (I hope).. so take a red from one side, and a black from the other side and crimp them together.. Then take the left over black and red, strip the wire, and solder the diodes to each wire. Make sure they are in opposite direction as well. On the diode,the side with the line on it should be soldered on the black wire coming from the double solenoid and another diode should have the red on the non-lined side.. (*note* - this is backwards because the current is coming from the other side) ... Then solder some wire onto the other side of the diodes, strip that wire, and crimp it together. Personaly I put the side with diodes on M+ and then non diode side on M-. You save weight, and also simplfy program by use of only one relay.

if this is Relay1 and you only want it on when the button is depressed then.... If (p1_sw_trig ==1) {
relay1_fwd = 1;
relay1_rev = 0;
}

else {
relay1_fwd = 0;
relay2_rev = 1;
}

so you save weight and code is simplified :-)

good luck

you dont even need the diodes, they have them built in, just hook one up backwards and your good to go.

- Bochek
__________________
-----------------------------------------------
Adam Bochek - FRC 2200
http://www.mmrambotics.com
http://www.watchfirstnow.com