logo elektroda
logo elektroda
X
logo elektroda

Controlling relays 30m away with ESP module - how to connect?

PawelJuszczak 480 22
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21142993
    PawelJuszczak
    Level 5  
    Hello I need to control via ESP module relays that are about 30m away from the ESP , I have such modules as shown in the pictures and I am combining but it does not want to work . Can someone tell me how to connect this? Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect?
  • ADVERTISEMENT
  • #2 21143008
    madamsz1
    Level 42  
    Draw how you clip it together, because here you have two modules separating, one at the relays (opto) and the other on the green boards.
  • #3 21143018
    kindlar
    Level 42  
    What voltage drop do you have over this distance?
  • ADVERTISEMENT
  • #4 21143113
    PawelJuszczak
    Level 5  
    From the ESP I connect GND and GPIO to the green board, and from the green board I connect GND and IN1 to the relay, and 5V power from the USB charger.
  • ADVERTISEMENT
  • #5 21143122
    Anonymous
    Level 1  
  • #6 21143153
    ArturAVS
    Moderator
    PawelJuszczak wrote:
    With ESP I plug in...
    .
    And do you know how to draw diagrams? One diagram will explain more than a thousand words.

    Jarzabek666 wrote:
    30m is a lot for 3.3V you need to change concepts.

    Not a tragedy, I used to do about 70m on 5V. Although it is actually better to change the concept.
  • ADVERTISEMENT
  • #7 21143291
    madamsz1
    Level 42  
    A bit too far for this way of working and connecting. Strengthening the line (power) between the relays and the "green board" will probably solve the problem. However, you need to change the concept.
    Probably it is the control of some gate ? gate ? If so, it might be easier regarding access to the 12/24V power supply
  • #8 21147054
    PawelJuszczak
    Level 5  
    It's about the control of the solenoid valves, I'm willing to change the concept but I don't know to which one, currently what I have is 230V in the place where the solenoid valves are, relays and 24V power supply and a twisted pair of wires to another place where I have WiFi and it's from there I want to control these valves with ESP

    Added after 1 [hour] 16 [minutes]: .

    I tried it like this
    Controlling relays 30m away with ESP module - how to connect? I tried it like this.
  • #9 21147214
    kindlar
    Level 42  
    Controlling relays 30m away with ESP module - how to connect? .
    If he can tolerate that voltage, why not give 24V to the signal transmix?
    Controlling relays 30m away with ESP module - how to connect?
  • #10 21147227
    PawelJuszczak
    Level 5  
    In the description of the relay module, it says that control is by 5v or 3.3v
  • #11 21147243
    kindlar
    Level 42  
    There I think is an opto-isolation on the signal transmission side, I guess there can be more voltage that the circuit can tolerate. The relay is another step and another signal.
    Give a link to the description.
  • #12 21147251
    PawelJuszczak
    Level 5  
    I've just managed to find this great product on the AliExpress platform, check it out!
    £13.91 | 3.3V 5V 3 relay module 5mA with optocoupler isolation compatible signal
    https://a.aliexpress.com/_EwjX9kB
  • #13 21147407
    Anonymous
    Level 1  
  • #14 21147459
    PawelJuszczak
    Level 5  
    And the idea came to me that this module with relays should be next to the ESP, and the twisted pair should be used to supply 24V to the solenoid valves. The only thing is whether I can apply this voltage to the twisted pair and whether there won't be a voltage drop over 30 metres
  • #15 21147466
    madamsz1
    Level 42  
    PawelJuszczak wrote:
    will there be no voltage drop over 30 metres
    .
    There will probably be a voltage drop by the resistance of the wires. Valves need some current so a power source is good to give near them and amplify the control signal. Stranded wire is also poorly suited for high current control, you would have to connect the wires in multiples.
  • #16 21147491
    PawelJuszczak
    Level 5  
    And how to amplify such a control signal? The ESP outputs 3.3v and this would have to go in a twisted pair to the relays and there would certainly be a drop.
  • #17 21147534
    Anonymous
    Level 1  
  • #18 21147539
    PawelJuszczak
    Level 5  
    I have a 24V power supply at the solenoid valves but how do I connect it all?
  • #19 21147580
    Anonymous
    Level 1  
  • #20 21147590
    PawelJuszczak
    Level 5  
    I am sending a picture of the module Controlling relays 30m away with ESP module - how to connect?
  • #21 21147600
    Anonymous
    Level 1  
  • #22 21147655
    PawelJuszczak
    Level 5  
    Please
    Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect? Controlling relays 30m away with ESP module - how to connect? .
  • #23 21147716
    Anonymous
    Level 1  

Topic summary

The discussion addresses controlling relay modules located approximately 30 meters from an ESP module, focusing on wiring and signal integrity challenges. The main issue is voltage drop and signal degradation over the long distance when using 3.3V or 5V control signals directly from the ESP to the relay optocoupler inputs. The relay modules feature optocoupler isolation (model 817), requiring proper current through the input diode, typically around 5mA. Users suggest removing jumpers and replacing resistors on the optocoupler input to adjust current for reliable operation. Supplying 5V directly to the relay module and using a separate 24V power supply near the solenoid valves is recommended to reduce voltage drop on power lines. The twisted pair cable should carry 24V power to the valves, while control signals need amplification or level shifting to maintain integrity over 30m. Using a power conversion resistor and a 24V to 5V stabilizer for the optocoupler input is advised. Ensuring common ground (GND and RGND) between ESP and relay modules is critical. Alternative concepts include placing the relay module near the ESP and running only power lines to the valves. Diagrams and wiring verification with an ohmmeter are emphasized for troubleshooting. The relay module discussed is a 3-relay board with optocoupler isolation compatible with 3.3V and 5V signals, available on AliExpress.
Summary generated by the language model.
ADVERTISEMENT