Relay sensors stop communicating with gateway after a few minutes
-
Perhaps someone w/ more electronics knowledge can comment more but in my limited research, you can reduce power consumption to the relay by getting one w/ an optocoupler. There is a good write up here: https://arduino-info.wikispaces.com/RelayIsolation
Most x2, x4, and x8 relays on aliexpress that I have seen have optocouplers. Here are some single relay boards with them: http://www.aliexpress.com/item/Free-shipping-5Pcs-Lot-Level-Triger-Optocoupler-Relay-1-Channel-H-LModule-for-Arduino-5V-New/32390536994.html
-
Perhaps someone w/ more electronics knowledge can comment more but in my limited research, you can reduce power consumption to the relay by getting one w/ an optocoupler. There is a good write up here: https://arduino-info.wikispaces.com/RelayIsolation
Most x2, x4, and x8 relays on aliexpress that I have seen have optocouplers. Here are some single relay boards with them: http://www.aliexpress.com/item/Free-shipping-5Pcs-Lot-Level-Triger-Optocoupler-Relay-1-Channel-H-LModule-for-Arduino-5V-New/32390536994.html
@TD22057 The relay coil will draw a certain amount of current at 5 VDC. Using opto-couplers does not change the amount of current the relay draws. However, some of the relay modules will use transistors, etc. to ensure that the current for the coil is not supplied by the digital output pin of the Arduino as the output pins can't typically source enough current for that.
Cheers
Al -
It's a strange problem. In most of my "projects" I power the relays directly from the power supply, home built or mfg and other than adding some capacitors have not seen these problems. Now I aways use Opto-controled relays so I don't have to use any diodes...
-
It's a strange problem. In most of my "projects" I power the relays directly from the power supply, home built or mfg and other than adding some capacitors have not seen these problems. Now I aways use Opto-controled relays so I don't have to use any diodes...
@ServiceXp
What kind of power supply do you use to power the relays? I've tried several different options (iPhone charger, iPad charger, and various other 5v power supplies) but no luck. The LEDs on the relay turn on, but it doesn't click. Would you have a picture of one of your relays so I can see your setup?I also tried following the advice from @BulldogLowell and powered the relays from the VIN pin instead of the Arduino 5v output, but I had the same problem. The relay worked for a few hours, then stopped working.
FYI: I am using a relay with optocoupler just like the one posted in the link above. Maybe I just got a batch of bad Arduinos from China?
Thanks!
-
@ServiceXp
What kind of power supply do you use to power the relays? I've tried several different options (iPhone charger, iPad charger, and various other 5v power supplies) but no luck. The LEDs on the relay turn on, but it doesn't click. Would you have a picture of one of your relays so I can see your setup?I also tried following the advice from @BulldogLowell and powered the relays from the VIN pin instead of the Arduino 5v output, but I had the same problem. The relay worked for a few hours, then stopped working.
FYI: I am using a relay with optocoupler just like the one posted in the link above. Maybe I just got a batch of bad Arduinos from China?
Thanks!
@rafael.brasilia I'm wondering if the relays are actually 9VDC or 12VDC relays that are misprinted as 5VDC. What happens if you power them with a 9V battery as a quick test? I use old phone chargers with similar 5V relays and never had an issue with powering them that way. Do you have any other relays you can test with?
Cheers
Al -
I thought the same, it was how i detected i had 12v relays instead of 5v. I just quickly powered with 9v bat and then the relay clicked.
-
Thanks for the heads up. But I tried 9v and 12v and no luck! They only click when powered directly from the Arduino and they stop working after a few hours.
-
@Nuubi
This is how I have my connections:

Is there anything wrong with it?
Thanks! -
Try adding a wire between the GND on your relay board and GND on your arduino. Even if they have seperate power source you stil need to connect GND between them.
-
YES!!! That was it! I got both relays powered from the external power supply now and everything seems to be working fine.
Thank you all very much!