iot – google, amazon alexa, signal€¦ · own iot applications. these included ventures will...

20

Upload: others

Post on 29-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop
Page 2: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

IOT – Google, Amazon Alexa, SignalJammer, ESP 8266 NodeMCU and Location

Tracker etc..,

Copyright © Anbazhagan.kAll rights reserved.IOT – Google, Amazon Alexa, Signal Jammer, ESP 8266 NodeMCU and Location Tracker etc..,

Contents at a Glance PageNo

1. Acknowledgments 32. Introduction 43. Google Assistant Based Voice Controlled Home Automation using DIY Arduino Wi-Fi

Shield 64. Interfacing ESP8266 NodeMCU with Atmega16 Microcontroller to Send an

Email 21 5. Sending Temperature and Humidity sensor data to Firebase Real-Time Database using

NodeMCU ESP8266 376. ESP8266 Interfacing with ARM7-LPC2148- Creating a Webserver to control an

LED 437. Build NodeMCU Webserver and control an LED from a Webpage 54

Page 3: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

8. Track Location with NodeMCU without using GPS module 879. Connecting ESP8266 with STM32F103C8: Creating a Webserver 10910. Sending Email Using MSP430 Launchpad and ESP8266 13611. DIY Wi-Fi Jammer using NodeMCU ESP12 14712. Alexa Voice Controlled LED using Raspberry Pi and ESP12 171

AcknowledgmentsThe writer might want to recognize the diligent work of the article group inassembling this book. He might likewise want to recognize the diligent workof the Raspberry Pi Foundation and the Arduino bunch for assembling itemsand networks that help to make the Internet Of Things increasingly open tothe overall population. Yahoo for the democratization of innovation!

Page 4: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

IntroductionThe Internet of Things (IOT) is a perplexing idea comprised of numerousPCs and numerous correspondence ways. Some IOT gadgets are associatedwith the Internet and some are most certainly not. Some IOT gadgetsstructure swarms that convey among themselves. Some are intended for asolitary reason, while some are increasingly universally useful PCs. Thisbook is intended to demonstrate to you the IOT from the back to front. Bystructure IOT gadgets, the per user will comprehend the essential ideas andwill almost certainly develop utilizing the rudiments to make his or her veryown IOT applications. These included ventures will tell the per user the bestway to assemble their very own IOT ventures and to develop the modelsappeared. The significance of Computer Security in IOT gadgets isadditionally talked about and different systems for protecting the IOT fromunapproved clients or programmers. The most significant takeaway from thisbook is in structure the tasks yourself.

Page 5: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Google Assistant Based Voice Controlled Home Automationusing DIY Arduino Wi-Fi Shield

People and machines cooperate and speak with one other from numerouspoints of view, PCs have screen, console and mouse, while PDAs havecontact screen, motion control and so forth and even AR and VR is headed.In any case, the most fundamental device utilized by people to impart is vocalcorrespondence, we have the capacity to tune in and talk and in the event thatthe machines could be one or another do likewise, at that point speaking withthem couldn't get any less difficult.

Savvy watches and keen speakers like Google home, Amazon Echo and so ongradually discovering its way into our homes and talking with machines isgradually turning into a reality. So in this exercise we will figure out how we

Page 6: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

can utilize the Google right hand which can be summoned from yourSmartphone, or Google home or savvy to control the lights/fans by justutilizing a voice direction. It isn't that we are excessively lethargic to flipburdens with switches, however toward the day's end it is the sheer delight ofcompleting things just with our voice directions. So we should begin.

Google Assistant controlled Home Automation Project Overview

I am utilizing an Arduino UNO for the microcontroller side and an ESP8266module for associating with the web. Truly, there are huge amounts ofdifferent approaches to get this through; you can utilize all the moredominant processors like Raspberry Pi or other SOC with in-constructed Wi-Fi like the ESP12E or ESP32. Be that as it may, I chose to go with the oldschool Arduino and ESP8266 board to hold the expense down and not toover specialist anything.

For this task, we will likewise construct an Arduino WiFi shield utilizing theESP8266 which sits cozy over the Arduino UNO board. This shield can beutilized to program the ESP8266 utilizing AT order or straightforwardlyutilizing the Arduino IDE. It additionally has the choice to associate a FTDImodule legitimately to ESP8226 which enables the ESP8266 to be modifiedas a stand one gadget without Arduino and furthermore to streak anotherfirmware into the ESP8266 module whenever required. So the shield can beutilized for some other innovative Arduino ventures which require webassociation.

To speak with the Google associate on our cell phone we have utilized theIFTTT administrations, which arrange the partner to tune in for a specificdirection and trigger a connection if the order is gotten. Presently, as you maydefinitely realize the ESP8266 can peruse data from the web just through APIcalls, so we need a stage which can give us this API alternative this is theplace ThingSpeak comes in. Essentially the voice order given to Google righthand changes the estimation of a field in our ThingSpeak channel as needsbe. While the ESP8266 intermittently checks the estimation of this fieldutilizing API calls and sends this incentive to Arduino utilizing sequentialcorrespondence. The Arduino at that point performs required activity likeflipping a hand-off dependent on the worth got.

Page 7: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Arduino Uno Wi-Fi Shield using ESP8266

Give us a chance to begin by interfacing the Arduino UNO board with theESP8266 Wi-Fi module. The ESP8266 is a precarious module to utilize; itneeds its own capacity source and a particular association set-up to speakwith Arduino. In case that you are a flat out amateur, at that point it isexceptionally prescribed to peruse the Getting started with ESP8266instructional exercise before continuing any further.

Do recall that the ESP8266 when bought accompanies a default firmwarewhich is equipped for speaking with AT directions. Be that as it may, in casethat the module has been legitimately customized with Arduino, at that pointthe default firmware will be eradicated and it must be flashed again if ATdirections are to be utilized. Subtleties on the most proficient method toutilize glimmer will be clarified later. The circuit graph for the Wi-Fi shield is

Page 8: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

demonstrated as follows

We have utilized a LM317 as a 3.3V voltage controller. This 3.3V is utilizedto control the ESP8266 module in light of the fact that the 3.3V from ArduinoUNO won't most likely source enough current for the ESP module. TheLM317 info stick can be controlled by the DC information barrel jack of theVin stick of the Arduino UNO board.

The GPIO0 stick of the ESP module is associated with a jumper stick whichcan be flipped to interface the stick to ground. This enables the client to setthe ESP module to work either in AT order mode or Programming mode(Arduino IDE). Both the GPIO0 and GPIO2 is associated with an outerconnector so these GPIO pins can likewise be used.

Page 9: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

At long last on the Arduino side, we have associated the Rx as well as Txstick of the ESP8266 module to the 12 and 13 stick of Arduino. We didn'tutilize the equipment sequential (stick 0 and 1) to make investigating simple.You can likewise see that an alternative to interface the 16x2 LCD isadditionally given, with the goal that it very well may be mountedstraightforwardly over the shield. The LCD is controlled by the 5V stick ofthe Arduino.

Fabricating PCB for ESP8266 Wi-Fi Module using EasyEDA

A difficult part in structuring a shield for Arduino sheets is getting theimpression right. In the event that the measurements turn out badly, at thatpoint the shield won't fit appropriately into the Arduino UNO board. In anycase, fortunate enough, EasyEDA gives impression to practically allsegments in the market. This is a direct result of its huge client networkwhere clients make impression and makes it accessible for open to utilize ittheir ventures.

EasyEDA is an online EDA device which I have recently utilized ordinarilyand thought that it was helpful to use since it has a decent accumulation ofimpressions and it is open-source. In the wake of planning the PCB, we canarrange the PCB tests by their minimal effort . They additionally offer partsourcing administration where they have an enormous load of electronicsegments and clients can arrange their required segments alongside the PCBrequest.

While structuring your circuits and PCBs, you can likewise make your circuitand PCB plans open with the goal that different clients can duplicate or alterthem and can take profit by your work, we have additionally made our entireCircuit and PCB designs open for this circuit, check the beneath connection:

You can see any Layer (Top, Bottom, Topsilk, bottomsilk and so forth) of thePCB by choosing the layer structure the 'Layers' Window. Aside from thisthey likewise give a 3D model perspective on the PCB on how it would showup after manufacture. The preview of the top layer and base layer of the Wi-Fi shield would show up something like this

Page 10: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Calculating and Ordering PCB Samples online using EasyEDA

In the wake of finishing the structure of this Arduino Uno Wi-Fi Module, youcan arrange the PCB through . To arrange the PCB from JLCPCB, you needGerber File. To download Gerber documents of your PCB simply click theGenerate Fabrication File catch on EasyEDA proofreader page, at that pointdownload the Gerber record from that point or you can tap on Order atJLCPCB as appeared in underneath picture. This will divert you toJLCPCB.com, where you can choose the quantity of PCBs you need toarrange, what number of copper layers you need, the PCB thickness, copperweight, and even the PCB shading, similar to the preview demonstrated asfollows:

Page 11: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

In the wake of tapping on request at JLCPCB catch, it will take you toJLCPCB site where you can arrange the PCB in low rate which is $2. Theirconstruct time is additionally exceptionally less which is 48 hours with DHLconveyance of 3-5 days, essentially you will get your PCBs inside seven daysof requesting.

Page 12: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

In the wake of requesting the PCB, you can check the Production Progress ofyour PCB with date and time. You can check it by going on Account pageand snap on "Creation Progress" connect under the PCB like, appeared inunderneath picture.

Page 13: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Following couple of long stretches of requesting PCB's I got the PCB tests inpleasant bundling as appeared in beneath pictures.

Page 14: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop
Page 15: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

In the wake of ensuring the tracks and impressions were right. I continuedwith amassing the PCB, I utilized female headers to put the Arduino Nanoand LCD so I can evacuate them later in the event that I need them fordifferent undertakings. The totally bound board resembles this underneath

Arduino Wi-Fi Shield Programming mode and AT mode

At the point when the ESP8266 is modified legitimately utilizing the ArduinoIDE or when it is to be flashed, the GPIO 0 stick ought to be associated withground and Reset stick must be immediately associated with ground eachtime before the transferring procedure. Likewise when the ESP8266 isworking with AT directions the GPIO stick ought to be without left and againthe Reset stick ought to be quickly associated with ground to reset it.

To make things simpler the Wi-Fi shield that we planned has a switch stickwhich can move between Programming mode and AT order mode asappeared in the beneath pictures. Additionally the Reset stick can beassociated with ground by just squeezing the reset catch (red shading)everytime before transferring the code.

Page 16: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

The board additionally has a choice to interface FTDI module to the ESPlegitimately which is helpful for glimmering the ESP8266 module. To streakit interface the FTDI module and set the stick in programming mode asdemonstrated as follows. At that point download the ESP8266_Flasherprogramming and the firmware canister document from the given connection.At that point open the product and peruse for the canister document utilizingBin catch, at that point type in the privilege COM port and leave the locationto be 0x00000 as default. At long last click on the Download catch to streakthe ESP8266 module. The product is additionally appeared in the pictureunderneath, however recall that you need to streak it just if default firmwareon ESP8266 is overwritten.

Page 17: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Setting up the ThingSpeak channel for Google Assistant

We need a divert in ThingSpeak which will store information from theGoogle aide and later enables the equivalent to be recovered by the ESP8266utilizing API calls. On case that you are new to ThingSpeak set up a recordby joining on thingspeak.com and snap on new channel, additionally checkour past task to get familiar with utilizing ThingSpeak with Arduino. You canpick any name for your channel and give it a portrayal. Since we are flippingjust one light I have utilized just one field and named it as Light howeveragain you can use the same number of as you need. My channel settingslooks something like this, make note of the Channel ID which is 683739 formy situation and field number which is 1 for my situation, we will require itin future.

Page 18: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Next snap on the API keys tab, here you will be given two API keys one forWriting work and the other for reading work. You can peruse or composequalities to the documented just utilizing these keys individually. Each keywill be novel, mine is appeared underneath yours will be diverse without adoubt. Never share your keys as it can offer consent to compose or peruse toyour channel. They keys appeared beneath were devastated after utilization.

Page 19: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

Presently let us take a gander at the API GET calls utilizing which we cancompose and peruse information to the field that we just made.

Read from Thing Field:

api.thingspeak.com/channels/683739/fields/1/last.json?api_key=7EK8DHQDV3M0EJ6S&results=2

Write to Thing Field:

api.thingspeak.com/update?api_key=UEI3D4YTWX9OQQ4B&field1=7

These are my API you need to supplant the key an incentive with your keysand furthermore change the channel ID as indicated by your ThingSpeak

Page 20: IOT – Google, Amazon Alexa, Signal€¦ · own IOT applications. These included ventures will tell the per user the best way to assemble their very own IOT ventures and to develop

channel. In the event that you have chosen the principal field as appeared inthe picture, at that point the field worth need not be changed.

You can likewise have a go at stacking these API approaches your Browerand check how it functioning. In the above keep in touch with thing field weare composing 7 (affixed at the last) to the channel. You can stack this onyour program and check if the worth is being thought about your ThingSpeakaccount. Also the read from Thing Field API call when stacked in programshould give you the worth that you have sent to field beforehand, for thissituation 7.

Setting up IFTTT Applets

Presently we realize how to send as well as peruse qualities structure thefield, next we need to set two applets in our IFTTT account. On case you arenew to IFTTT essentially pursue it and connection you Gmail account, thisGmail record ought to be a similar one structure which you are utilizing theGoogle voice partner. Of the two applets both will be utilized compose anincentive to the field utilizing the above talked about connection. In any case,one would tune in for "Turn on Reading Light" and express "1" to the fieldwhile the other applet will tune in for "Mood killer Reading Light" and state"0" utilizing the above API calls.

To make an Applet, get into my applets and snap on "New Applet". At thatpoint in "This" segment select the Google voice collaborator and in the"That" area select the Webhooks administration. It is fundamentally the sameas what we did with our IoT based entryway security venture. In case thatyou are confounded on the most skillfull method to do it allude this articleand the accompanying picture will likewise support you.