I'm working on a wireless weather station and mulling over whether best to do the processing on the outdoor unit that then passes the results to the indoor unit for display, OR the outdoor units collects the raw data, and the indoor unit does the processing, i.e. converting the wind data into speed, rain bucket count into rainfall, and adjusts pressure to relative etc. Given it will be in my garden it could be 6 of 1 half a dozen of the other. The only pro I can think of is my Outdoor unit code might be that little bit smaller, but then the outdoor unit doesn't need to run the display.
As for hardware I was thinking using Nanos for both the indoor and outdoor unit. Yes, I know pro for outdoor would be better from power consumption point of view, but at the moment power isn't a problem.
I would use the method that produces the least amount of transmitted data. For example, my DS18B20 temperature sensor takes a reading every 15 seconds and the remote unit transmits 2 bytes of raw data, the indoor unit receives and converts it to a 4 byte float then displays it on an LCD.
If I used the opposite method, the remote unit would do the conversion and transmit the 4 byte float for the indoor unit to simply display.
Thanks, I already have all the hardware just mulling over where to do the processing, but yes keeping the amount of data to be transmitted down is something I have been thinking about. Thanks for the input.
I would think that the indoor unit should be insulated from the details that the outdoor unit deals with. It wants to know what the wind speed is, but it doesn't care how it was derived.
That way, when you have to replace the anemometer with a better but different model, only the outdoor code has to change. The interface that the indoor device relies on can remain the same.
You might also think about how to minimize the impact to that interface if you decide to add a new instrument to the outdoor device.
While minimizing the data transferred can be good, I would prefer, at least to start with, to make my data packets human readable.
That way you can use the serial monitor to send test data as soon as you have completed any functionality on your indoor unit.
That also means that you can test easily, conditions that won't soon occur in your garden, but you'll know for example that the display won't get messed up if the temperature does reach 3 digits.
MagicalSputnik:
I'm working on a wireless weather station and mulling over whether best to do the processing on the outdoor unit that then passes the results to the indoor unit for display, OR the outdoor units collects the raw data, and the indoor unit does the processing, i.e. converting the wind data into speed, rain bucket count into rainfall, and adjusts pressure to relative etc. Given it will be in my garden it could be 6 of 1 half a dozen of the other. The only pro I can think of is my Outdoor unit code might be that little bit smaller, but then the outdoor unit doesn't need to run the display.
If your weather station is like mine, you will be tinkering with the code forever. Best to do that on the indoor processor.
In my case, my station sends all sensor data to my Home Assistant / Node-Red computer using MQTT, and any processing is performed on my Home Assistant / Node-Red computer. If I have to change the firmware on the putside unit, I have OTA.
wildbill:
While minimizing the data transferred can be good, I would prefer, at least to start with, to make my data packets human readable.
That way you can use the serial monitor to send test data as soon as you have completed any functionality on your indoor unit.
That also means that you can test easily, conditions that won't soon occur in your garden, but you'll know for example that the display won't get messed up if the temperature does reach 3 digits.
That is a very good point. I can see that everything is working, giving correct readings and only have to deal with one Arduino plugged in. As for tinkering with code mentioned it will be in my garden so walking out with the laptop isn't a biggie. Here's hoping I don't have to tinker too much once it is up and running.