How to: MikroElektrika Relay Click

Hey guys, I got a Relay Click from Mikroelektrika.
It contains 2 Omron relays that can be switched via PINs.
I have no idea if I get this board powered by a photon.

I have found examples with other Mikroelektrika boards at Hackster, but the connection is not yet clear to me.
On the one hand, the manufacturer advertises its use with MCU boards and its LibStock (which I find neither for Arduino, nor for Paricle).

Believe that I need a boost from you.

Hi @Postler

Looking at the web page, it is a 5V device so you will need that power supply to +5V and GND on the relay board. The you need to connect RL1 and RL2 to Photon/Electron pins like D0, D1 or A0, A1 and connect the grounds together between the relay board and the Particle device. If you are powering your Particle via the USB connector, +5V is available from that. Despite all the pins on the relay board, you only need to connect +5V, GND, RL1 and RL2 on the low voltage side.

Then you just use digitalWrite(pin,HIGH); to turn the relay on.

These little relays are fairly low current (5A AC) so you could switch one 100W light bulb with each but that would be about all.

Be careful with the high voltage side!

Thx! Worked! I did not think that the signal should be placed on RL1 or RL2. The whole works synonymous without Libary and how you sign just activate signal.

On / Off with:
const int RelayPin = 5;              
const int ledPin = 13;  // Arduino - use D7 with Photon

void setup() {
  Serial.begin(9600);
    
  pinMode(RelayPin,OUTPUT);      
  pinMode(ledPin,OUTPUT);

  digitalWrite(RelayPin,LOW); 
  digitalWrite(ledPin,LOW); 

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(RelayPin,HIGH); 
  digitalWrite(ledPin,HIGH); 

  delay(2000);

  digitalWrite(RelayPin,LOW); 
  digitalWrite(ledPin,LOW); 

  delay(2000);
}
1 Like
1 Like

Bump this thread: MikroElektronika has given me 5 vouchers worth 15%, which I gladly pass on to you here.
Please note that this can not be combined with the current promotion.
The code is “HACKSTER-INGO”

Happy Easter!

1 Like