[SOLVED] Particle Photon, 5v 2 Channel Relay and Blynk

I am attempting to run a 2 Channel Relay via a Particle Photon and Blynk to open my garage door opener. Every once in a long while, I hear a click on the relay, but usually all I see is one of the onboard LEDs on the relay turning off and then on when I release the button in Blynk.

  1. Particle Photon is setup on WiFi. Through Blynk I am able to turn the onboard LED on D7 on and off so I know the Photon is on the network.
  2. I connected the 5v 2 Channel Relay up to the Photon and am able to make both of the LEDs on the 2 Channel Relay turn on/off by setting up buttons on Blynk for D1 and D2 but I cannot get the relay to send a signal to the garage door opener.

I have wired the relay module to the Particle Core in the following way:
GND to GND (violet wire)
IN1 to D0 (yellow wire)
IN2 to D3 (purple wire)
VCC to 3V3 (red wire)

In Blynk I have setup the app to use a button assigned to D0 and the code flashed to my Photon is as follows:

// This #include statement was automatically added by the Particle IDE.
#include “blynk/blynk.h”

// #include <SPI.h>
// #include <Ethernet.h>
// #include <BlynkSimpleEthernet.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “”;
// My actual Auth Code from the Blynk app is inserted above

void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
pinMode(D0, OUTPUT);

// You can also specify server.
// For more options, see Transports/Advanced/CustomEthernet example
// Blynk.begin(auth, “server.org”, 8442);
// Blynk.begin(auth, IPAddress(192,168,1,100), 8888);
}

void loop()
{
Blynk.run();
}

Any help in getting this relay to work via Blynk would be greatly appreciated.

Have you checked this tutorial: http://makezine.com/projects/particle-core-garage-door-opener/

Since you know that Blynk is working, fhe problem might be somewhere in the wiring

Thanks, the problem WAS in the wiring. I had followed the tutorial you mentioned, that was the catalyst for my project. However, the wiring specified in that project was for a Particle Core, not a Particle Photon. Thanks for pointing me in the right direction, I was thinking it was an issue with my Blynk program.

So, can you post the correct wiring please?
Thanks

I am having the exact same issue. What did you change in the wiring?
Thanks

Fixed it. Just in case any one else has this issue.

GND to GND (violet wire)
IN1 to D0 (yellow wire)
IN2 to D3 (purple wire)
VCC to VIN(red wire) instead of 3v3

Breaking_Blynk

I’m glad you got that figured out. We all spend too many hours on the dumb stuff. The relay side needs 5Vdc to actuate the relay.