Introduction to Our Project:
In this project we are going to light the bulb from remote location using web services. In this we are going to use one Arduino interfacing with 12 bulb using 3 relay module with low level trigger. We can trigger the relay from anywhere in the world using a website in which we’ll have GUI Button. In each trigger of relay the correspondence Bulb or group of bulb will glow.
Step 1: Installation of All Software
a) Installation of Arduino IDE:
You can download the latest Arduino IDE from this link:
b) Installation of Pagekite:
You can download the latest Pagekite from this link:
Step 2: Component Used:
For this project you need :
1) Arduino Mega 2560
2) Arduino Ethernet Shield
3) Relay Module
4) 12 led Bulbs
1) Arduino UNO:
Arduino/Genuino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button.
2) Ethernet Shield:
The Arduino Ethernet Shield 2 connects your Arduino to the internet in mere minutes. Just plug this module onto your Arduino Board, connect it to your network with an RJ45 cable and follow a few simple steps to start controlling your world pharmacy through the internet. As always with Arduino, every element of the platform – hardware, software and documentation – is freely available and open-source. This means you can learn exactly how it's made and use its design as the starting point for your own circuits. Hundreds of thousands of Arduino Boards are already fueling people’s creativity all over the world, every day.
3) Relay Module:
We have used 3 four channel relay module to control 12 led bulbs. As we are working with 220 volt ac we have to make sure that our connection are properly connected.Figure is given above.
Step 3: Circuit Diagram
Circuit diagram for Relay and Arduino:
For complete isolation with microcontroller we can wire up our circuit as below. Here we have to remove jumper used in jd-vcc and vcc. Connection are given in figure 1
Bulb connection with relay and Arduino:
Here we are connecting our relay to one single Bulb. In this there is no optical isolation we can make it by removing jumper from vcc and jd-vcc. And by giving separate power supply to Jd-VCC. As below the diagram I’ve just shorted all the com pin of relay and from NO we've taken wire which is going to the entire bulbs one terminal and from the second terminal of bulb it will go to the ac main and the hot line of the ac will be coming from the shorted com pin of relay. Connection are given in figure 2
Step 4: Code for Project
You can get the source code of this project is given below. or you can go our GitHub link here
Step 5: Access Your Web Server Anywhere in the World
Okay so everything is working fine. But one problem is there that you can only access your web page within local network. So that is one challenging thing.
We have so many option for that like we can do port forwarding in our router but if you don't want to mesh up with these things then you can chose some third party option. Those option are like pagekite, ngrok etc. So here we are going to use pagekite. So you have to install pagekite for that. As we provided link of pagekite you can go to the website and follow the process of installation. It is very simple.
Now, You have to run this command below to make your ip publicaly accessible
sudo pagekite.py 80 yourname.pagekite.me
Here 'yourname' will be your pagekite name which will you get when you will sign up to pagekite, and 80 is your port number.
As you can see in above figure our pagekite name is deligence so you can give any name
NOTE: pagekite free trial is only for 30 days after that you have to pay some amount of bucks as per your need
Step 6: Web Pages
After running the Arduino code and also pagekite script
you will see the web pages like above
As you can see our first page is for smartphone and second one for PC
Step 7: Video of Project
The whole project description are given in the above video link
Well Done you have successfully finished your project;
If have any doubt regarding this project feel free to comment us below or you can mail us on
And if you want to learn more about these type of project then feel free to visit our youtube channel: link
Thanks & Regards,