How to Program 802.11bgn Wifi Module with ESP32 in RTOS?

2022-01-24 SKYLAB
Wi-Fi module,ESP32,WG209_01,WG211

In this post,SKYLAB will develop a project that contains two tasks, which perform simultaneously by the two ESP32 cores. The first task will be to automate the control of a fan from the ambient temperature. And the second task develops a daily reminder to drink water.


This project is extremely beneficial

This project is extremely beneficial especially for those who are doing home office or distance learning. As it allows the reader to fully focus on work/study without worrying about forgetting to drink water or heat. The fan automation is also great for using at night while you sleep. During periods when the temperature drops, the fan turns itself off, saving energy.


Note: They couldn't find the correct 802.11bgn Wi-Fi module of the temperature sensor on the fritzing, this was the closest thry found, however, it is not very different from the one they are using here. It has an extra thread, white, which must be ignored.


3 No basement roof slab grey structure Area


Don't forget to consider this small difference when assembling.

The red and black wires are, respectively, the positive and the negative, the same as the DS18B20, but the orange wire here is yellow in the one we're using, so don't forget to consider this small difference when assembling.


It is also important to point out that, in the part of the relay connection with the fan, an extension was made. It is possible to do this project in other ways, cutting the fan wire, for example. But that was the way chosen in this post. The following images show the extension.


802.11bgn wifi module Introduction

If you're a fan of Arduino, automation, and IOT, you're probably following the new 802.11bgn wifi module technologies on the market. And you've noticed the growing maker movement in the internet of things area. With that in mind, in this post, we bring the simplest way to install the three main WI-FI cards in the Arduino IDE.


These boards are microcontrollers with WI-FI antennas, can perform the same functions as the Arduino board, and can even be integrated into it.


There are several boards based on the 802.11bgn wifi module and ESP32 chips.


802.11bgn Wi-Fi module Materials

In addition to the boards, we are going to use some components to develop a simple recorder for ESP01.

• ESP01;

• ESP12E;

• NodeMCU;

• ESP32;

• USB Serial TTL Converter;

• 3 resistors of 10K OHM;

• 2 push buttons;

• Male-female jumpers;

• circuit jumpers;

• Protoboard.

Low cost and fast dissemination

As we already mentioned, the 802.11bgn wifi module is a microcontroller chip that revolutionized the motion maker for its low cost and fast dissemination. What is most striking is that it has Wi-Fi enabling the connection of various devices to the internet or local network. It performs well for many tasks, in addition to having a very stable connection.


The chip in its original form used in end products for third parties, for prototyping, and to facilitate handling, manufacturers have created modules and development boards, such as:


Most common and simplest module

The most common and simplest 802.11bgn wifi module has only control pins and two GPIOs for input and output. The TX and RX pins can be declared as digital input and output. But this way it will not be possible to make serial communication with another module or board through the pins.


Like the ESP01, ESP12E derives from the 802.11BGN chip, however, it has more features. The ESP12E is commonly practice on your NodeMCU development board.


It has 22 pins, being those for power, control, communication, and GPIO's. It has an analog input from 0 to 1V and 9 analog inputs and outputs in addition to TX and RX.


More versatile than its predecessor

This small component proves to be more versatile than its predecessor, the 802.11bgn wifi module, as in addition to the classic Wi-Fi communication module. It features a system with a Dual-Core processor, hybrid Bluetooth, and multiple built-in sensors, making the construction of a system like the internet of things (IoT) much simpler and more compact.


The Arduino is very interesting for projects where it is necessary to monitor temperatures, sound, lighting, liquid flow, and the most diverse variables in our daily lives.


Use a display to monitor the variables

In most projects, we use a display to monitor the variables. And in some control projects, the magnitude of interest is not display. This creates problems in the long run, because, in cases of design errors, or possible problems, it is desirable to know in which condition the defect.


Let's think about the case of a drug storage system like insulin. Where the temperature must always be between 2°C to 8°C at the most. It would be very interesting to be able to save all the measurements. So that it is easy to assess whether the drug is in good condition.


Conclusion

Access to data in a datalogger without an 802.11bgn wifi module wireless connection is through a physical interface, which makes real-time visualization difficult. With the use of a cloud database, we have the advantage of retaining data like a Datalogger and real-time visualization.


  • +1 Like
  • Add to Favorites

Recommend

This document is provided by Sekorm Platform for VIP exclusive service. The copyright is owned by Sekorm. Without authorization, any medias, websites or individual are not allowed to reprint. When authorizing the reprint, the link of www.sekorm.com must be indicated.

Contact Us

Email: