I am new in the Arduino's world and I am facing my first problems.
Currently working on an automatic irrigation project: a relay switching on and off my wat
er-pump. The problem is my relay do not switch it on and off. It just stay on if I connect the power supply to the (ON) pin of the relay and it always stay Off if I use the (NC), even though I can clearly hear the switching sound and even the related led switch on and off. What could it be?
I don't think is the relay since I have others and still have the same problem.
I leave a picture of my circuit.
Ps I m using a 12v 1A power adapter to power my pump
Love for all could help
It seems like you are using the Arduino itself to power the relay.
You will probably find that it lights up the LED on the relay module but does not have enough current to work the contacts.
Most often they require a seperate supply with enough amps
It looks like you're breaking one of the power lines to the pump with the relay. Where is the other one connected?
It is hard to see in the picture but it is connected with the power adaptor
The supply side for the logic looks to be connected directly to the Arduino ?
Yes I use Arduino here is the guide I am currently following https://arduinogetstarted.com/tutorials/arduino-controls-pump could it be that my adapter do not have enough ampere? Even though it seems to power my pump pretty well on its on
You mean the IN pin in the relay? Yes it is controlled by Arduino
Using the ARduino for the logic side of supply especially to a relay has shown many issues in the past.
That is certainly not a good example in that tutorial.
The + and - supply for that side of the relay board also ?
Not bothered about the screw terminals.
Since the indicator LED is on and you hear the relay click, it seems that it might be working. Check it with your DMM to be sure.
Yes I connected everything as they say, all coming from Arduino on that side. I honestly never anybody using an additional power supply for the relay.
show your sketch.
I have used my dmm, always closed in NO and always open in NC
[https://arduinogetstarted.com/tutorials/arduino-controls-pump ] I am following this guide step by step
Sorry just the opposite
You might try the same test and connect the relay signal wire to 5V instead of a digital pin.
That is a better example where you can see the seperate supply.
Do you mean something like this? Actually now the green led (the one for the switching) do not turn on. Not enough amps?
Ok I will try to do that. Thank you so much
I suggest that you simplify. Forget the Arduino and the pump. Get 5V somehow and prove to yourself with a meter that you can switch the relay on and off.
Until you can do that, the rest is superfluous.