Skip to the content
PCBKitNew board
2 layers41.5 × 63.5 mmShiled esp32 officeBot, the printed circuit board in 3D

Shiled esp32 officeBot

loueydaly/OfficeBot

OfficeBot is a connected indoor delivery and task-assignment robot prototype. An ESP32 controller receives employee delivery requests over Wi-Fi and MQTT, displays the robot state on a 16x2 I2C LCD, and exchanges…

Size
41.5 × 63.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
41
Pads
59
Tracks, vias
33, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
25 Sep 2026
Updated
25 Sep 2026

Overview

Shiled esp32 officeBot is an open-source printed circuit board by loueydaly, from the loueydaly/OfficeBot repository on GitHub. It is a 2-layer board of 41.5 × 63.5 mm with 10 parts on 41 nets, routed with 33 tracks and 0 vias.

It is built around the NODEMCU-32SLUA. Its parts include 5 resistors, 2 connectors, 1 capacitor, 1 IC and 1 diode. It belongs with the ESP32 and ESP8266 boards of this library.

Main components

1

README

README.md

OfficeBot

OfficeBot is a connected indoor delivery and task-assignment robot prototype. An ESP32 controller receives employee delivery requests over Wi-Fi and MQTT, displays the robot state on a 16x2 I2C LCD, and exchanges movement commands and status frames with a dedicated STM32 motion controller over UART.

The repository contains the controller firmware, the STM32 communication interface, the KiCad electronics project, and the current mechanical-project directory supplied with the internship project.

Project status

The checked-in firmware is an ESP32 controller and coordination layer. It is responsible for network communication, task parsing, user feedback, battery-state logic, and the serial protocol to the STM32. The actual motor and navigation implementation is expected to run on the STM32 side; this repository contains the ESP32-side protocol endpoints but no STM32 firmware source.

The Conception_OfficeBot directory is included for project structure compatibility but is empty in the supplied source folder. The populated hardware design is in Pcb_OfficeBot.

System architecture

text
Web application / MQTT client
             |
             | officebot/command JSON
             v
     MQTT broker on local network
             |
             v
      ESP32 OfficeBot controller
      - Wi-Fi and MQTT
      - JSON command validation
      - employee coordinate mapping
      - LCD status display
      - button and LED interface
             |
             | UART2, 115200 baud, binary frames
             v
      STM32 motion controller
      - movement execution
      - odometry and motor control
      - status responses

Features

  • Wi-Fi connection with retry and timeout behavior
  • MQTT command subscription and status publication
  • JSON task parsing with required employee and action fields
  • Employee-name to office-coordinate mapping
  • Binary movement/status protocol between ESP32 and STM32
  • 16x2 I2C LCD feedback at address 0x27
  • Push-button task progress input with debounce
  • Built-in LED connection/status indication
  • Simulated battery level, low-battery warning, and charging state
  • Periodic STM32 status requests and position updates

ESP32 firmware

The firmware is in Code_OfficeBot/ and targets an ESP32 development board with PlatformIO and the Arduino framework.

PlatformIO configuration

The project target is esp32dev with these dependencies:

  • ArduinoJson 7.1 or newer
  • PubSubClient 2.8
  • LiquidCrystal_PCF8574 2.1 or newer

PlatformIO configuration is stored in Code_OfficeBot/platformio.ini. Downloaded libraries and build output are stored in .pio/ and are intentionally excluded from the repository.

ESP32 interfaces

InterfacePin or settingFunction
Wi-FiConfigured credentialsMQTT network connection
I2C SDAGPIO21LCD data
I2C SCLGPIO22LCD clock
LCD address0x2716x2 display
User buttonGPIO4, INPUT_PULLUPIncrement task progress
Status LEDGPIO2MQTT connection indication
STM32 UART RXGPIO16Receive STM32 status
STM32 UART TXGPIO17Send STM32 commands
STM32 baud rate115200UART protocol speed

Startup and main loop

At startup, the controller initializes Serial, GPIO, I2C, and the LCD, then connects to Wi-Fi and the MQTT broker. It initializes UART2 for the STM32 and shows an Office Robot status screen.

The main loop then:

  1. Reconnects Wi-Fi if the connection is lost.
  2. Reconnects MQTT if necessary and services the MQTT client.
  3. Polls incoming STM32 status frames.
  4. Handles the local button with 50 ms debounce.
  5. Decrements the simulated battery once every 30 seconds.
  6. Requests STM32 status and publishes robot status every 2 seconds.
  7. Delays for 10 ms before the next loop iteration.

MQTT protocol

The default configuration uses:

text
Broker: 192.168.1.100
Port:   1883
Client: officebot_esp32
Command topic: officebot/command
Status topic:  officebot/status

Replace the Wi-Fi credentials and broker address in Code_OfficeBot/src/main.cpp before building. Do not commit real network passwords or production broker credentials.

Command message

The controller subscribes to officebot/command and expects a JSON object containing an employee and an action:

json
{
  "employee": "Sara",
  "action": "goto"
}

Only the goto action is currently implemented. Invalid JSON, missing fields, empty employee names, and unknown actions are rejected and shown on the LCD.

Employee coordinate map

The current source maps names to integer office coordinates:

EmployeeXY
Ali53
Sara82
Ahmed37
Fatima105
Omar29
Unknown name11

Update getEmployeeCoordinates when the office map or employee list changes.

Status message

Every two seconds, the controller publishes a JSON status message on officebot/status:

json
{
  "currentX": 3,
  "currentY": 2,
  "targetX": 8,
  "targetY": 2,
  "taskProgress": 4,
  "batteryLevel": 96,
  "lastCommand": "ASSIGN Sara",
  "robotState": "MOVING",
  "isMoving": true,
  "timestamp": 123456
}

The battery value is currently simulated by subtracting one percent every 30 seconds. Replace this logic with a voltage/current measurement before using the value for real battery protection.

ESP32 to STM32 serial protocol

All frames use 0xFF as the start byte and 0xFE as the end byte.

Move command

The ESP32 sends an 11-byte movement frame:

text
Byte 0:  0xFF
Byte 1:  0x01 (MOVE)
Bytes 2-5:  X coordinate as 32-bit float
Bytes 6-9:  Y coordinate as 32-bit float
Byte 10: 0xFE

Coordinates are copied using the ESP32 native float representation. The STM32 endpoint must use the same byte order and floating-point format, or the protocol should be changed to an explicit integer/fixed-point representation.

Status request

The ESP32 requests status with:

text
0xFF 0x03 0xFE

Status response

The expected response is a 17-byte frame:

text
Byte 0:  0xFF
Byte 1:  0x03 (STATUS)
Bytes 2-5:   current X as 32-bit float
Bytes 6-9:   current Y as 32-bit float
Bytes 10-13: heading as 32-bit float
Byte 14: reserved/status byte
Byte 15: reached flag
Byte 16: 0xFE

The ESP32 updates its position and isMoving state from this response. It discards bytes before a start marker and ignores frames with invalid command or end markers.

LCD and local controls

The LCD displays initialization, Wi-Fi, MQTT, JSON validation, task, battery, charging, and robot-state messages. The button on GPIO4 increments taskProgress after debounce and refreshes the display. The LED on GPIO2 is on when MQTT is connected and off after connection failure.

PCB design

Pcb_OfficeBot/ contains the KiCad hardware project:

  • shiled_esp32_officeBot.kicad_pro: KiCad project settings
  • shiled_esp32_officeBot.kicad_sch: schematic
  • shiled_esp32_officeBot.kicad_pcb: PCB layout

The original project does not contain populated mechanical files in Conception_OfficeBot. Before manufacturing the board, run KiCad electrical rules checks, verify ESP32/module footprints, validate UART and I2C connector pinouts, and generate fabrication files from the current schematic and PCB layout.

Build and upload

  1. Install VS Code with PlatformIO, or install the PlatformIO CLI.
  2. Open Code_OfficeBot/ as the PlatformIO project directory.
  3. Set WIFI_SSID, WIFI_PASSWORD, and MQTT_SERVER in src/main.cpp.
  4. Connect an ESP32 development board.
  5. Build the firmware:
bash
pio run
  1. Upload it:
bash
pio run --target upload
  1. Monitor serial output at 115200 baud:
bash
pio device monitor -b 115200

Commissioning procedure

  1. Test the ESP32 with the motor controller disconnected.
  2. Confirm Wi-Fi association and MQTT broker reachability.
  3. Publish a test goto command and verify the LCD and serial logs.
  4. Test the STM32 UART with a logic analyzer or serial bridge.
  5. Confirm the STM32 acknowledges status requests and returns valid frames.
  6. Connect the motor controller with wheels lifted from the ground.
  7. Verify stop behavior, coordinate interpretation, and frame loss handling.
  8. Test low-battery and charging-state transitions with a controlled simulation.
  9. Perform final field tests only after checking the emergency-stop and motor-driver behavior.

Limitations and next steps

  • The STM32 movement firmware is not included in this repository.
  • The battery percentage is simulated, not measured.
  • The controller uses blocking Wi-Fi/MQTT retry loops and delays.
  • UART frames have start/end markers but no checksum or sequence number.
  • A corrupted payload can pass framing checks; add CRC and acknowledgements for a robust protocol.
  • Unknown employee names silently map to (1, 1); production software should reject them.
  • MQTT is configured without authentication or TLS in the default code.
  • The mechanical design directory is empty in the supplied project.
  • There is no automated hardware-in-the-loop test suite.

Repository layout

text
Code_OfficeBot/
  platformio.ini       PlatformIO target and dependencies
  src/main.cpp         ESP32 Wi-Fi, MQTT, LCD, button, battery, and UART logic
  stm32_navigation/    STM32 protocol/navigation support files, if present
  MQTT_COMMANDS.md     Command reference from the source project
Conception_OfficeBot/  Mechanical design directory from the supplied project
Pcb_OfficeBot/         KiCad schematic and PCB layout
README.md              Detailed project documentation

License

No separate project license has been added. Add an appropriate license before distributing or publishing the repository.

Parts

10
QtyValueFootprintReferences
5220Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1, R2, R3, R4, R5
1470ufCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
1Conn_01x05Connector_JST:JST_XH_B5B-XH-A_1x05_P2.50mm_VerticalJ1
1LEDLED_THT:LED_D3.0mmD1
1NODEMCU-32Sesp32 node mcu:MODULE_NODEMCU-32SU1
1Screw_Terminal_01x02TerminalBlock:TerminalBlock_Altech_AK300-2_P5.00mmJ2

Questions

How big is the Shiled esp32 officeBot PCB?

It measures 41.5 × 63.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Shiled esp32 officeBot use?

10 parts, built around the NODEMCU-32SLUA. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Shiled esp32 officeBot KiCad files?

From the loueydaly/OfficeBot repository on GitHub, at the commit this page was made from: the board is Pcb_OfficeBot/shiled_esp32_officeBot.kicad_pcb and its schematic Pcb_OfficeBot/shiled_esp32_officeBot.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Shiled esp32 officeBot design in my own project?

Its repository states no licence, so its author keeps all rights: ask loueydaly before reusing the design.

Similar boards

  • 2 layers50 × 100 mmCorrector de postura, the printed circuit board in 3D

    Corrector de postura

    agustin-arg/Posture

    Dispositivo electrónico de corrección de postura corporal

    23 parts5
  • 2 layers30.5 × 77.5 mmProyecto sensor temperatura, the printed circuit board in 3D

    Proyecto sensor temperatura

    unla-investigacion-desarrollo/ecosistema-iot

    Antes de desarrollar el sistema final, realizamos una etapa de exploración donde investigamos y experimentamos con las siguientes tecnologías:

    8 parts5
  • 2 layers91.4 × 76.2 mmArm pcb, the printed circuit board in 3D

    Arm pcb

    AashishKanted/Kratos_Arm

    2023-24 Code base for the robotic arm of the kratos rover

    24 parts2
  • 2 layers64.1 × 98.3 mmLora life jacket, the printed circuit board in 3D

    Lora life jacket

    bytecod3/lora-life-jacket

    Electronic device for life jackets with LORA data transmission

    17 parts2Apache-2.0
  • 2 layers65.5 × 51.8 mmIOT, the printed circuit board in 3D

    IOT

    hopkinskong/eie553-iot-hardware

    ESP32 IOT Smart Lock Device Hardware Schematic and PCB used in the course "EIE553 Security in Data Communication".

    14 parts2
  • 2 layers80 × 100 mmPcb v3, the printed circuit board in 3D

    Pcb v3

    2026MakerClub/PCB

    projects with pcb, custom and commonly used schemes, footprints...etc.

    21 parts1
  • 2 layers169 × 87 mmThermostat v2, the printed circuit board in 3D

    Thermostat v2

    ANTzacalie/termo-pro-esp32

    Full-featured smart thermostat built on the ESP32 platform.

    26 parts1CERN-OHL-P-2.0
  • 2 layers41.5 × 85 mmBase station, the printed circuit board in 3D

    Base station

    bytecod3/ear-tag

    Ear tag with LORA

    4 parts1MIT