Instruction
Relay is an automatic switching element with isolation function, which is widely used in remote control, telemetry, communication, automatic control, mechanical and electrical integration and power electronic equipment, and it is one of the most important control components. The relay module can be connected to the 240V AC or 28V DC power supply
to control all kinds of other electrical components. And the single chip microcomputer can be used to control the switch. The relay module can also be used in anti-theft, alarm, toys, construction and other fields.
2. Parameters:
Nominal voltage: 7~30V
Product series: 16channel relay
Rated current: 1.5A
Contact switch current: 250V
Contact load: 10A
power converter: need
Drive voltage: 5V
Optocoupler: With optocoupler protection
Aduino test code:
int BASE = 2 ; //the first relay contact with I/O pin
int NUM = 16; // Number of relays
void setup()
{
for (int i = BASE; i < BASE + NUM; i ++)
{
pinMode(i, OUTPUT); //define I/O pin as output
}
}
void loop()
{
for (int i = BASE; i < BASE + NUM; i ++)
{
digitalWrite(i, LOW); //define I/O pin prints “LOW”, gradually turns off relay
delay(200); //delay
}
for (int i = BASE; i < BASE + NUM; i ++)
{
digitalWrite(i, HIGH); // define I/O pin prints “HIGH”, gradually turns on relay
delay(200); //delay
}
}