Photon and SainSmart 4-channel 5v Relay

I am trying to test out this relay…

I have it all hooked up, and when I set the D7 pin to high, the onboard channel LED lights up, when I set it to low, the relay LED goes out (for all 4 channels on the relay). So that was as expected. To test it so that I could verify it was working properly, I hooked up another breadboard with a 5v supply and a LED (to keep everything isolated). Now, when I set D7 high, the relay board LED cam on and the one rigged up on the breadboard, BUT, when I set the pin low, the relay board led goes out, but the LED on the breadboard stays on. Any ideas what may be going on here?

The relay has an onboard NPN resistor so it should be able to handle 3.3v on the switching side. I have tried various combinations of wirings and researched countless threads but no solution yet.

I essentially have this setup: Photon powered by a USB.

Pho Relay Board
d7 ----> IN1

5VPower Supply - RelayBoard - BreadBoard
5v+ ----------------> RelaySwitch
…Relay Switch------>LED
5vGND -------------------------------------->LED

I have tied the grounds together into a common ground as well.

I have a multimeter so I can do some testing if that is needed, but I cannot read connectivity across the relay switch at all (But several web sites say I cant test that way.)

Any Help is appreciated

I guess this is a transistor.
Where does this come up in your wiring table?
You should also have a current limiting resistor in line with your LED.

Instead of your wiring table, could you just draw a quick sketch of your wiring (even with pencil and paper) and post the pic here?

This may not be helpful, but… is an AC relay supposed to be able to switch a DC load?


Sorry - Transistor is what I meant, and I do have the resistor in line with the LED. I am not much for Electrical drawings - How about a picture of the whole thing. The black and yellow coming in from the left are from 5v (Yellow is ground) The black wire from the photon comes from VIN and goes to VCC

@spoff has a fair point.
Since this relay has a zero-cross detection it might be keeping the contact closed till the logic “sees” a zero-crossing to switch safely, but with DC it never will see that.

To test this, you could add a switch to break the LED circuit temporarily and see if the LED stays off after you releas the switch again.

1 Like

@spoff is most likely correct I looked at the OMRON specs and they are listing only AC voltage on the output side. and yes, once the LED circuit is broken the LED remains off (even if it is reconnected).

And to think I was just trying to be safe and test the circuits with minimal DC loads before adding the 120V!