IoT and Robotics Lecture 3 intro duction to ESP32 Microcontroller
As I started the
IoT course here in the previous lecture I just described the method of interfacing LCDs with microcontrollers. we did not cover all the aspects in detail. Now I am going to present the elementary level of knowledge that is necessary for our Journey. let's start our discussion with a microcontroller
Microcontroller and its importance
A microcontroller is a type of small, low-cost microcomputer that is designed to carry out the unique functions of embedded systems. These jobs include displaying information from Sensors and other devices, receiving signals from remotes, and other similar activities.
The microcontroller is also known as MCU (Microcontroller unit )
Wdo hy we need a microcontroller?
Sometimes we need to do some light computing or data gathering. where the cost of a whole computer system is expensive. Let's consider a project,
for example, we needed seve l computers at each location fitted with a humidity sensor so that they could continuously collect data from the sensor and upload it to the server. A whole computer setup is too heavy, expensive, and energy-intensive to run only for this purpose. All we need is a simple computer that will be affordable and won't take up too much space. This computer shouldn't be any bigger than a single chip. And we needed only a few KBs of storage space in it. We can think of the computer as our microcontroller.
Micro controller vs MicroProcessor
MicroProcessor | Microcontroller |
---|---|
A microprocessor is the part of a microcomputer that controls it. It is on a tiny chip. It talks to the othconnected devices it and performs Arithmetic Logical Unit (ALU) operations. It is a single integrated circuit that has more than one function. | Microcontrollers are chips that are made to handle a lot of different electronic tasks. It is built into a single integrated circuit that can only run one progrsimultaneouslyime. its program was written for special purposes |
A microprocessor has a CPU embedded in it | Microcontrollers embed CPU RAM ROM and input/output unit |
A microprocessor cannot interface directly with other peripheral devices | Microcontrollers can interface directly with other peripheral devices |
A microprocessor requires more power energy to operate | A microprocessor requires less power energy to operate |
Cost of microprocessor system is high | A Cost of microcontroller system is low |
About ESP 32
After understanding the difference between a microcontroller and a microprocessor, Let's start our today's journey. we are working on a microcontroller named ESP32 here are the Pinouts of ESP32
Image Source
As described in the image esp32 has various types of pins. we can interface almost all sensors with it. This MCU provides different interfacing protocols at the same time like UART, IIC, SPI, Analogue, and digital input/output. this device alcan to control the touch display. we will cover all connection protocols in the following lectures.
ESP32 Specifications
Esp has all the abilities which we expect further om microcontroller
- Dual-Core 32-bit LX6 Microprocessor with clock frequency up to 240 MHz.
- 520 KB of SRAM, 448 KB of ROM, and 16 KB of RTC SRAM.
- Supports 802.11 b/g/n Wi-Fi connectivity with speeds up to 150 Mbps.
- Support for both Classic Bluetooth v4.2 and BLE specifications.
- 34 Programmable GPIOs.
- Up to 18 channels of 12-bit SAR ADC and 2 channels of 8-bit DAC
Serial Connectivity include 4 x SPI, 2 x I2C, 2 x I2S, 3 x UART.
Ethernet MAC for physical LAN Communication (requires external PHY). - 1 Host controller for SD/SDIO/MMC and 1 Slave controller for SDIO/SPI.
- Motor PWM and up to 16-channels of LED PWM.
- Secure Boot and Flash Encryption.
- Cryptographic Hardware Acceleration for AES, Hash (SHA-2), RSA, ECC, and RNG.
The dual-core processor makes esp32 more reliable due to this you can run more threads and RTOS
here is the structure of the ESP32 microcontroller
Image Source
ESP32 IoT Friendly
Esp32 provides some exciting features which make it the best choice for IoT Applications. it requires low power to operate and also it's in tiny SMD shape, So we did not require much Space for It. This MCU has point-to-point wireless communication. It means that multiple Esp 32 can wirelessly Communicate with each other. Here are some Wireless connection protocols provided by ESP32.
- ESP Now
- WiFi Mesh
- BLE Mesh
we discuss one by one in our upcoming lectures.
How to write Programm in Esp 32
ESP 32 manufacturer provides an "ESP MDF" environment to program this microcontroller. But Using MDF is a little bit tricky. we will use Arduino IDE for Programming ESP32. Follthe ow below link to Download Arduino IDE
Arduino IDE download
After Installation of the Arduino IDE, We Need to Configure Esp32 with Arduino IDE follow the link to configure Esp32 With Arduino IDE
In the lecture, I described the importance of microcontrollers. and introduced the ESP32 Microcontroller. we will work on ESp 32 in Our Upcoming Lectures
Thanks for your time
I didn't know about this eletronic device! thanks to explaining a bit about it
!1UP
Thank you. In short, this chip is a tiny computer with Wifi And Bluetooth I will Explain more in upcoming lectures.
You have received a 1UP from @gwajnberg!
@stem-curator
And they will bring !PIZZA 🍕.
Learn more about our delegation service to earn daily rewards. Join the Cartel on Discord.
Thank you
Congratulations @ammar79! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):
Your next target is to reach 100 replies.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out the last post from @hivebuzz:
Support the HiveBuzz project. Vote for our proposal!