Machine To Machine Talk using ESP8266

Machine to Machine talk is a subpart of IoT(Internet Of Things) in which a machine gives a command or signal to another machine for doing some task.And in this article, I’ll be teaching you how you can make a simple yet useful project on M2M technology using you very own ESP8266 01 module.

How this all started?

I was facing one problem with the structure and location of my room. I wanted to know if anyone is coming in my room so that I can hide my private stuffs ;-P. I have made one video on what problem I was facing and why I wanted to make this project. Watch out this video to know the story behind this project.



Possible Solutions of my Problem

In the Intro video of this project, I asked all my viewers to comment the possible solution that comes in their mind which can solve my problem. Many of my viewers gave their views in the comment of that video. I reviewed all that projects and gave my views regarding their ideas. I also made a video on Reviewing Comments. Watch out this video if you want to know other similar projects for my problem.

Components Required

For making this project you’ll require,

  • 2 x ESP8266 01 WiFi Modules
  • 2 x 9V Batteries
  • 2 x 3.3V Regulator IC (AMS 1117)
  • 1 X PIR motion sensor module
  • 1 X Piezo Buzzer

 



Logic behind this project

Here, out of two ESP one is acting as an Access Point and other will try to connect to the first one. Hence, this will avoid the use of external router in between our ESPs. The first ESP which is an Access point, is acting as a server and it will be doing nothing until one particular link is requested from any device connected with this access point. And that particular link is,

192.168.4.1/pir

As soon as it receives this link, it will buzz the buzzer 5 times with some delay in between. Now the other ESP which is acting as a client will first get connected to the ESP acting as a server and then it will request this link(192.168.4.1/pir) whenever PIR sensor, which is attached with client ESP detects any motion.

Conclusion:- Whenever any motion is detected by PIR sensor, the client ESP module will talk to server ESP module and server ESP module will let you know that someone is coming in my room by buzzing the buzzer 5 times.

Making of the Project

For making this project, you first need to code your ESP boards. You can code it with your USB to TTL convertor or with your Arduino Board its upto you. If you don’t know how to program your ESP boards with Arduino Firmware, then watch out my video tutorial on that,

 

> Code

Code of both Server and Client are available on my github account. You can download it from there.

https://github.com/techiesms/M2M-Talk-Project

> Circuit Diagram

Circuit diagram of ESP as a Server is shown below,

Circuit diagram of ESP as a Client is shown below,

I have also made tutorial video on the same project in both Hindi and English language. Watch out this video to see my project in action.

ENGLISH

 


HINDI

 

8 Replies to “Machine To Machine Talk using ESP8266”

  1. ehab ramadan

    HI,
    Congratulations for this amazing project. Could you please give the link for the 2 libraries
    ESP8266WiFi.h
    ESP8266HTTPClient.h
    I tried many versions but no luck with is. There is an error on compilation.
    Thanks a lot.
    Ehab

  2. maninani

    Bro…..superb…..i love your projects……i want to do this project…..i need ur support…if i got any pblm….can i take ur help

  3. D. Clarke

    Dear Sir,
    Love your project. I am planning something similar for my home and would like your help or can you answer a question. Your project is for one client with one sensor and one server with one output. Here is the question. Can I have more than one client multiple inputs per client sending signals to one server with multiple outputs. Would really appreciate your help with this.
    Thanks D. Clarke

Leave a Reply

Your email address will not be published. Required fields are marked *