Sohaib Aldayem

Case study · 0→1 product · AI-assisted engineering · Milestone management

Project Eyesight

Some pumps announce failure on an analog gauge that nobody is standing in front of. So thirty $40 cameras learned to stand in front of them.

Work
Predictive-maintenance camera network
Role
Originator & project lead — requirements, firmware, enclosures, dashboard
Stack
ESP32-CAM ×30 → gateway ESP → serial relay → cloud CV → Streamlit
Firmware
AI-assisted C++ (I don’t hand-write C++; I specify, review, and test it)
Hardware
~$40/pump · LiPo, 46-day battery budget
Scale
Proof of concept → 30 pumps in production

A pump trending toward failure often shows it first as a slow drift on a mechanical gauge. Walking the alley to read thirty gauges is a job nobody does often enough; hard-wiring transducers into a running fab is expensive and slow. The wedge: a camera the size of a matchbox that photographs the gauge, and computer vision that reads the photo.

I ran it like a product: written requirements, four milestones, a retrospective at each gate. The firmware was AI-written to my spec — deep-sleep cycles, wake-photograph-transmit, brownout handling — and bench-tested against a power budget before any of it touched production. That workflow — me using AI as a force multiplier with the judgment staying human — is half of what this project shows.


03.1The system

ESP32-CAM NODES — ×30one per gauge, clamped at the panelwake → photograph → transmitdeep sleep — 46-day power budget01wireless · JPEG framesGATEWAY ESP — ONE PER RACKserves up to 6 camera nodesbuffers + streams image data onward02serial link · image string dataIOT RELAY — COLUMN-MOUNTEDserial read → reassemble framestring → image conversionupload via object-storage API03storage API · batched PUTOBJECT STORAGEraw frame archiveper-node prefixes, time-keyed04new-frame eventsCV SERVICE — OPENCVHough circles → find the gauge faceneedle angle + RGB zone extractionreading + confidence score05readings DBMISSION CONTROL — STREAMLITfleet grid — last reading per nodetrend + threshold alertscamera-health panel06TECHNICIANpulls the pumpbefore failure, not afterMY BUILDnodes · enclosures ·firmware (AI-assisted)SHARED BUILDcloud infra, with thesite systems teamMY BUILDmission controlDWG NO. EYE-SYS-02 — system architecture, redrawn from the production design; internal names and identifiers removed
DiagramArchitecture, redrawn from the production design: camera nodes feed a per-rack gateway ESP, which streams over a serial link to a column-mounted relay that lands frames in object storage. The dashed bracket is honest: the cloud stages were built with the site systems team on their infrastructure; the nodes, gateway, relay integration, and mission control are mine.

03.2The board

The project ran on four epics that doubled as milestones: prove it, enclose it, read it, scale it. The board below is a faithful recreation — real ticket shapes, invented keys.

eyesight — board · recreation
EPIC 1 Proof of concept — done EPIC 2 Enclosure design — done EPIC 3 Image processing — done EPIC 4 Scale to 30 pumps — done 2025

Backlog 4

Solar trickle-charge feasibility for nodes far from power
Scale to 30 pumps
EYE-415SA
icebox · needs power survey
Confidence-weighted alerting: suppress single low-confidence readings
Image processing
EYE-39=3SA
Node auto-provisioning: config by QR at install
Scale to 30 pumps
EYE-38=5SA
Nighttime exposure profile — LED wash-out on glossy gauge faces
Image processing
EYE-362SA

In progress 2

Camera-health panel: flag nodes silent >2 wake cycles
Scale to 30 pumps
EYE-343SA
AC: silent node visible on mission control within 1 cycle
Recalibrate needle-angle map after gauge model substitution on 4 units
Image processing
EYE-332SA
AC: reading error ≤2% vs manual read

Done 27

Fleet install wave 3: final 12 nodes mounted, verified transmitting
Scale to 30 pumps
EYE-308SA
closed · 30/30 pumps covered
Gateway batching: cut per-node radio time 40%, battery margin +9 days
Scale to 30 pumps
EYE-275SA
closed · measured on bench
Hough-circle gauge detection + needle angle extraction pipeline
Image processing
EYE-228SA
closed · AC: ≥95% detection on test set
RGB zone extraction for color-banded gauges (green/red arc)
Image processing
EYE-213SA
Rev 4 two-part bolted enclosure — LED clearance, strain relief
Enclosure design
EYE-145SA
closed · deployed fleet-wide
Power budget: deep-sleep duty cycle hits 46-day battery life
Proof of concept
EYE-083SA
closed · bench-measured
First gauge photo delivered end-to-end from a running pump
Proof of concept
EYE-032SA
closed · the day it became real
RecreationMilestone flow as run: Proof of concept → Enclosure design → Image processing → Scale to 30 pumps. Ticket keys and point values invented; acceptance-criteria style faithful.

03.3The power budget

Battery projects die by milliamps. The budget below was measured on the bench, not estimated — the deep-sleep line is why the whole thing works.

StateDrawDuty cycleShare of budgetNote
Deep sleep~0.8 mA>99%38%the design center; everything else is negotiated against it
Wake + camera init~120 mA<0.3%21%capped by warm-boot config restore
Capture + Wi-Fi transmit~240 mA peak<0.2%33%batched by gateway to cut radio-on time
Brownout margin8%reserve; LiPo derated for ambient temperature

RESULT: 46-day measured battery life per node · swap cadence folded into existing PM walks

Recreation · representative valuesRebuilt from the bench-testing methodology; figures rounded.

03.4Four enclosures, one lesson per revision

panel holecavityREV 1Component boxhoused everything; camera dims wrongsat smaller than the panel hole — unstablemagnet spots nearly unreachableview-port slotmagnetsREV 2Aligned disccircle keys into the panel holetop slot aligns to the view-port boltdims still off; coarse, support-heavy printsingle magnetcamera housingREV 3One-magnet disc + housinghousing extrudes into the panel holesimplified to a single magnetbroke while removing print supports+M3 bolts ×2REV 4Two-part, bolted — deployedsplit for clean printing; bolted M3 ×2more LED light through the panel holeclearance corrected — fleet-wideDWG NO. EYE-ENC-05 — representative recreation drawn from the four-revision history; original CAD is workplace IP and stays there
Representative recreationRedrawn to match the real geometry of each revision — the component box that sat smaller than the panel hole, the keyed disc with its view-port slot and side magnets, the single-magnet disc with the rear housing, and the final two-part bolted design. The original CAD is workplace IP and stays there.

03.5What the retrospective said

Scaling was the real project; the prototype was the fun part. Between pump 1 and pump 30 came auto-recovery for silent nodes, a camera-health panel, batched uploads to protect the power budget, and an install checklist so any technician — not just me — could mount a node. The AI wrote firmware in an afternoon that would have taken me a month; the requirements, the power budget, and the four enclosure revisions are why it worked. Specification is the durable skill.