Pages: [1]   Go Down
Author Topic: help with a relay problem  (Read 520 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need some help.  I have relay board (this one: http://www.emartee.com/product/41391/Arduino%205V%20Relay%20Omron%20G5LA).  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?
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I need some help.  I have relay board (this one: http://www.emartee.com/product/41391/Arduino%205V%20Relay%20Omron%20G5LA).  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...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2500
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 (21.91 KB, 532x316 - viewed 11 times.)
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Full Member
***
Karma: 2
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2500
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good point!
Using 0 -- terrible.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all your help.

Quote
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:
Quote
void setup ()
{
}

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

schemtic attached.


* schematic relay.jpg (285.34 KB, 640x353 - viewed 9 times.)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

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

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

Lefty
« Last Edit: February 23, 2012, 10:04:51 am by retrolefty » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: