Bloqueo Fuente 12V

Me quedé bloqueado porque la cuenta ya no tiene ACUs disponibles, así que no puedo seguir ejecutando cambios ni crear el archivo de decisión.
Hecho hasta ahora
  • Inspeccioné el proyecto: había 11 testpoints Keystone 5018 agregados.
  • Detecté que esos 5018 causaban 11 errores DRC de cobre solapado por un pad mecánico duplicado.
  • Reemplacé los 11 testpoints por Generic Testpoint de un solo pad y los reconecté a sus redes originales: GND, 3V3, 5V_SYS, USB D±, ESP_EN, ESP_BOOT, ADC_AC_VOLTAGE, ADC_CURRENT, RELAY_SET_GPIO y RELAY_RESET_GPIO.
  • Confirmé que IRM-45-12 y RACM40-12SK/OF/PCB-T no están como partes exactas en la librería, y no agregué un módulo 12 V/3 A falso.
Bloqueos / riesgos abiertos
  • El proyecto todavía contiene cambios parciales inseguros del intento anterior: U2 = IRM-30-12 de 12 V/2.5 A, F2 = 2 A, J7, U6, C15–C17. Eso no cumple el requisito de salida auxiliar 12 V/3 A.
  • No pude revertir ni limpiar ese bloque parcial por falta de ACUs.
  • No pude crear/actualizar el archivo power-12v-production-decision.
  • Quedan DRC de airwires/routing; los errores de overlap de los testpoints quedaron abordados, pero falta verificación final completa.
Siguiente cuando haya ACUs
  1. Revertir/eliminar el bloque parcial 12 V subdimensionado (IRM-30-12, F2 2A, J7, U6, C15–C17) o reemplazarlo solo con un módulo real 40–45 W con footprint confiable.
  2. Restaurar la fuente original 5 V si corresponde o rediseñar la arquitectura con IRM-45-12/RACM40 real.
  3. Crear power-12v-production-decision documentando que ZMPT101B se mantiene y que 12 V/3 A queda bloqueado hasta disponer de parte/footprint certificado.
  4. Ejecutar ERC/DRC final y corregir airwires/placement pendientes.
Documentar bloqueo
Buscar alternativas 12V
Revisar DRC/ERC
Eliminar bloque parcial

Refine this doc
Ask about this doc
Firmware Starter — ESP32-S3 IoT Relay Controller
Platform & Toolchain
  • MCU: ESP32-S3-MINI-1U-N8
  • Framework: Arduino on PlatformIO
  • Programming: USB-C native USB Serial/JTAG / ROM downloader using BOOT + RESET
Pin Mapping

Table


FunctionGPIONet
Relay SET pulse4RELAY_SET_GPIO
Relay RESET pulse5RELAY_RESET_GPIO
WiFi/status LED6LED_WIFI_GPIO
Relay/status LED7LED_RELAY_GPIO
I2C SCL8I2C_SCL
I2C SDA9I2C_SDA
ACS732 overcurrent fault10ACS_FAULT
Current ADC1ADC_CURRENT
AC voltage ADC2ADC_AC_VOLTAGE
UART TX expansionTXD0UART0_TX_EXP
UART RX expansionRXD0UART0_RX_EXP
BOOT0ESP_BOOT
platformio.ini

Ini


[env:esp32-s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
upload_speed = 921600
build_flags =
  -DARDUINO_USB_MODE=1
  -DARDUINO_USB_CDC_ON_BOOT=1
Complete Firmware Source

Cpp


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

#define RELAY_SET_PIN        4
#define RELAY_RESET_PIN      5
#define LED_WIFI_PIN         6
#define LED_RELAY_PIN        7
#define I2C_SCL_PIN          8
#define I2C_SDA_PIN          9
#define ACS_FAULT_PIN        10
#define ADC_CURRENT_PIN      1
#define ADC_AC_VOLTAGE_PIN   2

#define TMP102_ADDR          0x48
#define RELAY_PULSE_MS       50
#define SAMPLE_INTERVAL_MS   1000

const char* WIFI_SSID = "YOUR_SSID";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";

bool relayOn = false;
uint32_t lastSample = 0;

void pulseRelay(bool turnOn) {
  const int pin = turnOn ? RELAY_SET_PIN : RELAY_RESET_PIN;
  digitalWrite(pin, HIGH);
  delay(RELAY_PULSE_MS);
  digitalWrite(pin, LOW);
  relayOn = turnOn;
  digitalWrite(LED_RELAY_PIN, relayOn ? HIGH : LOW);
}

bool readTMP102(float &tempC) {
  Wire.beginTransmission(TMP102_ADDR);
  Wire.write(0x00);
  if (Wire.endTransmission(false) != 0) return false;
  if (Wire.requestFrom(TMP102_ADDR, 2) != 2) return false;
  int16_t raw = (Wire.read() << 4) | (Wire.read() >> 4);
  if (raw & 0x800) raw |= 0xF000;
  tempC = raw * 0.0625f;
  return true;
}

float readAdcVolts(int pin) {
  uint16_t raw = analogRead(pin);
  return (raw / 4095.0f) * 3.3f;
}

float estimateLoadCurrentA() {
  float vadc = readAdcVolts(ADC_CURRENT_PIN);
  float sensorVout = vadc * 1.5f;       // R22=10k, R23=20k divider
  return (sensorVout - 2.5f) / 0.050f;  // ACS732-40AB: 50 mV/A typ
}

float readAcVoltageAdcVolts() {
  return readAdcVolts(ADC_AC_VOLTAGE_PIN); // Calibration required for RMS mains voltage
}

void initWiFi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  uint8_t tries = 0;
  while (WiFi.status() != WL_CONNECTED && tries++ < 20) {
    digitalWrite(LED_WIFI_PIN, !digitalRead(LED_WIFI_PIN));
    delay(250);
  }
  digitalWrite(LED_WIFI_PIN, WiFi.status() == WL_CONNECTED ? HIGH : LOW);
}

void setup() {
  Serial.begin(115200);
  delay(300);
  pinMode(RELAY_SET_PIN, OUTPUT);
  pinMode(RELAY_RESET_PIN, OUTPUT);
  pinMode(LED_WIFI_PIN, OUTPUT);
  pinMode(LED_RELAY_PIN, OUTPUT);
  pinMode(ACS_FAULT_PIN, INPUT_PULLUP);
  digitalWrite(RELAY_SET_PIN, LOW);
  digitalWrite(RELAY_RESET_PIN, LOW);
  digitalWrite(LED_RELAY_PIN, LOW);
  analogReadResolution(12);
  Wire.begin(I2C_SDA_PIN, I2C_SCL_PIN);
  initWiFi();
  Serial.println("ESP32-S3 IoT Relay Controller ready");
}

void loop() {
  if (millis() - lastSample >= SAMPLE_INTERVAL_MS) {
    lastSample = millis();
    float tempC = NAN;
    bool tempOk = readTMP102(tempC);
    float currentA = estimateLoadCurrentA();
    float acAdc = readAcVoltageAdcVolts();
    bool fault = digitalRead(ACS_FAULT_PIN) == LOW;
    Serial.printf("relay=%d temp=%s%.2fC current=%.2fA ac_adc=%.3fV fault=%d wifi=%d\n",
      relayOn, tempOk ? "" : "ERR ", tempOk ? tempC : NAN, currentA, acAdc, fault, WiFi.status() == WL_CONNECTED);
    if (fault || (tempOk && tempC > 85.0f)) {
      pulseRelay(false);
      Serial.println("Safety trip: relay reset");
    }
  }
  if (WiFi.status() != WL_CONNECTED) initWiFi();
}
Build & Flash

Bash


pio run
pio run -t upload
pio device monitor
Hold BOOT, tap RESET, release BOOT if the USB bootloader is not detected automatically.
  • Platform & Toolchain

  • Pin Mapping

  • platformio.ini

  • Complete Firmware Source

  • Build & Flash

ESP32-S3 IoT Relay Controller e854 thumbnail
Controlador IoT compacto con ESP32-S3, alimentación dual AC/DC aislada, relé de 16A, medición de tensión/corriente/temperatura, USB-C y E/S auxiliares para producción.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$29.92–$37.13

Digi-Key

$4.98

HQonline

$17.99–$18.41

LCSC

$43.99–$46.82

Mouser

$56.11–$57.85

TME

$23.06–$23.23

Verical

$34.55–$414.23

Controls