Public Project Sharing

One important constraint: the ESP32 cannot run directly from 5V, so I’ll add a 5V-to-3.3V regulator after the LM2596. Also, 36V is close to the LM2596’s 40V limit, so I’ll size the input capacitors/diode conservatively and flag it for protection review.
I added the requested KF350-3.5-2P 36V input connector plus the main power parts: STPS5L60U Schottky diode, 68uH inductor, LM2596 input/output capacitors, LD1117S33TR 3.3V regulator, and extra ESP32 3.3V bulk capacitance.
Open items:
  • The new parts are not wired yet because execution stopped due to no available ACUs.
  • The schematic currently has floating-pin ERC warnings on the newly added connector, diode, LDO, inductor, and capacitors.
  • 36V input is close to the LM2596 40V limit, so input protection/TVS should still be added or reviewed.
Suggested next steps once ACUs are available:
  1. Wire J1 36V input to LM2596 VIN/GND and support capacitors.
  2. Wire LM2596 OUTPUT → diode/inductor → 5V rail and FEEDBACK.
  3. Wire 5V → LD1117 → 3.3V rail for ESP32-WROOM.
  4. Run ERC and fix remaining warnings.
Protect, wire, review
Add input protection
Wire power rails
Run ERC/DRC
Check LM2596 values

Refine this doc
Ask about this doc
Firmware Starter — ESP32-WROOM-32
Platform & Toolchain
  • MCU: ESP32-WROOM-32 (U1)
  • Framework: Arduino for ESP32
  • Build system: PlatformIO
  • Purpose: Drive the LM2596_ONOFF net through GPIO23 so the LM2596T-5.0 (U2) can be disabled/enabled by firmware.
Pin Mapping

Table


FunctionESP32 PinSchematic NetConnected ToDirectionNotes
LM2596 off/on controlGPIO23 / U1:IO23ESP32_LM2596_OFF_CTRLR1LM2596_ONOFFU2:~ON-OFF and R2 pull-downOutputLOW = regulator ON; HIGH = regulator OFF. R2 holds ON by default.
ESP32 enableU1:ENESP32_ENR3 pull-up + C2 delayInputHardware boot support; firmware does not drive this pin.
ESP32 supplyU1:VDD3V3_ALWAYS_ONAlways-on 3.3V railPowerESP32 must stay powered if it needs to turn LM2596 back on.
GroundU1:GND pinsGNDCommon ground with LM2596PowerRequired shared reference for GPIO control.
platformio.ini

Ini


[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
Complete Firmware Source — src/main.cpp

Cpp


#include <Arduino.h>
#include <WiFi.h>

// From schematic: U1 IO23 -> R1 -> LM2596_ONOFF -> U2 ~ON-OFF
#define LM2596_OFF_CTRL_PIN 23

// LM2596T-5.0 ON/OFF truth table from TI datasheet:
// ON/OFF LOW or open  = regulator ON
// ON/OFF HIGH         = regulator OFF
void lm2596SetEnabled(bool enabled) {
  digitalWrite(LM2596_OFF_CTRL_PIN, enabled ? LOW : HIGH);
}

void setup() {
  Serial.begin(115200);
  delay(200);

  pinMode(LM2596_OFF_CTRL_PIN, OUTPUT);

  // Safe default: keep the 5V regulator ON at boot.
  lm2596SetEnabled(true);

  Serial.println("ESP32 LM2596 control firmware started");
  Serial.println("Commands: '1' = LM2596 ON, '0' = LM2596 OFF");
}

void loop() {
  if (Serial.available() > 0) {
    char cmd = Serial.read();

    if (cmd == '1') {
      lm2596SetEnabled(true);
      Serial.println("LM2596 enabled: ON/OFF driven LOW");
    } else if (cmd == '0') {
      lm2596SetEnabled(false);
      Serial.println("LM2596 disabled: ON/OFF driven HIGH");
    }
  }
}
Build & Flash

Bash


pio run
pio run -t upload
pio device monitor
Important Bring-Up Note
The ESP32 must be powered from 3V3_ALWAYS_ON, not from the LM2596 output it is controlling, otherwise it will turn itself off and cannot turn the regulator back on without an external reset/power cycle.
  • Platform & Toolchain

  • Pin Mapping

  • `platformio.ini`

  • Complete Firmware Source — `src/main.cpp`

  • Build & Flash

  • Important Bring-Up Note

Assets

No assets added.

poe 5v lm2596t

poe 5v lm2596t thumbnail
Welcome to your new project. Imagine what you can build here.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$3.26–$4.09

Digi-Key

$0.15

HQonline

$5.48

LCSC

$3.34

Mouser

$7.03

TME

$1.32

Verical

$2.92–$5.82

Controls