How to do home automation light and fan with TV remote?
Embedded system microcontroller 8052 series making home automation light and fan operate with any TV remote. Mainly use Keil c coding program can making operate between input and output pins of microcontroller 8052. First take microcontroller at89s52 40 pin, tsop1738 sensor, 5v Relay, microcontroller development board, 5v DC power supply and remote rc5.
![]() |
| Embedded system micro controller 8052 development board |
Keil C coding Example:
#include <reg52.H>
#define SWPort P1 // port definition
Sbit IR = P3^0; // pin's definitions (TSOP1738 sensor pin)
Sbit SW1 = P1^0;
Sbit SW2 = P1^1;
Sbit SW3 = P1^2;
Sbit SW4 = P1^3;
Sbit SW5 = P1^4;
Sbit SW6 = P1^5;
Sbit SW7 = P1^6;
Sbit SW8 = P1^7;
You can use every pin as signal from sensor Sbit SW1=P1^0; is connect single channel 5v relay. if you want eight relay you can connect 8bit port pin of Port one.
For every pin have different code pass signal, you need to take delay function, FLIP FLOP IR sensor. When doing Embedded C coding, first to know TV remote Encode then start to write program based on TV remote some are any king of remote some are particular remote, you can use universal remote-control TV.
When connecting IR sensor TSOP1738 to port pin P3^0; give power 5v and GND third pin to microcontroller 8051 port 3 i.e., P3^0;
In code flower brackets to storage data into ROM of microcontroller 8051. You need to know basic C language coding, then hardware parts, you can make mini projects on Microcontroller or Arduino Uno.
Special focus on single channel relay 5volts, it's also had three pin, 5v, Gnd and input pin. if you need eight channel relays of 5volts based on program you can change your opinion. Don't forget to put header file like as "#include <Reg51.h>".
}
}
The above code is for operate lights and fan through TSOP1738 sensor, the sensor pins +5v, Gnd, output these three pins are connect output pin to Port P3.0 pin. You can connect port 1 pin 1.0 to pin 1.7 total 8 pins connect to devices like three lights, two fans, bed light so on. You can operate with TV remote button 0 to 9 operate can do ON and OFF.
Latest Computer Stuff Kit Solutions of Topics 20.
Blog traffic – how to increase traffic to website
Mobile Internet connection - Browsers like Google chrome, Mozilla Firefox.
Desktop or Laptop Troubleshoot - Monitor, Processor, Hard disk RAM and ROM.

No comments:
Post a Comment