Main Content

Are you like me always forgetting where you kept your keys? I can never find my keys on time! And because of this habit of mine, I have been late for my college, that limited edition star wars goodies sale (still fretting!), a date (she never picked my call again!)

So what exactly is this IoT Keychain

Well let me give you an abstract idea, imagine you planned a dinner with your parents at a posh restaurant. You were just about to hit the road suddenly the keys are missing, ouch! You know the key is somewhere in the house. Then you remember, hey I attached a IoT keychain which I made referring Ashwin’s Instructable, Thank God! You take out your phone and open Chrome then type keychain IP (eg- 192.168.43.193/) or mycarkey.local/ (this works because of mDNS) and hit search. Wow!, a site appears in your phone (imagine your keychain is the server, so weird!). You click on Buz My Key button and in moments you hear a beep coming from your work shoes (jeez these cats). Well you found the keys and hit the road in no time, voila!

A brief idea on how it works

Well the ESP-01 in the Keychain connects to any WiFi that you have mentioned in the program (you can mention multiple WiFi names along with their pass-codes and ESP-01 will connect to the strongest available WiFi network at that point). If you take the keychain outside your WiFi range, ESP-01 will probably disconnect and try to connect to the available mentioned WiFi (so if you misplaced your key at your friend’s house you can find it easily by just turning on the your phone’s hotspot (no data required) and ESP-01 will connect to your hotspot automatically and then you can buz the keychain and find it easily).

Before starting I would recommend all the first time ESP users to read A Beginner’s Guide to the ESP8266 by Pieter P. Click here. This guide has been very helpful for me as a beginner to ESP8266 chip.

What is the relation between ESP8266 and ESP-01

When I started working with ESP I got quite confused. There were a lot of information about ESP chips on the internet. I used to think ESP8266, ESP-01, ESP-12E etc were all different and can’t use program written in ESP-01 on ESP-12E but that not the case. Let me clarify your doubts! ESP8266 is a chip which is used in all the ESP module (like ESP-12E and ESP-01). There are many more ESP modules available in the market and they all use ESP8266 chip. The only difference between them is the functionality that the ESP module is providing. Say ESP-01 has quite less GPIO pins while ESP-12E has a lot of GPIO pins. ESP-01 may not have different sleep modes like ESP-12E while ESP-01 is more cheaper and small in size.

Keep in mind as they all use the same ESP8266 chip, we can use the same ESP8266 program on all the ESP modules without any problems as long as you are not using a program which can work on one specific chip only (say you are trying to turn on GPIO pin 6 on ESP-01 which it does not have. No worries and programs I gave in this tutorial is compatible with all ESP modules. In fact I did all the coding on ESP-12E NodeMCU as it was more easy to work and debug errors on development board. After being convinced with my work I then tried those programs on ESP-01 which worked like charm without any modifications!

Some key points:

My goal is to help you understand how we can embed IoT anywhere.
The main takeaway from this Instructable is the knowledge of embedding ESP-01 inside a keychain which seems bizarre but hey, engineering is full of challenges! I recommend everyone to come up with different keychain designs and try to make IoT keychain idea perfect.
The IoT keychain which I have made is not much battery efficient (6 Hours with 500mAH 3.7v Li-Po battery) and is a little bulky. But I know, you guys can make it perfect if not better and make your own Instructable (don’t forget to mention me!)
Enough bla bla bla! Lets get started

How my Instructable flows

Required Materials and Components [Step 1]
ESP-01 Getting Started [Step 2]
Lets Ready the Buzzer for ESP-01 [Step 3]
Getting Ready for Programming [Step 4]
Personalizing the program [Step 5]
Lets program ESP-01 [Step 6]
IP and mDNS for controlling buzzer [Step 7]
Selecting a suitable battery [Step 8]
Placing all the components [Step 9]
Preparing outer cover for placement of the keychain circuit and battery [Step 10]
Time to envy your friends! Some finishing thoughts [Step 11]”

Link to article