Hardware teardown
A complete reverse-engineering of a salvaged Gemini Shale tank-volume appliance — every board, every rail, and what each wire actually does.
Before it became a candidate for a Clark Farming Company field station, this enclosure spent its life as a Gemini Shale tank-volume / truck-load meter. Inside is a Raspberry Pi 3B+ that read two analog instruments through an ADS1115 analog-to-digital converter, computed the liquid volume of a tank from its geometry, showed the answer in gallons and barrels on a small kiosk screen, and broadcast the figure over Bluetooth to a phone app. A power tree of three isolated DC-DC converters let the whole thing run from a single, dirty field DC supply, and a Juice4Halt module gave it a clean shutdown when that supply dropped.
Everything below was reconstructed from 13 internal photographs of the open box, cross-checked against the device's own firmware recovered from its SD card. Where the photo and the code agree, confidence is high; where only the code knows (because the field sensors were not attached on the bench), that is called out explicitly.
Raspberry Pi 3B+ with a stacked ADS1115 ADC HAT, reading analog instruments over I²C.
One 9–36 V feed → fuse → barrier bus → three CUI converters making 5 V and 24 V.
An inclinometer (tilt) and a guided-wave radar (level) — the inputs to the volume math.
An 800×480 HDMI kiosk display, a safe-shutdown button, and Bluetooth to a phone.
How one rough field supply becomes three clean, isolated rails.
Sheet 1 · Power
One feed in; three isolated rails out. All three converters share the same raw bus.
Field power arrives through a cable gland as a single pair — red positive, black return — at somewhere between 9 and 36 volts DC, the wide range that lets the same box run from a 12 V battery, a 24 V industrial supply, or a solar/battery bank without rewiring. The positive leg passes first through an inline blade-fuse holder, the single point of overcurrent protection for everything downstream.
From the fuse, power lands on a pair of barrier terminal strips, TS1 and TS2, jumpered into two continuous rails: TS1 is the positive bus, TS2 is the return. This bus is simply a distribution manifold — every converter taps the same raw voltage from it in parallel. There is no regulation here; the converters do that individually.
Three CUI Inc. DC-DC converters hang off the bus, each isolated and each making its own clean output:
PYB20-Q24-S5 (9–36 V in, 5 V out at up to 4 A). This is the heart rail: it powers the Raspberry Pi, and through the Pi the stacked ADC HAT and the LCD.PDQE6W-Q24-S24-T modules (9–36 V in, 24 V out at 250 mA). These exist to power the field instruments: a 24 V loop is the standard supply for a guided-wave radar transmitter and many analog sensors.One important honesty note, visible in every photo: the 24 V outputs land on bare green terminals. On the bench, with no tank, no radar and no inclinometer attached, those rails go nowhere — which is exactly what you would expect for a box pulled from storage. The diagram draws those loads dashed for that reason.
| Wire | From → to | Carries | Colour |
|---|---|---|---|
| Feed + | Gland → fuse → TS1 bus | Unregulated +9–36 VDC | red |
| Feed − | Gland → TS2 bus | Supply return / 0 V | black |
| Bus → PS5V | TS1/TS2 → PS5V Vin/GND | Raw +9–36 V in | red / black |
| Bus → PS24V-A | TS1/TS2 → PS24V-A Vin/GND | Raw +9–36 V in | red / black |
| Bus → PS24V-B | TS1/TS2 → PS24V-B Vin/GND | Raw +9–36 V in | red / black |
| PS5V out | PS5V +Vo/0V → Pi 5 V / GND | Regulated +5 V (Pi + HAT + LCD) | red / black |
| PS24V-A out | PS24V-A +Vo/−Vo → green terminal | +24 V loop supply A — bare on bench | red / black |
| PS24V-B out | PS24V-B +Vo/−Vo → green terminal | +24 V loop supply B — bare on bench | red / black |
What the Pi reads, how it shuts down safely, and how it talks to the world.
Sheet 2 · Signal & I/O
The Pi at the centre: analog in from the right, control on the left, display and connectivity below.
The Pi has no analog inputs of its own, so it reads the instruments through a stacked ADS1115 — a 4-channel, 16-bit analog-to-digital converter, sold here as a red HAT silk-screened "4 CH 16bit ADC with PGA for RPi". It connects to the Pi over the I²C bus (two data lines, SDA and SCL, plus power and ground) through the 40-pin header. The green screw terminals visible on the red board are not the Pi connection — they are where the field signals land.
The firmware tells us exactly how the channels are mapped:
With tank geometry entered once (diameter, length, end-cap shape, sensor positions), the Pi turns "how tilted is the tank" plus "how high is the liquid" into a precise gallon and barrel figure. Because the sensors were not connected on the bench, these three rows are the intended wiring proven by the code, not something visible in the photos.
A Raspberry Pi hates losing power mid-write; do it enough times in the field and the SD card corrupts. The Juice4Halt module solves this. It sits on the GPIO header and uses two lines:
Separately, a panel-mounted momentary button on GPIO26 lets a person request a clean shutdown by holding it for three seconds — no SSH, no screen needed.
The Pi drives an 800×480 HDMI LCD over a standard HDMI cable for video, with a separate 5 V lead for the panel's own power; it is a non-touch kiosk display. For data off the box, the original Gemini design leaned on onboard Bluetooth, advertising the current truck/tank volume to a phone app; an Ethernet (RJ45) port was available on the LAN as well. Notably, no industrial protocol — no Modbus, no WirelessHART — appears anywhere in the original firmware; that is a Clark Farming Company addition in the box's second life.
| Link | From → to | Carries | Basis |
|---|---|---|---|
| I²C | Pi GPIO2/3 → ADS1115 | Digitised sensor readings | seen |
| HAT power | Pi 3V3/5V/GND → ADS1115 | Logic power + reference | seen |
| Analog P0 | Inclinometer pitch → ADC P0 | Tilt voltage (2.5 V = level) | code |
| Analog P1 | Inclinometer roll → ADC P1 | Tilt voltage | code |
| Analog P2/P3 | Radar → ADC P2/P3 across 5 Ω | 4–20 mA → 20–100 mV level | code |
| HDMI | Pi HDMI → LCD | 800×480 video | seen |
| GPIO25 | Pi ↔ Juice4Halt | Boot / shutdown handshake | code |
| GPIO22 | Pi ↔ Juice4Halt | Input-power-fail detect | code |
| GPIO26 | Button → Pi (other side GND) | Hold 3 s → power off | seen |
| Ethernet | Pi RJ45 → LAN | Network (DHCP) | seen |
| Bluetooth | Pi radio → phone app | Volume readout (original egress) | code |
Every part, with the marking actually read off it where legible.
| Ref | Component | Part / marking | Job | Basis |
|---|---|---|---|---|
| Pi | Raspberry Pi 3B+ | — | Controller, Bluetooth, kiosk | seen |
| ADC | ADS1115 ADC HAT | 4 CH 16bit ADC with PGA for RPi | Analog → I²C | seen |
| PS5V | CUI DC-DC converter | PYB20-Q24-S5 · 9–36 V → 5 V/4 A | Pi 5 V rail | seen |
| PS24V-A | CUI DC-DC converter | PDQE6W-Q24-S24-T · 9–36 V → 24 V/250 mA | Field loop supply A | seen |
| PS24V-B | CUI DC-DC converter | PDQE6W-Q24-S24-T · 9–36 V → 24 V/250 mA | Field loop supply B | seen |
| TS1 / TS2 | Barrier terminal strips | jumpered + / − rails | Raw-DC distribution bus | seen |
| FUSE | Inline blade-fuse holder | rating not legible | Input overcurrent protection | seen |
| LCD | 800×480 HDMI display | non-touch | On-box readout | seen |
| J4H | Juice4Halt UPS | — | Safe shutdown (GPIO22/25) | inferred |
| BTN | Momentary push-button | panel-mount | Manual shutdown (GPIO26) | seen |
| INCL | DAS-10A inclinometer | not in photos | Pitch / roll tilt | code |
| GWR | Guided-wave radar (4–20 mA) | not in photos | Liquid level | code |
The Pi's 40-pin header carries more than one board. The red ADS1115 HAT sits at the top, and underneath it — in several of the photos — there is a second green board with a distinctive circular silk-screen pattern. The most likely identity is the Juice4Halt module itself: that circular footprint is consistent with its hold-up supercapacitor, and it would explain why no separate Juice4Halt board appears anywhere else, and why the GPIO22/25 shutdown lines have somewhere to land. The silk-screen text was not legible in any frame, so this is the one structural detail held at "inferred" rather than confirmed — popping the stack and reading the label would settle it.
Each claim above is tagged by its evidence: seen means it is legible or visible in the photographs; code means it is proven by the device's own firmware (the intended wiring, even where the part was not on the bench); inferred means it is the best reading but not conclusive. The component identifications were cross-checked by independent review passes over the photographs before being committed here.