This is my very messy version 1.0 setup for a solar powered self watering system... I had it running fine with the pumps working. Then moved it onto the acrylic box I made and added a solar panel setup to power the Arduino side. Then the water pumps stopped working... I triple checked my code and don't believe that to be the issue but I can copy and paste my code if that will help...
The issue and what I've been able to find out: Relays are confirmed receiving power (5V) and message from the soil moisture meters, but there is no click to turn them on, the light is on, they are indicating they should be on but when I use my meter to get a read although each pump relay is receiving 5V from the solar panel/battery setup, these are the blue wires towards the top right. However, the red wires that go from the relay to the actual pumps are not showing power going through them.
What is going on? Any suggestions on this or any part of my set up would be greatly appreciated... I included a basic schematic to show an organized view of my connections as well as how my water pumps are being used.
Is the 5V wire to the relay connected to either the COM terminal or the NO terminal? Is the wire going to the pump connected to the NO or COM terminal that the first wire is NOT connected to? Is the 5V still there when the relay is energized? Where is your volt meter BLACK lead connected?
Remove the GND wire from the Arduino to the relay board, remove the JD-VCC wire from the relay board, connect the 5V from the "pusher" to JD-VCC, connect the - (negative) wire from the "pusher" to the relay board GND.
Tom: I had the 5v pin from the relay connected to Vin on the Arduino before my transfer into the acrylic box and it was running with the water pumps pumping, still though yesterday during my troubleshooting steps I did tried putting the 5V from the relay to the 5V on the Arduino instead and it was the same result, no water pump action going on. Granted, if having the relay attached to the 5V pin on the arduino than I will take that route moving forward.
Returning to this late because I've been wanting to do my own research for the exactly what I want... fully automated, solar powered, irrigation system for my plants.
Originally, the cover for the relay jvcc was taken off because I couldn't understand what everyone had been telling me in other forums about my relays needing to be running on their own power source and that the relay should be disconnected from the arduino as it's power source...
My question is::: Do I need the jumper on or off? Is my current setup risky connecting to vcc and not jd vcc from the arduino? This is the part I am not understanding about all this and do understandthis is the source of the problems I have having...
I rewrote my code to be more organized as was suggested and will take that course moving forward... thank you very much for that advice.
The "JD-VCC" terminal on that jumper is the only way to actually power the relays, so either you place the jumper and have no isolation, or you provide a separate pair of wires - kept together as a bundle - to "JD-VCC" and "GND" to power the relays from your relay power supply whether or not it is the same power supply as for the remainder of the system.
The point is that those two wires must connect at the 5 V output of the power supply itself in order for the isolation to be meaningful while the "in" wires to the relays together with the "Vcc" line go - again as a bundle - to the Arduino. To provide isolation, the "GND" wire goes only to the power supply, not to the Arduino.