Main Site Documentation

Relay x16 strange behavior


#1

Hi all,

I have exactly the same problem discussed in this thread : https://www.ghielectronics.com/community/forum/topic?id=12385

I have a cerberus board with the latest firmware (i’ve also tried with an older firmware without more success).

I just want to control AC 250v lights and for example, i call EnableRelay(1).
the problem is sometimes (or often) the relays (sometimes all, sometimes few…) enter (with the help of some kind of magic) in the ON state.

I’ve tried to call EnableRelay or disableRelayin another thread, in the Program dispatcher, same result.

the mainboard is powered by usb.
the relay board is powered by dedicated 12V power supply.

Like in the previous thread, when i test the switching of the relays without having plugged anything on them, it works perfectly, but as soon as i plug my 250v AC led lights, the “strange behavior” occurs.

If it’s possible, i’m looking for a software solution without having to buy additionnal hardware…

Thanks for your help.

SENSEI


#2

I finally track this down and found the data sheet here for the actual relay board here.

For me this is a very poor design as it claims OPTO-ISOLATION but is actually connected on both the GND and the SUPPLY (5V) side of the relay board to the Gadgeteer module interface.

Looking at the 74HC595 the ENABLE# input should be held LOW all the time as this will ensure that the OUTPUTS remain in the state they were programmed to. If this line goes HIGH it will cause the outputs to go TRI-STATE and could potentially float and cause the relays to chatter although this seems unlikely as there would not be sufficient current to switch the LED’s on in the opto’s.

There are pull downs on the ULN2083 inputs to with no Gagdeteer module connected and only 12V input, the relays should remain in the off state on power up.

Not sure why your relays are switching on with AC connected as there doesn’t appear to be any reason for as long as you have programmed the Gadgeteer board correctly.

Are you saying that the relays come on and stay on when you switch one of the other relays or do they just chatter?


#3

First let me state, I am no EE But, in the Developers’ Guide for the ISOx16 Relay, a number of issues in this area are discussed. The Developers’ Guide is found under the Resources tab of the product in the Catalog - http://www.ghielectronics.com/catalog/product/391


#4

Thanks Dave for the link and your explanations.

to be more clear, when i switch on relay 1 and 2 (or 1 and 3), sometimes, all relays switch ON and stay ON.

i have also experienced the same Problem as HyperLisk :

From a developer side, it’s a kind of short-circuit that makes all relays On (and sometimes not all)


#5

i’m thinking : the GND of the +12V power supply for the relays and the GND of the gadgeteer part have to be connected ? for now they are not…


#6

There’s a problem with 74HC595 shift registers. I guess something happens in the circuit and it makes them crazy. I fixed problem by ordering another relay board without those shift registers and wiring 7 relays directly to the gadgeteer socket pins (7 is max. per socket). No problems since.

You cannot fix it with software - I tried. I think the main problem is that shift registers are powered from relay board itself (5V output) and not from gadgeteer socket 5V pin. This kind of wiring also causes “chatter/all relays on” when you power the board without being connected to FEZ board.


#7

Warning: do not wire them directly without first checking if Cerberus is 5V tolerable!!!


#8

The ground is already connected through the header.

The design appears to have been done with Altium Designer and both the schematic and PCB show that the GROUNDS are all connected.

From your explanation, I would hazard a guess that the MCLR# input to the shift registers is seeing a reset pulse (LOW) as this would cause the 74HC595 to reset and all outputs would go LOW.

I see that GHI have a note about the driver issue and a workaround that would try to help but the reality is that the shift registers output would be LOW on power up causing the relays to be active until your software configured them.

By the way, my negative comments on the isolation only apply to the 3rd party relay board that GHI use here. The GHI board in principle is fine other than the reset issue.

I have a suggestion but it requires additional hardware but will allow you to have a reliable 16 relay board.

First of all, the Gadgeteer board needs to have the DNP for resistor R1 (0 ohm) for 3V3 connected and the track cut from the 5V power from the relay board. This will then ensure that the Gadgeteer interface is only powered from your main Gadgeteer board. You need this as my suggestion below removes the 12V so there won’t be any 5V from the relay board.

Second. Can you use a Gadgeteer relay (https://www.ghielectronics.com/catalog/product/464) board to switch the power to the relays? Use this to switch the +12V to the relay board only after your software has configured the shift registers.

Now all we have to do is figure out why your relays are toggling when you touch the relay contacts. That does not make sense considering that they are isolated from any part of the circuit. Can you show us a picture of your setup?

Is this with the board connected to your running system or powered up without any FEZ board connected?


#9

Are the led lights an inductive load, are you switching the 250v ac to a power supply that powers the led?

If so you probably are seeing a fly back from the inductor and getting arcing on the relay contacts.


#10

=> Cowboy : no, it’s only a poor 3W 250V led light… the relay is just acting like a standard wall switch button…

=> Hyperlisk : why have you bought another relay card without the the shift registers ? It not possible to use the GHI one , but wiring directly like you did ?


#11

You cannot use GHI directly because shift registers still work unless you cut 5V from the board to shift registers as Dave said. Then you can wire 7 relays directly or use Dave’s solution. I would probably cut that 5V line and wire 5V from the socket to see what happens.


#12

ok…

anyone has tried a capacitator in parallel (cf : http://www.relaypros.com/induction_suppression.htm)

(i don’t have one to make a test…)


#13

Radio Shack


#14

I use these for AC loads:

http://dx.com/p/ssr-25da-25a-solid-state-relay-white-134494?utm_source=GoogleShoppingUS&utm_medium=CPC&utm_content=134494&utm_campaign=410&gclid=CPH0uMD1grkCFaNxQgodH2AAYw

And you can drive them directly.

I haven’t tried this but it looks good:
http://dx.com/p/051101-solid-state-relay-module-w-fuse-blue-black-222518


#15

@ andre.m - I have used them a long time with no issue. That’s not to say I wont tomorrow. But then again I’m not doing anything but playing with stuff at home. Commercial application, another story.


#16

@ andre.m - I understand your point. Like I said I’m just playing around at home. I did hook up a110 V ac across the input to output on one just to see if it would take it and it did.


#17

Price is hard to beat too :wink:


#18

If I’m going to use it on DC low voltage stuff, sure, generic module is OK, but if it’s going to be used for anything high energy then I’d want a “reliable” sourced relay like Andre says. Even though I’m “cheap” I am (probably) not that cheap :slight_smile:


#19

it’s this kind of led light :

http://www.led-selection.fr/ampoule-led-e27-48-led-smd-3014-blanc-chaud,fr,4,T_0008048.cfm


#20

Andre’s point was typically you use capacitors to filter glitches that are caused typically by an inductive load - so it was unlikely to benefit your specific situation.