BLIIOT BL192: Monitoring Dairy Barn Heat Stress and Air Quality on AWS IoT Core via MQTT
Categories

BLIIOT BL192: Monitoring Dairy Barn Heat Stress and Air Quality on AWS IoT Core via MQTT

How to use BL192's isolated RS485 port (Modbus RTU master) and flexible I/O expansion to collect environmental data such as temperature, humidity, ammonia, and CO₂ in dairy barns, and upload it to AWS IoT Core via MQTT. The article provides specific thresholds for heat stress (THI), air quality limits, and practical methods for configuring local logic control, helping readers understand how to build a reliable, automated environmental monitoring system for dairy barns.
BLIIOT BL192: Monitoring Dairy Barn Heat Stress and Air Quality on AWS IoT Core via MQTT
Case Details

In dairy farming, temperature, humidity, ammonia (NH₃), and carbon dioxide (CO₂) inside the barn directly impact milk production and animal health. Extensive European research shows that when the Temperature-Humidity Index (THI) exceeds 68, dairy cows begin experiencing heat stress and milk yield starts to decline. When THI exceeds 72, each cow can lose more than 2.7 kg of milk per day; at THI above 80, the loss approaches 4 kg per cow per day. Meanwhile, NH₃ concentrations above 10 ppm impair immunity, and CO₂ levels exceeding 3000 ppm indicate severe ventilation problems.

Traditional PLC solutions are costly, require complex wiring, and are difficult to modify. The BL192, a dairy farm monitoring module, an industrial-grade MQTT edge I/O module, features an isolated RS485 port, dual Ethernet ports, and expandable I/O. It can directly connect to various agricultural sensors, execute local logic control, and upload data to the cloud via MQTT. This article is aimed at European dairy farms and provides a detailed, practical guide to implementing this solution.

1. What data needs to be monitored in a dairy barn? How does BL192 collect it?

  • Environmental Parameters and Corresponding Sensors

Parameter

Sensor Type

Signal Type

Recommended Threshold

Temperature + Humidity

Temp/RH transmitter (e.g., EE210)

RS485 Modbus RTU

THI > 68 triggers Level 1 ventilation

Ammonia (NH₃)

Electrochemical NH₃ sensor

RS485 Modbus RTU

>10 ppm triggers enhanced ventilation + alarm

CO₂

CO₂ sensor (e.g., S8)

RS485 Modbus RTU

>3000 ppm forces air exchange

Additional temperature

PT100 (Y51 module)

RTD

Local hot spot monitoring

All sensors that support the Modbus RTU protocol can be connected in a daisy chain via BL192's isolated RS485 port. The BL192 acts as a Modbus RTU master, polling and collecting data.

 

  • Control Equipment and I/O Connections

Equipment

BL192 I/O Module

Description

Main exhaust fan (high power)

Y24 relay module

Relay controls contactor, 250VAC/2A

Circulation fan

Y21 (PNP digital output)

100mA per channel, direct drive

Curtain motor (open/close)

2 DO + 2 DI

DO controls direction, DI receives limit switch signals

Sprinkler pump

Y24 relay

Activates sprinkling during high heat

Alarm light/buzzer

DO (Y21/Y22)

Alerts when thresholds are exceeded

The BL192 supports up to three Y-series expansion modules, allowing flexible combinations of DI, DO, relay, AI, AO, RTD, and other I/O types.

2. Core architecture: RS485 acquisition + local logic control + MQTT cloud upload

Data Acquisition Path
  • RS485 port: Connects all Modbus RTU sensors (temp/humidity, NH₃, CO₂, etc.). The BL192 acts as the master and reads data at a configured polling period (e.g., 2 seconds).

  • Ethernet ports: ETH0 connects to the farm's local area network and uploads data to AWS IoT Core via MQTT (TLS encrypted). ETH1 can be used to cascade additional BL192 units or network devices; the built-in switch supports bypass mode (a single device failure does not break the link).

  • I/O boards: Directly connect to fans, curtain motors, alarms, and other actuation devices. 

Why emphasize "isolated RS485 + MQTT"?

  • Isolated RS485: Provides interference immunity and protects the main controller. Suitable for long-distance wiring in barns (up to several hundred meters) and supports up to 247 slave devices.
     
  • MQTT protocol: Lightweight, bandwidth-efficient, supports offline message queuing and retransmission. Natively compatible with AWS IoT Core, Alibaba Cloud, Huawei Cloud, and other platforms, and performs reliably even on low-bandwidth rural networks.

3. Logic control function in practice: from concept to specific configuration

The BL192 has built-in Arithmetic Operation, Logic Operation, and Conditional Operation functions, enabling local decision-making and control without relying on the cloud. Below are three typical scenarios with detailed implementation methods.

Scenario 1: Three-Stage Ventilation Control Based on THI

Step 1: Calculate THI locally

Read temperature (°C) and humidity (%) via RS485. On the BL192's "Arithmetic Operation" page, create a calculation task:
THI = (temperature reading × 1.8 + 32) – (0.55 – 0.55 × humidity/100) × (temperature reading × 1.8 + 32 – 58)
Store the result in a custom register (e.g., REG40004).

Step 2: Create logic rules

Go to "Logic Operation" and create a rule named "THI>68". Select Input 1 as the THI register, choose "Greater Than" as the condition, set the threshold to 68, output type to Boolean, output address to the DO register controlling the Level 1 exhaust fan (e.g., REG1000), and set the Boolean value to "Close" (to start the fan).

Similarly, create a "THI>72" rule to activate secondary circulation fans, and a "THI>80" rule to start the sprinkler pump and run exhaust fans at full speed.

Result: When the barn THI rises, the BL192 automatically activates ventilation and cooling equipment in stages, without manual intervention or waiting for cloud commands.

Scenario 2: Ammonia Exceedance Interlock

Rule: When NH₃ > 10 ppm, regardless of the current THI, force-start additional air exchange fans and trigger an alarm.

In "Logic Operation", select Input 1 as the NH₃ register (from an RS485 slave), choose "Greater Than" as the condition, set the threshold to 10, and set the output addresses to the DOs for the backup fans and the alarm.

If you want a more advanced action only when "THI > 72 AND NH₃ > 10", you can combine the two conditions using an "AND" relationship in "Conditional Operation".

Scenario 3: CO₂ Exceedance Override

Rule: When CO₂ > 3000 ppm, force increased fresh air intake (e.g., set variable-frequency fan speed to 100%).

This can be implemented via "Logic Operation" or "Conditional Operation", with the output address connected to an AO module (such as Y41) to control the VFD.

All these logic operations are executed inside the BL192. Configuration is done through a web interface with simple point-and-click actions – no coding required. The web interface also displays whether each logic rule is currently triggered ("1") or not ("0"), making debugging easy.

4. Product Advantages and Customer Benefits (Why Choose BL192?)

  • Save PLC costs: The BL192 integrates a Modbus master, edge computing, and MQTT gateway functions, replacing the combination of a small PLC and a gateway. A single device completes acquisition, control, and cloud upload.

  • Flexible expansion: 1–3 Y-series I/O slots allow free combination of DI/DO/relay/AI/RTD modules, adapting to barns of different sizes (from dozens to thousands of cows).

  • Industrial-grade reliability: -40°C to +85°C operating temperature, passed EMC Level 3 tests (ESD, EFT, Surge), built-in independent hardware watchdog. Suitable for farm environments with dust, humidity, and large temperature variations.

  • Remote maintenance: Supports BLRAT remote access tool, enabling remote firmware upgrades and parameter changes, reducing on-site service costs.

  • Quick deployment: Web-based configuration, no programming required; pre-integrated with Alibaba Cloud, Huawei Cloud, AWS, and ThingsBoard – just fill in the device certificates to connect.

  • Self-sustaining during network outages: Local logic control does not depend on internet connectivity. Even if the cloud connection is lost, critical functions such as ventilation and alarms continue to operate normally.

5. Expected Outcomes and Customer Value

An environmental monitoring system for dairy barns built with the BL192 can:

  • Monitor in real timeTHI, NH₃, and CO₂, with data uploaded to AWS IoT Core every 60 seconds, enabling historical trend charts and reports.

  • Automatically controlventilation, sprinklers, and curtains, keeping THI consistently below 68 and reducing milk production losses.

  • Provide exceedance alarms: When NH₃ or CO₂ exceeds thresholds, activate on-site audible/visual alarms and push cloud notifications to alert farm managers for timely action.

  • Reduce labor costs: Automate tasks that previously required manual inspections and manual switching of equipment.

  • Offer scalability: Additional parameters such as light intensity, water consumption, or electricity meters can be added in the future without replacing the main controller.

For European dairy farms, this solution significantly improves animal welfare, helps meet increasingly stringent environmental and farming regulations, and delivers direct economic returns (reduced milk loss, lower disease incidence).

Conclusion

The BL192 uses an isolated RS485 Modbus RTU master to collect data from a wide range of agricultural sensors, employs flexible I/O expansion to control field equipment, relies on local logic operations to automatically regulate heat stress and air quality, and finally uploads data via the MQTT protocol to AWS IoT Core for remote management. It fills the gap between expensive traditional PLC solutions and simple thermostats that cannot implement complex interlocking. The BLIIOT BL192 dairy farm monitoring module is an ideal choice for modern, automated dairy barn environmental control.

Leave a message
FirstName*
LastName*
Email*
Message*
Code*
Verification Code
We use Cookie to improve your online experience. By continuing browsing this website, we assume you agree our use of Cookie.