OK GOOGLE LIGHTS ON

A Product of IOT(Internet of Things). Imagine a world in which every device in the home, workplace and car are connected. A world where the lights automatically turn on when the car approaches the driveway, the coffee starts brewing when the morning alarm goes off and the front door automatically unlocks when approached by a member of the household, but stays locked when a stranger arrives on the front step. That is the type of world the ”Internet Of Things” can create. So this product plays an important role in future as the world of “Home Automation is spreading day by day.

Here, we are going to build a product which turns on your light when you say a phrase to the google assistant for eg: “OK Google Turn on my light”.

In today’s world its not just important to do different things but its also much more important to know and learn what we do, so Before starting how to make this product we will know that what all the different things we are going to learn. First and fore most important part of this product is the iot platform that is “Adafruit io” which allows us to connect different things together, the “IFTTT”(if this than that) which acts normally a broker between the google assistant and adafruit.io it does a simply task that is if this happens than that has to  happen and then we will also learn about “WEMOS D1 WIFI” controller which is an Arduino compactable, which is going to turn on light when ever an change in data occurs in adafruit.io.

The following steps will help you in building this product

Step1:

Materials required:

1.Wemos D1 wifi (Arduino compactable)

2.Micro B type USB cable

3.Relay (240 v,10amp)

4.3nos led’s (red, blue, green each)

5.Buzzer

6.Bulb (20w, 220/240v)

7.Bulb holder

8.Jumper wires 8nos(male to male 5,male to female 3)

9.Breadboard

Step2:-

Description of Hardware:-

1.Wemos D1 wifi:-

The WeMos D1 is a ESP8266 WiFi based board that uses the Arduino layout with a operating voltage of 3.3V. 

.

Specifications:

Here are the specification of the board:

Microcontroller

ESP-8266EX

Operating Voltage

3.3V

Digital I/O Pins

11

Analog Input Pins

1

Clock Speed

80MHz/160MHz

Flash

4M bytes

Length

68.6mm

Width

53.4mm

Weight

25g

The wemos d1 is wifi development board based on ESP8266 12E. the functioning is similar to that of  NODEMCU, except that the hardware is built resembling Arduino UNO.

The D1 board can be configured to work on Arduino environment using BOARDS MANAGER. So, its not necessary to use a separate Arduino board , the D1 itself can be programmed on Arduino IDE. This is handy in using with IOT projects. Further many Arduino SHIELDs are compatible with the D1 board. Different versions of D1 boards are available in the market  R1, R2 , MINI. As the name implies D1 Mini is a smaller version and also differs in cost.

R1 , R2 boards look like Arduino UNO board ,but version is not printed on board. On some boards WEMOS D1is printed , as the ESP12 chip is manufactured by WEMOS. In some other boards it is printed just D1 ,where the ESP12 chip is that of AI Thinker. As the ESP12 chip has only one ANALOG pin, on board there is only A0 & other analog pins are dummy. In summary, the board is controlled by the ESP8266 chip (a 32-Bit processor) and has a larger flash memory compared to an Arduino Uno. It consists of 11 digital I/O pins and 1 analog  (input) pin. the board can be connected using a Micro-B type USB cable.     

Few digital Pins description required in our product

Hardware        software

D4        =        D2

D6        =        D6

D5        =        D5

D8        =        D3

D9        =        D4

  1. Relay(240v, 20 amp):-

The heart of a relay is an electromagnet (a coil of wire that becomes a temporary magnet when electricity flows through it). You can think of a relay as a kind of electric lever: switch it on with a tiny current and it switches on (“leverages”) another appliance using a much bigger current.

Why is that useful? As the name suggests, many sensors are incredibly sensitive pieces of electronic equipment and produce only small electric currents. But often we need them to drive bigger pieces of apparatus that use bigger currents. Relays bridge the gap, making it possible for small currents to activate larger ones. That means relays can work either as switches (turning things on and off) or as amplifiers (converting small currents into larger ones).

In our product we use relay for converting a low power current coming out of controller to high power current required to turn on the bulb.

It consists of three input terminals and three output terminals, the input terminals are vcc(voltge), gnd(ground), and the data in pin. The output terminals are NO(normally open), NC(normally close) and COM(common). Any of the two combination can be used NO and COM or NC and COM. The concept of normally open and close is that a switch is said to be normally open when on closing it current passes and normally close when on opening it current passes.

Step3:- Configuring the required software

  1. Configuring the Adafruit.io to create a feed called light :-

Adafruit.io is a cloud service – that just means we run it for you and you don’t have to manage it. You can connect to it over the Internet. It’s meant primarily for storing and then retrieving data but it can do a lot more than just that!

What can Adafruit IO do for me?

  • Display your data in real-time, online
  • Make your project internet-connected: Control motors, read sensor data, and more!
  • Connect projects to web services like Twitter, RSS feeds, weather services, etc.
  • Connect your project to other internet-enabled devices
  • The best part? All of the above is do-able for free with Adafruit IO

Step1: Go to the www.adafruit.io website sign up account and then sign in using username and password.