🤖Have you ever tried Chat.M5Stack.com before asking??😎

Subcategories

  • 551 Topics
    2k Posts
    H
    @Danieldsouza I prefer to use KiCAD for schematic and PCB design. The software is open source It runs on Windows, Linux, Mac there is a strong community there is a ton of libraries for thousands of components some part distributor and assembling factories provide their own library or allow symbol and footprint download making your own symbols and footprints is very easy design rule checking I am not an advanced user but managed to make a 4-layer PCB after watching a few tutorial videos. Independend of the EDA Tool make sure you avoid the common tripping hazard like missing blocking caps or unwanted ground loops.
  • When you meet problems using M5Stack, we help you solve it.

    201 Topics
    990 Posts
    S
    不小心下载了一个imu什么的……咔咔一顿后……我关了重新开……,但还是不会动,只会左右动,然后跳舞的话只会亮灯,不会动,只能左右转动……
  • 505 Topics
    2k Posts
    D
    Hopefully I can shed a little light on this topic. The AIN4-20mA unit uses a STM32 processor to handle the I2C interface in software. For some reason, the timing is not wholly compatible with the Raspberry Pi kernel I2C drivers. However, the Espressif I2C implementation is a lot more tolerant and flexible and works just fine. That's why it works with the M5 controllers. There was a an update to the github repo for this unit's firmware (https://github.com/m5stack/M5Module-4-20mA-Internal-FW) which changed the I2C library that was used. It's possible that this will fix it, but I haven't bothered to set up a STM32 development system to try it. If you really want to use a Pi or other Linux host board, you could use any inexpensive ESP device (like an M5Stamp) as a go-between. Another option is to use something like the Arduino UNO Q, which runs Linux on the main processor and allows you to run C++ code on the STM32 microcontroller to talk to I2C devices. It's really better to run real-time control on a separate microcontroller anyway.
  • 1k Topics
    6k Posts
    Y
    Root Cause Analysis A detailed schematic review revealed the source of the problem. All three components — Core2, Audio Module, and Bottom2 — are interconnected through the shared M5 BUS. The Bottom2 module includes a SPM1423 MEMS microphone, which uses: GPIO0 (BUS pin 24) for the clock signal (CLK) GPIO34 (BUS pin 26) for the data signal (DAT, digital output) The Audio Module, based on the ES8388 codec, uses: GPIO0 (BUS pin 24) for I2S_MCLK GPIO34 (BUS pin 26) for I2S_MAIN_DIN This creates a fundamental hardware conflict on the I2S bus. The Core Conflict Two independent devices attempt to drive the same data line: The ES8388 (M144 Audio Module) uses GPIO34 to send digitized audio data from its ADC (line-in or microphone) to the ESP32 via I2S. The SPM1423 (Bottom2) uses the same GPIO34 to output PDM audio data from its internal MEMS microphone. From the ESP32’s perspective: GPIO34 is input-only However, on the physical PCB traces, both devices are electrically connected to this same line and actively drive it. This results in a classic and severe bus contention scenario: Two outputs connected together No arbitration No isolation No possibility for coexistence Why This Cannot Be Solved in Software At first glance, one might consider disabling the microphone via software. Unfortunately, this is not feasible due to both architectural and hardware constraints. The Bottom2 doesn’t expose the SPM1423 MEMS dedicated enable/disable (chip select) pin. The only way to silence it — effectively forcing its data output into a high-impedance (Hi-Z) state — is to stop its clock signal on GPIO0. This leads directly to a deadlock: If the M144 switch is set to position A: GPIO0 is used as MCLK (mandatory master clock for ES8388 operation, typically 12.288 MHz) If the switch is set to position B: GPIO0 becomes I2S SCLK (bit clock) Additionally: The internal amplifier of the Core2 (NS4168) also uses GPIO0 for BCLK In other words, GPIO0 is always actively used in any valid configuration. Stopping the clock to disable the microphone would simultaneously break: the ES8388 codec or the Core2 internal audio path Thus, there is no viable way to control the microphone via software without disrupting essential system functionality. Design Oversight The A/B switch on the M144 Audio Module was clearly designed to avoid clock conflicts (MCLK vs SCLK) with other peripherals. However, the design completely overlooks the data line conflict on GPIO34. This is particularly problematic because: the Bottom2 module is an official M5Stack accessory the SPM1423 microphone is always active by default both modules are intended to be used within the same ecosystem Despite this, their coexistence leads to a non-functional configuration when using the ES8388 input path. Conclusion This issue is not a matter of configuration, firmware, or library incompatibility. It is a fundamental hardware design conflict on the shared M5 BUS. When Bottom2 is attached: the SPM1423 microphone continuously drives the I2S data line the ES8388 is unable to deliver valid audio data the result is severe noise and corrupted signal There is no reliable software workaround. The only effective solutions are hardware-level: physically removing or isolating the SPM1423 microphone redesigning the Bottom2 PCB to include a switch or gating mechanism routing the microphone control (e.g., SELECT or enable logic) to a dedicated GPIO Until such changes are implemented, the ES8388 input functionality cannot be used in conjunction with the Bottom2 module in a stable and predictable way. My solution was to remove the SPM1423 Microphone from the PCB. Another solution is to cut the relevant pins from the Bottom2 BUS with the same effect - removing SPM1423 from the circuit.
  • 55 Topics
    203 Posts
    J
    I have been able to get a program to work that uses the M5EchoBase library but no luck using the unified library. For example the simple program below doesn't work. #include <M5Unified.h> void setup() { // 1. Initialize M5Unified delay(1000); // Delay for a moment to allow the system to stabilize. auto cfg = M5.config(); cfg.serial_baudrate = 115200; M5.begin(cfg); // 2. Configure the Speaker for the Atomic Audio Base (ES8311) // We access the speaker configuration directly via M5.Speaker.config() auto spk_cfg = M5.Speaker.config(); // Set pins for Atomic Audio Base (ES8311) spk_cfg.pin_bck = 8; // BCLK spk_cfg.pin_ws = 6; // LRCK (WS) spk_cfg.pin_data_out = 5; // DAC (DOUT) spk_cfg.i2s_port = I2S_NUM_0; // Configure for external codec (not internal DAC) spk_cfg.use_dac = false; spk_cfg.sample_rate = 44100; // Apply the configuration M5.Speaker.config(spk_cfg); // 3. Start the speaker M5.Speaker.begin(); // 4. Set volume (0-255) M5.Speaker.setVolume(128); } void loop() { M5.update(); // Play a 1000 Hz tone for 1000 milliseconds (1 second) M5.Speaker.tone(1000, 1000); // Wait for the tone to finish delay(1000); // Small delay before next loop delay(1000); } Is there no way to set up the ES8311 codec without using M5EchoBase? strangely if I run the program below then load the above program the tone works? But I can't stick the M5.Speaker.tone(1000, 1000); command in the program below and have it work. Does anyone know how to play a tone using only the Unified library from an AtomS3R into a Atomic Audio Base (ES8311 codec)? #include <M5Unified.h> #include <M5EchoBase.h> #if defined(CONFIG_IDF_TARGET_ESP32S3) #define RECORD_SIZE (1024 * 400) #elif defined(CONFIG_IDF_TARGET_ESP32) #define RECORD_SIZE (1024 * 400) #endif #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)) M5EchoBase echobase; #else M5EchoBase echobase(I2S_NUM_0); #endif static uint8_t *buffer = nullptr; // Pointer to hold the audio buffer. void setup() { delay(1000); // Delay for a moment to allow the system to stabilize. auto cfg = M5.config(); cfg.serial_baudrate = 115200; M5.begin(cfg); // Initialize the EchoBase with ATOMS3 pinmap. #if defined(CONFIG_IDF_TARGET_ESP32S3) if (!echobase.init(44100 /*Sample Rate*/, 38 /*I2C SDA*/, 39 /*I2C SCL*/, 7 /*I2S DIN*/, 6 /*I2S WS*/, 5 /*I2S DOUT*/, 8 /*I2S BCK*/, Wire) != 0) { Serial.println("Failed to initialize EchoBase!"); while (true) { delay(1000); } } #elif defined(CONFIG_IDF_TARGET_ESP32) // Initialize the EchoBase with ATOM pinmap. if (!echobase.init(44100 /*Sample Rate*/, 25 /*I2C SDA*/, 21 /*I2C SCL*/, 23 /*I2S DIN*/, 19 /*I2S WS*/, 22 /*I2S DOUT*/, 33 /*I2S BCK*/, Wire) != 0) { Serial.println("Failed to initialize EchoBase!"); while (true) { delay(1000); } } #endif echobase.setSpeakerVolume(80); // Set speaker volume to 70%. echobase.setMicGain(ES8311_MIC_GAIN_0DB); // Set microphone gain to 0dB. buffer = (uint8_t *)malloc(RECORD_SIZE); // Allocate memory for the record buffer. // Check if memory allocation was successful. if (buffer == nullptr) { // If memory allocation fails, enter an infinite loop. while (true) { Serial.println("Failed to allocate memory :("); delay(1000); } } Serial.println("EchoBase ready, start recording and playing!"); // M5.Speaker.tone(2000, 2000); // delay(2000); } void loop() { Serial.println("Start recording..."); // Recording echobase.setMute(false); echobase.record(buffer, RECORD_SIZE); // Record audio into buffer. delay(100); Serial.println("Start playing..."); // Playing echobase.setMute(false); delay(10); echobase.play(buffer, RECORD_SIZE); // Play audio from buffer. //M5.Speaker.playRaw(buffer, RECORD_SIZE, 44100, false, 1, 0); delay(100); }
  • For topics on the M5Stack Atom.

    260 Topics
    849 Posts
    K
    After a lot of testing and searching it became apparent that the M5Atom controller did not work properly (never had this type of problem before). This, outdated software and some wrong suggestions by both ChatGPT and the AI bot from M5Stack (with the knowledge base available) made it a bit of struggle. However, after all updates and testing different hardware it finally works again. So thanks to anyone that spent time on this!
  • Getting a battery to work to power an M5 Tough?

    4
    0 Votes
    4 Posts
    2k Views
    L
    It sounds like the M5 Tough’s battery issues were likely caused by a polarity or connector mismatch—there’s no strict standard for that battery plug, so reversing positive and negative can easily overheat or damage the board. Before powering up again, double-check the connector pinout with a multimeter, ensure your LiPo has proper protection circuitry and matches the expected 3.7–4.2 V range, and avoid using USB and battery power simultaneously until you confirm how the board switches between them. A proper match should let the Tough run smoothly on battery without overheating or shutting down.
  • M5Tab Running out of memory error

    1
    1
    0 Votes
    1 Posts
    700 Views
    No one has replied
  • TAB5 python Crash

    6
    0 Votes
    6 Posts
    2k Views
    felmueF
    Hello @scroggyg I modified my test program to use internal I2C, did a i2c scan w/o ExtIO2 connected and with it - there seems to be no i2c address conflict. For me ExtIO2 works either connected to port A or to internal. What I noticed though is that I need to wait (after powering up M5Tab5) for the UIFlow2 screen fully being loaded before running the program. If I do not wait long enough I occasionally see a crash too. Thanks Felix
  • Debug CoreS3

    2
    1 Votes
    2 Posts
    1k Views
    D
    Looking at the image on the specs site, there is no connector on the DP/DN pins however I've tried a 4pin Molex Picoblade and it fits perfectly. [image: img-c464672f-1f10-4935-a168-ee4e64f62f70.webp] I've made up a USB cable attached to the DP/DN connector but still cannot get it to debug.
  • M5Stack LLM630

    3
    0 Votes
    3 Posts
    2k Views
    C
    @henryCharm tnks for answering.. I'm talking about this LLM630 .. I red somewhere this llm630_compute_kit has a esp32 for wifi tasks..
  • Tab5 - Speaker init after crash (using Arduino IDE)

    3
    0 Votes
    3 Posts
    2k Views
    A
    @felmue Yes thanks this is my current workaround (I did have the battery so I just take it out). Speaker is very loud. I guess I just have to avoid any crashes : )
  • PaperS3 revisions - details needed

    1
    1 Votes
    1 Posts
    1k Views
    No one has replied
  • Paper S3 questions

    16
    0 Votes
    16 Posts
    15k Views
    F
    @wsanders said in Paper S3 questions: So I think we're stuck with ESP deep sleep for now. It would be interesting to see the code for the PMS150G. I'm not sure what all that FET logic around it is for, maybe an AXP192 wouldn't fit on the board. (And why a USB chip that would prevent the device from frying when plugged into a USB PM port wasn't included.) Yeah, just like the OG M5Paper, the PaperS3 has a bunch of shortcomings that stem from, well, I don't want to say bad design... Just not properly thought through. The PMS150G for example is OTP, so one can't change its behaviour. Using a slightly smarter, programmable MCU would've allowed for things like forwarding of interrupt signals based on logic, and deeper management of power states or their handling. I would've also included the following changes: Full quad SD data pins (there's enough free pins on the S3 according to the schematics) separate MCU (like an RP2040 or similar low power MCU) for EPD handling, similar to how the M5Paper used the IT8951 (which itself was a mistake, as that MCU is super power hungry, and there was no way to reprogram it either), with open firmware, to offload display update tasks USB hub controller so both the S3 and this EPDC MCU could be natively connected to a host for flashing/debugging Better charge controller (the one used won't let the battery charge faster than 250mAh@5V, which is why you need to keep it on charger for hours). Utilising the GT911 capacitive touch "buttons" similar to the ESP32-S3-BOX, with three or four zones available on the display bottom (fat) chin
  • Seeking PlatformIO Example for ESP-IDF on M5 PaperS3 (Non-Arduino)

    5
    0 Votes
    5 Posts
    5k Views
    F
    @sok Your config is mostly correct. However, due to some changes in EPDiy make it incompatible with regular library import - you need to add is as an ESP-IDF component to the project. This sadly at the moment isn't too straightforward to do - you need to manually clone the git repo into your project's components folder (and potentially create it if it doesn't exist, it's not a default folder created by the PIO init command), and add its path to the root CMakeLists.txt Here is an example repo and project. I recommend focusing on the aforementioned components folder and CMakeLists.txt (specifically the list(APPEND EXTRA_COMPONENT_DIRS part of the latter). Alternatively, you can use M5Unified as a lib_dep.
  • TAB5 watchdog after firmware update

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Best controler for deep sleep ?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • TAB5 SD doesnt work in Arduino IDE

    7
    0 Votes
    7 Posts
    4k Views
    S
    The best, fastest and most reliable way I've found to access the µSD card on the Tab5 is via the SD_MMC.h library. Try the below; #include <M5Unified.h> #include <SD_MMC.h> #define sd_D0 GPIO_NUM_39 #define sd_D1 GPIO_NUM_40 #define sd_D2 GPIO_NUM_41 #define sd_D3 GPIO_NUM_42 #define sd_CLK GPIO_NUM_43 #define sd_CMD GPIO_NUM_44 #define GPS_RX_PIN 48 // CoreS3 GPIO RX #define GPS_TX_PIN 2 // CoreS3 GPIO TX #define sd_speed 20000 void setup() { M5.delay(500); M5.begin(); M5.Lcd.setTextColor(GREEN, BLACK); M5.Lcd.setTextFont(2); SD_MMC.setPins(sd_CLK, sd_CMD, sd_D0, sd_D1, sd_D2, sd_D3); M5.Lcd.println("Mounting Tab5 µSD"); //M5.delay(5000); if (!SD_MMC.begin("/sdcard", false, false, sd_speed)) { // SD_MMC.begin("/sdcard", false, false, sd_speed) M5.Lcd.println("µSD mount failed!"); while (1); } else { M5.Lcd.println("µSD mounted."); } // List files on SD card root File root = SD_MMC.open("/"); if (!root) { M5.Lcd.println("Failed to open root dir"); } else { M5.Lcd.println("Files:"); File file = root.openNextFile(); while (file) { M5.Lcd.println(file.name()); file = root.openNextFile(); } root.close(); } } void loop() { M5.delay(50); }
  • 0 Votes
    3 Posts
    2k Views
    P
    @felmue Thanks Felix. All my files are 960x540. Displaying only 959x 539 for rot 3 fixed the crash problem (do not ask me why) Displaying the same image 960x540 with rot 1 is OK. good enough for me!
  • Tab5 display issue

    12
    1
    0 Votes
    12 Posts
    7k Views
    S
    @oroppas good news
  • RS485 on TAB5

    5
    0 Votes
    5 Posts
    3k Views
    P
    @scroggyg Hi, the SIT3088 is a "converter" from UART to RS-485. To write/read the RS-485, use the UART1 (TX:20, RX:21). The setup below works, although I have to store the arrays first somehow, before setting them into my text box (top_box), as the text appears briefly and then disappears ...but I can see I am receiving OK. I got the tab5 yesterday ...and RS-485 was the first thing I wanted to test it. [image: 1755152011543-35754316-24e0-4e02-9011-94aae5b44237-image.png]
  • Paper S3 flashing issue

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • StamPLC - user demo- wifi/time config?

    7
    0 Votes
    7 Posts
    4k Views
    E
    @onlysaadat My new StamPLC is exactly the same. Registered the device with M5Burner, It's on-line in UiFlow2, Loaded a fresh StamPLC demo - demo initially logged in and just flashed the monitor page no matter what browser is used on multiple computers. Cleared the monitoring user per M5s directions. Now I get an invalid token no matter what I do. Did you ever get your device to work with the demo or figure out how to fix the invalid token?
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • [Tab5] How to de-init the touch panel?

    6
    1 Votes
    6 Posts
    3k Views
    Y
    @ImLunchtime 有建议欢迎多提~
  • paper s3 Get mac failed

    2
    0 Votes
    2 Posts
    2k Views
    Y
    @jahaan2311 The "GET mac failed" error when burning UIFlow 2.0 firmware to your PaperS3 (SKU:C139) typically relates to communication issues during the flashing process. Here are the recommended steps to resolve this: Ensure Correct Download Mode: When connecting the PaperS3 to your Mac, make sure the device enters download mode properly. The screen should remain blank after connecting, indicating it's in programming mode. Verify M5Burner Setup: Confirm you have the latest M5Burner version installed for macOS Select the correct PaperS3 firmware in M5Burner Double-check the USB port selection matches your connected device Check USB Connection: Try using a different USB-C cable (preferably a data cable, not charging-only) Connect directly to your Mac's USB port instead of using a hub Avoid using USB-C adapters if possible Reconfigure Burning Settings: In M5Burner, click "Configure" before burning Verify all Wi-Fi settings are correctly entered Ensure the baud rate is set to the recommended value (typically 115200) macOS Specific Considerations: Ensure you have the necessary USB drivers installed Check System Preferences > Security & Privacy for any blocked developer extensions Try restarting your Mac and the PaperS3 device before retrying If the issue persists after these steps, please try burning the factory firmware first using the PaperS3 Factory Firmware and then attempt the UIFlow 2.0 firmware again. https://chat.m5stack.com/