help with a relay problem

I need some help. I have relay board (this one: 5V Relay Omron G5LA -Arduino Compatible - emartee.com). When I first got it I hooked it up to a simple lamp and the Arduino to test it out and it worked great.

I am currently working on a sous vide cooker project using this. I have hooked it up along with an LCD, a pot, and a sensor and now it is not working. It has power and the little LED on the relay board is going on and off but the relay is not connecting the power to the lamp. To trouble shoot, I set up a simple sketch again with just the relay turning the lamp on and off again and no go.

A strange thing is that sometimes when I hit the reset button on the Arduino and it reboots, the relay with flash the lamp on and off for a split second.

any ideas?

theErikJohnson:
I need some help. I have relay board (this one: 5V Relay Omron G5LA -Arduino Compatible - emartee.com). When I first got it I hooked it up to a simple lamp and the Arduino to test it out and it worked great.

I am currently working on a sous vide cooker project using this. I have hooked it up along with an LCD, a pot, and a sensor and now it is not working. It has power and the little LED on the relay board is going on and off but the relay is not connecting the power to the lamp. To trouble shoot, I set up a simple sketch again with just the relay turning the lamp on and off again and no go.

A strange thing is that sometimes when I hit the reset button on the Arduino and it reboots, the relay with flash the lamp on and off for a split second.

any ideas?

You're the second person I've seen working on such a cooker (never heard of it before the first guy - but I know what it is now)...

As always - post a schematic of your setup and your code...

if teh light is turning on and off it would look like you are getting the signal to the relay. Any idea what the ratings are on the relay contacts? you might have overloaded the contacts and they are no longer making contact because of damage.

You might want to look into a sold state relay. reqires a 5V control signal, and will switch 10 or more amps, depending on the device.

There's a "test sketch" at the emartee site.
Is the relay clicking on/off?

Attached is a hook-up diagram.
There's no fuse, so watch out!

svrel.JPG

If it worked great when you first got it hooked up but now that you have the other stuff hooked up and it doesn't work now have you tried to remove the rest of the stuff and just have only the relay board hooked up to see if it is indeed not working ? I don't know if you followed the example code from the product page but I think it would be wise to avoid using pins 0 and 1 since they are used for the serial link. That bit you mentioned about it seeming to work when pressing reset makes me think there might be some hope for it. Just hook up it up to say pin 2.

Good point!
Using 0 -- terrible.

Thanks for all your help.

If it worked great when you first got it hooked up but now that you have the other stuff hooked up and it doesn't work now have you tried to remove the rest of the stuff and just have only the relay board hooked up to see if it is indeed not working ?

This what I've been attempting. When I first tested it with simple code it was perfect. I then hooked up all the other stuff and it didn't work. So I went back to the simple code with only the relay hooked and that when it is acting funny: the light goes on and off but the relay is not making contact, except for when the reset button is pushed and it does the flashing thing opening and closing the relay rapidly for a split second. During the reset flashing it has the usual audible clicking that it should have as it opens and closes but when the code is running the is a very faint click as the LED is going on and off.

Here's my simple test code:

void setup ()
{
}

void loop ()
{
digitalWrite (13, HIGH);

delay (1000);

digitalWrite (13, LOW);

delay (1000);
}

schemtic attached.

schematic relay.jpg

You don't have a proper pinMode command to set the pin to be an ouput pin. When starting from power up or reset condition all arduino pins are in the input mode, and you must set any pin you need to use as an output pin with the pinMode command:

Try this:

void setup ()
{
pinMode(13, OUTPUT);    // This what you were missing!  
}

void loop ()
{
    digitalWrite (13, HIGH);
    
    delay (1000);
    
    digitalWrite (13, LOW);
    
    delay (1000);
}

Lefty

thanks very much. I was hoping/thinking it was something small and overlooked.