logo elektroda
logo elektroda
X
logo elektroda

[Solved] How to Control HL-52 v1.0 Low Level Relay with ESP8266 NodeMCU V3 and Blynk?

polandlp 885 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19617916
    polandlp
    Level 10  
    Hi, I recently got carried away with a SMART power strip project so I bought a nodemcu V3 and a low level relay module exactly HL-52 v1.0 on the Node I installed the Blynk software and now how to control this relay? Because it is a low level relay, there is a problem with it, when I connect it to pin D0 the strip is immediately on and when I connect it, it turns off, although on the application the switches are still off. What should I do now?
  • ADVERTISEMENT
  • #2 19618126
    tomjed
    Level 28  
    And some program...? What have you 'uploaded' to nodemcu?
  • ADVERTISEMENT
  • #3 19618272
    polandlp
    Level 10  
    Pure Blynk software this older version. But it doesn't have to be Blynk I just want it to be controllable via my phone without connecting to a special wifi but if it can't be done otherwise that can be too. My relay board only does not switch if it is connected to a 5v supply so could I use a transistor from 3.3v to 5v and that would take care of it ?
  • ADVERTISEMENT
  • #4 19620097
    khoam
    Level 42  
    polandlp wrote:
    Because it is low level there is a problem with it such that when I connect it to pin D0 the strip turns on and when I connect it it turns off although on the application the switches are still off.
    .
    There is always a high state on pin D0 (GPIO16) when the ESP8266 starts up. It is better to choose another pin for this purpose e.g. D2, D3, D5-D7.

    Added after 18 [minutes]: .

    polandlp wrote:
    My relay board only fails to switch if it is connected to a 5v supply so could I use a transistor from 3.3v to 5v and that would take care of it ?

    I don't really understand the question, but this HL-52 module must be powered from 5v.
  • ADVERTISEMENT
  • #5 19620272
    polandlp
    Level 10  
    khoam wrote:
    what I meant was that when I connect the cable to e.g. V5 then nothing happens on the board and when I connect it to pin D2 where 3v is, then it switches over.
  • #6 19620396
    khoam
    Level 42  
    The HL-52 module is triggered by the low state . Normally the ESP pins are also in the low state, hence the relay response.

    In this module there is a separate power supply for the relay and a separate one for the input track (optocoupler) - you need to remove the jumper (jumper). The input track should be powered from 3V3.
  • #7 20171935
    polandlp
    Level 10  
    I had to buy a new module

Topic summary

The discussion revolves around controlling the HL-52 v1.0 low level relay module using an ESP8266 NodeMCU V3 and Blynk software. The user encounters an issue where connecting the relay to pin D0 causes it to turn on immediately, while connecting it to pin D2 results in it switching off. Responses suggest that pin D0 (GPIO16) defaults to a high state on startup, which is unsuitable for this relay, and recommend using other pins like D2, D3, or D5-D7. It is also noted that the HL-52 relay requires a 5V power supply and operates on a low state trigger. A solution involves removing a jumper to separate the power supply for the relay and the input track, which should be powered from 3.3V. The user ultimately had to purchase a new module.
Summary generated by the language model.
ADVERTISEMENT