• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeProjectControl Your Home Appliances Using Arduino And Rel ...
Previous Next

Control Your Home Appliances Using Arduino And Relay

Posted by: Olva , September 10, 2016
Picture of Control Your Home Appliances Using Arduino And Relay
Cover 02.JPG

Hello everyone, In this instructable we will be using Arduino And Relay module to control home appliances.

This instructable covers:

  1. Basics of Relays.
  2. Connecting Relays with Arduino.
  3. Controlling AC appliances using Relays.

How it works:

  • The relay uses an electromagnet to mechanically switch electric appliances.
  • A relay can be operated by a relatively small electric current that can turn on or off a much larger electric current.
  • Using relays is safe as there is no any physical contact between Arduino and AC.

Step 1: Gather the parts

Picture of Gather the parts

In order to Control Your Home Appliances Using Arduino and Relay we’ll need:

  1. An Arduino UNO
  2. A 5V Relay module
  3. Female jumper wires

Step 2: Wiring

Picture of Wiring
Wiring 02.png

Hookup all the components according to the circuit diagram shown above.

In the above wiring diagram, The pins VCC, GND and IN on the Relay module may vary depending on your Relay module. So, Refer to the data-sheet of your Relay.

For, connecting the AC bulb to the relay properly:

  • Connect live wire from AC wall outlet to Common port on relay and one terminal of AC bulb to Normally open terminal of Relay.
  • Then, Connect the other terminal of AC bulb to GND on the AC wall outlet.

Take proper precautions and care while connecting any wire to mains.

Step 3: Arduino sketch

Picture of Arduino sketch

Once you have hooked up everything properly upload the Relay.ino sketch to your arduino.

Unlike LEDs, Relays closes the circuit whenever the signal or input pin is connected to GND. (This may vary for other custom made relay modules.)

So, “digitalWrite(13, LOW);” turns on the bulb. While, “digitalWrite(13, HIGH);” turns off the bulb.

void setup() {

  pinMode(13, OUTPUT);

}

void loop() {

  digitalWrite(13,
LOW);

  delay(5000);              // wait for 5 seconds

  digitalWrite(13,
HIGH);

  delay(5000);              // wait for 5 seconds

}

Step 4: Done

Picture of Done

Now just power up your Arduino and the Relay to see your AC bulb turning on and off.

Thanks for viewing.

http://www.instructables.com/id/Control-Your-Home-Appliances-Using-Arduino-and-Rel/

Share!
Tweet

Olva

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors