At work I started participating in a D.I.Y. club where we will build a weather station. This should reflect the weekly progress and what we are working on. Additionally this should in the end be a tutorial for a complete weather station based on a Raspberry and everything should work with the I2C protocol. Let’s start.
First we got an introduction by Brice Giboudeau on how an anemometer works. There are various options on how they work. Here is a list on what else is out there, but we looked into one that counts impulses. Basically there is a magnet attached to the rotating top and in the inner part is a reed switch that closes whenever the cup makes a rotation and passes the switch. We will want to count these and calculate the wind speed from there. Because we want to create a low power solution we will not count these with the Raspberry directly and instead have a little circuit that updates the raspberry occasionally.

For the Windspeeds we want to meassure average speed and also wind ghusts. This we will do via a ripple-carry binary counter: https://www.google.com/search?q=cd4020 Of course 14 bit is way overkill but we can reset the counter with any bit convenient.
We go for 30 km/h average speed and want to meassure up to 150 km/h windspeeds. Resulting in Windspeed Ws: 150000m/3600s = 41.66 m/s. First we calculate how many impulses this will generate which we have to count:
If we have an anemometer with 0.15m diameter and we want to know how many turns it rotates per meter we calculate:
The circumference C of our anemometer: C = diameter * π = 0.15 * π = 0.471239. This means our anemometer has a circumference of 0.47 meter.
Based on this we can calculate what our circuit must be able to support. Revolutions (T for turns) per second: Ws / C = 41.66 / 0.471239 = 88.6 turns / second. For our project we will calculate with 100 T/s to be safe.
If we want to pull windspeed data only every minute this means that we need to count up to 6000 Turns per minute. Additionally we will want to display wind ghust speeds. We will do this via interrupt, a second CD4020 will update the Raspberry whenever it counts 256 rotations and the Raspberry will track time between interrupts. Luckily our CD4020 is a 14 bit counter resulting in 2^14 (16384) counts before overflowing.


Archives
- November 2023
- December 2022
- November 2022
- February 2022
- November 2021
- October 2021
- September 2021
- July 2021
- April 2021
- March 2021
- February 2021
- January 2021
- September 2020
- July 2020
- April 2020
- March 2020
- February 2020
- December 2019
- November 2019
- October 2019
- August 2019
- June 2019
- February 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- May 2018
- March 2018
- February 2018
- December 2017
- November 2017
- September 2017
- July 2017
- June 2017
- April 2017
- February 2017
- January 2017
- October 2016
- September 2016
- July 2016
- May 2016
- April 2016
- March 2016
- August 2015
- July 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- October 2014
- April 2014
- March 2014
- February 2014