Random and expensive relay behavior

I looked up the datasheet for a TIP120 and my question would be what kind of isolation are you using? You say you are switching 12 volts so are you putting 12 volts directly on the collector? and if so are you putting 3.3 volts directly on the base? If so, you are really playing with fire. Semi's are fairly robust these days but if it does fail it would likely put 12v directly on the GPIO and when it does all the smoke will come out of the board. And you can never put the smoke back in so that the circuit works. Been there. You need to isolate the 3.3 from the 12 by some means. Opto isolator or a circuit that has an opto isolator built in. Adafruint and Sparkfun both sell logic level convertors that would do the trick. How much current is your LED's drawing? The 120 says it will handle 5 amps is that close? Is there some need to have a semi in the circuit? Are you pulsing the ouput or is it an on/off situation? There are tons of FET's that fit the bill but you really should isolate the output from the 12 volts. If you use a relay, of which there are tons of 3.3 relays you get built in isolation and most will easily handle 5 amps.

1 Like