Mechanical Relay
Description
Mechanical relay are present on OI-RelayHP module.
Characteristics
Requirements |
Value |
Remark |
---|---|---|
Maximum voltage (AC) |
400V (RMS) |
|
Maximum voltage (DC) |
30V |
|
Maximum current |
6A |
|
Internal fuse protection |
6.3A |
on ‘COM’ input |
Isolation |
1500VDC |
Code examples
The example code above demonstrates how to set the relay on an OI-RelayHP module. Note that normally closed (NC) output will be disconnected from ‘COM’ when you set the relay value to ‘HIGH’
#include "OpenIndus.h"
#include "Arduino.h"
OIRelay relay;
void setup(void)
{
/* Nothing to do in setup */
}
void loop(void)
{
/* Activate all */
relay.digitalWrite(RELAY_1, HIGH);
relay.digitalWrite(RELAY_2, HIGH);
relay.digitalWrite(RELAY_3, HIGH);
relay.digitalWrite(RELAY_4, HIGH);
delay(1000);
/* Deactivate all */
relay.digitalWrite(RELAY_1, LOW);
relay.digitalWrite(RELAY_2, LOW);
relay.digitalWrite(RELAY_3, LOW);
relay.digitalWrite(RELAY_4, LOW);
delay(1000);
}