Smart-Metrolac logo Smart-Metrolac
Misty rubber tree plantation at dawn
Precision Agritech

Smart-Metrolac

IoT-Powered Dry Rubber Content Testing

Replacing manual field testing with real-time, high-precision measurement using Archimedes' buoyancy principle. Field-validated against the ISO 126 oven-drying standard at Lalan Rubber.

System Status ACTIVE_STREAM_LN_402
±0.00%

MAE vs ISO 126

0/8

Lalan Rubber Field Samples

0

Role-Based Dashboards

01 — The Problem

Why Smart-Metrolac Exists

Dry Rubber Content (DRC) determines what a farmer gets paid for their latex. Today, that reading is taken with a traditional Metrolac hydrometer — a manual process that depends on the operator's eye, is slow at the collection point, and frequently produces figures farmers and factories dispute. There is no real-time record, no traceability, and no way to catch errors before payment is settled.

Smart-Metrolac replaces this with a floating IoT sensor that applies Archimedes' buoyancy principle and a custom two-component mixture model to compute DRC automatically, transmit it live, and make every reading auditable — validated in the field against the ISO 126 oven-drying standard.

Traditional Metrolac
  • closeManual, operator-dependent reading
  • closeNo digital record or traceability
  • closeFrequent farmer–factory disputes
Smart-Metrolac
  • checkAutomated buoyancy-based reading
  • checkLive cloud record, fully auditable
  • check±0.74% MAE vs ISO 126 lab standard
02 — System Design

Three-Tier Architecture

Device, cloud, and interface layers work together to turn a physical buoyancy reading into a live, role-based dashboard update.

developer_boardHardware Layer
memoryESP32 Device
science Sensors HX711, DS18B20, pH, TDS
bolt Actuators Relay, I2C LCD (20×4), Buzzer
dialpad Input 4×4 Keypad
folder Storage LittleFS & Preferences
wifi Connectivity: WiFi & NTP Time Sync
HTTP (price fetch) & MQTT (measurement sync)
dnsBackend Layer
boltSpring Boot (Java 21)
verified_userREST APIs (JWT)
podcastsMQTT Subscriber
settingsBusiness Logic
sync_alt
database PostgreSQL Database
REST APIs (JSON over HTTP)
dashboardFrontend Layer
hubReact.js Dashboard
admin_panel_settings Company Admin View
warehouse Collection Center Admin View
agriculture Farmer View
developer_board

Hardware

ESP32 device reads sensors (HX711, DS18B20, pH, TDS), applies the buoyancy + mixture-model calculation, and syncs over WiFi.

dns

Backend

Spring Boot (Java 21) exposes JWT-secured REST APIs and an MQTT subscriber, backed by a PostgreSQL database.

dashboard

Frontend

A React.js dashboard serving three role-based views: Company Admin, Collection Center Admin, and Farmer.

Measurement Data Flow

person
Farmer inputs volume
balance
Plummet weighed in air, then latex
calculate
Density → DRC% calculated
shield
pH/TDS quality check
receipt_long
Invoice shown on LCD
wifi_tethering
Published via MQTT
sciencePart 1 — Measurement Flow (State Machine)
1
Farmer inputs volume (litres)
2
Weigh plummet in air (baseline)
3
Weigh plummet in latex (30s stabilization)
thermostatRead temp, weight, pH (EMA) boltToggle relay for TDS (no interference)
4
Calculate density (displaced mass / 5.5cm³) → DRC%
5
Fetch today's price (HTTP / flash)
6
Calculate total amount (litres × DRC% × price)
7
Quality control check (pH & TDS evaluation)
warningIf adulterated: show alert
8
Display invoice on LCD
9
End: publish JSON via MQTT, or save to LittleFS
cloud_offPart 2 — Store-and-Forward (Offline Mode)
wifi_off Triggered when Wi-Fi/MQTT connection is lost
1
Device processes data normally
2
Append JSON to /backlog.txt on flash
3
Wait in idle state
4
Check connection every 10s
5
End: if reconnected, stream /backlog.txt & clear file
03 — Hardware

Hardware Design

Smart-Metrolac final device

The device floats directly in the latex collection tank. Its buoyancy sensor measures displacement, and onboard firmware applies Archimedes' buoyancy principle combined with a custom two-component mixture model to convert that displacement into a DRC percentage — the same underlying physics as a Metrolac hydrometer, fully automated and continuously logged.

water
Buoyancy SensorDisplacement-based density readout
memory
Onboard MCURuns the DRC computation firmware
wifi
Wireless LinkStreams readings via MQTT
battery_full
Battery PoweredWaterproof, field-deployable housing
04 — Software

Three Role-Based Dashboards

The same live data feeds three purpose-built views — one per role in the supply chain.

Company Admin dashboard
05 — Demonstration

See It In Action

A walkthrough of taking a live DRC reading with the Smart-Metrolac device — from farmer ID and volume entry on the keypad, through the buoyancy measurement, to the digital invoice shown on the LCD.

06 — Validation

Field Validation — Lalan Rubber Estate

Eight real-world latex samples, each measured by Smart-Metrolac and by the traditional Glass Metrolac hydrometer, independently verified against the ISO 126 lab oven-drying reference method.

Smart-Metrolac
±0.00%Mean error
±0.00%Max error
Glass Metrolac (Traditional)
±0.00%Mean error
±0.00%Max error
Sample Lab Oven (%) Smart-Metrolac (%) Dev. Glass Metrolac (%) Dev.
07 — Budget

Estimated Budget

developer_board Microcontroller & Power
ESP32 USB-C Dev BoardQty 1  ·  Rs. 1,490
GB-011 Data Cable 25WQty 1  ·  Rs. 350
Micro USB 5V 1A 18650 Charger ModuleQty 2  ·  Rs. 260
1000mAh 3.7V 18650 Li-ion BatteryQty 2  ·  Rs. 720
Battery Holder 18650 2-WayQty 1  ·  Rs. 150
MT3608 DC-DC Step Up ConverterQty 1  ·  Rs. 280
DS1302 Real Time Clock ModuleQty 1  ·  Rs. 420
CR2032 3V Lithium Battery Button CellQty 1  ·  Rs. 180
science Sensors & Modules
1KG Mini Scale (Electronic)Qty 1  ·  Rs. 650
Dual Channel HX711 Load Cell AmplifierQty 1  ·  Rs. 290
Digital Waterproof Temperature SensorQty 2  ·  Rs. 720
pH Electrode Sensor (pH Probe)Qty 1  ·  Rs. 6,150
TDS Water Conductivity SensorQty 1  ·  Rs. 2,650
dialpad User Interface (I/O)
20×4 LCD Display ModuleQty 1  ·  Rs. 1,180
IIC/I2C-TWI-SPI Serial Interface ModuleQty 1  ·  Rs. 230
Passive Buzzer ModuleQty 1  ·  Rs. 140
Membrane Switch KeypadQty 1  ·  Rs. 260
inventory_2 Enclosure, Wiring & Consumables
230×150×84mm ABS Enclosure BoxQty 1  ·  Rs. 2,100
Acrylic Sheets 2-5mm ThicknessQty 2  ·  Rs. 2,180
BreadboardQty 1  ·  Rs. 325
Jump Wires (pack of 60)Qty 1  ·  Rs. 480
Jump Wires (pack of 2)Qty 1  ·  Rs. 90
JST XH Connector 3-PinQty 2  ·  Rs. 80
JST XH Connector 4-PinQty 2  ·  Rs. 100
JST XH Connector 8-PinQty 1  ·  Rs. 90
Male Pin Header 2.54mm 1×40Qty 1  ·  Rs. 30
Female Pin Header Breakable StripQty 1  ·  Rs. 40
Heat Shrink Sleeve 4mm / 3mmQty 2  ·  Rs. 140
Heat Shrink Tubing Insulation (S/L)Qty 2  ·  Rs. 100
Solder Wire 0.8mm 1MQty 1  ·  Rs. 100
Total discounts received: Rs. 205.00
calculate Grand Total
Rs. 21,975.00
08 — Recognition

Achievements

workspace_premium
Accepted for Publication Our research on Smart-Metrolac was presented at the Peradeniya University International Research Symposium and Exposition (iPURSE) 2026, under Theme 3 — Engineering Intelligent, Sustainable, and Human-Centric Systems, and has been accepted for publication in the conference proceedings.
calendar_today 20th–21st August 2026
location_on Faculty of Agriculture, University of Peradeniya
Presenting Smart-Metrolac at iPURSE 2026
Presenting Smart-Metrolac at iPURSE 2026
Presenting Smart-Metrolac at iPURSE 2026
09 — Team

Group 16