Aniket Singh

Aniket Singh

|

@aniketxai

I’m a Full Stack Developer and IoT/Arduino Innovator. I build smart web apps and intelligent devices. On this site, I share coding tutorials, tech projects, and blogs related to web dev, embedded systems, and startup building.

🚀 View Projects
MERN Web Dev Arduino JavaScript Java DSA

Skills

HTML/CSS
JavaScript
React/MERN
IoT & Arduino

Electronic devices used without Internet in Arduino for nodemcu etc


 Hello Guys ,In this post we learn about how Electronic devices used without Internet in Arduino for nodemcu etc.

Let start it:-

*Parts Required

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
HC-05 Bluetooth Module
HC-05 Bluetooth Module
Breadboard (generic)
Breadboard (generic)
9V battery (generic)
9V battery (generic)

LED (generic)
LED (generic)
(VoltageRegulator).Linear Regulator (7805)
Linear Regulator (7805)
Male/Female Jumper Wires
Male/Female Jumper Wires

Male/Male Jumper Wires
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable

*Software apps Use

1. Blynk

2. Ardunio Ide

3. Bluetooth Automation

*Introduction

Numerous IoT based Home Automation projects crashes when the Internet speed goes down. Thus, inside this task, I attempted to fabricate such an IoT model that can computerize the Home when Internet speed is great as well as when Internet speed goes down. In this task, I will utilize OSH NodeMCU V1.0 ESP8266 Development Board and Bluetooth HC-05 Module for correspondence and control of 4 AC loads associated with NodeMCU with Blynk Android App and my hand crafted Bluetooth Automation App. Blynk App can be utilized when Internet speed is acceptable on the two sides and Bluetooth Automation App can be utilized when you are close to the venture and not have the web by any means. 


You can add a hand-off module to control real electrical machines like water siphons, fountains, LED bulbs, Fans, and so on For giving a 5V stock to an undertaking I have associated Arduino Uno's +5V and GND pin to the Vin and GND pin of NodeMCU board, rather than IC 7805 and Battery. 

NodeMCU:


NodeMCU is a minimal expense open-source IoT stage. It at first included firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems and equipment which depended on the ESP-12 module. Afterward, support for the ESP32 32-bit MCU was added. NodeMCU is an open-source firmware for which open-source prototyping board plans are accessible. The name "NodeMCU" consolidates "hub" and "MCU" (miniature regulator unit).The term "NodeMCU" rigorously talking alludes to the firmware instead of the related advancement packs. Both the firmware and prototyping board plans are open source. 

The firmware utilizes the Lua prearranging language. The firmware depends on the Lua project and based on the Espressif Non-OS SDK for ESP8266. It utilizes many open source projects, for example, lua-json and SPIFFS. Because of asset requirements, clients need to choose the modules applicable to their undertaking and assemble a firmware custom fitted to their necessities. Backing for the 32-bit ESP32 has likewise been carried out. 

The prototyping equipment regularly utilized is a circuit board working as a double in-line bundle (DIP) which incorporates a USB regulator with a more modest surface-mounted board containing the MCU and recieving wire. The decision of the DIP design considers simple prototyping on breadboards. The plan was at first depended on the ESP-12 module of the ESP8266, which is a Wi-Fi SoC incorporated with a Tensilica Xtensa LX106 center, generally utilized in IoT applications (see related activities). 

Voltage: 3.3V 

Wi-Fi Direct (P2P), delicate AP 

Current utilization: 10uA~170mA 

Streak memory connectable: 16MB max (512K ordinary) 

Incorporated TCP/IP convention stack 

Processor: Tensilica L106 32-bit 

Processor speed: 80~160MHz 

Smash: 32K + 80K. • GPIOs: 17 (multiplexed with different capacities) 

Simple to Digital: 1 contribution with 1024 stage goal 

+19.5dBm yield power in 802.11b mode 

802.11 help: b/g/n 

Greatest simultaneous TCP associations: 5

HC-05 Bluetooth Module


The Bluetooth module HC-05 is a MASTER/SLAVE module. As a matter of course, the manufacturing plant setting is SLAVE. The Role of the module (Master or Slave) can be arranged simply by AT COMMANDS. The slave modules can't start an association with another Bluetooth gadget yet can acknowledge associations. The expert module can start an association with different gadgets. The client can utilize it just for a sequential port substitution to build up an association among MCU and GPS, PC to your installed project, and so forth The HC-05 Bluetooth module is the most prudent and simplest approach remote (through Bluetooth). 

This module makes it simple for you to remotely expand your sequential interface, so you can handle any program running on your Laptop with the sequential port interface. 

Equipment Features: 

Average ‐80dBm affectability. 

Up to +4dBm RF send power. 

3.3 to 5 V I/O. 

PIO (Programmable Input/Output) control. 

UART interface with programmable baud rate. 

With an incorporated radio wire. 

With edge connector. 

Programming Features: 

Slave default Baud rate: 9600, Data bits:8, Stop bit:1, Parity: No equality. 

Auto‐connect to the keep going gadget on power as default. 

License the blending gadget to associate as default. 

Auto‐pairing PINCODE: "1234" as default.

*Schematics & Diagrams


*Blynk App

-Download Blynk app from playstore.

Introduce the Blynk Android App and open it. Sign in to Blynk App with email address and make a venture by tapping on "New Project "as "IoT Home Automation", select board as NodeMCU, association type as Wi-Fi, select dim or light subject and snap on make. 
An Auth Token is shipped off the enrolled email address. Snap on OK. Presently click on the + sign at the top and add 4 catches. To alter each catch subtleties open it and given the name LED1, LED2, LED3 and LED4. Snap on Pin and Select Pin as Virtual alongside V1, V2, V3 and V4 for 4 Buttons. Select Mode as SWITCH. Add OFF mark as OFF and ON name as ON in every one of the 4 catches you can choose 4 text tones (say Red, Yellow, Green, Blue) for 4 unique catches. Press the back button and snap on the triangle button at the highest point of the screen to make an application in dynamic mode. 
Presently you can handle the electrical machines associated with the undertaking with Blynk App across the world. 



Installed Code: 

Open the Arduino Sketch in Arduino IDE, introduce and incorporate the Blynk library. Add the Auth Token got on Blynk Account enrolled email address, Wi-Fi network SSID and Password, as well. Transfer the code to the NodeMCU board. 

Bluetooth App: 

Introduce the Bluetooth Automation application gave in this GitHub archive. Open your telephone's Bluetooth settings, look for neighboring organizations. Assuming you'll get the HC-05 Bluetooth module, pair your telephone with it (the default secret phrase is 0000 or 1234). Presently open the Bluetooth Automation App and push on the blue shading Bluetooth Button and select the matched HC-05 module and presently you can handle the electrical apparatuses associated with the undertaking with Bluetooth despite the fact that the web speed is slow or not in any manner.


*Scan Qr and Download App


*Codes

-Copy The following code in ardunio ide

/*********
-Tech Gyan Creative
Complete project details at https://techgyancreative.blogspot.com/
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*********/


// Import required libraries

/*
This is the code for the project called
"IoT based Home Automation with & without Internet"
The demonstration Video for the project is uploaded on YouTube channel.
Youtube Video Link - https://youtu.be/ubuC9jBywi0
Project Link - https://www.hackster.io/pranavkhatale/iot-based-home-automation-with-without-internet-bf633c
by Pranav Khatale
*/

// Including the required libraries
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

int LED1 = D1; //Red LED is connected to pin D1 of NodeMCU Board
int LED2 = D2; //Yellow LED is connected to pin D2 of NodeMCU Board
int LED3 = D3; //Green LED is connected to pin D3 of NodeMCU Board
int LED4 = D4; //Blue LED is connected to pin D4 of NodeMCU Board

char auth[] = "JKBTZ9MWsITQqY9YIdwwIJyzk-98quwZ"; // Put your Blynk Authentication token received on email
char ssid[] = "Dlink"; // Put the Wi-Fi network's SSID here
char pass[] = "12341234"; // Put the Wi-Fi network's Password here


BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
digitalWrite(LED1, pinValue);
// process received value
}

BLYNK_WRITE(V2)
{
int pinValue = param.asInt(); // assigning incoming value from pin V2 to a variable
digitalWrite(LED2, pinValue);
// process received value
}

BLYNK_WRITE(V3)
{
int pinValue = param.asInt(); // assigning incoming value from pin V3 to a variable
digitalWrite(LED3, pinValue);
// process received value
}

BLYNK_WRITE(V4)
{
int pinValue = param.asInt(); // assigning incoming value from pin V4 to a variable
digitalWrite(LED4, pinValue);
// process received value
}

void setup()
{
pinMode(LED1, OUTPUT); // Declaring LED1 as output
pinMode(LED2, OUTPUT); // Declaring LED2 as output
pinMode(LED3, OUTPUT); // Declaring LED3 as output
pinMode(LED4, OUTPUT); // Declaring LED4 as output
Serial.begin(9600); /* Define baud rate for serial communication */
Blynk.begin(auth, ssid, pass); // Blynk starts by providing essential details
}

void loop()
{
Blynk.run();


if (Serial.available()) /* If data is available on serial port */
{
char data_received;
data_received = Serial.read(); /* Data received from bluetooth */
if (data_received == '1')
{
digitalWrite(LED1, HIGH); // LED1 pin is given a HIGH logic
Blynk.virtualWrite(V1, 1); // Blynk App receives the HIGH logic
Serial.write("LED1 turned ON\n");
}
else if (data_received == '2')
{
digitalWrite(LED1, LOW);
Blynk.virtualWrite(V1, 0);
Serial.write("LED1 turned OFF\n");
}
else if (data_received == '3')
{
digitalWrite(LED2, HIGH);
Blynk.virtualWrite(V2, 1);
Serial.write("LED turned ON\n");;
}
else if (data_received == '4')
{
digitalWrite(LED2, LOW);
Blynk.virtualWrite(V2, 0);
Serial.write("LED2 turned ON\n");;
}
else if (data_received == '5')
{
digitalWrite(LED3, HIGH);
Blynk.virtualWrite(V3, 1);
Serial.write("LED3 turned ON\n");
}
else if (data_received == '6')
{
digitalWrite(LED3, LOW);
Blynk.virtualWrite(V3, 0);
Serial.write("LED3 turned ON\n");
}
else if (data_received == '7')
{
digitalWrite(LED4, HIGH);
Blynk.virtualWrite(V4, 1);i
Serial.write("LED4 turned ON\n");
}
else if (data_received == '8')
{
digitalWrite(LED4, LOW);
Blynk.virtualWrite(V4, 0);
Serial.write("LED4 turned ON\n");
}
else
{
}
}
}

-Enjoy


Post a Comment