Skip to content

Plošná ryba Jádro (PR-CORE)

Device page · Flash firmware from the browser

The base board of all Plošná ryba products, also sold on its own for your projects. ESP32-C6 with WiFi 6, Bluetooth LE and a Thread/Zigbee radio, a Li-ion charger, two Qwiic connectors and one head connector. The firmware is ESPHome, so most things are written in YAML without programming.

What is on the board

  • ESP32-C6-WROOM-1-N8, 8 MB flash
  • USB-C with native USB (flashing, logs, power, no driver needed)
  • 3.3 V LDO
  • MCP73831 Li-ion charger, 2-pin JST-PH battery connector (18650 cell in a holder with leads), reverse polarity protection
  • Battery voltage measurement (100k/100k divider)
  • 2x Qwiic / Stemma QT (I2C)
  • 6-pin JST-PH head connector
  • BOOT and RESET buttons
  • Status LED, a plain single-colour LED
  • 4.7k pull-up for 1-Wire (solder jumper JP1)
  • Optional 5 V screw terminal

The KiCad 9 board design is in preparation. The pinout specification is in hardware/core/README.md.

Pinout

Signal GPIO Note
VBAT_SENSE GPIO0 ADC1_CH0, 100k/100k divider from the battery
HEAD_C / 1-Wire GPIO1 4.7k pull-up to 3V3 through JP1 (closed from the factory)
HEAD_A GPIO2 LP GPIO (can wake from deep sleep), UART RX, HX711 DOUT, WS2812 data
HEAD_B GPIO3 LP GPIO, UART TX, HX711 SCK
I2C SDA (Qwiic) GPIO6
I2C SCL (Qwiic) GPIO7
STATUS_LED GPIO8 plain LED to 3V3, lit when low; strapping pin, same as on the ESP32-C6-DevKitC-1
BOOT GPIO9 strapping, pressed = low
USB D-/D+ GPIO12/13 native USB
UART0 TX/RX GPIO16/17 test points
HEAD_EN GPIO18 high = head power on
CHRG_STAT GPIO19 low = charging, needs a pull-up

Connectors

Head, 6-pin JST-PH

Pin Signal
1 GND
2 3V3 (switched by HEAD_EN)
3 5V (VBUS from USB or the terminal, switched by HEAD_EN, not available on battery)
4 HEAD_A, GPIO2
5 HEAD_B, GPIO3
6 HEAD_C, GPIO1

The head connector is an open specification, similar to the expansion cards of Framework laptops. Dimensions, pins, power and the rules for your own heads are described in hardware/heads/SPEC.md, so anyone can build their own head. Heads and spare parts (lids, gaskets, cable glands, cables) will also be sold separately.

Qwiic, 4-pin JST-SH (2x): 1 GND, 2 3V3 (not switched), 3 SDA GPIO6, 4 SCL GPIO7.

Battery, 2-pin JST-PH: 1 BAT+, 2 GND. The board side is protected against reversed polarity, a reversed cell does no harm, the device just does not start. Battery leads from different shops are still often wired the other way round, so check + and - against the marks on the board before plugging in your own cell.

Power and deep sleep

  • From USB or the 5 V terminal both 5 V and 3V3 are available. The battery charges at the same time.
  • On battery only 3V3 is available. A head that needs 5 V (for example a WS2812 strip) will not run on battery.
  • HEAD_EN switches both 3V3 and 5V of the head. The firmware turns it on at start and off before sleep, so the head draws nothing while asleep.
  • Qwiic power is not switched. For battery use pick modules with a low idle current (SHT40 draws about 1 µA idle).
  • The timer and the HEAD_A, HEAD_B pins (LP GPIO) can wake the board from deep sleep.

Firmware for your own project

What you need

  • ESPHome 2026.10.0 or newer (pip install esphome, or the ESPHome add-on in Home Assistant)
  • The firmware/ folder from the repository

Start with jadro.yaml

firmware/jadro.yaml contains everything from the shared core.yaml: WiFi, the HA API, OTA, Improv over USB and Bluetooth, the web server, status LED, battery measurement, charging state, BOOT button, head power switch and an I2C address scan in the log.

cd firmware
cp secrets.example.yaml secrets.yaml   # fill in WiFi, API key and OTA password
esphome run jadro.yaml                 # first flash over USB, later over WiFi
esphome logs jadro.yaml

WiFi and the fallback network. The public images from https://plosnaryba.cz/firmware have no fallback WiFi network and no default password (EN 18031). WiFi is set only through Improv: over a USB-C cable from the browser, or over Bluetooth from Home Assistant confirmed by pressing BOOT. Your own build (esphome run or build.sh --vlastni with secrets.yaml) also enables a fallback network Plosna ryba <produkt> with a captive portal for entering WiFi. Its password is the ap_heslo substitution, replace the default zmente-me with your own.

Your own sensor

Copy jadro.yaml under a new name, keep packages: and add your components below. Example: a 1-Wire thermometer and a button on HEAD_A.

substitutions:
  name: my-sensor
  friendly_name: "My sensor"
  produkt: jadro

packages:
  lang: !include lang/en.yaml
  core: !include core.yaml

one_wire:
  - platform: gpio
    pin: GPIO1

sensor:
  - platform: dallas_temp
    name: "Temperature"
    update_interval: 60s

binary_sensor:
  - platform: gpio
    name: "Button"
    pin:
      number: GPIO2
      mode:
        input: true
        pullup: true
      inverted: true

Lists like sensor: or binary_sensor: are merged with those from core.yaml, nothing gets overwritten. To change an entity from the core use !extend with its id:

sensor:
  - id: !extend napeti_baterie
    update_interval: 10min

Remove a core entity with !remove:

light:
  - id: !remove stavova_led

Useful ids from core.yaml: napajeni_hlavice (switch, head power), stavova_led (light), napeti_baterie, baterie_procenta (sensor, battery voltage and percent), nabijeni, tlacitko_boot (binary_sensor, charging and BOOT), bus_qwiic (I2C), cas_ha, cas_sntp (time).

Battery operation

Add the sleep package and set mereni_hotovo once your measurement is done:

packages:
  lang: !include lang/en.yaml
  core: !include core.yaml
  spanek: !include spanek.yaml

substitutions:
  interval_vychozi: "30"   # minutes, can be changed from HA

sensor:
  - platform: dallas_temp
    name: "Temperature"
    on_value:
      then:
        - lambda: id(mereni_hotovo) = true;

The package adds a Measurement interval entity, a Maintenance mode switch and the logic: after a timer wake-up it waits for the HA connection and the measurement, sends the data and sleeps. Being awake only takes a few seconds (substitution doba_bdeni_ms, default 4000), because awake time is what decides battery life. After power-on, reset or flashing it stays awake for 5 minutes for WiFi setup (doba_bdeni_studeny_start_ms). If it cannot connect to HA or no measurement arrives, each wait gives up after 10 s and it sleeps anyway.

Maintenance mode (no sleep, OTA, setting changes apply immediately) is turned on by an input_boolean helper in Home Assistant that the device reads after every connect (substitution udrzba_entita, default input_boolean.plosna_ryba_udrzba), by pressing BOOT while awake, or by the Maintenance mode switch while the device is awake. The helper turned on switches the mode on, the helper turned off switches it off only when it changes while the device is awake, not on the first state after a wake-up, so BOOT works even with the helper off. HA cannot send settings to a sleeping device, so settings are changed in maintenance mode. In maintenance mode the status LED gives a short flash every 2 s.

Strings and language

The products keep all strings in lang/cs.yaml and lang/en.yaml as substitutions. Your own project does not have to follow that, but keep the lang package included, core.yaml takes the names of its entities from it.

Things to watch

  • GPIO8 and GPIO9 are strapping pins. Do not connect anything that pulls them elsewhere at boot (the LED and button on the board are fine).
  • RMT (WS2812) on the C6 has only 96 symbols. The status LED is a plain LED on a GPIO and does not use RMT, so two strips fit, each with rmt_symbols: 48.
  • The logger runs over native USB. UART0 on the GPIO16/17 test points is free for your devices.
  • ADC is only on GPIO0 to GPIO6. GPIO0 is taken by the battery measurement.
  • Bluetooth Improv uses a fair amount of RAM. If you need memory (HTTPS, large displays), remove it: improv_ble: !remove.

Flashing without ESPHome

Ready images of all products can be flashed from the browser at https://plosnaryba.cz/firmware. If the board does not respond, hold BOOT, press and release RESET, release BOOT. The board is then in download mode.

Safety

  • Li-ion cells: no damaged or swollen cells, no charging below 0 °C or above 45 °C, no shorts. The charger on the board is for a single 3.7 V cell.
  • The board runs on safety extra-low voltage only. Do not connect anything from the 230 V mains, not even through a relay module on the same PCB without isolation.
  • The board itself is not waterproof. Outdoors put it in an enclosure with cable glands.