ID,Type,Status,Title,Description,Parent_ID,Relations
38,Task,In progress,review sensor list [ammonia],"**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).
    

<br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor (type)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Manufacturer (origin)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Est. price (USD)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Comm. protocol / outputs</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">NH₃ range (ppm)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Accuracy / precision</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Operating voltage</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Availability</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Datasheet</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Product link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">PCB-solderable?</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DOL 53 Ammonia Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL-sensors (Denmark)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$1,389</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (0–10 V or 4–20 mA)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±1.5 ppm or ±10%</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">24 VDC (15–30 VDC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Available worldwide via distributors</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Spec]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Manufacturer</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">No (probe)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DOL 51 (Air-clean)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL-sensors (Denmark)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$4,182</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (0–10 V or 4–20 mA)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–50</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±1.5 ppm or ±10%</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">24 VDC (22–26 VDC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High-humidity tolerant (0–100% RH)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Spec]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Manufacturer</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">No (probe)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Fancom NH₃ Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Fancom (Netherlands)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (est. ~$1,000)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (0–10 V)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±1.5 ppm or ±10%</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">24 VDC (15–30 VDC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Widely used in EU farms</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Factsheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Manufacturer</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">No (probe)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Aranet NH₃ Kit (0–100 ppm)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Aranet (Lithuania)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$1,770</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Wireless (LoRaWAN, via Aranet transmitter)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">(accuracy not given)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">24 VDC supply</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial IoT sensor kit (includes DOL-53)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Manual]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Manufacturer / Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">No (kit)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGX-4NH3-100</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Amphenol SGX (UK)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$85</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical (current output)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±0.5 ppm (500 ppb)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">– (no external supply)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sold by electronics distributors (e.g. Newark)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Datasheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Alphasense NH3-B1</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Alphasense (UK)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$242</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical (nA output, requires amplifier)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">20–60 nA/ppm sensitivity (≈0.3 ppm resolution)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">– (uses internal bias ~200 mV)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Available via distributors (e.g. WinSensors)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Specs]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Membrapor NH3/MR-100</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Membrapor (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (~$100)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical (110 nA/ppm)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">&lt;0.5 ppm resolution</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">– (passive)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Niche sensor; available through specialty suppliers</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Datasheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Figaro TGS826</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Figaro (Japan)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$50–60</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">MOS (resistive; needs external circuit)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~30–300</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">(no spec’d ppm accuracy; rough resistive)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Heater 5 V (833 mW)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Widely available sensor element</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Datasheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Winsen MQ-137</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Winsen (China)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$64</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">MOS (analog voltage output)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~10–1000 (module 5–500)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">(low-precision, requires calibration)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">5 VDC (heater)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Off-the-shelf/electronics hobbyist modules</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[SparkFun PDF]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SparkFun</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">No (sensor pins)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>L-com SRAQ-G216 (MQ-137)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">L-com (USA)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$210 (£172)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog + digital TTL outputs</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">5–500</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">(sensitivity adjustable; no spec’d accuracy)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">5 VDC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Commercial module for NH₃</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Datasheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGX MiCS-6814</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SGX Sensortech (Netherlands)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$20 (module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog resistances for CO/NO₂/NH₃</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">1–300</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">(see graph; low ppm sensitivity)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">5 VDC (heater)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-gas MEMS module, available from electronics suppliers</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">[Datasheet]</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes</p></td></tr></tbody></table></figure><br>

<br>

## ✅ **Industrial-Grade &amp; Reliable NH₃ Sensors**

These sensors are designed for **continuous monitoring in harsh environments**, offer repeatability/accuracy, longer life, robust housings, and are used in ventilation control, poultry/livestock farms, safety systems, or industrial automation.

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Industrial Grade?</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why (Summary)</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DOL 53 Ammonia Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Designed specifically for livestock/farm monitoring, long life, replaceable head, 36 month service life, IP65 protection and analog 4–20 mA/0–10 V outputs for PLC/automation systems. (<a class=""op-uc-link"" href=""https://pro.aranet.com/uploads/2022/03/en-604270-dol-53-ammonia-sensor-tug-20210111-1-1.pdf?utm_source=chatgpt.com"">pro.aranet.com</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DOL 51 Ammonia Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Similar to DOL 53 but for post-air-cleaning environments; built for high humidity and continuous use.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Fancom NH₃ Sensor Probe</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Plug-and-play ammonia probe designed for climate control in agricultural settings (poultry houses).</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Aranet NH₃ Sensor Kit</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Includes DOL sensor with industrial transmitter (IP65) and integration options; intended for livestock gas monitoring. (<a class=""op-uc-link"" href=""https://pro.aranet.com/products/aranet-nh3-sensor-kit/?utm_source=chatgpt.com"">pro.aranet.com</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>NexaSens Ammonia Gas Sensor (industrial module)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Rugged design, 4–20 mA &amp; RS-485 outputs, robust humidity/temperature range, made for industrial NH₃ applications. (<a class=""op-uc-link"" href=""https://nexasens.com/product/ammonia-gas-sensor/?utm_source=chatgpt.com"">SENSORS &amp; ROBOTICS</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensorix NH₃ Series (100–5000 ppm)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✔️ Industrial</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">German electrochemical sensors with class-leading stability and selectivity, ideal for industrial air monitoring. (<a class=""op-uc-link"" href=""https://sensorix.com/oem-sensors/nh3/?utm_source=chatgpt.com"">sensorix.com</a>)</p></td></tr></tbody></table></figure>

**Why these are industrial grade:**  
✔ Designed for continuous operation  
✔ Can handle humidity/temperature variations seen in barns  
✔ Outputs compatible with PLC/automation (4-20 mA, RS-485)  
✔ Often comply with safety standards for industrial gas detection  
✔ Typically longer lifetime and defined calibration cycles

## ⚠️ **Semi-Industrial / Intermediate Reliability**

These can be used in monitoring systems _if properly calibrated and used with protective housings &amp; signal conditioning_, but they are **not as robust as true industrial products** and may require more frequent calibration or additional circuitry.

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Industrial Grade?</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Notes</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGX-4NH3-100</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">⚠️ Semi-industrial / sensor element</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical with industrial footprint, but requires own housing &amp; signal circuitry. Typically used in industrial detectors, not as standalone outdoor probes. (<a class=""op-uc-link"" href=""https://nl.rs-online.com/web/p/environmental-sensor-ics/2541598?utm_source=chatgpt.com"">RS Components</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Alphasense NH3-B1</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">⚠️ Semi-industrial / OEM</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High-quality electrochemical sensor elements from established industrial supplier, but needs proper packaging &amp; conditioning hardware. (<a class=""op-uc-link"" href=""https://www.alphasense.com/products/view-by-target-gas/ammonia-sensors-nh3?utm_source=chatgpt.com"">alphasense.com</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Membrapor NH3 (EC)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">⚠️ Semi-industrial / OEM</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical cell that must be integrated into a system; stable but needs proper circuit and housing. (<a class=""op-uc-link"" href=""https://gasdetect.com/ammonia-3-series-gas-sensor/?utm_source=chatgpt.com"">gasdetect.com</a>)</p></td></tr></tbody></table></figure>

**Reasoning:** These are **sensor elements** from industrial suppliers, but they lack ruggedized packaging and integrated outputs. They are often used inside industrial analyzers or detectors rather than directly mounted in the environment.

## ❌ **Non-Industrial / Hobby / Low-Reliability Sensors**

These are better suited for prototyping, hobby projects, or short-term monitoring — **not continuous industrial farming environments** without additional conditioning and enclosure.

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Industrial Grade?</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why Not</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Figaro TGS826 (MOS type)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Not industrial grade</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">This is a consumer/hobby sensor element with no integrated calibration or industrial output. It can be used for prototypes or simple monitoring but lacks accuracy specs and robustness. (<a class=""op-uc-link"" href=""https://www.figarosensor.com/product/sensor/application/industrial-safety/?utm_source=chatgpt.com"">figarosensor.com</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Winsen MQ-137 / SRAQ-G216</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Not industrial grade</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Cheap semiconductor NH₃ sensors (e.g., MQ-series) – poor precision, strong cross-sensitivity, and large drift; unsuitable for industrial climate control without heavy calibration. (<a class=""op-uc-link"" href=""https://sg.rs-online.com/web/p/gas-detectors/1346592?utm_source=chatgpt.com"">sg.rs-online.com</a>)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGX MiCS-6814 (multi-gas)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Not industrial grade</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-gas hobby module; not dedicated NH₃ detector and not accurate/reliable enough for industrial safety or precise control. (<a class=""op-uc-link"" href=""https://www.reddit.com/r/diyelectronics/comments/dkm4ny?utm_source=chatgpt.com"">Reddit</a>)</p></td></tr></tbody></table></figure>

**Typical issues with hobby sensors:**  
⚠ Low accuracy and repeatability  
⚠ Strong cross-sensitivity to other gases  
⚠ Large drift and frequent calibration needed  
⚠ Not robust against humidity or temperature changes

## 🧠 Summary

### **Industrial-Grade (Best for Poultry Farms &amp; Ventilation Control)**

✅ DOL 53, DOL 51 (DOL-Sensors)  
✅ Fancom NH₃ Probes  
✅ Aranet NH₃ Kit  
✅ NexaSens industrial NH₃ modules  
✅ Sensorix NH₃ series

→ These are **reliable, robust, and designed for long-term continuous operation**, with proper mounting and integration.

### **Semi-Industrial / OEM Sensor Elements**

⚠ SGX-4NH3-100  
⚠ Alphasense NH3 series  
⚠ Membrapor NH3

→ Good as sensor elements in a custom detector/board with housing and industrial electronics.

### **Not Industrial / Hobby Only**

❌ Figaro TGS826  
❌ Winsen MQ-137 / L-com modules  
❌ SGX MiCS-6814

<br>

Important upfront note (engineering reality):

*   **Ammonia ≠ VOC**
    
*   NH₃ _does_ require at least **one electrochemical “truth” sensor** if you want reliable control.
    
*   Cheap NH₃ sensors are **trend-only**, not absolute truth.
    
*   Your requested budgets are **tight but workable** with the right expectations.
    

# 3\. Ammonia Gas (NH₃)

## 3.1 Selection Criteria

Ammonia sensors are used for **animal welfare, ventilation control, and early warning**, not laboratory-grade measurement.

Key criteria:

*   One **electrochemical reference sensor** for absolute ppm anchoring
    
*   One **low-cost PCB-compatible sensor** for spatial trend detection
    
*   Known drift characteristics and predictable aging
    
*   Tolerance to humidity (critical in poultry houses)
    
*   Clear separation of **truth vs trend** roles
    

## 3.2 Recommended NH₃ Sensors

### Criteria

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><br data-cke-filler=""true""></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Reference Sensor</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Distributed PCB Sensor (×5+)</strong></p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor Name</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Alphasense NH3-B1</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Figaro TGS826</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Manufacturer</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Alphasense (UK)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Figaro Engineering (Japan)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor Technology</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Electrochemical</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">MOS (Metal Oxide Semiconductor)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Measurement Output</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Absolute NH₃ (ppm)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Relative NH₃ concentration</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Role in System</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Source of truth / calibration anchor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributed trend sensing</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Typical Price</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$140–190</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$25–35</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Best Use</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Control reference, alarms, calibration</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Spatial variation &amp; early buildup</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Communication</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog current (nA → ppm)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog resistance</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Integration Form</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensor cell (OEM)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">PCB-mount sensor</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>PCB Compatibility</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Needs analog front-end</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Direct PCB soldering</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Humidity Tolerance</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (designed for industrial use)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Poor–moderate (needs compensation)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.alphasense.com/products/nh3-b1/"">https://www.alphasense.com/products/nh3-b1/</a></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.figarosensor.com/product/entry/tgs826.html"">https://www.figarosensor.com/product/entry/tgs826.html</a></p></td></tr></tbody></table></figure>

### Why these two?

#### ✅ **Alphasense NH3-B1 — “Source of Truth”**

*   True **electrochemical NH₃ sensor**
    
*   Used inside many **industrial gas detectors**
    
*   Much more stable than MOS
    
*   Predictable drift curve
    
*   Your budget ($100–200) fits **exactly** here
    

⚠️ Tradeoffs:

*   Needs **analog front-end** (TIA + ADC)
    
*   Limited lifespan (typically 2–3 years)
    
*   Not PCB-drop-in by itself
    

#### ✅ **Figaro TGS826 — PCB-Compatible &amp; Cheap**

*   Easily soldered to PCB
    
*   Widely available
    
*   Cheap enough to deploy many units
    
*   Very good for **relative ammonia buildup detection**
    

⚠️ Limitations (important):

*   Not ppm-accurate
    
*   Strong temperature &amp; humidity sensitivity
    
*   Drift over time
    
*   Must be **normalized against reference sensor**
    

## 3.3 Architecture Notes (NH₃)

### Critical Design Principles

*   **NH₃ ppm values must come from electrochemical sensors**
    
*   MOS sensors **cannot be trusted alone** for ammonia safety
    
*   Use the system like this:
    

```text
[Alphasense NH3-B1]
        ↓
Absolute ppm reference
        ↓
Normalization & correction
        ↓
[TGS826 × N nodes]
```

### Recommended Usage Pattern

*   1 × **NH3-B1** per house (or per zone)
    
*   5–10 × **TGS826** distributed near:
    
    *   Litter level
        
    *   Exhaust fans
        
    *   Dead air zones
        

### Firmware Strategy

*   Temperature &amp; humidity compensation **mandatory**
    
*   Apply:
    
    *   Long-term drift tracking
        
    *   Relative deviation detection
        
*   Trigger ventilation based on:
    
    *   Reference ppm
        
    *   Distributed deviation spikes
        

## 3.4 Why NOT Other Options (Quick Justification)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Reason Rejected</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL 53 / Fancom</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Excellent, but <strong>far above budget</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">MQ-137</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Too unstable, hobby-grade</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">MiCS-6814</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-gas, poor NH₃ specificity</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Aranet NH₃</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial, but <strong>far too expensive</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">SGX-4NH3-100</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Good sensor, but usually &gt;$80 and harder to source</p></td></tr></tbody></table></figure>

## 3.5 Final Recommendation (Clear &amp; Actionable)

### ✅ Use this pair:

*   **Reference NH₃ sensor:**  
    **Alphasense NH3-B1**
    
*   **PCB / distributed sensor:**  
    **Figaro TGS826**
    

<br>

<br>",,
40,Task,In progress,review sensor list [CO2],"**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).
    

<br>

Results to discuss

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Sensor (CO₂)</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Manufacturer (Origin)</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Price [USD]</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Interface/Protocol</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Availability</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Range (ppm)</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Accuracy/Precision</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Datasheet / Link</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Product Link</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Voltage (V)</strong></p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$40</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">UART, I²C, PWM</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (commercial module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">400–10 000</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(30 ppm + 3% of reading)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Sensirion SCD30 Datasheet</i></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Newark/Newark element14 SCD30</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">3.3–5.5</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD40</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$18</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (newer module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">400–2 000</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(50 ppm + 5% of reading)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Sensirion SCD4x Datasheet</i> (SCD40 variant)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Digi-Key SCD40</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">2.4–5.5</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>MH-Z19B</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Zhengzhou Winsen (China)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$25</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">UART (TTL)/PWM</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (common hobbyist)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">400–2 000 (5000 opt.)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(50 ppm + 5% of reading)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Winsen MH-Z19B Datasheet</i></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">eBay/Xspar (MH‑Z19B)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">4.5–5.5</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>CCS811 (eCO₂)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">ams (Austria)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$20</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (widely used)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">400–8 192 (equivalent)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>(eCO₂ estimate – VOC-based)</i></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Adafruit CCS811 info</i></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Adafruit CCS811 (VOC/eCO₂)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">3.3 (breakout reg.)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Renke RS-CO₂ </strong><i><strong>-</strong></i><strong>-2-EX</strong> (0–5000 ppm)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Renke (China)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$40</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (0–5 V/0–10 V/4–20 mA) or RS-485</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (industrial)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–5 000</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(50 ppm + 3% of FS)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Renke RS-CO₂</i> product page</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Renke RS-CO₂-*-2-EX</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">10–30</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Senseair K30 (FR)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Senseair (Sweden)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$50</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">UART (Modbus or TTL) + 0–5 V/0–10 V analog</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (OEM module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–5 000</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(30 ppm + 3% of reading)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><i>Senseair K30 FR Datasheet</i></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Digi-Key K30 (5kppm)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">4.5–14</p></td></tr></tbody></table></figure><br>

Extended table 😀&nbsp;

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">#</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor (type)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Manufacturer (origin)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">Est. price (USD)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Comm. protocol / outputs</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">CO₂ range</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Accuracy / precision</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">Operating voltage</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Availability</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Datasheet</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Product link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">PCB-solderable?</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">1</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD30</strong> (module: NDIR + T/H)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$35–$55</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C, UART, PWM</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>400–10,000 ppm</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>±(30 ppm + 3% of reading)</strong></p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>3.3–5.5 V</strong> (module) — can be powered by 5 V; use regulator for 12/24V</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> SCD30 datasheet (Sensirion PDF). (<a class=""op-uc-link"" href=""https://sensirion.com/media/documents/4EAF6AF8/61652C3C/Sensirion_CO2_Sensors_SCD30_Datasheet.pdf?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Digi-Key SCD30 product page. (<a class=""op-uc-link"" href=""https://www.digikey.com/en/products/detail/sensirion-ag/SCD30/8445334?utm_source=chatgpt.com"">DigiKey</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">No — module (through-hole / small module).</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">2</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD4x (SCD40 / SCD41)</strong> (miniature/photoacoustic NDIR)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>SMD chip cost ~$8–$25</strong> (breakout/module ~$20–$50)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>typical 400–2,000 ppm (application target)</strong> — SCD4x family supports broader ranges</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>High: comparable to SCD30, photoacoustic NDIR</strong> (datasheet shows tight spec)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>SMD part — 1.8–5.5V depending on variant / recommended per datasheet</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate → High (growing adoption)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> SCD4x datasheet (Sensirion PDF). (<a class=""op-uc-link"" href=""https://sensirion.com/media/documents/48C4B7FB/64C134E7/Sensirion_SCD4x_Datasheet.pdf?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Digi-Key / Sensirion product pages (SCD4x family). (<a class=""op-uc-link"" href=""https://sensirion.com/media/documents/E0F04247/631EF271/CD_DS_SCD40_SCD41_Datasheet_D1.pdf?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD (meant for PCB assembly).</strong> Good for direct PCB integration.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">3</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>MH-Z19B</strong> (NDIR module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Winsen / Zhengzhou (China)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$20–$35</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">UART (TTL), PWM; some clones expose analog</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>400–2,000 ppm (configurable to 5k/10k on some firmwares)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>~±(50 ppm + 5%)</strong> (typical per datasheet)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>4.5–5.5 V</strong> (module) — needs regulator from 12/24V</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high (hobby &amp; commercial sellers)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> MH-Z19B PDF (Winsen). (<a class=""op-uc-link"" href=""https://www.winsen-sensor.com/d/files/MH-Z19B.pdf?utm_source=chatgpt.com"">Winsen Sensor</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> widely sold (Amazon, eBay, AliExpress); example vendor listings shown by distributors. (<a class=""op-uc-link"" href=""https://www.winsen-sensor.com/d/files/infrared-gas-sensor/mh-z19b-co2-ver1_0.pdf?utm_source=chatgpt.com"">Winsen Sensor</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">No — module (not SMD-friendly).</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">4</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>CCS811 (eCO₂ + TVOC)</strong> (MOx VOC → eCO₂ estimate)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">ams/CCS (Austria) / widely sold on breakouts</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$10–$30</strong> (breakout)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">eCO₂ <strong>400–8,192 ppm</strong> (equivalent CO₂ estimate)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>TVOC/eCO₂ are estimates — accuracy moderate;</strong> datasheet: algorithmic conversion; not an NDIR</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>Chip: ~1.8V; breakout boards provide 3.3V/reg</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (many breakouts, libraries)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> CCS811 datasheet (ams/Sparkfun PDF). (<a class=""op-uc-link"" href=""https://cdn.sparkfun.com/assets/learn_tutorials/1/4/3/CCS811_Datasheet-DS000459.pdf?utm_source=chatgpt.com"">cdn.sparkfun.com</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Adafruit / SparkFun CCS811 breakout pages. (<a class=""op-uc-link"" href=""https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ccs811-air-quality-sensor.pdf?utm_source=chatgpt.com"">Adafruit Learning System</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>Chip-level:</strong> YES — CCS811 available as IC (QFN) but many use breakout. If using chip directly, follow ams integration guidelines.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">5</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP30</strong> (MOx TVOC / eCO₂ IC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>chip ~$6–$15; breakout ~$12–$30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">eCO₂ (equivalent) — used as CO₂eq indicator (400–60k ppm reported on some breakout docs)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>~±15% (TVOC/eCO₂ algorithmic)</strong> (datasheet)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>1.62–1.98 V (chip)</strong> — breakout required for convenient 3.3/5V use</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Good (but SGP30 lifecycle status varies — check current stock)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> SGP30 datasheet (Sensirion). (<a class=""op-uc-link"" href=""https://sensirion.com/file/datasheet_sgp30?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Adafruit / Mouser / Digi-Key SGP30 product pages. (<a class=""op-uc-link"" href=""https://www.digikey.com/en/products/detail/sensirion-ag/SGP30-2-5K/7400966?utm_source=chatgpt.com"">DigiKey</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD IC (DFN 6) meant for PCB assembly.</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">6</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Renke RS-CO₂ (industrial transmitter)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Renke (China)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$30–$50</strong> (depends model)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (0–5V / 0–10V / 4–20 mA) or RS-485 (Modbus)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>0–5,000 ppm</strong> (typical model)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>~±(40–50 ppm + 3% FS)</strong> (manufacturer spec)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>10–30 V DC</strong> (fits your 12/24V requirement)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (industrial / OEM channels)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product page / specs:</strong> Renke RS-CO2 product page. (<a class=""op-uc-link"" href=""https://www.renkeer.com/product/co2-sensor/?utm_source=chatgpt.com"">renkeer.com</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Renke official product page (quote / distributor). (<a class=""op-uc-link"" href=""https://www.renkeer.com/product/co2-sensor/?utm_source=chatgpt.com"">renkeer.com</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">No — industrial transmitter (probe).</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">7</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Senseair K30 (K30 FR variant)</strong> (OEM NDIR module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Senseair (Sweden)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$40–$60</strong> (varies)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">UART (TTL)/analog (0–5V) / Modbus options on variants</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>0–5,000 ppm</strong> (K30 FR common variant)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>±(30 ppm + 3%)</strong> (typical spec)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>4.5–14 V</strong> (suitable via 12 V)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (OEM distributors)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet:</strong> CO2Meter / Senseair K30 FR datasheet PDF. (<a class=""op-uc-link"" href=""https://co2meters.com/Documentation/Datasheets/DS-K30-FR.pdf?utm_source=chatgpt.com"">co2meters.com</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Senseair product page / CO2Meter distribution pages. (<a class=""op-uc-link"" href=""https://senseair.com/product/k30-fr/?utm_source=chatgpt.com"">senseair.com</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">No — module (OEM)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">8</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Seeed SenseCAP SOLO CO₂ 5000 (NDIR transmitter)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Seeed Studio (China)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$79</strong> (slightly above your upper limit; included for reference)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">RS-485 (Modbus-RTU), SDI-12</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>400–5,000 ppm</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>±(50 ppm + 5% MV)</strong> (manufacturer)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>Power: 5–16 V</strong> (can be used with 12/24 V via regulator)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (Seeed distribution)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet / User guide:</strong> SenseCAP SOLO CO2 5000 datasheet/user guide (Seeed). (<a class=""op-uc-link"" href=""https://files.seeedstudio.com/products/317990687/res/SenseCAP_SOLO_CO2_5000-Datasheet.pdf?utm_source=chatgpt.com"">files.seeedstudio.com</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Product / buy:</strong> Seeed product page. (<a class=""op-uc-link"" href=""https://files.seeedstudio.com/products/317990687/res/SenseCAP_SOLO_CO2_5000-Datasheet.pdf?utm_source=chatgpt.com"">files.seeedstudio.com</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">No — enclosed transmitter</p></td></tr></tbody></table></figure><br>

<br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Role</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selected Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Reference (Source of Truth)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Proven industrial-grade NDIR, stable long-term accuracy</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Distributed / Cheap PCB Sensors (×5)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD40 (SCD4x family)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">True CO₂, SMD, low cost, designed for PCB integration</p></td></tr></tbody></table></figure><br>

## ✅ Recommended Architecture (Summary)

*   **1 × Industrial / Reference CO₂ sensor**  
    → Used as **Source of Truth**, calibration anchor, alarms, long-term reliability
    
*   **5 × Low-cost PCB-integrated CO₂ sensors**  
    → Used for **spatial distribution**, trend detection, redundancy, and ventilation optimization  
    → Periodically **cross-checked / auto-calibrated** against the reference sensor
    

# ✅ Final Recommended Sensors

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Role</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selected Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Reference (Source of Truth)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Proven industrial-grade NDIR, stable long-term accuracy</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Distributed / Cheap PCB Sensors (×5)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD40 (SCD4x family)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">True CO₂, SMD, low cost, designed for PCB integration</p></td></tr></tbody></table></figure>

# 📊 Selection Table (Final – Only the 2 Chosen Sensors)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Criteria</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Reference Sensor</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Distributed PCB Sensor</strong></p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor name</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SCD40 (SCD4x)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Manufacturer</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor technology</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>NDIR (true CO₂)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Photoacoustic NDIR (true CO₂)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Role in system</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Source of truth / calibration anchor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Distributed sensing (×5 units)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Price (USD)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$35–50</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$18–30 (chip)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>CO₂ range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">400 – 10,000 ppm</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Optimized for indoor/agriculture (400–2,000+ ppm)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Accuracy</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±(30 ppm + 3%)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very good for size class (close to SCD30)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Long-term stability</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Excellent (industrial-grade)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Good (depends on calibration strategy)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>PCB compatibility</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Module (not SMD)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">✅ <strong>SMD IC – PCB mount</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Communication</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C / UART / PWM</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Operating voltage</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">3.3–5.5 V</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">1.8–5.5 V (variant dependent)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>12V/24V compatible</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes (via regulator)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Yes (via regulator)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Availability</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Country of origin</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Switzerland (non-Israel)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Switzerland (non-Israel)</p></td></tr></tbody></table></figure>

# 🎯 Why This Is the Best Combination

## 1️⃣ Why **SCD30** as the _Source of Truth_

**Key reasons:**

*   ✔ Proven **industrial reliability**
    
*   ✔ True NDIR CO₂ (not estimated eCO₂)
    
*   ✔ Excellent long-term drift performance
    
*   ✔ Widely used in HVAC, agriculture, laboratories
    
*   ✔ Multiple interfaces (UART/I²C/PWM)
    
*   ✔ Strong documentation &amp; field history
    

**In your system:**

*   Installed in the **most representative location**
    
*   Used to:
    
    *   Validate system health
        
    *   Trigger alarms
        
    *   Periodically **re-align/calibrate the 5 cheaper sensors**
        

This is exactly how commercial poultry climate controllers are designed.

## 2️⃣ Why **SCD40** for the Other 5 Sensors

**This is the key decision that makes your system scalable and professional.**

### Why SCD40 (instead of CCS811 / SGP30 / MH-Z19B):

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Option</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why Not Ideal</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">CCS811 / SGP30</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ eCO₂ only (VOC-based, drifts badly in barns)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">MH-Z19B</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Module only, inconsistent QC, not PCB-friendly</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial transmitters</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">❌ Too expensive ×5</p></td></tr></tbody></table></figure>

### Why SCD40 **is ideal**

*   ✅ **True CO₂ (NDIR)** — same physics as reference
    
*   ✅ **SMD package** → perfect for PCB
    
*   ✅ Much **cheaper than SCD30**
    
*   ✅ Designed specifically for **OEM products**
    
*   ✅ Same manufacturer → consistent calibration philosophy
    
*   ✅ Small size → easy to place multiple sensors
    

**This allows:**

*   Reliable CO₂ gradient mapping across the house
    
*   Sensor redundancy
    
*   Software-based cross-calibration against SCD30
    

# 🧠 Recommended Calibration Strategy (Important)

To maximize accuracy and lifetime:

1.  Power-up:
    
    *   Let all sensors warm up (NDIR needs thermal stability)
        
2.  Use **SCD30 as master**
    
3.  Periodically:
    
    *   Compare SCD40 readings to SCD30
        
    *   Apply **offset correction in firmware**
        
4.  Store offsets in EEPROM / flash
    
5.  Repeat monthly or when ventilation conditions stabilize
    

➡ This dramatically improves cheap sensor accuracy without hardware cost.

# 🧩 Typical System Block Diagram (Conceptual)

```text
[ SCD30 Reference ]
        |
        |  (I²C / UART)
        |
[ MCU / ESP32 / STM32 ]
   |     |     |     |     |
[ SCD40 ][ SCD40 ][ SCD40 ][ SCD40 ][ SCD40 ]
```

*   All powered from 12/24V → DC-DC → 5V/3.3V rails
    
*   I²C bus with proper pull-ups and cable length control
    
*   Optional RS-485 uplink to farm controller
    

# ✅ Final Verdict

**This pairing gives you:**

*   Industrial-grade reliability where it matters
    
*   Low cost where you need quantity
    
*   True CO₂ everywhere (no fake eCO₂)
    
*   Clean PCB design
    
*   Future-proof scalability
    

<br>",,
44,Task,On hold,PCB schematic,,,
45,Requirements,Specified,"The system shall include a central server that aggregates and analyzes data from all main hubs across different farms, using machine learning algorithms to optimize control strategies for each farm based on collected data.","The system shall include a central server that aggregates and analyzes data from all main hubs across different farms, using machine learning algorithms to optimize control strategies for each farm based on collected data.",,
46,Requirements,Specified,"The sub-hub shall be capable of performing minor calibration functions, including sensor recalibration, before sending data to the main hub.","The sub-hub shall be capable of performing minor calibration functions, including sensor recalibration, before sending data to the main hub.",,
47,Requirements,Specified,"The main hub shall include control algorithms for managing the environment of the poultry house, including temperature, humidity, and air quality, by controlling the actuators like ventilation fans, heaters, lighting systems, and feeding systems.","The main hub shall include control algorithms for managing the environment of the poultry house, including temperature, humidity, and air quality, by controlling the actuators like ventilation fans, heaters, lighting systems, and feeding systems.",,
48,Requirements,Specified,"The central server shall use the aggregated data from all farms to generate optimized control strategies based on machine learning, which are then sent back to the respective main hubs.","The central server shall use the aggregated data from all farms to generate optimized control strategies based on machine learning, which are then sent back to the respective main hubs.",,
49,Requirements,Specified,"The main hub shall be connected to a local control board, which directly controls the actuators, such as fans, heaters, lights, and feeders.","The main hub shall be connected to a local control board, which directly controls the actuators, such as fans, heaters, lights, and feeders.",,
50,Requirements,Specified,The sub-hubs shall be capable of real-time data collection and will update the main hub with sensor readings at specified intervals or when sensor values change beyond predefined thresholds.,The sub-hubs shall be capable of real-time data collection and will update the main hub with sensor readings at specified intervals or when sensor values change beyond predefined thresholds.,,
51,Requirements,Specified,"The system shall be capable of remote monitoring and control, allowing farm managers to access real-time data and control system settings via a mobile application or web interface.","The system shall be capable of remote monitoring and control, allowing farm managers to access real-time data and control system settings via a mobile application or web interface.",,
52,Requirements,Specified,"The system shall be able to generate alarms for critical situations such as temperature deviations, high ammonia levels, equipment malfunctions, or other emergency conditions.","The system shall be able to generate alarms for critical situations such as temperature deviations, high ammonia levels, equipment malfunctions, or other emergency conditions.",,
53,Requirements,Specified,"The system shall support data logging and historical analysis, providing insights into past farm conditions, sensor performance, and actuator behavior.","The system shall support data logging and historical analysis, providing insights into past farm conditions, sensor performance, and actuator behavior.",,
54,Requirements,Specified,The system shall implement security measures such as data encryption and user authentication for remote access to prevent unauthorized access to farm data and control systems.,The system shall implement security measures such as data encryption and user authentication for remote access to prevent unauthorized access to farm data and control systems.,,
55,Requirements,Specified,"The sub-hubs shall include diagnostic tools to ensure the correct functionality of sensors, communication, and data transmission.","The sub-hubs shall include diagnostic tools to ensure the correct functionality of sensors, communication, and data transmission.",,
56,Requirements,Specified,"The system shall support scalability, allowing new sub-hubs and main hubs to be added seamlessly to expand the system to additional poultry rooms or farms.","The system shall support scalability, allowing new sub-hubs and main hubs to be added seamlessly to expand the system to additional poultry rooms or farms.",,
57,Requirements,Specified,"The system shall provide automated decision-making logic for controlling environmental parameters, which may be based on fuzzy logic or proportional control algorithms.","The system shall provide automated decision-making logic for controlling environmental parameters, which may be based on fuzzy logic or proportional control algorithms.",,
58,Requirements,Specified,"The central server shall be capable of over-the-air (OTA) updates for all system firmware, ensuring that the latest software updates and features can be deployed to all hubs.","The central server shall be capable of over-the-air (OTA) updates for all system firmware, ensuring that the latest software updates and features can be deployed to all hubs.",,
59,Requirements,Specified,"The system shall include energy management capabilities, optimizing the operation of actuators such as fans, heaters, and lighting to reduce energy consumption.","The system shall include energy management capabilities, optimizing the operation of actuators such as fans, heaters, and lighting to reduce energy consumption.",,
60,Requirements,Specified,"The system shall be compliant with industry standards, including animal welfare regulations and environmental requirements, ensuring the health and safety of the poultry.","The system shall be compliant with industry standards, including animal welfare regulations and environmental requirements, ensuring the health and safety of the poultry.",,
61,Requirements,Specified,"The system shall support multi-zone control, allowing different sections of the poultry house to have independent environmental control based on the local conditions measured by sensors in those zones.","The system shall support multi-zone control, allowing different sections of the poultry house to have independent environmental control based on the local conditions measured by sensors in those zones.",,
62,Requirements,Specified,"The system shall provide integration with other farm management software, allowing data from environmental control to be merged with broader farm management systems.","The system shall provide integration with other farm management software, allowing data from environmental control to be merged with broader farm management systems.",,
63,Requirements,Specified,"The system shall include fail-safe mechanisms to ensure continuous operation in case of failure in communication or hardware, including backup power and data storage.","The system shall include fail-safe mechanisms to ensure continuous operation in case of failure in communication or hardware, including backup power and data storage.",,
64,Requirements,Specified,"The system shall be designed for ease of use, with a user-friendly interface for farm managers to configure, monitor, and control the system.","The system shall be designed for ease of use, with a user-friendly interface for farm managers to configure, monitor, and control the system.",,
65,Requirements,Specified,"The system shall enable remote diagnostics for troubleshooting and support, reducing the need for on-site visits.","The system shall enable remote diagnostics for troubleshooting and support, reducing the need for on-site visits.",,
336,Phase,New,Main-Board pilot,,,
337,Phase,New,ASF_01 pilot,,,
338,Milestone,New,Requirements & Design,,337,
339,Milestone,New,Hardware Selection,,337,relates(#344); relates(#343); relates(#342); relates(#341); relates(#340)
340,Milestone,New,System Integration,,337,relates(#339)
341,Milestone,New,Stress & Load Testing,,337,relates(#339)
342,Milestone,New,Pilot Deployment,,337,relates(#339)
343,Milestone,New,AI Feedback Loop & Optimization,,337,relates(#339)
344,Milestone,New,Field Testing,,337,relates(#339)
345,Milestone,New,Functional / Software  requirements,,349,
346,Milestone,New,Firmware Dev,,349,
347,Milestone,New,Dev phase 2 (integration),,349,
348,Milestone,New,Software testing UT/CC/INT tests,,349,
349,Phase,New,Sensor Hub pilot,,,
350,Milestone,New,Field testing phase1,,349,
351,Milestone,New,Field testing phase 2,,349,
352,Milestone,New,Firmware Dev,,336,relates(#357); relates(#356); relates(#355); relates(#354); relates(#353)
353,Milestone,New,Control Logic & OTA,,336,relates(#352)
354,Milestone,New,Field testing,,336,relates(#352)
355,Milestone,New,Functional / Software  requirements,,336,relates(#352)
356,Milestone,New,Main-Hub Pilot,,336,relates(#352)
357,Milestone,New,Software testing UT/CC/INT tests,,336,relates(#352)
358,Phase,New,cloud server pilot,,,
359,Milestone,New,Data Pipeline + API,,358,
360,Milestone,New,AI/ML Engine,,358,
361,Phase,New,mobile app pilot,,,
362,Milestone,New,Mobile App Dev,,361,
365,Task,In progress,sensor selection [humid],"<br>

**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).",,
366,Task,In progress,sensor selection [temp],"**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).  
      
    

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Range</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Accuracy</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Interface/Output</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Typical Use</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Datasheet Link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Product Link</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>DS18B20</strong> (1-Wire, Digital)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">–55…+125 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±0.5 °C (–10…+85 °C)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">1-Wire Digital</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">HVAC, distributed temp sensing</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf"">Maxim DS18B20 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.adafruit.com/product/381"">Adafruit DS18B20 Module</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>LM35</strong> (Analog)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">–55…+150 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±0.5 °C at +25 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Analog (10 mV/°C)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Low-cost analog temp sensing</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.ti.com/lit/ds/symlink/lm35.pdf"">TI LM35 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.spikenzielabs.com/Catalog/sensors/temperature/lm35-temperature-sensor"">LM35 TO-92 Transistor</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>AD22100</strong> (Analog)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">–50…+150 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±2% of span</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Analog (0.25–4.75 V)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Instrumentation/HVAC</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.analog.com/media/en/technical-documentation/data-sheets/ad22100.pdf"">Analog AD22100 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.analog.com/en/products/ad22100.html"">Analog Devices AD22100 Product</a></p></td></tr></tbody></table></figure><br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Range</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Accuracy</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Interface/Output</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Typical Use</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Datasheet Link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Product Link</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>DHT22</strong> (AM2302)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">0–100 %RH; –40…+80 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±2 %RH; ±0.5 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">1-Wire Digital</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Low-cost indoor measurements</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://cdn-shop.adafruit.com/datasheets/AM2302.pdf"">DHT22/AM2302 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.adafruit.com/product/385"">Adafruit DHT22 Module</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>Si7021</strong></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">0–100 %RH; –40…+125 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±3 %RH; ±0.4 °C</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">I²C Digital</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Indoor climate sensing</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.silabs.com/documents/public/data-sheets/Si7021-A20.pdf"">Si7021 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.adafruit.com/product/3251"">Adafruit Si7021 Breakout</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>HDC1080</strong></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">0–100 %RH; –20…+85 °C (typ)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±2 %RH (typ); ±0.2 °C (typ)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">I²C Digital</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Battery-powered HVAC, IoT</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.ti.com/lit/ds/symlink/hdc1080.pdf"">HDC1080 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.ti.com/product/HDC1080"">Texas Instruments HDC1080</a></p></td></tr></tbody></table></figure><br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Range (Temp/RH)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Accuracy (Temp/RH)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Interface/Output</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Typical Use</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Datasheet Link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:center;""><p class=""op-uc-p"">Product Link</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>BME280</strong></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">–40…+85 °C; 0–100 %RH</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±1.0 °C; ±3 %RH</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">I²C/SPI Digital</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Environmental sensing (weather stations)</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.bosch-sensortec.com/products/environmental-sensors/bme280/"">BME280 Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.adafruit.com/product/2652"">Adafruit BME280 Breakout</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><strong>SHT30-ARP</strong></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">–40…+125 °C; 0–100 %RH</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">±0.3 °C; ±3 %RH</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">Analog Voltage</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">High-precision OEM applications</p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://sensirion.com/products/catalog/SHT30-ARP-B"">Sensirion SHT3x-ARP Datasheet</a></p></td><td class=""op-uc-table--cell"" style=""text-align:center;""><p class=""op-uc-p"">(Available via distributors)</p></td></tr></tbody></table></figure><br>

# ✅ Final Recommended Sensor Selections

_(Temperature &amp; Humidity)_

## 1️⃣ TEMPERATURE — Dedicated Sensor

### ✔ Industrial Reference Sensor (Source of Truth)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Item</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selection</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>PT1000 Class A Probe (industrial RTD)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Typical product</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL 112 PT1000 / E+E / Omega / SensyTemp</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Type</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Platinum RTD (resistive)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">–40 to +100 °C (often higher)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Accuracy</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Class A: ±0.15 °C @ 0 °C</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Output</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Passive RTD (2/3/4-wire)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Voltage</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">External excitation (ADC / RTD front-end)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Environment</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial, high humidity, dust</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Why industrial</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Physics-based sensor, long-term stability, no drift like IC sensors</p></td></tr></tbody></table></figure>

**Why this is the right reference**

*   RTDs are **the gold standard** for industrial temperature
    
*   No aging like silicon sensors
    
*   Survives ammonia, dust, moisture
    
*   Easy to recalibrate or replace probe only
    

📄 Datasheet example:  
[https://dol-sensors.com/products/dol-112-temperature-sensor](https://dol-sensors.com/products/dol-112-temperature-sensor)

🛒 Example product:  
[https://www.qcsupply.com/dol-112-temperature-sensor.html](https://www.qcsupply.com/dol-112-temperature-sensor.html)

### ✔ PCB-Integrable Temperature Sensor (Per-node)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Item</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selection</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>TMP117 (Texas Instruments)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Type</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Digital temperature IC</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">–55 to +150 °C</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Accuracy</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>±0.1 °C (–20 to +50 °C)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Interface</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Voltage</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">1.8–5.5 V</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Package</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SMD (PCB mount)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Cost</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$6–10</p></td></tr></tbody></table></figure>

**Why this pairs well**

*   Very low drift
    
*   Factory calibrated
    
*   Excellent repeatability between units
    
*   Easy digital integration to ESP32
    
*   Used widely in industrial electronics
    

📄 Datasheet:  
[https://www.ti.com/lit/ds/symlink/tmp117.pdf](https://www.ti.com/lit/ds/symlink/tmp117.pdf)

🛒 Product:  
[https://www.ti.com/product/TMP117](https://www.ti.com/product/TMP117)

### 🔁 How they work together

*   PT1000 defines **absolute temperature truth**
    
*   TMP117 sensors are **offset-calibrated** in firmware against PT1000
    
*   You get **industrial accuracy at system level**, low cost per node
    

## 2️⃣ HUMIDITY — Dedicated Sensor

### ✔ Industrial Reference Sensor (Source of Truth)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Item</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selection</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>E+E EE07 / DOL 104 / Rotronic HygroClip</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Type</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial RH transmitter</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100 % RH</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Accuracy</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>±1.5–2 % RH</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Output</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">4–20 mA or 0–10 V</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Voltage</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">12–24 V</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Environment</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Condensation-resistant</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Why industrial</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Replaceable sensing element, long-term stability</p></td></tr></tbody></table></figure>

📄 Datasheet (E+E example):  
[https://www.epluse.com/fileadmin/data/product/ee07/datasheet\_EE07.pdf](https://www.epluse.com/fileadmin/data/product/ee07/datasheet_EE07.pdf)

🛒 Product:  
[https://www.epluse.com/en/products/humidity-temperature/ee07.html](https://www.epluse.com/en/products/humidity-temperature/ee07.html)

### ✔ PCB-Integrable Humidity Sensor (Per-node)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Item</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Selection</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SHT31 / SHT35</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Type</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Digital RH + Temp IC</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–100 % RH</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Accuracy</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">±2 % RH (SHT31), ±1.5 % (SHT35)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Interface</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Voltage</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">2.4–5.5 V</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Package</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SMD</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Cost</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$6–15</p></td></tr></tbody></table></figure>

📄 Datasheet:  
[https://sensirion.com/media/documents/213E6A3B/63A5A569/Sensirion\_Humidity\_Sensors\_SHT3x\_Datasheet.pdf](https://sensirion.com/media/documents/213E6A3B/63A5A569/Sensirion_Humidity_Sensors_SHT3x_Datasheet.pdf)

🛒 Product (SHT31):  
[https://www.mouser.com/ProductDetail/Sensirion/SHT31-DIS-B](https://www.mouser.com/ProductDetail/Sensirion/SHT31-DIS-B)

### 🔁 How they work together

*   Industrial RH sensor is used for **control + alarms**
    
*   SHT31 sensors give **spatial RH distribution**
    
*   Periodic calibration offsets keep all nodes aligned
    

## 3️⃣ COMBINED TEMPERATURE + HUMIDITY (Optional)

### ✔ Industrial Combo Sensor

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DOL 114</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Designed for livestock houses</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>E+E EE210</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial HVAC grade</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Rotronic HC2A</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high accuracy</p></td></tr></tbody></table></figure>

### ✔ PCB Combo Sensor

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SHT31 / SHT35</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Best stability vs price</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Bosch BME280</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Cheaper, good enough for trends</p></td></tr></tbody></table></figure>

## ✅ Final Architecture Summary

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Measurement</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Industrial Reference</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">PCB Sensor (×5+)</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Temperature</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">PT1000 Class A</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">TMP117</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Humidity</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">EE07 / DOL 104</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SHT31 / SHT35</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Combined T+RH</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL 114</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SHT31</p></td></tr></tbody></table></figure>

##   

<br>",,
367,Task,On hold,sensor selection [Particulate Matter],,,
368,Task,In progress,sensor selection [VOC],"**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).
    

<br>

results:  
**Comprehensive CO₂ and VOC Sensor Inventory for Chicken Farm Climate Control**

This inventory provides a detailed comparison of 12 sensors (6 CO₂ and 6 VOC) suitable for industrial climate control in closed chicken farms, focusing on the user&#39;s criteria: availability, price, manufacturer origin (non-boycott), communication protocol, measurement range, covered area, data/community support, and ESP32 integration requirements.

The sensors include the three previously recommended options, the six sensors from the user&#39;s provided list, and three additional industrial-grade sensors from EU and Chinese manufacturers.

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table"" style=""border-style:none;""><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Sensor (Gas)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Availability</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Price [USD] (Est.)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Manufacturer</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Origin (Non-Boycott)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Protocol</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Range Quantity</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Covered Area [m²]</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Data/Community Support</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">ESP32 External Peripherals Needed</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">1. Sensirion SGP41 (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">$15 - $25</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Sensirion</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Switzerland</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">I²C</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Relative VOC Index (0-500)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High (Market leader, dedicated ESP32 libraries)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Minimal. Direct I²C connection.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">2. ACI VOC-R (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Moderate</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">~$547</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">ACI</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">USA</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 (Modbus) / 4-20mA / 0-10V</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">0–1,000 ppb</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Room-mounted)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Moderate (Industrial focus, professional manuals)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 Transceiver or ADC/Current Loop Interface for analog outputs. Stable 16V-35V supply.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">3. Sensirion SGP30 (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">~$8</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Sensirion</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Switzerland</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">I²C</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">TVOC: 0–60,000 ppb</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High (Extensive community, low-cost)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Minimal. Direct I²C connection.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">4. Bosch BME680 (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">~$19 (Breakout)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Bosch Sensortec</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Germany</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">I²C / SPI</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Relative IAQ Index</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High (Extensive community, well-supported libraries)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Minimal. Direct I²C/SPI connection.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">5. Cubic P300 (VOC/Multi)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Moderate</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">$150 - $250</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Cubic Sensor and Instrument</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">China</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 (Modbus)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">TVOC: 0-5000 ppb</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Moderate (Growing industrial use, good documentation)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 Transceiver. Stable 5V supply.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">6. E+E EE891 (VOC/Multi)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Moderate</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">$300 - $400</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">E+E Elektronik</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Austria</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 (Modbus)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">TVOC: 0-100% (Relative)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">High (Industrial focus, excellent documentation)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">RS-485 Transceiver. Stable 12V/24V supply.</p></td></tr></tbody></table></figure><br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Sensor (Gas)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Availability</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Price [USD] (Est.)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Manufacturer</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Origin (Non-Boycott)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Protocol</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Range Quantity</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Covered Area [m²]</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Data/Community Support</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">ESP32 External Peripherals Needed</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Data sheet</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">1. Sensirion SGP41 (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">$15 - $25</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Sensirion</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Switzerland</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">I²C</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Relative VOC Index (0-500)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High (Market leader, dedicated ESP32 libraries)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Minimal. Direct I²C connection.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://nl.mouser.com/datasheet/3/1278/1/Sensirion_Gas_Sensors_Datasheet_SGP41.pdf"">SGP41 Datasheet</a></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">4. Bosch BME680 (VOC)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">~$19 (Breakout)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Bosch Sensortec</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Germany</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">I²C / SPI</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Relative IAQ Index</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">N/A (Module)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Very High (Extensive community, well-supported libraries)</p></td><td class=""op-uc-table--cell"" style=""border-color:#000000;border-width:0.5pt;padding:5pt;vertical-align:top;""><p class=""op-uc-p"">Minimal. Direct I²C/SPI connection.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://s3.amazonaws.com/snapeda/datasheet/BME680_Bosch_Sensortec.pdf?utm_source=snapeda&amp;utm_medium=referral&amp;utm_campaign=snapeda-suppression-datasheet"">BME680 Datasheet</a></p></td></tr></tbody></table></figure>

  
Extended list:  
  

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor (Output Gas)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Availability</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Price (USD)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Manufacturer (Origin)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Interface</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Range / Output (units)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Covered Area</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Data/Community Support</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">ESP32 Peripherals Needed</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP41</strong>(VOC sensor)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (in stock, ~1,300+)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$8 (1 pc)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Processed output: VOC index 0–500;Measurement range ~0–1000 ppm VOC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (chip/module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high (market leader; plentiful code/libraries)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C bus</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP30</strong>(TVOC + eCO₂)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (limited stock; product marked obsolete)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$8 (legacy/obsolete)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">TVOC (total VOC) 0–1000 ppb;CO₂-equivalent 0–1000 ppm</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (chip/module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high (well-known in IoT/hobbyist community)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C bus</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP40</strong>(VOC sensor)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (in production)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$6.70</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">VOC index 0–500;Measurement range ~0–1000 ppm VOC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (chip/module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high (successor to SGP30, broad library support)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C bus</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Bosch BME688</strong>(VOC/gas + P/T/H)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Very high (stock ≈18k)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">$8.65</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Bosch Sensortec (Germany)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C/SPI (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Detects VOCs (gas index) to ppb sensitivity</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (chip/module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (Bosch ecosystem; BSEC libraries available)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C/SPI bus</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>AMS/ScioSense iAQ-Core C</strong>(TVOC + eCO₂)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (discontinued module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$15–20 (est.)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">AMS AG (Austria)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">CO₂-eq 450–2000 ppm;TVOC 125–600 ppb</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (well-documented IAQ module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C bus</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>ScioSense ENS160</strong>(TVOC + eCO₂)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High (current product)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$6.78</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">ScioSense (Netherlands)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C/SPI (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Outputs equivalent CO₂ and TVOC (wideband MOX)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">N/A (chip/module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Moderate (newer product; growing support)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Minimal – direct I²C/SPI bus</p></td></tr></tbody></table></figure><figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">#</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor (short)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Manufacturer (origin)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">Est. price (USD)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Protocol / Output</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">VOC measurement type / range</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Accuracy / sensitivity (from datasheet)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">Operating voltage</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Availability (distributor)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Datasheet</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Product / distributor page</p></th><th class=""op-uc-table--cell op-uc-table--cell_head"" style=""text-align:right;""><p class=""op-uc-p"">PCB-integrable</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">1</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP41</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>$5–$10</strong> (IC, volume pricing varies)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">VOC + NOx index; preprocessed gas-index signals for IAQ (index outputs)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High sensitivity; on-chip hotplate + algorithm (see datasheet).</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">3.3 V typical (check datasheet).</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">In stock at distributors / reel options.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — SGP41 (Sensirion PDF). (<a class=""op-uc-link"" href=""https://sensirion.com/resource/datasheet/sgp41?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Mouser / Future Electronics product pages (SGP41). (<a class=""op-uc-link"" href=""https://www.mouser.com/ProductDetail/Sensirion/SGP41-D-R4?qs=A6eO%252BMLsxmRqwfOE5NYPVA%3D%3D&amp;srsltid=AfmBOooyTXnwbBf7zCZMW2OwoXfuJncheLKK58LyQWNLnJUXaxGmY6UG&amp;utm_source=chatgpt.com"">Mouser Electronics</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD IC (reel / DFN) — meant for PCB assembly</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">2</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP30</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$6–$12</strong> (chip / breakout ~$8–$20)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">TVOC &amp; eCO₂ (equivalent CO₂) — IAQ indices (TVOC range in datasheet)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Typical accuracy ~10–20% for TVOC/eCO₂ (algorithmic). See datasheet.</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">Chip-level low-voltage (use breakout for 3.3 V/5 V systems).</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Widely available (breakouts common); SGP30 legacy/obsolescence notes — check supply.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — SGP30 (Sensirion PDF). (<a class=""op-uc-link"" href=""https://sensirion.com/file/datasheet_sgp30?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Adafruit / distributors (SGP30 breakout pages). (<a class=""op-uc-link"" href=""https://www.microcenter.com/product/631790/adafruit-industries-sgp30-air-quality-sensor-breakout-voc-and-eco2-stemma-qt-qwiic?utm_source=chatgpt.com"">Micro Center</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD IC (DFN) or breakout</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">3</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP40</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$6–$12</strong> (chip; breakout slightly more)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">VOC index (humidity compensated) — intended for IAQ apps</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensitivity &amp; repeatability per datasheet (use Gas Index algorithm).</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">3.3 V typical (datasheet).</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">In production; distributor stock varies.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — SGP40 (Sensirion PDF). (<a class=""op-uc-link"" href=""https://sensirion.com/resource/datasheet/sgp40?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion product page / distributors. (<a class=""op-uc-link"" href=""https://sensirion.com/products/catalog/SGP40?utm_source=chatgpt.com"">Sensirion AG</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD IC (reel) / OEM use</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">4</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Bosch BME688</strong> (BME68x family)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Bosch Sensortec (Germany)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$8–$20</strong> (chip; breakout ~$15–$30)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C / SPI (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Gas/VOC index (uses AI/BSEC libs) — provides TVOC/IAQ values (ppb-level detection)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Good sensitivity; use Bosch BSEC library for compensated outputs; see datasheet.</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">1.2–3.6 V (chip-level); breakout boards provide 3.3 V.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Widely available at major distributors (Mouser, Digi-Key).</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — BME688 (Bosch PDF). (<a class=""op-uc-link"" href=""https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf?utm_source=chatgpt.com"">Bosch Sensortec</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Mouser / product page. (<a class=""op-uc-link"" href=""https://www.mouser.com/ProductDetail/Bosch-Sensortec/BME688?qs=IS%252B4QmGtzzqQoVDscqwx3A%3D%3D&amp;srsltid=AfmBOopL397B65yQkWINTEnbpgpigASHjr7WZc8DTllHpPhop7OhSnfL&amp;utm_source=chatgpt.com"">Mouser Electronics</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD IC (3×3 mm LGA) — suitable for PCB assembly</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">5</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>ScioSense ENS160</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">ScioSense (Netherlands)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$6–$12</strong> (IC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C / SPI (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">TVOC + eCO₂ (MOx multi-element sensor, processed outputs)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-MOX, humidity compensated; see ENS160 datasheet for sensitivity &amp; warm-up times.</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">1.67–1.98 V (chip); use breakout/regulator for 3.3 V systems.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">In stock at Mouser and other distributors.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — ENS160 (ScioSense PDF). (<a class=""op-uc-link"" href=""https://www.sciosense.com/wp-content/uploads/2023/12/ENS160-Datasheet.pdf?utm_source=chatgpt.com"">ScioSense</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Mouser product page (ENS160). (<a class=""op-uc-link"" href=""https://www.mouser.com/ProductDetail/ScioSense/ENS160-BGLT?qs=DRkmTr78QAQdCF%2F7WcskoA%3D%3D&amp;srsltid=AfmBOoogRc14Zk8d1ezPY0hUG-zDfW5ZnbDAlLpzM-3ZDWyQed1lS8yv&amp;utm_source=chatgpt.com"">Mouser Electronics</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>YES — SMD (LGA) — designed for PCB use</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">6</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>ACI VOC-R</strong> (room transmitter)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">ACI / WorkACI (USA distribution)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>~$300–$600</strong> (industrial transmitter) — outside $5–30 but included for industrial reference</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">RS-485 (Modbus), 4–20 mA, 0–10 V</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">TVOC: 0–1000 ppb (typical metal-oxide sensor output for TVOC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Industrial spec sheet lists accuracy (see datasheet)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p"">16–35 V (typical industrial line power)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Widely sold through HVAC distributors; datasheet &amp; vendor pages available.</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Datasheet — ACI VOC datasheet (PDF). (<a class=""op-uc-link"" href=""https://assets.kele.com/Catalog/08%20Gas_Specialty_Sensors/PDFs/ACI-VOC-Data-Sheet.pdf?utm_source=chatgpt.com"">Kele</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Product pages (ACI / RSP Supply / EnergyControl). (<a class=""op-uc-link"" href=""https://blackhawksupply.com/products/aci-voc-r?srsltid=AfmBOopAWv4LdRau-F-9Q1liO59qID2i85GtwOdmNnjpkDaiOwm09XKx&amp;utm_source=chatgpt.com"">Blackhawk Supply</a>)</p></td><td class=""op-uc-table--cell"" style=""text-align:right;""><p class=""op-uc-p""><strong>NO — room transmitter (not PCB SMD)</strong></p></td></tr></tbody></table></figure><br>

<br>

## ✅ VOC Sensor Selection (Budget-constrained)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Role</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Manufacturer (Origin)</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Est. Price</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Protocol / Output</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">VOC Type</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Operating Voltage</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Availability</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Datasheet</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Product link</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Why selected</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Reference (Reliable industrial-like)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGP40 VOC (digital module)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion / breakout (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>~$14–$35</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>I²C</strong> (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Relative VOC / IAQ index</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>3.3–5 V</strong> (module)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">— <i>uses SGP40 data</i> (<a class=""op-uc-link"" href=""https://nl.rs-online.com/web/p/environmental-sensor-ics/2047512?utm_source=chatgpt.com"">RS Online</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>DFRobot SGP40 breakout (~$14.50)</strong> (<a class=""op-uc-link"" href=""https://www.dfrobot.com/product-2241.html?utm_source=chatgpt.com"">DFRobot Electronics</a>) / <strong>Waveshare SGP40 (~$34.49)</strong> (<a class=""op-uc-link"" href=""https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor-for-easy-integration-into-air-treatment-devices-and-air-quality-monitors-i2c-bus-compatible-with-raspberry-pi-stm32/?utm_source=chatgpt.com"">The Retail Market</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Good stability &amp; digital output; fits budget; widely available; mature IAQ performance</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Distributed / PCB-integrable (×5)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensirion SGP41 DFN (SMD)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensirion (Switzerland)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>~$4–$10</strong> (IC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>I²C</strong> (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">VOC + NOx index</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>1.7–3.6 V</strong> (IC)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGP41 datasheet (PDF)</strong> (<a class=""op-uc-link"" href=""https://admin.sensirion.com/media/documents/5FE8673C/61E96F50/Sensirion_Gas_Sensors_Datasheet_SGP41.pdf?utm_source=chatgpt.com"">Sensirion Admin</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>RS Online SGP41 DFN listing (~€8/≈$9.70)</strong> (<a class=""op-uc-link"" href=""https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991?utm_source=chatgpt.com"">RS Components</a>)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">True PCB integrable SMD; very low cost; suitable for mass repeating; same tech family</p></td></tr></tbody></table></figure>

## 📌 Why These Choices

### 🔹 **Reference: SGP40 Digital VOC Module (~$14–$35)**

*   **Budget-friendly “industrial-ish” reference element:** While not a full standalone industrial transmitter, the **SGP40 gas sensor breakout module** is a _true Sensirion VOC sensor_ with a simple wired I²C interface – suitable as your system’s anchor. ([DFRobot Electronics](https://www.dfrobot.com/product-2241.html?utm_source=chatgpt.com))
    
*   **Digital interface (I²C)** — works cleanly into your ESP32 system without external ADC or analog conditioning. ([The Retail Market](https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor-for-easy-integration-into-air-treatment-devices-and-air-quality-monitors-i2c-bus-compatible-with-raspberry-pi-stm32/?utm_source=chatgpt.com))
    
*   **Operating voltage:** typically **3.3 V (5 V tolerant)** on modules; works well with your 5 V or 12/24 V via regulator. ([The Retail Market](https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor-for-easy-integration-into-air-treatment-devices-and-air-quality-monitors-i2c-bus-compatible-with-raspberry-pi-stm32/?utm_source=chatgpt.com))
    
*   **Good availability &amp; pricing:** breakout boards are plentiful and often under $30 – e.g., DFRobot’s ~**$14.50** version or Waveshare’s ~$34.49 variant. ([DFRobot Electronics](https://www.dfrobot.com/product-2241.html?utm_source=chatgpt.com))
    
*   **Not a module with industrial enclosure:** it’s a breakout — you’ll need enclosure/protection, but the core sensor IC is robust and digitally accessible.
    

📌 Example product pages:

*   SGP40 breakout by DFRobot — ~$14.50: [https://www.dfrobot.com/product-2241.html](https://www.dfrobot.com/product-2241.html) ([DFRobot Electronics](https://www.dfrobot.com/product-2241.html?utm_source=chatgpt.com))
    
*   Digital SGP40 module (Waveshare) — ~$34.49: [https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor](https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor) ([The Retail Market](https://www.retailmarket.net/products/digital-sgp40-voc-volatile-organic-compounds-gas-sensor-for-easy-integration-into-air-treatment-devices-and-air-quality-monitors-i2c-bus-compatible-with-raspberry-pi-stm32/?utm_source=chatgpt.com))
    

### 🔹 **Distributed / PCB-integrable: Sensirion SGP41 DFN (~$4–$10)**

*   **SMD / PCB mount device:** The **SGP41** is a small SMD (DFN) VOC + NOx sensor suitable for mounting directly on your custom boards. ([Sensirion Admin](https://admin.sensirion.com/media/documents/5FE8673C/61E96F50/Sensirion_Gas_Sensors_Datasheet_SGP41.pdf?utm_source=chatgpt.com))
    
*   **Digital I²C interface:** Easy to connect to ESP32 without extra components. ([RS Components](https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991?utm_source=chatgpt.com))
    
*   **Operating voltage:** Designed for 1.7–3.6 V (use your board’s regulator to supply 3.3 V). ([Sensirion Admin](https://admin.sensirion.com/media/documents/5FE8673C/61E96F50/Sensirion_Gas_Sensors_Datasheet_SGP41.pdf?utm_source=chatgpt.com))
    
*   **Low cost &amp; scalable:** Buying in small quantities (eg ~€8 ≈ $9.7) makes it ideal as a distributed sensor. ([RS Components](https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991?utm_source=chatgpt.com))
    
*   **Same technology family as SGP40:** This means your reference and distributed nodes use compatible MOx/CMOSens tech, making correction and calibration more consistent.
    

📌 Example product page:

*   SGP41 DFN (RS Online) — ~€8 / ~ $9.7: [https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991](https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991) ([RS Components](https://befr.rs-online.com/web/p/environmental-sensor-ics/2348991?utm_source=chatgpt.com))
    

## 🧠 Notes on Accuracy &amp; Function

*   **SGP40 &amp; SGP41** sensors are **VOC index / IAQ sensors** — they do not provide absolute concentrations of every VOC compound, but rather a processed gas index representing overall VOC activity. For ventilation control, this is generally sufficient. ([DFRobot Electronics](https://www.dfrobot.com/product-2241.html?utm_source=chatgpt.com))
    
*   They perform well in **trend detection** and **comparative monitoring** across multiple sensors, and can be calibrated relative to each other to improve spatial response performance.
    

## 📌 Wiring &amp; Integration Tips

*   Both reference module (SGP40 breakout) and distributed sensors (SGP41 SMD) communicate **via I²C**, which is perfect for multi-node systems with ESP32.
    
*   Use proper pull-ups on the I²C bus and short lines for best signal quality.
    
*   Power them from a **3.3 V rail** regulated from your 5 V/12 V system.
    

## ⚡ Summary Recommendation

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Role</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Best Use</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Reference / Source of Truth</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGP40 module</strong> (~$14–$35)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Strong digital sensor to anchor 5 nodes; wired I²C; fits your cost cap.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Distributed / PCB sensors (×5)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>SGP41 DFN</strong> (~$4–$10)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">PCB-friendly, same family tech; easy integration to ESP32; low per-node cost.</p></td></tr></tbody></table></figure>

##   

<br>",,
369,Task,New,sensor selection [Light],"**Criteria:**

*   Availability.
    
*   Price \[USD\].
    
*   Manufacturer. \[\]not boycott\].
    
*   peripheral or communication protocoled.
    
*   Range quantity \[ex 0c to 100c\].
    
*   Covered Area, \[m2\]. i**f possible.**
    
*   Data. \[public data about sensor\]
    
*   What type of external peripherals will be needed with esp-32 like (RS-485).
    

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Sensor (Example Product)</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Interface/Output</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Measured Range</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Price (approx)</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Notes</strong></p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>BH1750 (Adafruit BH1750 Breakout)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital, lux)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–65,535 lux</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$4.50</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Low-cost 16-bit lux sensor; up to ~65k lux (can extend to ~100k). Plug-&amp;-play; no ADC needed.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>VEML7700 (Adafruit VEML7700)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital, lux)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">0–120,000 lux</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$4.95</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Wide-range ambient-light sensor; 16-bit resolution, 0.0036 lux sensitivity. 0–120k lux range. Easy library support.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>TSL2591 (Adafruit TSL2591)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C (digital, lux)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~0.188 μlux–88,000 lux</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$6.95</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High-dynamic-range sensor (visible+IR); measures from ultra-dark (0.000188 lux) to very bright (88k lux). Good for both indoor and bright outdoor light.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>ALS-PT19 Analog Photodiode (Adafruit)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (voltage)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~Analog 0–VCC (rises with light)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$2.50</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Simple analog photodiode breakout (PT19). Voltage output increases with light. Requires ADC on MCU. Covers roughly indoor light levels.</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>TEMT6000 Analog Sensor (DFRobot)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (voltage)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">1–1000 lux</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$5.90</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog ambient-light sensor (TEMT6000). Range ~1–1000 lux, human-eye spectral response. 0–5 V output proportional to light (max ~1000 lux).</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Generic LDR Module (photoresistor)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Analog (voltage)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~0–10,000+ lux (uncalibrated)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$1–3 (clone modules)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Cheap photocell module (often with LM393 comparator). Analog output (0–V) roughly ~0–10k lux. Very low cost but non-linear and needs calibration. Often used with a simple voltage divider.</p></td></tr></tbody></table></figure><br>

# 4\. Light Intensity (Illuminance / Lux)

## 4.1 Selection Criteria

Light sensors in poultry farms are used for **photoperiod control, uniformity of illumination, and energy optimization**, not laboratory-grade optical measurements.

Key criteria:

*   Stable and repeatable lux readings
    
*   Digital output preferred to reduce ADC noise
    
*   Wide enough dynamic range to handle:
    
    *   Low night lighting (1–20 lux)
        
    *   Daylight intrusion from windows (1,000–20,000 lux)
        
*   PCB compatibility for distributed sensing
    
*   Low cost to allow multiple sensors per house
    
*   Minimal temperature drift
    

## 4.2 Recommended Light Sensors

### Criteria

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><br data-cke-filler=""true""></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Reference Sensor</strong></p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p""><strong>Distributed PCB Sensor (×5+)</strong></p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor Name</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>VEML7700 (module)</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>BH1750 (module)</strong></p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Manufacturer</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Vishay (USA)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Rohm (Japan)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Sensor Technology</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Silicon photodiode + ADC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Silicon photodiode + ADC</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Measurement Output</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Absolute lux (digital)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Absolute lux (digital)</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Role in System</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Lighting control reference</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Spatial light uniformity</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Typical Price</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$4–6</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~$3–5</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Best Use</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Day/night decision, control anchor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-point comparison</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Communication</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">I²C</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Integration Form</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">PCB module / SMD IC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">PCB module / SMD IC</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Lux Range</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~0–120,000 lux</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">~0–65,000 lux</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>PCB Compatibility</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Excellent</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Excellent</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Datasheet</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.vishay.com/docs/84286/veml7700.pdf"">https://www.vishay.com/docs/84286/veml7700.pdf</a></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><a class=""op-uc-link"" href=""https://www.rohm.com/products/sensors/light-sensors/bh1750fvi-product"">https://www.rohm.com/products/sensors/light-sensors/bh1750fvi-product</a></p></td></tr></tbody></table></figure>

### Why these two?

#### ✅ **VEML7700 — Reference Sensor**

*   Very wide dynamic range (handles sunlight through windows)
    
*   Good low-lux sensitivity (night mode / dim light)
    
*   Stable, temperature-compensated readings
    
*   Digital output → no ADC drift
    
*   Still **cheap enough** to deploy as a reference
    

This becomes your **lighting “truth anchor”**.

#### ✅ **BH1750 — Distributed Sensor**

*   Extremely common and well understood
    
*   Cheap and reliable
    
*   Good enough accuracy for **relative comparison**
    
*   Simple I²C integration
    
*   Very low firmware complexity
    

Ideal for **multiple mounting points** across the barn.

## 4.3 Architecture Notes (Light)

### System Philosophy

Light is **not a safety-critical parameter** like NH₃.  
Therefore:

*   No electrochemical “truth” sensor needed
    
*   Digital lux sensors are sufficient
    

Recommended architecture:

```text
[VEML7700]
     ↓
Reference lux value
     ↓
Lighting control decision
     ↓
[BH1750 × N nodes]
```

### Recommended Deployment

*   **1 × VEML7700**:
    
    *   Near center of the barn
        
    *   Shielded from direct lamp glare
        
*   **5–10 × BH1750**:
    
    *   Near walls
        
    *   Near windows
        
    *   Near feeder/drinker lines
        
    *   At bird-eye height
        

This ensures:

*   Uniform lighting
    
*   Detection of bright/dark zones
    
*   Compensation for daylight leakage
    

### Firmware Strategy

*   Read lux every 1–5 seconds
    
*   Apply:
    
    *   Moving average (5–30 samples)
        
    *   Daylight detection threshold
        
*   Control logic example:
    
    *   If average lux &lt; target → increase artificial light
        
    *   If lux &gt; target (sunlight) → dim or turn off lamps
        

## 4.4 Why NOT Industrial Sensors for This Role

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sensor</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Reason Not Selected</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">DOL 16</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Excellent, but <strong>far above budget</strong> and analog-only</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Aranet LUX</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Wireless IoT, expensive, slow update</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Apogee PAR</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Measures PAR, not lux; overkill</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Li-Cor</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Research-grade, unnecessary</p></td></tr></tbody></table></figure>

Industrial sensors are useful for **certification or auditing**, but **not needed** for control loops in closed poultry houses.

## 4.5 Final Recommendation (Clear &amp; Actionable)

### ✅ Use this pair:

*   **Reference Light Sensor:**  
    **VEML7700**
    
*   **Distributed / PCB Sensor:**  
    **BH1750**
    

This mirrors your VOC and NH₃ strategy exactly:

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Parameter</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Strategy</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">VOC</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">One reference + many cheap</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">NH₃</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">One electrochemical + many MOS</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>Light</strong></p></td><td class=""op-uc-table--cell""><p class=""op-uc-p""><strong>One wide-range lux + many cheap lux</strong></p></td></tr></tbody></table></figure><br>

<br>",,
370,Task,New,Backup plan for cloud server,,,
371,Task,New,OTA arch,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
372,Task,New,main hub APIS,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
373,Task,New,Event system,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
374,Task,New,Sensor manager,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
375,Task,New,STM,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
376,Task,New,MCs,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
377,Task,New,Diag taks,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
378,Task,New,Error handling,"Criteria:

*   Responsibilities.
    
*   Interfaces.
    
*   Dependencies.
    
*   Constrains.
    
*   Link to requirement.
    
*   (Takes and periodicity and priority).
    
*   Expected behavior (for testing)
    
    *   Behavior diagram with dependencies.
        
    *   Use case component.",,
379,Task,On hold,Presentation of HW design,,,
380,Task,In progress,Review sensor list,1- Temp &amp; Humid,,
381,Task,In progress,review sensor list,"Review:&nbsp;

1- NH3

<br>",,
382,Task,New,Implement test arena,,,
383,Task,New,implement monitor page for asf resources,,,
388,Feature,In specification,[F-DAQ-01] Multi-Sensor Data Acquisition,"The Sensor Hub shall acquire environmental data from multiple heterogeneous sensors installed on the device.\n\nThis feature enables concurrent acquisition of temperature, humidity, CO2, NH3, VOC, particulate matter, and light sensors.\n\nEach sensor is associated with a predefined hardware slot and a dedicated driver abstraction.\n\nOnly sensors detected as present and enabled shall be initialized and included in the acquisition cycle.",,includes(#394); includes(#395); includes(#396); includes(#393)
389,Feature,In specification,[F-DAQ-02] High-Frequency Sampling and Local Filtering,The Sensor Hub shall perform high-frequency sampling for each enabled sensor during an acquisition cycle.\n\nEach sensor shall be sampled multiple times (default: 10 samples per cycle) within a bounded time window.\n\nThe system shall apply a local filtering mechanism to raw samples to generate a single representative sensor value.\n\nFiltering is performed locally on the Sensor Hub to reduce noise and improve data stability before further processing.,,includes(#399); includes(#398); includes(#397); includes(#393)
390,Feature,In specification,[F-DAQ-03] Timestamped Sensor Data Generation,"The Sensor Hub shall generate a timestamped sensor data record for each processed sensor value.\n\nTimestamps shall be generated after completion of local filtering and shall represent the effective measurement time.\n\nEach sensor data record shall include sensor identifier, sensor type, filtered value, unit of measurement, timestamp, and data validity status.\n\nTimestamped data shall be made available for persistence and on-demand communication with the Main Hub.",,includes(#400); includes(#401); includes(#402); includes(#403); includes(#393)
393,Feature,In specification,[F-DAQ] Sensor Data Acquisition Features,"# **ASF Sensor Hub**

## **Feature Engineering Specification**

## **Sensor Data Acquisition Features**

## **1\. Feature Overview**

### **Feature Name**

Sensor Data Acquisition Features

### **Feature ID**

FEAT-DAQ

### **Subsystem**

ASF Sensor Hub (Sub-Hub)

### **Target Platform**

ESP32-S3–based embedded system

### **Scope**

This feature defines the capabilities of the Sensor Hub related to:

*   Environmental sensor data acquisition
    
*   Local preprocessing and filtering
    
*   Timestamping and preparation of sensor data for persistence and communication
    

This feature **does NOT include**:

*   Main Hub processing
    
*   Cloud analytics
    
*   Control logic
    
*   OTA, diagnostics, or persistence mechanisms (referenced only as dependencies)
    

## **2\. Purpose and Engineering Rationale**

Modern poultry farm automation systems require **high-resolution, reliable, and time-correlated environmental data** to enable:

*   Accurate environmental control
    
*   Early fault detection
    
*   Advanced analytics and machine learning
    

The Sensor Data Acquisition feature ensures:

*   Deterministic sensor sampling
    
*   Noise-resilient measurements
    
*   Temporal traceability of data
    
*   Decoupling of acquisition from communication and control
    

This aligns with **distributed intelligence principles** used in leading international poultry automation systems.

## **3\. Feature Decomposition**

The Sensor Data Acquisition feature is decomposed into the following sub-features:

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Sub-Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Name</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Multi-Sensor Data Acquisition</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">High-Frequency Sampling and Local Filtering</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Timestamped Sensor Data Generation</p></td></tr></tbody></table></figure>

## **4\. Functional Description**

### **4.1 F-DAQ-01: Multi-Sensor Data Acquisition**

#### **Description**

The Sensor Hub acquires environmental data from multiple heterogeneous sensors connected to dedicated hardware interfaces.

#### **Supported Sensor Types**

*   Temperature
    
*   Relative Humidity
    
*   Carbon Dioxide (CO₂)
    
*   Ammonia (NH₃)
    
*   Volatile Organic Compounds (VOC)
    
*   Particulate Matter (PM)
    
*   Light Intensity
    

Each sensor:

*   Is mapped to a predefined hardware slot
    
*   Has a dedicated driver abstraction
    
*   Can be independently enabled or disabled
    

#### **Key Characteristics**

*   Concurrent sensor handling
    
*   Modular sensor driver architecture
    
*   Runtime awareness of sensor presence
    

### **4.2 F-DAQ-02: High-Frequency Sampling and Local Filtering**

#### **Description**

For each enabled sensor, the system performs multiple raw readings per acquisition cycle and applies a local filtering mechanism to produce a single representative value.

#### **Sampling Behavior**

*   Each sensor is sampled **N times per cycle** (default: 10)
    
*   Sampling occurs within a bounded time window
    
*   Sampling frequency is configurable via Machine Constants
    

#### **Filtering Behavior**

*   Filtering is executed locally on the Sensor Hub
    
*   Filtering algorithms are abstracted and replaceable
    
*   Examples (non-exhaustive):
    
    *   Moving average
        
    *   Median filter
        
    *   Outlier rejection
        

#### **Objective**

*   Reduce sensor noise
    
*   Improve data stability
    
*   Avoid propagating raw sensor jitter upstream
    

### **4.3 F-DAQ-03: Timestamped Sensor Data Generation**

#### **Description**

Each processed sensor value is associated with a timestamp generated by the Sensor Hub.

#### **Timestamp Characteristics**

*   Generated after filtering completion
    
*   Represents the effective measurement time
    
*   Based on system time (RTC or synchronized clock)
    

#### **Sensor Data Record**

Each record includes:

*   Sensor ID
    
*   Sensor type
    
*   Filtered value
    
*   Unit of measurement
    
*   Timestamp
    
*   Data validity status
    

## **5\. Operational Flow**

### **Normal Acquisition Cycle**

1.  Detect enabled sensors
    
2.  Initialize sensor drivers (if not already active)
    
3.  Perform high-frequency sampling per sensor
    
4.  Apply local filtering
    
5.  Generate timestamp
    
6.  Create sensor data record
    
7.  Forward data to:
    
    *   Data Persistence component
        
    *   Communication component (on request)
        

## **6\. Constraints and Assumptions**

### **Constraints**

*   Sensor acquisition must not block system-critical tasks
    
*   Sampling and filtering must complete within a bounded cycle time
    
*   Memory usage must be deterministic
    

### **Assumptions**

*   Sensor presence detection is handled by a separate feature
    
*   Time synchronization is provided by another system component
    
*   Storage and communication are decoupled from acquisition
    

## **7\. Architecture Diagram (PlantUML)**

### **7.1 Sensor Data Acquisition – Logical View**

<br>

`@startuml package ""Sensor Hub"" { &nbsp;component ""Sensor Drivers"" as SD  component ""Sampling Engine"" as SE  component ""Filtering Engine"" as FE  component ""Timestamp Service"" as TS  component ""Sensor Data Buffer"" as DB  SD --> SE : raw samples  SE --> FE : sampled data  FE --> TS : filtered value  TS --> DB : timestamped record } @enduml`

### **7.2 Acquisition Cycle Sequence Diagram**

<br>

`@startuml participant ""Sensor Driver"" as S participant ""Sampling Engine"" as SE participant ""Filtering Engine"" as FE participant ""Timestamp Service"" as TS S -> SE : read() loop N samples  SE -> S : sample() end SE -> FE : raw sample set FE -> TS : filtered value TS -> FE : timestamp @enduml`

## **8\. Formal System SHALL Requirements**

### **8.1 Requirement Style**

*   Each requirement uses **“The system shall …”**
    
*   Each requirement has a unique ID
    
*   Requirements are atomic and testable
    

### **8.2 Requirements List**

#### **Multi-Sensor Acquisition**

*   **REQ-DAQ-001**  
    The system shall support acquisition of data from multiple environmental sensor types simultaneously.
    
*   **REQ-DAQ-002**  
    The system shall provide a dedicated software driver abstraction for each supported sensor type.
    
*   **REQ-DAQ-003**  
    The system shall acquire sensor data only from sensors detected as present and enabled.
    

#### **High-Frequency Sampling &amp; Filtering**

*   **REQ-DAQ-004**  
    The system shall sample each enabled sensor multiple times within a single acquisition cycle.
    
*   **REQ-DAQ-005**  
    The system shall apply a local filtering mechanism to raw sensor samples to produce a single representative value.
    
*   **REQ-DAQ-006**  
    The system shall allow configuration of sampling count and filtering parameters via system configuration data.
    

#### **Timestamped Data Generation**

*   **REQ-DAQ-007**  
    The system shall associate each processed sensor value with a timestamp.
    
*   **REQ-DAQ-008**  
    The system shall generate timestamps after completion of filtering.
    
*   **REQ-DAQ-009**  
    The system shall include sensor identifier, sensor type, value, unit, timestamp, and validity status in each sensor data record.
    

## **9\. Feature-to-Requirement Traceability**

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Requirement IDs</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">REQ-DAQ-001, REQ-DAQ-002, REQ-DAQ-003</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">REQ-DAQ-004, REQ-DAQ-005, REQ-DAQ-006</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">REQ-DAQ-007, REQ-DAQ-008, REQ-DAQ-009</p></td></tr></tbody></table></figure>",,includes(#390); includes(#388); includes(#389)
394,Requirements,In specification,[SR-DAQ-001] Support Multi-Sensor Environmental Data Acquisition,"The system shall support simultaneous acquisition of environmental data from multiple sensor types, including temperature, humidity, CO2, NH3, VOC, particulate matter, and ambient light.\n\nThis requirements traces to feature [F-DAQ-01].",,includes(#388)
395,Requirements,In specification,[SR-DAQ-002] Dedicated Sensor Slot Mapping,The system shall assign each supported sensor type to a predefined and unique hardware slot to prevent incorrect sensor insertion or configuration.\n\nThis requirements traces to feature [F-DAQ-01].,,includes(#388)
396,Requirements,In specification,[SR-DAQ-003] Sensor Presence Detection,The system shall detect the physical presence of each sensor via a dedicated hardware detection signal prior to sensor initialization.\n\nThis requirements traces to feature [F-DAQ-01].,,includes(#388)
397,Requirements,In specification,[SR-DAQ-004] Conditional Sensor Initialization,The system shall initialize and activate only those sensors that are detected as present and enabled during system startup or reinitialization.\n\nThis requirements traces to feature [F-DAQ-01].,,includes(#389)
398,Requirements,In specification,[SR-DAQ-005] High-Frequency Sensor Sampling,"The system shall sample each enabled sensor multiple times within a single acquisition cycle, with a default of ten (10) samples per sensor per cycle.\n\nThis requirements traces to feature [F-DAQ-02].",,includes(#389)
399,Requirements,In specification,[SR-DAQ-006] Local Sensor Data Filtering,The system shall apply a local filtering mechanism to raw sensor samples to produce a single filtered sensor value per acquisition cycle.\n\nThe filtering mechanism shall execute on the Sensor Hub.\n\nThis requirements traces to feature [F-DAQ-02].,,includes(#389)
400,Requirements,In specification,[SR-DAQ-007] Deterministic Sampling Window,The system shall complete each sensor’s sampling and filtering process within a bounded and deterministic time window to ensure real-time behavior.\n\nThis requirements traces to feature [F-DAQ-02].,,includes(#390)
401,Requirements,In specification,[SR-DAQ-008] Timestamp Generation for Sensor Data,The system shall generate a timestamp for each filtered sensor value upon completion of the acquisition and filtering process.\n\nThis requirements traces to feature [F-DAQ-03].,,includes(#390)
402,Requirements,In specification,[SR-DAQ-009] Timestamped Sensor Data Record Structure,"The system shall generate a timestamped sensor data record containing at minimum the sensor identifier, sensor type, filtered value, unit of measurement, timestamp, and data validity status.\n\nThis requirements traces to feature [F-DAQ-03].",,includes(#390)
403,Requirements,In specification,[SR-DAQ-010] Availability of Latest Sensor Data,The system shall maintain the most recent timestamped sensor data record in memory and make it available for persistence and on-demand communication requests.\n\nThis requirements traces to feature [F-DAQ-03].,,includes(#390)
405,Feature,In specification,[F-DQC-01] Automatic Sensor Detection,The system provides automatic detection of physically connected sensors on the Sensor Hub. Each sensor slot includes a dedicated detection mechanism that allows the system to identify whether a sensor is installed and eligible for initialization. Detected sensors are dynamically registered during system startup or reinitialization.,,includes(#411); includes(#410); includes(#409); includes(#424)
406,Feature,In specification,[F-DQC-02] Sensor Type Enforcement,"The system enforces strict sensor-to-slot compatibility. Each physical sensor slot is assigned to a specific sensor type, and incorrect sensor insertion is detected and rejected to prevent invalid data acquisition and configuration errors.",,includes(#414); includes(#413); includes(#412); includes(#424)
407,Feature,In specification,[F-DQC-03] Sensor Failure Detection,"The system continuously monitors sensor behavior to detect failures such as disconnection, non-responsiveness, or invalid measurements. Failed sensors are isolated, logged, and reported to the Main Hub.",,includes(#418); includes(#417); includes(#416); includes(#415); includes(#424)
408,Feature,In specification,[F-DQC-04] Machine Constants & Calibration Management,"The system manages Machine Constants and calibration parameters defining sensor configuration, calibration coefficients, and communication identifiers. These parameters are persisted in non-volatile storage and may be updated remotely via the Main Hub.",,includes(#422); includes(#421); includes(#420); includes(#423); includes(#419); includes(#424)
409,Requirements,In specification,[SR-DQC-001] Detect Sensor Presence,The system shall detect the physical presence of each sensor using a dedicated hardware-based detection mechanism. This requirement traces to feature [F-DQC-01].,,includes(#405)
410,Requirements,In specification,[SR-DQC-002] Perform Sensor Detection During Initialization,The system shall perform sensor presence detection during system startup and after any reinitialization or reconfiguration event. This requirement traces to feature [F-DQC-01].,,includes(#405)
411,Requirements,In specification,[SR-DQC-003] Conditional Sensor Initialization,The system shall initialize and activate only sensors that are detected as present. This requirement traces to feature [F-DQC-01].,,includes(#405)
412,Requirements,In specification,[SR-DQC-004] Assign Fixed Sensor Slot Types,The system shall assign each physical sensor slot to a predefined sensor type. This requirement traces to feature [F-DQC-02].,,includes(#406)
413,Requirements,In specification,[SR-DQC-005] Verify Sensor Type Compatibility,The system shall verify that a detected sensor matches the expected sensor type for its assigned slot. This requirement traces to feature [F-DQC-02].,,includes(#406)
414,Requirements,In specification,[SR-DQC-006] Reject Invalid Sensor Configurations,The system shall reject and report any sensor-slot mismatch as a diagnostic event. This requirement traces to feature [F-DQC-02].,,includes(#406)
415,Requirements,In specification,[SR-DQC-007] Monitor Sensor Health,The system shall continuously monitor sensor responsiveness and signal validity during normal operation. This requirement traces to feature [F-DQC-03].,,includes(#407)
416,Requirements,In specification,[SR-DQC-008] Detect Sensor Failure Conditions,"The system shall detect sensor failures including disconnection, non-responsiveness, and out-of-range measurement values. This requirement traces to feature [F-DQC-03].",,includes(#407)
417,Requirements,In specification,[SR-DQC-009] Isolate Failed Sensors,The system shall mark detected faulty sensors as defective and exclude them from data acquisition and reporting. This requirement traces to feature [F-DQC-03].,,includes(#407)
418,Requirements,In specification,[SR-DQC-010] Report Sensor Failures,The system shall report detected sensor failures to the Main Hub with timestamps and failure classification. This requirement traces to feature [F-DQC-03].,,includes(#407)
419,Requirements,In specification,[SR-DQC-011] Maintain Machine Constants Dataset,"The system shall maintain a Machine Constants dataset defining sensor configuration, calibration parameters, and communication identifiers. This requirement traces to feature [F-DQC-04].",,includes(#408)
420,Requirements,In specification,[SR-DQC-012] Persist Machine Constants,The system shall store the Machine Constants dataset in non-volatile storage. This requirement traces to feature [F-DQC-04].,,includes(#408)
421,Requirements,In specification,[SR-DQC-013] Load Machine Constants at Startup,The system shall load and apply the Machine Constants dataset during system initialization. This requirement traces to feature [F-DQC-04].,,includes(#408)
422,Requirements,In specification,[SR-DQC-014] Support Remote Machine Constants Update,The system shall support remote updates of the Machine Constants dataset initiated by the Main Hub. This requirement traces to feature [F-DQC-04].,,includes(#408)
423,Requirements,In specification,[SR-DQC-015] Controlled Reinitialization After Update,The system shall apply updated Machine Constants only after executing a controlled teardown and reinitialization procedure. This requirement traces to feature [F-DQC-04].,,includes(#408)
424,Feature,In specification,[FG-DQC-] Data Quality & Calibration Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

# Feature Engineering Specification

## Data Quality &amp; Calibration Features

**Feature Group ID:** FG-DQC  
**Scope:** Sensor Hub (Sub-Hub only)  
**Target Platform:** ESP32-S3–based Sensor Hub  
**Applies To:** Indoor poultry farm sensor hubs  
**Dependencies:** Sensor Data Acquisition Features (FG-DAQ), Diagnostics Features (FG-DIAG), Persistence / DP Stack

## 1\. Purpose and Objectives

The **Data Quality &amp; Calibration Features** ensure that all sensor data generated by the Sensor Hub is **valid, trustworthy, correctly classified, and calibrated** throughout the system lifecycle. These features provide mechanisms for:

*   Automatic identification of connected sensors
    
*   Enforcing correct sensor–slot compatibility
    
*   Early detection and isolation of faulty sensors
    
*   Centralized management of machine constants and calibration parameters
    

The goal is to maintain **high data integrity**, reduce commissioning errors, support **remote reconfiguration**, and ensure safe operation during updates or failures.

## 2\. Feature Overview and Relationships

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature Name</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Primary Objective</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related Features</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Automatic Sensor Detection</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Detect connected sensors dynamically</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DAQ-01, F-DIAG-01</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensor Type Enforcement</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Prevent incorrect sensor-slot usage</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-01</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Sensor Failure Detection</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Identify and isolate faulty sensors</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-02</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-04</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Machine Constants &amp; Calibration Management</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Manage static configuration and calibration</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">OTA, Persistence, Teardown</p></td></tr></tbody></table></figure>

## 3\. Functional Feature Descriptions

### 3.1 F-DQC-01: Automatic Sensor Detection

**Description**  
The Sensor Hub shall automatically detect which sensors are physically connected at runtime. Each sensor slot provides a dedicated detection mechanism (e.g., GPIO presence pin or ID signal) that allows the system to determine whether a sensor is installed.

Detected sensors are dynamically initialized and incorporated into the data acquisition workflow without requiring firmware changes.

**Key Capabilities**

*   Hardware-based presence detection
    
*   Runtime sensor enumeration
    
*   Dynamic initialization during boot or reconfiguration
    
*   Integration with diagnostics and data acquisition
    

### 3.2 F-DQC-02: Sensor Type Enforcement

**Description**  
Each physical sensor slot on the Sensor Hub is dedicated to a specific sensor type. The system enforces sensor-slot compatibility to prevent incorrect sensor insertion (e.g., humidity sensor in temperature slot).

This enforcement is achieved via electrical identification, pin mapping, or firmware configuration defined in Machine Constants.

**Key Capabilities**

*   Fixed sensor-to-slot mapping
    
*   Sensor identity verification
    
*   Rejection of invalid sensor configurations
    
*   Diagnostic reporting of configuration violations
    

### 3.3 F-DQC-03: Sensor Failure Detection

**Description**  
The Sensor Hub continuously monitors sensor behavior to detect failures such as disconnection, out-of-range values, non-responsive sensors, or abnormal signal patterns.

Detected sensor failures are classified, logged, timestamped, and reported to the Main Hub. Failed sensors are excluded from control and analytics workflows to prevent propagation of invalid data.

**Key Capabilities**

*   Runtime health monitoring
    
*   Failure classification
    
*   Fault isolation
    
*   Diagnostic event generation
    

### 3.4 F-DQC-04: Machine Constants &amp; Calibration Management

**Description**  
The system maintains a **Machine Constants (MC)** dataset that defines static and semi-static configuration parameters for the Sensor Hub, including:

*   Installed sensor types and slots
    
*   Communication identifiers and addressing
    
*   Calibration coefficients and offsets
    
*   Sensor-specific limits and scaling
    

Machine Constants are persisted in non-volatile storage (SD card) and loaded during system initialization. Updates may be received from the Main Hub and applied via a controlled teardown and reinitialization process.

**Key Capabilities**

*   Persistent configuration storage
    
*   Runtime loading and validation
    
*   Remote update support
    
*   Controlled reinitialization sequence
    

## 4\. System Requirements (Formal SHALL Statements)

### 4.1 Automatic Sensor Detection

**SR-DQC-001**  
The system shall detect the presence of each sensor using a dedicated hardware detection mechanism.

**SR-DQC-002**  
The system shall perform sensor presence detection during system startup and after any reinitialization event.

**SR-DQC-003**  
The system shall initialize only those sensors that are detected as present.

### 4.2 Sensor Type Enforcement

**SR-DQC-004**  
The system shall assign each sensor slot to a predefined sensor type.

**SR-DQC-005**  
The system shall verify that the detected sensor matches the expected sensor type for the slot.

**SR-DQC-006**  
The system shall reject and report any sensor-slot mismatch as a diagnostic event.

### 4.3 Sensor Failure Detection

**SR-DQC-007**  
The system shall continuously monitor sensor responsiveness and signal validity during operation.

**SR-DQC-008**  
The system shall detect sensor failures including disconnection, non-responsiveness, and invalid measurement ranges.

**SR-DQC-009**  
The system shall mark a failed sensor as defective and exclude it from data reporting.

**SR-DQC-010**  
The system shall report detected sensor failures to the Main Hub with timestamps and failure classification.

### 4.4 Machine Constants &amp; Calibration Management

**SR-DQC-011**  
The system shall maintain a Machine Constants dataset defining sensor configuration, calibration parameters, and communication identifiers.

**SR-DQC-012**  
The system shall persist the Machine Constants dataset in non-volatile storage.

**SR-DQC-013**  
The system shall load and apply Machine Constants during system initialization.

**SR-DQC-014**  
The system shall support remote updates of the Machine Constants dataset initiated by the Main Hub.

**SR-DQC-015**  
The system shall apply updated Machine Constants only after executing a controlled teardown and reinitialization sequence.

## 5\. Traceability Summary

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DQC-001 → SR-DQC-003</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DQC-004 → SR-DQC-006</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DQC-007 → SR-DQC-010</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DQC-04</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DQC-011 → SR-DQC-015</p></td></tr></tbody></table></figure>

##",,includes(#408); includes(#407); includes(#406); includes(#405)
425,Feature,In specification,[FG-COM] Communication Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

# Feature Engineering Specification

## Communication Features

**Feature Group ID:** FG-COM  
**Scope:** Sensor Hub (Sub-Hub only)  
**Target Platform:** ESP32-S3–based Sensor Hub  
**Applies To:** Indoor poultry farm sensor hubs  
**Dependencies:**

*   Sensor Data Acquisition (FG-DAQ)
    
*   Data Quality &amp; Calibration (FG-DQC)
    
*   Diagnostics &amp; Health Monitoring (FG-DIAG)
    
*   Security &amp; Safety Features (FG-SEC)
    

## 1\. Purpose and Objectives

The **Communication Features** define how the Sensor Hub exchanges data and control information with external entities. These features ensure that sensor data, diagnostics, configuration updates, and control requests are transferred in a **reliable, secure, and deterministic manner**.

The communication layer is designed to:

*   Support hierarchical farm architecture (Sensor Hub → Main Hub)
    
*   Enable on-demand and event-driven data transfer
    
*   Allow limited peer-to-peer communication between Sensor Hubs
    
*   Maintain robustness under intermittent connectivity
    

## 2\. Feature Overview and Relationships

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature Name</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Primary Objective</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related Features</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Main Hub Communication</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Primary uplink/downlink with Main Hub</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">OTA, Diagnostics, MC Management</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">On-Demand Data Broadcasting</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Provide latest data upon request</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DAQ, DP Stack</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Peer Sensor Hub Communication</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Limited hub-to-hub coordination</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">System Management</p></td></tr></tbody></table></figure>

## 3\. Functional Feature Descriptions

### 3.1 F-COM-01: Main Hub Communication

**Description**  
The Sensor Hub shall establish and maintain a bidirectional communication channel with the Main Hub. This channel is used for transmitting sensor data, diagnostics, alarms, and status information, as well as receiving commands, firmware updates, and Machine Constants updates.

The communication mechanism shall support reliable delivery, message integrity verification, and connection state monitoring.

**Key Capabilities**

*   Bidirectional communication
    
*   Command and response handling
    
*   Diagnostics and status reporting
    
*   Integration with OTA and MC updates
    

### 3.2 F-COM-02: On-Demand Data Broadcasting

**Description**  
The Sensor Hub shall support on-demand transmission of the most recent sensor data upon request from the Main Hub. This allows the Main Hub to query real-time conditions without waiting for periodic reporting cycles.

Data broadcasts include timestamped sensor values and associated validity status.

**Key Capabilities**

*   Request/response data exchange
    
*   Latest-value data delivery
    
*   Timestamp and validity inclusion
    
*   Low-latency response
    

### 3.3 F-COM-03: Peer Sensor Hub Communication

**Description**  
Sensor Hubs shall be capable of limited peer-to-peer communication for coordination purposes such as connectivity checks, time synchronization assistance, or basic status exchange.

Peer communication is optional, demand-driven, and does not replace the primary communication path through the Main Hub.

**Key Capabilities**

*   Hub-to-hub message exchange
    
*   Minimal command set
    
*   No dependency on centralized infrastructure
    
*   Isolation from control logic
    

## 4\. System Requirements (Formal SHALL Statements)

### 4.1 Main Hub Communication

**SR-COM-001**  
The system shall support bidirectional communication between the Sensor Hub and the Main Hub.

**SR-COM-002**  
The system shall transmit sensor data, diagnostics, and system status information to the Main Hub.

**SR-COM-003**  
The system shall receive commands, configuration updates, and firmware update requests from the Main Hub.

**SR-COM-004**  
The system shall monitor and report the communication link status with the Main Hub.

### 4.2 On-Demand Data Broadcasting

**SR-COM-005**  
The system shall support on-demand requests from the Main Hub for sensor data.

**SR-COM-006**  
The system shall respond to on-demand data requests with the most recent timestamped sensor data.

**SR-COM-007**  
The system shall include data validity and sensor status information in on-demand responses.

### 4.3 Peer Sensor Hub Communication

**SR-COM-008**  
The system shall support limited peer-to-peer communication between Sensor Hubs.

**SR-COM-009**  
The system shall allow peer communication for basic coordination functions such as connectivity checks or time synchronization.

**SR-COM-010**  
The system shall ensure that peer Sensor Hub communication does not interfere with Main Hub communication or control operations.

## 5\. Traceability Mapping

### 5.1 Feature → System Requirement Mapping

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-COM-001, SR-COM-002, SR-COM-003, SR-COM-004</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-COM-005, SR-COM-006, SR-COM-007</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-COM-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-COM-008, SR-COM-009, SR-COM-010</p></td></tr></tbody></table></figure>

## 6\. Engineering Notes and Constraints

*   Communication protocol selection (Wi-Fi, ESP-NOW, proprietary RF, etc.) is deferred to the Software Requirements phase.
    
*   Security (authentication, encryption) is defined under **Security &amp; Safety Features**.
    
*   Communication failures shall trigger diagnostics events but shall not block sensor acquisition.
    

##",,includes(#428); includes(#427); includes(#426)
426,Feature,In specification,[F-COM-01] Main Hub Communication,"The system provides bidirectional communication between the Sensor Hub and the Main Hub. This communication channel is used to transmit sensor data, diagnostics, and system status information, as well as to receive commands, configuration updates, and firmware update requests.",,includes(#432); includes(#431); includes(#430); includes(#429); includes(#425)
427,Feature,In specification,[F-COM-02] On-Demand Data Broadcasting,"The system supports on-demand transmission of the most recent timestamped sensor data upon request from the Main Hub, enabling real-time data access outside periodic reporting cycles.",,includes(#435); includes(#434); includes(#433); includes(#425)
428,Feature,In specification,[F-COM-03] Peer Sensor Hub Communication,"The system supports limited peer-to-peer communication between Sensor Hubs for coordination purposes such as connectivity checks or basic time synchronization, without replacing Main Hub communication.",,includes(#438); includes(#437); includes(#436); includes(#425)
429,Requirements,In specification,[SR-COM-001] Bidirectional Main Hub Communication,The system shall support bidirectional communication between the Sensor Hub and the Main Hub. This requirement traces to feature [F-COM-01].,,includes(#426)
430,Requirements,In specification,[SR-COM-002] Transmit Data to Main Hub,"The system shall transmit sensor data, diagnostics information, and system status to the Main Hub. This requirement traces to feature [F-COM-01].",,includes(#426)
431,Requirements,In specification,[SR-COM-003] Receive Commands from Main Hub,"The system shall receive commands, configuration updates, and firmware update requests from the Main Hub. This requirement traces to feature [F-COM-01].",,includes(#426)
432,Requirements,In specification,[SR-COM-004] Monitor Communication Link Status,The system shall monitor the status of the communication link with the Main Hub and report link availability and failure conditions. This requirement traces to feature [F-COM-01].,,includes(#426)
433,Requirements,In specification,[SR-COM-005] Support On-Demand Data Requests,The system shall support on-demand requests from the Main Hub for sensor data. This requirement traces to feature [F-COM-02].,,includes(#427)
434,Requirements,In specification,[SR-COM-006] Respond with Latest Sensor Data,The system shall respond to on-demand data requests with the most recent timestamped sensor data. This requirement traces to feature [F-COM-02].,,includes(#427)
435,Requirements,In specification,[SR-COM-007] Include Data Validity in Responses,The system shall include sensor status and data validity information in on-demand data responses. This requirement traces to feature [F-COM-02].,,includes(#427)
436,Requirements,In specification,[SR-COM-008] Support Peer Sensor Hub Communication,The system shall support limited peer-to-peer communication between Sensor Hubs. This requirement traces to feature [F-COM-03].,,includes(#428)
437,Requirements,In specification,[SR-COM-009] Allow Peer Coordination Functions,The system shall allow peer communication for basic coordination functions such as connectivity checks or time synchronization. This requirement traces to feature [F-COM-03].,,includes(#428)
438,Requirements,In specification,[SR-COM-010] Isolate Peer Communication from Control Logic,The system shall ensure that peer Sensor Hub communication does not interfere with Main Hub communication or control operations. This requirement traces to feature [F-COM-03].,,includes(#428)
439,Feature,New,[FG-DIAG] Diagnostics & Health Monitoring Features,"# Feature Engineering Specification

## Diagnostics &amp; Health Monitoring Features

**Feature Group ID:** FG-DIAG  
**Scope:** Sensor Hub (Sub-Hub only)  
**Target Platform:** ESP32-S3–based Sensor Hub  
**Applies To:** Indoor poultry farm sensor hubs  
**Dependencies:**

*   Sensor Data Acquisition (FG-DAQ)
    
*   Data Quality &amp; Calibration (FG-DQC)
    
*   Communication Features (FG-COM)
    
*   Persistence / DP Stack
    

## 1\. Purpose and Objectives

The **Diagnostics &amp; Health Monitoring Features** provide a structured and persistent mechanism to detect, classify, record, and expose system faults, warnings, and health states.

These features ensure that:

*   Failures are detectable and explainable
    
*   Root causes are traceable
    
*   Diagnostic data survives resets and power loss
    
*   Engineers can access diagnostic information locally or remotely
    

The diagnostics subsystem is **non-intrusive**, meaning it shall not block core sensing or communication functions unless the system enters a fatal state.

## 2\. Feature Overview and Relationships

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature Name</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Primary Objective</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related Features</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Diagnostic Code Management</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Standardize fault and warning identification</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DQC, COM</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Diagnostic Data Storage</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Persist diagnostic events</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DP Stack</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Diagnostic Session</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Engineer access to diagnostics</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">COM, System Mgmt</p></td></tr></tbody></table></figure>

## 3\. Functional Feature Descriptions

### 3.1 F-DIAG-01: Diagnostic Code Management

**Description**  
The system shall implement a structured diagnostic code framework to represent system health conditions, warnings, errors, and fatal faults.

Each diagnostic event is associated with:

*   A unique diagnostic code
    
*   Severity level (info, warning, error, fatal)
    
*   A hierarchical root-cause classification
    
*   Timestamp and source component
    

This framework enables consistent fault handling across all system components.

**Key Capabilities**

*   Unique diagnostic code registry
    
*   Severity classification
    
*   Root-cause hierarchy
    
*   Event-based reporting
    

### 3.2 F-DIAG-02: Diagnostic Data Storage

**Description**  
The system shall persist diagnostic events in non-volatile storage to allow post-failure analysis and long-term health monitoring.

Stored diagnostics remain available across system resets and power cycles until explicitly cleared by an authorized diagnostic session or command.

**Key Capabilities**

*   Persistent storage of diagnostic events
    
*   Timestamped records
    
*   Bounded storage with overwrite policy
    
*   Integration with DP / Persistence layer
    

### 3.3 F-DIAG-03: Diagnostic Session

**Description**  
The system shall provide a diagnostic session that allows authorized engineers or tools to access diagnostic data, inspect system health, and perform maintenance operations.

The diagnostic session may be accessed locally or remotely via the communication interface and supports read and limited control operations.

**Key Capabilities**

*   Session-based access
    
*   Read diagnostics and health data
    
*   Clear diagnostic records
    
*   Controlled command execution
    

## 4\. System Requirements (Formal SHALL Statements)

### 4.1 Diagnostic Code Management

**SR-DIAG-001**  
The system shall implement a diagnostic code framework for reporting system health, warnings, errors, and fatal faults.

**SR-DIAG-002**  
The system shall assign a unique diagnostic code to each detected fault or abnormal condition.

**SR-DIAG-003**  
The system shall classify diagnostic codes by severity level.

**SR-DIAG-004**  
The system shall associate each diagnostic event with a timestamp and source component.

### 4.2 Diagnostic Data Storage

**SR-DIAG-005**  
The system shall persist diagnostic events in non-volatile storage.

**SR-DIAG-006**  
The system shall retain diagnostic data across system resets and power cycles.

**SR-DIAG-007**  
The system shall implement a bounded diagnostic storage mechanism with a defined overwrite or rollover policy.

### 4.3 Diagnostic Session

**SR-DIAG-008**  
The system shall provide a diagnostic session interface for accessing diagnostic data.

**SR-DIAG-009**  
The system shall allow authorized diagnostic sessions to retrieve stored diagnostic events.

**SR-DIAG-010**  
The system shall allow authorized diagnostic sessions to clear diagnostic records.

**SR-DIAG-011**  
The system shall ensure that diagnostic sessions do not interfere with normal sensor acquisition or communication operations.

## 5\. Feature ↔ System Requirement Mapping

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DIAG-001, SR-DIAG-002, SR-DIAG-003, SR-DIAG-004</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DIAG-005, SR-DIAG-006, SR-DIAG-007</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DIAG-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DIAG-008, SR-DIAG-009, SR-DIAG-010, SR-DIAG-011</p></td></tr></tbody></table></figure>

## 6\. Engineering Notes

*   Diagnostic codes should be versioned to support firmware evolution.
    
*   Diagnostic severity may be linked to LED indicators (green/yellow/red).
    
*   Fatal diagnostics may trigger the teardown mechanism defined elsewhere.
    
*   Security and access control for diagnostic sessions are handled under **Security &amp; Safety Features**.
    

##",,includes(#442); includes(#441); includes(#440)
440,Feature,New,[F-DIAG-01] Diagnostic Code Management,"The system provides a structured diagnostic code framework to represent system health states, warnings, errors, and fatal faults. Each diagnostic event is associated with a unique code, severity level, root-cause classification, timestamp, and source component.",,includes(#446); includes(#445); includes(#444); includes(#443); includes(#439)
441,Feature,New,[F-DIAG-02] Diagnostic Data Storage,The system persists diagnostic events in non-volatile storage to enable post-failure analysis and long-term health monitoring. Stored diagnostic data remains available across resets and power cycles until explicitly cleared.,,includes(#449); includes(#448); includes(#447); includes(#439)
442,Feature,New,[F-DIAG-03] Diagnostic Session,"The system provides a diagnostic session that allows authorized engineers or tools to access diagnostic data, inspect system health, and perform limited maintenance actions without disrupting normal operation.",,includes(#453); includes(#452); includes(#451); includes(#450); includes(#439)
443,Requirements,New,[SR-DIAG-001] Implement Diagnostic Code Framework,"The system shall implement a diagnostic code framework for reporting system health conditions, warnings, errors, and fatal faults. This requirement traces to feature [F-DIAG-01].",,includes(#440)
444,Requirements,New,[SR-DIAG-002] Assign Unique Diagnostic Codes,The system shall assign a unique diagnostic code to each detected fault or abnormal condition. This requirement traces to feature [F-DIAG-01].,,includes(#440)
445,Requirements,New,[SR-DIAG-003] Classify Diagnostic Severity,"The system shall classify diagnostic codes by severity level including informational, warning, error, and fatal. This requirement traces to feature [F-DIAG-01].",,includes(#440)
446,Requirements,New,[SR-DIAG-004] Timestamp and Source Diagnostics,The system shall associate each diagnostic event with a timestamp and the originating system component. This requirement traces to feature [F-DIAG-01].,,includes(#440)
447,Requirements,New,[SR-DIAG-005] Persist Diagnostic Events,The system shall persist diagnostic events in non-volatile storage. This requirement traces to feature [F-DIAG-02].,,includes(#441)
448,Requirements,New,[SR-DIAG-006] Retain Diagnostics Across Resets,The system shall retain diagnostic data across system resets and power cycles. This requirement traces to feature [F-DIAG-02].,,includes(#441)
449,Requirements,New,[SR-DIAG-007] Bounded Diagnostic Storage,The system shall implement a bounded diagnostic storage mechanism with a defined overwrite or rollover policy. This requirement traces to feature [F-DIAG-02].,,includes(#441)
450,Requirements,New,[SR-DIAG-008] Provide Diagnostic Session Interface,The system shall provide a diagnostic session interface for accessing diagnostic and system health data. This requirement traces to feature [F-DIAG-03].,,includes(#442)
451,Requirements,New,[SR-DIAG-009] Retrieve Diagnostic Records,The system shall allow authorized diagnostic sessions to retrieve stored diagnostic events. This requirement traces to feature [F-DIAG-03].,,includes(#442)
452,Requirements,New,[SR-DIAG-010] Clear Diagnostic Records,The system shall allow authorized diagnostic sessions to clear stored diagnostic records. This requirement traces to feature [F-DIAG-03].,,includes(#442)
453,Requirements,New,[SR-DIAG-011] Non-Intrusive Diagnostic Sessions,The system shall ensure that diagnostic sessions do not interfere with normal sensor acquisition or communication operations. This requirement traces to feature [F-DIAG-03].,,includes(#442)
454,Feature,New,[FG-DATA] Persistence & Data Management Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

# Feature Engineering Specification

## Persistence &amp; Data Management Features

**Feature Group ID:** FG-DATA  
**Scope:** Sensor Hub (Sub-Hub only)  
**Target Platform:** ESP32-S3–based Sensor Hub  
**Applies To:** Indoor poultry farm sensor hubs  
**Dependencies:**

*   Sensor Data Acquisition (FG-DAQ)
    
*   Data Quality &amp; Calibration (FG-DQC)
    
*   Diagnostics &amp; Health Monitoring (FG-DIAG)
    
*   System State Management / Teardown Mechanism
    

## 1\. Purpose and Objectives

The **Persistence &amp; Data Management Features** define how the Sensor Hub stores, protects, and manages critical runtime and historical data. These features ensure that:

*   Sensor data and system state are not lost during resets or failures
    
*   Data storage is abstracted from application logic
    
*   Critical data is safely handled during firmware updates, configuration changes, or fatal faults
    

The persistence layer is a **foundational system service**, supporting diagnostics, calibration, OTA, and recovery operations.

## 2\. Feature Overview and Relationships

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature Name</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Primary Objective</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related Features</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Persistent Sensor Data Storage</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Store timestamped sensor data</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">DAQ, COM</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Data Persistence Abstraction (DP)</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Abstract storage access</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Application Layer</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Safe Data Handling During State Transitions</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Protect data during teardown</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">OTA, System Mgmt</p></td></tr></tbody></table></figure>

## 3\. Functional Feature Descriptions

### 3.1 F-DATA-01: Persistent Sensor Data Storage

**Description**  
The system shall persist timestamped sensor data to non-volatile storage to support historical analysis, diagnostics correlation, and recovery scenarios.

Persistence may include:

*   Filtered sensor values
    
*   Timestamps
    
*   Sensor validity and status metadata
    

The persistence policy (frequency, retention window, overwrite behavior) is configurable and optimized for storage longevity and performance.

**Key Capabilities**

*   Non-volatile storage (SD card / NVM)
    
*   Timestamped records
    
*   Configurable retention policy
    
*   Integration with DAQ and COM
    

### 3.2 F-DATA-02: Data Persistence Abstraction (DP Component)

**Description**  
The system shall provide a **Data Persistence (DP) component** that abstracts storage access for all upper layers. Application and feature modules interact with the DP component rather than directly accessing storage hardware.

The DP component manages:

*   Data model definitions
    
*   Serialization and deserialization
    
*   Storage backend selection
    
*   Consistency and integrity guarantees
    

**Key Capabilities**

*   Unified persistence API
    
*   Storage backend abstraction
    
*   Centralized data ownership
    
*   Reduced coupling between layers
    

### 3.3 F-DATA-03: Safe Data Handling During State Transitions

**Description**  
The system shall ensure safe and deterministic handling of data during critical state transitions, including:

*   Firmware updates (OTA)
    
*   Machine Constants updates
    
*   System resets
    
*   Fatal error handling
    

Before entering such transitions, the system executes a controlled data finalization process to flush buffers, persist critical state, and verify data integrity.

**Key Capabilities**

*   Controlled data flush
    
*   Atomic write operations
    
*   Data integrity checks
    
*   Coordination with teardown mechanism
    

## 4\. System Requirements (Formal SHALL Statements)

### 4.1 Persistent Sensor Data Storage

**SR-DATA-001**  
The system shall persist timestamped sensor data in non-volatile storage.

**SR-DATA-002**  
The system shall store sensor data together with sensor identifiers, timestamps, and validity status.

**SR-DATA-003**  
The system shall support configurable data retention and overwrite policies.

### 4.2 Data Persistence Abstraction (DP Component)

**SR-DATA-004**  
The system shall provide a Data Persistence (DP) component as the sole interface for persistent data access.

**SR-DATA-005**  
The system shall prevent application and feature modules from directly accessing storage hardware.

**SR-DATA-006**  
The DP component shall support serialization and deserialization of structured system data.

### 4.3 Safe Data Handling During State Transitions

**SR-DATA-007**  
The system shall ensure that all critical runtime data is flushed to non-volatile storage before entering a controlled teardown or reset.

**SR-DATA-008**  
The system shall protect data integrity during firmware updates and configuration changes.

**SR-DATA-009**  
The system shall verify successful data persistence before completing a state transition.

## 5\. Feature ↔ System Requirement Mapping

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DATA-001, SR-DATA-002, SR-DATA-003</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DATA-004, SR-DATA-005, SR-DATA-006</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-DATA-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-DATA-007, SR-DATA-008, SR-DATA-009</p></td></tr></tbody></table></figure>

## 6\. Engineering Notes

*   The DP component aligns with your **DP Stack** already defined in the architecture.
    
*   Atomic write strategies (e.g., temp file + rename) are recommended.
    
*   Diagnostic events should be generated on persistence failures.
    
*   Storage wear-leveling considerations apply for SD/NVM.
    

##",,includes(#464); includes(#463); includes(#462)
455,Task,New,Test backup,,,
456,Task,New,Plan for Sensor Hub version 1,,,
457,Task,New,planning scope SH v1,"## Phase 1 — System Validation &amp; Refinement (NOW)

**Goal:** Freeze system intent before design

### Tasks

*   ✔ Review Feature Coverage (you are almost done)
    
*   ✔ Review SR completeness (done)
    
*   ⏳ Add _cross-feature constraints_ (small doc)
    
*   ⏳ Add _system assumptions &amp; limitations_
    

📄 Output:

*   **System Requirements Baseline (Frozen)**
    
*   **Architecture Overview (Sensor Hub)**
    

## Phase 2 — Architecture Definition (Before Coding)

This is where **AI shines**.

### Deliverables

*   Functional Requirement Document (FRD)
    
*   Software Architecture Document (SAD)
    
*   Component diagrams
    
*   State diagrams
    
*   Data flow diagrams
    

📄 These should be **Markdown-first**, versioned.

## Phase 3 — Software Requirements (Later, per component)

Not now — **you’re right to delay this**.

## Phase 4 — Implementation with AI IDEs

Only after architecture is stable.",,
458,Task,New,Create sprints,,,
459,Task,New,Plan for sprints,,,
460,Task,New,System feature review ,"<br>

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Area</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Goal</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Feature completeness</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Are any operational gaps missing?</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Cross-feature conflicts</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">OTA vs Persistence vs Security</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">State handling</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Are all features state-aware?</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Safety behavior</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Fault paths, teardown correctness</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">Scalability</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">Future-proofing without overengineering</p></td></tr></tbody></table></figure><br>

### 🟦 IEC 61508 (Functional Safety – _Guidance Only_)

**What you already match well:**

*   Deterministic states (F-SYS-01)
    
*   Controlled teardown (F-SYS-02)
    
*   Diagnostics &amp; fault handling
    
*   Separation of concerns
    

**What to add later (optional):**

*   Safety integrity levels (SIL-like classification)
    
*   Fault reaction time definitions
    

### 🟦 IEC 61499 (Distributed Automation – _Conceptual Alignment_)

This is very relevant philosophically.

**Strong matches:**

*   Event-driven design
    
*   Distributed nodes (sensor hubs)
    
*   State-based behavior
    
*   Clear separation of data and logic
    

Later, you can map:

*   Features → Function Blocks
    
*   DP → Data services
    
*   Communication → Event channels
    

### 🟦 ISA-95 (Industrial Automation Layers)

You are building **Level 1–2 perfectly**:

*   Sensors
    
*   Control logic
    
*   Local diagnostics
    
*   HMI (OLED)
    

Main Hub / Cloud later becomes:

*   Level 2/3 (supervisory &amp; management)  
      
    

### 🟦 ISO 27001 / IEC 62443 (Security – _Principles Only_)

You already cover:

*   Secure boot
    
*   Secure storage
    
*   Encrypted communication
    
*   Access control (debug sessions)
    

Later, you can formalize:

*   Threat model
    
*   Key lifecycle
    
*   Secure provisioning",,
461,Task,New,planning,,,
462,Feature,New,[F-DATA-01] Persistent Sensor Data Storage,"Provides persistent storage of timestamped sensor data in non-volatile memory. Ensures sensor readings, timestamps, and validity metadata are retained for historical analysis, diagnostics, and system recovery. Supports configurable retention and overwrite policies.",,includes(#467); includes(#466); includes(#465); includes(#454)
463,Feature,New,[F-DATA-02] Data Persistence Abstraction (DP Component),Provides a centralized Data Persistence (DP) component that abstracts all access to non-volatile storage. Ensures application and feature modules interact through a unified persistence interface without direct storage hardware dependency.,,includes(#470); includes(#469); includes(#468); includes(#454)
464,Feature,New,[F-DATA-03] Safe Data Handling During State Transitions,"Ensures safe and deterministic handling of persistent data during critical system state transitions such as firmware updates, machine constant updates, resets, and fatal fault conditions.",,includes(#473); includes(#472); includes(#471); includes(#454)
465,Requirements,New,[SR-DATA-001] Persistent Timestamped Sensor Data,The system shall persist timestamped sensor data in non-volatile storage.,,includes(#462)
466,Requirements,New,[SR-DATA-002] Sensor Data Metadata Storage,"The system shall store sensor data together with sensor identifiers, timestamps, and validity status.",,includes(#462)
467,Requirements,New,[SR-DATA-003] Configurable Data Retention Policy,The system shall support configurable data retention and overwrite policies for persisted sensor data.,,includes(#462)
468,Requirements,New,[SR-DATA-004] Data Persistence Component Interface,The system shall provide a Data Persistence (DP) component as the sole interface for persistent data access.,,includes(#463)
469,Requirements,New,[SR-DATA-005] Storage Access Isolation,The system shall prevent application and feature modules from directly accessing storage hardware.,,includes(#463)
470,Requirements,New,[SR-DATA-006] Structured Data Serialization,The DP component shall support serialization and deserialization of structured system data.,,includes(#463)
471,Requirements,New,[SR-DATA-007] Data Flush Before Teardown,The system shall flush all critical runtime data to non-volatile storage before entering a controlled teardown or reset state.,,includes(#464)
472,Requirements,New,[SR-DATA-008] Data Integrity During Updates,The system shall protect data integrity during firmware updates and machine constant updates.,,includes(#464)
473,Requirements,New,[SR-DATA-009] Persistence Verification,The system shall verify successful data persistence before completing a system state transition.,,includes(#464)
474,Feature,New,[OTA] Firmware Update (OTA) Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

# 8\. Firmware Update (OTA) Features

## 8.1 Feature Overview

The **Firmware Update (OTA) Features** enable the Sensor Hub (Sub-Hub) to safely receive, validate, and activate new firmware images provided by the Main Hub.  
These features ensure **controlled firmware lifecycle management**, **data integrity**, **system availability**, and **fault containment** during firmware update operations.

The OTA process is designed to:

*   Prevent unauthorized or corrupted firmware installation
    
*   Preserve critical system data and calibration information
    
*   Ensure recoverability in case of update failure
    
*   Minimize operational disruption
    

This feature set applies **only to the Sensor Hub (ESP32-S3 based)** and does not include cloud-side or Main Hub OTA logic.

## 8.2 Scope and Assumptions

### In Scope

*   OTA negotiation and readiness handshake with Main Hub
    
*   Firmware image reception over secure communication
    
*   Temporary firmware storage on SD card
    
*   Firmware integrity verification (e.g., CRC, hash)
    
*   Controlled firmware activation and reboot
    

### Out of Scope

*   Firmware generation and signing
    
*   Cloud-side firmware distribution
    
*   Rollback policy definition (may be extended later)
    

## 8.3 Sub-Features

### 8.3.1 F-OTA-01: OTA Update Negotiation

**Description**  
This sub-feature governs the initial negotiation phase between the Sensor Hub and the Main Hub prior to any firmware transfer.  
The Sensor Hub validates its current operational state and explicitly signals readiness before accepting an OTA update.

**Responsibilities**

*   Receive OTA availability notification
    
*   Validate system readiness (power, storage, state)
    
*   Acknowledge or reject OTA request
    
*   Transition system into OTA-preparation mode
    

### 8.3.2 F-OTA-02: Firmware Reception and Storage

**Description**  
This sub-feature handles the controlled reception of the firmware image from the Main Hub and its storage in non-volatile memory (SD card) without overwriting the currently running firmware.

**Responsibilities**

*   Receive firmware in chunks
    
*   Store firmware image on SD card
    
*   Monitor transfer completeness
    
*   Prevent execution during download
    

### 8.3.3 F-OTA-03: Firmware Integrity Validation

**Description**  
This sub-feature validates the integrity and correctness of the received firmware image prior to activation, ensuring that corrupted or incomplete firmware is never flashed.

**Responsibilities**

*   Perform integrity checks (CRC, checksum, hash)
    
*   Validate firmware size and metadata
    
*   Reject invalid firmware images
    
*   Report validation status to Main Hub
    

### 8.3.4 F-OTA-04: Safe Firmware Activation

**Description**  
This sub-feature manages the safe transition from the current firmware to the new firmware, ensuring all critical data is preserved and the system is left in a known safe state.

**Responsibilities**

*   Trigger teardown procedure
    
*   Persist runtime and calibration data
    
*   Flash validated firmware image
    
*   Reboot system into updated firmware
    

## 8.4 System Requirements (Formal SHALL Statements)

### OTA Negotiation Requirements

*   **SR-OTA-001**: The system shall support OTA update negotiation initiated by the Main Hub.
    
*   **SR-OTA-002**: The system shall verify internal readiness before accepting an OTA update request.
    
*   **SR-OTA-003**: The system shall explicitly acknowledge or reject OTA requests.
    

### Firmware Reception &amp; Storage Requirements

*   **SR-OTA-004**: The system shall receive firmware images over the established communication channel.
    
*   **SR-OTA-005**: The system shall store received firmware images in non-volatile storage prior to validation.
    
*   **SR-OTA-006**: The system shall prevent overwriting the active firmware during firmware reception.
    

### Firmware Integrity Requirements

*   **SR-OTA-007**: The system shall validate the integrity of the received firmware image before activation.
    
*   **SR-OTA-008**: The system shall reject firmware images that fail integrity validation.
    
*   **SR-OTA-009**: The system shall report firmware validation results to the Main Hub.
    

### Safe Activation Requirements

*   **SR-OTA-010**: The system shall execute a controlled teardown before firmware activation.
    
*   **SR-OTA-011**: The system shall persist critical runtime data prior to firmware flashing.
    
*   **SR-OTA-012**: The system shall activate new firmware only after successful validation.
    
*   **SR-OTA-013**: The system shall reboot into the new firmware following successful activation.
    

## 8.5 Feature-to-Requirement Traceability

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-OTA-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-OTA-001, SR-OTA-002, SR-OTA-003</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-OTA-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-OTA-004, SR-OTA-005, SR-OTA-006</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-OTA-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-OTA-007, SR-OTA-008, SR-OTA-009</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-OTA-04</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-OTA-010, SR-OTA-011, SR-OTA-012, SR-OTA-013</p></td></tr></tbody></table></figure>

## 8.6 Architectural Considerations (Informative)

*   OTA logic shall be implemented as a **dedicated OTA Manager component**
    
*   Firmware storage shall be accessed via the **DP (Data Persistence) component**
    
*   OTA state transitions shall interact with:
    
    *   Diagnostics subsystem
        
    *   Machine Constants management
        
    *   Teardown mechanism
        
*   OTA execution shall not block critical system diagnostics reporting
    

## 8.7 Related Features

*   **Persistence &amp; Data Management Features (F-DATA-03)**
    
*   **Diagnostics &amp; Health Monitoring Features**
    
*   **Security &amp; Safety Features (Secure Boot, Secure Flash)**
    

###",,includes(#478); includes(#477); includes(#476); includes(#475)
475,Feature,New,[F-OTA-01] OTA Update Negotiation,"Handles the initial OTA handshake between the Sensor Hub and Main Hub. The system validates readiness, acknowledges or rejects OTA requests, and transitions the system into OTA-preparation mode.",,includes(#481); includes(#480); includes(#479); includes(#474)
476,Feature,New,[F-OTA-02] Firmware Reception and Storage,Receives firmware images from the Main Hub in a controlled manner and stores them in non-volatile storage without affecting the currently running firmware.,,includes(#484); includes(#483); includes(#482); includes(#474)
477,Feature,New,[F-OTA-03] Firmware Integrity Validation,"Validates the integrity and correctness of the received firmware image using CRC, checksum, or hash mechanisms before allowing activation.",,includes(#487); includes(#486); includes(#485); includes(#474)
478,Feature,New,[F-OTA-04] Safe Firmware Activation,"Executes a controlled teardown, persists critical data, flashes validated firmware, and reboots the system into the updated firmware safely.",,includes(#491); includes(#490); includes(#489); includes(#488); includes(#474)
479,Requirements,New,[SR-OTA-001] OTA Negotiation Support,The system shall support OTA update negotiation initiated by the Main Hub.,,includes(#475)
480,Requirements,New,[SR-OTA-002] OTA Readiness Validation,The system shall verify internal readiness conditions before accepting an OTA update request.,,includes(#475)
481,Requirements,New,[SR-OTA-003] OTA Acknowledgement,The system shall explicitly acknowledge or reject OTA update requests.,,includes(#475)
482,Requirements,New,[SR-OTA-004] Firmware Reception,The system shall receive firmware images over the established communication interface.,,includes(#476)
483,Requirements,New,[SR-OTA-005] Firmware Temporary Storage,The system shall store received firmware images in non-volatile storage prior to validation.,,includes(#476)
484,Requirements,New,[SR-OTA-006] Active Firmware Protection,The system shall prevent overwriting or execution of the active firmware during firmware reception.,,includes(#476)
485,Requirements,New,[SR-OTA-007] Firmware Integrity Verification,The system shall validate the integrity of received firmware images before activation.,,includes(#477)
486,Requirements,New,[SR-OTA-008] Firmware Rejection Handling,The system shall reject firmware images that fail integrity validation.,,includes(#477)
487,Requirements,New,[SR-OTA-009] OTA Status Reporting,The system shall report firmware validation and OTA status to the Main Hub.,,includes(#477)
488,Requirements,New,[SR-OTA-010] OTA Teardown Execution,The system shall execute a controlled teardown procedure prior to firmware activation.,,includes(#478)
489,Requirements,New,[SR-OTA-011] Data Persistence Before Flashing,The system shall persist critical runtime data and calibration data before flashing new firmware.,,includes(#478)
490,Requirements,New,[SR-OTA-012] Controlled Firmware Activation,The system shall activate new firmware only after successful integrity validation.,,includes(#478)
491,Requirements,New,[SR-OTA-013] OTA Reboot Execution,The system shall reboot into the new firmware after successful activation.,,includes(#478)
492,Feature,New,[SEC] Security & Safety Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

#   
Security &amp; Safety Features

## Sensor Hub (Sub-Hub) Scope Only

## 1 Feature Overview

The **Security &amp; Safety Features** ensure that the Sensor Hub operates only with trusted firmware, protects sensitive data at rest, and guarantees confidentiality and integrity of all communications. These features are foundational and cross-cutting, supporting all other functional features (DAQ, DQC, COM, DIAG, DATA, OTA).

This feature set is designed to:

*   Prevent execution of unauthorized or malicious firmware
    
*   Protect firmware, configuration, and machine constants stored in memory
    
*   Secure all communications with cryptographic mechanisms
    
*   Provide deterministic and auditable behavior in case of security violations
    

## 2 Scope and Assumptions

**In Scope**

*   Sensor Hub (ESP32-S3–based)
    
*   Boot process security
    
*   Flash and external storage protection
    
*   Communication security with Main Hub and peer Sensor Hubs
    

**Out of Scope**

*   Cloud server security policies
    
*   User identity management
    
*   Physical tamper detection hardware (optional future feature)
    

## 3 Sub-Feature Breakdown

### 3.1 F-SEC-01: Secure Boot

#### Description

Secure Boot ensures that only authenticated and authorized firmware images are executed on the Sensor Hub. During system startup, the bootloader verifies the cryptographic signature of the firmware image before handing over execution.

If verification fails, the system enters a defined **security fault state** and prevents normal operation.

#### Responsibilities

*   Firmware authenticity verification
    
*   Root-of-trust enforcement
    
*   Prevention of downgrade or rollback attacks (if enabled)
    

#### Constraints

*   Must complete before any application code execution
    
*   Must be enforced on every boot (cold or warm)
    

### 3.2 F-SEC-02: Secure Flash Storage

#### Description

Secure Flash Storage protects sensitive data stored in internal flash and external storage (e.g., SD card) from unauthorized access or modification.

Sensitive data includes:

*   Firmware images
    
*   Machine constants
    
*   Calibration data
    
*   Cryptographic material
    
*   Persistent diagnostics and logs
    

#### Responsibilities

*   Encrypted storage of sensitive regions
    
*   Access control enforcement
    
*   Prevention of unauthorized read/write operations
    

#### Constraints

*   Encryption must not compromise system boot reliability
    
*   Storage access must be mediated through controlled software components (e.g., DP component)
    

### 3.3 F-SEC-03: Encrypted Communication

#### Description

Encrypted Communication ensures that all data exchanged between the Sensor Hub and other entities (Main Hub, peer Sensor Hubs) is protected against eavesdropping, tampering, and impersonation.

This includes:

*   Sensor data transmission
    
*   Diagnostics reporting
    
*   OTA negotiation and data transfer
    
*   Configuration and machine constant updates
    

#### Responsibilities

*   Confidentiality of transmitted data
    
*   Integrity and authenticity verification
    
*   Secure session establishment
    

#### Constraints

*   Must be compatible with ESP32-S3 cryptographic capabilities
    
*   Must support reconnection and key renewal mechanisms
    

## 4 Functional Flow Overview

### Secure Boot Flow (Simplified)

```text
Power On
   ↓
ROM Bootloader
   ↓
Verify Firmware Signature
   ↓
[Valid] → Jump to Application
[Invalid] → Enter Security Fault State
```

### Secure Communication Flow (Simplified)

```text
Session Request
   ↓
Mutual Authentication
   ↓
Key Exchange
   ↓
Encrypted Data Exchange
```

## 5 System SHALL Requirements (Formal)

### Secure Boot Requirements

*   **SR-SEC-001**: The system shall verify the authenticity of the firmware image before execution during every boot cycle.
    
*   **SR-SEC-002**: The system shall prevent execution of firmware images that fail cryptographic verification.
    
*   **SR-SEC-003**: The system shall enter a defined security fault state upon secure boot failure.
    
*   **SR-SEC-004**: The system shall protect the root-of-trust against modification.
    

### Secure Flash Storage Requirements

*   **SR-SEC-005**: The system shall protect sensitive data stored in internal flash memory from unauthorized access.
    
*   **SR-SEC-006**: The system shall support encryption of sensitive data stored in external storage.
    
*   **SR-SEC-007**: The system shall restrict access to cryptographic keys to authorized system components only.
    
*   **SR-SEC-008**: The system shall ensure data integrity for stored configuration and machine constant files.
    

### Encrypted Communication Requirements

*   **SR-SEC-009**: The system shall encrypt all communication with the Main Hub.
    
*   **SR-SEC-010**: The system shall ensure integrity and authenticity of all received and transmitted messages.
    
*   **SR-SEC-011**: The system shall use secure communication channels for OTA firmware updates.
    
*   **SR-SEC-012**: The system shall detect and report communication security violations.
    

## 6 Traceability Matrix (Feature → System Requirements)

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Related System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SEC-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SEC-001, SR-SEC-002, SR-SEC-003, SR-SEC-004</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SEC-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SEC-005, SR-SEC-006, SR-SEC-007, SR-SEC-008</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SEC-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SEC-009, SR-SEC-010, SR-SEC-011, SR-SEC-012</p></td></tr></tbody></table></figure>

## 7 Design &amp; Implementation Notes (Non-Normative)

*   ESP32-S3 secure boot and flash encryption features should be leveraged where possible.
    
*   Key provisioning should occur during manufacturing or secure onboarding.
    
*   Security failures should integrate with the Diagnostics &amp; Health Monitoring feature set.
    
*   Security features must be active before any sensor data acquisition or communication begins.
    

## 8 Dependencies

*   **OTA Features** (for secure firmware updates)
    
*   **Communication Features** (transport layer)
    
*   **Diagnostics Features** (security fault reporting)
    
*   **Persistence &amp; DP Component** (secure storage abstraction)
    

###",,includes(#495); includes(#494); includes(#493)
493,Feature,New,[F-SEC-01] Secure Boot,Ensures that only authenticated and authorized firmware images are executed on the Sensor Hub by verifying cryptographic signatures during every system boot.,,includes(#499); includes(#498); includes(#497); includes(#496); includes(#492)
494,Feature,New,[F-SEC-02] Secure Flash Storage,"Protects firmware, machine constants, calibration data, cryptographic material, and sensitive system data stored in internal flash and external storage against unauthorized access or modification.",,includes(#503); includes(#502); includes(#501); includes(#500); includes(#492)
495,Feature,New,[F-SEC-03] Encrypted Communication,"Provides encrypted, authenticated, and integrity-protected communication between the Sensor Hub, Main Hub, and peer Sensor Hubs for all data exchange.",,includes(#507); includes(#506); includes(#505); includes(#504); includes(#492)
496,Requirements,New,[SR-SEC-001] Firmware Authenticity Verification,The system shall verify the authenticity of the firmware image before execution during every boot cycle.,,includes(#493)
497,Requirements,New,[SR-SEC-002] Unauthorized Firmware Blocking,The system shall prevent execution of firmware images that fail cryptographic verification.,,includes(#493)
498,Requirements,New,[SR-SEC-003] Secure Boot Failure Handling,The system shall enter a defined security fault state when secure boot verification fails.,,includes(#493)
499,Requirements,New,[SR-SEC-004] Root-of-Trust Protection,The system shall protect the root-of-trust against unauthorized modification.,,includes(#493)
500,Requirements,New,[SR-SEC-005] Flash Data Access Protection,The system shall protect sensitive data stored in internal flash memory from unauthorized access.,,includes(#494)
501,Requirements,New,[SR-SEC-006] Encrypted External Storage,The system shall support encryption of sensitive data stored in external storage devices.,,includes(#494)
502,Requirements,New,[SR-SEC-007] Cryptographic Key Isolation,The system shall restrict access to cryptographic keys to authorized system components only.,,includes(#494)
503,Requirements,New,[SR-SEC-008] Stored Data Integrity Assurance,"The system shall ensure integrity of stored configuration, calibration, and machine constant data.",,includes(#494)
504,Requirements,New,[SR-SEC-009] Encrypted Main Hub Communication,The system shall encrypt all communication exchanged with the Main Hub.,,includes(#495)
505,Requirements,New,[SR-SEC-010] Message Integrity and Authenticity,The system shall ensure integrity and authenticity of all transmitted and received messages.,,includes(#495)
506,Requirements,New,[SR-SEC-011] Secure OTA Data Transfer,The system shall use encrypted and authenticated communication channels for OTA firmware updates.,,includes(#495)
507,Requirements,New,[SR-SEC-012] Security Violation Reporting,The system shall detect and report communication and security violations to the Main Hub.,,includes(#495)
508,Feature,New,[SYS] System Management Features,"<macro class=""toc op-uc-placeholder op-uc-toc"">
</macro>

#   
System Management Features

## Sensor Hub (Sub-Hub) Scope

## 1 Feature Overview

The **System Management Features** provide deterministic control over the Sensor Hub’s operational lifecycle, runtime state visibility, controlled shutdown behavior, and engineering interaction capabilities.

This feature group is responsible for:

*   Managing system operational states and transitions
    
*   Ensuring safe teardown during updates or failures
    
*   Providing local human–machine interaction via OLED display and buttons
    
*   Supporting engineering/debug sessions for diagnostics and maintenance
    

These features act as the **supervisory layer** governing all other functional domains (DAQ, DQC, COM, DIAG, DATA, OTA, SEC).

## 2 Scope and Assumptions

**In Scope**

*   ESP32-S3 Sensor Hub
    
*   OLED-based local UI (I2C)
    
*   Physical input buttons
    
*   Controlled state transitions and teardown
    
*   Debug and engineering access
    

**Out of Scope**

*   Main Hub UI
    
*   Cloud dashboards
    
*   User authentication / role management
    

## 3 Sub-Feature Breakdown

### 3.1 F-SYS-01: System State Management

#### Description

System State Management defines and controls the operational states of the Sensor Hub and governs all valid transitions between them.

The system operates as a **finite state machine (FSM)** with deterministic behavior.

#### Typical System States

*   **INIT** – Hardware and software initialization
    
*   **RUNNING** – Normal sensor acquisition and communication
    
*   **WARNING** – Non-fatal fault detected, degraded operation
    
*   **FAULT** – Fatal error, core functionality disabled
    
*   **OTA\_UPDATE** – Firmware update in progress
    
*   **MC\_UPDATE** – Machine constants update in progress
    
*   **TEARDOWN** – Controlled shutdown sequence
    
*   **IDLE / SERVICE** – Engineering or diagnostic interaction
    

#### Responsibilities

*   Enforce valid state transitions
    
*   Notify dependent components of state changes
    
*   Prevent unsafe operations during restricted states
    

### 3.2 F-SYS-02: Controlled Teardown Mechanism

#### Description

The Controlled Teardown Mechanism ensures that the Sensor Hub transitions safely from an active state into reset, update, or shutdown without data loss or corruption.

Teardown is triggered by:

*   Firmware update
    
*   Machine constant update
    
*   Fatal system fault
    
*   Manual engineering command
    

#### Teardown Sequence (Mandatory)

1.  Stop sensor acquisition tasks
    
2.  Flush pending data via DP component
    
3.  Persist calibration, diagnostics, and runtime state
    
4.  Close communication sessions
    
5.  Release hardware resources
    
6.  Enter target state (reset, OTA, idle)
    

#### Responsibilities

*   Guarantee data consistency
    
*   Ensure deterministic shutdown behavior
    
*   Prevent flash or SD corruption
    

### 3.3 F-SYS-03: Status Indication (OLED-Based HMI)

#### Description

The Sensor Hub provides local system visibility using an **OLED display connected via I2C**, replacing LED indicators.

The display, together with **three physical buttons (Up / Down / Select)**, forms a minimal local Human–Machine Interface (HMI).

#### Default Information Displayed (Main Screen)

1.  **Connectivity status**
    
    *   Connected / Disconnected
        
    *   Signal strength (RSSI) if available
        
2.  **System status**
    
    *   Current system state (RUNNING, WARNING, FAULT, OTA, etc.)
        
3.  **Connected sensors**
    
    *   Count and/or summary status
        
4.  **Time and date**
    
    *   Synchronized system time
        

#### Menu Navigation Behavior

*   **Select button**
    
    *   From main screen → opens menu
        
    *   From submenu → returns to main screen
        
*   **Up / Down buttons**
    
    *   Navigate menu entries
        
    *   Scroll within pages if applicable
        

#### Menu Structure

**Main Menu**

*   **Diagnostics**
    
    *   Lists active and stored diagnostic codes
        
    *   Displays occurrence count per diagnostic
        
*   **Sensors**
    
    *   Lists all detected sensors
        
    *   Displays sensor type and configuration status
        
*   **Health**
    
    *   Displays SD card usage
        
    *   Displays overall system health indicators
        

#### Responsibilities

*   Provide real-time system visibility
    
*   Support local inspection without external tools
    
*   Reflect system state and diagnostics accurately
    

### 3.4 F-SYS-04: Debug &amp; Engineering Sessions

#### Description

Debug &amp; Engineering Sessions allow authorized engineers to interact with the Sensor Hub for diagnostics, inspection, and controlled operations.

Sessions may be established via:

*   Wired interface (e.g., USB/UART)
    
*   Secure communication channel (logical session)
    

#### Supported Capabilities

*   Retrieve diagnostic logs
    
*   Read machine constant files
    
*   Inspect system state and health
    
*   Trigger controlled actions (e.g., reboot, teardown)
    
*   Monitor runtime logs
    

#### Session Types

*   **Diagnostic Session** – Read-only access for inspection
    
*   **Debug Session** – Command execution and deeper inspection
    

## 4 Functional Interaction Overview

### System State &amp; Teardown Relationship

```text
RUNNING
   ↓ (Update / Fault)
TEARDOWN
   ↓
OTA_UPDATE / MC_UPDATE / RESET
```

### Local HMI Interaction

```text
OLED Display ← System State Manager
Buttons → UI Controller → State/Menu Logic
```

## 5 System SHALL Requirements (Formal)

### System State Management

*   **SR-SYS-001**: The system shall implement a defined finite state machine for operational control.
    
*   **SR-SYS-002**: The system shall restrict operations based on the current system state.
    
*   **SR-SYS-003**: The system shall notify system components of state transitions.
    

### Controlled Teardown

*   **SR-SYS-004**: The system shall execute a controlled teardown sequence before firmware or machine constant updates.
    
*   **SR-SYS-005**: The system shall persist all critical runtime data before completing teardown.
    
*   **SR-SYS-006**: The system shall prevent data corruption during teardown and reset operations.
    

### Status Indication &amp; HMI

*   **SR-SYS-007**: The system shall provide a local OLED display using I2C communication.
    
*   **SR-SYS-008**: The system shall display connectivity status, system state, sensor summary, and time/date.
    
*   **SR-SYS-009**: The system shall provide menu navigation using Up, Down, and Select buttons.
    
*   **SR-SYS-010**: The system shall provide diagnostic, sensor, and health information via the local menu.
    

### Debug &amp; Engineering Sessions

*   **SR-SYS-011**: The system shall support diagnostic sessions for retrieving logs and system status.
    
*   **SR-SYS-012**: The system shall support debug sessions for controlled engineering operations.
    
*   **SR-SYS-013**: The system shall restrict debug actions to authorized sessions only.
    

## 6 Traceability Matrix

<figure class=""table op-uc-figure_align-center op-uc-figure""><table class=""op-uc-table""><thead class=""op-uc-table--head""><tr class=""op-uc-table--row""><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">Feature ID</p></th><th class=""op-uc-table--cell op-uc-table--cell_head""><p class=""op-uc-p"">System Requirements</p></th></tr></thead><tbody><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SYS-01</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SYS-001, SR-SYS-002, SR-SYS-003</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SYS-02</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SYS-004, SR-SYS-005, SR-SYS-006</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SYS-03</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SYS-007, SR-SYS-008, SR-SYS-009, SR-SYS-010</p></td></tr><tr class=""op-uc-table--row""><td class=""op-uc-table--cell""><p class=""op-uc-p"">F-SYS-04</p></td><td class=""op-uc-table--cell""><p class=""op-uc-p"">SR-SYS-011, SR-SYS-012, SR-SYS-013</p></td></tr></tbody></table></figure>

## 7 Dependencies

*   Diagnostics &amp; Health Monitoring Features
    
*   Persistence &amp; DP Component
    
*   Communication Features
    
*   Security &amp; Safety Features
    
*   OTA Features
    

##",,includes(#512); includes(#511); includes(#510); includes(#509)
509,Feature,New,[F-SYS-01] System State Management,Defines and controls the operational states of the Sensor Hub using a deterministic finite state machine and enforces valid transitions between system states.,,includes(#515); includes(#514); includes(#513); includes(#508)
510,Feature,New,[F-SYS-02] Controlled Teardown Mechanism,"Provides a controlled and safe teardown sequence to ensure data integrity and orderly shutdown during updates, failures, or maintenance operations.",,includes(#518); includes(#517); includes(#516); includes(#508)
511,Feature,New,[F-SYS-03] Status Indication via OLED HMI,"Provides local system status visibility through an OLED display with button-based navigation, replacing LED indicators.",,includes(#522); includes(#521); includes(#520); includes(#519); includes(#508)
512,Feature,New,[F-SYS-04] Debug & Engineering Sessions,"Enables diagnostic and debug sessions allowing engineers to inspect system status, retrieve logs, and perform controlled maintenance actions.",,includes(#525); includes(#524); includes(#523); includes(#508)
513,Requirements,New,[SR-SYS-001] Finite State Machine Control,The system shall implement a defined finite state machine to manage operational states and transitions.,,includes(#509)
514,Requirements,New,[SR-SYS-002] State-Based Operation Restriction,The system shall restrict functional operations based on the current system state.,,includes(#509)
515,Requirements,New,[SR-SYS-003] State Transition Notification,The system shall notify system components when a system state transition occurs.,,includes(#509)
516,Requirements,New,[SR-SYS-004] Controlled Teardown Execution,"The system shall execute a controlled teardown sequence before firmware updates, machine constant updates, or system resets.",,includes(#510)
517,Requirements,New,[SR-SYS-005] Critical Data Persistence Before Teardown,The system shall persist all critical runtime data before completing a teardown sequence.,,includes(#510)
518,Requirements,New,[SR-SYS-006] Data Integrity Protection During Shutdown,"The system shall prevent data corruption during teardown, reset, or power-down operations.",,includes(#510)
519,Requirements,New,[SR-SYS-007] OLED Display Interface,The system shall provide a local OLED display using the I2C communication protocol.,,includes(#511)
520,Requirements,New,[SR-SYS-008] System Information Display,"The system shall display connectivity status, system state, connected sensor summary, and time/date on the OLED display.",,includes(#511)
521,Requirements,New,[SR-SYS-009] Button-Based Menu Navigation,"The system shall provide menu navigation using Up, Down, and Select buttons.",,includes(#511)
522,Requirements,New,[SR-SYS-010] Local Diagnostic and Health Menus,"The system shall provide diagnostic, sensor, and health information through the local OLED menu interface.",,includes(#511)
523,Requirements,New,[SR-SYS-011] Diagnostic Session Support,The system shall support diagnostic sessions for retrieving system status and diagnostic data.,,includes(#512)
524,Requirements,New,[SR-SYS-012] Debug Session Support,The system shall support debug sessions allowing controlled engineering commands.,,includes(#512)
525,Requirements,New,[SR-SYS-013] Authorized Debug Access Control,The system shall restrict debug session actions to authorized engineering access only.,,includes(#512)
