TV Remote Home Appliance Controller Using Arduino Nano(updated)

by alaminashik in Circuits > Arduino

1133 Views, 14 Favorites, 0 Comments

TV Remote Home Appliance Controller Using Arduino Nano(updated)

cover.jpg

In this project, I will be creating a simple Infrared based home automation system. The novelty of this project is that it is customized for a regular remote(TV, AC) to be used as a controller and has some other features like dim light, USB charger, and speed control. TRIAC was used to control the appliances.

All the project details are given below so that you can directly use them to customize your own!

Supplies

List of items needed:

1 x Arduino nano

1 x 0.5A charger circuit

1 x IR receiver shielded

2 x BT136 TRIAC

2 x MOC3021 TRIAC driver

2 x blue LED

3 x Green LED

1 x LDR

1 x Resistor equal to LDR resistance

2 x push button

1 x 5V buzzer

2 x 220-ohm resistor

2 x 470-ohm resistor

1 x 0.1nF capacitor

1 x 100-ohm resistor

3 x screw terminal connector 2 pin

1 x Vero board

3mm PVC board

Glue gun and soldering

Theory

IR-remote-Concept.png

Infra-red remote works by sending a stream o binary data, this is achieved by turning on and off an infra-red light at a high frequency(38.5KHz). This signal is detected by a receiver that contains photo-sensitive cells. The binary data is fed to the microcontroller which interprets the data and performs an action. We can see this data in decimal or hex or in other number systems.

I would highly recommend you check the details about this from an article by London's global university LINK

Connect the IR Receiver to Arduino Board

sensor pinout.jpg
code check circuit build.jpg

With the theories out of the way, let's connect the IR receiver with Arduino and determine decimal codes for remote buttons. In this step, we check if the IR sensor works correctly and record the decimal values that correspond to our interested remote buttons.

Connections:

IR signal ------> Arduino pin 2

IR GND ------> Arduino GND

IR VCC ------> Arduino 5V

Arduino ------> PC

Determine IR Received Data

code check.jpg
dec code.jpg
hex code.jpg

We utilize the library IRremote.h to communicate with the IR receiver. This library is really useful in making our code simpler. After connecting the sensor upload the program and open the serial monitor.

You should see some value on your screen as you press the buttons. You can either see them as decimal values(pic 1) or in hex form(pic 2)

Note: if nothing appears on the serial monitor, check the connections. Reversing the 5V and GND pin of the sensor can burn the sensor.

Downloads

Schematic

schematic.jpg

Code

full code 2.jpg
full code 1.jpg

The full code has been added below. Comments after each line are added to understand how it works.

Tweak the code to add or remove features!

Downloads

Build the Circuit on Breadboard

code test.gif

In this stage, we build the circuit on a breadboard to see if everything works properly. It is suggested to build the whole circuit on a breadboard before soldering everything on a Vero board.

Be careful while testing and while connecting the TRIAC

Build the Circuit

circuit build.jpg
circuit build 2.jpg

Create an outline of the components on a Vero board to fit everything perfectly. I used thicker wires to connect everything. Use sufficient solder to secure everything.

While adding the connections keep in mind that the infra-red sensor, LDR sensor, and buttons are to be placed on the front side. So use wires to extend the connections.

I used three screw terminal connectors for the power source, fan and motor.

Make the Enclosure

20220528_105711.jpg

I used a 3mm thick PVC board to make the enclosure. It is really to cut with an anti-cutter and hard enough to hold everything together.

You can make a 3D model before cutting the board, this will help to make accurate measurements and make the project more compact.

Setup

setting box.jpg

Connect the dim light at the top;

make holes for buttons, IR sensor, and LDR sensor;

Use sufficient hot glue to secure everything in place.

Success

Screenshot 2023-02-23 205403.jpg
real life use.jpg

Finally, I used carbon wrapping paper to give it a nicer look. check the video below of real-life application.