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

Modify to enable anemometer counts? #4

Closed
aufdenkampe opened this issue Jul 19, 2019 · 4 comments
Closed

Modify to enable anemometer counts? #4

aufdenkampe opened this issue Jul 19, 2019 · 4 comments

Comments

@aufdenkampe
Copy link
Member

aufdenkampe commented Jul 19, 2019

Modifications to the firmware code could enable this to count the higher frequency signals of a reed-switch anemometer such as https://www.store.inspeed.com/Inspeed-Version-II-Reed-Switch-Anemometer-Sensor-Only-WS2R.htm

This might not be a great idea, given that the Project Tally device and Tally Library all do this quite well.

If someone is interested in doing this, here are some ideas from @bschulz1701 (Mar. 2019):

I just glanced back at the code, and using the debounce I have, you would be able to measure windspeeds up to ~ 100 m/s, realistically I would not want to push it beyond ~75 m/s (Still plenty). The bigger issues are that right now it is just set to return 1 byte (0 ~ 256 values) which would mean if you're measuring every 15 minutes, you would have a max average wind speed of 0.28 m/s, not even enough to spin the cups. This can be fixed of course, we would return a 4 byte (0 ~ 4.29billion) value no problem, of course, the code on both ends would have to be modified to send and accept that, but not a big deal. I think the biggest issue if that we could hedge a bit of a hacked system I made for you because we would only wake up when the rain bucket would tip, maybe a few times an hour, and on average 50 tips in a day would be a good amount, where as with the anemometer, we get several counts per second, which means the device never can go to sleep and we draw much more current (several mA) all the time, which is less than desirable.

tl;dr The [Trinket] counter I made could work with some software modification, but it would consume a decent bit of power (a few mA) being on all the time, the Project Tally device I designed would be a better fit I think (unless you need I2C, which is going to be added, but not on there yet), because it sips power at <uA when it is recording counts, and has the range designed to handle the rapid ticks of anemometers

aufdenkampe added a commit that referenced this issue Apr 5, 2021
A mistake in the Slave code was only sending 1 byte instead of 2 was causing the bug described in #5.
Updating Slave to send a 32-bit (4-byte) long integer, and the Master to receive it, solved issue #5 and advanced #4.
aufdenkampe added a commit to EnviroDIY/ModularSensors that referenced this issue Apr 6, 2021
Updating to a 32-bit count enables use with a reed-switch anemometer (EnviroDIY/TippingBucketRainCounter#4) and also fixes a bug described in EnviroDIY/TippingBucketRainCounter#5. Tested and works, including backward compatibility.
@aufdenkampe
Copy link
Member Author

aufdenkampe commented Apr 6, 2021

The update to a 32-bit integer (4-bytes) has now made it possible to use the Master and Slave firmware to count spins of a reed-switch anemometer.

This has been tested and works with a recent update to the EnviroDIY Modular Sensors library ( EnviroDIY/ModularSensors@87cd0c9).

Use with an anemometer does require the slave device to get updated to >= v0.2.0 of this firmware (Slave_TippingBucket_Test_LowPower.ino), unlike the fix to #5.

Note that to calculate wind speed, you will need to create a calculated variable that divides counts by time to get frequency, then muliplies by a conversion factor. This is similar to getting wind speed from the Tally counter, as shown in these two examples:

We have not yet tested power consumption with an anemometer during windy conditions, but will report back when we do.

@aufdenkampe
Copy link
Member Author

Tested anemometer logging all night at ~12 km/hr, using a ModularSensors sketch with logging at 15 min intervals. Lipo battery voltage only dropped from 4.185 V to 4.154 V. It looks like the modified Pro Trinket (with green LED trace cut) does not consume too much power!

To close this issue, it might be good to build in a frequency calculation that would be equally useful for wind and calculating rain rate as in #2.

@aufdenkampe
Copy link
Member Author

aufdenkampe commented Apr 6, 2021

@fisherba just deployed a test of this in the wild this morning at https://monitormywatershed.org/sites/CL-outlet/.

Let's see how the battery holds up. I think it is a 6600 mAh LiPo with a 3.5W solar panel.

@aufdenkampe
Copy link
Member Author

aufdenkampe commented Apr 22, 2021

Battery is doing well, even after a windy and cloudy 5-day stretch in April, in which solar charging was minimal and winds were sustained between 10-20 km/hr day and night.

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

No branches or pull requests

1 participant