PCB Design for Smart Tee Marker Robot


맞아요. 사진 기준으로 보니 기존 J_BU01은 잘못 작았습니다.
수정 완료:
  • J_BU012×12 소켓 → 2×18, 2.54 mm 피치 female socket으로 교체했습니다.
  • 레이아웃에서도 새 2×18 소켓을 다시 배치했습니다.
  • 기존 BU01 신호 연결은 보존했고, 추가된 핀들은 일단 No Connect 처리했습니다.
  • Project Specification에도 이 변경을 기록했습니다.
사진에서 확인되는 핵심:
  • 양쪽 긴 헤더가 각 18핀, 총 36핀
  • 따라서 현재 보드에는 NodeMCU BU-01용으로 2×18 소켓이 들어가야 맞습니다
  • 실제 보드 길이는 대략 18핀 × 2.54 mm 기준으로 헤더 길이만 약 43.2 mm, 전체 모듈 길이는 USB/안테나 포함 더 큽니다.
주의: 사진만으로는 정확한 핀 번호 순서까지 100% 확정하기 어렵습니다. 지금은 소켓 크기/핀 수를 맞췄고, 논리 연결은 기존 매핑을 유지했습니다. 제작 전에는 BU01의 각 실크 라벨이 Pin_1~Pin_36 중 어디에 해당하는지 한 번 더 확정해야 합니다.
내가 공유한 사진에도 있듯이 이 2*18 핀이 저렇게 붙어있지 않아. 두 핀들 사이의 간격이 13핀 만큼 떨어져 있어.
맞습니다. 사진의 NodeMCU BU-01은 2×18 ‘좁은 듀얼로우’가 아니라, 1×18 헤더 두 줄이 넓게 떨어진 NodeMCU 스타일입니다. 현재 단일 2×18 소켓을 두 개의 1×18 소켓으로 바꾸고, 행 간격을 약 13핀 피치(≈33 mm) 기준으로 배치하겠습니다.
맞습니다. 제가 방금 확인한 내용대로, 현재 보드의 J_BU01은 아직 단일 2×18 좁은 듀얼로우 소켓 기준이라서 사진 속 NodeMCU BU-01 보드와 맞지 않습니다.
현재까지 완료된 상태:
  • 기존 2×12 BU01 소켓은 2×18 소켓으로 바꿨습니다.
  • 하지만 사용자가 지적한 것처럼, 이건 여전히 “두 줄이 붙어 있는 2×18” 형태입니다.
  • 사진 속 BU-01은 1×18 핀헤더 두 줄이 넓게 떨어져 있는 구조입니다.
  • 두 줄 사이 간격은 사용자가 말한 대로 약 13핀 피치 ≈ 13 × 2.54 mm = 33.02 mm로 봐야 합니다.
남은 수정 작업:
  1. 현재 J_BU01 단일 2×18 소켓 제거
  2. J_BU01_L, J_BU01_R 같은 1×18 female socket 2개로 교체
  3. 두 소켓 사이 중심 간격을 약 33 mm로 배치
  4. 기존 BU01 신호들을 새 좌/우 소켓 핀으로 재배선
  5. BU01 사진 기준으로 핀 라벨 방향 재확인
  6. ERC 및 레이아웃 검토 재실행
중요: 지금은 실행 크레딧이 소진되어 실제 수정 작업을 더 진행할 수 없습니다. 다음 실행에서 바로 위 작업부터 이어가면 됩니다.
헤더 분리 배치
핀 방향 검증
소켓 재매핑
ERC/DRC 확인

J_CHG
J_ESP_USB
U_LDO
U_L293D
Firmware Starter — Smart Tee Marker Robot Controller
Platform & Toolchain
  • MCU programmed on this PCB: ESP32-WROOM-32E-N16
  • Framework: Arduino for ESP32
  • Build system: PlatformIO
  • Functional link MCU: BU01 module internal STM32F103 communicates over UART2.
Pin Mapping

Table


FunctionESP32 GPIONetDirectionNotes
BU01 UART RX into ESP32GPIO16ESP_RXInputESP32 Serial2 RX receives BU01 U1TX/PA9
BU01 UART TX from ESP32GPIO17ESP_TXOutputESP32 Serial2 TX drives BU01 U1RX/PA10
USB-UART RXGPIO3/RXD0ESP_U0RXInputCH340C TXD to ESP32 UART0 RX
USB-UART TXGPIO1/TXD0ESP_U0TXOutputESP32 UART0 TX to CH340C RXD
BOOTGPIO0ESP_IO0_BOOTInput strapPull-up plus BOOT button / auto-reset transistor
Enable/resetENESP_ENInputPull-up, 1uF delay cap, reset button, auto-reset transistor
BU01 module-side firmware-relevant nets: M1_PWM, M2_PWM, MDIR_SER, MDIR_SRCLK, MDIR_LATCH, LED_SER, LED_SRCLK, LED_LATCH, IR_OUT, I2C_SCL, I2C_SDA, IMU_INT.
Dependencies & Project Setup

Ini


[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600
Complete Firmware Source

Cpp


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

// ESP32 schematic pins
#define BU01_UART_RX_PIN 16   // GPIO16/U2RXD <- ESP_RX <- BU01 U1TX/PA9
#define BU01_UART_TX_PIN 17   // GPIO17/U2TXD -> ESP_TX -> BU01 U1RX/PA10

#define BU01_BAUD 115200
#define USB_DEBUG_BAUD 115200
#define BU01_POLL_INTERVAL_MS 1000

const char* WIFI_SSID = "YOUR_SSID";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";
const char* UPLINK_URL = "http://192.168.1.100:8080/tee-marker";

HardwareSerial BU01Serial(2);
unsigned long lastPoll = 0;

void initWiFi() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  Serial.print("WiFi connecting");
  for (int i = 0; i < 30 && WiFi.status() != WL_CONNECTED; ++i) {
    delay(500);
    Serial.print('.');
  }
  Serial.println();
  if (WiFi.status() == WL_CONNECTED) {
    Serial.print("WiFi connected, IP=");
    Serial.println(WiFi.localIP());
  } else {
    Serial.println("WiFi not connected; continuing with UART bridge/debug only");
  }
}

void sendToUplink(const String& payload) {
  if (WiFi.status() != WL_CONNECTED) {
    initWiFi();
  }
  if (WiFi.status() == WL_CONNECTED) {
    HTTPClient http;
    http.begin(UPLINK_URL);
    http.addHeader("Content-Type", "application/json");
    int code = http.POST(payload);
    Serial.printf("HTTP POST code=%d\n", code);
    http.end();
  }
}

void setup() {
  Serial.begin(USB_DEBUG_BAUD);
  delay(200);
  Serial.println("Smart Tee Marker ESP32 uplink starting");

  BU01Serial.begin(BU01_BAUD, SERIAL_8N1, BU01_UART_RX_PIN, BU01_UART_TX_PIN);
  initWiFi();
}

void loop() {
  while (BU01Serial.available()) {
    String line = BU01Serial.readStringUntil('\n');
    line.trim();
    if (line.length() > 0) {
      Serial.print("BU01> ");
      Serial.println(line);
      String payload = String("{\"source\":\"bu01\",\"data\":\"") + line + "\"}";
      sendToUplink(payload);
    }
  }

  unsigned long now = millis();
  if (now - lastPoll >= BU01_POLL_INTERVAL_MS) {
    lastPoll = now;
    BU01Serial.println("STATUS?");
  }
}
Build & Flash Instructions
  1. Install PlatformIO.
  2. Hold BOOT if auto-reset fails, then run: pio run -t upload.
  3. Open monitor: pio device monitor -b 115200.
  4. Confirm UART traffic from the BU01 module appears as BU01> lines.
Notes
  • BU01 pin order is represented with a generic 2x12 socket and must be verified before final PCB layout.
  • BU01 internal STM32 firmware is outside this ESP32 starter file; use the listed BU01 nets for STM32 firmware pin mapping.
  • Platform & Toolchain

  • Pin Mapping

  • Dependencies & Project Setup

  • Complete Firmware Source

  • Build & Flash Instructions

  • Notes