I am trying to do an automated plant irrigation system using:
ESP32 controller running ESPHome
5V relay module
12V DC solenoid valve
My question is if I run 5V to the ESP32 and the input to the relay module and then have a separate 12V DC running on the solenoid valve and the common line on the relay…will this work or is there a problem with having inconsistent voltage on the input and common of the relay?
“Be careful about connecting this relay to an Arduino/Raspberry. Like many other similar relays found in Amazon and elsewhere, they CANNOT be controlled directly by a output from an Arduino/Raspberry unlike what the sellers tell you. This relay needs at least about 50mA in the input to turn on the relay. If one looks carefully into the Arduino datasheet for example, only 20mA are typicaly available in a pin (40mA is an ABSOLUTE maximum and can cause damage to chip!). However if u connect it to and Arduino/Raspberry it MIGHT work but you are stressing the chip and i can fail anytime soon!”