Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Anemometer support #3879

Open
mikechristiansen opened this issue May 13, 2024 · 9 comments
Open

[Feature Request]: Anemometer support #3879

mikechristiansen opened this issue May 13, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@mikechristiansen
Copy link

Platform

NRF52, ESP32

Description

Hi, Just wondering what the best approach might be to add Anemometer support for environmental data on Meshtastic. The use case of a remote weather station is exciting due to Meshtastics hardware support and data routing capability.
I understand a co-processor could be used and the serial module to forward data but using the hardware meshtastic is running on would seem to be more power efficient. Data could then be routed to other systems using MQTT or other integrations, and having the data available to other nodes on the default channel through telemetry packets might be useful for other nodes on the network.
Many anemometer sensors are on the market, most use an analog read pin for wind direction and a digital pin for wind speed. the DAVIS anemometers are widespread and of good quality. Code is available on Arduino to take measurements from this sensor https://github.com/wrybread/weewx-ArduinoWeatherStation/blob/master/ArduinoWeather.ino
Is there any work on adding this sensor type? Or any desire or willingness from developers to add this to Meshtastic?
Many thanks for the hard work on this fantastic project!
Regards, Mike.

@mikechristiansen mikechristiansen added the enhancement New feature or request label May 13, 2024
@garthvh
Copy link
Member

garthvh commented May 13, 2024

This is the first step meshtastic/protobufs#491

Using serial to pass data from a weather station is probably going to be the easiest way go get started.

Analog sensors that require processing need to have a second MCU to do that processing, there are no I2C Anemometers that we have found.

@mikechristiansen
Copy link
Author

Thanks for the rapid reply!
OK, so given analog reads require a second MCU I should get to developing something low power and use serial for now. Can we integrate with protobufs using serial? or i2c might be preferable?

@garthvh
Copy link
Member

garthvh commented May 13, 2024

The serial module has a protobufs mode, which is probably what we would want to use to pass data in as an environment telemetry packet.

@garthvh
Copy link
Member

garthvh commented May 13, 2024

We could also try and make a I2C adaptor / MCU for some of these analog sensors, or use serial from weather stations. I suspect weather stations may be the first step as a lot of people have fancy weather stations already

@mikechristiansen
Copy link
Author

Thank you!

@AllanRomanato
Copy link

Wondering here..

What if we create something like an "stationary" module which would have 2 MCUs (one for LoRa and one for analog sensors) or a outside module.

We could have some #defines to handle if it is an stationary module or not and another code to the new MCU which could transfer the data to LoRa via Serial.

@mikechristiansen
Copy link
Author

@AllanRomanato I was thinking something like the ATTINY85 might do it, low power consumption if running from 3.3v or vbat.

@caveman99
Copy link
Sponsor Member

If there's arduino code already, pick an arduino and get the anemometer running with it. Then implement an I2C slave on the board and assign it a unique address. A good source of information how to do that would be the m5stack cardkb firmware. This way you created your own (sampling, averaging and max values) i2c anemommeter which can then be added in the meshtastic firmware.

@caveman99
Copy link
Sponsor Member

the key is to code the intermediate mcu so that the meshtastic firmware does not need to poll it for a few minutes. Average sensors report every 900 seconds, the wind sensor can go lower, but should at lease buffer/average measurements for about 5 minutes. One data transmission from the new sensor type can be crafted so to carry all those values. What about momentary value every 30 seconds, then average and peak values. Both for direction and speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants