Main Site Documentation

Cerberus + RelayISOx16


#1

Hi

On my first application i encounter a problem with the relay board.

        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {                                     
            GT.Timer tm = new GT.Timer(1000);
            tm.Tick += new GT.Timer.TickEventHandler(tm_Tick);
            tm.Start();
            
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
        }

        void tm_Tick(GT.Timer timer)
        {
            relayISOx16.EnableRelay(RelayISOx16.Relay.Relay_1);
            Thread.Sleep(500);
            relayISOx16.DisableRelay(RelayISOx16.Relay.Relay_1);
        }

The relay board is powered with 12V.

At startup, if i set a breakpoint before the Start() of the timer, all leds on the relay board are Off (i hear on “Clac”).

But as soon as i call EnableRelay method, all leds are ON except the 4 on the center of the board (L4, L5, L12, L13) (i hear a “Clac” again) and after that, nothing happens
it’s like the board enters an “error state”…

it sounds familiar for someone ?

SENSEI


#2

no one has tried to work with the RelayISOx16 board ? i’m asking for some piece of running code… Perhaps my problem is on wiring or powering the board ???


#3

@ SENSEI - We were unable to reproduce your error, using the code your provided, using the latest firmware and tested on all applicable sockets.


#4

@ James, thanks for your time !

can it be a hardware problem on the relay board ? is there some diagnostic utility to run to check this ?

i was not able to find any tutorial on this board, do you have one ?

SENSEI


#5

@ SENSEI -

Did you put a Thread.Sleep(TImeout.Infinite) at the end of your main ? Instead of what possibly the program exit before executing all the code on the module…


#6

It’s a gadgeteer ProgramStarted() routine not a Main() routine, so thread.sleep for ever is a bad idea.


#7

@ LouisCpro - Gadgeteer template does it for him.


#8

@ Architect -

OK, effectively…


#9

Another idea after what I will definitively consider I’m out of order : How much Amper does your 12V power supply can deliver ? Is it the same as the one that supply your board ?


#10

thanks (in advance) for your help guys !

my power supply is : hq power ps1503sb ( 0-15V , 0-3A)

i’ve wired my power supply like that : (+) on the 12V on the board and (-) on the GND of the board…


#11

precision : my mainboard is supplied by usb and i’m also supplying the relay board, but this time in +12V…


#12

Does your board and Relay module have the same GND Reference ???


#13

i’m not sure : i don’t know if the GND of the relay board (where i plug the (-) of my power supply) is connected to the gnd of the mainboard through the socket ???

sorry for the electric newbie question, but : must they share the same ground ??


#14

They do not need to be. The relays are optically isolated.


#15

So if I understand well, the power supply on the relay module is for the secondary power ? If yes, this means that all the relay are powered by the USB of the mainboard, which can be less than sufficient…


#16

to be honest, i’m not sure what to do exactly because the lack of tutorials or blog article on the relay board.

i’ve seen a 12V/GND connector on the relay board and so i’ve supplied +12V here…
without this secondary power supply, i hear nothing on the relays…

and with this power supply, i see leds and hear “Clacs” at startup. the leds or off, (GOOD thing i think…)

this.relayISOx16.DisableAllRelays();

nothing happens

this.relayISOx16.EnableRelay(RelayISOx16.Relay.Relay_10);

= “CLAC” on all of the relays and leds in the “error state” i described… after that, nothing happens even if i call

this.relayISOx16.DisableAllRelays();

again


#17

Dont know if Gus will agree, but yu can start by using external power supply instead of USB, and see if it changes something…

If not, check the Gadegeteer cable and connections, to verify that there is not mistake in +/-. What is the type of connection with the module…I2C ?


#18

i’ve changed the gadgeteer cable = same behavior

@ gus : if a led in on on the relay board, the corresponding relay is supposed to be enabled or disabled (because it’s red led…) ?


#19

No, the mainboard only supplies power to the IC’s (I believe), but I know that the 12V connection is for the internal switching mechanism in the relays, which will supply no power out of the relay. Each relay must be connected an wired individually for the desired power output.


#20

When the LED is on, the relay is on, this is a power indicator, regardless of color. We will add a tutorial as soon as possible.