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.
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.
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.
Autonomous
The station works on its own in the field. It reads its sensors and keeps its data, with nobody on site.
Remote monitoring
The meteorologist sees the main weather parameters of the site from a desk or a phone.
Easy to replicate
The design has to be easy to copy to other points of the area.
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.
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
Real values from a MetApp screenshot, 27/12/2017 16:51:18. The animation is illustrative.
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)
Illustrative simulation. Scaled times, example behaviour, no program from the installation.
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
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.
| Flow | Between | Type | Purpose |
|---|---|---|---|
| Sensor readings | ADCON sensors → M-Duino 42 | Not published | Temperature, humidity, solar radiation, wind speed, barometric pressure and rain |
| Local log | M-Duino 42 → SD card | Local storage | Keeps the station data on site |
| Time | RTC → M-Duino 42 | Real time clock | Gives the real time for each reading |
| Data out | M-Duino 42 → Telnet server | Telnet | Sends the readings to the intermediate server |
| Web data | Telnet server → MetApp | Database and REST | Feeds MetApp, built with Angular 4 |
| Remote setup | Telnet platform → M-Duino 42 | Telnet | Changes some station settings by remote control |
| Site devices | M-Duino 42 → site devices | Not published | Wireless 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
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