Hacker News new | past | comments | ask | show | jobs | submit login

The wind speed, wind direction, and rain amount sensors used in the personal weather station are pretty cool. They contain no active electronics.

The wind speed sensor uses a magnet and a reed switch. Once per revolution the magnet passes over the switch, momentarily tripping it.

Pull up a GPIO, hook it to one side of the switch, hook the other to ground, and then just count the pulses you see on the GPIO. Wind speed is proportional to pulse rate.

The rain gauge also uses a magnet and reed switch. It has a collection cup mounted on a pivot. When empty it rests tilted to one side, with half of the cup below the pivot and half above, with the two halves separated by a barrier so that water cannot flow between them. The water falls over the center of the cup, and the geometry is such that it ends up on the high side of the cup.

When enough rain accumulates in the high side, it causes the cup to pivot to that side. The cup is shaped so that water cannot remain in the low side, and so the full former high side drains, leaving the cup empty. The other side is now the high side, and starts filling, leading to an eventual pivot back, and the cycle repeats.

It pivots after 0.011 inches of rain. During the pivoting the magnet passes the reed switch. Hook it to a GPIO just like with the wind speed sensor, count the pulses, multiply by 0.011, and you've got inches of rain.

The wind direction sensor also uses a magnet and reed switches. It has 8 reed switches arranged around a circle, evenly spaced. The magnet is on the arm that points in the wind direction, arranged so that as the arm rotates it passes over the reed switches.

The magnet is powerful enough and/or the reed switches are sensitive enough that the magnet does not have to be right over the switch to trip it. It can be a little the side. This distance is great enough that you can actually have two switches tripped at once. As the arm rotates, the pattern you see is a single switch is tripped, then that switch and one of its nearest neighbors are both tripped, then the first switch opens but the neighbor remains closed. As it continues to rotate, that neighbor and the next one past it will both be closed for a bit, then the first neighbor opens.

By looking at which of the eight switches are closed, you can tell which of 16 directions is closes to the one the the wind is coming from one.

The reed switches are all wired in parallel, each in series with a different value resistor. You can tell which switch or switches are closed by measuring the resistance. For example, supply a constant voltage to one side of the sensor, hook the other to a known resistance, and use an ADC to measure the voltage across that known resistance. You can then calculate the resistance from the closed switches and their resisters, and see what combination of switches must be closed to produce that resistance.

The link given in the article on building the weather station that points to Argent Data Systems to buy the sensors gives a product not found message. You can get very similar sensors at Sparkfun [1].

I was going to say you could get the same sensors at Sparkfun, because that is where I got mine, but the ones I bought were these [2], which is listed as retired, with an updated version available which is the one I linked to above.

The difference? The older version appears to actually be from Argent. The datasheet says Argent Data Systems. I'm not sure Argent actually made them, because the Argent data sheet says "Imported by Argent Data Systems".

The newer version's datasheet says "Shenzhen Fine Offset Electronics Co., Ltd", and is in metric (rain gauge tips at 0.2794mm), and has both English and Chinese text.

I wonder of Shenzhen Fine Offset Electronics is the original maker that Argent imported from, and Sparkfun just switched to importing them itself?

Comparing the Chinese text to the translated English text in the Shenzhen datasheet is interesting. For the rain guage, the Chinese text says 0.3mm, which would be 0.0118". This suggests it might even be that Shenzhen made this originally for Argent, designed for US measurements, so it is 0.011", that got converted to metric (0.2794mm) in Shenzhen's English documentation, then rounded to 0.3mm in Shenzhen's Chinese documentation. Or, it was designed to be 0.3mm, that got converted to 0.011" (although it should have been 0.012" as the correct result is a tad over 0.0118") in the Argent documentation, and Shenzhen for some reason decided to go with that but convert to metric in their English documentation, instead of using the correct 0.3mm?

Another interesting difference in the Chinese and the English: the wind speed sensor Chinese documentation contains 0.33m/s. The English documentation says 2.4km/h, which it says is the wind speed that will cause the switch to close once per second. The Argent document says "1.492 MPH (2.4 km/h)". The things is, 2.4km/h is 0.667m/s, not 0.33m/s.

Do they measure frequencies per half-second rather than per second in China for this kind of thing? I can't think of any reasonable way to explain that factor of 2.

[1] https://www.sparkfun.com/products/15901

[2] https://www.sparkfun.com/products/retired/8942




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: