cloudy cloudy

Author Topic: Modbus weather station  (Read 682 times)

0 Members and 1 Guest are viewing this topic.

Offline david s

  • Posts: 3
  • OS/Browser:
  • Win NT 10.0
  • Chrome 66.0.3359.139
Modbus weather station
« on: May 09, 2018, 10:55:55 AM »
Hey guys!

La Crosse WS is just about on its last legs, falling apart after years of work and looking to replace with some modbus sensors over IP.

Got an Inspeed anemometer connected to a high-speed counter. 4-20ma wind direction sensor. Rainwise rain bucket, multiple temp and humidity sensors, air-pressure sensor on the way.
Basically bits and pieces I've collected over the years and now want to get talking to Weather Display.

Currently the sensors are connected to a Redlion Datastation over modbus via RS485 and IP based comms. The datastation can log all the data as well as display webpages with the data, but ideally I'd like to get this talking to WD and Wunderground eventually and keep using a few of the hobbyboards sensors such as the lightning sensor which is hard to duplicate, and it's not possible to connect one-wire to the datastation as far as I can tell - there's no serial protocol to talk to one-wire.
http://www.redlion.net/products/industrial-automation/controllers-and-data-acquisition/data-station-plus

The datastation gives me the ability to output the data in various formats such as serial data and write a program to emulate an existing weather station, output a file via FTP and have WD read the file, emulate an existing modbus weather station (if a compatible one exists) and a few other option. Won't do HTTP GETs and other web-based comms - basically I'm stuck on what is the best way to get WD to talk to an industrial controller.

Currently it's connected to a couple of power meters calculating solar production and energy consumption and reporting data to a PC via FTP which communicates real-time to PVOutput.
Now that Hobby-boards has gone I've noticed a considerable amount of modbus based sensors suitable for intergrating into WD.

Offline Weather Display

  • Posts: 85,327
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 66.0.3359.139
    • Weather Display
Re: Modbus weather station
« Reply #1 on: May 09, 2018, 07:49:58 PM »
maybe you could emulate the Arduino?

Offline david s

  • Posts: 3
  • OS/Browser:
  • Win NT 10.0
  • Chrome 66.0.3359.139
Re: Modbus weather station
« Reply #2 on: May 11, 2018, 11:01:03 AM »
maybe you could emulate the Arduino?

That looks like a very do-able option. So you can just add the tags into the ardunio settings and start sending the data as serial data every few seconds ?
Couldn't find much documentation regarding the universal serial input.

Just been browsing the forum and there's a few people doing it similar, the controller gives the ability to easily convert all the data prior to sending to WD. Example, want to record the water level of a water tank using an ultrasonic water level sensor (which I see people are using as snow depth). Rather than tell me how empty the tank is, I can also calculate how high the water is, and then calculate the volume of water in the tank using simple maths which is much useful information.

Thanks.

Offline david s

  • Posts: 3
  • OS/Browser:
  • Win NT 10.0
  • Chrome 67.0.3396.99
Re: Modbus weather station
« Reply #3 on: July 01, 2018, 08:25:54 AM »
Got this up and running.

Wind speed is done using the inspeed vortex sensor into a high speed counter. Wind speed calculated every five seconds and also avg speed over the current 1 minute period using simple maths.
Wind direction calculated with Aliexpress RS485 wind direction sensor.
Rain using Rainwise bucket into a counter.
Temperature and Humidity is a little sketchy as using a $20 sensor which needs to be upgraded to a more industrial model for accurate readings.
Soil temp and soil hum by a RS485 device from Aliexpress.
Solar readings from my roof top solar system, modbus meters installed in my switchboard.

Might post a few pics, been running for a fortnight with no issues. Has been previously publishing data to pvoutput for solar power and consumption data.

Offline Weather Display

  • Posts: 85,327
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 68.0.3440.106
    • Weather Display
Re: Modbus weather station
« Reply #4 on: August 27, 2018, 07:03:17 PM »
I have managed to get Modbus working in a test program (using C#)

 

cumulus