Wiring Solinoid to Digital I/O

Hey All,

My i’m trying to wire up a spike relay to a digital in and out, but it happens to only go in one direction (remember digital is only a 1 or a 0), im thinking i should split a PWM cable and set the black as a shared ground between two digital i/o, and the red going to one digital i/o and the white going to another digital i/o. Is this right?

Whats your opinion? Or if i’m totally wrong, whats the correct method to wiring a spike relay to a digital i/o?


That’s not necessary. Here’s the Spike manual; it’s got the correct method using the relay outputs.

Or do you have a reason to want to connect two separate digital I/Os, instead of the relay outputs?

A fuller description might also allow us to suggest some other options.

But thats for using relay outputs… I need a digital output because i’m using an EDU-RC board.

The Spikes aren’t PWMs, they just use a PWM cable. You can figure it out looking at the program aliases. At any rate, on the relay’s PWM cable, black is black/ground, red is reverse, white is forward. So you’d connect the red cable to the white pin of a second digital IO.

Here’s IFI’s info on it:
Spike FAQ
Spike Manual

As it says, you need to get 12V of power to the spike, so no using 7.2V batteries.

There’s a solenoid out port on the EDU board. Use that.

Your assumption is correct on how to wire it, but might not necessarily work. I have had problems with vex controllers driving spikes before (but only certain spikes - the old style blue’s IIRC), where the digital IO wasn’t able to source enough current, so you might need to try the solenoid outputs if it doesn’t work. Double check that the output of the Darlington pair on the solenoid outputs is 5V though, and not 7.2.

Edit: after thinking about it, if you can get it to go one direction, then you likely won’t have the probelm I was having, and wireing it the way you said should work. Too much time at work and then in the robot lab tonight for me.

Dont worry about that 7.2v part, i have a breaker panel wired up to a 12 volt battery. The EDU-RC will be powered using the 7.2 battery.

I think splitting the PWM into two parts would work… About that shared ground… Should i just stick a wire in to the pwm connector (on the black female pin) and solder it, then do the same to the 2nd pwm connect? I’m afraid i might short something :-/

Ground is ground is ground is ground. All those little black pins go to the exact same place and have the (nearly) exact same potential, barring odd very small resistance and capacitive effects, I suppose. So you shuldn’t really have to worry about splitting the ground and sending it somewhere else.

Okay i finally soldered the wires and stuff… it doesnt work… my code is just… rc_dig_out02 = 1; rc_dig_out03 = 0;

Why wont it move the solenoid??

I have black wired to black
white wired to white, and red pin moved to white pin

Hmm. Do you know if it’s the red wire that’s not working or is it the white wire that’s not working? That is, make the white wire IO = 1, and the other = 0 and see if it still works in that direction. If it doesn’t then your wiring might be faulty somewhere. If it works in that direction but not the other, then your wiring of the red wire might be bad.

OOPPS! I forgot in the EDU… you have to specify the port to become an input or output… that IO stuff… not that rc_dig_out…

It works fine now!!

Thank you for all your help!