Qorvo's QPA9510, A Power Amplifier Supporting GSM, UHF, and FM Bands

Submitted by Staff on

Sub-1 GHz radio links sit at the core of a wide range of products, including public safety radios, smart utility meters, RFID readers, and vehicle telematics units. Many of these systems now need to work across several regional frequency allocations without a hardware redesign for each market, while still running efficiently on battery power in a compact footprint. Qorvo's QPA9510 power amplifier is built around that requirement.

The QPA9510 is a general-purpose amplifier covering 100 MHz to 1000 MHz, spanning GSM, E-GSM, UHF, and FM bands. Because the device supports this whole range while remaining tunable to specific sub-bands, a single design can be adapted for different regional frequency plans rather than starting from scratch for each one.

On performance, the QPA9510 delivers up to 34 dB of gain with more than 70 dB of analog gain control range, and it maintains linear operation up to a 1 dB compression point of roughly +35 dBm. It runs from a single supply (2.8 V to 4.8 V per its recommended operating conditions) and reaches efficiency of up to 55%. The part is fabricated on Qorvo's GaAs process and housed in a compact 3 mm x 3 mm QFN package, making it suitable for space-constrained designs.

To help designers evaluate the part, Qorvo also offers the QPA9510EVB evaluation board, tuned for the 865 MHz to 928 MHz range to assess GSM performance. The board includes the biasing and control circuitry needed to run the amplifier, along with RF input/output connectors, analog gain control, and single-supply operation, letting engineers test gain, output power, efficiency, and linearity without building supporting circuitry themselves.

Availability

Datasheets and ordering information for both the QPA9510 and the QPA9510EVB are available through Mouser.

Have any question related to this Article?

Running 260K Tiny-LLM on ESP32

Submitted by Anand D on

We are all facing a huge transition in tech due to AI. In projects, we can run AI models on PCs, SBCs or even Cloud servers. In this tutorial, we are trying to see if we can run an AI model on a microcontroller board like the ESP32. To test this out, we are going to deploy and benchmark the 260K-parameter Tiny-LLM by Andrej Karpathy using his open-source llama2.c Tiny-LLM framework across four distinct ESP32 boards. This model is designed to run in pure C. We will learn how to run the model on this memory-constrained microcontroller, examine the memory bandwidth limitations of SPI Flash streaming versus PSRAM, and evaluate real-world token generation speeds.

Hardware Test Bench

S noBoardFlashPSRAM
1ESP32 DevKit V14 MB0 MB
2ESP32-CAM4 MB4 MB
3Seeed XIAO ESP32-S38 MB8 MB
4ESP32-S3 DevKit (N16R8)16 MB8 MB

In the past, we have run .ino code on Arduino and ESP Boards, but in this case, it's slightly different. We need to flash this Tiny-LLM also onto the ESP32 Flash memory. Every ESP32 comes with Flash Memory, but it's optional that they have PSRAM. Depending on the project requirements. We need to buy the appropriate ESP32 Board. So, first of all. We are going to load the Tiny-LLM onto the Flash Memory of the ESP32. This has to be done no matter if the board has PSRAM or not. Let’s see where to go and download the model from.

Downloading the Tiny-LLM

First of all, we need to go to the Hugging Face page for Andrej Karpathy’s stories260L Tiny-LLM page and download the stories260K.bin and tok512.bin files which are by clicking the download option to their right side. Trained on the TinyStories dataset, this model outputs simple stories using the vocabulary of 3-to-4-year-olds. We cannot expect a high level of storytelling considering its size, which is around 1 MB.
 

Andrej Karpathy Hugging Face Page

Let's see what exactly these files do. The stories260K.bin is the raw binary file containing the actual learned weights of the 260K parameter model. stories260K.pt is the same stories260K.bin file, but in the PyTorch format. It contains the same mathematical weights as the .bin file. Its use is to load the model into Python code to fine-tune it or analyze it using PyTorch code. For our tutorial, we are not going to use it. The tok512.bin is a custom binary version of the tokeniser. It tells the C program (run.c), which we will run in Arduino IDE, how to map numeric IDs into English letters and words. tok512.model is used by some Python text-processing libraries to break down sentences into tokens before training. We are not going to use that as well. As of now, let's download the stories260K.bin and tok512.bin files for the tutorial.

Flashing Tiny-LLM to ESP32 Flash Memory

Before flashing the model, let's see what the folder structure should look like for this to work. We have the ino code and a run.c code. In the same directory where these code files reside, create a folder named data and save these models, which we downloaded just now, to the data folder. This is what my folder structure looks like. These files are also provided in the GitHub repo provided below.
 

Code Folder Structure

Once this is set up, let's go ahead and flash the models in the data folder to the ESP32 Flash. By default, Arduino IDE only allows us to upload code (.ino files). So, we need an additional tool to flash these files to the ESP32. The Arduino LittleFS Upload Plugin is a tool that allows US to store non-code files on our local PC (like web pages, images, or configuration files) directly onto the built-in flash memory of microcontrollers like  ESP8266, ESP32, or RP2040.

We need to go to the official Earle Philhower LittleFS Upload Releases page and download the file named arduino-littlefs-upload-1.6.3.vsix. This is the latest version of the compiled release file at the time of writing this tutorial. Copy the downloaded file and paste it into “C:\Users\User name\.arduinoIDE\plugins”. If it gives any error when executing, then keep the file directly within the “C:\Users\Pavilion\.arduinoIDE” directory.

Uploading Models To Flash

For flashing the Model weights to Flash Memory, use the shortcut Ctrl + Shift + P and click Upload LittleFS to Pico/ESP8266/ESP32. Wait for the LittleFS Upload terminal window to turn to “Completed Upload”. Once this is done, we have successfully loaded the model weights to the ESP32 Flash Memory. If any error comes up, the most likely reason is improper folder structure or folder naming. Just make sure that part is done properly as mentioned above. Once this is done, we are ready to upload the code to the ESP32.

Arduino IDE Configurations

Check the following configurations in the Tools menu in Arduino IDE as shown below. The options must be selected as per the RAM and Flash size of the specific ESP32 board you are using. If it does not have PSRAM, just keep the PSRAM option disabled. If it has PSRAM, select the PSRAM size. In the screenshot, it shows the settings for an ESP32 S3 Dev board with 16 MB Flash and 8 MB PSRAM on the right and a normal ESP32 Dev Board with the default 4 MB Flash and no PSRAM on the left. The right configuration for your board will make this work.

Arduino IDE Configurations

From the GitHub link below, all the code and the models are available for download. One thing to note is that the run.c code to be flashed on an ESP32 Dev board that does not have any PSRAM is kept in a separate folder named “run.c code for ESP32 without PSRAM” in the repo. Use that run.c if the ESP32 does not have any PSRAM; otherwise, use the one in the main directory. After setting the right configurations. Hit the upload button. The code will be successfully flashed onto your ESP32.

Code Explanation

Let's take a look at the coding part of this tutorial.

#include "FS.h"
#include "LittleFS.h"
// Expose C functions from run.c to C++ compiler
extern "C" {
 void run_llama(const char* model_path, const char* tokenizer_path, float temperature, float topp, int steps, const char* prompt);
}

Imports the flash file system libraries required to read files directly from the ESP32’s flash chip. extern "C" { ... } allows the C++ sketch to link directly to run_llama(), which is written in plain C inside the companion run.c file.

void llamaTask(void *pvParameters) {
 Serial.println("\n--- Starting LittleFS Initialization ---");
 if (!LittleFS.begin(false)) {
   Serial.println("LittleFS Mount Failed! Check if filesystem was uploaded.");
   vTaskDelete(NULL);
   return;
 }
 Serial.println("LittleFS Mounted Successfully.");
 
 if (!LittleFS.exists("/stories260K.bin")) {
   Serial.println("Error: /stories260K.bin not found on LittleFS!");
   vTaskDelete(NULL);
   return;
 }
 
 if (!LittleFS.exists("/tok512.bin")) {
   Serial.println("Error: /tok512.bin not found on LittleFS!");
   vTaskDelete(NULL);
   return;
 }

void llamaTask() defines the body of the FreeRTOS background task. LittleFS.begin(false) mounts the SPI Flash file system. Passing false ensures it won't auto-format the storage if mounting fails, protecting existing files. LittleFS.exists() checks whether the two essential binary files that we downloaded into the folder named ‘data’ exist on flash. So make sure they exist, or else it gives an error. vTaskDelete(NULL) safely terminates and cleans up this task if storage mounting or file verification fails.

void setup() {
 Serial.begin(115200);
 delay(2000); // Allow hardware serial connection to settle
 Serial.println("==========================================");
 Serial.println("   ESP32-S3 Tiny Llama Inference Engine   ");
 Serial.println("==========================================");
 // Non-blocking memory mode log
 if (ESP.getPsramSize() == 0) {
   Serial.println("ℹ️ PSRAM not detected. Running in Flash-Streaming mode.");
 } else {
   Serial.printf("PSRAM Available: %d Bytes\n", ESP.getFreePsram());
 }

Serial.begin(115200) initializes the primary hardware serial line at 115,200 baud. ESP.getPsramSize() checks if external PSRAM is attached to the ESP32-S3. If none is found, it notes that the system will stream weights directly out of Flash memory.

void loop() {
 // Read typed text from the Serial Monitor
 if (Serial.available() > 0) {
   String inputString = Serial.readStringUntil('\n');
   inputString.trim(); // Strip carriage returns and spaces
   if (inputString.length() > 0) {
     char promptBuffer[256];
     inputString.toCharArray(promptBuffer, sizeof(promptBuffer));
     // Push user text into queue for llamaTask to consume
     xQueueSend(promptQueue, &promptBuffer, pdMS_TO_TICKS(100));
   }
 }
 vTaskDelay(pdMS_TO_TICKS(50)); // Poll serial smoothly
}

Serial.available() > 0 checks if the user has typed text into the Arduino Serial Monitor. Serial.readStringUntil('\n') & .trim() reads characters until a newline is reached and strips out extra whitespace or carriage returns (\r). inputString.toCharArray() converts the Arduino C++ String object into a plain C-style char array buffer. xQueueSend() pushes the new prompt into promptQueue with a 100 ms timeout. Core 1 instantly picks up this message to run the next inference. vTaskDelay(pdMS_TO_TICKS(50)) pauses Core 0 execution briefly to keep the processor watchdog timer happy and yield control back to background OS routines.

Results

After the code is successfully uploaded, open the serial monitor. It will start generating its default story the moment Arduino IDE detects the board. The code is made in such a way that we can give a starting prompt for the story in the serial monitor, and the model generates a continuing story. But, practically, it doesn't work like that. It’s just a 1 MB tiny LLM that doesn't perform like a real LLM. But at least it generates words and outputs the tokens/second in the serial monitor. We can keep this as a starting point for running tiny LLMs on microcontroller boards.

Speed Results Of The Model In ESP32 Boards

Above are the results of the model running on 4 different ESP32-based boards. The Board names and respective speeds are highlighted in the image above and listed in the table below.

S no           BoardFlashPSRAMSpeed (tok/sec)
1ESP32 DevKit V14 MB0 MB2.33 tok/sec
2ESP32-CAM4 MB4 MB11.12 tok/sec
3Seeed XIAO ESP32-S38 MB8 MB21.41 tok/sec
4ESP32-S3 DevKit (N16R8)16 MB8 MB22.02 tok/sec

Conclusion

This benchmark confirms that PSRAM bandwidth is the single most critical factor for running local Generative AI models at the edge. While running on Flash enables low-cost non-PSRAM hardware to execute basic inference tasks (2.33 tok/sec), enabling Octal-SPI PSRAM on the ESP32-S3 unlocks nearly a 10x performance gain (22.02 tok/sec). This opens up practical possibilities for TinyML engineers to deploy lightweight, fully offline Micro-LLMs for local intent classification, offline smart home interfaces, and real-time edge processing without sending data to external cloud APIs.

GitHub Repository 
Running 260K Tiny-LLM on ESP32 GitHub Running 260K Tiny-LLM on ESP32 Downloadable Zip

Have any question related to this Article?

JioFind 4G GPS Tracker Teardown: A Complete Inside-Out Hardware Breakdown

Bluetooth trackers like Apple AirTags and Samsung SmartTag are a convenient way to locate misplaced items nearby, but their dependence on nearby smartphones limits their usefulness over long distances. Cellular GPS trackers overcome this limitation by communicating directly over the mobile network, allowing them to report their location from anywhere with network coverage. This makes them useful for tracking vehicles, luggage, school bags, pets, and other valuable belongings.

How to Learn ROS 2: A Practical Roadmap for Robotics Engineers

ROS 2 has become one of the most important technologies for engineers interested in robotics. But beginners often struggle with the same questions: Should I learn ROS 1 first? Do I need a physical robot? Which programming language should I know? And is ROS actually used in production?
We discussed these questions with Shubham Nandi, co-founder and Chief Research Officer at RigBetel Labs, who works on robotics development, training and hiring.

What Is ROS 2?

Despite its name, the Robot Operating System is not a conventional operating system like Linux or Windows. It is a software framework that helps different parts of a robot communicate.
A robot may contain cameras, LiDAR sensors, motor controllers, navigation software and AI models. ROS provides a common communication layer through concepts such as nodes, topics, messages and services.
This allows engineers to build modular robotic systems instead of creating every software component and communication interface from scratch.

Should Beginners Learn ROS 1 Before ROS 2?

No. New learners can start directly with ROS 2.
ROS 1 played an important role in robotics research, but ROS 2 was designed to support more modern requirements, including improved security, real-time communication, distributed systems and commercial deployment.
However, beginners should have at least a basic understanding of Python or C++ before learning ROS 2. Python is generally easier for quickly understanding ROS concepts, while C++ becomes valuable for performance-sensitive robotics applications.

Can You Learn ROS 2 Without a Robot?

Yes. You do not need to purchase expensive hardware to begin learning ROS 2.
Simulation tools such as Gazebo allow engineers to create a virtual robot, connect simulated sensors and test navigation or control algorithms on a computer. The same fundamental ROS concepts can later be applied to physical hardware.
This makes simulation one of the most practical starting points for students and engineers who do not yet have access to a robot.
A beginner can start by:

1. Installing ROS 2 on Ubuntu.
2. Learning nodes, topics, messages and services.
3. Creating basic Python or C++ publisher and subscriber programs.
4. Using Gazebo to simulate a mobile robot.
5. Building a small project involving sensors, movement or navigation.

Start With a Robotics Project

One of Shubham’s most useful recommendations is to avoid learning ROS as a collection of commands. Instead, decide what robot or application you want to build.
Your first project could be:

  • A simulated differential-drive robot
  • An obstacle-avoiding mobile robot
  • A robot that creates a map using SLAM
  • A robotic arm controlled through ROS 2
  • A camera-based object detection system
  • An autonomous navigation project

A project gives every topic a purpose. When something fails, debugging forces you to understand how the software, electronics and mechanical systems interact.

                  As Shubham explains:

“We built stuff, broke stuff, and that’s how we learned ROS.”

What Skills Do ROS Engineers Need?

Knowing ROS commands alone does not make someone a complete robotics engineer. Robotics combines software, electronics and mechanical engineering.
A strong ROS engineer should gradually develop skills in:

  • Python or C++
  • Linux and command-line tools
  • Git and software version control
  • Sensors and embedded systems
  • Robot kinematics and control
  • Computer vision or navigation
  • Debugging interconnected systems

Companies may also evaluate how an engineer approaches an unfamiliar problem rather than simply checking whether an assignment was completed perfectly. Structured thinking and debugging ability are particularly valuable because robot failures can originate in software, electronics or mechanical components.

Is ROS 2 Used in Production Robots?

ROS can be used in production, but the final implementation may not look identical to the ROS environment used during development.
Companies commonly use ROS to accelerate prototyping, integrate sensors and validate robotic functions. For production, they may optimise individual components, introduce proprietary software or replace parts of the communication framework to meet requirements related to performance, reliability, security or certification.
Therefore, learning ROS 2 remains valuable even when a commercial robot does not run an entirely standard ROS installation. It teaches engineers how modern robotic systems are structured and how their different components communicate.

A Simple ROS 2 Learning Roadmap

The most practical roadmap is:

ROS 2 Learning Roadmap

Learn basic Python or C++, then understand ROS 2 communication and Practise in simulation. After that, build one complete project, debug it and finally move to physical hardware
Do not wait until you understand every ROS package before building something. Choose a manageable project, learn the concepts required to complete it and expand your knowledge as new problems appear.
That project-based approach is often the fastest way to move from watching ROS tutorials to actually building robots.
 

Have any question related to this Article?

ESP32 Camera Dev Board Comparison: ESP32-CAM vs ESP32-S3-CAM vs XIAO Sense-Which Should You Choose?

Submitted by Anand D on

Introduction

ESP32 Cameras have become a popular choice for building low-cost wireless cameras, smart surveillance systems, and even small AI projects. But today, there are several options available, from the original ESP32-CAM to newer ESP32-S3-based camera boards and compact boards like the XIAO ESP32-S3 Sense. At first glance, they may look similar, but there are some major differences in their processing power, memory, camera sensors, size, and AI capabilities. So, which one should you pick for your next project? In this article, we will compare the ESP32-CAM, ESP32-S3-CAM, and XIAO ESP32-S3 Sense and see which camera board fits in for different types of projects.

ESP32 CAM

ESP32 CAM Development Module

The ESP32-CAM should be the most familiar ESP32 camera board. It is based on the original ESP32 and usually comes with an OV2640, the 2 MP camera from OmniVision, 4 MB Flash, 4MB PSRAM, a microSD card slot, Wi-Fi, and Bluetooth. Its biggest advantage is its simplicity and low cost. The ESP32-CAM can capture images, stream video over Wi-Fi, store photographs on a microSD card, and communicate with a server or cloud service. This makes it a good choice for projects such as Wi-Fi security cameras, Motion detection cameras, Remote monitoring, Simple object detection, etc.

Now, let's see some of the major limitations that come with this board. It just has 4 MB of PSRAM, which is useful for camera frame buffers, but newer ESP32-S3 boards generally provide more memory and are better suited for running image-processing or AI workloads locally. Another inconvenience is programming. Most ESP32-CAM boards do not have a USB interface built into the board, so we will have to use an ESP32 CAM programming module or any of the widely available USB-TTL Converter Modules. Choose ESP32-CAM if the requirement is a cheap and simple Wi-Fi camera and you don't need heavy local AI processing.

ESP32-S3-CAM

ESP32-S3 Development Module

The ESP32-S3-CAM takes advantage of the newer ESP32-S3 chip. The ESP32-S3 uses a dual-core Xtensa LX7 processor running at up to 240 MHz. While the clock speed is similar to the original ESP32, the S3 has several architectural improvements that make it more suitable for applications involving signal processing, machine learning, and computer vision. Many ESP32-S3 camera boards also come with 8 MB of PSRAM, giving the camera application more room for frame buffers and larger programs. This becomes important when you move from a simple camera project to something that involves running an AI model with some image processing and all.

For example, an ESP32-S3 camera can be used for Face detection, Object detection, Image classification, Person detection, TinyML projects, AI-enabled IoT devices, etc.  The ESP32-S3 also comes with a USB port, which makes programming and USB-based applications easier on boards that expose the interface. Typically, an ESP32-S3 CAM comes with either 16 MB Flash and 8MB PSRAM or 8 MB Flash and 8MB PSRAM. Also, they come from various 3rd party manufacturers as well. These boards can even support the latest OmniVision 5MP OV5640 sensor as well. Normally, they come with the OV3660 Sensor, the 3 MP sensor from the manufacturer. So, always check the exact specifications before buying one.
We have a detailed article that teaches how to identify the PSRAM and Flash size of your official ESP32 Modules by checking the Specification Identifier Code on them. It also talks about the memory structure and different types of memory that we can see in an ESP32 Module.

XIAO ESP32-S3 Sense

XIAO ESP32-S3 Board With Expansion Board and Camera Sensor

If the ESP32-S3-CAM is designed for more advanced camera applications, the SeedStudio XIAO ESP32-S3 Sense takes a different approach. It focuses on size and integration.
The XIAO ESP32-S3 Sense combines the ESP32-S3 with a camera, microphone, microSD card support, USB connectivity and even a PMIC in a very small package.

The current version uses an OV3660 camera sensor, which offers up to 3 MP resolution. It also comes with 8 MB PSRAM and 8 MB Flash, which is double the capacity of the normal ESP32-CAM module. The Sense also includes a digital microphone, which means you can build a device that can both see and hear without needing a separate audio board. Some example projects that can be done with the XIAO ESP32-S3 Sense are Voice-controlled cameras, AI vision assistants, Smart home sensors, Wearable devices, Voice + vision AI projects, etc. The possibilities are endless due to their processing power and compact size.

The XIAO ESP32-S3 board itself measures only around 21 × 17.8 mm, making it much easier to fit into compact projects. The trade-off is GPIO availability. Because the camera and other onboard hardware use several pins, you don't get the same freedom as you might with a larger ESP32-S3 development board. Choose XIAO ESP32-S3 Sense if the requirement is the smallest package possible and you need camera, audio, storage, and AI capabilities in one board.

Which One Has the Best Image Quality?

 ESP32 Vs ESP32 CAM Vs XIAO ESP32 S3 ALL Together

This is where things get a little more complicated. The ESP32 itself doesn't determine the camera's image quality. The camera sensor and lens also play a major role. The classic ESP32-CAM normally uses the OV2640, which has a resolution of up to 2 MP.
The XIAO ESP32-S3 Sense currently uses the OV3660, which can capture up to 3 MP.
Some ESP32-S3-CAM boards use the OV3660, while others may use higher-resolution sensors such as the OV5640. So you shouldn't assume that every ESP32-S3-CAM will have a better camera simply because it uses an ESP32-S3.

The underlying fact is that an ESP32 S3 board, in any way, is not able to do a lot of computer vision applications and run heavy models on it. So, the question is there a need to use a high-quality 5MP sensor on it? An ESP32 S3 with 16 MB Flash and 8 MB PSRAM can do a lot of great jobs with a 3 MP Sensor.

Which One Has the Best Processing Power?

PSRAM and Flash are the ones that make all the difference. When working with camera projects, PSRAM is extremely useful. A camera frame can require a significant amount of memory, especially when using higher resolutions or multiple frame buffers. If it doesn't have any PSRAM, the internal SRAM, which is typically around 520 KB, will not be sufficient to run inferences or do some complex matrix multiplications. So, PSRAM plays a major role if we are leveraging the ESP32 capabilities for AI-based applications.

Another option that is possible but not an ideal practice is that you can run inferences or do the AI workloads on the Flash memory itself, but that is not very efficient, as Flash is not meant for computations and all, but it can store the AI Models, the firmware, code, and stuff like that. But for AI processing or creating buffers for processing, PSRAM is a must. We have tried running a tiny LLM from PSRAM as well as Flash. The results were astonishing. When it was run from PSRAM, we got 22 tokens per second, while when we ran it from Flash Memory, the speed was merely 2 tokens per second. More PSRAM gives your application more room for camera frame buffers, audio buffers, AI models, image processing, etc.

The typical configurations are:

  • ESP32-CAM - 4MB Flash, 4 MB PSRAM

  • ESP32-S3-CAM - 16 MB Flash, 8 MB PSRAM

  • XIAO ESP32-S3 Sense - 8 MB Flash, 8 MB PSRAM

What About AI?

This is probably the biggest reason to consider an ESP32-S3. The original ESP32-CAM is perfectly capable of capturing an image and sending it somewhere else, like a cloud server for processing. But if you want the ESP32 itself to perform more of the processing, the ESP32-S3 is the better platform.

Cloud AI Vs Local AI In ESP32

 

The S3 is designed to accelerate certain vector and signal-processing operations, which are useful for machine-learning workloads. However, it is important to set expectations. An ESP32-S3 is not a replacement for a Raspberry Pi or a Jetson for large computer-vision models. It is best suited to small, optimised edge-AI models.

Conclusion

Below is the overall summary in table format.

ESP32 Model                   Application
ESP32-CAMBest for simple and affordable camera projects
ESP32-S3-CAMBest for AI and advanced vision
XIAO ESP32-S3 SenseBest for compact AI, vision, and audio projects

If you only need a simple camera, the original ESP32-CAM is still a great choice. If you want to experiment with AI and computer vision, I would go with an ESP32-S3-CAM. But if you want to build a tiny AI device that can see, hear, store data, and connect wirelessly, the XIAO ESP32-S3 Sense is probably the most versatile option of the three.

Have any question related to this Article?

How to Identify ESP32 Flash & PSRAM Size

Submitted by Anand D on

ESP32 development boards have been around for years, and we all have been doing a lot of projects with them. They come in various models, with different peripherals, and they perform different levels of tasks. If we are to check into a simple example, we have the normal ESP32 WROOM development boards as well as the same ESP32 with a camera sensor mounted onboard, the ESP32-CAM. The same way, we have the board with an onboard MIC, much more processing power, different power consumption, and memory capacities.

We pick the ESP32 modules for various projects based on their memory capacities, like ESP32 flash memory size, PSRAM, cores, power consumption, etc... In this tutorial, we will see how the ESP32 memory is classified and see the most easy and straight forward method of identifying the Flash and PSRAM size of an ESP32 module. But before that, let's understand the ESP32 Memory Architecture with the block diagram below.

ESP32 Memory Architecture

ESP32 Memory Architecture Block Diagram

Let's explore the memory classification. All of the ESP32s fall under one combination as per this architecture. Basically, the ESP32’s memory is classified into Internal and External. In the Internal Memory, we have the ROM and SRAM(Static RAM). The ROM stores permanent code such as the bootloader/ROM routines. The SRAM is the main working memory. The ESP32 SRAM size matters most for real-time performance, since it is used by our applications, FreeRTOS, Wi-Fi/Bluetooth stacks, buffers, etc.

A standard ESP32 development module comes with 4MB of Flash. It stores our program/code/firmware, files, web pages, configuration data, etc. Unlike SRAM, it retains data when power is removed. Our ESP32 runs the code whenever we power it on, right? That is due to this Flash Memory. We can see ESP32 modules with 2MB, 4MB, an ESP32 PSRAM 8mb varian, 16MB and 32MB Flash variants. Then we have PSRAM (Pseudo Static RAM). It's an additional RAM connected externally to the ESP32. Common sizes include 2 MB, 4 MB and 8 MB, depending on the module. It is mainly used in applications involving video streaming, image processing, AI, LVGL and large buffers. Now. Let's try to learn how we can identify the Flash and PSRAM Size of an ESP32 Development Module.

RF Shield Labelling

This is how Espressif Systems, the official manufacturer of the ESP32 chips and modules, classifies their products. On the RF shielding of the ESP32 WROOM modules, we can see some details that describe what's inside. They are the Espressif logo, the Module Name, the Certification ID that indicates the certification this module has passed, the Company Name, usually Espressif Systems (Shanghai) Co., Ltd, mostly written in Chinese, and a Data Matrix scanning which returns an 18-character code that conveys the Production Date Code and the Module MAC ID. Then we have the Specification Identifier, which tells a lot of details about the module. Let's try to understand the Specification Identifier Code and learn to identify the Flash and PSRAM of an ESP32 Module.

Specification Identifier Code in ESP32

The Specification Identifier is defined by Espressif to indicate the product status, operating temperature, and the memory capacity of Espressif modules.

ESP32 Spec Identifier Code

The above details are clearly shown below in a table format so that we can easily understand them.

StatusTemperatureFlashPSRAMReserved
XXN: 85 °C/65 °C2: 2 MBR2: 2 MBXX
MNH: 105 °C4: 4 MBR8: 8 MB 
  8: 8 MB  
  16: 16 MB  
  32: 32 MB  

As seen above, in the XX/MN, the first two prefix characters identify the product status; N indicates the operating temperature is 85 °C/65 °C, and H indicates the operating temperature is 105 °C.
We have 2MB, 4MB, 8MB, 16MB and 32MB Flash memory variants as indicated in the specification Indicator Code. If there is an ‘R’ in the code, it suggests that the variant that we have has PSRAM. Mostly, we can see 2MB and ESP32 PSRAM 8mb variants. The last two characters are optional or left free for customisation.

Checking the Memory Capacities

Now, let's take a look at the Specification Identifier Codes of some real ESP32 Modules and try to identify the Memory Capacities of them.

LiteWing ESP32 S3 Modules

In the above image, the 1st module is the genuine ESP32-S3-WROOM-1 used in our LiteWing Drone. You can see that it has 8MB of Flash and no PSRAM. The second one is a module that is seen on most of the ESP32 S3 development boards. This particular model has 16MB of Flash and 8MB of PSRAM, denoted by N16R8. You may not be able to see these kinds of details in every module, as a lot of 3rd party manufacturers also manufacture these modules other than the original Espressif Systems.

Speaker Smart Glass Modules

In the above image, the 1st module is the genuine ESP32-S3-WROOM-1 used in our AI Voice Assistant Project. You can clearly see that it has 16MB of Flash and 8MB of PSRAM. We picked this ESP32 flash memory size because real-time audio processing requires a lot of computational power while also offering Wi-Fi and Bluetooth connectivity. The dual-core architecture is particularly valuable there, as one core handles network communication and system tasks, while the other focuses on audio processing and wake-word detection, ensuring smooth, responsive operation.

The second module in the above image is the ESP32-S3-MINI-1 used in our ESP32 AI Smart Glass Project. From its Specification Identifier Code, it's clear that it has 4MB of Flash and 2MB of PSRAM. We picked the dual-core architecture as we had to run the camera while uploading images and sending commands to the cloud all at the same time efficiently.

Conclusion

ESP32 Module Specification Identifier Code may look like some random letters and numbers, but they can give you useful information about the memory configuration. By learning how to read codes such as MCN8, MCN16R8, M0N4R2, and N16R8, one can quickly identify the Flash and PSRAM capacity of an ESP32 module without relying only on the product name or datasheet. This is a very helpful method for every Embedded Systems Engineer.

This article also teaches how to pick the right ESP32 variant based on the memory classification as well as the cores. We have mentioned how we picked the right ESP32 module for some of our projects as well. It's very clear that the next time you start an ESP32-based project, you’ll surely check and pick the right variant that suits your project requirements. 

Have any question related to this Article?

Top 80+ Beginner-Friendly EEE/ECE Mini-Projects for Electronics Worth Trying

For students in Electronics and Communication Engineering (ECE), a mini-project is more than just a submission; it’s an opportunity to turn concepts like sensors, microcontrollers, embedded systems, communication, automation, digital electronics, and IoT into a working prototype.
That’s where Circuit Digest can be a practical resource for electronics students. Our project resources are available for free, with GitHub code, circuit schematics, and detailed project walkthroughs, including mini projects that cover the basics of electronics. We help students explore a wide range of electronics and communication topics through academic projects, experimentation, and hands-on learning.
Whether you’re looking for beginner-friendly ECE/EEE mini projects for Electronics, an Arduino project, an embedded systems idea, an IoT prototype, a communication project, or a more advanced electronics concept, Circuit Digest can help you explore your options, narrow down your choices, and find a project that fits your interests and goals.

Learn by Building: Hands-On Electronics Mini Projects to Turn Ideas into Reality 

The best way to learn electronics is to build something yourself. Each project includes a working circuit, source code, and a simple explanation of how everything works together. So, instead of just following the steps, you get to understand what’s happening in the circuit and why it works. These projects give you a practical way to take what you’ve learned in the classroom and turn it into a working prototype that you can test, improve, and confidently demonstrate.

Automatic Toll Gate System Using Arduino

Automatic Toll Gate System Using Arduino

The “automatic toll gate system project” shows how simple sensors and a microcontroller can automate a real-life process like toll collection, making it an ideal project for anyone just starting in electronics. 

Dual Axis Solar Tracker System

Dual Axis Solar Tracker System

This dual-axis solar tracking system uses Arduino to move the solar panel horizontally and vertically based on the sun's location. This project, using LDR and servo motors, can increase energy output by up to 40% compared to fixed solar installations. 

Arduino Location Tracker

Arduino Location Tracker

This comprehensive project creates a fully functional GPS tracking system using Arduino UNO R3, SIM800L GSM module, and NEO-6M GPS module, a perfect low-cost DIY combination for vehicle monitoring, asset protection, or personal safety applications. 

Gas Leakage Detector

Gas Leakage Detector 

In this project, you'll learn how to build a simple and budget-friendly gas leakage detector using Arduino. This LPG gas leak detector uses an Arduino Uno and MQ-5 gas sensor to detect gas levels in the air and activates a buzzer and LED to alert users when a leak is present.

Smoke and Fire Alarm System

Smoke and Fire Alarm System 

In this project, you will also learn how to build an Arduino smoke alarm that sends SMS Alerts without needing to rely on the GSM module.  A fire and smoke alarm system using Arduino UNO R4 that sends real-time SMS notifications.

Send SMS with Arduino UNO R4 via Internet

Send SMS with Arduino UNO R4 via Internet 

In this tutorial, I’ll show you how to send SMS using Arduino UNO R4 and the free CircuitDigest Cloud SMS API. Whether it’s fire detection, motion sensing, or home automation, this setup has you covered.

Speed Sensor using Arduino

Speed Sensor using Arduino

In this article, we will learn how to calculate speed using Arduino and an IR sensor. By setting up the two IR sensors at a fixed distance from each other, we can track the time it takes for the object to travel between them. 

Detect the Direction of Sound

Detect the Direction of Sound

In this tutorial, let's learn how to find the direction of sound using Arduino and a few microphones. With the recorded time and the known distance between them, we can accurately calculate the object's speed using a formula.

RFID Door Lock System

 RFID Door Lock System

In this article, we will learn how to build an RFID door lock system using Arduino. It’s a fun and secure way to unlock the door. By integrating an RFID reader with an Arduino, this system will automatically open the door when an authorised RFID card or tag is scanned. 

Smart Home Using Arduino Uno R4 WiFi

Smart Home Using Arduino Uno R4 WiFi

Our Smart Home Using Arduino Uno R4 WiFi project is designed for home safety and convenience, integrating temperature, humidity, light, and gas monitoring. This project is perfect for anyone who wants to make their home or office a little smarter. 

Speaking Alarm Clock Using the XIAO ESP32-S3

 Speaking Alarm Clock Using the XIAO ESP32-S3

The ESP32 speaking alarm clock built in this tutorial replaces the beep at a scheduled time and expects the user to interpret the reason for the beep. This DIY Speaking Alarm Clock is developed using the XIAO ESP32-S3 microcontroller and a cloud-based Text-to-Speech (TTS) engine.

Noise Pollution Monitoring System

Noise Pollution Monitoring System

Noise Pollution Monitor tracks, analyses, and alerts on rising noise levels in real time. The noise pollution monitoring project continuously measures ambient sound and vibration, displays the readings locally, and pushes data to CircuitDigest Cloud to access the data from anywhere. 

Metal Detector System

Metal Detector System

This metal detector uses an affordable Wi-Fi-enabled microcontroller, a handful of available components, and a simple, hand-wound copper coil. We’ll guide you through winding the induction coil, assembling the pulse circuit, and flashing the code for this DIY PI metal detector.

Helmet Detection with Raspberry Pi

Helmet Detection with Raspberry Pi

This project is a compact, traffic monitoring device that uses a USB camera, Python, OpenCV, and the CircuitDigest Cloud API to automatically detect whether two-wheeler riders are wearing helmets in real time, without the need for on-device machine learning training or manual dataset labelling.

Raspberry Pi Waste Segregation System

Raspberry Pi Waste Segregation System

This project captures an image of waste using a USB camera and can be sent to an Image Processing API located in the Cloud for classification as either biodegradable or non-biodegradable. No trained machine learning model is required for classification, which is done using an API call. 

Raspberry Pi Parking Space Detection System

Raspberry Pi Parking Space Detection System

We have built a parking space detection system without any complex setup. We only need a Raspberry Pi board, a USB camera, and an account in CircuitDigest Cloud. The Requests library then sends the image to the CircuitDigest Cloud API using an HTTPS POST request with the API key.

T Flip-Flop

 T Flip-Flop

The flip-flop, aka latch, can also be understood as Bistable Multivibrator as two stable states. Generally, these latch circuits can be either active-high or active-low, and they can be triggered by HIGH or LOW signals, respectively.

NAND Gate with Transistors

NAND Gate with Transistors

In this article, we will go over how to build a NAND gate circuit with transistors. Transistors serve as the building blocks of logic gates, such as AND gates, NAND gates, OR gates, XOR gates, and other gates that are integral to integrated circuits. 

XOR Gate with Transistors

XOR Gate with Transistors

In this article, we will explore the inner workings of the XOR gate, including its truth table, logical symbol representation, circuit diagram, and practical construction using transistors. The XOR gate an essential component in various applications, from binary arithmetic to complex data encryption algorithms.

Panic Alarm Button Circuit

Panic Alarm Button Circuit

A Panic Alarm Circuit is used to send an emergency signal immediately to people in nearby locations to call for help or to alert them. The indication of an emergency can either be in the form of a visible or audible signal, which can be fixed a few meters away through wire.

Fire Alarm Circuit

Fire Alarm Circuit

Building a simple fire alarm system using a 555 Timer IC that will sense a fire (temperature rise in the surrounding area) and trigger the alarm. The key component of the circuit is a thermistor, which has been used as a fire detector or a fire sensor

Rain Alarm

Rain Alarm

A rain alarm is an application which detects rainwater and blows an alarm. They are useful device and plays an important role in various industries such as automobile, irrigation, and wireless communication. 

Fridge Door Alarm Circuit

Fridge Door Alarm Circuit

This circuit triggers the alarm if the door of the fridge is left open for a long time. When the door of the refrigerator is left open, the temperature inside the cabin will increase. This rise in temperature will be sensed by the thermostat, which will try to cool down the cabin.

Doorbell using IC 555

Doorbell using IC 555

The main feature of this doorbell is that we can control the time duration for which it keeps ringing upon pressing the switch. Also, we can control the oscillation frequency of the “doorbell sound” produced by the Doorbell (Here we are using a buzzer as a bell to illustrate).

Simple Flashing LED

Simple Flashing LED

An LED Flasher Circuit project is done with available electronic components and an easy-to-understand schematic. This tutorial will show you how to make an LED glow and fade at a certain interval

LED Dimmer Circuit

LED Dimmer Circuit

Building an LED ON and OFF circuit using a 555 timer IC and BC557 is very simple. In this circuit, the 555 timer IC is configured as an astable multivibrator, which means that it produces a continuous square wave output with a fixed frequency and duty cycle.

 DC-DC Boost Converter

DC-DC Boost Converter

In this article, we will learn about buck converters and design a very simple boost converter using a 555 timer and IRFZ44N, an N-channel MOSFET. A boost converter is a non-isolated type of switch-mode power supply that is used to step up the voltage.

 555 Timer-Based Buck Regulator

555 Timer-Based Buck Regulator

This circuit is basically a simple power electronics DC-DC Buck converter which can be used to step down voltage; its efficiency results in better battery life due to reduced heat generation, making it a lucrative option for smaller gadgets.

Positive and Negative Charge Pump Circuit

Positive and Negative Charge Pump Circuit

A charge pump is a type of circuit that is made out of diodes and capacitors configured in a specific configuration to get the output voltage higher than the input voltage or lower than the input voltage. By lower, I mean a negative voltage with respect to ground.

Simple Fading LED Light

 Simple Fading LED Light

The slow fade LED circuit is very simple; the 555 has been used in Astable mode, and a transistor is used to amplify the current. In Astable mode, the 555 IC oscillate at a particular frequency (depending on RC components), meaning the output at PIN 3 goes HIGH and LOW periodically.

Transistor Tester using 555 Timer IC

Transistor Tester using 555 Timer IC

In this tutorial, we will design a simple 555 TIMER-based circuit which will test the working of the transistor in seconds. This circuit is a convenient way to check the working of a transistor for newbies.

Audio Amplifier using 555 Timer IC

Audio Amplifier using 555 Timer IC

 In this tutorial, we are going to see how a 555 IC can be used as an audio amplifier. A low-power audio signal can be amplified using a 555 Timer IC.  We can test this circuit by blowing some air from the mouth towards the Mic; the speaker will generate sound.

Current Detector Circuit with 555 Timer

Current Detector Circuit with 555 Timer 

In this article, we build a simple current detector circuit with a 555 Timer and some passive components, which can help you to detect open live lines with ease. Before starting work on an electrical box and AC mains, one needs to verify that there is no AC leakage voltage.

Motion Detector Circuit using 555 Timer

Motion Detector Circuit using 555 Timer

In this tutorial, we are going to use an IR sensor with a NE555 Timer IC to detect motion and switch the AC load according to that. The 555 timer IC is used as a switch here. This circuit uses a digital timer IC; the operation of the circuit is fast and accurate, with even faster detection speeds. 

Simple LDR Circuit

Simple LDR Circuit

This dark detector circuit uses a 555 timer IC and an LDR (Light Dependent Resistor), which senses the light in the surroundings, and if it does not find light, it triggers the IC and turns on an LED attached to the circuit. 

Smart Dustbin Using Arduino

Smart Dustbin Using Arduino

This automatic smart dustbin is a decent gadget to make your home clean and attractive. Kids spread trash to a great extent with paper, wrappers, and numerous other things at home.  It opens automatically without touching to throw all trash and waste into this smart dustbin

Automatic Plant Watering System Using Arduino

Automatic Plant Watering System Using Arduino

This DIY automatic plant watering system project helps solve the common problem of forgetting to water plants while away from home. In this complete guide, we'll show you how to make an automatic plant watering system with soil moisture sensing and mobile app control capabilities.

ESP32 WLED Controller

ESP32 WLED Controller

 DIY tutorial is all about making our home lighting smart and fun without any complicated steps. We can connect a standard 12V LED strip to a tiny wi-fi chip and build our own ESP32 WLED controller.

Digital Keypad Security Door Lock

Digital Keypad Security Door Lock

In this project, I have built an Arduino Keypad Door Lock which can be mounted to any of your existing doors to secure them with a digital password. Of all the solutions, the low-cost one is to use a password- or PIN-based system.

Automatic Pet Feeder

Automatic Pet Feeder

Arduino automatic pet feeder that feeds your pet automatically at scheduled times. This project incorporates a DS3231 RTC (Real Time Clock) Module, allowing you to keep track of your pet's eating schedule and properly schedule feeding at specific times. 

3-Way Traffic Light Controller

3-Way Traffic Light Controller

This Arduino-based 3-Way Traffic Light Controller is a simple project which is useful for understanding how traffic lights work, which we see around us. It’s pretty simple and can be easily built on a breadboard 

Digital Thermometer Using Arduino

Digital Thermometer Using Arduino 

In this project, we have made an Arduino-based digital thermometer to display the current ambient temperature on a 16x2 LCD unit in real time. It can be deployed in houses, offices, industries, etc., to measure the temperature. 

Voice Controlled Home Automation

Voice Controlled Home Automation

 This model of a Modern Smart Home. These features demonstrate what a Smart Home would be like. It improves automation, control and monitoring of household devices and connects via standard means of communication for its operation.

Virtual Reality Interface with Gesture-Contro

Virtual Reality Interface with Gesture-Control 

This is a very interesting project in which we are going to learn how to implement virtual reality using Arduino and Processing. We will show you how you can simply wave your hand in front of a webcam and draw something on your computer. 

Arduino RFID Door Lock

Arduino RFID Door Lock

This RFID Door Lock can be made easily at home, and you can install it on any door. This door lock is just an electrically operated door lock which gets open when you apply some voltage (typically 12v) to it.

Automatic Street Light Controller

Automatic Street Light Controller

This Simple Automatic Street Light Circuit, using an LDR and a relay, will turn the light bulb on and off based on the lights in the surroundings. This circuit is quite simple and can be built with Transistors and an LDR; you don’t need any op-amp or 555 IC to trigger the AC load. 

Clap Switch

Clap Switch

A clap switch, it can be turned ON by any sound of approximately the same pitch as a clap. Here, we are using an Electric Condenser Mic for sensing the sound, a transistor to trigger the 555 timer IC, and a 555 IC to turn ON the LED through a low-voltage trigger. 

Handheld Arduino Game Console

Handheld Arduino Game Console 

This Arduino handheld game console is lightweight, easy to carry, and simple to build, making it perfect for hobbyists, electronics engineers, and young tech enthusiasts alike. It’s beginner-friendly, and it is enough to spark creativity and deeper learning.

BLE-based Proximity Control

BLE-based Proximity Control 

In this article, I am going to show you how to make a simple BLE presence detector with the help of an ESP32 and Arduino, and in the end, we will test these devices using BLE on my smartphone and a smartwatch. 

ESP32-Based Webserver

ESP32-Based Webserver

An ESP32-based web server is used to display the temperature and humidity values from the DHT11 sensor. ESP32 board will read the temperature and humidity data from the DHT11 sensor and display it on the Webpage. Here, IFTTT is also used to send email notifications when the temperature goes beyond a particular limit.

What Makes a Good Mini Project for ECE/EEE?

A good project has to fit your budget, available components, semester timeline, technical skill level, and, most importantly, give you something meaningful to explain during a viva or interview.
Finding an electronics and communication engineering mini-project topic is often the first challenge. Finding a project that matches your skill level, syllabus, budget and available components is the harder part.
Before choosing a topic, consider five things:

» Technical relevance- Does the project demonstrate something you have learned?
» Buildability - Can you obtain the components and complete the prototype within your deadline?
» Budget - Can you build it without spending unnecessarily on specialised hardware?
» Demonstration value - Can you clearly show the input, processing and output?
» Learning value - Will you be able to explain the circuit, code, limitations and future improvements?

These factors are particularly important for a low-cost electronics engineering mini project. Existing engineering project resources frequently emphasise that cost, time and resource availability strongly influence project selection.

Why use Circuit Digest for Mini Projects for Electronics?

  • Ready-to-use code: Many projects include source code and GitHub resources that students can study, modify, and experiment with.
  • Practical orientation: Focus on projects that can help connect classroom concepts with working electronics.
  • Technology exploration: Compare traditional circuit approaches with modern microcontroller, wireless and IoT-based implementations.
  • Learning before building: Understanding the circuit and technology behind a project makes it easier to troubleshoot and explain.
  • Useful for academic work: Project ideas can help students move from topic selection to prototyping, documentation and demonstration.

Circuit Digest helps make your journey easier by bringing electronics engineering mini project ideas and practical technical knowledge together in one place.

Explore Related Project Hubs: Artificial Intelligence | Electronics | IoT | Robotics | ESP32 | Raspberry Pi | Arduino Projects | Drone Projects |  Electronic Circuit 

Get Help Along the Way

Circuit Digest’s community is active and always ready to help. If you get stuck while building a project or simply want feedback on your work, you can connect with us and get guidance from our community. Join us on our WhatsAppand Instagram channelto ask questions, share your projects, and get the support you need. 

Have any question related to this Article?

iHub Robotics, the Kerala Startup Building Almost Every Layer of Its Humanoids In-House

Submitted by Staff on

Athil said his interest in robotics began during his school years, inspired partly by the Tamil film Enthiran and partly by Iron Man. He said he wanted to build his own version of that kind of technology. During that period, Arduino boards were difficult to get, so he started building small robots from whatever components were available.

ESP32 Video Player: SD Card to TFT Display

Playing smooth, full-motion video on low-power microcontrollers has been challenging due to memory and processing limitations. But with the dual-core speed, high SPI clock rates and an optimized decoding library on the ESP32, you can turn a simple development board into a working video player. If you want to create custom animations or add dynamic visual UI elements to your hardware projects, building this video player is a great way to push your hardware to its limits.
    In this tutorial, we are building an ESP32 video player that streams Motion JPEG (.mjpeg) files directly from a MicroSD card and displays them on a TFT display. We’ll walk you through all the hardware setup, video file formatting and code implementation needed to get your video running smoothly. You can also check out similar ESP32 Projects done previously here at Circuit Digest.

How Does This ESP32 Video Player Work?

Below is the block diagram of the ESP32 video player

1. SD Card

Stores the video as a Motion JPEG (.mjpeg) file—a simple sequence of individual JPEG images packed back-to-back.
The ESP32 reads this raw file stream continuously over the SPI bus.

2. RAM Buffer

Reads data in 4KB chunks into memory instead of byte-by-byte to prevent lag.
Scans incoming data to locate frame boundary markers and assemble complete JPEG images in RAM.

3. JPEG Decoder

Uses the lightweight JPEGDEC library to decompress the JPEG image directly in memory.
Converts the JPEG data into a 16-bit RGB565 pixel format that the screen can render.

4. TFT Display

Receives pixel data over a high-speed 40MHz SPI bus to update the ILI9341 screen.
Applies small timing delays to keep playback smooth and locked at a steady 15 FPS. Here is another Arduino touch screen calculator using a TFT LCD project where we showcased how to make a calculator with a TFT display and Arduino.

Converting Video to MJPEG Format:

To prepare your video file for the ESP32, you need to convert standard formats like .mp4 into a .mjpeg (Motion JPEG) file using a free web-based converter tool.
Paste the converted video file to the MicroSD card root directory. The file name should be video, and the format should be mjpeg. If we want to change the file name, we need to change the name in the code too to match the file name we choose.
The table shows the video conversion settings.

SettingsValue
Resolution320x240
File FormatMJPEG
FPS15
QualityMedium

Components Required

Below is the list of components required to build this project

S.NoComponentsSpecificationQuantity
1.MicrocontrollerESP32 Dev Module    1
2.TFT Display2.4 TFT SPI 240*320
(TJCTM24024-SPI)
    1

Circuit Diagram

 The following is the circuit diagram of the ESP32 video player

Connect the circuit as per the table below

TFT Display pinsESP32 Dev Module Pins
VCC3.3V
GNDGND
CSGPIO 2 
RSTGPIO 4
D/CGPIO 5
MOSIGPIO 23
SCKGPIO 18
LED3.3V
MISOGPIO 19
SD_CSGPIO 15
SD_MOSIGPIO 23
SD_MISOGPIO 19
SD_SCKGPIO 18

Coding

#include <SPI.h>
#include <SD.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <JPEGDEC.h>
// --- TFT Display Pins ---
#define TFT_CS   2
#define TFT_DC   5
#define TFT_RST  4
// --- SD Card Pin ---
#define SD_CS    15
// --- Frame buffer for one JPEG frame ---
// Increase if your frames are larger than this; watch ESP32 RAM limits.
#define FRAME_BUF_SIZE (80 * 1024)
static uint8_t *frameBuf = nullptr;
// --- Target playback rate ---
#define TARGET_FPS 15
#define FRAME_INTERVAL_MS (1000 / TARGET_FPS)
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
JPEGDEC jpeg;
File videoFile;
// Drawing callback function
int JPEGDraw(JPEGDRAW *pDraw) {
 tft.drawRGBBitmap(pDraw->x, pDraw->y, pDraw->pPixels, pDraw->iWidth, pDraw->iHeight);
 return 1;
}
// Reads one JPEG frame (SOI 0xFFD8 ... EOI 0xFFD9) from videoFile into frameBuf.
// Returns frame size in bytes, or 0 if no more frames / error.
size_t readNextFrame() {
 // 1. Find SOI marker (0xFF 0xD8)
 int b1 = -1, b2 = -1;
 bool foundSOI = false;
 while (videoFile.available() >= 2) {
   b1 = videoFile.read();
   if (b1 == 0xFF) {
     b2 = videoFile.peek();
     if (b2 == 0xD8) {
       videoFile.read(); // consume the 0xD8
       foundSOI = true;
       break;
     }
   }
 }
 if (!foundSOI) return 0; // EOF reached without finding a new frame
 frameBuf[0] = 0xFF;
 frameBuf[1] = 0xD8;
 size_t idx = 2;
 // 2. Read bytes until EOI marker (0xFF 0xD9) is found
 int prevByte = 0;
 while (videoFile.available() && idx < FRAME_BUF_SIZE) {
   int curByte = videoFile.read();
   frameBuf[idx++] = (uint8_t)curByte;
   if (prevByte == 0xFF && curByte == 0xD9) {
     return idx; // complete frame captured
   }
   prevByte = curByte;
 }
 // Ran out of buffer space or file ended mid-frame
 Serial.print("WARN: frame incomplete or buffer too small, got ");
 Serial.print(idx);
 Serial.println(" bytes before running out of buffer/file");
 return 0;
}
void setup() {
 Serial.begin(115200);
 delay(1000);
 Serial.println("\n--- ESP32 Video Player Initializing ---");
 frameBuf = (uint8_t *)malloc(FRAME_BUF_SIZE);
 if (!frameBuf) {
   Serial.println("ERROR: Could not allocate frame buffer! Reduce FRAME_BUF_SIZE.");
   while (1) delay(1000);
 }
 Serial.print("Free heap after buffer alloc: ");
 Serial.println(ESP.getFreeHeap());
 tft.begin(27000000);
 tft.setRotation(1); // Landscape orientation
 tft.fillScreen(ILI9341_BLACK);
 Serial.println("Display Initialized.");
 if (!SD.begin(SD_CS)) {
   Serial.println("ERROR: SD Card initialization failed!");
   while (1) delay(1000);
 }
 Serial.println("SD Card initialized successfully!");
 if (!SD.exists("/video.mjpeg")) {
   Serial.println("ERROR: /video.mjpeg not found on SD card!");
   while (1) delay(1000);
 }
 videoFile = SD.open("/video.mjpeg", FILE_READ);
 if (!videoFile) {
   Serial.println("ERROR: Could not open /video.mjpeg!");
   while (1) delay(1000);
 }
 Serial.println("Found and opened /video.mjpeg on SD card!");
}
void loop() {
 unsigned long frameStart = millis();
 size_t frameSize = readNextFrame();
 if (frameSize == 0) {
   // End of file (or bad frame) — loop the video back to the start
   Serial.println("End of video, looping...");
   videoFile.seek(0);
   return;
 }
 if (jpeg.openRAM(frameBuf, frameSize, JPEGDraw)) {
   jpeg.decode(0, 0, 0);
   jpeg.close();
 } else {
   Serial.print("ERROR: jpeg.openRAM failed on this frame, size=");
   Serial.println(frameSize);
 }
 // Pace playback to target FPS
 unsigned long elapsed = millis() - frameStart;
 if (elapsed < FRAME_INTERVAL_MS) {
   delay(FRAME_INTERVAL_MS - elapsed);
 }
}
Have any question related to this Article?

Getting Started with the MAX32655 Feather Development Board

Submitted by Vishnu S on

Bluetooth Low Energy (BLE) has become one of the most widely adopted wireless technologies for battery-powered devices, offering reliable communication while consuming only a fraction of the power required by traditional wireless protocols. From wearable electronics and healthcare devices to wireless audio accessories and industrial sensors, BLE enables devices to remain connected for extended periods without sacrificing battery life.