For the Workshop In development

Paula

Field Unit

Paula is a portable field unit that puts an ESP32 and a Raspberry Pi 3 on the same PCB. The ESP32 side has a 2.42″ OLED, ten status LEDs, buttons, LoRa, GPS, an RS485 port, sensor inputs and an RTC. The Pi 3 side adds Linux, USB ports and WiFi. It is hardware, and what it does is up to you. At Digital Stables we use it to carry firmware updates out to devices on the farm and flash them offline, and to test and calibrate sensors in the field. You might use it as a handheld data logger, a mapping tool, a LoRa gateway or something else entirely.

ESP32-WROOM-32E Raspberry Pi 3 LoRa Ra-02 GPS u-blox M10 2.42″ OLED 10× WS2812B RS485 / Modbus Sensor Inputs XT60 Battery Input RTC + Coin Cell Hardware Watchdog
Paula
Coming Soon

How We Use It

Paula doesn't have to be used this way. This is how we use it at Digital Stables, as an example of what the board can do. Our main use is updating firmware on devices out on the farm. Farms rarely have reliable network coverage, so Paula collects everything it needs at the office before the trip and keeps each result on the Pi until it is back on the network. The Pi software is open source (see the Software tab).

1
Mark devices for update. In the Digital Stables factory webapp, click Deploy next to each device that needs new firmware.
2
Sync at the office. Paula's Pi pulls the list of pending deployments and the latest firmware for each one, and stores them in its own database.
3
Flash in the field. Plug the device into Paula's USB and flash it, either from Paula's OLED and buttons or from your phone. The Pi runs its own WiFi hotspot, and the PaulaDeployer web app is designed for a phone screen. No internet connection is needed.
4
Report back. The results survive power loss. Back on the office network, Paula pushes them to the factory server, which records the new firmware version for each device.
Our other uses
  • LoRa listener: with the mode switch set to Listener, Paula shows data broadcast by nearby devices on its OLED pages.
  • Soil probe: reads an RS485 / Modbus soil probe (a 7-in-1 probe is supported in the firmware).
  • GPS tagging: we record the position of each soil sample or device, so we can build a map of the farm.
  • Flow sensor calibration: connect a flow sensor to Paula's terminals and measure its pulse factor on the spot.
  • Inspect and command: from the phone app, send any command to the connected device or run the same Inspect as the factory webapp.

Hardware

Paula Build 2 is still being designed. The details below come from the current KiCad files. All the components are chosen and the main ones are placed, but the board is not fully routed, so pin assignments and connectors may still change before release.
Paula Build 2 PCB render

KiCad render of the unfinished Build 2 layout, 189 × 125 mm. The Raspberry Pi plugs upside-down into the 40-pin header on the left wing. The OLED module (not shown in the render) sits over the middle of the board.

Compute & Radio
MCUESP32-WROOM-32E (8 MB)
Linux computerRaspberry Pi 3, mounted upside-down; linked to the ESP32 by UART. A Pi Zero fits the same header (see below)
LoRaRa-02 SX1278, 433 MHz
GPSu-blox MAX-M10S on I²C, u.FL antenna connector
RTCPCF8563T with CR1220 coin-cell backup
WatchdogCAT823 supervisor, enabled by jumper
Interface & Power
Display2.42″ I²C OLED
Status LEDs10× WS2812B
ControlsPage buttons, Pi Off, Reset, Commands / Listener switch
SensingADS1115 ADC, INA219 battery current, RS485 transceiver
PowerXT60 battery input; two TPS5430 buck regulators for 5 V and 3.3 V
Board size189 × 125 mm
Why a Raspberry Pi 3

Flashing firmware needs a USB port for the device being updated. Paula also needs two WiFi connections: its own hotspot for your phone in the field, and the office network for syncing. The second one comes from a USB WiFi dongle, so Paula needs two USB ports. A Pi 3 has four. A Pi Zero plugs into the same 40-pin header, but its single USB port can't take both the device and the dongle.

Terminals along the bottom edge, labelled as on the Build 2 silkscreen.

Terminals
SilkscreenFunction
XT60PWR Battery input
GND VDDPWR Battery voltage out, through a diode
RS485 A BRS485 Soil probe / Modbus sensor
I2C SDA SCLI²C External I²C sensors (shared bus)
18 19Sensor Two sensor inputs, digital or analog (see jumpers)
V50 GND (×2)PWR 5 V for sensors
Programming header (8-pin)

V50 · EN · TX0 · RX0 · IO0 · GND · GND · GND, the same layout as Wally and Valentino.

Jumpers
JumperFitted
Watchdog enabled: the CAT823 can reset the ESP32
Input 18 / 19 in digital mode, through a level shifter to GPIO18 / GPIO19
Input 18 / 19 in analog mode, to the ADS1115
120 Ω RS485 bus termination
Buttons and switch
  • Previous / Next page: scroll the OLED pages
  • PI OFF: asks the Pi to shut down cleanly before power is removed
  • RESET: resets the ESP32
  • Commands / Listener: Commands takes instructions from the Pi; Listener shows LoRa traffic from nearby devices

ESP32 pin use from the current Build 2 schematic, for firmware reference. These assignments are preliminary and may change as the layout is finished.

SignalGPIOPurpose
SDA_I2C22I²C data. Swapped from the ESP32 default
SCL_I2C21I²C clock. Swapped from the ESP32 default
UART1_RX32From the Pi's UART TX
UART1_TX33To the Pi's UART RX
UART216 / 17RS485 transceiver (MAX485E)
RS485_DERE23RS485 transmit enable
GPIO_18 / 1918 / 19Sensor inputs 18 and 19 (digital mode)
WS2812B4Status LED data
SignalGPIOPurpose
SCK / MISO / MOSI14 / 12 / 13Ra-02 LoRa SPI
SS15LoRa chip select
LORA_RST26LoRa reset
LORA_DIO34LoRa interrupt (input-only pin)
WATCHDOG_WDI25CAT823 watchdog input
PI_OFF35Pi Off button (input-only pin)
RTC_BATT_VOLT36Coin-cell voltage (SENSOR_VP)
RTC_CLK_OUT39PCF8563T 1 Hz clock (SENSOR_VN)
I²C Bus — On-Board Devices
DeviceAddress
2.42″ OLED0x3C
INA219 battery current0x41
u-blox MAX-M10S GPS0x42
ADS1115 ADC0x48
PCF8563T RTC0x51

The GPS supports I²C Fast-mode only, so run the bus at 320 kHz or slower.

This is the software we run on Paula at Digital Stables for field firmware updates. The two Pi programs are open source on GitHub. Use them as they are, adapt them, or start from scratch with your own code.

PaulaUploader

The command-line tool on the Pi. At the office it pulls pending deployments and firmware from the factory server. In the field it flashes devices with esptool. Back at the office it pushes the results. Its repository also has the script that sets up a new Pi, including the field WiFi hotspot.

GitHub
PaulaDeployer

A web app for your phone, served by the Pi over its own hotspot. It shows one tile per device waiting for an update, with a live flashing terminal. It can also Inspect a device, send it any command, and calibrate sensors.

GitHub
Paula firmware

The ESP32 firmware. It drives the OLED pages, LEDs and buttons, listens to LoRa, reads the RS485 soil probe, and calibrates flow sensors. It also passes status between the Pi and the operator. Firmware for Build 2 is being written alongside the board.

Paula — Schematic — Build 2 (preliminary)
Open PDF