Phone Controlled Home Automation Via Wifi

by Imetomi in Circuits > Electronics

4215 Views, 60 Favorites, 0 Comments

Phone Controlled Home Automation Via Wifi

DSCN0142.JPG
DSCN0143.JPG
DSCN0147.JPG
DSCN0146.JPG
DSCN0144.JPG
DSCN0129.JPG
DSCN0131.JPG
DSCN0134.JPG
DSCN0128.JPG
DSCN0135.JPG
DSCN0138.JPG
My home's main function is to give me and for my family a safe place, and I just want to make my house a little bit safer and smarter using the LinkIt One development board, that is one of the best board that I saw, but I'll write later abut the board. So in this Instructable I'll show you how to build adevice that's able to send you notifications if detects fire or motion in your room/house.

This Instructable contains two parts: The lights and other devices can be controlled with a smartphone or with an infrared remote controller. You can download both of the codes...

Why I made this gadget? Fire is one of the most terrible accidents in the world and that inspired me to make this home automation project with a build in fire sensor. On my mobile phone the data connection is almost always turned on, but I don't use for surfing on the internet, so if I get a new e-mail I can read it right now. This sytem can send an e-mail if detects fire. The fire emmits a lot of IR light that can be detected by an infrared led.

The fire causes 30,000 accidents per year, and I don't want to be the part of this number. With a simple device like this you may save your house, if you're not at home.

The LinkIt One board is connected to the local wifi network and using the Blynk application you can control devices with relays. In this instructable almost every sensor is made and designed by me. I made a 12 volt 3 chanell relay module, a 9 volt power supply, a fire sensor, and an 38kHz IR sensor with a test LED. The device has a simple transparent plexyglass cover that protects the circuits. The motion sensor is set to very sensitive and for 1.5 seconds. You'll need to have a basic knowledge about the LinkIt One and about the Blynk, because this instructable doesn't explains the basic informations, but don't worry, you can read many tutorials about the LinkIt One here at the Instructables. If you have questions please feel free to ask!

Building the DIY Modules (Relay)

DSCN0001.JPG
Relay-driver-circuit.png
DSCN0003.JPG
DSCN0004.JPG
DSCN0013.JPG
DSCN0019.JPG
DSCN0012.JPG
DSCN0014.JPG
DSCN0016.JPG
DSCN0015.JPG
DSCN0024.JPG
DSCN0021.JPG
DSCN0022.JPG
DSCN0025.JPG
DSCN0026.JPG
DSCN0028.JPG
DSCN0018.JPG

Of course if you have a relay module you can skip this step, but I'll explain here that howw I designed mine. So the circuit diagramm shows an input pin, that is connected to a digital pin on the LinkIt One, I used a 12v relay but works only with 9 volts because it's easier to make a 9 volt step up circuit. You can add a LED with a 2k resistor in paralell with the relay. If you're done you can test it with the LinkIt One and with a 9 volt battery. I used a 2n2222 transistor.

Building the DIY Modules (9v Power Supply)

tl496-converter.png
DSCN0029.JPG
DSCN0030.JPG
DSCN0031.JPG
DSCN0032.JPG
DSCN0033.JPG
DSCN0034.JPG
DSCN0035.JPG
DSCN0036.JPG
DSCN0037.JPG

Following the circuit you can build this step up converter. Connect the output to the relay module's power input, and connect the circuit's input to the 3v3 pin of the LinkIt One.

Building the DIY Modules (Fire Sensor)

DSCN0040.JPG
DSCN0041.JPG
DSCN0042.JPG
DSCN0044.JPG
DSCN0043.JPG
DSCN0052.JPG
DSCN0047.JPG
DSCN0048.JPG
DSCN0049.JPG
DSCN0045.JPG
DSCN0046.JPG

The easiest part in the project is to make the fire sensor.

  1. Connect the IR reciever LED to the a 5v positive pin.
  2. Connect the negative leg of the leg to the GND with a 470k ohm resistor.
  3. The signal comes out in the middle, at the connection of the LED an the resistor.
  4. If detects fire the output signal will be high.

After building the circuit I made some tests with a candle and with the Blynk application's analog read function.

Parts and Materials

DSCN0053.JPG
DSCN0066.JPG
DSCN0054.JPG
DSCN0062.JPG
DSCN0055.JPG
DSCN0056.JPG
DSCN0057.JPG
DSCN0058.JPG
DSCN0061.JPG
DSCN0064.JPG
DSCN0065.JPG
DSCN0059.JPG
DSCN0068.JPG
DSCN0069.JPG
DSCN0094.JPG

If you have already modules you don't need soldering iron fir this project, but it's good to have a glue gun and a saw.

Parts:

  • Mediatek LinkIt One Developer Board
  • 1 Chanell Relay Module
  • Fire Sensor Module
  • IR Sensor (Optional)
  • IR Remote (Optional)
  • Motion Sensor
  • Wifi Antenna
  • GSM Antenna and SIM card (Optional for notification, I still can't make the SMS sending function but in the next weeks I'll make it)
  • USB Cable
  • Battery (Optional for prototyping)
  • Plexyglass
  • Plastic Pipes
  • A Lamp

And that's all you need for this project. It is much more easier with premade modules, but it's a bigger challenge if you make the modules.

The Code

DSCN0079.JPG

You can download here the IR decoder programm, the phone controlled code and the |R remote controlled code. Open serial monitor in the decoder file then press any button on your remote control. Or download the Blynk app and create a dashboard. You can see my decoded codes on the fourth image.

Prototypes

DSCN0006.JPG
DSCN0007.JPG
DSCN0009.JPG
DSCN0011.JPG
DSCN0017.JPG
DSCN0051.JPG
DSCN0050.JPG

Before making the main project I usually make some experiments and prototypes to be sure that everything works right.

Build the Circuit

DSCN0073.JPG
DSCN0071.JPG
DSCN0072.JPG
DSCN0074.JPG
DSCN0075.JPG
DSCN0076.JPG
DSCN0077.JPG
DSCN0078.JPG
DSCN0082.JPG
DSCN0083.JPG
DSCN0085.JPG
DSCN0086.JPG

First connect the power supply to the LinkIt One then:

  1. pin 8 to relay signal pin
  2. pin 5 to motion sensor
  3. pin 11 IR Sensor (Optional)
  4. pin 3 to fire sensor
  5. pin 9 to signal LED

The Cover

DSCN0070.JPG
DSCN0089.JPG
DSCN0087.JPG
DSCN0091.JPG
DSCN0088.JPG
DSCN0097.JPG
DSCN0090.JPG
DSCN0093.JPG
DSCN0092.JPG

I just glued the parts on a pllexyglass then connected together the wires. After this I made some tests with my phone.

The Roof

DSCN0095.JPG
DSCN0096.JPG
DSCN0098.JPG
DSCN0099.JPG
DSCN0101.JPG
DSCN0102.JPG
DSCN0103.JPG
DSCN0109.JPG
DSCN0111.JPG
DSCN0108.JPG
DSCN0105.JPG
DSCN0112.JPG

Glue plastic pipes on the main plexyglass then glue the other piece too.

Connect the Lamp

DSCN0114.JPG
DSCN0115.JPG
DSCN0117.JPG
DSCN0118.JPG
DSCN0119.JPG
DSCN0120.JPG
DSCN0121.JPG
DSCN0122.JPG
DSCN0126.JPG
DSCN0125.JPG
DSCN0123.JPG
DSCN0124.JPG

Remove the switch from the lamp and connect the wires to the relay's endings. Now you should be able to control the lamp with the Blynk app.

The End!

DSCN0139.JPG
DSCN0140.JPG
DSCN0107.JPG
DSCN0133.JPG
DSCN0132.JPG

Find a right place for your project and you're done. Thanks for the Instructables for this developer board, and if you like my home automation conception please vote on me.

Epilog Contest Campaing: If I win a Laser Cutter I'll use in my project, but it's main function would be to help for me in my school projects. I'm in an architecture class and the laser cutter would be a very good tool.

Sorry for the little details I'll write more tomorrow but I hope you liked, in my next Instructable I'll make a smart bracelet... Thanks for watching!