Bestilt før kl. 14.00 på hverdage = afsendt samme dag 30 dages fortrydelsesret 1 års garanti
← Terug til oversigten

Tilslutningsdiagram og kodeeksempel

Sådan tilslutter du Justerbar Step-down Module 4~38V 5A 96% Høj Effektivitet XL4015 til en Arduino UNO eller ESP32, med en eksempelsketch, du kan uploade med det samme.

LM2596 spændings-nedkonvertermonitor

Dette projekt forsyner LM2596 step-down-modulet fra Arduinoens 5V-rail og måler den regulerede udgangsspænding på analog pin A0. Justér det indbyggede potentiometer med en lille skruetrækker for at se spændingsændringerne i realtid, som udskrives til Serial Monitor (hold udgangen under 5V).

Tilslutningsdiagram: Justerbar Step-down Module 4~38V 5A 96% Høj Effektivitet XL4015 på en Arduino UNO
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: Justerbar Step-down Module 4~38V 5A 96% Høj Effektivitet XL4015 på en Arduino UNO
Tilslutningstabel · Klik for at forstørre
LM2596_Voltage_Step_Down_Monitor.ino · kompileret og testet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : LM2596 Voltage Step-Down Monitor
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Adjustable Step-down Module 3-40VDC 1.5-35VDC LM2596
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

const int voltagePin = A0;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for serial port to connect
  }
  Serial.println(F("LM2596 Step-Down Voltage Monitor"));
  Serial.println(F("Turn the onboard trimmer to adjust the output voltage (0-5V)."));
}

void loop() {
  int rawValue = analogRead(voltagePin);
  float voltage = rawValue * (5.0 / 1023.0);

  Serial.print(F("ADC Value: "));
  Serial.print(rawValue);
  Serial.print(F(" | Output Voltage: "));
  Serial.print(voltage, 2);
  Serial.println(F(" V"));

  delay(500);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Forsyning af ESP32 med LM2596 buck-konverter

Før du tilslutter ESP32, skal du bruge et multimeter til at justere LM2596's trimmerpotentiometer, indtil OUT+ viser præcis 5.0V. Modulet nedtrapper effektivt 12V-indgangen til en stabil 5V-udgang for at forsyne ESP32 via VIN og GND. Når den er tilsluttet, starter ESP32 op, blinker med sin indbyggede status-LED og sender heartbeat-meddelelser via Serial.

Tilslutningsdiagram: Justerbar Step-down Module 4~38V 5A 96% Høj Effektivitet XL4015 på en ESP32 DevKit V1
Tilslutningsdiagram · Klik for at forstørre
Tilslutningstabel: Justerbar Step-down Module 4~38V 5A 96% Høj Effektivitet XL4015 på en ESP32 DevKit V1
Tilslutningstabel · Klik for at forstørre
Powering_ESP32_with_LM2596_Buck_Converte.ino · kompileret og testet
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : Powering ESP32 with LM2596 Buck Converter
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Adjustable Step-down Module 3-40VDC 1.5-35VDC LM2596
 *  Libraries : none (built-in)
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

// LM2596 Step-Down Buck Converter ESP32 Power Demo
// Note: Always adjust LM2596 output to 5V before connecting to VIN!

const int LED_PIN = 2; // Onboard LED

void setup() {
  Serial.begin(115200);
  pinMode(LED_PIN, OUTPUT);

  Serial.println("LM2596 Step-Down Buck Converter Demo");
  Serial.println("ESP32 successfully running on regulated 5V power!");
}

void loop() {
  // Turn LED on
  digitalWrite(LED_PIN, HIGH);
  Serial.print("Uptime: ");
  Serial.print(millis() / 1000);
  Serial.println(" s | Power Status: OK (LED ON)");
  delay(500);

  // Turn LED off
  digitalWrite(LED_PIN, LOW);
  delay(500);
}

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Set for nylig

Plastik kabinet - sort 200 x 110 x 65 mm

Plastik kabinet - sort 200 x 110 x 65 mm

€ 11,95
Peltier Modul 12V 27W 30x30mm TEC1-12703

Peltier Modul 12V 27W 30x30mm TEC1-12703

€ 5,70
Marble Wheel Lift til Marblelous kuglebane

Marble Wheel Lift til Marblelous kuglebane

€ 79,00
Se
farvet hætte til trykknap ot3321 RØD

farvet hætte til trykknap ot3321 RØD

€ 0,65