0% found this document useful (0 votes)
123 views29 pages

IR Remote Mains Switching Project Report

This document describes a student project to implement IR remote control of mains power switching. It includes a circuit diagram and Arduino code to receive IR signals from a remote and control six relays connected to loads. The project was completed by Subhajit Das for their diploma in electronics and telecommunications engineering from Ramakrishna Mission Shilpamandira. The circuit uses an Arduino microcontroller board connected to an IR receiver and six-channel relay board to allow mains loads to be turned on and off remotely using the IR remote.

Uploaded by

Debabrata Adak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views29 pages

IR Remote Mains Switching Project Report

This document describes a student project to implement IR remote control of mains power switching. It includes a circuit diagram and Arduino code to receive IR signals from a remote and control six relays connected to loads. The project was completed by Subhajit Das for their diploma in electronics and telecommunications engineering from Ramakrishna Mission Shilpamandira. The circuit uses an Arduino microcontroller board connected to an IR receiver and six-channel relay board to allow mains loads to be turned on and off remotely using the IR remote.

Uploaded by

Debabrata Adak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Ramakrishna Mission

Shilpamandira
Electronics & Telecommunication Engineering

PROJECT REPORT ON:


IR Remote Mains Switching
CERTIFICATE

This is to certify that the project entitled as “IR


Remote Mains Switching” which has been
completed and submitted by SUBHAJIT DAS,
Roll No. (D………..-….) in partial fulfillment of
the requirement for the award of the degree of
Diploma in Electronics and
Telecommunication Engineering for the session
2013-2016 in the department of Electronics and
Telecommunication Engineering, Ramakrishna
Mission Shilpamandira.
……………………..
……………………...
(External Examiner) (Internal
Examiner)

CERTIFICATE

This is to certify that the project entitled as “IR


Remote Mains Switching” which has been
completed and submitted by SUBHAJIT DAS,
Roll No. (D………..-….) in partial fulfillment of
the requirement for the award of the degree of
Diploma in Electronics and
Telecommunication Engineering for the session
2013-2016 in the department of Electronics and
Telecommunication Engineering, Ramakrishna
Mission Shilpamandira.
D.C.O
Guided by
…………………
……………….......
(Gopika Nandan Pal)
(Debashish Pal)

ACKNOWLEDGEME
NT

We take the space here to express deepest sense


of gratitude to Debashish Pal sir for his kind
assistance and co-operation. We are really
indebted to him for the variable time he spent
with us clearing the doubt in spite of their busy
schedule. Indeed, this project report “IR Remote
Mains Switching” would never have been
successful without his deepest concerns and
hands of help.
We thank our department for helping us greatly
during the project.
At last but not the least we would like to thank
our batch mates for helping us to collect some
specific data regarding this project “IR Remote
Mains Switching”.
GROUP MEMBERS

Name Roll no.


Subhadip Saha 14
Rakesh Bera 15
Debabrata Adak 16
Sujit Sarkar 17
Krishnashri Maji 18
Saibal Sen 19
Suman Das 20
Raunak Sen 22
Subhajit Das 23
Utsab Maity 24
INDEX

Sl. No. Content Page


1. Objectives 1
2. Project Work Overview 2
3. Block Diagram 3
4. Circuit Diagram 4-9
5. Circuit Explanation 10-12
6. Program 11-15
7. Program Explanation 16
8. Component List 17-18
9. Applications 18
10. Advantages 18-19
11. Future Aspects 20
12. Conclusion
13. Snapshots
OBJECTIVES
 Learn microcontroller programming
concept.

 To be familiar with Arduino


microcontroller system.

 To get concept of IR based remote


control system.

 To make use of electronic relay control


circuitry.

 Mains switching using relay board


electronically.

 Above all to get a strong practical view


on theoretical knowledge.

Project Work
Overview
In the first day the project was decided. Components
requirement and cost are evaluated.

Next day the components was collected for1 relay


BLOCK DIAGRAM

PSU
SMPS
Support Board

IR Sensor Microcontroller

Relay
Output/Load Board

2
CIRCUIT DIAGRAM

PSU support board


(with SMPS) 3
Relay Board

4
Relay Board

5
Microcontroller Board
6
Front Panel
7
Packaging

8
CIRCUIT
EXPLANATION

Power Supply Unit: -


Here four diodes are used as full bridge
rectifier. Then input voltage is applied to
LM2940CT-5.0 voltage regulator. Then
output voltage is fed to the eight headers
(4+ve and 4-ve). The Green LED indicates
the healthy condition of the unit.
Relay board circuit: -
 The circuit consists of six relays. Each
relay can switch six individual load.
 Q (1,3,5,7,9,11) are relay drivers and Q
(2,4,6,8,10,12) are used to drive the even
numbered transistors as well as the
LEDs.
 The diodes are arranged to freewheel the
relays because current lags behind the
voltage so it does not immediately stop.

9
Microcontroller Module: -
 The U1 atmega328 microcontroller is
used as the brain of this system.
 The pin no. 7&20 and 8&22 is shorted
and acted as VCC and GND
respectively. Two headers are joined
with them.
 The six male headers (1 to 6) are
connected with the six relays.
 The three female headers are used to
receive VCC and GND and the one
signal from TSOP-1738 IR receiver.

Header no. Arduino pin Physical pin


1 D8 14
2 D7 13
3 D6 12
4 D5 11
5 D4 6
6 D3 5
IR D13 19

10
Pin Diagram:

LM2940CT-5.0

1. Input
2. GND
3. Output

Pin Description:
ATmega328
Pin No Connection
11-14 Relay board i/p
7,21 Vcc
8,20 GND
13 TSOP 1738 receiver

11
PROGRAM
#include <IRremote.h> // necessary for remote data
decoding
#include <FRONTECH_TV_Remote.h> // remote controller

const byte OUTPin[] = { // output OUT pin no


3, 4, 5, 6, 7, 8
};

const byte noOfOutputs = sizeof(OUTPin); // number of


OUTPUTs
boolean onStatus[noOfOutputs]; // states if OUT is ON (1) or
OFF (0)
boolean onStatusTemp[noOfOutputs]; // temporary onStatus
const byte Indicator = 9; // indicator blinks when remote data
recieves

byte i; // used for iteration control in loops

const byte RECV_PIN = 13; // recive pin for IR

IRrecv irrecv(RECV_PIN); // calling constructor of IRrecv


decode_results results; // decoded input results stored in results
object

boolean stateChanged = false;

void setup()
{
// defining all output pins as OUTPUT
for (i = 0; i < noOfOutputs; i++) {
pinMode(OUTPin[i], OUTPUT);
}
pinMode(Indicator, OUTPUT);
[Link](); // Start the receiver
12
// setting all OUTPUTs to off initially
for (i = 0; i < noOfOutputs; i++) {
onStatus[i] = false;
}
}

void loop() {
if ([Link](&results)) {
long recv = [Link];
[Link](); // Receive the next value
// checks for Remote control inputs
checkRemote(recv);
}
if (stateChanged) {
// switches the couputs accordingly
setOutputs();
}
delay(50);
}
// setting all OUT pins according to their respective onStatus
void setOutputs() {
// blinking indicator
digitalWrite(Indicator, HIGH);
delay(300);
digitalWrite(Indicator, LOW);
for (i = 0; i < noOfOutputs; i++) {
digitalWrite(OUTPin[i], onStatus[i]);
}
}

// returns true if any output is on


boolean getOUTAny() {
for (i = 0; i < noOfOutputs; i++) {
if (onStatus[i] == true) {
return true;
}
}
return false;
13
}
// checks remote data and sets onStatus
void checkRemote(long remoteValue) {
switch (remoteValue) {
case NUM_1 :
onStatus[0] = !onStatus[0];
stateChanged = true;
break;
case NUM_2 :
onStatus[1] = !onStatus[1];
stateChanged = true;
break;
case NUM_3 :
onStatus[2] = !onStatus[2];
stateChanged = true;
break;
case NUM_4 :
onStatus[3] = !onStatus[3];
stateChanged = true;
break;
case NUM_5 :
onStatus[4] = !onStatus[4];
stateChanged = true;
break;
case NUM_6 :
onStatus[5] = !onStatus[5];
stateChanged = true;
break;
case POWER :
stateChanged = true;
if (getOUTAny()) {
// setting all OUT pins to LOW
for (i = 0; i < noOfOutputs; i++) { // storing current
onStatus to temp location
onStatusTemp[i] = onStatus[i];
onStatus[i] = false;
}
}
else { //setting all OUT pins to HIGH
for (i = 0; i < noOfOutputs; i++) {
14
// retriving stored onStatus
onStatus[i] = onStatusTemp[i];
}
}
}
}

PROGRAM
EXPLANATION
Variables
OUTPin[] and onStatus[] used together to define their
respective value for a single load.
They represent different properties of same output.
Their index number must be same when accessing
them.
OUTPin[] contains the output pin numbers on the
microcontroller / arduino.
onStatus[] represents their on status, true(1) for on and
false(0) for off. Initially 0, as the all off.
Functions
void setup(), does initial setup (compulsory).
void loop(), loop through iterations.
void setOutputs(), sets outputs HIGH or LOW
depending on onStatus[].
boolean getOUTAny(), returns true if any output is on.
void checkRemote(long remoteValue), checks for
remote inputs, takes action on onStatus[] accordingly.
15
When user presses a button on the remote, the data is
received by IR receiver. Then it is decoded by decoder
library. Based on received data, output is switched.
For 1-6 output is directly switched. For power
button, current status stored and if any load is on they
turned off, or stored value is mimicked in output.

COMPONENT LIST
Relay Board
Sl.
Price
No Components Specification Quantity Total
(each)
.
PCV relay, 6v,
1. Relay 6 20 120
SPDT
Screw
2. 3 pin 6 20 120
Terminal
3. Transistor BC 547 12 5 60
4. Diode 1N4007 6 1 6
Blue, 2v 6
5. LED 1 7
Green, 2v 1
1.8kΩ, 0.25W 6 0.5 3
6. Resistor
330Ω,0.25W 7 0.5 3
7. Header 40pin male 1 Set 15 15
8. Vero Board IC vero 1 30 30
9. Wire Single core 2m 5 10
Total 374
Microcontroller Board
Sl. Components Specification Quantit Price Total
No y (each)
16
.
Microcontrolle
1. ATmega 328 1 150 150
r
2. Base 28 pin, 0.3” 1 5 5
3. Vero Board IC vero 1 10 10
40pin male 1 Set 15 15
4. Header
40pin female 1 Set 15 15
5. IR Receiver TSOP 1738 1 20 20
Total 215

PSU Support Board


Sl. Quantit Price
Components Specification Total
No. y (each)
1. 5v Regulator LM2940CT-5.0 1 35 35
470µF, 50v 1 5 5
2. Capacitor
10µF, 40v 1 3 3
3. Resistor 220Ω, 0.5w 1 1 1
4. LED Green, 2v 1 1 1
5. Header 40pin male 1 Set 15 15
Total 60
Packaging with Front Panel
Sl.
Quantit Price
No Components Specification Total
y (each)
.
3.5”x6”x2” 1 35
1. Plastic Box 65
4”x4”x2” 1 30
2. LED Green, 2v 7 1 7
3. Resistor 220Ω, 0.25w 7 0.5 3
4. LED Holder Small plastic 7 3 21
17
5. Switch Toggle, 2Amp. 1 7 7
6. Header 40pin male 1 Set 15 15
7. Shrink Tube 0.5cm 1m 10 10
Total 128

Sl No. Item Price/Costing Total


1. Relay Board 374
2. MCU Board 215
3. SMPS (6v) 250
1147
4. PSU Support Board 60
5. Packaging 128
6. Jumper 120

APPLICATIONS

Remote controlled AC equipment switching.


Light fan switching.
Car garage.
 Door switching.

ADVANTAGES
Any type of load can be switch (AC/DC) up
to few amps.
18
Easy to use.
Reliable as relay is use instead of
semiconductor device.
High efficiency as SMPS is used as power
supply, no semiconductor switch is used for
mains load switching thus negligible
semiconductor loss.

FUTURE ASPECTS
To cope with the modern generation everything has
to be IoT implementation thus devices should be
controlled using internet (or a standard network).
So an internet module can be added to this project,
for which space is left.
A common DTMF receiver cum decoder can also
be added for DTMF control.
Wi-Fi can also be implemented for using it as
wireless medium.
Bluetooth connection can also be established with
this device, for any non-Wi-Fi mobile.
For practical industrial implementation this points
has to be followed: 19
o Relay board size has to be flexible.
CONCLUSION

This project implements regular IR system


with standard IR remote. Thus as it is easy to
operate for the end user, it may also interfere with
equipment’s signal. The receiver has to be placed
where there is no other IR receiver is placed.
The relay board is hand constructed thus, it
can’t be directly implemented in ac mains. For
implementation the custom made or a standard
relay board has to be used.
The program is made to operate 6 loads. To
increase the no of load we can modify the
program and to decrease the no of load we may
just disconnect the relay connection.

20
EXECUTION

SNAPSHOTS

No Load is on

1st Load is turned on 21


2nd Load is turned on

22

Common questions

Powered by AI

Integrating additional wireless technologies could introduce challenges such as increasing system complexity, interfacing compatibility, additional power demands, and potential interference with existing IR signals. Thorough testing and design modifications would be required to address these integration constraints without compromising system reliability and performance .

The program processes IR inputs by checking remote signals and updating an array of statuses for multiple outputs. Each output corresponds to an OUTPin with an associated onStatus. The program ensures outputs switch according to their status, toggling them based on specific IR commands through the setOutputs function .

The key objectives of the IR Remote Mains Switching project are to learn microcontroller programming, become familiar with the Arduino microcontroller system, understand the concept of IR-based remote control systems, utilize electronic relay control circuitry for mains switching, and gain a practical understanding of theoretical knowledge .

Using an SMPS in the project offers advantages such as higher efficiency and reduced heat production due to its capability to switch electrical power at high speed. The design eliminates significant semiconductor losses associated with traditional linear power supplies, especially when dealing with AC load switching .

The microcontroller module uses an ATmega328, acting as the system's brain. Pins 7 & 20 and 8 & 22 are shorted for VCC and GND connections. Six male headers connect to the relays, while three female headers handle power and signals from the IR receiver. The configuration enables the microcontroller to control load switching based on IR input .

Future enhancements include integrating IoT capabilities, adding an internet module for connectivity, implementing a DTMF receiver for telephone control, or using Wi-Fi and Bluetooth for improved wireless communication. These additions would modernize the system and expand its versatility for both personal and industrial use .

The relay board circuit in the IR Remote Mains Switching project consists of six relays, each capable of switching individual loads. Relay drivers Q (1,3,5,7,9,11) and other transistors Q (2,4,6,8,10,12) manage the relays and LEDs. Diodes are arranged to allow freewheeling of current, preventing immediate stop due to lagging currents .

Relays provide more reliable control over semiconductor devices by offering mechanical switching with minimal power loss, suitable for higher power loads. This decision reduces potential failures seen in semiconductors under varied electric loads, affirming its reliability for consistent performance .

The IR Remote Mains Switching system offers benefits such as easy use, reliability due to relay use instead of semiconductors, and high efficiency by employing an SMPS for power supply. Its applications include remote switching of AC/DC loads, light fan switching, and control of garage doors and other equipment, allowing it to be broadly useful in households and industries .

The IR receiver decodes remote signals into data that the system's microcontroller interprets. The pin assigned to the IR receiver receives input, which is decoded and used to update the on/off statuses of connected loads based on pre-defined commands .

You might also like