Use your smartphone to turn on/off the power in your home
Source: InternetPublisher:ohahaha Keywords: Power supply smart phone smart switch Updated: 2024/12/31
With this project, you will be able to control the power on/off in your home just by using your smartphone .
background
This project was inspired by the fact that I used to hesitate to turn off the fan/heater when I woke up in the middle of the night. So I wanted to make a project that could do this by simply pulling the phone out from under the pillow.
Using an Android/Windows phone, one will be able to find paired Bluetooth devices, connect to the desired device and be able to turn on/off the fan/heater through it. It can also be used to turn on the coffee machine when you wake up.
The phone communicates with the JY- MCU Bluetooth Shield which is connected to the Arduino . The Arduino listens for the on/off commands and activates its GPIOs accordingly. Effectively turning on/off the power relay. You can connect any device like a fan/heater/coffee maker to it.
It requires assembly of the hardware and the application. The application can be downloaded for Android or Windows Phone. For those who want to build it themselves, the source code is provided below this article.
Building the Arduino Hardware:
Step 1: Connect Bluetooth
Connect the Bluetooth TX pin to digital pin 11 of the Arduino
Connect the Bluetooth RX pin to digital pin 10 of the Arduino
Step 2: Connect the LED
Connect the LED and resistor to digital pin 7 of the Arduino
Step 3: Connect the relay
Take a power cord and cut one of the wires to connect to the relay. Connect one end to the common terminal of the relay and the other end to the NO (Normally Open) terminal of the relay. Be careful that the strands do not touch any other parts. Connect the relay to the Arduino according to the schematic. Make sure the relay is on a non-conductive surface, preferably in a non-conductive enclosure. This is important because the bottom of the relay will expose the high voltage of the mains wires. Do not connect the power cord to the mains yet.
Connect the relay's pin In1 to the digital pin 6 of the Arduino.
Step 4: Upload the Code to the Arduino
The code is provided below this article
Upload it to the Arduino.
In the setup, it configures the Arduino pins and enables the serial port over Bluetooth.
In the loop, it will listen for commands from Bluetooth and turn on/off the LED and relay accordingly.
Matching mobile phone
The app connects to one of the paired Bluetooth devices. Therefore, it is important to pair your phone with the device.
(from Android/Windows Phone):
Go to Settings,
Turn on Bluetooth. Look for the device. It will have a name similar to HC-06.
Tap Pair.
You may need to enter your manufacturer's code.
Application (download or build):
You can download the app or build it yourself.
Download Link
Android App - https://drive.google.com/open?id=0Bzg1cjKxyHUBWXlPRDZMaXdkWkE
Windows Phone Store - http://windowsphone.com/s?ap-pid=dd4b173f-4179-413d-b9af-7bd2c753d55d
This app is not available in the Apple Store.
If you choose to download it, you can proceed to how to use the app.
Build the application
The application requires Xamarin Studio (for Android applications) and Visual Studio 2013 for Window Phone applications.
This step may require software and related licenses for the developed application.
It also requires the open source Nuget package MvvmC ross.
Run the application
It is very important to pair your Arduino with your phone before using the app. The app will only work with paired devices.
Start the application
Click Refresh
Select the desired device. (If you are using JY-MCU it will be something like HC-XX)
Click Connect
Wait for it to display "Connected Successfully".
Toggle Off to turn the device on. This will change the text on the button to On. This should turn the LED on and also turn on the light on the relay.
Toggle the button to turn it off. This should turn off the LED and relay lights
Now make sure the relay is not touching any conductive surface and connect its power cord to the power outlet and the fan/heater. Switch the device on/off via your phone.
- Car ice warning circuit sharing
- Use your smartphone to turn on/off the power in your home
- How to Build a Touch-Based Color-Changing Plant Using Arduino
- How to Make a Hot Tub Smart and Remotely Operated with a Raspberry Pi
- How to set up a cheap beam break sensor control distance scene using a reflector
- Star-delta step-down starting control circuit for squirrel cage asynchronous motor
- Motor self-starting circuit
- Design and analysis of a four-bit remote control component capable of remote reset
- Infrared detection alarm
- Password type motorcycle anti-theft device
- Photocell amplification control circuit
- Ringtone control circuit
- Electromagnet control circuit
- Assembly line outage monitoring circuit
- Three-phase stepper motor control circuit
- Timing and fire power control circuit
- Intelligent iron control circuit
- Temperature detection control circuit of electric hot water bottle
- Forward and reverse control circuit of micro DC motor b
- DC motor forward and reverse control circuit