logo elektroda
logo elektroda
X
logo elektroda

Wemos D1 mini and relay modules - is direct connection OK?

shady79 1242 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18355556
    shady79
    Level 13  
    Hey

    I bought some fake wemos D1 mini on allegro for my project. Among other things, I connected 2 relay modules to it where the 5V power supply, ground and control from the microcontroller are connected separately.
    The wemos power supply goes from the 5V power supply and the relay coils also from the power supply. The wemos pins directly connected to the relay board. It's been running for about 2 weeks and today the wemos went haywire, it doesn't start at all and the esp chip immediately gets hot - smd version.
    I'm guessing that the stabiliser chip is probably dead and maybe that's why it's getting hot or some kind of short on it.... I'm going to order a second one for a replacement soon, but I'm wondering if maybe these relay modules pull too much current from the pin and that's why it whipped the stabilizer? Is it possible to connect the relays to the wemos directly like this? or do you need to via some transistor?
  • ADVERTISEMENT
  • #2 18355582
    Slawek K.
    Level 35  
    The current capacity of the esp8266 pin is nominally about 8mA at 3.3V voltage. Until we know the schematic of the relay module, it will be difficult to know anything conclusively.

    Greetings
  • ADVERTISEMENT
  • #3 18355690
    shady79
    Level 13  
    the stabiliser is rather ok as I checked with a meter and the voltage on the 3.3V rail is as required. The relay module is opto-isolated so the esp pin is connected to the optocoupler so there should be no problem with too much load.
  • ADVERTISEMENT
  • #4 18355859
    khoam
    Level 42  
    shady79 wrote:
    The relay module is opto-isolated so the esp pin is connected to the optocoupler so there should be no problem with too much load.
    .
    It depends whether the optocoupler input diode is connected in the module itself to +5 or GND. What logic state are you switching the relay to? To which pin on D1 mini are you connecting the relay control?
  • ADVERTISEMENT
  • #5 18356248
    shady79
    Level 13  
    D1, D5 - high state controlled relays.

    D2 and D7 - shorting buttons to GND.

    D6 - 1wire I don't know if this can make a difference but I have a 5v power supply to the dallas
  • #6 18356418
    khoam
    Level 42  
    shady79 wrote:
    D6 - 1wire I don't know if it can make a difference but I have a 5v power supply for dallas
    .
    OneWire should be pulled up to 3v3 - need to reduce the value of the pull-up resistor. The DS18B20 (if you are referring to it) will also work with a 3V3 supply. From the ESP documentation:

    Are the GPIO pins 5 V compatible? .
    No, they are not. While many applications may get away by using a resistor voltage divider or series resistor, we highly recommend using a proper logic level converter chip to interface with 5 V logic. Not doing so may lead to damage to the ESP8266 in the long run.
ADVERTISEMENT