Shield Shield + PowerSwitch Tail II = No Go? [SOLVED]

I ran into a weird problem where trying to drive a PowerSwitch Tail II (basically a relay in plastic box - It works for 3.3V and 5V, but I get weird voltages with the Shield Shield. I have it hooked up normally (+ = pin, - = gnd), but when I turn the relay on by setting the corresponding pin high, I only get 1.8V. Removing the relay from the pin gives me 5V.

I’m not quite sure what’s happening there, but I have a feeling it has to do with some grounding issue?

Connecting the relay do Spark using the included breadboard works fine so I know it has something to do with the Shield Shield (and possibly the PowerSwitch).

Fortunately, I was able to get things working by just using the breadboard for all my stuff for now, but not sure what to make of it?

How much current is required to switch the relay?

This sounds like the Shield level shifters can’t supply the required current to switch the relay. Looking at the TXB0108PWR datasheet they are not ideal for driving relays.

In fact, they are not considered ideal for I2C either which means the shield won’t work too well with I2C based connections. (NOT TESTED THOUGH)

Does the power switch tail have a driver on the input or is it connected direct to the relay? If direct, you will most likely need a transistor driver to make it work.

I just checked the Powerswitch Tail II website and it is 3V at 3mA but have a look at the TXB0108PWR datasheet as they indicate that a HIGH is actually a weak drive so I suggest a pullup on the output of around 1K and see if that works.

@v8dave For i2C and 1-wire they actually recommend pullup of >50K to avoid interfering with Shield Shield output drivers, but it seems smaller resistors work fine for just driving output through the pin?

@m00dawg datasheet link for ease of use.

Ah yeah I may have made a poor assumption in thinking it would work given it works directly from Spark and Arduino. I figured the Shield Shield would be able to drive at least the same current. Oops.

There’s a chip on the board that I’m not sure what it does (I could probably figure it out by taking one of mine apart):,%20download.jpg

But since I’m not supplying the PST2 with power, so I doubt that chip is really doing much (I highly doubt it’s a driver). So yeah, god point.

Seems like using a transistor is the better route to go, but curious with the pullup - if I add in a pullup resistor that just means it’s going to pull up the voltage when the output pin is low and higher when high? That means I might need to pick a resistor value that would be able to pull it high enough to engage the relay but keep it low enough to disengage?

Unfortunately, since I want to use I2C, 1-Wire, and relays, the Shield may not be my best choice. But I was planning on making a purpose built board with all this stuff integrated anyway. A little concerned I might run into the same problem as the Shield with converting the logic inputs. I was going to use MOSFETs for that since I really only need be concerned with I2C for my application. I was likely going to leave the signalling for the Dallas Temps to 3.3V (though maybe supply 5V to them). I’d like to do 5V signaling since I’m using the sensors on the end of cables (for underwater application) though the distance is 3 meters or so. 3.3V seems to work fine when using the temp sensor on Spark + breadboard so that may be ok.

Looking that the IC has 6 pins I suspect this is an opto-isolated triac of some kind as there is a connection from the LIVE supply to the relay coil and this is a 240V ac operated relay this would be a very good guess.

The fact that is operates over a large range would indicate that it is indeed an LED input driver which would explain the 3+mA requirement.

I would connect the + input to +5V and then the - to the collector of a transistor (the common 2N2222A is a good choice) and then the base to the IO pin on the shield via a 4K7 resistor will work fine. The emitter goes to ground of course. A high on the output will switch it with good success.

1 Like

Doh thought I responded already. I agree that should do the trick! Thanks again for the help everyone!

@m00dawg Not sure if this could help, but I’m using the Shield Shield with the Arduino relay shield and it works fine out of the box and has 4 relays for about $20. (assembled) :slight_smile:

Indeed at initial glance it looks like it uses transistors so yep that’s like the way I may need to go, thanks!