Hi i need your help. i connected Blynk app on iphone to ESP8266 to run a relay. Works fine when i turn on and turn off a LED using the example blynk_standalone. but when I want to use a relay. the relay stays turn on regardless of button status help please
this is my sketch:
[Unformatted code removed by moderator]
there arent any difference, the relay always stays on
More information required.
Pete.
1 Like
As in post your entire code with triple BACKTICKS ``` on a separate line before and after the code.
1 Like
I’ve removed your unformatted code from your post.
If you wish to post code to the forum then it must have triple backticks at the beginning and end.
Triple backticks look like this:
```
@daveblynk already asked you to do this (as did the text that you deleted when you first created this topic).
If you require help with your project then you’ll need to provide appropriate information, such as:
- How is your button widget configured?
- How is your relay connected to your board?
- What type of board are you using?
- How are you powering your relay?
- Is your relay active LOW or HIGH?
Pete.
1 Like
The relay you are using is an active low type. When the pin is low the relay triggers(0V). When the pin is high(3V) the relay turns off. This will be indicated by the onboard green LED.
There are three pins on the relay module
VCC, GND, IN
Please check whether you have confused between VCC and IN
VCC is 5V and IN is the trigger pin.(please see the pin setting in the app and make sure you have connected to the same pin on the board).
I guess you have connected the other way around.
Make sure you are using the correct pin (Digital pin) on the app setting and NOT VIRTUAL PINS.
Also make sure the relay module is fine.
1 Like
Thank you for the help, my relay is an active low type and Works fine but I think the esp8266 module don’t give the voltage needed for the relay because the high of esp8266 is 2.8V and the IN trigger pin needed (3V) for turn off the relay.
can you help me with this please??
I think of using a transistor at the output of the esp8266 module to increase the voltage in the IN trigger pin. is that correct?
Why don’t you just use the ESP8266 for communication with Blynk - and use the UNO for all other tasks, including driving your relay? The UNO will have ample power and a lot more available pins.
You need to answer all of @PeteKnight 's questions above, otherwise we are just guessing at your setup.
billd
2 Likes