IoT and Robotics Lecture 3 intro duction to ESP32 Microcontroller

avatar

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,


Image Source

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

MicroProcessorMicrocontroller
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 itMicrocontrollers embed CPU RAM ROM and input/output unit
A microprocessor cannot interface directly with other peripheral devicesMicrocontrollers can interface directly with other peripheral devices
A microprocessor requires more power energy to operateA microprocessor requires less power energy to operate
Cost of microprocessor system is highA 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

ESP32 Board installation

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



0
0
0.000
5 comments
avatar

I didn't know about this eletronic device! thanks to explaining a bit about it
!1UP

0
0
0.000
avatar

Thank you. In short, this chip is a tiny computer with Wifi And Bluetooth I will Explain more in upcoming lectures.

0
0
0.000
avatar

Congratulations @ammar79! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You got more than 50 replies.
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:

HiveFest⁷ Meetings Contest
HiveFest⁷ - Participate in the Balls of Steel tournament and get a new badge
New badge - LEO Power Up Day - September 15, 2022
Support the HiveBuzz project. Vote for our proposal!
0
0
0.000