Skip to main content

Automatic home appliances

 Automatic Home Appliances


Remote control electrical appliances 



Setting up IR sensor connection to Atmega 328P is very simple. Beside VCC and GND pin, the sensor has only one output pin that should be connected to one of digital pins of the Atmega 328P.


HC-05 has red LED which indicates connection status, whether the Bluetooth is connected or not. Before connecting to HC-05 module this red LED blinks continuously in a periodic manner. When it gets connected to any other Bluetooth device, its blinking slows down to two seconds. This module works on 3.3 V - 6V but you can use only 5V DC. this module use any Serial 

AMS1117 is a popular SMD package 3-pin voltage regulator that is available in many models for fixed and adjustable voltage requirements. The IC can deliver a maximum current of 1A and the output voltage can vary from 1.5V to 5V. It also has a low drop out voltage of 1.3V when operating at maximum current. pin number 1 GND, pin 2 OUTPUT, pin 3 INPUT.

ATMEGA 328P Microntroller


Code (c)

------------------------------------------------------------------------
Code non Copyable
------------------------------------------------------------------------
#include <IRremote.h>
const int RECV_PIN = 5;
IRrecv irrecv(RECV_PIN);
decode_results results;
int state1=1;
int state2=1;
int relay1=2;
int relay2=3;
char sms;

void setup()
{
  irrecv.enableIRIn();
  Serial.begin(9600);
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);
}
void loop()
{
  if(irrecv.decode(&results))
  {
    Serial.println(results.value, HEX);
    irrecv.resume();
    if(results.value == 0x1FE50AF)
    {
      digitalWrite(relay1,state1);
      state1 = !state1;
    }
    if(results.value == 0x1FED827)
    {
      digitalWrite(relay2,state2);
      state2 = !state2;
    }
    if(results.value == 0x1FE48B7)
    {
      digitalWrite(relay1,state1);
      state1 = !state1;

      digitalWrite(relay2,state2);
      state2 = !state2;
    }
   }

 if(Serial.available()!=0)
 {
  sms = Serial.read();
 }
 if (sms == '1')
 {
 digitalWrite(relay1,state1);
      state1 = !state1;
 }
 if (sms == '2')
 {
   digitalWrite(relay2,state2);
      state2 = !state2;
  
 }
if (sms == '3')
 {
       digitalWrite(relay1,state1);
      state1 = !state1;

      digitalWrite(relay2,state2);
      state2 = !state2;
 
 }
}
---------------------------------------------------------------------------------------------------------------

Full Schematic Diagram


Youtube Video










Comments

Popular posts from this blog

Fm transmitter circuit

Fm transmitter circuit Power supply   :-   Using power supply stable DC voltage 2 V to 3.7 V max. You can only use battery because battery is perfect for this circuit battery output doesn't any noise. Components  :- Transistor BC 547 , Resistance 100 ohm , 4.7 K ohm .   Capacitor 1nF, 47pF, 22pF.   Inductor 1uH. Condenser mic any . Resistance  :-   Using resistance 100 ohm +-5% changing 1/3 watt, 4.7 K ohm +-5% changing 1/3 watt. Capacitor  :-   1nF this capacitor number 102 non-polar, 22pF this capacitor number 22 non-polar, 47pF this capacitor number 47 non-polar. Inductor  :-   This part important part for any transmitter circuit, 1uH 5Turn 24SWG. Transistor  :-   BC 547  is an NPN Bipolar junction transistor. It is commonly  used  to amplify current. A small current at its base controls a larger current at collector & emitter terminals.  It has a transition...

FM transmitter using crystal

FM transmitter using crystal   Power supply   :-   Using power supply stable DC voltage 2 V to 3.7 V max. You can only use battery because battery is perfect for this circuit battery output doesn't any noise. Components  :-  Transistor BC 547 , Resistance 100 ohm, 4.7K ohm.   Capacitor 1nF, 47pF,              22pF.   Inductor 1uH. Condenser mic any .       Resistance  :-   Using resistance 100 ohm +-5% changing 1/3 watt, 4.7 K ohm +-5% changing 1/3 watt. Video link -  https://youtu.be/aV7K2NHrHTM 3 Volt Circuit Diagram Capacitor  :-   1uF this capacitor positive pin connect 4.7K ohm resistance one pin and another pin connect 2K ohm resistance one number pin. 5 Volt Circuit Diagram This Circuit Transmitter range 0.3 Kilometre (300 Metre) to 0.5 kilometre (500 Metre) without any obstacle otherwise range 0.2 Kilometre (200 metre) anywhere. It's a spy device. D...