Header Ads Widget

Make your own Android controlled ESP8266 based IoT switch?

ESP8266 IoT LED setup


#IOT
#ESP8266 Project

Here is another project based on Android application made on MIT App inventor platform, controlling three LEDs connected to an ESP8266 module. Two LEDs are configured to just switch ON and OFF and for the third one we can control the intensity from minimum to maximum. This is very basic example of IoT (Internet of Things) implementation for entry level hobbyist.

Watch out the video to see fully functional breadboard setup.


The circuit is kept simple so that any beginner can make connections on breadboard and start controlling the lights.

Three LEDs are connected to D0, D1, D2 and further connected to ground pin via three 470 Ohms resistors to control the current through each LED when they operate.

Here is the circuit connection diagram.

ESP8266 IOT switch

Connect the ESP8266 board to your computer running Arduino IDE, via an USB cable to upload below program.
  
Ensure to put your WiFi SSID name and password in 2nd and 3rd line of above code and upload the code to your ESP8266 board.

Download the android application on any android phone. Download from google share drive.

The application has three screens, home screen, setting and help screen.
When you power ON the ESP8266 board after uploading the Arduino code, it connects to your WiFi whose SSID name and password you have entered. 

IoT Switch Application

If you are using mobile hot spot, directly go to hot spot settings and see the connected device and you will find the IP of your ESP8266. 

If you are connecting to WiFi router, you may open serial console of Arduino IDE and check what IP address is assigned to your ESP board.

Now open the android application on your mobile, go to settings page from menu, enter your ESP IP address in text box and click on "OK". It will give you a confirmation pop up, again click "OK" and come back to home screen to control the LEDs connected to ESP8266 board.

If you want to run bigger loads though D0 and D1, you may use transistor and relay setup as explained here. But for the third pin i.e. D2, it needs different setup to use as dimmer for high voltage lamps or any load.

Enjoy your IoT project.


Return to List of content                                                Goto to DIY Project List

Post a Comment

0 Comments