Arduino 4 Channel Infra-Red Remote Controlled ON/OFF Switch

The project published here allows turning ON and OFF  lights fans using infra red remote.  Project consist 4 channel Nano relay shield, low cost infra-red remote.  The project can control Fan, AC lamps AC230V/AC110V or DC load upto 7Amps.


  • Supply 12V DC
  • Current consumtion 250mAmps ( When All Relays are in On State)
  • Relay Switch Load 7Amps AC /DC

Arduino Pins

  • 4 Relay: Arduino Pin D2, D3, D4, D5
  • Infra-Red Receiver TSOP1838: Arduino Pin D6

Arduino Code Github

Download Arduino Code

Download PDF Schematic

Download Infra Red Library

Decoding the IR code is important to pair any Infra-Red transmitter with the receiver, check bellow link to understand the decoding of IR signal from various infra-red remote protocols.

How to Setup the IR Remote ( Link)

Adafruit Receving and Decoding Infra Red Code (Link)

Infra-Red Code Decoder (Arduino Code)

#include <IRremote.h>

int IRPIN = 6;

IRrecv irrecv(IRPIN);

decode_results result;

void setup()
Serial.println(“Enabling IRin”);
Serial.println(“Enabled IRin”);

void loop()
if (irrecv.decode(&result))
Serial.println(result.value, HEX);

Arduino Code – 4 Channel IR Remote Controlled  On/Off Switch

* 4 Channel Arduino Infra Red Remote Controller with Relay
* Circuit diagram, PCB Layout and Arduino Code available on our website
* Code Author Ken Shirriff


#include <IRremote.h>

int RECV_PIN = 6;
String IRButton1 = “FD20DF”;//SWITCH 1
String IRButton2 = “FDA05F”;//SWITCH 2
String IRButton3 = “FD609F”;//SWITCH 3
String IRButton4 = “FD10EF”;//SWITCH 4
const int ledPin1 = 2;// Relay 1
const int ledPin2 = 3;// Relay 2
const int ledPin3 = 4;// Relay 3
const int ledPin4 = 5;// Relay 4

IRrecv irrecv(RECV_PIN);

decode_results results;
int button1 = 0;
int button2 = 0;
int button3 = 0;
int button4 = 0;

void setup()
irrecv.enableIRIn(); // Start the receiver
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
BUTTONPRESSED = String(results.value, HEX);
Serial.print(“BUTTONPRESSED “);

//button 1
if (BUTTONPRESSED == IRButton1) {
if (button1 == 0) {
button1 = 1;
button1 = 0;
if (button1 == 1) {
digitalWrite(ledPin1, HIGH);

digitalWrite(ledPin1, LOW);

//button 2
if (BUTTONPRESSED == IRButton2) {
if (button2 == 0) {
button2 = 1;
button2 = 0;
if (button2 == 1) {
digitalWrite(ledPin2, HIGH);

digitalWrite(ledPin2, LOW);

//button 3
if (BUTTONPRESSED == IRButton3) {
if (button3 == 0) {
button3 = 1;
button3 = 0;
if (button3 == 1) {
digitalWrite(ledPin3, HIGH);
digitalWrite(ledPin3, LOW);

//button 4
if (BUTTONPRESSED == IRButton4) {
if (button4 == 0) {
button4 = 1;
button4 = 0;
if (button4 == 1) {
digitalWrite(ledPin4, HIGH);
digitalWrite(ledPin4, LOW);

irrecv.resume(); // Receive the next value


Arduino 4 channel on-off (toggle) switch

Arduino based 4 channel toggle switch using 4 relays, 4 tactile switches, an Arduino Nano, the circuit required 12V DC, the relay can handle load up to 7Amps 230V DC or 7Amps/30V DC.

Download Arduino Code

Download PDF Schematic

Download Code>>>> Github




int SWITCH1 = A3;
int SWITCH2 = A4;
int SWITCH3 = A5;
int SWITCH4 = 7;

int RELAY1 = 5;
int RELAY2 = 4;
int RELAY3 = 3;
int RELAY4 = 2;

//States for RELAY-1 and SWITCH-1

int state1 = HIGH; // the current state of the output pin
int reading1; // the current reading from the input pin
int previous1 = LOW; // the previous reading from the input pin

//States for RELAY-2 and SWITCH-2

int state2 = HIGH; // the current state of the output pin
int reading2; // the current reading from the input pin
int previous2 = LOW; // the previous reading from the input pin

//States for RELAY-3 and SWITCH-3

int state3 = HIGH; // the current state of the output pin
int reading3; // the current reading from the input pin
int previous3 = LOW; // the previous reading from the input pin

//States for RELAY-4 and SWITCH-4

int state4 = HIGH; // the current state of the output pin
int reading4; // the current reading from the input pin
int previous4 = LOW; // the previous reading from the input pin

// the follow variables are long’s because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time1 = 0; // the last time the output pin was toggled
long time2 = 0;
long time3 = 0;
long time4 = 0;

long debounce1 = 200; // the debounce time, increase if the output flickers
long debounce2 = 200;
long debounce3 = 200;
long debounce4 = 200;

void setup()
pinMode(SWITCH1, INPUT);
pinMode(SWITCH2, INPUT);
pinMode(SWITCH3, INPUT);
pinMode(SWITCH4, INPUT);

pinMode(RELAY1, OUTPUT);
pinMode(RELAY2, OUTPUT);
pinMode(RELAY3, OUTPUT);
pinMode(RELAY4, OUTPUT);


void loop() {

reading1 = digitalRead(SWITCH1);
reading2 = digitalRead(SWITCH2);
reading3 = digitalRead(SWITCH3);
reading4 = digitalRead(SWITCH4);

// if the input just went from LOW and HIGH and we’ve waited long enough
// to ignore any noise on the circuit, toggle the output pin and remember
// the time
//Condition Relay 1
if (reading1 == HIGH && previous1 == LOW && millis() – time1 > debounce1) {
if (state1 == HIGH)
state1 = LOW;
state1 = HIGH;

time1 = millis();

//Condition Relay 2
if (reading2 == HIGH && previous2 == LOW && millis() – time2 > debounce2) {
if (state2 == HIGH)
state2 = LOW;
state2 = HIGH;

time2 = millis();

//Condition Relay 3
if (reading3 == HIGH && previous3 == LOW && millis() – time3 > debounce3) {
if (state3 == HIGH)
state3 = LOW;
state3 = HIGH;

time3 = millis();

//Condition Relay 4
if (reading4 == HIGH && previous4 == LOW && millis() – time4 > debounce4) {
if (state4 == HIGH)
state4 = LOW;
state4 = HIGH;

time4 = millis();

digitalWrite(RELAY1, state1);
digitalWrite(RELAY2, state2);
digitalWrite(RELAY3, state3);
digitalWrite(RELAY4, state4);

previous1 = reading1;
previous2 = reading2;
previous3 = reading3;
previous4 = reading4;

Multi-Output Power Supply (Output 12V, 5V, 3.3V, 1.2V to 10V)

The multi-output power supply is a very useful project for hobbyist, the small module provides 12V, 5V, 3.3V, and 1.2 V to 10V adjustable from 15V  to 30V 3A DC input. If you have a spare laptop power adapter can help as an input power source. Can power many Arduino projects. The project has been designed using LM2576ADJ, LM317-ADJ Regulator.


  • Output 1:  12V 1.5Amp
  • Output 2:  5V-500mA
  • Output 3  3.3V-500mA
  • Output 4:  1.2V-10V 500mA
  • Input 15V-30V DC OR DC Jack for Laptop SMPS 19V DC (3Amps)

Download PDF PCB Layout

Gerber File for This Project Available On Request

Schematic LM2576ADJ, LM317-ADJ

Arduino Nano 4 Channel Relay Shield

The Relay Shield is a module with 4 mechanical relays that provides you an easy way to control high voltage using Arduino Nano. 4 Channel Relay Arduino Nano shield contains onboard 4 relays, TSOP1838 Infra-Red Sensor, NRF24L01 RF transceiver module, 4tactile switches.  The circuit described here can be used for many applications like the infra-red remote controller, RF remote controller, 4 channel toggle switch.

Download PDF Document


  • Supply 12V DC
  • 4 Relay with Normally Open/ Normally Closed Switch
  • The relay can handle 7Amps 230V AC or 30V DC
  • On-Board TSOP1838 Infra-Red Receiver
  • On Board 4 Tactile Switches
  • On-Board NRF24L01 RF Module



Hi-End Headphone Amplifier for DACs Differential Signal input

Simple stereo headphone amplifier for audio DACs required a differential signal. The circuit works with dual +/-5V DC supply, the project can drive load 16 Ohms to 600 Ohms. Headphone amplifier provides output 50mW into 32 Ohms. Signal for the right channel and left channel input is applied to the amplifier through connectors CN1and CN3, respectively. The source such as an audio analyzer or audio digital-to-analog converts (DAC). The positive input from the source connects to the pin labeled I1+/I2+, the negative input from the source connects to the pin labeled I1-/I2-, and the ground connection from the source connects to the center pin of CN1 and CN3, labeled GND. Output connections are provided through the use of the CN2, CN4 provided to power up the board, D1 power LED. OPA1688 or OPA1622 op-amps are good for the applications.

Download PDF Document


  • Supply Input +/-5V DC
  • Load 16 Ohms to 600 Ohms (32 Ohms Ideal)
  • Output Load 50mW into 32 Ohms Headphone
  • Frequency Response 20 Hz to 20 kHz

3 Amps power operational amplifier using lm675

Power operational board can drive high current load up to 3Amps, the board helpful to drive Dc Motor, solenoid, Lamp, LED and industrial application. The project built around LM675 power op-amp from texas instruments. All resistors are 1%. Refer datasheet of LM675 for further information.

I Output= VIN X 2.5amps/volt

i.e Iout=1A when VIN=400mV

Trimmer Pot for Max Rout

Download PDF PCB Layout

The LM675 is a monolithic power operational amplifier featuring wide bandwidth and low input offset voltage, making it equally suitable for AC and DC applications.

The LM675 is capable of delivering output currents in excess of 3 amps, operating at supply voltages of up to 48V. The device overload protection consists of both internal current limiting and thermal shutdown. The amplifier is also internally compensated for gains of 10 or greater.


  • 3A Current Capability
  • AVO Typically 90 dB
  • 5 MHz Gain Bandwidth Product
  • 8 V/μs Slew Rate
  • Wide Power Bandwidth 70 kHz
  • 1 mV Typical Offset Voltage
  • Short Circuit Protection
  • Thermal Protection with Parole Circuit (100% Tested)
  • 16V–48V Supply Range ( +/-12 To 24V DC)
  • Wide Common-Mode Range
  • Internal Output Protection Diodes
  • 90 dB Ripple Rejection


Original Circuit from Texas Instruments Data Sheet

Audio line receiver/Studio Grade 2-channel audio line receiver using ina1650

Professional stereo audio line receiver is based on INA1650 device is designed to require a minimum number of external components to achieve data sheet level performance in audio line-receiver applications. Circuit shows the INA1650 used as a differential audio line receiver in split-supply systems that are common in professional audio applications. The line receiver recovers a differential audio signal which may have been affected by significant common-mode noise. The INA1650 is a high common-mode rejection audio line receiver from the Sound Plus line of audio Amplifier products from Texas Instruments.

  • Supply +/- 15V DC
  • Common-Mode Rejection Ratio (CMRR) VIN = 1 Vrms at 1 kHz –90 dB
  • THD+N at 1 kHz VIN = +22 dBu –120 dB
  • Second Harmonic – VOUT = 10 Vrms, F = 1 kHz –134.35 dBc


  1. C1,C2 10uF/25V SMD 1210
  2. C3, C7, C10, C12 10uF/35V Non Polar
  3. All Resistors SMD 0805 5%
  4. C6,C11  10uF/35V SMD 1206
  5. C2, C5, C8, C9, SMD 0805
  6. LED SMD 0805
  7. INA1650

The dual-channel INA1650 and single-channel INA1651 (INA165x) SoundPlus™ audio line receivers achieve an extremely-high common-mode rejection ratio (CMRR) of 91 dB while maintaining an ultra-low THD+N of –120 dB at 1 kHz for 22-dBu signal levels. Precision matching of on-chip resistors gives the INA165x devices excellent CMRR performance. These resistors have matching that is far superior compared to external components and are immune to mismatches introduced by printed circuit board (PCB) layout. Unlike other line receiver products, the INA165x CMRR is characterized over temperature and tested in production to deliver consistent performance in a wide variety of applications.

The INA165x devices operate over a very-wide-supply range of ±2.25 V to ±18 V, on 10.5 mA of supply current. In addition to the line-receiver channels, a buffered mid-supply reference output is included, making the INA165x configurable for dual- or single-supply applications. The mid-supply output can be used as a bias voltage for other analog circuitry in the signal chain. These devices are specified from –40°C to +125°C.


  • High Common-Mode Rejection:
  • 91 dB (Typical)
  • High Input Impedance: 1-MΩ Differential
  • Ultra-Low Noise: –104.7 dBu, Unweighted
  • Ultra-Low Total Harmonic Distortion + Noise:
  • –120 dB THD+N (22 dBu, 22-kHz Bandwidth)
  • Wide Bandwidth: 2.7 MHz
  • Low Quiescent Current: 6 mA (INA1651, Typical)
  • Short-Circuit Protection
  • Integrated EMI Filters
  • Wide Supply Range: ±2.25 V to ±18 V

Lm2596-ADJ Buck Regulator output adjustable 1.2v to 35v load up to 3amps

High efficient and compact project is capable of driving a 3Amp load with excellent line and load regulation with output adjustable 1.2V to 35V DC.  The project built around LM2596ADJ regulator which is ideally suited for easy and convenient design of step-down switching regulator using buck converter topology. Adjustable output version of LM2596 is internally compensated to minimize the number of external components to simplify the power supply design. PCB dimensions 39.65 X 33.20MM


  •     Adjustable Output Voltage Range 1.23 V 35 V
  •     Guaranteed 3.0 A Output Load Current
  •     Wide Input Voltage Range up to 40 V
  •     150 kHz Fixed Frequency Internal Oscillator
  •     Thermal Shutdown and Current Limit Protection
  •     Internal Loop Compensation
  •     Moisture Sensitivity Level (MSL) Equals 1


  •     Simple HighEfficiency StepDown (Buck) Regulator
  •     Efficient regulator for Linear Regulators
  •     OnCard Switching Regulators
  •     Positive to Negative Converter (buck-boost)
  •     Negative StepUp Converters
  •     Power Supply for Battery Chargers

Bill Of Material
R1 4K7 SMD 0805
R2 1.21K 1% SMD 0804

Photo-diode amplifier using opa381/opa380 op-amp

This Simple Photo Diode Amplifier project is based on OPA381 Trans-impedance amplifiers. The circuit Convert Current Output of Photodiodes to Voltage. The circuit ideally suited for low noise amplification of very small photodiode current. The circuit required 5V DC and provides approx. 0.5V to 4V DC.


  • Supply 5V DC
  • Output 0.5V to 4V Approx.
  • Convert Current Output of Photodiodes to Voltage

About OPA381

The OPA381 family of Trans-impedance amplifiers provides 18MHz of Gain Bandwidth (GBW), with extremely high precision, excellent long-term stability, and very low 1/f noise. The OPA381 features an offset voltage of 25μV (max), offset drift of 0.1μV/°C (max), and bias current of 3pA. The OPA381 far exceeds the offset, drift, and noise performance that conventional JFET op amps provide. The signal bandwidth of a trans-impedance amplifier depends largely on the GBW of the amplifier and the parasitic capacitance of the photodiode, as well as the feedback

resistor. The 18MHz GBW of the OPA381 enables a trans-impedance bandwidth of > 250kHz in most configurations. The OPA381 is ideally suited for fast control loops for power level measurement on an optical fiber. As a result of the high precision and low-noise characteristics of the OPA381, a dynamic range of 5 decades can be achieved. This capability allows the measurement of signal currents on the order of 10nA, and up to 1mA in a single I/V conversion stage. In contrast to logarithmic amplifiers, the OPA381 provides very wide bandwidth throughout the full dynamic range. By using an external pull-down resistor to –5V, the output voltage range can be extended to include 0V.

5V & 12V Output DC-DC Converter with large current relay for cnc driver (Mach3)

Single Channel Large current relay board with dual DC-DC converter board is mainly designed for Hobby CNC, Routers, and Plasma cutters. Hobby CNC controller required multiple DC outputs to drive several things.  This board provides 5V DC and 12V DC 1Amp each. The dual supply helps driving LPT breakout board, Sensors, Limit switches and few other things required 5V and 12V.

The Relay has large current handle capacity can be used to drive spindles, solenoids, water pump, chiller,  The relay required TTL High signal to trigger or it has the facility to even trigger with GND signal.

Important project for CNC Hobbyist Mach3, Mach4 based CNC drivers 


  • Supply Input 15V to 35V DC
  • DC Outputs 5V @ 1A & 12V 1A
  • On-Board LED for Relay Output
  • Relay Contact 20Amp NC and 30 Amps No 230V AC
  • Relay Trigger 5V TTL in or GND input
  • Screw Terminal and 2 Pin Header Connector Provided for Supply Input
  • Screw Terminal and 2 pin header provided for 5V DC & 12V DC Output
  • 3 Pin Screw Terminal Provide for Relay output Connections NO/NC
  • 3 Pin Header Connector for TTL + Signal Trigger, and Low GND signal Trigger
  • Close The Jumper to trigger rely with low GND signal input

1 2 3 10