Yes it can be done

The question if using cheap ebay acoustic distance meter modules _can_ be used to do wind speed and direction measurements needed to be answered. In a first test the pulse changes were too small to see with 50 Hz repetition frequency using my finger and mains frequency as trigger.

Well, if all else fails use differential mode. So I used 2 of these distance sensors, removed the TX side piezo, (remember that one on the MAX232), and put them apart facing in opposite directions.

formatting link

Then took the good old 74HCT86 XOR gate, to see the difference (differential remember) in pulse length between forward direction (wind) and opposite direction (wind).

This is without wind, on the good 'ol analog scope:

formatting link
I moved the sensors so the pulse was smallest, the second pulse is the one we want.

And this is with wind made by a PC fan on 11.4 V:

formatting link
Note the second pulse again!! Eureka! QED

So from this follows that by using 4 cheap ebay distance sensors

formatting link
and 2$ for a HCT7486 xor gate plus 4046 [1] I used as pulse generator to trigger the things, here a detail of the 4046 generator:
formatting link
as you can see I Xperimented with some cap values and settled on 100 k 100 nF as the ebay modules cannot be triggered faster (something to do with the speed of sound perhaps) one can make a decent wind meter for a few dollars or GreeceFree? euros.

Anyways, you all know those sjips, xor, PLL, so no need to draw the circuit diagram . Just follow the grey wires in the pictjures... :-)

My tronics for today, need coffee.

[1] do not gimme that 555 jive, yes that would work too, but I have none, I stocked up on loads of 4046, it is still the most universal sjip I have come across. Yes maybe you could use the xor in it, saves a sjip, that was actually the original plan, but forgot about it, wanted only to see the diff, but then still needed more trigger speed, so had to wire it in anyways.
Reply to
Jan Panteltje
Loading thread data ...

as you can see I Xperimented with some cap values and settled on 100 k

100 nF as the ebay

Cute. One of your most fun ones.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

On a sunny day (Sat, 13 Jun 2015 09:37:40 -0400) it happened Phil Hobbs wrote in :

Came to think of it that the other 4046 phase comparator should give wind direction. To be tried some time. That is the frequency comparator with flop-flips.

Reply to
Jan Panteltje

On a sunny day (Sat, 13 Jun 2015 16:33:42 GMT) it happened Jan Panteltje wrote in :

That does not work, but adding a 74HCT74 and inverter does the job, inverter because it is a pos edge triggered flop, and the neg edge is what I need.

Need to test in a bigger nore realistic fixed setup now.

Reply to
Jan Panteltje

Just a thought, (probably daft, but here goes).

What if you were to make an oscillator with an amplifier driving the Tx and the Rx driving the amplifier input. You'd probably need some form of AGC to keep the amplitude right. The whole thing would oscillate at 40KHz or whatever the frequency of the Tx and Rx . Assuming no phase shift in the amplifier, there will be an integral number of acoustic waves between Tx and Rx. An air velocity change would change the wavelength and hence the frequency of oscillation.

Reply to
Pomegranate Bastard

On a sunny day (Thu, 18 Jun 2015 18:39:37 +0100) it happened Pomegranate Bastard wrote in :

Interesting idea. It is easily tested I think, even at audio frequencies. I did a Doppler experiment once at 40 kHz with these sort of sensors, and then listening to the difference frequency, it was so sensitive you could hear your eye blink. I have has acoustic feedback on stage... there was no wind, but this can be tested, 4 sure on the to-do list. Did not get around to 'tronics today, too many other things, looks like the weekend.

Reply to
Jan Panteltje

I quickly lashed up a single transistor amplifier, a Tx and Rx this morning and it shows promise. Tx and Rx are 100mm part.

It oscillates at 41.6KHz in still air. I have a 12 volt fan running on

5 volts blowing through a 250mm length of drain pipe and then over the Rx and Tx. There isn't much airflow, (I can just about feel it on my hand) The frequency increases by about 50Hz with the fan running.
Reply to
Pomegranate Bastard

On a sunny day (Mon, 22 Jun 2015 11:50:18 +0100) it happened Pomegranate Bastard wrote in :

Cool, hey I just glued the BMP180 in a fuel line tube, works great:

formatting link
see my other posting.

Reply to
Jan Panteltje

On a sunny day (Mon, 22 Jun 2015 11:50:18 +0100) it happened Pomegranate Bastard wrote in :

What if the fan blows in the opposite direction? Does the frequency decrease then? because it could also be temprature...

Reply to
Jan Panteltje

I think I was fooling myself. I used a counter first of all and it was quite difficult to see what was going on with a gate time of a second. Then I used my bat detector as a BFO and noticed something a bit strange. There was a definite incresa in frequency but it all happened with a small airflow. Increasing the airflow made no more difference. I didn't really understand what's happening and I had to do some work! But I will go back to it when I have time.

Reply to
Pomegranate Bastard

Better news!

I took the lash-up outside and sure enough, there is an easily detected frequency shift with wind and the shift depends on the wind direction. Then I used a pair of transmitters (they also work as Rx) and a DPDT switch to reverse the role of Tx and Rx. As expected the frequency is the same in both switch positions with no wind. With wind, the frequency difference between the two measurement modes will be a measure of the wind speed.

The next step is to use a PIC to do the switching, frequency measurement and wind measurement calculation. I expect I will have to compensate for changes in atmospheric pressure, temperature and perhaps humidity.

Reply to
Pomegranate Bastard

Should be basically just temperature. The speed of sound is very nearly independent of pressure. Humidity has more of an effect, but it's still second-order compared with wind.

If you have three sets arranged at 120 degrees to each other, you'd have enough measurements to get both components of wind speed and the speed of sound, separately.

Fun.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

On a sunny day (Tue, 23 Jun 2015 16:54:15 +0100) it happened Pomegranate Bastard wrote in :

That sounds good. I added some moving average code in asm to my BMP180 PIC code. It gives a great noise reduction:

formatting link
For a reasonable wind speed calculation you probably have to do an average over several minutes.

What's left to be done at the Raspberry side code wise, is to find the exact calibration speed versus pressure. I have read on some site that force against a wall is the square of wind speed. So force against a rubber ball or against the thing in the BMP180 perhaps:

formatting link

Will have to run it in free air with a given speed, maybe on my scooter... watch the speedometer, and log to the Raspi, should be possible. Calibration, get the curve.

For wind direction I have already coded that with atan2() in C on the Raspi, can share code if you need it.

Reply to
Jan Panteltje

I am planning to use two sets at right angles to resolve the wind direction. I reckon that if you know the oscillation frequency and the number of waves between the transducers you should be able to calculate the speed of sound.

Reply to
Pomegranate Bastard

For this kind of stuff I use a running average algorithm.

X(n) = (X + X(n-1) * Z ) / (Z+1)

X(n) is the new averaged value, X is the measured value, x(n-1) is the last averaged value, Z is any integer.

Do the calculation at a fixed interval and it behaves exactly like a first order low pass filter. The "corner frequency" depends on Z. The higher the value of Z, the lower the corner frequency.

Another mad idea. How about a long cylinder (like that from a wind chime) hanging from a support. Measure the deflection from vertical in two axes at right angles and you have wind speed and direction.

Keep your eyes on the road! :-)

Reply to
Pomegranate Bastard

No, there are three unknowns so you need three measurements. To first order, if you have three of them arranged at 120 degrees, and sum up all three frequencies, all the wind contributions cancel out and you're left with just the speed of sound variation.

The actual equations are a little more complicated, but starting with the first order value and applying one or two secant or Newton iterations will get you all the accuracy of your measurements.

If you expect a lot of vertical wind speed, you'll need a fourth set. ;)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

What if I measure the frequency in one direction, switch the transducers to measure in the opposite direction and then use the average frequency?

Reply to
Pomegranate Bastard

On a sunny day (Wed, 24 Jun 2015 14:56:57 +0100) it happened Pomegranate Bastard wrote in :

Yes, I used the moving average from my stock market auto option trading software:

I thought about before, use those to measure pressure, like in a weighting scales:

formatting link
I do already have the ebay HX711 modules running for those transparent pressure sensors, could use those to measure those tension bridges... Maybe one a bit more sensitive tan that ebay one, there are many open ebay. You would not even see the bar move. Maybe something to try one day.

Wheels on fire, rolling down the road...

Here they are going after one motor gang after the other...

I had a large motor bike, but once almost slided of the road because of some sand, made me more careful, the scooter is not so fast.

Reply to
Jan Panteltje

That doesn't eliminate any variables. It gives the same information with opposite sign.

Reply to
krw

Come to sink of it, in a boat, where rarely things are 100 % vertical, you would get false signals all the time: / / / 0 | \ / . gravity

And of coarse the G forces from moving around. To some point that can be compensated in software, as I have the CPU6050 accelerometer active too, and see position and angle and rate of change.

But this setup would make it easier:

sensor rod drawn tilted boat / / / 0 pivot point / / / / / / wind shield pipe / / and housing

The rod would always be in balance, but only the top part would see any wind. The tension bridge can be anywhere on the rod. Can be made very small, as the rod does not move a lot in the shielding tube. What do you think?

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.