Sourcing current from multiple pins

I have a Crydom solid state relay that I want to control with an Imp. It requires 15mA to switch. Could I flip on multiple pins at the same time to provide enough power? I assume I’d need at least 4, but I could use all 6.

You really can’t gang them together because “at the same time” isn’t really at the same time and you’d have a huge current peak when some pins were high and some still low.

Really, this is a job for a $0.02 transistor. With an NPN, put a 1k resistor from the imp pin to the transistor’s base, connect its emitter to ground and its collector to the negative of the SSR drive. Connect the SSR’s positive terminal to the 3.3v rail (or 5v, or whatever).

Actually, there is a sneaky way you can do this. It’s a bit complex so not recommended - a transistor is much better. But…

`pin1.configure(DIGITAL_OUT); // master pin
pin2.configure(DIGITAL_IN); // slave pin

function write2(level) {
if (level) {
// turn slave pin on as output open drain, so we can write it (you can’t write it when it’s an input)
pin2.configure(DIGITAL_OUT_OD);
pin2.write(1); // slave pin is no longer pulling low
pin1.write(1); // master pin driving high
pin2.configure(DIGITAL_OUT); // slave pin now also driving high
} else {
// On the way down, turn slave pin off first, then turn master off
pin2.configure(DIGITAL_IN);
pin1.write(0); // master pin driving low
pin2.configure(DIGITAL_OUT_OD);
pin2.write(0); // slave pin driving low
}
}`

I recommend a transistor. Just because it works, and because it offers some protection (isolation) to the imp pin. It also allows you to use the main imp supply voltage to power the SSR (instead of the imp’s 3.3V regulator). Example, you power the April board (or whatever) with 5-9VDC supply. The imp pin triggers the transistor to sink (pull low) the (-) side of the SSR.

Yep, I’ve been using 2N2222’s and TIP120’s in several circuits, and they work great. I recently tested switching speed with a TIP120 and a mechanical relay. I had the imp sleep for as little as .01 seconds in between driving the pin high and low, and both the relay and the transistor seemed to be happy switching that fast.

I’m building what is essentially a PowerTail switch with an Imp embedded in the smallest and simplest package that I can.
I’m using this for power, not the cheapest option, but fairly compact and really easy to put on a board.
http://www.cui.com/product/resource/vsk-s1-series.pdf

I figured the pins couldn’t be driven high simultaneously, but It looks like I spun Hugo’s brain up for a few minutes with the “sneaky” method. :slight_smile: Thanks for the reply.