Wind Sensor

** Think you need to get outdoors on a windy day.

Small, indoor fans generate too much turbulence for a reliable air speed test.

... Phil

Reply to
Phil Allison
Loading thread data ...

Positive displacement would work, namely a piston in a tube. But not for long.

Build a carousel!

Reply to
John Larkin

I ran into some bouncing problems of the switch inside the Wind Sensor. I am using the following sensor

formatting link

I used some de-bouncing circuitries like the following circuit but still not able to get a stable reading

+5v | R 100k | |_____R_10k______VOUT----->> micro | | | | \SWITCH( _| | - Capacitor ( 100nF) | | |gnd |gnd
Reply to
m.john.khan

Do you have a scope and can you post a trace? I'm guessing you have the reed switch option and not the hall sensor.

George H.

Reply to
George Herold

Yes. I have the reed switch option. It looks good on the scope. But I do not get good readings with my program. Its like sometimes at high wind speeds I get zero mph SO, I want to make sure that at least analog circuit is working fine.

Reply to
m.john.khan

Hi,

I got the following Wind sensor with hall effect sensor.

formatting link

Does it require debouncing ciruit too?

Reply to
m.john.khan

If mechanical switch bounch is what you're referring to? The HALL sensor will not need a debouce circuit.

Thinking back to your earlier post, me thinks that you could be having other issues?

Monitoring a signal and removing random switch noise during switch make and break periodes can be sorted out in code land. I assume you are doing this in code?

In code you would have a timer "Time Off Delay" each time the switch makes and when it breaks the Time OFf Delay would then start to could down. If for some reason switch makes before the timer expires, then the timer is reset back to the start again. It's my guess that a simple cap on the input driven via a R from the source should be enough? It saves in code writing but what ever.

Maybe your problem is speed? Rotation to fast for switch or processor can not handle input speed? It's posible to miss a pulse on a uC if you are not using triggered and latched type inputs.

A IRQ handler, a non maskable type, is great for this purpose.

Jamie

Reply to
M Philbrook

Hi,

Should I use a an external rising edge clock triggered flip flop to do this?

Reply to
m.john.khan

It all depends on what you're driving?

The flip flop will make the signal 50% duty cycle but it will also give you only half the pulses.

Like I said, I don't know how you are interfacing it?

You could use a Freq to Analog converter chip, they're out there..

Jamie

Reply to
M Philbrook

I am interfacing it to the Digital I/O pin of the micro. with a pull up resistor of 10Kohms. The sensor has three wires one for power (+5v), one is grounded and third one is pulled up via 10k resistor and connected to the digital I/O pin of the micro

Reply to
m.john.khan

All you need to worry about is not to over drive your uC IO inputs.

Not sure if the sensor has a high side output but if it gets powered from anything higher than your uC supply, you better take care to clamp the input or scale it to proper levels for your uC.

You don't need a flip flop or any external clean up components, you should be able to do all of that in CODE.

Jamie

Reply to
M Philbrook

do your debounce in software.

eg: don't accept a change of state as real until you've seen 10 consecutive instances of the new state. (each being on an separate instance of an interrupt)

--
  \_(?)_
Reply to
Jasen Betts

I am looking to calibrate my ADXL 335B accelerometer for just single x axis tilt. I was wondering that is there any accelerometer device out there that can provide with single axis tilt measurements with display that I can use to calibrate my device.

Reply to
m.john.khan

You can use the following Digital Angle Gauge

formatting link

Reply to
jsscshaw88

Thanks!

The thing is that wixey digital gauge has following specs.

Range: +/- 180 degrees Resolution: 0.1 degrees Accuracy: +/- 0.2 degrees

How can I specify my system in the same way as wixey did ? I tried the following approach. Please tell me that am I on the right track.

The thing is that I am using ADXL335B with 10 bit ADC. My power supply is 3.3V and Aref = 5V. I am doing single axis tilt calculations.

The data sheet of the sensor is as follows

formatting link

My calculations are as follows

Desired Range = 0 to 180 degrees.

  1. Resolution : 3.3 / 1024 = 3.2 mV
  2. ADC_out = ((3.3) / 5 ) x 1024 = 675

  1. (1.99-1.65) = 0.34 ; 1.99 corresponds to 90degree and 1.65 V correspond to 0 degree.

0.34/90 = 3.78 mV / degree

So, 1 STEP / degree

How can I calculate the accuracy of my system?

The thing is that I found the following paper on page 2. It uses arcSin() to calculate the angle resolution

formatting link

It calculates the resolution in a different way and I get confused which method is correct.

Reply to
m.john.khan

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.