
Esp32-c3-board
ieb/N2KNMEA0183Wifi
Exposes NMEA2000 and BMS data over BLE for Apps to use. Also supports Wifi/http/tcp/udp services.

Exposes NMEA2000 and BMS data over BLE for Apps to use. Also supports Wifi/http/tcp/udp services.
Esp32-c3-board bms is an open-source printed circuit board by ieb, from the ieb/N2KNMEA0183Wifi repository on GitHub. It is a 2-layer board of 94.9 × 40.6 mm with 43 parts on 38 nets, routed with 258 tracks and 11 vias.
It is built around the MP2307DN-Z, AMS1117-5.0 and TJA1050. Its parts include 16 capacitors, 8 resistors, 8 connectors, 6 ICs and 3 diodes. It belongs with the radio and wireless and power boards and the ESP32 and RISC-V boards of this library.
ESP32-C3 firmware that bridges an NMEA2000 (CAN) bus to WiFi and Bluetooth LE clients. Parses a working subset of N2K PGNs, emits NMEA0183 and SeaSmart over TCP/UDP/HTTP streams, serves a local web UI and admin, and publishes a compact binary boat-state feed over BLE GATT for mobile PWAs.
Also bridges a JBD / JDB BMS over TTL/UART, exposing register data both as custom PGNs on the N2K bus and as a dedicated BLE battery characteristic.
lib/N2KHandler/NMEA0183N2KMessages.h)./api/nmea0183, /api/seasmart) with per-client PGN filtering.BoatWatchBLE) — see docs/ble-transport.md:
0xAA00 service — autopilot state, command channel, battery.0xFF00 service — navigation state (lat/lon, COG/SOG, heading, wind,
depth, STW, log) and engine state (RPM, temps, volts, pressures, hours,
status bits).lib/freezeframe).lib/performance).lib/logbook).The UIs live in their own repos and talk to the firmware over HTTP streams or BLE:
Current target is an ESP32-C3 on a custom PCB (see pcb/). Brownout
threshold is lowered from the 3.1 V default to 2.8 V to ride out BLE radio
bring-up transients. CAN transceiver, isolated UART to the BMS, LED, and
connectors are documented in the schematic.
All paths marked "admin only" require HTTP basic auth against credentials in
config.txt.
| Method | Path | Purpose |
|---|---|---|
| GET | /** | Static file from SPIFFS (UI bundle). |
| GET | /api/store | Current store snapshot, CSV. |
| GET | /api/devices | Devices seen on the N2K bus, text. |
| GET | /api/nmea0183 | Chunked NMEA0183 stream. |
| GET | /api/seasmart | Chunked SeaSmart stream; ?pgns=... filters. |
| GET | /api/status.json | Filesystem + heap status. admin |
| GET | /api/fs.json | Filesystem listing. admin |
| POST | /api/fs.json | op=delete or op=upload (multipart). admin |
| GET | /config.txt | Current configuration file. admin |
| POST | /api/reboot.json | Reboot. admin |
Simulators for the HTTP/TCP/BMS side live under simulator/.
Emits NMEA0183 sentences by default. A client can switch its session to SeaSmart by sending a PGN filter request — once switched, the stream stays in SeaSmart mode for that client. Some noisy PGNs (e.g. Raymarine pilot updates) are filtered by default to protect bandwidth.
$PCDCM,1,7,127489,127505,127488,128259,129026,130312,128267*77UDP is used for broadcast to LAN clients. Note that ChromeOS blocks UDP broadcast to Android apps running in containers, so the TCP and HTTP stream paths exist as a workaround.
See docs/ble-transport.md for the binary frame layouts, magic bytes,
scaling factors, and notification cadence. Characteristics notify at ≤2 Hz
when data changes, and fall back to a 1 Hz keep-alive carrying the latest
values (or NA sentinels if the source PGN has gone stale).
Authentication is a 4-digit PIN (ble.pin in config.txt). Brute force is
bounded by a per-connection lockout (30 s after 5 failures, disconnect after
10) and a global lockout (5 min after 20 cumulative failures across all
connections). Unauthenticated clients are disconnected after 30 s.
SeaSmart/PCDIN sentences published on the NMEA0183 streams:
$PCDIN,01F119,00000000,0F,2AAF00D1067414FF*59
^^ checksum
^^^^^^^^^^^^^^^^ data (whole message)
^^ source
^^^^^^^^ hex time
^^^^^^ PGN
^^^^^^ NMEA0183 idHex time decoded as ((parseInt(value,32)/1024)+1262304000)*1000 giving ms
since 1970. Reference: SeaSmart protocol PDF.
On boot the firmware reads data/config.txt from SPIFFS and either joins
the configured WiFi network (station mode) or starts its own AP. Find the
resulting IP, then:
http://<ip>/ — data / status view.http://<ip>/admin.html — admin view (upload config, reboot).A serial monitor on the ESP32 gives lower-level diagnostics; press h<CR>
for a help screen. The running git SHA is printed with h.
Project uses PlatformIO. Default environment is esp32-c3.
pio run # build firmware
pio run -t upload # flash firmware
pio run --target buildfs -e esp32-c3 # build SPIFFS image
pio run --target uploadfs -e esp32-c3 # flash SPIFFS image
pio device monitor # serial consoleThe SPIFFS image is populated from data/. To repopulate it from the
current UI source, clone the relevant UI repo (for the read-only UI that's
N2KBMSFwUi) and run its build script.
Simulators under simulator/ are Node-based and useful for exercising the
HTTP/TCP/BMS paths without hardware.
lib/archive/.src/ firmware entry point
lib/
N2KHandler/ PGN parsing, NMEA0183 emitters, freeze-frame hooks
bluetooth/ BoatWatch BLE server, engine/nav encoders
network/ HTTP, TCP, UDP, mDNS, wifi bring-up
jdbbms/ JBD/JDB BMS UART driver
performance/ polar-based performance calculations
logbook/ SPIFFS logbook writer
freezeframe/ engine event freeze-frame recorder
config/ config.txt loader
docs/ble-transport.md BLE GATT + binary framing spec
simulator/ Node-based HTTP/TCP/BMS simulators
pcb/ board design files
ui/ scratch / local UI assets (main UIs are in separate repos)Could be the shared WiFi/BLE chips in both devices, but could also be the ESP32 having a 500ppm sleep clock accuracy (SCA). Default with NimBLE seems to be 60ppm. I see 520 connection closed reasons in the ESP32 logs, https://github.com/apache/mynewt-nimble/issues/1777 indicates SCA could be the cause.
Testing over 48h is not conclusive since the WiFi environment is not as challenging with weak signals causing the OS interfer with BLE while prioritising Wifi. However, there seem to be fewer disconnects due to 520, and on that basis I am keeping the 500ppm setting for SCA in this commit.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C5, C11, C13, C105 |
| 4 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2, C3, C4, C12 |
| 4 | CONN_1 | MountingHole:MountingHole_3.5mm | P3, P4, P5, P6 |
| 3 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2, R5, R6 |
| 2 | 1N5819 | Diode_SMD:D_1206_3216Metric_Pad1.42x1.75mm_HandSolder | D1, D204 |
| 2 | 47K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R4 |
| 1 | 100K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R7 |
| 1 | 100uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C205 |
| 1 | 10nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C10 |
| 1 | 180pF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C7 |
| 1 | 18pF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C9 |
| 1 | 1K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R8 |
| 1 | 1uF | Capacitor_SMD:C_1210_3225Metric_Pad1.33x2.70mm_HandSolder | C206 |
| 1 | 22uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C6 |
| 1 | 22uH | Inductor_SMD:L_APV_ANR6045 | L1 |
| 1 | 500mA Thermistor | Resistor_SMD:R_2010_5025Metric_Pad1.40x2.65mm_HandSolder | TH201 |
| 1 | 6.8nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C8 |
| 1 | 8.45K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3 |
| 1 | AMS1117-5.0 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U6 |
| 1 | BMS UART | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | P102 |
| 1 | CAN | Connector_Wire:SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm | P101 |
| 1 | MP2307 | Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.62x3.51mm | U3 |
| 1 | PC817 | Package_DIP:DIP-4_W7.62mm | U4 |
| 1 | Power | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J1 |
| 1 | SMBJ30CA-TR TSV | Diode_SMD:D_SMB_Handsoldering | D203 |
| 1 | STIS0621 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U7 |
| 1 | Switch | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J2 |
| 1 | TJA1050 | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U102 |
| 1 | esp32-c3-ebay | iebSpecials:ESP-C3-Zero-ebay | U2 |

ieb/N2KNMEA0183Wifi
Exposes NMEA2000 and BMS data over BLE for Apps to use. Also supports Wifi/http/tcp/udp services.

ieb/N2KNMEA0183Wifi
Exposes NMEA2000 and BMS data over BLE for Apps to use. Also supports Wifi/http/tcp/udp services.

ieb/N2KNMEA0183Wifi
Exposes NMEA2000 and BMS data over BLE for Apps to use. Also supports Wifi/http/tcp/udp services.


ieb/N2KEngineEsp32
N2K Engine Interface with BLE built around an ESP32 and ADS1115 ADCs


shanshe/Z3660
Amiga 4000 CPU accelerator board based on A3660 and Z-turn FPGA board

OPRobots/FujitoraBot
Robotracer - siguelíneas de alto rendimiento; con succión, tracción brushless en sistema tetra y procesador STM32F4

AugustoS97/CanBus-Radio-VAG
CANBUS PCB to control original functions of VAG (VW, SKODA, SEAT, AUDI) cars (such us original DSP and other functions).

AugustoS97/BMS-BatterySystem
Repositorio con el diseño de un BMS y una batería como TFM

It measures 94.9 × 40.6 mm and has 2 copper layers, 1.6 mm thick.
43 parts, built around the MP2307DN-Z, AMS1117-5.0 and TJA1050. 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.
From the ieb/N2KNMEA0183Wifi repository on GitHub, at the commit this page was made from: the board is pcb/esp32-c3-board-bms/esp32-c3-board-bms.kicad_pcb and its schematic pcb/esp32-c3-board-bms/esp32-c3-board-bms.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask ieb before reusing the design.