For the Farm In development

Gloria

Pump Controller

Gloria does everything Daffodil does as a sensor unit and adds pump control. It reads flow meters, tank and trough levels on four sensor channels, and switches a pump through a relay. A hardware emergency switch cuts the relay whatever the software is doing. An OLED display, nine status LEDs, a START button and an AUTO / MANUAL switch let you run it from the front panel.

Built on Valentino — Gloria is a shield that plugs into the Valentino Build 3 base board. Valentino provides the ESP32, LoRa, the real-time clock, the hardware watchdog and the MPPT solar charger, so Gloria can run from a solar panel and a battery.
Shield power switch — a load switch lets the ESP32 turn off the shield's whole 5 V rail (LEDs, display, sensors and both ADCs) while the base board sleeps. With the rail off, the shield only draws the emergency switch's sense divider, about 17 µA.
Pump Relay Emergency Stop 4 Sensor Channels Flow Meters Tank / Trough Level 16-bit ADC 1.54″ OLED 9× WS2812B Valentino Shield
Gloria
Coming Soon

Pump Control

The pump is wired to the relay terminal. Three controls decide whether it runs, and the first one is pure hardware.

1
Emergency switch. A slide switch sits in series with the relay coil's supply. With the switch open the coil has no power, so the relay drops and the pump stops, whatever the software does. The firmware can read the switch position, so it knows when the pump has been stopped by hand.
2
AUTO / MANUAL switch. In AUTO the firmware decides when the pump runs. Valentino measures the solar panel current, so the plan is to run the pump when there is enough sun. In MANUAL the pump only runs after someone presses START.
3
START button. Starts the pump in MANUAL mode. It is on a pin that can wake the ESP32 from deep sleep, so pressing it works even when the unit is asleep.
4
Relay. Closes only when the emergency switch is closed and the ESP32 asks for it. A pull-down keeps it open while the ESP32 boots, so the pump does not start on power-up.
Relay coil circuit
5 V Emergency switch hardware, cuts coil supply Relay coil flyback diode across it Transistor → GND switched by ESP32 GPIO17 Sense → ADC firmware reads it Pump runs only if both are closed
The pump control firmware (relay logic, AUTO / MANUAL, START wake-up, sensors and LoRa) will be written after the first boards pass the bench test. The behaviour above is what the hardware is designed for.

Hardware

Gloria is still being designed. The schematic is finished. The PCB layout is being updated to match it, and no boards have been built or tested yet. Everything below comes from the schematic and may change before release.

Gloria is two boards. Valentino is the base board with the ESP32, radio and power; Gloria is the shield that plugs on top through two 10-pin headers.

Valentino Build 3

Base board · full details

MCUESP32
RadioLoRa 433 MHz (Ra-02)
RTCPCF8563 (I²C 0x51)
WatchdogTPL5010 hardware timer
PowerMPPT solar charger, LiFePO4 or lead-acid battery
Current sensingINA219 on the solar input and the battery
Gloria Shield

Pump control and sensor shield

RelaySRD-05VDC-SL-C, screw terminal J5, driven from GPIO17
Emergency stopSlide switch in series with the relay coil, state read by the ADC
ControlsSTART push button, AUTO / MANUAL slide switch
Sensors4 channels, each digital (level-shifted) or analog (ADS1115, 16-bit), 0–5 V
Display1.54″ OLED, SSD1309, 128×64, I²C
LEDs9× WS2812B on GPIO16
Config5-way DIP switch on a resistor ladder (second ADS1115)
PowerTPS2051 load switch turns the shield's 5 V rail on and off (GPIO19)
Power Rails
RailFeeds
5 V always onLoad switch input, emergency switch, relay coil
5 V switchedLEDs, OLED, both ADS1115s, sensor pull-ups, sensor supply terminal J7
3.3 VLevel shifters and pull-ups on the ESP32 side

The load switch is rated 500 mA continuous. Nine LEDs at full white would draw about 540 mA, so the firmware caps LED brightness.

What Gloria shares with Daffodil
  • The first two sensor channels pair the same GPIOs with the same ADC inputs as Daffodil, so Daffodil's sensor code carries over.
  • The same 5-way DIP config switch circuit.
  • The same kinds of sensor: flow meters, tank and trough level, DS18B20 temperature probe.
  • New on Gloria: the pump relay with emergency stop, START and AUTO / MANUAL controls, an OLED, and two more sensor channels.

Four sensor channels on two 2-pin screw terminals, J3 and J6. Each terminal pin goes through two jumpers. The digital jumper connects it to a level shifter (5 V sensor to 3.3 V ESP32 logic), for pulse sensors such as flow meters or float switches. The analog jumper connects it to a 16-bit ADS1115 input, for 0–5 V sensors such as tank and trough level. A separate terminal, J7, supplies the sensors with 5 V and ground, which suits flow meters that need at least 4.5 V.

TerminalDigital jumperGPIOAnalog jumperADS1115 (0x49)
J3 pin 233AIN0
J3 pin 118AIN1
J6 pin 232AIN2
J6 pin 123AIN3
J7PWR Pin 1: switched 5 V · Pin 2: GND (sensor supply)

J3 and J6 have no power pins; take sensor power from J7. The J3 channels match Daffodil (GPIO33 with AIN0, GPIO18 with AIN1).

1-wire temperature probe

J6 pin 1 can also be a 1-wire bus for a DS18B20 probe: close , leave open, and take the probe's power and ground from J7. The pull-up is already on the board. Not tested on hardware yet.

Typical site
  • Flow meter on the pump outlet
  • Tank level
  • Water trough level
  • Solar pump on the relay

Like Daffodil, Gloria has a 5-position DIP switch on a resistor ladder. Each combination gives a different voltage, read by the shield's second ADS1115 (0x4A, AIN2), so the 5 switches give 32 positions. The positions select what the unit measures and how it behaves.

SW1 – SW5
Position table coming soon.

The ladder runs from 5 V on Gloria (3.3 V on Daffodil), so Daffodil's thresholds don't apply. The readings for all 32 positions will be measured on the first boards, and the functions assigned in the firmware. The table will be published here and in the manual.

OLED display

A 1.54″ monochrome OLED (SSD1309 driver, 128×64 pixels) on the I²C bus. The hardware test firmware shows the relay state, AUTO / MANUAL mode, the START button, the emergency switch and the config switch reading. The pages for the production firmware will be designed with it.

Status LEDs

Nine WS2812B RGB LEDs on one data line (GPIO16), powered from the switched 5 V rail. Brightness is capped in firmware to keep the current well under the load switch's 500 mA rating. The LED display patterns will be documented once the firmware is written.

Shield J1 mates with Valentino J3; shield J4 mates with Valentino J4. All nine GPIOs available to a shield are used.

PinJ1 (Valentino J3)J4 (Valentino J4)
1GPIO32Sensor, J6 pin 2GPIO5AUTO / MANUAL switch
2GPIO33Sensor, J3 pin 2GPIO18Sensor, J3 pin 1
3GPIO16LED dataGPIO23Sensor, J6 pin 1, or 1-wire
4GPIO17RelayGPIO195 V switch enable (low = on)
53.3 VSDA
6GPIO27START buttonSCL
7NC3.3 V
8NC5 V
9GNDGND
10GNDGND
I²C Bus
AddressDevice
0x18MCP9808 temperature (Valentino)
0x3COLED (Gloria), expected; 0x3D on some modules
0x40INA219 solar current (Valentino)
0x41INA219 battery current (Valentino)
0x48ADS1115 (Valentino)
0x49ADS1115 sensors (Gloria)
0x4AADS1115 config + emergency sense (Gloria)
0x51PCF8563 RTC (Valentino)

The Gloria devices are on the switched 5 V rail, so GPIO19 must be low before they answer.

Gloria — Schematic (preliminary)
Open PDF

Manual

Gloria User Manual

Wiring, jumper settings, configuration positions and pump setup. The manual is being written and will be available here.

Coming soon