# mPython Board 3.0
```{admonition} Files Referenced in This Article
:class: note
- [esp32s3/docs/1_hardware/1_1_introduce.rst](../../../products/mpython-s3/1_hardware/1_1_introduce.rst)
- [esp32s3/docs/1_hardware/1_2_Technical_parameters.rst](../../../products/mpython-s3/1_hardware/1_2_Technical_parameters.rst)
- [esp32s3/docs/1_hardware/1_3_IO.rst](../../../products/mpython-s3/1_hardware/1_3_IO.rst)
- [esp32s3/docs/1_hardware/1_4_Structural_dimensions.rst](../../../products/mpython-s3/1_hardware/1_4_Structural_dimensions.rst)
- `esp32s3/firmware/boards/mpython_v3/board.json`
- `esp32s3/firmware/boards/mpython_v3/mpconfigboard.h`
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py`
```
## Product Overview
mPython Board 3.0 (mpython_v3) is an open-source hardware aimed at K12 maker and AIoT teaching, based on the dual-core ESP32-S3 processor. It integrates a rich set of peripherals including a 1.47-inch LCD color display, audio codec and speaker, 6-axis sensor, magnetic sensor, light sensor, microphone, RGB LED, physical buttons, and touch buttons, and supports Wi-Fi and Bluetooth 5 dual-mode communication. Its firmware is secondary-developed on MicroPython and ESP-IDF, providing on-board drivers and common module interfaces; combined with a graphical or Python programming environment, it can quickly realize teaching scenarios such as environmental monitoring, creative making, IoT control, and basic AI applications.
- Target users: primary and secondary school IT teachers and students, maker enthusiasts, and IoT/AI beginner developers
- Core value: low-barrier getting started, rich on-board resources, a cross-platform ecosystem, and expandable IO capabilities
- Application scenarios: programming education, sensor experiments, mini-games and electronic pets, smart-home nodes, and simple AI voice/vision projects
**Section Sources**
- [esp32s3/docs/1_hardware/1_1_introduce.rst:1-47](../../../products/mpython-s3/1_hardware/1_1_introduce.rst)
## Core Business Flow
This section outlines the typical usage flow from the perspective of "hardware-firmware-application", making it easy to understand each layer's responsibilities and data flow.
```text
sequenceDiagram
participant User as "User"
participant App as "Application code
examples/mpython_v3/main.py"
participant Lib as "Board-level library
mpython.py"
participant HW as "On-board hardware
LCD/Sensors/Audio/IO"
participant Net as "Network stack
Wi-Fi/BLE"
User->>App : Write and run the program
App->>Lib : Call display/sensor/audio/IO APIs
Lib->>HW : Access peripherals via I2C/SPI/ADC/PWM buses
Lib->>Net : Connect to Wi-Fi / start a hotspot (optional)
HW-->>Lib : Return sensor data/state
Lib-->>App : Encapsulated data objects
App-->>User : Screen display/sound feedback/networking result
```
- Display flow: the application writes to the frame buffer via the TFT_displayer class, which is ultimately refreshed to the 1.47-inch screen by the low-level LCD driver
- Sensor flow: I2C reads data from QMI8658C/MMC5603/LTR-308, etc., converted into physical quantities by library functions
- Audio flow: recording/playback via ES8388, output through the built-in speaker
- Network flow: STA mode connects to a router or AP mode creates a hotspot for use by upper-layer applications
**Section Sources**
- `esp32s3/firmware/examples/mpython_v3/main.py:1-145`
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py:41-130`
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py:147-196`
## Feature Module List
The following lists the main modules by hardware and software layer, along with their responsibilities, user value, and acceptance points.
- Compute and communication
- ESP32-S3 dual-core processor, 512K SRAM, 8MB PSRAM, 16MB Flash; supports IEEE 802.11 b/g/n Wi-Fi and Bluetooth 5
- Value: high-performance computing and large-capacity storage to meet multimedia and AIoT needs
- Acceptance: compiles and flashes normally, Wi-Fi/BLE usable, sufficient memory
- Display module
- 1.47-inch LCD color display (ST7789), resolution 320x172, RGB565
- Value: an intuitive interactive interface, suitable for information display and games
- Acceptance: screen lights up, characters/images display correctly, refresh without flicker
- Input module
- Physical buttons A/B/Reset; touch sensors P/Y/T/H/O/N
- Value: convenient human-computer interaction with event callback support
- Acceptance: accurate press/release detection, adjustable touch threshold
- Sensor module
- 6-axis sensor QMI8658C (accelerometer + gyroscope), magnetic sensor MMC5603, digital light sensor LTR-308
- Value: motion detection, orientation sensing, and light measurement to support a variety of projects
- Acceptance: data readable, range/resolution configurable, magnetic calibration usable
- Audio module
- ES8388 audio decoder chip, NS4150 amplifier, dual CDX4013 microphones, 1W SMD speaker
- Value: recording, playback, and TTS/speech-recognition expansion for a richer interactive experience
- Acceptance: recording/playback normal, adjustable volume, reasonable noise measurement
- IO expansion
- 20-channel digital I/O (including PWM/TouchPad), 6-channel 12-bit ADC (P0~P4,P6), I2C, UART, SPI
- Value: flexible connection of external modules and sensors
- Acceptance: GPIO read/write, ADC sampling, I2C scanning, and serial communication all normal
- Power supply and power management
- USB 5V or edge-connector 3.3V power, operating voltage 3.3V, maximum operating current 700mA, maximum load current 1000mA
- Value: multiple power methods to fit different scenarios
- Acceptance: stable USB power, normal 3.3V pin output, no restart under load
- Firmware and API
- MicroPython + ESP-IDF; the board-level library encapsulates TFT display, Wi-Fi, MOTION, Pin, Button/Touch, etc.
- Value: lowers the development barrier with a unified API style
- Acceptance: example programs run, API behavior matches the documentation
**Section Sources**
- [esp32s3/docs/1_hardware/1_2_Technical_parameters.rst:11-84](../../../products/mpython-s3/1_hardware/1_2_Technical_parameters.rst)
- [esp32s3/docs/1_hardware/1_3_IO.rst:1-55](../../../products/mpython-s3/1_hardware/1_3_IO.rst)
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py:41-130`
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py:147-196`
## Data and State
- Core data models
- TFT display: FrameBuffer (320x172 RGB565), with character drawing and refresh via the TFT_displayer class
- Sensor data: acceleration/angular velocity/magnetic field strength/heading angle/light value, etc., read via I2C and then converted
- Audio data: recording PCM/WAV, playback audio streams, volume and state management
- Network state: STA/AP mode switching, connection success/failure, IP assignment
- Key state transitions
- Display: clear -> fill/pixel/text -> show refresh
- Sensor: initialize -> configure range/resolution -> read -> calibrate (magnetic)
- Audio: initialize -> record/play -> pause/stop -> release
- Network: scan -> connect -> obtain IP -> disconnect/close
- Data ownership boundaries
- The board-level library handles low-level drivers and data encapsulation; the application layer only calls high-level APIs
- The I2C bus is shared; avoid conflicts (such as internal sensors sharing with external devices)
**Section Sources**
- `esp32s3/firmware/boards/mpython_v3/modules/mpython.py:41-130`
- [esp32s3/docs/1_hardware/1_3_IO.rst:1-55](../../../products/mpython-s3/1_hardware/1_3_IO.rst)
## Key Constraints and Boundaries
- Non-functional requirements
- Power consumption and heat dissipation: maximum operating current 700mA; mind heat dissipation under sustained high load
- Real-time performance: audio and display refresh are timing-sensitive; avoid blocking operations
- Reliability: the I2C bus is shared; external devices require proper pull-ups and address assignment
- Dependency and integration boundaries
- The firmware depends on MicroPython and ESP-IDF; the build system is CMake
- On-board I2C pins are fixed (SCL=43, SDA=44) and shared with internal sensors
- The LCD uses SPI (CS/RS/SCK/SDA/BL); audio uses I2S (DOUT/MCLK/DIN/BCK/LRCK)
- Business constraints
- P4 is used for the light sensor and P10 for the sound sensor; they cannot be used as general-purpose IO
- When Wi-Fi and BLE are used simultaneously, mind channel and resource occupancy
- Recording and noise measurement should not run at the same time to avoid data anomalies
**Section Sources**
- [esp32s3/docs/1_hardware/1_2_Technical_parameters.rst:40-61](../../../products/mpython-s3/1_hardware/1_2_Technical_parameters.rst)
- `esp32s3/firmware/boards/mpython_v3/mpconfigboard.h:13-28`
- [esp32s3/docs/1_hardware/1_3_IO.rst:1-55](../../../products/mpython-s3/1_hardware/1_3_IO.rst)
## Appendix: Technical Parameters, IO Interfaces, Structural Dimensions, and Schematic
- Technical parameters
- CPU: ESP32-S3 dual-core, 240MHz clock, 512K SRAM, supports Wi-Fi and Bluetooth 5
- Storage: 8MB PSRAM, 16MB Flash
- Screen: 1.47-inch LCD color display, resolution 320x172, model ST7789
- Sensors: QMI8658C 6-axis, MMC5603 magnetic sensor, LTR-308 light sensor
- Audio: ES8388 decoder chip, NS4150 amplifier, dual microphones, 1W speaker
- Buttons: physical buttons A/B/Reset, touch sensors P/Y/T/H/O/N
- Power supply: USB 5V or edge-connector 3.3V, operating voltage 3.3V, maximum operating current 700mA, maximum load current 1000mA
- IO interfaces
- 20-channel digital I/O (including PWM/TouchPad), 6-channel 12-bit ADC (P0~P4,P6)
- I2C, UART (1 channel, 115200bps), SPI support
- LCD screen pins: GPIO33(BL), GPIO34(CS), GPIO35(RS), GPIO36(SCK), GPIO37(SDA)
- Audio decoder chip pins: GPIO38(DOUT), GPIO39(MCLK), GPIO40(DIN), GPIO41(BCK), GPIO42(LRCK)
- Structural dimensions
- Refer to the official structural dimension diagram for enclosure design and mounting positioning
- Schematic
- Refer to the official schematic PDF to understand the complete circuit connections and component layout
**Section Sources**
- [esp32s3/docs/1_hardware/1_2_Technical_parameters.rst:11-84](../../../products/mpython-s3/1_hardware/1_2_Technical_parameters.rst)
- [esp32s3/docs/1_hardware/1_3_IO.rst:1-55](../../../products/mpython-s3/1_hardware/1_3_IO.rst)
- [esp32s3/docs/1_hardware/1_4_Structural_dimensions.rst:1-8](../../../products/mpython-s3/1_hardware/1_4_Structural_dimensions.rst)