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”…
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 ???
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…
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 ?
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 ??
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…
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…)
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.