[SOLVED] Relay Board with Photon

Hi,
i try to switch a relais at beginning with thinkle.
I connect the Relais Board ( sainsmart ) with power an the D0 Connector for the Signal line to the Board.
Everything ok.
If i tap on d0 at the Thinkle app, select digitalwrite, the Relais still switch on.
What can i do ? I want to switch the Relais, with high value not Low Value.
Could someone help ?
Thanks

@Fred4711, you would need to modify the Tinker app running on device to implement “negative” logic. You can get a copy of the tinker code here.

Hey there,

Could you tell us what relay board you’ve used? Pictures, links, datasheets, or website would all be great info to have. Also, how did you hook up your relay? Relays often have ‘Normally Open’ or ‘Normally Closed’ connections. Depending on which one you’ve used, your logic could be inverted.
Also, @peekay123’s suggestion is very valid, as always :wink:

2 Likes

sure :slight_smile: here a Picture.

@peekay123
I dont know what you meen with negativ logic.
If i try the complete examples ( LED blinking ) i send high to the port and the LED is on. If i send low the led is out.

once again the Problem …
i only select on the App digital write. and the Status is low and you can here a “clack” from the Relais.

@Fred4711, the reason I said “negative” logic is that the relay board turns on when you apply a LOW to the pin, which is inverse of what you expect on Tinker. If you use Tinker to control the on-board blue LED on pin D7, you will find that it turns ON when HIGH and off when LOW which is what you expect (“positive” logic). The relay board is the opposite. :smile:

Great, i still see the Problem.
The Relais wants a low signal to switch. Sorry … i understood.

2 Likes

@Fred4711 hi, sorry to ask here, but i don’t know any other way to contact. Can you explain how do you power your relay board? I see you are not using the photon, is it because there’s not enough power to switch the relays?
Thanks

@divendres, the relay board is not powered by the Photon exactly. The relay power is connected to the Vin pin of the Photon which is connected to the USB power. The Photon drives the opto-isolated inputs that turn the relays on and off. Oh, and the picture IS of a Photon!

3 Likes

Yes, I know, I have the same relay board. But the cable colors are different and I thought you were using an external power. Good to know I don’t need anything else.
Thanks.