Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
M5Stack Electronic Blueprints

You're reading from   M5Stack Electronic Blueprints A practical approach for building interactive electronic controllers and IoT devices

Arrow left icon
Product type Paperback
Published in Feb 2023
Publisher Packt
ISBN-13 9781803230306
Length 288 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Part 1: M5Stack Electronics Hardware Architecture
2. Chapter 1: Exploring the M5Stack Core FREE CHAPTER 3. Chapter 2: Hands-On with M5Stack Units 4. Chapter 3: Lights, Sound, and Motion with M5Stack 5. Part 2: M5Stack Electronic Interfacing Circuit Projects
6. Chapter 4: It’s a SNAP! Snap Circuits and the M5Stack Core 7. Chapter 5: Solderless Breadboarding with the M5Stack 8. Chapter 6: M5Stack and Arduino 9. Part 3: M5Stack IoT Projects
10. Chapter 7: Working with M5Stack and Bluetooth 11. Chapter 8: Working with the M5Stack and Wi-Fi 12. Index 13. Other Books You May Enjoy

Overview of the M5Stack Core hardware architecture

In the previous section, you learned about the basic internal and external electronic features of the M5Stack Core. You investigated these basic features by using the M5Stack Demo app and specific IoT Starter Kit sensor units. In this section, you will learn about the embedded electronic subcircuits used to operate the M5Stack Core. The M5Stack Core’s hardware architecture consists of the following four electronic subcircuits:

  • Power management
  • Audio amplifier
  • ESP32 subsystem
  • USB-UART and accessories

The M5Stack Core hardware architecture system block diagram is illustrated in Figure 1.16:

Figure 1.16 – M5Stack Core hardware architecture system block diagram

Figure 1.16 – M5Stack Core hardware architecture system block diagram

EA3036 DC-DC converter (power management)

The EA3036 direct current to direct current (DC-DC) converter is a power management integrated circuit (IC). The EA3036 IC can be powered by one lithium-ion (Li-Ion) battery. The input voltage range for the EA3036 is 2.7 V (volt) DC to 5.5 V DC. The IC can also be powered by a basic 5 V DC adapter or phone charger. The EA3036 integrates three synchronous buck converters into one convenient 20-pin quad flat no-lead (QFN) IC package. Let us learn more about the EA3036 DC-DC converter by reviewing the IC’s physical pin packaging, shown in Figure 1.17, and the internal electronic circuits:

Figure 1.17 – EA3036 IC QFN package

Figure 1.17 – EA3036 IC QFN package

The EA3036 DC-DC converter provides the 3.3 V (3V3) voltage source to operate the ESP32 microcontroller and support electronic circuit peripherals. Electronic circuit peripherals include the audio amplifier (N54148), A, B, C, and reset pushbutton switches, the LCD, the universal asynchronous receiver transmitter (CP2104) IC, and the USB-Micro (IP5306) circuit. The M5Stack Core Li-ion battery can power these subcircuits efficiently and effectively. The electronic circuit schematic and functional block diagrams for the EA3036 DC-DC converter are provided in the following diagram:

Figure 1.18 – The EA3036 DC-DC converter electronic circuit schematic and functional block diagrams

Figure 1.18 – The EA3036 DC-DC converter electronic circuit schematic and functional block diagrams

The EA3036 DC-DC converter can be used to source the appropriate voltage and current for the M5Stack Core’s N54148 power amplifier.

Power amplifier

As illustrated in Demo 2, the M5Stack Core has an audio power amplifier. The NS4148 is a 3-watt (W) class D audio power amplifier. The unique feature of the NS4148 is that the device can power down, which reduces power consumption. This feature allows the M5Stack Core to maximize its 3.3V Li-ion battery capacity. The NS4148 audio power amplifier can be packaged in an 8-pin micro-small outline package (MSOP) or a small outline package. To minimize the printed circuit board space of the M5Stack Core, the MSOP IC package is used. Figure 1.19 shows the MSOP of the NS4148 IC package:

Figure 1.19 – The NS4148 MSOP device

Figure 1.19 – The NS4148 MSOP device

The electronic circuit schematic for the NS4148 MSOP-based 3 W Class D audio power amplifier is shown in Figure 1.20. Although the NS4148 is a low electromagnetic interference (EMI) filter-less IC device, there is a pair of inductor (L) and capacitor (C) (LC) filters on the audio output pins. The LC filters consisting of ferrite beads (FB1), FB2, and capacitors C42 and C45 are to remove the amplified audio signal ripple noise or waveform distortion from being emitted to the M5Stack Core’s speaker.

In addition, the bypass capacitor is connected across the collector supply voltage or voltage common collector (VCC) and ground (GND) pins to reduce high-frequency noise generated by the external clock circuit. The external clock circuit synchronizes the ESP32 microcontroller’s internal timing operations, such as the program counter. A variety of sounds can be created using MicroPython, UiFLOW, or Arduino C/C++ coding languages. The NS4148 audio power amplifier will amplify these sounds generated by the ESP32 microcontroller, allowing the unique tones to be heard through the wired speaker. The NS4148 receives the ESP32 code-based tones from the GPIO25 pin.

Figure 1.20 – The NS4148 3 W class D audio power amplifier circuit schematic diagram

Figure 1.20 – The NS4148 3 W class D audio power amplifier circuit schematic diagram

ESP32 subsystem

The heart of the M5Stack Core is a 2.4 gigahertz (GHz) Wi-Fi and Bluetooth combination microcontroller. The ESP32 microcontroller is supported by 20 external components that enable features of the M5Stack to interact with the end user. The ESP32 provides appropriate control signals to the externally wired LCD and universal asynchronous receiver-transmitter (UART) devices. In addition, the A, B, C, and reset pushbutton switches are wired to the appropriate general-purpose input/output (GPIO) pins of the ESP32 microcontroller. The ESP32 microcontroller is packaged as a 48-pin QFN chip device. To ensure the proper timing of the ESP32’s core processor functions as the program counter or shifting data through memory register movements, an external crystal clock circuit of 40 megahertz (MHz) is used.

Figure 1.21 – ESP32 pinout and QFN48 package

Figure 1.21 – ESP32 pinout and QFN48 package

The ESP32 microcontroller subsystem circuit schematic diagram is shown next:

Figure 1.22 – ESP32 subsystem circuit schematic diagram

Figure 1.22 – ESP32 subsystem circuit schematic diagram

An external 40 MHz crystal clock circuit, as seen in Figure 1.23, is used to maintain the proper timing and data storage operations of the ESP32 microcontroller’s core central processing unit (CPU):

Figure 1.23 - A 40 MHz crystal clock circuit

Figure 1.23 - A 40 MHz crystal clock circuit

USB-UART and accessories

The method used to communicate internally and externally with the M5Stack Core uses a universal serial bus (USB) or UART circuits. The external port A allows units with inter-integrated circuit capabilities (I2C) to communicate with the ESP32 microcontroller. A serial clock (SCL) and a serial data address (SDA) scheme allow such units to share data with the microcontroller. In addition, sending application programs created using UiFLOW Blockly code, MicroPython, or C/C++ programming languages is accomplished with a data transmit/receive (TX/RX) UART scheme through a USB communication port. An IP5306 circuit is used to accomplish these communication tasks. The two USBs depicted in the circuit schematic diagram in Figure 1.24 represent the traditional data communication and extension A ports found on the M5Stack Core:

Figure 1.24 – The IP5306 USB-I2C communication circuit schematic diagram

Figure 1.24 – The IP5306 USB-I2C communication circuit schematic diagram

Besides the internal circuits, the M5Stack Core uses a communication bus packaged on its bottom base to communicate with the microphone and the RGB LED bars. The communication bus allows the ESP32 microcontroller to receive and send audio and controls signals accordingly to the internal microphone and RGB LED bars. The allocated ESP32 GPIO pins are wired to the communication bus, thus allowing access to the audio and control signals from the externally connected devices. As shown in Figure 1.25, the GPIO15 pin operates the RGB LED bar. The ESP32’s GPIO34 pin is wired to the microphone and amplifier circuit:

Figure 1.25 – The M5 communication bus and associated peripheral devices

Figure 1.25 – The M5 communication bus and associated peripheral devices

The following photo shows some of the ESP32 microcontroller supporting ICs, the microphone, the RGB LED bar, and the M5 bus:

Figure 1.26 – Location of the key electronic components and M5 communication bus

Figure 1.26 – Location of the key electronic components and M5 communication bus

You now understand the M5Stack Core’s hardware architecture and the supporting electronic circuits. This knowledge will be important in the proceeding chapters of this book. The importance of this knowledge is in the development of interactive controls and wearable devices. In developing M5Stack Core projects, you will be immersed in the creative process of building practical and engaging products.

In the next section, you will learn how to design user interfaces (UIs) that allow interaction and engagement with the M5Stack Core.

You have been reading a chapter from
M5Stack Electronic Blueprints
Published in: Feb 2023
Publisher: Packt
ISBN-13: 9781803230306
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime