Project tutorial
Smart Energy Saver for Your Home

Smart Energy Saver for Your Home © LGPL

My aim is to minimize the loss of electricity there is when people forget to switch off their fans or lights, through smart home solution.

  • 26 respects

Components and supplies

Photon new
Particle Photon
A000066 iso both
Arduino UNO & Genuino UNO
I just used it for powering my 5V relay , you can even use a breadboard power supply.
11026 02
Jumper wires (generic)
1434509556 android phone color
Android device
12002 04
Breadboard (generic)
Relay Module (Generic)
Micro-USB to USB Cable (Generic)
To power the Particle Board

Apps and online services

About this project

There is a lot of electricity loss in homes due to the fans and lights that are kept on even when no one is present in the room. My idea is basically to inform a user that when he leaves his/her home, if any of the basic appliances like the fans or lights, televisions, fans or air conditioners are left on accidentally, which are the basic and major electricity consuming appliances of our house. Some appliances like televisions and air conditioners consume electricity even when just their switch board switches are on, it isn't much but a cumulative sum of a 1000 houses with the same condition would be a large enough number.

I have currently used an homemade extension device to demonstrate the working of the project. The following are the steps to create this fun project, so lets get started :

1. Things required to Build the Project hardware:

The things required to build this project are :

  • Particle Photon, the brain of the project
  • Breadboard
  • Relay Module, I have currently used a 2 channel relay module but you can do the same with multiple channels.
  • A power supply for your relay as the particle can only provide 3.3V, so I have used an Arduino UNO to suuply the relay but you can do the same with any external power supply.
  • Jumper wires for connections.

Now that we have all the things required, lets start and assemble our project!

2. Assembly of the Hardware :

After this, now we will do the connections as shown in the following schematic. But first lets observe the schematic diagram of the relay module and the particle photon.

We will connect the INT1 pin of the the relay module to the digital pin of the particle, I have currently used the pin 1 and 2 of the board but its your choice.

The Final Schematic of the project will be as follows:

After making the connections, your project will be looking something like this:

Now, as we are completed on the hardware side, we can proceed to the android app development part.

3. The App Development:

Now, we move on to the software part of the project. We will be using this awesome platform Blynk to create a very simple and basic app for our project. The steps to create a new project in Blynk are:

1. Download the Blynk app from the playstore.

2. Sign up to create a free account and start developing apps.

3. After that, create a new project and the choose the particle photon under boards section and the wifi option and hit create.

4. Now choose the following components as shown in the diagram :

  • A button to control the relays, ie the devices connected like lights and fans.
  • A GPS trigger to perform a particular operation when we leave the specified GPS.
  • Notification to generate a push notification whenever a person leaves his/her house so that he can turn off the appliances which were accidentally left on and hence save electricity.

4. Programming the Particle Board:

Now we have to program the particle board in order to establish a connection between the blynk app and the particle photon. This is accomplished by using the Blynk library which enables to create an easy and ready to go communication link between our device and the photon.

The code can be dumped into the particle board using the by signing into the particle site. The code is in the attachments.

So, that's it! Our project is ready for action. So go on, build it and have fun. Please feel free to ask any doubts you have regarding my projects through comments or personal messages.

This is a video demonstration of my project.


The Particle Build codeC/C++
This is the main code for particle programming
#define BLYNK_PRINT Serial  
#include <SPI.h>
#include <blynk.h>

volatile int state = LOW;
char auth[] = "Your Authentication code";
BLYNK_WRITE(V0)   // GPS Trigger
  GPSflag = param.asInt();  // Set the flag to 1 or 0

BLYNK_WRITE(V1)   // Button that does something if GPSflag is 1
  if (GPSflag == 1)   // Check flag
    //  Do something if flag is 1
    digitalWrite(2, high)
  else {
    //  Do something else and/or give feedback that something is not allowed in this location
     digitalWrite(2, low)
void setup()
attachInterrupt(D2, notifyOnButtonPress, RISING);

void notifyOnButtonPress()
state = !state;

void loop()
if (state == HIGH) 
 Blynk.notify("You are out of your house!");
 delay (200);
 state = LOW;


The Schematic Diagram for connections
Schematic opyfwuc1k0


Similar projects you might like

Smart Doorbell

Project showcase by Kaustubh Agarwal

  • 108 respects

Smart Home - Smart Rules using ARTIK Cloud & Photon

Project tutorial by Raghavendra Ponuganti

  • 12 respects

Smart Plug

Project tutorial by xXarduino_11Xx

  • 13 respects

Smart Vent System

Project tutorial by Gabi Zuniga

  • 17 respects

Smart Garden

Project showcase by patel Dipen

  • 59 respects

Smart Energy Monitor Based on Arduino

Project tutorial by Mohamed Maher

  • 14 respects
Add projectSign up / Login