Author Topic: Using a Davis amenometer with an Arduino  (Read 4381 times)

0 Members and 1 Guest are viewing this topic.

Offline wrybread

  • Senior Member
  • **
  • Posts: 94
Using a Davis amenometer with an Arduino
« on: April 06, 2017, 01:27:14 AM »
I needed to install a couple of remote wind monitoring stations but didn't want to buy another full Davis system and found this:

http://cactus.io/hookups/weather/anemometer/davis/hookup-arduino-to-davis-anemometer

That's some code and wiring instructions to connect a Davis anemometer directly to an Arduino. I adapted the code so I can connect that Arduino to a Raspberry Pi or whatever and use it with the awesome weeWX program:

https://github.com/wrybread/weewx-ArduinoWeatherStation

I got the Davis anemometer off eBay for $114 shipped:

http://www.ebay.com/itm/191951731404

If that auction is gone, the auction title is "Davis Instruments 6410 Davis Anemometer For Vantage Pro Pro2 6152 New", and the seller is sarafankit2009. Highly recommended, came quickly and brand new.

Anyway, this means you can have an internet connected professional quality wind gauge for $136 (mine was $114 for the anemometer, $12 for the CHIP, which is similar to a Raspberry Pi, and $10 for the Arduino clone). It would be easy enough to add other sensors to the Arduino, like temperature and barometric pressure. And a really nice bonus is that I don't get strong-armed into buying a locked down data cable that costs more than this whole project if I bought it from Davis.

My test system is currently uploading here:

http://rproductions.org/wind

At the moment the charts that weeWX are uploading are very rough drafts, but they're here (only the wind data is relevant for this station):

http://sinkingsensation.com/weather2/charts1.html

Anyway, hope it's useful for someone, and let me know if any problems getting it set up.
« Last Edit: April 06, 2017, 01:33:13 AM by wrybread »

Offline ct

  • Contributor
  • ***
  • Posts: 101
Re: Using a Davis amenometer with an Arduino
« Reply #1 on: April 07, 2017, 08:11:16 AM »
I notice the code on cactus.io is doing software debouncing on the anemometer pulse.  When I checked with my oscilloscope, a rotation created a perfect square wave.  No debouncing was required, I assume that hall effect sensors don't behave like mechanical switches.  However I calculate peak gusts between reporting intervals by measuring the time between pulses rather than rotations per second.  I found that noise was creating false triggers until I added a capacitor between the pulse wire and ground.

Offline wrybread

  • Senior Member
  • **
  • Posts: 94
Re: Using a Davis amenometer with an Arduino
« Reply #2 on: April 07, 2017, 12:53:19 PM »
Quote
However I calculate peak gusts between reporting intervals by measuring the time between pulses rather than rotations per second. 

Thanks, do you have any Arduino code I could try?

Quote
I found that noise was creating false triggers until I added a capacitor between the pulse wire and ground.

What value capacitor? And did you still have a resistor between pulse and positive?

I should be at the location with the Davis Vantage Pro2 this weekend and hope to have time to compare the readings from my Arduino weather station and the Davis side by side.


« Last Edit: April 07, 2017, 01:02:20 PM by wrybread »

Offline ct

  • Contributor
  • ***
  • Posts: 101
Re: Using a Davis amenometer with an Arduino
« Reply #3 on: April 12, 2017, 12:39:55 AM »
I don't have any particular code available publicly.

I use a .1uF capacitor and a 10K resistor.

Offline wrybread

  • Senior Member
  • **
  • Posts: 94
Re: Using a Davis amenometer with an Arduino
« Reply #4 on: April 12, 2017, 01:01:45 AM »
thanks hugely for the tips. I'll be working on it sometime this week, if you happen to be able to share the arduino sketch, would love to see it. Can be messy, I can extract the relevant part. If email is easier I'm at wrybread at gmail dot you know what.

 

anything