Show Posts
Pages: [1]
1  Community / Exhibition / Gallery / Re: Ultrasonic Anemometer on: April 10, 2012, 07:24:55 pm

I was expecting the ZCD to detect zero volts crossing, but you are right, noise might impose a threshold above 0 V.
I also thought that ZCD will allways happen before envelope .
On step # 3 , you are mentioning that the meaasurement might not be in the appropiate pulse, so you get the diff and if it is less than 200 (half pulse), then you add another pulse (400) . if diff is more than half pulse (200), then you remove one.
My question to you is how do you know that this is needed? and what nakes you think that if diff>200 then substract one pulse.


PS : Will let you know my progress . So far , just on the analog side . I have two oamp LM358 for first stage (instead of your transistors), then a precision recitifer (because the diode 1N4148 was not working) , ZCD and envelope detector .
One of my problems is that the tranducer cables, pick the signal from the sending end.So, when I receive the signal, I have a strong one (picked by the cable) and the real signal , very weak.

2  Community / Exhibition / Gallery / Re: Ultrasonic Anemometer on: April 03, 2012, 08:07:16 pm

After a year I am back with your project .... I plan to use it in a sail boat and my main concern is what would happen with the boat movement. For sure will introduce errors....well...we will see.

Some additional questions reviewing your excellent document
On the HW side,

1)  why the ZCD  has a pot R 22 ? What is that for? Actually I was surprised to realize that the calibration is done through an external program. What calibration do we need? I mean, as soon as the signal goes above 0V, should rise the output

2) D1 , on the envelope detector, should not be a precision rectifier? I mean, it will bring 0,6 V down

3) On the 4052, why we need -5 V?

On the SW side,

I did, as usual some changes . Basically, I am not using interrupts, but a continuous pulling of ZCD and

First a minor comment, regarding the time difference , diff = NZCD[counter]-SZCD[counter] i think is not accurate, because we are sending first 300 samples and then reverse for another 300 . I would expect to send 1 sample (n>s), reverse(s>n), send another sample, reverse and so on , until 300 times.
What I mean if we send pulse 1 , the corresponding reversed pulsed will be after 300 other pulses , so wind changed in that time (well....might not in millisecs....)

Until step 3, I am ok , but struggling to understand your logic in the error correction
It looks like if the diff is less than 200 (ie half period), then you add a pulse. How do you know this?

Then you mentioned the other problem about transducers behavior and define Northerror[20] .
Why 20 values? An again the logic , even is there, not sure to follow why.

Finally, a basic question on tof
Even you mentioned that we do not have individual Tof, I think we do have it, since envelope measures that
We can find the wind velocity from the equation:
Vns = d/2 *( 1/tns - 1/tsn)
This requires that we have each tof as a discrete number.
This we do not have. We cannot use this equation.
What we have is a time difference of multiples of 25 micro sec.""

We send pulses, start TMR1 and capture the value (TMR1 again)when envelope detects it . We substrac and get Tof.
What is true and you mentioned, is that with envelope is not enough to get precision and we need ZCD to find out phase shift .


3  Community / Exhibition / Gallery / Re: Ultrasonic Anemometer on: April 18, 2011, 09:10:42 pm
1) What do you mean by "largest" /"smallest" TOF . So this formula is based on "large" number of samples and I pick largest and smallest and substracts them to get "t" ?

2) i still do not understand the big picture of you method to determine the wind speed

I see your explanation as follow  :
1) You send pulses for .64 msec
2) After that wait .48 msec for settle down
3) Here is my say active waiting 1.28 ms for INT0 and INT1 .
I do not understand what happens first, measure phase or detect envelope. Should be envelope, since it is coarse.
So after sending the pulses, just wait for envelope to be detected (capture that value in envelopetof).Once detected, wait for the next crossing zero, capture timer1 again (in zcdtof) . Repeat this 300 times?
In your code i see you use TCNT1 for both zcdtof and envelopetof, so even i read your code, I am sorry do not understand how this works.....
4  Community / Exhibition / Gallery / Re: Ultrasonic Anemometer on: April 17, 2011, 09:18:11 pm
Carl (i guess this is your name),

Great project and taking the time to share with the comunity . I have a few question that would help me to understand your design

1) Where do you get the formula  v = SQRT((d/t)*(d/t)+(C*C)) - d/t  ?

1)Why the 300 samples ? I see you explain and show math about the 3 seconds and get 312 samples to produce 1 measure.
You can use just 100 samples or even less and still get good results .

2) Why are you mention to get TOF in multiples of 25 usecs (instead of real time)? You send the pulses (actually 16 )and should be able to get the time to arrive. You could send the pulses , start timer and stop when it arrives .

3) I am not sure to understand why you use the 74HC368 drivers? Could you use just the I/O pins of the microcontroller directly?

4) What do you use zero detector and envelope for ?


Pages: [1]