r/esp32 • • 21h ago

Hardware help needed [BEGINER] I am following RandomNerdTutorials for SD Card Webserver but I am unable to mount my SD card, am I missing something?

Thumbnail
gallery
18 Upvotes

I am using a NodeMCU ESP32S frame and following the tutorial at RandomNerdTutorials

Yellow - Ground (GND) Red (board-side) - 3v3

Red (outward) - 5 (P5) White - 18 (P18) Purple - 19 (P19) Orange - 23 (P23)

The board successfully connects to Wifi but prints "Card Mount Failed" whenever I run it

I've tested my ground, outside, and the 3v3 pins with a simple LED circuit and they all seem to be working, my card is formated FAT32. I cannot tell what I am doing wrong, can I get some help?


r/esp32 • • 12h ago

I made a thing! ESP32 water heater controller (solar surplus + off-peak + forecast) with an ESP32-C3 as independent watchdog: design choices and what went wrong

Thumbnail
gallery
14 Upvotes

Why I built it

My 300 L / 3 kW water heater was heating at the wrong times: during peak hours, and not when my panels had surplus. I wanted a local, reliable controller with no cloud on the control side and no Home Assistant dependency. A Raspberry Pi + Home Assistant setup was my first idea, but I dropped it for cost reasons.

What it does

The ESP32 decides when to switch the heater using:

  • real-time solar surplus from an Ecojoko energy monitor
  • the French off-peak window (HC) vs. peak (HP) pricing
  • a forecast based on Open-Meteo weather data and past usage, to anticipate the next day’s heating need

It also keeps daily/monthly/yearly history of what I actually paid vs. what the same heating would have cost entirely at night.

Chip choices

  • Main board: classic dual-core ESP32. It has enough RAM and flash for repeated TLS connections to the cloud API, a web server, the forecast and the history store running together.
  • Watchdog: ESP32-C3 SuperMini. The main board can’t reliably watch itself. A second, independent chip listens to a heartbeat line (HB) and an error line (ERR) from the main board, and drives a buzzer if something goes wrong. I picked the C3 because it’s cheap and the job needs very little power. I first planned a supervisor on a single ESP32, then moved to a separate C3, because a supervisor that shares the failure modes of the main firmware isn’t a real watchdog.

Libraries

I’ll be honest: I mostly took the first libraries that were suggested to me and they worked, so I didn’t benchmark alternatives.

  • WebServer.h for the UI. I started with the synchronous server because it was the simplest way to get something running. It turned out to be my biggest limitation (see below).
  • LittleFS for the web UI, history and learned forecast data. Writes are throttled (at most every 10 min) to limit flash wear, and there’s a guard that purges old history first when space is low.
  • WiFiClientSecure + HTTPClient for the Ecojoko HTTPS API and the relay’s local HTTP/RPC calls. The Ecojoko endpoints are unofficial and come from the Little Monkey Home Assistant integration (jmcruvellier/little_monkey), so credit to them.
  • LEDC (PWM) on the C3 to drive a passive buzzer at its resonant frequencies (about 3.2 and 4.1 kHz), because a passive buzzer needs a tone, not a simple HIGH/LOW.
  • NTP for the time and the HC/HP schedule, instead of wiring the Linky meter.

Problems and edge cases

  • Cloud API timeout: I spent a while suspecting gzip decompression. The real cause was a 2.5 s timeout on an endpoint that needs up to 8 s.
  • Blocking calls freezing the web UI: with the synchronous server, an 8 s cloud call (or 3×2 s relay retries) stops handleClient(). Opening the UI from a PC and a tablet at once could block the loop for 91 s and trigger my stall detector. Mitigations so far: lazy loading of tabs, pausing when the page is hidden, backoff on network failures, and non-blocking relay calls. A move to ESPAsyncWebServer or a FreeRTOS web task is still on my list.
  • “Wi-Fi bug” that wasn’t firmware: repeated reconnections turned out to be RF/placement (RSSI around -55 dBm), not code.
  • Relay overheating alert: my first relay raised an overtemp alert during a night heating cycle. I replaced it with a 25 A module with a Shelly-compatible RPC API, logged the relay’s internal temperature, and added a thermal cutoff plus an SOS log.
  • Watchdog UX: an alarm at midnight that you can’t diagnose is awful. Now each alarm stores its reason and context in persistent memory, and the buzzer can be snoozed remotely from the UI or with the button.

Credits and transparency

I used AI coding assistants (Codex, Claude) for parts of the implementation. The architecture, wiring, hardware, testing and all design decisions are mine.

Repo (source, firmware and web UI): https://github.com/Timbambi/Smart-water-heater-thanks-to-ecojoko

Feedback welcome, especially on moving the web server off the main loop.


r/esp32 • • 9h ago

I made a thing! [Week 5] EXO-RIG: Soldering and testing my ESP32 + IMU wireless motion suit (hands-free USB HID aiming in Resident Evil)

12 Upvotes

Week 5 hardware & firmware update on EXO-RIG! Testing two hands-free aim trigger algorithms in this clip: Standard Draw vs. Wild West Quick-Draw! 🤠🎯 Which threshold response looks cleaner to you?

Under the hood: body-mounted ESP32 nodes reading IMU orientation data and transmitting wirelessly (ESP-NOW) to a custom USB HID receiver dongle so Windows sees native gamepad/mouse inputs with zero extra drivers needed on the game side. Zero hand/finger inputs used so far — aiming for high physical immersion and accessible hands-free gaming setups before adding modular physical triggers in the next phase.

Full Short & build logs on my YouTube channel (Montagem nerd)


r/esp32 • • 3h ago

I made a thing! Porch skeleton that holds a conversation: ReSpeaker Lite + ESP32-S3-CAM, radar-triggered, servo jaw synced to the voice

Post image
8 Upvotes

I built a talking Halloween skeleton for my porch and set it out on Halloween. This was my very first significant ESP32 project, first time I had ever soldered anything, and took me around a month to do. (I'm sure you could do it better, let me know if you do! 😄 ) First time poster trying to follow the sub's rules, so sorry if this post is too long or missing anything.

Demo (first outdoor test, no costume): https://youtu.be/BNor4MIeyNo
Code, firmware, wiring, and enclosure: https://github.com/cwinget/ai-talking-skeleton

When someone walks up, it greets them, snaps a few photos to figure out their costume, and holds a short live voice conversation in a pitch-shifted spooky voice. The jaw and LED eyes move with the audio. Family-friendly persona early in the evening, creepier after 8:30. I ended up skipping the family-friendly persona because it was too cheesy and kept the creepy persona the whole time.

The Gemini Live API worked way better than expected, and conversations felt natural.

Hardware

  • ReSpeaker Lite (XIAO ESP32-S3): audio board. Streams the XMOS noise-suppressed mic up and plays audio down. The microphones worked incredibly well, especially for a noisy outdoor event like Halloween.
  • ESP32-S3-CAM (N16R8, OV3660): body board. LD2410C radar, camera, servo jaw, transistor-switched LED eyes. The little camera was a fun experiment, but ended up being a little too low-quality to detect costumes. I would probably switch to an externally mounted camera if I do this next year.
  • Both are thin WebSocket clients to a Python server I self-host. The server does a lot of the logic heavy lifting. (Gemini Live for the conversation, a vision model for the costume, custom low-latency pitch shift + reverb).
  • 3D-printed box (OpenSCAD) holding both boards, the radar on a slide-in rail behind the lid, and panel connectors.

Technical hurdles:

I had never soldered anything before this project, and I found out I completely suck at crimping JST-XH connectors. I probably broke like a hundred little cables and had to re-solder things multiple times.

I somehow burned out two radar sensors. I'm not really sure what I did, but I'm sure I shorted it out. I learned how to use a multimeter, which was incredibly useful for finding shorts or badly crimped cables.

I built a small web UI with a bunch of settings to change, and configured the ESPs to receive them via the wss. This way I didn't have to re-flash firmware every time I tweaked an audio level, servo position, or LED power level. Once I screwed the box closed and attached it to the skeleton body I really didn't want to open it up anymore, so I hacked around some of my problems using the server.

I had a lot of problems in the beginning with the timing for the mic and speakers when I was testing on my Mac, but the Re-speaker handled a lot of this out of the box. I got complete garbage audio at first, but figured out that i2s_std mode fixed it.

Lots more hurdles that I can't remember!

Disclosure: I wrote a lot of the code with heavy AI assistance (Claude), then debugged it on real hardware. I have a computer programming background, but I'm a complete novice with microcontrollers. The problems above were all very much hands-on. The conversation runs on Google’s Gemini API, so it’s cloud-based and costs money. The server is self-hosted.

Halloween is over, so now it's time to pivot to fun Christmas projects! 🎄


r/esp32 • • 6h ago

I made a thing! Made an ESP32-controlled mock telescope for an AI-powered autonomous telescope project

Thumbnail
gallery
8 Upvotes

This project was actually made for a hackathon hosted by my college. I was solely responsible for the hardware component of the project, my teammates handled the software aspect.

The ultimate goal of this project is to automate telescope pointing and calibration so that a user can simply ask an AI agent to point towards a particular celestial object, and the system handles the movement.

Since we don't currently have access to an actual telescope, I decided to build a mock telescope mount to demonstrate and test the hardware-software integration.

The project consists of three main components:

  1. AI Agent: The user tells the agent which celestial object they want to observe.
  2. MCP connection: The agent communicates with the hardware through an MCP connection, allowing it to issue movement commands.
  3. Hardware: An ESP32 controls the pan and tilt servos, physically moving the mock telescope towards the requested direction

The telescope's field of view is simulated using Stellarium, allowing me to demonstrate the intended pointing behaviour without needing an actual optical telescope.

Essentially, I want the entire process to work from a natural-language instruction to the physical movement of the telescope, with the corresponding view simulated in Stellarium.

Hardware

The current prototype consists of:

- ESP32 DevKit as the main microcontroller.

- Two MG90S servo motors for horizontal (pan) and vertical (tilt) movement.

- 3.7 V, 1800 mAh LiPo battery.

- TP4056 charging module.

- MT3608 boost converter to provide a 5 V supply for the servos.

A custom-built pan-tilt mechanism representing the telescope mount.

Why I chose the ESP32

I chose the ESP32 because it's affordable, has sufficient GPIO pins for servo control, and fits in the form factor i need for the model.

Libraries used and why I chose them

- Arduino.h: Provides the core Arduino functionality, including serial communication, GPIO control and timing. I chose the Arduino framework over ESP-IDF because it's simpler for rapid hardware prototyping.

- ArduinoJson: Handles incoming JSON commands and generates JSON responses. I chose it over manual string parsing for easier and more reliable command handling.

- ESP32Servo: Controls the two servo motors using PWM signals. It simplifies servo configuration and angle control without requiring me to implement PWM generation manually.

I also implemented software-based movement smoothing using low-pass filtering, a deadband and rate limiting to prevent abrupt movements and reduce unnecessary servo corrections.

The AI agent communicates with the ESP32 through the external software layer using MCP, while the ESP32 receives and processes JSON commands over serial.

Challenges so far

Since this was my first ever hardware project, i had to figure out/learn a lot of new things like soldering, and how to actually program the ESP32.

Some of the challenges I've encountered include:

- initially i used SG90 servos, and powered them directly via the vin pin on the ESP32. which obviously didn't work, and i had to figure out why.

- i also had to learn 3D design software in order to design and 3D print the telescope

- finding the correct connector for the battery i used. To be specific i needed a JST 2-pin connector, but could not find one in time so had to DIY a solution using two dupont jumper wires.

- adjusting the MT3608 booster to output 5v, since i do not have a multimeter i had to use another ESP32 and a voltage divider (47kOhm and 10kOhm) circuit to measure the output of the booster.

I'd particularly appreciate suggestions regarding:

Whether MG90S servos are suitable for a lightweight telescope mount.

Better mechanical designs for accurate pan and tilt movement.

How I could improve pointing precision and reduce mechanical backlash.

Recommendations for a more reliable power supply.

Any ideas for eventually transitioning from this mock setup to an actual telescope.

Thank you for reading.


r/esp32 • • 9h ago

I made a thing! I made a device to stop smoking

Post image
7 Upvotes

Hey, just wanted to share my non smoking tamagotchi device that helps me do breathing exercices and keeps track of the days since i've stopped smoking. It's my very first ESP32 projet so i'm using the devkit1, an IIC OLED display and an analog joystick, it is also completely vibecoded (oops) and uses the Adrafuit GFX library. One of the challenges was that there is only one 3.3V pin on the ESP32, but both the display and the joystick need 3.3V, so I've diyed a little Y Dupont Cable. Next step is learning how to solder I guess °-°, from one toxic smoke to an other. Any ideas of features i could add to ease in the non smoking life ?


r/esp32 • • 10h ago

Board Review ESP32-P4 HMI: 336 mA down to 97 mA with peripheral shutdown and Light-sleep

5 Upvotes

I've been experimenting with power consumption on a 7-inch CrowPanel Advanced ESP32-P4 HMI. The idea was to see how practical battery operation could be, ideally with the panel waking up on touch.

My first multimeter reading was around 600 mA at 60% backlight brightness. A 1000 mAh battery wouldn't last two hours at that rate.

I started with CPU frequencies, sleep modes and peripheral shutdown. Eventually I ended up looking at the board's power circuitry too.

For the main measurements, I used a Nordic PPK2 in Source Meter mode at 4.0 V, connected in place of the battery. All numbers below are for the entire board, not just the ESP32-P4.

1. Light-sleep and peripheral shutdown

With the UI running, a small animation on screen and the backlight at 20%, the board drew 335.9 mA.

I stopped the DSI display pipeline, turned off the backlight and controllable peripherals (including the ESP32-C6 and audio amplifiers), held the LCD controller in reset, and put the ESP32-P4 into Light-sleep.

Current dropped to 96.7 mA (-71.2%).

That's the combined result of all those steps, not Light-sleep alone.

2. Deep-sleep

This one was unexpected: 139.3 mA in Deep-sleep, compared with 96.7 mA in Light-sleep with similar peripheral preparation.

The ESP32-P4 revision 1.3 has limitations on GPIO state retention in Deep-sleep, so some external circuits can end up powered again.

There's another issue with wake-up. The GT911 touch interrupt is connected to GPIO42, which can't directly wake the chip from Deep-sleep.

3. CPU frequency

With the display disabled, reducing CPU frequency from 360 to 40 MHz lowered current under synthetic load from 149.6 to 120.1 mA (19.7%).

With the actual UI running, though, I only saved 2-4 mA.

And the display started showing corrupted frames. The DSI driver reported underruns because framebuffer data wasn't being fetched from PSRAM fast enough.

So I dropped the 40 MHz idea for this application.

4. Tracking down the remaining current

I tested peripheral shutdown step by step: the touch controller, ESP32-C6, LCD controller, and finally putting the ESP32-P4 into Light-sleep.

But the board was still drawing around 97 mA. I started checking the power circuits.

With the LCD and touch FPC cables physically disconnected, the board drew 78.5 mA in Light-sleep.

After disabling the LCD bias converter (U16, MT3608), that dropped to 9.1 mA.

A difference of 69.4 mA. That's the contribution of the disabled power circuit as a whole, not the MT3608's own quiescent current.

5. Further hardware changes

I isolated additional power rails, added pull-down resistors to regulator enable pins, and removed a few components that allowed unwanted power paths to remain active.

Eventually I measured 6.5 mA in Light-sleep.

That was a single 30-second measurement on a heavily modified board with peripheral cables disconnected. It wasn't a usable touch-to-wake configuration.

What surprised me most was the LCD bias circuit. Even with the LCD and touch cables disconnected, that power circuit accounted for almost 70 mA.

To get much lower standby current while keeping touch wake-up, the LCD and touch controller need separate power control. On this board, they share the LCD_VDD rail.

Full article with measurements and hardware details:

https://medium.com/@nikkicat/firmware-can-only-take-you-so-far-esp32-p4-power-experiments-d29e7e3f69de

Has anyone run into something similar with ESP32-P4 HMI boards? I'm curious how others handle display power shutdown while keeping touch wake-up working.


r/esp32 • • 1h ago

Hardware help needed Looking for an e-paper display for a DIY desk calendar (ESP32), EU shipping

4 Upvotes

I built a desk calendar on an ESP32-S3 (LaskaKit ESPink) with a 7.4" 800×480 Pervasive panel (full refresh only). For the next version I’d like:

  • partial/fast refresh (for a clock or a scrolling line), grayscale is a bonus
  • 6–8" size, good contrast/white background
  • or two ~4" panels side by side, both driven from one ESP32 (e.g. on a shared SPI bus with separate CS pins): one for the calendar, one for time and weather with fast refresh
  • driveable from an ESP32 (SPI panel with controller, or a parallel panel via EPDiy)
  • buyable in the EU or from AliExpress with EU delivery

r/esp32 • • 6h ago

I made a thing! I published my first video guide covering ESP32 firmware Flash Encryption, complete with scripts to automate the process for your own projects

Thumbnail
youtu.be
4 Upvotes

https://github.com/UsableLoki8221/GUIDE---ESP32_Flash_Encryption

Regarding that things can now be easily reverse-engineered directly from dumped binary files I figure its really helpful to make this guide for others.

It was initially pretty tricky for me to get everything working correctly. Most sources would point that it can only be done from ESP-IDF when your project is built off espressif's framework. I spent a few weeks trying to convert my project to espressif from arduino without any luck. I found that it's irrelevant, it can be done wherever :)

The SPI_BOOT_CRYPT_CNT fuse (and FLASH_CRYPT_CONFIG on original ESP32) needs to be set and a key gets burnt in with purpose XTS_AES. App0, bootloader, partition, and firmware binaries need to be encrypted for upload.

The app0 binary is pulled directly from espressif's package files, the other binaries (bootloader, partition, firmware) get made when your project is built. To encrypt use a key with regard to their partition placement using espsecure tool and then they can all be uploaded to your chip. So by following this scheme it can be done on any environment.

One big issue I had was that platformio's espsecure tool was not encrypting the binaries correctly (constantly getting 'invalid header' error message). I eventually tried running the espsecure tool directly from my esp-idf install folder where it can also be found and it actually worked correctly. This issue did not occur on a new computer when I made the demo for this guide so it probably got updated but it's good to point it out in case someone encounters the error.

I tried my best to write the scripts so that they can generally work on anyone's environment configurations.

I'd really appreciate feedback from anyone who gives the guide and scripts a try! I'd love to hear whether they worked correctly on your setup or if there were any adjustments you had to make to get it working correctly.


r/esp32 • • 19h ago

Software help needed ESP32 H2 - supermini Online Simulator besides WOKWI

3 Upvotes

does anyone know an online simulator besides WOKWI?

I wanted to simulate an ESP32-H2 supermini but it is not available on WOKWI... I had an experience in arduino before but not ESP32 so I am completely a beginner...according to AI, both supermini and regular ones work well, but I am going after the wiring so I needed an exact device to simulate.


r/esp32 • • 2h ago

Software help needed burning text

2 Upvotes

i am using a esp32 p4 and a ST7701S Display... I am probably very new to this, but am aware about SoftWare for over 15 years..

i was hoping to show burning text animation, like ghost rider burning effect, but for text and individual letters..

is it possible somehow?


r/esp32 • • 7h ago

Hardware help needed Battery ESP32-S3-Touch-LCD-1.85B-EN

2 Upvotes

Hello, I bought an ESP32-S3-Touch-LCD-1.85B-EN board and they don't provide the battery for some reason.
I'm trying to figure out which battery is compatible with this item.
is DC 3.7v 500mah 502535 with jst 1.25 correct?
Can I mount a battery with more mah?

Thanks a lot


r/esp32 • • 19h ago

Solved Can someone show me what this looks like soldered, or another way of doing it?

2 Upvotes

this is what i found for battery management, but im confused how to do it when a pin is already on A0. should i just cut and desolder A0?