Blynk app is used in IoT to design smart IoT devices easily and quickly. Data of sensors can be read, stored and visualized and as per that hardware can be controlled from remote locations. It works with both iOS and Android to control boards like Arduino, Node MCU and Raspberry Pi and links the data over the internet. Data can be plotted in graphical form also.
Blynk has Blynk server and library. Blynk offers secure and centralized cloud-based services through its server to communicate between devices. This server is available as open source. One can make its own server and be more secure. The most important feature is Blynk library that makes it more flexible. Hardware is connected through Blynk library and helps to run Blynk app. Many devices like Arduino, ESP8266 and Raspberry Pi are included in its library and help to connect with hardware through different methods of communication like Bluetooth, USB, Wi-Fi and GSM.
How Blynk works
Blynk works using three components:
- Blynk app: Allows user to create their own interfaces for their projects using different widgets that users provide.
- Blynk server: Used to provide communication between the hardware circuit and smartphones. By using Blynk cloud, users can run their own personal Blynk server locally. It is an open source and thousands of devices can be connected.
- Blynk libraries: Used to run incoming and outgoing commands for all types of hardware platforms to enable communication with server (Figure 9.10).
Features
- Similar API (application programming interface) and UI (user interface) for all supported hardware and devices
- Connection to the cloud using:
- Wi-Fi
- Bluetooth and BLE (Bluetooth Low Energy)
- Ethernet
- USB (serial)
- GSM (Global System for Mobile Communications)
- Set of easy-to-use widgets
- Direct pin manipulation with no code writing
- Easy to integrate and add new functionality using virtual pins
- History data monitoring via History Graph widget
- Device-to-device communication using Bridge widget
- Sending emails, tweets, push notifications, etc.
Requirements for Blynk
Hardware: To work on Blynk platform, development kits are needed like Arduino, Node MCU, Raspberry Pi. These development kits should be connected with internet. For example, Arduino UNO board needs additional Wi-Fi module to communicate over the internet, but others are already Wi-Fi enabled like ESP8266, Raspberry Pi with Wi-Fi dongle, Particle Photon or SparkFun Blynk Board. It can be connected to laptop and desktop through USB.
A Smartphone: The Blynk app is a well-designed interface builder. It works on both iOS and Android (Figure 9.11).
One of the major benefits of ADC converter is its high data acquisition rate even at multiplexed inputs. With the invention of a wide variety of ADC integrated circuits, data acquisition from various sensors has become more accurate and faster. High-performance ADCs possess improved dynamic characteristics such as measurement repeatability, low power consumption, precise throughput, high linearity, excellent signal-to-noise ratio and so on.
These converters sample the analog signal on each falling or rising edge of sample clock. In each cycle, the ADC takes the analog signal, measures it and then converts it into a digital value. The ADC converts the output data into a series of digital values by approximating the signal with fixed precision. In ADCs, two factors determine the accuracy of the digital value that has been captured by the original analog signal. These are quantization level or bit rate and sampling rate. Figure 9.12 depicts how analog to digital conversion takes place. Bit rate decides the resolution of digitized output and in Figure 9.12
The following tools/components were used to build this project:
- Arduino UNO and its IDE
- Buzzer
- Smoke sensor or MQ-2
- Soil moisture sensor
- ADC
- Blynk app
- Relays
We have used Arduino development kit to prepare the proposed system. The smoke sensor and the buzzer were powered and controlled by the Arduino micro-controller. The smoke sensor reacts to certain elements (chemicals) and triggers the buzzer, thereby alarming the farmer of supposed fire in the field.
The next half is done using ESP8266 Wi-Fi module, ADC, soil moisture sensor, relays, pump (represented by a bulb) and Blynk application.
The soil moisture sensor continuously measures the amount of moisture present in the soil. The ADC converts the analog signal of the sensor into a digital signal. The digital signal is then transferred to the Node MCU. The Node MCU is connected wirelessly to the Blynk app and its server system. When the moisture sensor detects that moisture content is less than the threshold, the Node MCU triggers the Blynk app and sends a notification to the app/device. The relay that is used to control the pump then turns off, allowing the pump to irrigate the fields.
When the soil moisture levels are restored back to the normal levels (detected using the soil moisture sensor), the relay is then triggered back by the Blynk app and Node MCU and the motor pump is turned off automatically.
Leave a Reply