IoT has been trending since long in the field of electronics and communications. Many projects, products are daily made under IoT. Even I made several projects under this topic. But this is the limit of how the IoT project can be shrinked in size without compromising it’s ability to work. This time I’m presenting you the smallest project of mine or the smallest project ever made in IoT field. There may be products which are way more smaller than my project, but I bet an IoT project can’t be smaller than the one which I have made. This is the simplest IoT project, IoT button with rechargeable battery having dimension of

  • 4 x 2 x 1 cm

So let’s see how to make this.And their is also a surprise giveaway in the end.

Read the whole Instructable.

Step 1: Things Required

  1. ESP8266 01 module - http://amzn.to/2jjOGRT
  2. 200 mAh LiPo battery
  3. TP4056 battery charging module - http://amzn.to/2kh9CIZ
  4. a push button

Step 2: Story

It all started when I came to know about programming our generic ESP8266 or ESP8266 01 module using Arduino IDE. Till now I was thinking that, the version greater the 01 can only be programmed with Arduino IDE. But when I tried programming this little module, I succeeded programming this and then searched on the google. There I found that people already succeeded programming this module. So It was a new thing to me only, may possible the one who is reading this also knows that we can program ESP8266 01 with Arduino’s language.

So anyways, this blog is only for the people like me, who don’t know how to flash firmware of our ESP-01 using Arduino IDE. Yes!!!!, we can now program our ESP-01 just like we program our Arduino boards. For that, you first need to downloads packages from board manager. I have already made the video for that. Just follow the steps, if you board manager doesn’t show ESP After downloading the required packages, now you are ready to program your ESP-01. For that, you need to have an USB to TTL converter module or you can even use your Arduino board to program your little wifi module. I have used USB to TTL converter to program this.It’s connection will be something like the image shown above.

You need to install drivers for this USB to TTL dongle. Click here and download the drivers according to your system configurations.Now lets move towards the code.

Step 3: Coding

I have changed its coding several times as to reduce battery usage of this module. Initially I coded it with Adafruit MQTT code in which this module is already subscribed to a topic and whenever we press the button, it will publish message on that topic and accordingly we can perform actions. So when programmed with this simple code, I experienced that the 200 mAh battery lasted only for 1 hour. So this is not a battery efficient code at all.

Then I changed the code, removed unwanted lines and made the code as short as possible, but all efforts were in vain. So I googled about how to make it battery efficient, there I find that this module has a function called deepSleep() in which this module goes to rest and consumes only around 10 uA of current. Now this is something I wanted. So I changed the code, after publishing the message to the topic, the module goes into deep sleep and you won’t believe that same battery lasted for 3 days. Further I also changed the code, rather than MQTT I have uploaded a code in which the module will request API from a channel of IFTTT called MAKER. And whenever this link is requested from anywhere, we can perform our required task. So when the code was running perfectly, I just soldered all the components along with the battery and it’s charging module. The circuit looked like the image shown above.

I have made the code in such a manner that you don’t ever need to reprogram it. You can change the application of the button, you can even change the WiFi access point name and password in case you have to change the router or its password. So just program it ones and forget about it.
I am listing some of the application of this smallest IoT porject.

  • Amazon Dash Button
  • Controlling Appliances
  • Sending emergency SMS on any number
  • Playing music on your phone
  • opening your garage door


many such one button application you can think of.

I have made a tutorial video for this project on which I have covered every aspect of this project.

Step 4: Android Application and Arduino Code

For android code of this project and also for android application used in this project, you need to visit my website.



explore | learn | share

hi, what is the ip used for? and where is it in the code?<br>thanks<br>
I am making this although my ESP8266 looks a lot different to yours. However I'm sure it will work out just fine.
Nice instructable, thank you for sharing.

About This Instructable




Bio: I am trying to learn as many things as possible in this field of electronics. And further trying to teach in as simple way as ... More »
More by techiesms:Machine to Machine Talk Using ESP8266 ESP8266 Tutorial Series | ESP8266 Examples Explained World's Smallest IoT Project 
Add instructable to: