View Full Version : Double solonoids
Hey guys i have a question about the dual solonoid when your wiring it do you wire it to one spike or two spikes if its one spike how do you get it to extend and retract thanks:D!
ubermeister
06-01-2008, 16:58
Remembering from last year, I think you connect the two black wires from the solenoid to ground (anywhere, not on a spike), and the two red wires go to the two outputs on a spike. You only need one.
You can hook it to a single Spike. Look at the drawing in the attachment.
5928
For the programming, you would fire each solenoid by setting either side of the spike to 1. Ex:
//Start Compressor Code
relay8_fwd = !rc_dig_in18; //Turn on the compressor when the pressure sensor is closed
relay8_rev = 0; //Without this, the compressor might run backwards or might not run at all
//End Compressor Code
//Start Pneumatic Piston Code
if (p1_sw_top == 1) //If you press the thumb button on the joystick plugged into port one...
{
relay1_rev = 0; //Turn off the extend side of the solenoid
relay1_fwd = 1; //Turn on the retract side of the solenoid
}
if (p1_sw_trig == 1) //If you press the trigger on the joystick plugged into port one...
{
relay1_fwd = 0; //Turn off the retract side of the solenoid
relay1_rev = 1; //Turn on the extend side of the solenoid
}
//End Pneumatic Piston Code
With this code, you will plug the relay into relay port 1, the compressor into relay port 8, and the pressure sensor into digital i/o port 18.
team2061
06-01-2008, 17:17
YOU ONLY NEED ONE SPIKE. CHECK OUT THIS SPIKE MANUAL (http://ifirobotics.com/docs/spike-blue-guide-sep05.pdf)CHECK OUT FIGURE 2
LAST YEAR WE USED TWO BUTTONS ON THE JOY STICK, ONE FOR EXTENSTION AND THE OTHER ONE FOR RETRACTION BUT IM SURE YOU CAN PROGRAM IT SO THAT ONE BUTTON ON THE JOYSTICK EXTENDS AND RETRACTS THE CYLINDER.
I WAS THE PNEUMATICS SUB-GROUP LEADER LAST YEAR SO IF YOU HAVE ANY QUESTIONS FEEL FREE TO EMAIL ME.
You can hook it to a single Spike. Look at the drawing in the attachment. For the programming, you would fire each solenoid by setting either side of the spike to 1. Ex:
//Start Compressor Code
relay8_fwd = !rc_dig_in18; //Turn on the compressor when the pressure sensor is closed
relay8_rev = 0; //Without this, the compressor might run backwards or might not run at all
//End Compressor Code
//Start Pneumatic Piston Code
if (p1_sw_top == 1) //If you press the thumb button on the joystick plugged into port one...
{
relay1_rev = 0; //Turn off the extend side of the solenoid
relay1_fwd = 1; //Turn on the retract side of the solenoid
}
if (p1_sw_trig == 1) //If you press the trigger on the joystick plugged into port one...
{
relay1_fwd = 0; //Turn off the retract side of the solenoid
relay1_rev = 1; //Turn on the extend side of the solenoid
}
//End Pneumatic Piston Code
With this code, you will plug the relay into relay port 1, the compressor into relay port 8, and the pressure sensor into digital i/o port 18.
quick note you power going into the spike should be on the +12v and GND not M+ and M- ....just for clarification
...forest
Oops, I'll fix that real quick and edit the post above. Thanks for pointing that out!
thanks alot i wuda put the groun to the spike lol :D
ubermeister
06-01-2008, 21:43
thanks alot i wuda put the groun to the spike lol :D
And thats what fuses are for :D
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.