Hello readers, I hope you all are doing great.
ESP32 is a powerful chip for Internet of Things applications. This tutorial is also based on one of the ESP32 applications in the field of IoT.
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | ESP32 | Amazon | Buy Now |
In this tutorial, we will learn how to update LCD display with new data or input using a web server created with ESP32.
Fig. 1
To achieve the target, we will be using an HTML (Hypertext Markup Language) form to provide web input and then update the text displayed on LCD. The values or input received from the webserver will be further stored inside a variable in the code for further use (to display on LCD).
We have already posted a tutorial on LCD (Liquid Crystal Display) interfacing with ESP32. In that tutorial, we demonstrated how to display the hard-coded data (in the ESP32 module) on LCD.
A web server is computer software and hardware that accepts requests and responds to those requests using HTTP (Hypertext transfer protocol) or HTTPS (HTTP Secure) (HTTP is a network protocol for delivering online content to client user agents).
The ESP32 standalone web server is mobile-enabled and can be accessed from any device with a browser on the local network. B. Mobile phones, computers, laptops, tablets. However, all the devices must be connected to the same WiFi network to which the ESP32 is connected.
There are basically two ways to connect the ESP32 to a 16 * 2 LCD display.
Connecting an LCD display without an I2C adapter is cheap, but this method requires more connection cables and is complicated to implement. On the other hand, using an I2C adapter reduces complexity but increases cost. In this tutorial, you will connect the ESP32 directly without using an I2C adapter.
Table: 1
Fig. 2: ESP32 and 16*2 LCD interfacing
For more details on interfacing 16*2 LCD with ESP32, follow our previous tutorial at www.theengineeringprojects.com
We are using Arduino IDE to compile and upload code into ESP32 module. You must have ESP32 board manager installed on your Arduino IDE to program ESP32 module. To know more about Arduino IDE and how to use it, follow our previous tutorial i.e., on ESP32 programming series. The link is given below:
https://www.theengineeringprojects.com/2021/11/introduction-to-esp32-programming-series.html
ESP32 board manager doesn’t come with inbuilt libraries to create an asynchronous web server. So we need to download the library file from external sources and then add into Arduino IDE.
We need to install two library files:
Once you have successfully downloaded the required libraries, next step it to install or add these libraries in Arduino IDE.
To add the libraries in Arduino IDE, go to Sketch >> Include Library >> Add .zip library and then select the downloaded library files.
Fig. 3: adding necessary libraries
#include < WiFi.h >
#include < AsyncTCP.h >
#include < ESPAsyncWebServer.h >
#include < LiquidCrystal.h > // LCD header file
LiquidCrystal lcd (22, 23, 5, 18, 19, 21 );
AsyncWebServer server ( 80 );
// Enter your netwrok credentials
const char* ssid = "replace this with netwrok SSID";
const char* password = "replace this with Password";
const char* PARAM_INPUT_1 = "data_field1";
const char* PARAM_INPUT_2 = "data_field2";
// HTML web page to handle data input fields
const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML> <html> <head>
<title> ESP Input Form </title>
<meta name = " viewport" content="width=device-width, initial-scale=1 ">
<style>
html{ font-family: Times New Roman; display: inline-block; text-align: justify;}
</style>
</head> <body>
<form action="/get">
Data_field1: <input type="text" name="data_field1" >
<input type="submit" value="Post ">
</form> <br>
<form action="/get">
Data_field2: <input type="text" name="data_field2">
<input type="submit" value="Post">
</form><br>
</body></html>)rawliteral";
void notFound(AsyncWebServerRequest *request) {
request->send(404, "text/plain", "Not found");
}
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
if (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("WiFi Failed!");
return;
}
Serial.println();
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
//===set LCD
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(1,0);
server.onNotFound(notFound);
server.begin();
// Send web page with input fields to client
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
{
request->send_P(200, "text/html", index_html);
});
server.on("/get", HTTP_GET, [] (AsyncWebServerRequest *request) {
String inputMessage;
String inputParam;
// GET input1 value
if (request->hasParam(PARAM_INPUT_1))
{
inputMessage = request->getParam(PARAM_INPUT_1)->value();
inputParam = PARAM_INPUT_1;
}
// GET input2 value
else if (request->hasParam(PARAM_INPUT_2))
{
inputMessage = request->getParam(PARAM_INPUT_2)->value();
inputParam = PARAM_INPUT_2;
}
else
{
inputMessage = " No message sent";
inputParam = " none";
}
Serial.println ( inputMessage );
delay( 1000);
lcd.clear();
lcd.print( inputMessage);
request-> send (200, "text/html", " HTTP GET request sent to ESP32("
+ inputParam + "): " + inputMessage +
"<br><a href=\"/\"> Back to Home Page </a>");
});
}
void loop( )
{
}
Fig. 4: Adding header files
Fig. 5: LCD data and control pins
Fig. 6: server port
Fig. 7: Enter Network credentials
Fig. 8
Fig. 9: HTML web page
Fig. 10: HTML form for data input
Fig. 11: Post button.
Fig. 12
Fig. 13: Fetch/obtain the IP adrress
Fig. 14: Set 16*2 LCD
Fig. 15: Initialize the server
Fig. 16: Send web page to client
Fig. 17
Fig. read the input from HTML form
Fig. 18
Fig. 19
Fig. 20
Fig. 21: Select development board and COM port
Fig. 22: web Page
Fig. 23: Enter the Input to ESP32
Fig. 24: Input Updated
Fig. 25: IP address and Web Input on serial monitor.
Fig. 26: String input received from Web server, printed on LCD
This concludes the tutorial. We hope you found this of some help and also hope to see you soon with a new tutorial on ESP32.
Hello readers, I hope you all are doing great. In this tutorial, we will learn how to update a webpage using Server-Sent Events and the ESP32 web server.
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | ESP32 | Amazon | Buy Now |
It is a server push technology that enables the client devices to receive automatic updates from a server over HTTP (Hypertext Transfer Protocol) connection. SSE also describes how the server can initiate data transmission towards the client once an initial connection with the client has been established.
We have already posted a tutorial on how to implement Web socket protocol with ESP32 which is also a protocol used to notify events to a web client. Both the Server-Sent Events (SSE) and Web-Socket technologies seem to be quite similar but they are not.
The major difference between the two is that SSE is unidirectional, where the web client can only receive the updates from the ESP32 but it can’t send updates back to ESP32. On the other hand, the Web-socket protocol is bi-directional where both the web client and ESP32 can send and receive updates/events.
Fig. 1 Server-Sent event
The Server-Sent Event process initiates with an HTTP request from the web client or web page to the ESP32 web server. After that, the ESP32 is ready to send updates or events to the web client as they happen. But the web client can’t send any response or data to the ESP32 server after the initial handshake takes place.
Server-sent event technology can be used to communicate an event, GPIO states or to send sensor readings to the web client, whenever a new reading is observed.
For demonstration purpose, we are using a DHT11 sensor with the ESP32 module. ESP32 web server will display two things i.e., temperature and humidity observed using the DHT11 sensor. So, whenever a new reading is being observed, the ESP32 sends the reading to the Web Client over Server-sent events. After receiving the latest sensor reading the client updates the web page data.
Fig. 2 DHT11 sensor
DHT11 is a humidity and temperature sensor that measures its surrounding environment. It measures the temperature and humidity in a given area. It is made up of an NTC (negative temperature co-efficient) temperature sensor and a resistive humidity sensor. It also has an 8-bit microcontroller. The microcontroller is in charge of ADC (analog to digital conversion) and provides a digital output over the single wire protocol.
The DHT11 sensor can measure humidity from 20% to 90% with +-5 percent accuracy (RH or relative humidity) and temperature from 0 degrees Celsius to 50 degrees Celsius with +-2C accuracy.
DHT11 sensors can also be used to build a wired sensor network with a cable length of up to 20 meters.
Table 1
Note: Connect a 10K resistor between data and power (+5V) pin of DHT11 sensor module.
Fig. 3 ESP32 and DHT11 connections/wiring
We are using Arduino IDE to compile and upload code into the ESP32 module. You must have ESP32 board manager installed on your Arduino IDE to program the ESP32 module. To know more about Arduino IDE and how to use it, follow our previous tutorial i.e., on ESP32 programming series. The link is given below:
https://www.theengineeringprojects.com/2021/11/introduction-to-esp32-programming-series.html
Fig. 4 manage libraries
Fig. 5 Install DHT sensor library
ESP32 board manager doesn’t come with inbuilt libraries to create an asynchronous web server. So we need to download the library file from external sources and then add into Arduino IDE.
We need to install two library files:
Once you have successfully downloaded the required libraries, next step it to install or add these libraries in Arduino IDE.
To add the libraries in Arduino IDE, go to Sketch >> Include Library >> Add .zip library and then select the downloaded library files.
Fig. 6 adding necessary libraries
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include "DHT.h"
#define DHTPIN 4 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
// Initializing the DHT11 sensor.
DHT dht(DHTPIN, DHTTYPE);
// Replace with your network credentials
const char* ssid = "SSID";
const char* password = "password";
// Create AsyncWebServer object on port 80
AsyncWebServer server(80);
// Create an Event Source on /events
AsyncEventSource events("/events");
// Timer variables
unsigned long lastTime = 0;
unsigned long timerDelay = 20000; //20 sec timer delay
//==== Creating web page
const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html>
<head>
<title>SSE with ESP32 Web Server</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="icon" href="data:,">
<style>
html {font-family: Times New Roman; display: inline-block; text-align: justify;}
p { font-size: 1.2rem;}
body { margin: 0;}
.topnav { overflow: hidden; background-color: blue; color: white; font-size: 1rem; }
.content { padding: 20px; }
.card { background-color: #ADD8E6; box-shadow: 2px 2px 12px 1px rgba(140,140,140,.5); }
.cards { max-width: 600px; margin: 0 auto; display: grid; grid-gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.reading { font-size: 1.4rem; }
</style>
</head>
<body>
<div class="topnav">
<h1>Server-Sent Events </h1>
<h2> DHT11 Sensor Data </h2>
</div>
<div class="content">
<div class="cards">
<div class="card">
<p> DHT11 Temperature</p><p><span class="reading"><span id="temp">%TEMPERATURE%</span> °C</span></p>
</div>
<div class="card">
<p> DHT11 Humidity</p><p><span class="reading"><span id="hum">%HUMIDITY%</span> %</span></p>
</div>
</div>
</div>
<script>
if (!!window.EventSource)
{
var source = new EventSource('/events');
source.addEventListener('open', function(e)
{
console.log("Events Connected");
}, false);
source.addEventListener('error', function(e)
{
if (e.target.readyState != EventSource.OPEN)
{
console.log("Events Disconnected");
}
}, false);
source.addEventListener('message', function(e)
{
console.log("message", e.data);
}, false);
source.addEventListener('temperature', function(e)
{
console.log("temperature", e.data);
document.getElementById("temp").innerHTML = e.data;
}, false);
source.addEventListener('humidity', function(e)
{
console.log("humidity", e.data);
document.getElementById("hum").innerHTML = e.data;
}, false);
}
</script>
</body>
</html>)rawliteral";
void setup() {
Serial.begin(115200); //initialize serial monitor
//===set and initialize Wi-Fi
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print('.');
delay(1000);
}
Serial.print("IP Address: ");
Serial.println(WiFi.localIP()); // print the IP address
//====Initialize DHT11 sensor
dht.begin();
//====Handle Web Server
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html);
});
// Handle Web Server Events
events.onConnect([](AsyncEventSourceClient *client)
{
if(client->lastId())
{
Serial.printf("Client reconnected! Last message ID that it got is: %u\n",
client->lastId());
}
// send event with message "hello!", id current millis
// and set reconnect delay to 1 second
client->send("hello!", NULL, millis(), 10000);
});
server.addHandler(&events);
server.begin();
}
void loop()
{
delay(2000);
float humidity = dht.readHumidity();
// Read temperature as Celsius (the default)
float temperature = dht.readTemperature();
// Check if any reads failed and exit early (to try again).
if (isnan(humidity) || isnan(temperature))
{
Serial.println(F("Failed to read from DHT sensor!"));
return;
}
if ((millis() - lastTime) > timerDelay)
{
// Send Events to the Web Server with the Sensor Readings
events.send("ping",NULL,millis());
events.send(String(temperature).c_str(),"temperature",millis());
events.send(String(humidity).c_str(),"humidity",millis());
Serial.print(F("Humidity(%): "));
Serial.println(humidity);
Serial.print(F("Temp.: "));
Serial.print(temperature);
Serial.println(F("°C "));
}
}
Fig. 7 Header files
Fig. 8 Global declarations
Fig. 9
Fig. 10 Enter Network credentials
Fig. 11 Server port
Fig. 12 Event source
Fig. 13 Timer Variables
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21 Fetch/obtain the IP address
Fig. 22 Initialize DHT sensor
Fig. 23
Fig. 24 Handling server events
Fig. 24 initializing web server
Fig. 25
Fig. 26 If error occurs while reading data from DHT11
Fig. 27 Sending events to the server
Fig. 28 Print Sensor data on the Serial monitor
Fig. 29 Select development board and COM port
Fig. 30
Fig. 31
This concludes the tutorial. I hope you found this of some help and also hope to see you soon with a new tutorial on ESP32.
Here, in this project, we are going to make an Up-Down counter. A simple counter counts in increasing or decreasing order but the Up-Down counter counts in increasing and decreasing order, both depending upon the input it has given.
But I am having an interesting question about the counter. Let suppose if the counter is counting in increasing order then up to which value, it will count because it can not count to infinite which means it has to reset after some certain value, and I believe that you must be having the same doubt as well. Basically every counter resets itself after a certain value and that value depends upon the bits of a counter.
Let suppose, we have a 8 bit counter which means it will count a maximum of up to 255 after which, it will reset to 0. So the size of the counter depends upon the bits of the counter.
So, in this project, we are going to make a counter which will count from 0 to 9 after which it will again reset to 0.
We will make this project in the simulation first, for that we will use a simulation software which is Proteus.
Proteus is a simulation software for electronics based circuits. In this software we can make different types of electronic circuits and we can run the simulation and can monitor the working of that project in real-time only.
And it is a good practice also while making any new project. First of all, we should make a simulation of that project so that we can debug any issues without damaging any real components.
Proteus has a very huge database of all types of electronics components pre-installed.
In this project, we will use the following components:
Truth Table for Modes
In this project, we will use two push buttons for controlling the counter as an Up counter or Down counter. The outputs from the push buttons will work as input for the BCD/DECADE UP/DOWN COUNTER IC. When we press the push button, there will be a change in the signal pin of the IC and according to the truth table when the signal changes from logic HIGH to LOW and the other input clock pin is at HIGH state then it will change the output count value depending upon the selected pin.
Which means if we push the Up counter push button, it will send a pulse to CpU pin of the IC, afterwards it will process as the increment in the output value, so it will increase the current output value by one. Similarly, for the Down counter push button, when we press the button, it will send a pulse to the CpD pin of the IC, thereafter it will process as the decrement in the output value so it will decrease the current output value by one.
And the outputs of the BCD/DECADE UP/DOWN COUNTER IC will work as the input for the BCD to 7-Segment Decoder. And the output pins of the BCD to 7-Segment Decoder will be connected to the 7 segment LED with some protection resistor to prevent them from damaging.
The 7-Segment Led display will glow the LEDs depending upon the output values on the BCD to 7-Segment Decoder/Driver.
Now we know the workflow of our counter.
So let‘s move to the circuit of the counter.
For making the project, we will be using the Proteus simulation software.
Now we have our circuit ready, it is time to test it.
I hope we have covered all the aspects of this project. And I think it will be a very useful learning project as well. Now if we see any scoreboard, immediately we will be knowing the electronics behind it. I hope you have enjoyed reading this project. Please let us know in the comment section if you have faced any issues while making this project.
Thanks for reading this article. See you in the next project.
Hi Everyone! Glad to have you on board. Thank you for clicking this read. In this post today, I’ll cover the Role of Cloud Computing in IoT.
Digital transformation has gained momentum in the past few years, the reason traditional technologies are becoming obsolete over time. Now organizations are incorporating modern technologies into their business model at an accelerated pace. These technologies produce the influx of data and at times it becomes very difficult to process and handle that data, thanks to cloud computing that has made the handling of data easy and effective. You don’t need traditional data centers anymore to store and process information. Everything will be taken care of remotely in the cloud with data centers.
Not to mention, this is the era of automation. Companies strive to accommodate automation in the activities of their business so they can achieve maximum output without the interference of humans. And this trend complements the arrival of IoT (internet of things). The IoT is nothing but a data source and cloud computing is used to store and process that data. We’ll touch on this further in this article.
Scroll on.
Both cloud computing and IoT are separate terms but can work together for better efficiency and productivity. The former is an architecture that offers on-demand computing resources to the end-users to process, store and handle data over the internet while the latter is a technology that acts as a data source from where data is produced. In simple words, IoT (internet of things) is a network of ‘things’ like physical objects, humans, and machines connected and collect and exchange data in real-time through embedded sensors. For instance, a human with a heart monitoring device and a car with sensors that send an instant alert to the driver for any danger fall under the umbrella of IoT.
According to Statista, “the total Internet of Things (IoT) connected devices worldwide is expected to reach 30.9 billion units by 2025, compared to 13.8 billion units that were expected in 2021.”
This projects that billions of devices connected will produce enormous data which makes cloud computing a major part of the IoT technology. Both IoT and cloud computing are inseparable and make an effective integration. In the following, we’ll stretch on this further.
As touched on earlier, IoT devices are connected with each other and can produce a flood of data that needs to be handled and processed somewhere. Cloud computing serves that purpose. If IoT devices are connected with traditional data centers, it takes a capital investment to install, manage, scale and upgrade machines on-premises to handle that data. While with cloud computing, virtual infrastructure is created that allows the developers to access and handle computing resources remotely without having to worry about the management of on-site IT infrastructure.
There are cloud service providers that offer cloud computing services to end-users. The common service providers include AWS (Amazon Web Services), Google Cloud, and Alibaba Cloud. The computing capabilities they offer are virtually endless that can effectively process and store the information produced by IoT devices. These providers commonly offer pay-as-you-go service which means you can scale up or scale down the resources as per the requirement of connected IoT devices.
Cloud computing and IoT are not the same but they complement each other. The following are the main advantages of combining IoT data with cloud computing infrastructure.
Security is the top priority for any organization to run its business activities successfully. And when companies use cloud computing to their advantage, it gives them a sense of security because your data is processed and stored in remote data centers managed globally. The cloud service providers have a network of servers located at multiple locations which means your data is not stored at one data center, instead, the system creates files of your data at multiple locations in different data centers. If one server goes down, you can get a copy of data from another server.
Whether you pick private cloud or public cloud is another parameter to guarantee the security of your sensitive data. This is how it works – companies use the public cloud for storing a large amount of data and the private cloud to process sensitive data locally. If you want to keep your IoT safe and secure, you can pick a private cloud for this purpose.
Cloud makes IoT data easily accessible which means you can remotely access information produced by IoT devices from anywhere in the world. Quick and on-spot data access is crucial when it comes to monitoring information gained by connected IoT devices. In IoT technology, we often get continuous readings from the attached sensors and that readings need to be stored and monitored quickly to make instant decisions.
To stretch this further, you can even use edge computing (which is the extension of cloud computing) to your advantage for handling IoT data. The difference between edge computing and cloud computing is the time it takes to process the information. In edge computing, data doesn’t go to the cloud, instead, it goes to the edge device installed near the data source which takes less time to process it.
IoT-based businesses often pick cloud computing to speed up their business operations. Since on-site IT infrastructure is costly and requires up-front payment for the management of traditional data centers. While cloud models remove the hassle of hardware maintenance and give you the flexibility to pick the pricing package best suitable for your business needs.
The following are the frequently asked questions when it comes to integrating IoT with cloud computing.
Technically speaking the answer is no and yes. NO, if you want to locally process your data in on-site IT infrastructure. YES, if you want to leverage the cloud since it’s preferable to pick the cloud model when there is a flood of information to be handled and stored.
There are four different cloud models named public cloud, private cloud, hybrid cloud, and community cloud. You can pick any model based on your business needs and requirements. It all depends on the type of data you want to manage and store. For sensitive information to manage, you can prefer the private cloud model, and for non-sensitive, you can opt for the public cloud model. A hybrid model is another option that gives you the option to integrate both private and public clouds into your business.
It depends on the requirement of IT infrastructure. Do your current IT requirements constantly change over the year? Do local data centers cost you more? What is the type of data? The number of connected IoT devices? These are the main questions you need to ask if you need a cloud model or not. This cloud architecture is mainly suited for you if want cost-effective and reliable solutions to handle enormous data.
Technology is evolving and every business uniquely works to keep up with the pace of this technology.
Billions of devices are expected to be connected through IoT technology, the information produced by these devices is difficult to handle if you apply the traditional approach to handle and process that information.
As the demand to handle and manage a data grows, organizations will integrate cloud computing into their business models.
And on-demand availability with cloud computing is what makes this model more attractive since this way you can monitor and access your information remotely from anywhere in the world. This trend will complement the usage of more IoT devices in the cloud computing model.
It is safe to say that cloud computing is expected to open new and flexible opportunities for IoT-based businesses to handle, store and process a bulk of data.
That’s all for today. Hope you loved reading this article. If you’re unsure or have any questions, you can ask me in the section below. I’d love to help you the best way I can. Feel free to share your experience with the IoT and cloud computing integration. Thank you for reading this article.
JLCPCB (JiaLiChuang Co. Limited) is a worldwide PCB & PCBA Fabrication enterprise. It is a leading company in high-tech manufacturing products specializing in PCB and PCBA production. With over a decade of experience in PCB manufacturing JLCPCB has made over a million customers through online ordering by the customers of PCB manufacturing and PCBA production.
JLCPCB is a professional manufacturer of large-scale manufacturing of PCBs, well equipment, strict management, and superior quality. It deals with the production of all types of PCBs, Stencils, and SMT.
In this article, we are going to discuss widely how the company operates its ordering system of the PCBs by their customers for production through the online booking process.
Normally, SMT components are used in professional/industrial PCBs and JLCPCB offers the best SMT services. You should first check these JLCPCB SMT services to get an idea. Let me highlight its important points:
So, it's quite easy to order for manufacturing of Metal Core PCB on JLCPCB.
Ordering of PCB at JLCPCB is not a complicated process, since the system is user-friendly to every customer. The steps below show the steps to be followed when placing an order.
Register on the official site of JLCPCB, if you don’t have an account. if you already have an account just log in
After login into one account. It will display a home page with a quotation calendar that will display an ordering page. On the quotation calendar, the customer would be asked to enter the size of PCB which he/she requires, quantity, layers, and thickness of their choice
In this step, the customer is required to enter the PCB board details on the online calculator to get the price of the quoted items in step 2. Also, there is the minimum price which is the cheapest one for a particular PCB.
Then click to “Add your Gerber file” this will upload the file. There are written guidelines on how to generate different Gerber files in the best format on the well-known circuit design program found in the company industry. A very small customer ID is always added to the PCB ordered to distinguish the PCB order from all others.
If one wants to put it in a specific location you are required to indicate the location by adding a unique text like “PBCJLPBCJL”
The system will analyze the file Gerber to confirm the dimensions and layers of the board after uploading the Gerber file.
Then click the “Gerber viewer” to the design of the boards. Customers are advised to confirm the Gerber file carefully for any errors. After checking and confirming the errors and no problem is detected just click “save to cart” and continue to the next step
After saving to cart then click “add new item” if you want to order multiple PCBs repeat the same steps from the beginning as you add both of them to the cart.
Expand the cart and view all the details of the PCBs ordered, including the price of each one of them, its specifications, and all the number of PCBs ordered.
After viewing all the details in the cart and seeing all the PCBs you wanted click the “checkout securely” button
On the checkout, menu add your shipping address where are the PCBs are to be shipped. The country where the PCBs are shipped determines the rates. Also, the shipping options are found on the same page just below the address. The shipping methods available are DHL and Airmail both of them vary in their delivery time.
This is the payment method. JLCPCB offers two kinds of payment methods which include
When the order payment is made the company arranges the production where you can go through your “ACCOUNT” menu to track your order status.
Customers may sometimes feel the urge to add a new order to the existing order. This may be because may feel the items ordered are not enough or an increase in demand for the PCBs which were previously ordered
Here below we are going to go through the steps of how to add a new order to the existing order in JLCPCB.
STEP 1: log in to your account and locate the existing order.
When you log in the process will only go through if the existing order is still in the production process. If the order is finished and delivered you will not be allowed to add an order unless you make a fresh order.
STEP 2: You will open the ordering page, upload the Gerber file and add the items you want and click “combine”. Also, this will only appear if there is an extra shipping cost for the order added.
STEP 3: when you click “combine” a new order will be added to the existing order and you can check on its progress.
After placing your order and payment has been made successfully, you can track your order through your account on the company website. Let’s discuss the steps to track your orders.
Login to your account and account menu click order history. After clicking on order history it will direct you to a previously placed orders page where all your previous orders are listed indicating their current status
Once you open the product files column file review status will appear and also the order status in the order status column. Then click order details to learn more.
When you are put I am production-ready to be processed. Click the production progress to check the process.
Once the order has been put into production and processed shipment process takes place. Once the shipment process has started a shipment notification will be sent through your email advising you on the shipment status of your order and the shipping tracking number. One can also use the JLCPCB company website to track the parcel. While on the website click shipment tracking and all the details about your parcel and delivery time information will be displayed.
When the person ordering the PCBs does not specify on the solder mask bridge which is importantly required, it will be ignored. When doing the solder-resistance bridge a spacing between the pins needs to be 0.254mm and special notes on doing that are required.
Zip file attachments such as PDF files, EXCEL, DXF files, etc are ignored and PCB will be done according to the Gerber file provided. One should ensure the correct parameters are chosen and those needed to be converted into a Gerber file when placing your order. If otherwise, zip files attachment are important should be added to the remark field.
In the presence of plated slot or edge, they should not be longer than 6mm, and make a note about it when placing the order or the system will make it for you. In the case where no note is provided the company will assume it and make it in the normal process.
Since there is the use of different software by different clients to design the printed circuit board and the software where Gerber data is processed is not the same as the software used in designing the data it sometimes causes the software incompatibility problems to appear. Due to the reason of no warning notification when transferring and importing the data into the software so it is not easily noticeable and cannot be confirmed to the customers. This makes the company responsible for some of the problems caused by software incompatibility.
There are some marking that sometimes appears on the base material. This is because of some security issues and there is a way it can be removed. There is no track on which PCB will have the mark so all the PCBs have equal chances of having the marks. One should check from their side whether it is accepted while placing the order.
This tab is functional for reasons of reviewing the file quickly before paying for the order. Acts as the preview button on the website. At times the website causes errors when there is something wrong to display it exactly so it is advisable before placing the order to check the file carefully when you feel there is doubt.
The customer should ensure the v-cut line, cut out and millings are located on the same layer with the board outline. If not on the same layer with the board line it will not appear. It is advised when one is placing the order should check carefully because when it is missed due they are not in the same layer with the board outline the company will not be responsible.
When you want the silkscreen clear on the PCB board the width of the texts and space between letters should not be less than 0.15mm and a width of not less than 1mm. when outline is the font is made and the solid part is filled with lines the fillings then should not be less than 0.15mm. the company will not modify the silkscreen on the Gerber file but the text may be widened. If the text is not enough the company will not be responsible for any complaints made regarding unclear texts caused by nonstandard design.
JLCPCB company does not make 3 layer PCBs. If one orders a 4 layer PCB with a single inner layer, the company will process it with the 4 layer process directly and confirm with the customer again. So before placing an order confirm whether there is an inner layer miss or not.
This is the placing of orders same just as the previous one which had been successfully processed. With these orders, the company will not make any changes to the file which was used in the production. The customer should ensure not to leave any related note for the order to be changed while placing the order since the repeated order will not be checked manually by the engineers.
The board outline is used to show how the PCB will look like when made. So everything that needs to be included in the board should be cut out clearly on the board outline. You should avoid the least useful items to avoid confusion. When both the GKO layer and the GM1 layer are found on the Gerber file the engineers will ignore the GKO layer and make boards according to the GM1 layer. when GMI, GM2 or GM2, GM3, GM4 layers are in the Gerber file at the same time, engineers will go for the smallest number after the letter GM as the outline layer by default.
When you place an order to JLCPCB the JLCPCB panel will panel the order by default with the v-cut. JLCPCB only panels PCBs with rectangular and circle shapes. When you penalize the boards yourself but choose “Single PCB” when ordering, the numbers of designs/boards in the Gerber file should not be greater than 5, otherwise, we may cancel this order. If “Panel by Customer” has been chosen, the designs in the panelized Gerber file should not be greater than 10.
The remark field is used when you place your order so that you can leave a note in case of any import, but the company does not recommend the use of this option since all the orders with an English note will take a longer time to get through the audition process.
Large boards sometimes the company might consider them, but if the good board available can not meet the quantity like the one ordered on the website due to the high cost of production they will ship the good boards and refund the difference to you.
The recommended thickness design of boards outlined by the company is 0.15mm. in a case when the board is greater than 0.15mm the centerline will be followed to make the board outline
Orders missing crucial information such as the board outline, solder mask layer the order will be canceled out clearly during the audit process.
Orders beyond the company and engineers’ capabilities, will be canceled directly and an email will be sent to inform you about the reason. So before placing an order kindly check your file carefully before you pay for the order to save the loss due to the cancellation.
Order removal will not affect the functions of the boards if JLCPCB puts the order number at random or miss to remove. The removal of the order number will be refunded.
Easyeda is a free online tool that we provide to design the PCB, and you can place your order on JLCPCB easily and quickly. But if there is a manufacturer error due to the design error, we may not responsible for that.
When the silkscreen overlaps with the openings on the board surface, the principle of openings first will be put into consideration. we will ignore the silkscreen and make the openings on the boards only. In the case where you want to keep the silkscreen on the openings, kindly make a note in the remark column so that the company engineers and factories pay attention to it and meet the required standards.
solder mask clearance is larger than the copper pad it’s exposing, in most PCBs, these pads are known as Non-Solder Mask Defined pads (NSMD).
Some of the other components have another type of solder mask called Solder Mask Defined pad. Which has a clearance of solder mask that is smaller than the copper pad. One can suggest pad and solder mask clearance size in the datasheet when applying. One should ensure that at least 3 mils (0.076mm) of the mask will be printed on all sides of the copper pad. The reason is registration tolerance on the solder mask placement if the mask is smaller than the pad there are possibilities that the mask could move enough exposing bare substrate which will lead to bad results.
In the ordering system, there is no given option to add details on whether the board required has an SMD pad. If CAM engineers don’t get this kind of information the solder mask clearance for SMD pads will be enlarged to its default size.
When transferring SMD information to JLCPCB the following steps are used
On your account page in the ordering system, there is a text box called “PCB Remark”
Write a special instruction informing JLCPCB that your order design has an SMD pad
On clicking yes, the JLCPCB engineers will come up with a production file that is required to manufacture the PCB. When the production is put into consideration a check notification will appear where you can check and confirm it before reproduction. An email will be sent to you when the file is complete and ready for production. Download the processed Gerbers, pay attention to inspect the solder mask clearance for the SMD pads
and their able logistics partners make every step to deliver your PCBs faster.
JLCPCB is a good company since it provides great customer satisfaction, as long as you consider the time differences, and try to make orders with enough time to respond during your working days, and making orders, not near the weekend, they are well worth the money saved and the simple interface.
Their chat support is fairly good, and the assembly service is also mostly good.
Hi Guys! Hope you’re well today. Thank you for clicking this read. In this post today, I’ll walk through Cloud Computing Advantages.
Growing a business requires keeping up with modern technologies. And cloud computing is no different. Even though it’s not a new term and has been around for a long while, it still encompasses a huge potential to effectively run and manage business operations. Cloud computing is the provision of computing resources over the internet. These resources include storage, processing power, and databases.
Integrating more technologies (like IoT, AI) into the business models means it opens up opportunities to produce a large amount of data. And it’s very challenging to store and process that data on on-site data centers. This is where cloud computing comes in handy. It has the potential to effectively handle the flood of data while giving remote access to the developers to manage that data from anywhere in the world.
I suggest you read this entire article as it aims to cover the advantages of cloud computing.
Keep reading.
Cloud computing comes with scores of benefits. A few of them include cost saving, scalability, mobility, unlimited storage, security, instant collaboration, automatic software update, and more. we’ve discussed them one by one in the section below.
Cost is crucial when it comes to successfully running your business. You need to take careful steps to spend capital investments. Using traditional ways to handle your data allows you to spend an upfront payment for the installation of complex IT hardware infrastructure. And this is not enough. You need money to maintain, scale and upgrade that system to effectively handle your data. Cloud computing prevents you from setting up hardware on-site and your data is managed and stored remotely over the cloud with data centers. You don’t need experts to use computing resources. Everything will be taken care of by the cloud service provider.
Scalability is another big advantage that comes with cloud computing. You are not bound to pay for all the computing resources. Service providers offer pay-as-you-go service which means you’ll only pay for the resources you use for your business. For instance, you can pick the specific bandwidth, storage, and processing power to handle and store the data. Business requirements increase as the business grows over time. And at times it happens, based on the customer’s current needs and requirements you need to customize the approach. If you require less storage and processing power, you can ask for it from the service provider.
Cloud computing offers mobility which means your data is not stored in any specific computer hard drive. That data is available online and anyone with an internet connection can access that data. This saves you from program failures or power shutdown. If the system on your location is not working, you can access the data from a different location as long as you have the device to work on and a strong internet connection.
With cloud computing, you create a virtual office to handle the onslaught of data. It gives you the power to ask for unlimited virtual access to handle that data. With traditional data centers, creating unlimited storage capacity is very difficult since you need to upgrade the hardware which requires huge investments. This is not the case with cloud computing. Data centers are handled globally by the service provider and you only pay for the resources you use.
Security is important to turn your business into a brand. More customers will rely on your applications if they know the information they share with you is safe and carefully handled. Data on the cloud computing servers is secure. No need to worry in case your sensitive data is deleted. Data centers on cloud computing are located at different locations and they create the copy of your data at different locations. This means if you’ve lost the data or the server at one location is down, you can use another server from a different location to claim that data. Cloud computing also offers an access management feature that gives access to sensitive data to your employees only, preventing that data from being attacked by potential hackers.
Cloud computing allows instant collaboration between workers. Especially if you are working with freelancers or employees from remote locations. Any file or information shared on cloud computing gives instant access to that data from anywhere in the world. For instance, Google Drive or Dropbox are examples of cloud computing. Data available on these applications can be accessed by anyone anytime.
The software and applications available on cloud computing get updated automatically. You don’t need IT experts to do manual updates. This is the job of your service provider. They instantly update their systems and software for security purposes to avoid any potential threats.
In cloud computing data is managed over the internet. This means you can easily try new ideas and can simply apply new tweaks in the software within seconds. The data is remotely handled and any new software deployment gives you instant access to find the information in the software or any newly introduced application.
Cloud computing offers disaster recovery and backup features. At times the updates on your applications don’t work out and you instantly require the previous version. Cloud servers store the backup of your previous version. And if one server is down, cloud computing quickly moves the customers to the running servers, preventing you from big financial loss.
Cloud computing allows you to have better control over data. It gives you different types of cloud models to pick from like public cloud, private cloud, and hybrid cloud. If you want to process your sensitive data locally, you can pick a private cloud, or if you want to store a large amount of data you can pick a public cloud. And the hybrid cloud is the combination of both private and public cloud which allows you the selectively handle and process your data over different clouds. Moreover, if you don’t want to remain dependent on one service provider, you can get services from two different service providers, this gives you to have better control over your sensitive data.
Not every company picks cloud services to handle data. Some are not even aware of this architecture and even if they are aware, they are not willing to incorporate this infrastructure into this business model. If you choose cloud computing to manage your data, you will remain ahead of your competitors and can better store and process your data.
Cloud computing gives you benefits like security, scalability, unlimited data storage, data recovery, high speed, and more.
One wrong move in the initial steps of picking the right service provider can drastically impact your business.
It takes the right knowledge and skill to implement cloud computing into any business model.
Make sure you’re handling your sensitive data in the right hands who know how to effectively incorporate this cloud model into your organization.
Rest assured, if the service provider is reputable and expert in what they do, you’ll be better off with the cloud model to enhance the productivity, revenue, security, and collaboration of your enterprise.
That’s all for today. Hope you’ve enjoyed reading this article. If you’re unsure or have any questions, you can reach me in the section below. I’d love to assist you in the best way possible. Thank you for reading this post.
Hi Guys! Happy to see you around. Thank you for clicking this read. In this post today, I’ll walk you through Types of Cloud Computing.
Cloud computing is not a new term. Companies have been using this infrastructure for the past two decades. You might be familiar with this term, in case you don’t, cloud computing is the on-demand availability of computing resources over the internet. Simply put, you can process, store and manage a large amount of data using this architecture. The companies offering these services to end-users are called Cloud Service Providers (CSP). And most of these services offer the pay-as-you-go model which means you can ask for only those computing resources required for your business; you don’t pay for the resources you don’t use in the cloud computing model. This liberates you from using on-site data centers for managing data, and you get computing resources online including storage, processing power, and databases.
I suggest you read this post all the way through as I’ll thoroughly cover the Types of Cloud Computing and how they can be used for improving the activities of any business.
Scroll on.
Earlier on-site data centers were a norm for the management of large amounts of data, but cloud computing has gained momentum due to its ability to effectively manage and store the onslaught of data online. Moreover, since these resources are available online, you don’t need hectic IT drills to install, manage, scale or update traditional data centers. These data centers over the cloud are globally managed to give you access from anywhere in the world.
The following are the main types of cloud computing.
1: Public Cloud
2: Private Cloud
3: Hybrid Cloud
4: Community Cloud
No two clouds are the same and picking the cloud type is dependent on the business needs and requirements. Every cloud enables computing power over the network and allows the running of workloads within that system. These cloud models differ in terms of storage capacity, location, and accessibility but they all work on the same principle of virtualization. There is a lot of confusion in each type and I’ll try my best to remove these confusions so you can better understand what each type is all about. We’ll discuss them one by one in the section below.
Public clouds are typically created for businesses but they are not owned by the individual business. Public cloud providers manage and run these clouds and offer services to organizations based on their current needs and requirements. The common public cloud providers include:
This is the most cost-effective option for organizations that don’t have enough capital to invest in the development of IT infrastructure. Public cloud resources are shared by a variety of end-users which means this model is not made for a specific business. Instead, computing resources are shared among businesses of all sizes.
Although this is the preferably best option for businesses to handle a large amount of data, this model doesn’t guarantee the security of sensitive data since this architecture is shared by multiple organizations.
Moreover, this infrastructure offers less customization options and the service providers hold the main authority. A single tweak from the provider’s side can drastically impact your business. For improved security and better control over data, a private cloud is used.
In a private cloud, computing resources are owned by a single organization. This model offers two options: resources can be hosted on-site IT infrastructure or businesses can hire a third party to host their computing resources.
Compared to the public cloud, this model is a bit expensive since it gives you more customization power with improved security. Companies dealing with sensitive data can pick this model since here resources are not shared by a variety of businesses.
Private cloud, if hosted on on-site data centers, gives you the power to fully control the computing resources and make the adjustment based on your internal processes and preferences. Even though this model gives you more control, you require professional IT experts to handle and manage the private cloud on-site. If you don’t want to involve yourself in the nitty-gritty of handling complex IT infrastructure required for private cloud, you can get services from a third party to host and manage your resources on their system. This way you still own the private cloud but you require less technical expertise for handling this model.
Better security is another advantage that comes with a private cloud. Companies require a large amount of data to be handled and stored and in the public cloud that data is vulnerable to cyber-attacks since the computing resources are shared by multiple end-users. To prevent your sensitive data from being compromised or deleted, it is better to keep this type of data within your private security boundary so no one can manipulate your data for their advantage.
Hybrid cloud combines both private cloud and public cloud. You can share data and applications between two clouds using this cloud deployment model. This way workload is not handled by a single cloud architecture, instead, it is shared by two different cloud models.
For instance, organizations need unlimited storage capacity to store a large amount of data, public cloud comes in handy for this purpose for handling non-sensitive data. While, on the other hand, if companies want the processing of sensitive data on the premises of their business, the private cloud is the solution.
Hybrid models are common since they set you free from the long-term investment on a specific cloud model, instead, you can use the combination of both models and ask for required computing resources valuable for your business.
Community cloud is valuable for those sharing common business goals. A variety of businesses use cloud computing models including healthcare, education, manufacturing industries, IT sector, and more. Community cloud is suitable for companies falling under the same business model. For instance, organizations falling under the education sector can pick for community cloud with similar computing resources and storage power. Cost is another factor behind the popularity of this model. The resources cost is split between the organizations picking this cloud model.
If you’re still reading this post, it means you have got a clear idea about the four main types of cloud models. However, there are also less common cloud types used for specific purposes. These types include:
Don’t get confused. This is different from hybrid cloud. In a hybrid infrastructure, companies can get computing resources from both the private and public cloud. While Multicloud is not the combination of different clouds, instead it’s the provision of computing resources from two different cloud service providers. For instance, you can ask for public cloud resources from two different providers to avoid dependency on one single provider.
At its core, a distributed cloud is an architecture that runs from multiple locations but is not owned by a single organization. This model is used to meet the company’s specific performance and compliance needs and it does support edge computing but essentially is managed and controlled by the public cloud provider.
This model is particularly developed to support high-performance computing applications. This model is useful if you want to perform research on a large scale and are looking for a solution for advanced computing problems.
Every business is unique.
It’s your job to carefully monitor the activities of your business and put dedicated thought to pick the particular cloud computing model for your business.
How you want your data to be managed, processed, and stored does matter. If you want to handle a large amount of data, the public cloud is a valuable solution. And if you want the sensitive data to be processed locally, the private cloud is the answer.
And the best part?
You can deploy both private and public cloud models to selectively handle sensitive and non-sensitive data.
And if you don’t want to remain dependent on a single service provider, you can leverage the services of two providers and use them to your advantage.
Make sure you consider the proper security protocols before picking up the right architecture. A single mistake in the initial steps of choosing the cloud model can drastically impact your business in the long run. So be careful.
That’s all for today. Hope you’ve enjoyed reading this article. Share your experience with cloud computing in the section below. If you’re unsure or have any questions about cloud computing, ask me in the comment section. I’d love to help you the best way I can. Thank you for reading this article.
Hello Folks! Glad to have you on board. Thank you for clicking this read. In this post today I’ll walk you through What is Cloud Computing?
Cloud computing is not a buzzword anymore. Even though most companies are familiar with this term, they don’t know what it does and how it works. If you’re one of them, this read is for you. In simple terms, cloud computing allows you to use computer system resources over the internet. This means you can manage your data remotely over the internet from anywhere in the world. We’ll touch this further in our article.
I suggest you read this post all the way through as I’ll cover what is cloud computing, how does it work, the types of cloud computing, the advantages of cloud computing, and the future of cloud computing.
Let’s get started.
Cloud computing is a way of storing, processing, and managing data over the internet. Simply put, it’s the on-demand availability of IT resources online. These resources include data storage, computing power and databases. This way you don’t need to worry about handling data over the computer’s hard drive or on-site data centers. This liberates you from managing hardware circuits, software patching, and on-site IT drills, giving you online access over data centers through which you can efficiently manage and process your data.
With the onslaught of IT workloads, companies harness the power of cloud computing. It’s not only fast, economical, and secure, it also gives better control over data. No matter your location, as long as you have access to the internet, you can control your information online.
Google Drive and Dropbox are the best examples of cloud computing where you can access and manage your information online. Companies can use it for regular tasks like data processing, data management, software development, data protection, backup and disaster recovery, server virtualization, data analytics, and other real-time applications.
There are three basic parts of cloud computing.
1: Device (like computer, tablets, smartphones) through which you access data
2: Cloud with data centers where data is stored and processed
3: Internet which connects cloud with the device
You might be familiar with the term client-server model. Here user with the device is the client and the cloud with data centers are the servers while the internet connects the users with data centers.
Prior to cloud computing, handling and storing data was challenging. Companies used to install their own data centers that required proper maintenance and regular on-site check-ups to make sure they were running well, which resulted in more oversized bills and more space to accommodate them. It was impractical, expensive, and less efficient.
But cloud computing has dramatically changed this behavior. Now companies don’t need to worry about maintaining, scaling, securing, and managing their IT infrastructure, instead, they can focus on providing a better user experience with quality products. The organizations get these reousrces with pay-as-you-go terms which means the more resources they use the more they pay over time.
Companies that provide cloud computing services often offer monthly subscriptions and give users access to their computing resources. They don’t need to get in the hassle of updating servers, buying software, getting more machines to back up the data, and updating software to avoid potential security threats. The service provider takes care of all of that for them.
Cloud computing is perfect for businesses that have a lot of data to deal with. Cloud computing is mainly divided into three major types.
The public cloud offers compute resources like storage, memory, networking, and CPU. Public cloud vendors host these resources with globally and fully managed data centers. You can pay the vendors and rent these resources to develop your IT infrastructure.
The managed services in the compute resources include security systems and database servers that set you free from the hectic drill of managing and installing the whole solution into your local and on-site data centers.
The common leading providers of cloud computing services include Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure. You can hire the compute resources from these vendors as per the needs and complexity of your business operations.
The public cloud is shared by a range of organizations while the private cloud, on the other hand, is specifically developed to meet the business needs of a single organization.
Some businesses don’t feel comfortable working with the public cloud. They want their separate and private cloud on their on-site data centers. Private cloud is perfect and ideally suited for single private organizations.
Two options there: companies can host private cloud or they can involve third-party vendors to host their private cloud on their system. This gives them the ability to immediately get access to the compute power based on their businesses. This setup is best for businesses that are a bit obsessed with the security of their systems.
Hybrid cloud gives you the ability to combine both public and private cloud and use them to your advantage. You can use either of them for a specific purpose. For instance, you may want to get unlimited storage space from the public cloud but you want to process the sensitive data on your private cloud.
This means if you running out of computing resources from the private cloud you can get the services of the public cloud to fulfill your business needs. It gives businesses advanced flexibility to move data across both clouds without a full commitment to the public cloud’s vendor.
And cost management is another blessing that comes with hybrid cloud. If you own a private cloud you need to install data centers on-site which require proper care and a capital expense. But with the public cloud, you only pay for resources without having to worry about the management of data centers.
Now you know what is cloud computing and how does it work. Perfect. There are several advantages of cloud computing. A few of them include:
Cloud computing becomes a necessary part of the business as the requirement to manage and store a large amount of data grows. And this trend will definitely increase as managing data in on-site data centers is not only expensive, it requires a lot of IT drills to properly install and maintain machines handling and storing data.
We can expect the following future trends in cloud computing.
Digital transformation is on the rise. And in this era where technology is changing at an accelerated pace, it’s necessary to come up with advanced solutions to manage, store and process your data.
Cloud computing is now a part and parcel of successful organizations. But still, companies, who have reservations about the security of cloud computing, hesitate to transfer their data to a remote location.
For those hybrid model gives the perfect solution where you can get the advantage of both cloud services. For sensitive data, you can pick the private cloud while for the storage of regular and less sensitive data you can choose the private cloud. This way you can move your data and scale your compute resources as per the complexity of your business.
Not to mention, cloud computing has just started. And as the requirements and demands of businesses go complex, companies need powerful systems that not only store their data but also offer advanced processing capabilities. With new advancements in IoT technology and Artificial Intelligence, more businesses will likely adopt cloud computing for the years to come.
That’s all for today. Hope you’ve enjoyed reading this article. If you are unsure or have any questions about cloud computing, feel free to ask me in the section below. I’d love to help you the best way I can. Thank you for reading this article.
There are many comparator operations like equal (==), not equal (<>), less than (<), greater than (>), less than or equal (<=), greater than or equal (>=). All these comparator operations might be used in different logic scenarios while writing a ladder logic program. In this tutorial, we are going to go over each operator showing the input operators and output as well. In addition, we will practice some examples with the simulator to familiarize how to use them flexibly while developing ladder logic programs.
Because they are used for comparing two the value of input variables, there will be two operators which are being compared. these input variables could be of any data type i.e. integer, real, boolean, character, string et cetera. And the output will be a boolean data type which denotes true or false, or “0” or “1”. As shown in Fig. 1 a typical comparator operator has two operands and one output which is called the result of logic (RLO).
Fig. 1: Comparator operation bock diagram
Table 1 lists examples for one of the comparisons between two variables of different data types and their output. In table 1, a typical example of “==” comparator operation between two strings considering the case sensitivity. The first column shows the values of the first operand and the second column shows the values of the second operand while the result of a logical operation (RLO) is represented in the third column. Now let us go over the station of each comparator operation for elaborating their operators, result, and give an example with simulation.
Table 1: example of comparator operation’s operands and RLO
The equal operator is used to check if two operands are equal or not. The input operands’ datatype could be any of the possible data types in the language you are using. For example, Table 2 shows the parameters of the Equal operator in siemens S7. As you can notice, the input operand’ datatype can be any of the listed data types in the third column. One thing we need to highlight here is that datatype could be an array or structure of elements of the basic datatypes. For example, it could be an array of integers. In this case, the comparison will be conducted between every single element in the array of both operands. And if any of these elements have been found not match their equivalent in the other operand, the RLO will be false. Furthermore, the comparison not only does it apply to variables but also could be conducted between memory areas as shown in the third column. It can be used to compare input, output, marker, counter, timer memory data.
Table 2: the parameters of the Equal comparator operator
Figure 2 depicts an example of an Equal comparator operation. .it compares literal constant with the variable of type integer saved in marker memory MW4 which is the location of a memory word.
Fig. 2: Example of Equal comparator operator
Figure 3 shows the simulation result of an example of an equal comparator operator. In the case of operands are not equal as in the example shown by fig. 3. The first operand is equal to 5 while the second operand is “0”. So the RLO shows false or “0”.
Fig. 3: simulation result of equal comparator operation when its operands are not equal
Figure 4 shows the simulation of an equal comparator when its operands are equal. The RLO is true or “1”. So the output coil is TRUE.
Fig. 4: simulation result of an equal operator when operands are equal
This operator is used to compare two operands. When they are not equal it produces positive RLO with High logic and when they are equal it returns false or “0”. Figure 5 shows the test result on the simulator of the NOT operator when the operands are equal. It returns RLO with “0” or false.
Fig. 5: simulation result of Not equal operator when operands are equal
On the other hand, fig. 6 shows the result of the simulation of the NOT operator when its operands are not equal. It gave RLO with logic Tru or “1”.
Fig. 6: simulation result of an equal operator when operands are equal
The greater than comparator operator is used for checking if operand 1 is greater than operand 2 or not. Figure 7 shows the rung of a ladder logic program that utilizes greater than comparator operation in which two operands of the integer data type are compared using the greater-than operator. The first operand is at memory location MW4 and the second operand is at memory location MW2. And the RLO represents the retuned result of the greater than comparator operation.
Fig. 7” ladder logic rung example of usage of greater-than comparator operation
Figure 8 shows the results of greater than comparator operation when operand one B is not greater than operand A. on the left side of the figure, it shows the case when both operands are equal and the right side shows the case when operand one is less than operand 2. In both cases, greater than operator sees its condition is not fulfilled so it returns false or “0” at the RLO and hence the output is false.
Fig. 8: simulation results of a greater-than operator when operand 1 is not greater than operand 2
The less than comparator operator is used for checking if operand 1 is less than operand 2. Figure 9 shows a rung of a ladder logic program that utilizes less than comparator operation “A<B” in which two operands of the real data type are compared using the less-than operator. The first operand is at memory location MD8 and the second operand is at memory location MD12. And the RLO represents the retuned result of the greater than comparator operation. Also, it shows that, when oper1 is not less than oper 2, the result of logic output RLO is false and output is not activated.
Fig. 9: ladder logic rung example of usage of less-than comparator operation
Figure 10 shows the results of less than comparator operation when operand “oper1” is less than operand “oper2” the returned RLO is high or “1” and the output is activated. Now, one may question the case if the two operands are equal? Well that is is a good question and the case of equality between the two operands is considered false for both less than and greater than comparator operations.
Fig. 10: simulation results of less than operator when operand “oper1” is less-than operand “oper2”
Please see fig. 11 which shows the less comparator operation returns false when the two operands are equal. The next section will show the case of greater than or equal comparator operators “>=” and the less-than or equal comparator operator “<=”. In those cases, the equality between the two operands is included and the returned RLO is True or “1”.
Fig. 11: the less-than operator returns false when the two operands are equal.
Figure 12 shows a run in a ladder logic program that uses greater-than or equal “>=” operator. As you can see, the output shows true when the two operands are equal.
Fig. 12: greater-than or equal “>=” when two operands are equal
Figure 12 shows a run in a ladder logic program that uses less than or equal “<=” operator. As you can see, the output shows true when the two operands are equal.
Fig. 12: the less-than or equal “<=” when two operands are equal
Do all comparator operations take two operands? The answer is almost yes. However, there are very few operators that take only one operand. For example, the in-range operator compares the input operand with upper and lower limits to check if it is located within a specific range or not. Figure 13 shows a ladder logic rung uses that comparator operator to check operand oper1 of type real to see if it is in the defined range which is between 0 to 10.0. because the value of the operand oper1 is 11.5 which is out of the defined range. The RLO shows false or zero. Therefore, the output is deactivated.
Fig. 13: in-range comparator operation for the real data type variable
Figure 14 shows the RLO is true when the operand’s value is located between the defined limits of the in-range block. Also, there is out range comparison operator that is the opposite of the in-range operator about the logic.
Fig.14: in-range comparator operation returns true when operand located in the range
In this section, we want to show you how these comparator operators can be combined to achieve a logical expression in ladder logic programming. let us imagine a scenario that we have a garage with a full capacity of 100 parking spots and we utilize a counter to count up cars get in and count down the cars that get out of the garage. Figure 15 shows a very simple logic of the validation and comparison to decide if the garage has room for a further car or it is full and no further car is allowed at present. Assume that the output of the counter is an integer data type variable that is stored in memory location %MW20. Now you can see the logic is straightforward. In the first step, the counter output is validated to make sure that it plays in a valid range which is from 0 to 100 which denotes empty to full capacity of the garage. It applies the limit function to the counter in case it is out of range to reset it to be within the designed range. Then program checks in the second step the value if it is less than the full capacity of the garage which is designed to be one hundred cars, it states true indicated with green lamp output meaning there is still room for cars to get in the garage; otherwise, it checks if it is greater than or equal of the maximum limit meaning there is no room for further cars to enter, it shows false meaning garage is full at the current time by activating a red lamp.
Fig. 15: garage status ladder logic example
Figure 16 shows the case when the garage still has room for further cars and the green lamp is activated for incoming cars.
Fig. 16: when the garage has room for further cars
Figure 17 shows the case when the garage is full and has no room for further cars. So the red lamp is activated for telling users no further empty spots available at the moment.
Fig. 17: when the garage is full
As usual, I want to express my delight in your following up our tutorial, and let me take this chance to announce one of the most important and exciting tutorials which are about processing the analog inputs and how to scale the analog inputs. Did I tell you my friends that will be the next chapter? So be ready for enjoying processing analog inputs with practicing real-life situations in the industry.
ESP32 module comes with multiple inbuilt features and peripheral interfacing capability is one of those features. ESP32 module also consists of an inbuilt temperature sensor, but that can only measure the temperature of the ESP32 core not the temperature of the surrounding environment. So it is required to use a peripheral sensor to measure the temperature of the surrounding environment like home, garden, office etc.
Hello readers. I hope you all are doing great. In this tutorial, we will learn how to interface DHT11 (temperature and humidity sensor) with the ESP32. Later in this tutorial, we will discuss how to share the sensor readings obtained from the DHT11 sensor to a web server.
Before moving towards the interfacing and programming part, let’s have a short introduction to the DHT11 sensor, its working and its connections.
Where To Buy? | ||||
---|---|---|---|---|
No. | Components | Distributor | Link To Buy | |
1 | ESP32 | Amazon | Buy Now |
Fig. 1: DHT11 sensor
DHT11 is used to measure humidity and temperature from its surrounding. It monitors the ambient temperature and humidity of a given area. It consists of an NTC (negative temperature co-efficient) temperature sensor and a resistive type humidity sensor. It also consists of an 8-bit microcontroller. The microcontroller is responsible for performing ADC (analog to digital conversion) and provides a digital output over the single wire protocol.
DHT11 sensor can measure humidity from 20% to 90% with +-5% (RH or relative humidity) of accuracy and can measure the temperature in the range of 0 degrees Celsius to 50 degrees Celsius with +-2C of accuracy.
DHT11 sensors can also be used to implement a wired sensor system using a cable length of up to 20 meters.
There are two DHT modules (DHT11 and DHT22) available in the market to measure temperature and humidity. The purpose of both module are same but with different specifications. Like DHT22 sensor provides broader temperature and humidity sensitivity ranges. But DHT22 is costlier than DHT11. So you can prefer to use any of the module, as per your requirements.
Table: 1
Note: Connect a 10K resistor between data and power (+5V) pin of DHT11 sensor module.
Fig. 2: ESP32 and DHT11 connections/wiring
We are using Arduino IDE to compile and upload code into ESP32 module. To know more about Arduino IDE and how to use it, follow our previous tutorial i.e., on ESP32 programming series. Link is given below:
https://www.theengineeringprojects.com/2021/11/introduction-to-esp32-programming-series.html
DHT11 sensor uses single wire protocol to communicate data which requires a precise timing. In order to interface DHT11 sensor with ESP32 module it is required to add necessary libraries. To install the DHT11 sensor library;
Fig. 3: manage libraries
Fig. 4: Install DHT sensor library
#include "DHT.h"
#define DHTPIN 4 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
// Initializing the DHT11 sensor.
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(115200);
Serial.println(F("DHT test string!"));
dht.begin();
}
void loop() {
// Wait a few seconds between measurements.
delay(2000);
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
float h = dht.readHumidity();
// Read temperature as Celsius (the default)
float t = dht.readTemperature();
// Read temperature as Fahrenheit (isFahrenheit = true)
float f = dht.readTemperature(true);
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
}
// Compute heat index in Fahrenheit (the default)
float hif = dht.computeHeatIndex(f, h);
// Compute heat index in Celsius (isFahreheit = false)
float hic = dht.computeHeatIndex(t, h, false);
Serial.print(F("Humidity(%): "));
Serial.println(h);
Serial.print(F("Temp.: "));
Serial.print(t);
Serial.println(F("°C "));
Serial.print(F("Temp.: "));
Serial.print(f);
Serial.println(F("°F "));
Serial.print(F("Heat index: "));
Serial.println(hic);
Serial.println(" ");
Serial.print(F("°C "));
Serial.print(hif);
Serial.println(F("°F"));
}
Fig. 5: Add necessary libraries
Fig. 6: Global declarations
Fig. 7
Fig. 9
Fig. 10
Fig. 11
Fig. 12: Heat index
Fig. ESP32 and DHT11 interfacing
Fig. 13: Readings observed from DHT11 sensor
The IoT is the interconnection of physical objects or devices with sensors and software accessing capabilities to communicate data or information over the internet.
To build an IoT network, we need an interface medium that can fetch, control, and communicate data between sender and receiver electronics devices or servers.
Espressif Systems created the ESP32 Wi-Fi chip series. The ESP32 module is equipped with a 32-bit Tensilica microcontroller, 2.4GHz Wi-Fi connectivity, an antenna, memory, and power management modules, and much more. All of these built-in features of this ESP32 module make it ideal for IoT applications.
It is an open data platform for the Internet of Things (Internet of Things). ThingSpeak is a MathWorks web service that allows us to send sensor readings/data to the cloud. We can also visualise and act on the data (calculate the data) sent to ThingSpeak by the devices. Data can be stored in both private and public channels.
ThingSpeak is commonly used for internet of things prototyping and proof of concept systems requiring analytics.
Fig. 14: Getting started for free
Fig. 15: Create new account
Fig. 16: MathWorks Sign in
Fig. 17: New Channel
Fig. 18: Fill the channel details
Fig. 19: Field Chart Edit
https://github.com/mathworks/thingspeak-arduino
Fig. 20: Adding ThingSpeak library
To check whether the library is successfully added or not:
Fig. 21: manage libraries
Fig. 22: Arduino IDE Library manager.
//------style guard ----
#ifdef __cplusplus
extern "C" {
#endif
uint8_t temprature_sens_read();
#ifdef __cplusplus
}
#endif
uint8_t temprature_sens_read();
// ------header files----
#include <WiFi.h>
#include "DHT.h"
#include "ThingSpeak.h"
//-----netwrok credentials
char* ssid = "replace this with your SSID"; //enter SSID
char* passphrase = "replace this with your password"; // enter the password
WiFiServer server(80);
WiFiClient client;
//-----ThingSpeak channel details
unsigned long myChannelNumber = 3;
const char * myWriteAPIKey = "replace this with your API key";
//----- Timer variables
unsigned long lastTime = 0;
unsigned long timerDelay = 1000;
//----DHT declarations
#define DHTPIN 4 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
// Initializing the DHT11 sensor.
DHT dht(DHTPIN, DHTTYPE);
void setup()
{
Serial.begin(115200); //Initialize serial
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, passphrase);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
//----nitialize dht11
dht.begin();
ThingSpeak.begin(client); // Initialize ThingSpeak
}
void loop()
{
if ((millis() - lastTime) > timerDelay)
{
delay(2500);
// Reading temperature or humidity takes about 250 milliseconds!
float h = dht.readHumidity();
// Read temperature as Celsius (the default)
float t = dht.readTemperature();
float f = dht.readTemperature(true);
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
}
Serial.print("Temperature (ºC): ");
Serial.print(t);
Serial.println("ºC");
Serial.print("Humidity");
Serial.println(h);
ThingSpeak.setField(1, h);
ThingSpeak.setField(2, t);
// Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up to 8 different
// pieces of information in a channel. Here, we write to field 1.
int x = ThingSpeak.writeFields(myChannelNumber,
myWriteAPIKey);
if(x == 200){
Serial.println("Channel update successful.");
}
else{
Serial.println("Problem updating channel. HTTP error code " + String(x));
}
lastTime = millis();
}
}
Fig. 23: Libraries
Fig. 24
Fig. 25: server port
Fig. 26
Fig. 29
Fig. 30: connect to wifi
Fig.31: Fetch and print IP address
Fig. 32
Fig. 33
Fig. 34
Fig. 35
Fig. 36: Displaying humidity on thingSpeak server
Fig. 37: Displaying Temperature on ThingSpeak server
This concludes the tutorial. I hope you found this of some help and also hope to see you soon with new tutorial on ESP32.