Go Down

Topic: Ultrasonic Anemometer (Read 81163 times) previous topic - next topic


Slow progress in the ultrasonics department so I've resurrected my WS2315 using the existing rain tipper and TX20 wind sensor on the Arduino. As far as I can see the code will also work for a TX23 wind sensor but since I don't have one then who knows!!

The main part of the code is at https://github.com/g8ecj/bertos/blob/g8ecj/all/boards/arduino/examples/arduino_WxTx/main.c but checking out my BeRTOS repository and running the wizrda to create the WxTx example will make the complete project ready to compile with the standard avr-gcc  cross compiler on Linux.

I've documented everything in the 'main.c' source file (protocols, pinouts etc) so its one big blob rather than doing it properly as it is a bit of a hack bringing all the bits together like this.

Robin Down Under (or are you Up Over!)


I have just completed my new model.

The design is simpler in software, circuit design, and physical layout.

I have designed the circuit board.  4" by 3.2" to fit in eagle light.

I will check its operation and post full details within a month.




Dec 02, 2013, 08:17 am Last Edit: Dec 02, 2013, 08:19 am by rkguy Reason: 1
Awesome @carl47. I need to use this solid state wind sensor. I assume that it is open source still. Would it be possible to buy a circuit board from you? I have the transducers but haven't begun to attack the electronics to integrate w my arduino and I would honestly pay someone who knows this well(!) than meds around with it.
Also, I'd like to contact you about something related. Is PM the best method?

Edit: I forgot to ask what's new, so ... What's new in this design?


Dec 02, 2013, 10:31 pm Last Edit: Dec 02, 2013, 10:34 pm by carl47 Reason: 1
assume that it is open source

Everything I do is open source. I do it all for my own entertainment.

buy a circuit board from you

I will upload the .BRD file as soon as I'm sure its OK.
Most pcb production houses will produce from the .BRD file.

contact you about something related

Please post any questions in the arduino forum pages

new in this design

1. Transducers driven straight from 328.
2. Construction now "flying saucer" shape.
3. Self tuning for thresholds.



I have been looking for a diy ultrasonic anemometer for some time.  I came across your earlier posts about your  project, and was just about to start to learn how to build a  device, when I came across your latest post regarding a Markll version.

I am now waiting with eager anticipation for the details on your newest device.  :)

Just to whet my appetite, I don't suppose you could post a  picture of the new mechanical layout, please?




No construction photos yet.  Have a pcb:


Hello Karl47,

At the moment some day,s leave so I started to look around on the arduino from.
You still busy.
Last may I contacted you concerning the ultrasonic anemometer.
It is laying some wher eround in a corner.
If time permist I like to cont. solving the problem.
Mean while some stainles steel sensor holders are made.
Still the function must be checked. There is a elecronical failure in the system.
I have to read all the comments in this posts. So I am informed about the latest progress.
I do understand you are launcing your mark2 version.
So for now I will cont. in problem solving. And cot in the rest of my weather station.
Kind regards,


Should not be long now.

Made an error in board so I'm getting a new one made and will check it first.

I modified my first board and it all seems to be working.

I want to do some more trials and then write it up.

Note "always double your estimated time"


Note "always double your estimated time"

So true.
Does anyone have reccomendations for low cost fab shops that I can send the BRD file to?

Also, silly question, but I assume that this does not include arduino code, right? What I mean is that this device would receive a command to take a reading from a MicroP (e.g. arduino) and then will return a reading, ostensibly over serial or I2C, etc?


I'm in australia and I used:


It took about a month(but Xmas may have been a factor).
The board is actually made in China and ships through Singapore.
Very happy with board construction.

I have heard that sparkfun.com has a good service.

To run the board you will need my arduino programs.
The output is serial data. The same as first project.
This is the last thing I'm doing.
I want to complete it soon so I can get onto my next project.



I'm sorry to say that the version 2 is not working properly.

The conversion from RF style to opamp amplifier has changed the dynamic of the system.
The sensor matching is now very critical.

I'm not saying that the design is flawed.
I's possible that with some more effort from me it could operate well.

However I have decided to draw a line under this project.
I feel this project has absorbed enough of my time.

I have uploaded most of the project details.
If anyone wants to try it out I will leave my circuit setup and answer
questions on this page.

Download unfinishedUAproject.zip from:



Feb 05, 2014, 08:19 pm Last Edit: Feb 06, 2014, 07:17 pm by kuroroneo Reason: 1
Hi Carl

I have started doing your project for few weeks, There're something in your project I still don't understand.

I have a few question would help me to understand.

1.Why the envelope value should be 4000 ? , where does that value come from?

2.Why the ZCD value should be 3000 ? where does that value come form?

3.I think the untrasonic transducer send pulse for 0.64ms , but why when the pulse recieved the wavelength is about 1.2 ms (from ProjectReport page 15 ) ? I think I misunderstand something.

4. In this equation windstep = (sqrt((207.36E6 + Exts*Exts)) - 14400.0)*3.6;  why it need to multiple by 3.6 ? what is that for ?

5. In this function  float wind = (windstep * diffav)/110000.0; I don't understand about this value (110000) what is that for ? How do you get it ?


PS. Sorry for my poor english (It not my native language  =( )


Hi kuroroneo

There are quite a few magic numbers in the program.

1.Why the envelope value should be 4000

4000 is the timer1 count I chose to give me the best result
2.Why the ZCD value should be 3000

3000 is the timer1 count I chose it to be less than the envelope above to give me the best result
3.I think the untrasonic transducer send pulse for 0.64ms

The output from the schmit trigger stays on after the .64ms pulse. This is caused by the ringing of the
transducer which causes the received signal to be nearly twice as long as the transmitted .64
4. In this equation windstep = (sqrt((207.36E6 + Exts*Exts)) - 14400.0)*3.6

3.6 is a scale factor to give the windspeed step as km/s
5. In this function  float wind = (windstep * diffav)/110000.0

110000 is the timer 1 count that I use to give the number of the wind step.
Its an average value that I found to give the best result.

I wish now I had specified all my magic numbers in the program.




Have you tried driving the transducers with 100-140 Vp-p?  Your OpAmp circuit may work better that way.  If I'm not mistaken, it appears you are trying to drive the transducers directly with 5v PWM from the Atmega.  With these waterproof transducers, they like much higher voltage in order to operate properly.


Have you tried driving the transducers with 100-140 Vp-p?

That would be much better. However there is a problem with the multiplexer.

They have  to be connected to the sensors as well as the 100v(no suitable multiplexers).

If you use pulse transformers to drive from a lower voltage you then get the stepdown
for the receiver. This cancels out the stepup voltage.

Go Up