Go Down

Topic: Relays seem to be working, except water pump isn't pumping (Read 382 times) previous topic - next topic

benbolet

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.






Paul__B


JCA34F

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.

TomGeorge

Hi,
OPs first pic, no distortion;

Tom... :)

Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
Why have you got the 5V pin on the relay connected to Vin pin on the UNO?
Try 5V pin on the UNO to 5V pin on the relay module.

Vin does not supply any current.

Tom.... :) 
Everything runs on smoke, let the smoke out, it stops running....

benbolet

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.

Paul: Here is the code 
Code: [Select]
int IN1 = 2;
int IN2 = 3;
int IN3 = 4;
int IN4 = 5;

int Pin1 = A0;
int Pin2 = A1;
int Pin3 = A2;
int Pin4 = A3;

float value1 = 0;
float value2 = 0;
float value3 = 0;
float value4 = 0;

void setup() {
  Serial.begin(9600);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);

  pinMode(Pin1, INPUT);
  pinMode(Pin2, INPUT);
  pinMode(Pin3, INPUT);
  pinMode(Pin4, INPUT);

  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, HIGH);
  delay(500);
}

void loop(){
  Serial.print("MOISTURE LEVEL::");
  value1 = analogRead(Pin1);
  Serial.println(value1);
  if(value1>500)
  {
    digitalWrite(IN1, LOW);
  }
  else
  {
    digitalWrite(IN1, HIGH);
  }
  Serial.print("MOISTURE LEVEL::");
  value2 = analogRead(Pin2);
  Serial.println(value2);
  if(value2>550)
  {
    digitalWrite(IN2, LOW);
  }
  else
  {
    digitalWrite(IN2, HIGH);
  } 
    Serial.print("MOISTURE LEVEL::");
  value3 = analogRead(Pin3);
  Serial.println(value3);
  if(value3>550)
  {
    digitalWrite(IN3, LOW);
  }
  else
  {
    digitalWrite(IN3, HIGH);
  }
    Serial.print("MOISTURE LEVEL::");
  value4 = analogRead(Pin4);
  Serial.println(value4);
  if(value4>550)
  {
    digitalWrite(IN4, LOW);
  }
  else
  {
    digitalWrite(IN4, HIGH);
  }
  Serial.println();
  delay(1000);
}

TomGeorge

Hi,
HINT;

Code: [Select]
int MoistSensPin1 = A0;
int MoistSensPin2 = A1;
int MoistSensPin3 = A2;
int MoistSensPin4 = A3;

Will make it more readable.
And;
Code: [Select]
int PumpOutPin1 = 2;
int PumpOutPin2 = 3;
int PumpOutPin3 = 4;
int PumpOutPin4 = 5;

Code: [Select]
float Moistvalue1 = 0;
float Moistvalue2 = 0;
float Moistvalue3 = 0;
float Moistvalue4 = 0;


will do the same.

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
Is this jumper in place?

Everything runs on smoke, let the smoke out, it stops running....

Paul__B

Is this jumper in place?

No, doesn't look like it - just bare pins.  :smiley-roll:



That certainly would make it difficult for the relays to operate!  :smiley-roll:

benbolet

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.

Paul__B

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.

benbolet

Paul you really helped me connect the dots. Very much appreciated, she is running beautifully!

-Ben

Go Up