Relay is working while water pump isn't

hello, I am pretty new to the world of arduino and I am having trouble with my first project. I can't get my 5v water pump to work. The 5v relay that i am using seems to be working, however whenever i start the program my relay makes a ticking on and off noise but the pump isn't pumping any water. please help ): thanks !

int moistPin = A0;
int wPump = 8;
float moistVal = 0;
int dt = 5000;
int dt2 = 2000;



void setup() {
  // put your setup code here, to run once:
Serial.begin(9600); 
pinMode(wPump, OUTPUT);
pinMode(moistPin, OUTPUT);


}

void loop() {
  // put your main code here, to run repeatedly:

  moistVal = analogRead(moistPin); 
  moistVal = moistVal / 100;
  Serial.print("Plant Soil Moisture: ");
  Serial.print(moistVal); 
  Serial.println(" %");

 if (moistVal == 0.00){

   digitalWrite(wPump, HIGH);

   delay(dt);

   digitalWrite(wPump, LOW);

 } else {
    digitalWrite(wPump, LOW);
 }
   delay(dt2); 
 }

Can You please post a real wiring diagram, not a wall decoration painting? I see no proper power supplying devices, voltages, current capacity.
Your post smells powering issues.

Ask yourself this question:

Can my pump work without a a power source.

If this question doesn’t make sense use Google. relay 5v pump circuit images

example (battery will be the same voltage as the pump).

This makes sense, thanks for your help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.