Boaz Lawnce
Published © GPL3+

Nano Relay Module

2 wire 8 channel Relay Module || Reduce your CPU workload by interface 74LS164N.

IntermediateShowcase (no instructions)13,772
Nano Relay Module

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
ULN2803A relay driver IC
×1
74LS164N Serial In Parallel Out Shift Register
×1
Sugar Cube Relay
×8
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
12VDC & 1 Amp Power Adapter
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Wiring

This circuit is drawn by Proteus ISIS. Pin 1 and 14 is connected with +5Volt. Pin 7 is connected with Ground.

Pin 2 is connected with Nano's digital pin 2

Pin 8 is connected with Nano's digital pin 3

Code

Code for Nano Relay Module

C/C++
const int data_pin = 2;
const int clk_pulse_pin = 3;
byte zero  = 0xff;
int time_interval = 1500;
void setup()
{
  pinMode(clk_pulse_pin, OUTPUT);
  pinMode(data_pin , OUTPUT);
}
void loop()
{
  for (int Bz = 0x00; Bz < 0xff; Bz++)
  {
    shiftOut(data_pin, clk_pulse_pin, MSBFIRST, Bz);
    delay(time_interval);
  }
}

Credits

Boaz Lawnce

Boaz Lawnce

11 projects • 38 followers
Electronics Engineer, Founder, Hobbyist....

Comments