I am trying to control a grundfos 15-58 HVAC pump with this solid state relay http://magnecraft.thomasnet.com/item/all-categories/relays-solid-state/pn-2857?&plpver=10&origin=keyword&by=prod&filter=0 . The coil part of the relay is working fine from the Arduino. When I test with my multimeter I am getting 110v through the output wire going to the pump. However, once I actually connect the wire to the pump I get nothing. The pump does not come on and the meter reads zero. Disconnect the wire and check it and 110v. Thinking it might be a problem with the the pump I connected it back to the aquastat that had been running it and it runs fine. What[ch8217]s going on here? I am confused. Is the pump unable to get enough amps to start? What is the remedy? The pump draws between .55-.75A and 60-87W depending on which speed it is set to. The relay is supposed to handle 3A which I assume is plenty for startup.
Disconnect the wire and check it and 110v.
You can't check a solid state relay like this you are probably measuring leakage.
Can you post a diagram of how you have connected it up, then we can see if you have made any mistakes.
This is how I have it wired.
l l
l l
l l
l __ __ l
l - + l l l
l l l l
Arduino - Pin10 110v to pump
Sorry to ask this but the other side of the pump is going to the other side of the 110V?
The other thing you can try is to put a light bulb in place of the motor and see if that goes on an off.
What software are you running on the Arduino, is it pulsing on / off with a period of about 2 seconds, that would be the best.
Sorry to ask this but the other side of the pump is going to the other side of the 110V?
Yes it is connected.
I will try the light bulb experiment tonight and see what the result is. My code is below. Why on/off every 2 seconds?
#include <OneWire.h>
//1-wire
OneWire ds(8); // on pin 8
#define BADTEMP -1000
//define unique sensor serial code
byte boiler[8] = {0x10, 0xA0, 0xAC, 0xB5, 0x01, 0x08, 0x00, 0x78};
byte storage[8] = {0x10, 0xE3, 0x80, 0xB5, 0x01, 0x08, 0x00, 0x8D};
int relayPin = 12; // Relay connected to digital pin 12
int setpoint = 175; // Set the desired storage maximum temp in Fahrenheit here
int differential = 10; // Set the differential between source temp and storage temp in Fahrenheit here
int boilertemp;
int storagetemp;
void setup(void) {
// initialize inputs/outputs
// start serial port
Serial.begin(9600);
}
float get_temp(byte* addr)
{
byte present = 0;
byte i;
byte data[12];
ds.reset();
ds.select(addr);
ds.write(0x44,1); // start conversion, with parasite power on at the end
delay(1000); // maybe 750ms is enough, maybe not
// we might do a ds.depower() here, but the reset will take care of it.
present = ds.reset();
ds.select(addr);
ds.write(0xBE); // Read Scratchpad
// Serial.print("P=");
// Serial.print(present,HEX);
// Serial.print(" ");
for ( i = 0; i < 9; i++) { // we need 9 bytes
data[i] = ds.read();
// Serial.print(data[i], HEX);
// Serial.print(" ");
}
// if (lastcrc8 != 0x00)
// return BADTEMP;
int temp;
float ftemp;
temp = data[0]; // load all 8 bits of the LSB
if (data[1] > 0x80) // sign bit set, temp is negative
temp = temp * -1;
//get hi-rez data
int cpc;
int cr = data[6];
cpc = data[7];
// Serial.println(cr, HEX);
// Serial.println(cpc, HEX);
if (cpc == 0)
return BADTEMP;
temp = temp >> 1; // Truncate by dropping bit zero for hi-rez forumua
ftemp = temp - (float)0.25 + (cpc - cr)/(float)cpc;
//end hi-rez data
ftemp = ((ftemp * 9) / 5.0) + 32; //C -> F
return ftemp;
}
// ########### L O O P ###########
void loop(void) {
//search_devices(); //enable this line to get sensor device id. comment out when finished
boilertemp = (int)get_temp(boiler);
storagetemp = (int)get_temp(storage);
Serial.println();
Serial.println();
Serial.print("Temp Boiler = "); //Prints temperature to serial
Serial.println(boilertemp, DEC);
Serial.print("Temp Storage= "); //Prints temperature to serial
Serial.println(storagetemp, DEC);
if ((boilertemp) > (storagetemp) + (differential)) //check source temp for differential
{
digitalWrite (relayPin, HIGH); //if temp is above x degrees turn pin "ON"
Serial.print("Pump status = ON"); //Prints pump status to serial
}
else if ((storagetemp) > (setpoint)) //check storage temp against setpoint
{
digitalWrite (relayPin, LOW); //if temp is below x degree turn pin "OFF"
Serial.print("Pump status = OFF"); //Prints pump status to serial
}
else
{
digitalWrite (relayPin, LOW); //if temp is below x degree turn pin "OFF"
Serial.print("Pump status = OFF"); //Prints pump status to serial
}
delay(1000*5); //5 second loop
}
Your SSR should be able to operate (switch/trigger/be-controlled-by) a 9v battery connected across its "control" terminals.
One important part of debugging (software or hardware) is to 'prove' operation of sections (functions/subroutines/hardware modules) in isolation, before sticking them together.
Here, you could test your relay by using a (proven good) battery to trigger the ssr connected to a (proven good) lamp. Then prove the pump by connecting it to mains power. Then prove that the ssr can switch the pump by connecting the pump in place of the lamp, and operating the ssr from the battery, before replacing the battery with a simple on/off signal from the Arduino, before finally putting your chosen logic behind switching that Arduino output.
One step at a time is plenty!
Now, help me here people, please -- am I right in thinking:
1 - that one shouldn't "play" with rapid on/off switching of an AC motor to try to control its speed ??
- and because I note that the pin shown in the diagram (10) is a PWM pin -
2 - that anyway you cannot simply feed a normal mains electricity SSR with a very fast PWM signal, like the PWM that the Arduino produces with analogWrite ??
"Now, help me here people, please -- am I right in thinking:
1 - that one shouldn't "play" with rapid on/off switching of an AC motor to try to control its speed ??
- and because I note that the pin shown in the diagram (10) is a PWM pin -
2 - that anyway you cannot simply feed a normal mains electricity SSR with a very fast PWM signal, like the PWM that the Arduino produces with analogWrite ??
1-2. Correct. Many solid state relays only perform their turn on and turn off at AC zero voltage points so the switched AC would not be in lock step timing with the PWM signal. The ones that do allow mid cycle turn on still require a AC zero crossover to turn off as a triac (or scr) can only be turned off when current approches zero. However no PWM commands are being used that I see, just that it is a PWM pin but can be used as a simple on/off digital out pin.
Also sometimes solid state relays don't play nice with inductive loads like motors without an external R/C network, your idea of using a lamp as a test load is a good one. One step at a time, brick by brick indeed.
Lefty
Why on/off every 2 seconds?
I would just write a sketch that turns the motor / lamp on / off once every two seconds and nothing else so that the hardware alone is tested.
I say that time because it is short enough so as not to wait too long to see something happening and long enough so that you can see it.
Also I would put an LED (and resistor) on the same output as you are driving the relay with to make sure it is actually turning it on and off.
Only when you have done that will you know if the fault is in the hardware or if we should look at the software.
First off I am actually using Pin12 for the relay not 10 (not sure if it makes a difference).
Here are the test results so far:
- Pin 12 will light an LED on the arduino board and on my breadboard at the end of a 50' run of wire. However the LED is very faint in comparison to when I hook it up to the 5v feed coming from the arduino supply.
- The relay when it should be activated by pin12 does not light a lamp.
My thought is that perhaps it is not quite getting enough vdc to trigger it. Would using a transistor help any here? If it is worth a try, I have a MPS3904 NPN Transistor on hand. Would it work? What do I connect the collector, base, and emitter to? Thanks for all the help troubleshooting this guys.
I am actually using Pin12 for the relay not 10 (not sure if it makes a difference).
None
Pin 12 will light an LED on the arduino board and on my breadboard at the end of a 50' run of wire.
That's a lot of wire to put such a signal through. Your solid state relay is not on the end of 50' of wire is it?
If so then try it close to the Arduino first.
Then it is a matter of making the voltage you feed to it higher. This will need a higher voltage supply, say 12V and a transistor and a resistor.
I would wire it up,
- 1K resistor from base to Arduino pin
- Collector to -ve of your solid state relay
- Emitter to ground
- +ve side of solid state relay to +12V supply
- Ground of 12v supply to ground of arduino
Grumpy_Mike
Thanks for the response. Yes I am trying to run the relay from 50'. I will give your solution a try with my transistor. Just to clarify because I know so little about this stuff, in this case we are using the transistor as a switch for the external 12v instead of amplifying the Arduino signal. Right? Also, could it be 6v or 9v instead of 12v or was there a specific reason you suggested 12v? Thanks.
in this case we are using the transistor as a switch for the external 12v instead of amplifying the Arduino signal
Both statements are true, it is a switch and it is amplifying the arduino's output.
Yes you could use 9V or 12V but as you have found that 5V don't work at the end of 50' then 6V would probably not be enough. Again try it with an LED first and see if that is bright.
GrumpyMike
Thanks for all the transistor help. Worked perfectly and everything is up and running correctly now. The project can be viewed at http://woodnotoil.googlepages.com/arduino . Thanks everyone for all the help.
Cool
or should I say hot.