Skip to Content
Success story · Weather station in Mexico
Talk to an engineer

Success story · Río Yaqui irrigation district, Mexico

Weather data from the Yaqui Valley, on any screen. One M-Duino 42 runs the station.

A real weather station in Mexico. One M-Duino 42 reads six ADCON sensors, keeps a local copy of the data and sends it to MetApp, the station web app. The meteorologist reads it from a desk or a phone, and changes some settings from a distance.

6weather variables from ADCON sensors
1M-Duino 42 controls every device of the station
MetAppweb app with the readings, on desktop or mobile
Remotesetup of some station settings over Telnet

The meteorologist needs the numbers, not a drive to the station.

The PLC reads them, stores them and sends them.

This station is installed in the Yaqui Valley, Mexico, by the Red de Estaciones Meteorológicas del Distrito de Riego del Río Yaqui. Ing. Juan Carlos Raygoza, from Ciudad Obregón, Sonora, developed, designed and installed it. One M-Duino 42 reads the weather sensors, stores the data on an SD card with the time from an RTC, and sends it to a Telnet server. MetApp, the station web app, shows the values. Short version: the station works alone, and the team sees it from far away.

From the field

The station, its cabinet and its web app.

Real material from the original case: the station in the field, the control cabinet and a MetApp screenshot with real values.

Weather station of the Río Yaqui irrigation district network in the Yaqui Valley, Mexico, with sensor mast and field cabinet
The weather station in the Yaqui Valley, Mexico: sensor mast and field cabinet inside a fenced plot.
Control cabinet of the weather station with an Industrial Shields PLC, a module labelled ADC / RTC / SD and an LCD display
Inside the cabinet: the Industrial Shields PLC (top left), a module labelled ADC / RTC / SD, a local LCD display and the field terminals.
MetApp screenshot with the average weather values in the Yaqui Valley on 27/12/2017
MetApp, the station web app: "Valores promedio en el Valle del Yaqui", updated 27/12/2017 16:51:18. Real screenshot from the case. Open the screenshot at full size

The challenge

A station that works alone. A team that sees it from far away.

The customer needed an autonomous weather station. Its data had to be easy to read from a distance. The design had to be easy to copy to other points of the area. And the setup had to change without a site visit. This is the brief of the case.

01

Autonomous

The station works on its own in the field. It reads its sensors and keeps its data, with nobody on site.

02

Remote monitoring

The meteorologist sees the main weather parameters of the site from a desk or a phone.

03

Easy to replicate

The design has to be easy to copy to other points of the area.

04

Remote configuration

Some settings change from a distance, through the Telnet platform. No trip to the station.

Developed by Ing. Juan Carlos Raygoza

Ing. Juan Carlos Raygoza developed, designed and installed the project. The PLC program was written in the Arduino IDE. The customer knew well-known PLC brands and also Arduino. That gave the project a broader view: industrial PLCs based on Arduino.

How it works

Three loops: read, survive, adjust.

The station runs three loops: read and publish the data, keep it when the link drops, and change settings from a distance. The values in the first panel are real. The behaviour in the panels is an illustrative simulation.

Loop 1 · Read and publish

From six sensors to a web page

The M-Duino 42 reads the ADCON sensors: temperature, humidity, solar radiation, wind speed, barometric pressure and rain. It stores the data on the SD card with the time from the RTC, and sends it to an intermediate Telnet server. The server keeps a database and a REST service. MetApp, built with Angular 4, shows the values on a desktop or a mobile device.

  • Six weather variables from ADCON sensors
  • Local copy on the SD card, time from the RTC
  • Telnet server with a database and a REST service
  • MetApp web app: desktop or mobile
TemperatureHumiditySolar radiationWind speedBarometric pressureRainM-Duino 42SD cardServerTelnetMetApp
1 READ2 LOG TO SD3 SEND4 ON METAPP
MetApp · Yaqui ValleyWind direction 236.02°
Temperature16.03 °C
Relative humidity71.21 %
Solar radiation155.95 W/m²
Chill hours (cycle)41.92 h
Precipitation (cycle)5.22 mm
Barometric pressure771.67 mmHg
Wind speed10.05 km/h
Wind gusts12.16 km/h
Dew point10.75 °C

Real values from a MetApp screenshot, 27/12/2017 16:51:18. The animation is illustrative.

Related: smart irrigation with a weather API

Loop 2 · Link loss

The link drops. The data stays in the station.

A remote station loses its link from time to time. Here the PLC keeps a local copy of every reading on an SD card, with the time from the RTC. So a gap in the web is not a gap in the data. The case does not publish how the station sends the stored rows again. The panel shows a common pattern: store and forward.

  • Each reading goes to the SD card with its time
  • Link down: the rows wait in the station
  • Link back: the pending rows go to the server (example)
M-Duino 42ServerMetAppSD card0
Link OKLink lostLogging to SDResend

Illustrative simulation. Scaled times, example behaviour, no program from the installation.

Try comms loss in the remote site telemetry simulator

Loop 3 · Remote setup

Change a setting without a site visit.

The meteorologist can change some station settings by remote control, through the Telnet platform. The PLC applies them and the station keeps working. The case does not publish the list of settings. The panel uses example commands.

  • Settings sent through the Telnet platform
  • The PLC applies them and confirms (example)
  • No trip to the station
MeteorologistTelnet platformM-Duino 42
5 min

Telnet session (example commands)

    Example commands. The case does not publish the list of settings or the command format.

    System architecture

    How does one M-Duino 42 run a remote weather station?

    Six ADCON sensors go into one M-Duino 42. The PLC also controls an SD card, an RTC, wireless communication systems, security cameras and alarms. It sends the data to a Telnet server with a database and a REST service, and MetApp shows it on the web. The case does not publish the sensor interfaces or the type of wireless link.

    Weather station in the Yaqui Valley, Mexico, with one M-Duino 42 and the MetApp web app6 ADCON sensorsTemperatureHumiditySolar radiationWind speedBarometric pressureRainnot publishedM-Duino 42controls every deviceSD cardRTCCamerasAlarmsWireless linkDataTelnetTelnet serverdatabase · REST serviceMetAppweb app, Angular 4Meteorologistdesktop or mobileRemote setupBased on the case description. Sensor interfaces and the type of wireless link are not published.6 ADCON sensorsTemperatureHumiditySolar radiationWind speedBarometric pressureRainM-Duino 42controls every deviceSD cardRTCCamerasAlarmsWireless linkDataTelnetTelnet serverdatabase · REST serviceMetAppweb app, Angular 4Meteorologistdesktop or mobileRemote setup: TelnetBased on the case description. Sensor interfaces andthe type of wireless link are not published.
    Data from the stationRemote setup to the stationDetail not published by the case
    Signals and data
    FlowBetweenTypePurpose
    Sensor readingsADCON sensors → M-Duino 42Not publishedTemperature, humidity, solar radiation, wind speed, barometric pressure and rain
    Local logM-Duino 42 → SD cardLocal storageKeeps the station data on site
    TimeRTC → M-Duino 42Real time clockGives the real time for each reading
    Data outM-Duino 42 → Telnet serverTelnetSends the readings to the intermediate server
    Web dataTelnet server → MetAppDatabase and RESTFeeds MetApp, built with Angular 4
    Remote setupTelnet platform → M-Duino 42TelnetChanges some station settings by remote control
    Site devicesM-Duino 42 → site devicesNot publishedWireless communication systems, security cameras and alarms

    Why it works

    Why the M-Duino 42 fits this station.

    Easy to connect to the sensors

    The customer wanted a PLC that integrates easily with the sensors. Here one M-Duino 42 reads all the ADCON sensors and controls every device of the station.

    Easy to program, no licence fees

    The PLC program was written in the Arduino IDE. The programming platform is free, and the customer valued the flexibility of the programming itself.

    Built to be copied

    One controller and one web app. The objective was a station that is easy to replicate across the area.

    Hardware used

    One M-Duino 42 controls the whole station.

    M-Duino Ethernet PLC Arduino 42, industrial PLC based on Arduino Mega with 42 I/O

    M-Duino Ethernet PLC Arduino 42

    An industrial PLC built on an original Arduino Mega 2560, with 26 inputs and 16 outputs, Ethernet, RS-485 and RS-232, for DIN rail. In this station it reads the weather sensors and controls the SD card, the RTC, the wireless communication systems, the cameras and the alarms.

    Inputs
    26: 12 analog/digital (0-10 V), 14 digital optoisolated, 4 with interrupt
    Outputs
    16: 10 digital optoisolated, 6 analog/digital/PWM (0-10 V)
    Comms
    Ethernet (RJ45), RS-485, RS-232, TTL, I2C, SPI
    Built in
    Real time clock, microSD slot
    Power supply
    12 to 24 Vdc
    Mounting
    DIN rail TS35, IP20

    The case dates from 2017 and names the M-Duino 42. The same product page now sells its current version, the M-Duino 42+, with a real time clock and a microSD slot built in. In the cabinet photo you can see a separate module labelled ADC / RTC / SD.

    Questions about this case

    Who designed and installed this weather station?

    Ing. Juan Carlos Raygoza, from Ciudad Obregón, Sonora, Mexico. He developed, designed and installed the project for the Red de Estaciones Meteorológicas del Distrito de Riego del Río Yaqui. The PLC program was written in the Arduino IDE.

    Which weather variables does the station measure?

    The M-Duino 42 reads ADCON sensors for temperature, humidity, solar radiation, wind speed, barometric pressure and rain. The MetApp screenshot of 27/12/2017 also shows wind direction, wind gusts, dew point, accumulated chill hours and accumulated precipitation per cycle.

    How do the readings reach the web?

    The PLC sends the data to an intermediate Telnet server. The server has a database and a REST service. MetApp, the station web app built with Angular 4, shows the data on a desktop or a mobile device.

    What happens when the station loses its link?

    The PLC keeps a local copy of the data on an SD card, with the time from an RTC. The case does not publish the resend logic. A common pattern is store and forward: the station keeps the rows and sends them when the link comes back. You can try it in our remote site telemetry simulator.

    Can I connect my weather sensors to an M-Duino 42+?

    The case does not publish how the ADCON sensors connect. As a guide, the M-Duino 42+ has 0-10 V analog inputs, digital inputs with interrupts for pulse sensors such as rain gauges and anemometers, and RS-485 for Modbus RTU sensors. Check the output of each sensor first. A 4-20 mA sensor needs a shunt resistor.

    Would you use Telnet for a new station?

    Telnet did the job here in 2017, through an intermediate server. Telnet sends data as plain text. For a new station, keep the PLC on a private network or a VPN, or send the data over MQTT or Modbus TCP to a server that handles the encrypted link to the web. The M-Duino 42+ runs these protocols with Arduino libraries.

    Download the success story

    4-page PDF with the challenge, the logic, the architecture and the hardware. No form required.

    Similar project?

    Tell us your sensors and your sites. An engineer will answer.

    Tell us which variables you measure, how many stations you plan and where the data must go: a web app, a SCADA or a cloud service. We will tell you which controller fits and how to connect it.

    • You get an answer from our technical team
    • Sensor interfaces and I/O count for your station
    • Arduino, ESP32 or Raspberry Pi based PLCs