Home Automation System Using Smartphone
How to Build a Bluetooth controlled Home Automation Setup Using Arduino
Would you like to computerize your home? Ever wished to control your machines with a swipe on your telephone? Or then again would you like to figure out how to construct robotization gadget for yourself?
In this instructional exercise, we'll investigate how you can control a light, fan or some other electrical machine in your space utilizing an Arduino. Toward the finish of the venture, you will have the option to control the associated load from your cell phone.
Quick Economics:
The entire arrangement takes under 15 minutes to design and would cost under $30. In addition, the steady expense of adding electrical apparatus boils down to just $1.5/gadget, which is very moderate for experimentation.
Required Material:
In order to get started, you’ll need the following components:
- 1x Arduino UNO (or Mega, Pro, Mini). We have used UNO in the example.
- 1x Solid state Relay(4 channel). (Read more about relays)
- 1x HC 05 Wireless Bluetooth Module (Read more about HC-05 at:)
- 1x Bulb
- Jumper wires
Hardware :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Arduino Bluetooth Controller (android)
- Arduino IDE.
CIRCUIT DIAGRAM
How to Connect Bluetooth HC-05 and Relay Module to Arduino
- Connect Vin and GND pin of Arduino to 5v and ground to hc-05 module
Connect the TXD pin on the HC-05 module with the RXD pin (Pin 0) of Arduino.
TXD on HC-05: Transmit data from the Bluetooth transceiver.
- Pin 0 on Arduino (RXD): Receive data on Arduino two-way by connecting these pins, we are establishing a two-way communication between Arduino and HC-05, so that we can turn the device get on/off with the command properly.
- connect VOC and ground of relay module to 5v and ground of arduino uno.
- connect IN1 of relay module to pin2 of arduino uno.(you can connect IN2,IN3,IN4,etc.., to pin 3,4,5...).
- connect C(common) of relay module to main supply and connect NO(normally open) of relay to one side of bulb and the other side of bulb goes to neutal.
Bluetooth Test: Checkpoint
Quick Test:
Whenever you have associated the HC-05 module with the Arduino, you can control the Arduino from 5v inventory or USB link. In the event that the red and blue LEDs on HC-05 are squinting, you have effectively matched the Bluetooth module with Arduino.
You can likewise check the Bluetooth network status utilizing the State pin to Arduino.
Setting up the Relay Circuit
Whenever you have designed the arrangement on Arduino, the subsequent stage is to associate the load with our relay module for example the light (for our situation). Here's a straightforward circuit that discloses how you need to wire the connection:
How about we make a stride back and comprehend what we're doing here. As appeared in the above graph, the relay module functions as an electronic switch. We are interfacing this in arrangement so we can open and associate the circuit from the micro-controller module.
Here's the manner by which you can wire up the relay module with Arduino:
Initially, interface the 5V and GND pins to the transport terminals on the breadboard.
Interface the IN1 pin to the relay board with PIN 2 of Arduino.
In the event that you have a multi-channel module (2, 4 or 8 channels), you can associate IN2, IN3 … IN(n) with various computerized pins of Arduino, and rehash the underneath ventures for designing different pins.
Subsequent to interfacing the signal pins to Arduino, we need to associate the AC load to the transfer module. Presently, on the off chance that you take a gander at the terminal block on the relay module, you would discover three slots.
We should comprehend what these slots truly mean:
C | Common |
NC | Normally Connected |
NO | Normally Open |
COM – Common Terminal:
It is the middle terminal, Power to the load is associated with this terminal.
NO -Normally open:
It acts like a switch. Since it remains regularly open, there will be no contact among COM and NO, When we trigger the relay module, it associates with COM by the electromagnet inside the hand-off and load gets the inventory, which forces up the light. Thus the circuit is shut until we trigger the state to low in the relay.
NC-Normally Closed:
It is consistently in contact with COM when the relay isn't powered. When the relay is triggered it opens the circuit.
In the consistent state (when the relay is off), the COM port is associated with NC (Normally Connected) port, which implies in the event that you interface the bulb on the NC terminal, it will remain ON in any event, when the relay will be OFF, as the circuit is as of now finished (That's the reason it's designated "ordinarily associated").
For our utilization case, we need to turn on the bulb just when we impart a sign from a smartphone. That's the explanation we associate the load on the NO (Normally Open) terminal, so when the relay is triggered from the Arduino, the contact brush flicks from NC to NO terminal, accordingly finishing the circuit.
0 Comments