Pic based Wind Speed meter


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Mar 2010
    Posts
    52

    Default Pic based Wind Speed meter

    Hi Guys and ladies,

    Finally managed to get back into my pic development, :-)

    On one hand i want to continue my pressure sensor project, on the other I'dlike to start a "quick" DIY anemometer build.

    The theory is making a anemometer assembly using some bearing etc.to get it nearly friction free, then, in terms of a pickup I’m thinking ofusing a small magnetic read switch and a magnet.

    Now, i understand the principles of a switch and I assume a read switchwould work the same way as a normal pushbutton switch. My second assumption isthat I would need to add some kind of debounce, I have searched and found someawesome examples from Mel, :-).

    Now to my concern, in order to get anything usable I would need to count thenumber of "presses" of the switch in a given period of time, and thenusing some math it should be reasonably simple to calculate a wind speed (willdo the calibration with a handheld anemometer.

    I’m hoping to base it on a 12F675 or a 16F876A this i have connected to aLCD currently so probably more likely as I would use the LCD as the display..

    The counting of the pulses I’m fine with, but, can anyone share or direct meto some examples of doing it in a given time (thinking a refresh of around20ms) thus if i get X presses every 20ms I should be able get to a speed, :-)

    Sorry for the long post, been a while, :-)

    Cheers

    Rob

  2. #2
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    I want to make a project like this for my car.So I don't make off-topics I will ask here for this,to make a tachometer with magnetic sensor,atached to the wheel and PIC microcontroller get the informations and displays on LCD display.Like Kmph(Km\h).Thanks

  3. #3
    Join Date
    Mar 2010
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    Yup, should use the same principle, although in a car with the vibration i would suspect you would be better off using a Hal effect sensor, but then you would also need an opto amp of some sorts?

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    Why not using the car VSS signal and read the tach directly for the ignition coil? it's all there unless you have a really old model.

    woops... always read the original post...my bad.
    Last edited by mister_e; - 14th July 2011 at 20:25.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Mar 2010
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    Hi Dave,

    :-), well, the 20hz refresh was a number i was thinking of, realistically i dont think i would need such a fine resolution. I know it has been done with a simple bicycle speedo which also uses the same technology, problem is the bicycle sensor only gives me kph and I'm looking of m/s. The other reason is I would like to add my previous projects using temp sensors and eventually a pressure sensor, :-)

    Kind regards
    Rob

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    The three common ways to measure wind speed are :

    1. Hot wire
    2. Rotating cups or fan
    3. Vane

    The only one that doesn't depend on wind direction is rotating cups.
    A hot wire doesn't have to be directional, but most are.
    A vane definitely has to turn with the wind.

    I once made rotating cups from old LEGGS pantyhose containers. They are plastic and egg-shaped. When opened, they are fairly hemispherical plastic. I epoxied 3 of them to stainless steel rods about 15 inches long. Those rods were press-fitted into a machined aluminum cylinder that was attached to an old 5.25" disk-drive motor. The motor provided the bearings and the speed indicator. The motor had a separate, three-wire (amplified hall-effect) tachometer that didn't require powering the motor to provide an output of 5V P-P.
    It worked for awhile, but the epoxy and plastic LEGGS containers couldn't withstand the elements. The sun's ultraviolet rays made the plastic brittle, and the rain and the ultraviolet rays made the epoxy soft. You could probably devise a better way. By the way. I calibrated this device by sticking it out a car window and driving down a road at various speeds, and then down the same road in the opposite direction at various speeds and averaging the equivalents.

    Another approach that I used (this one worked) was using a PTC (Positive Temperature Coefficient) thermistor. I chose one that had a knee temperature of about 70C and would reach that temperature when powered by 12V. I put a small (10 ohm) resistor in series and boosted the voltage drop across that resistor with an op amp.
    A PTC thermistor is like a self-regulating heater. If you apply sufficient voltage, it will heat up (due to its resistance) up to the knee temperature. At that point, the resistance goes up rapidly. The increasing resistance lowers the current through the device and it cools back down again. In other words, it will maintain a given temperature all by itself by regulating its own current. If you blow air across it, the air will cool it down. The PTC thermistor will immediately sense this and lower its resistance in order to maintain its temperature (at the knee value). If you measure the current draw of the thermistor, you will get a reading that is dependent on the cooling effect of the air - which depends on two factors: #1. The ambient air temperature and #2. THE VELOCITY OF THE AIR. The cooling effect of air is proportional to a constant times plus the square root of the velocity. So, if your PIC knows the ambient temperature and the current through the PTC, it can calculate the wind velocity. PTCs are generally disk shaped, however, so they are somewhat wind-direction dependent.

    I always thought a vane would work but never built one. I was going to hang a piece of metal from a low-friction bearing and measure the angle of deflection.
    using an optical method.
    Charles Linquist

  7. #7
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    I've always wanted to have a go at a hot wire anenometer. I presume they work by the cooling effect of the wind changing the resistance of the heated wire? Gets around all the mechanical and weather-proofing problems?
    Apart from that, I'd:
    1. If it's for the fun/learning experience, try the slotted/disk method.
    2. If you want it to work properly, outside and for a long period - byte the bullet and purchase the Davis sensor at about $125.

    Regards Bill Legge

  8. #8
    Join Date
    Mar 2010
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter


    Agreed, the weather proofing of a homemade "stick and cup" versionis an issue, however I have managed to source a commercial replacement set thatis UV treated etc., so that should solve the longevity issue.

    I was thinking last night, would it not be possible to still use the magnetand read switch and then use pulsein. From what i was thinking pulsein shouldgive me a frequency, i don’t know if it’s possible to convert the frequency toa usable value that i can do some calculations on.

    Also, in this I'm also not 100% sure on the wiring for getting it to give mea frequency, I know the read switch is normally open, so would i connect it topull the pin high (v+) or connect the switch to ground?

  9. #9
    Join Date
    Apr 2011
    Posts
    53


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    Commercially available wind speed and direction (WS&D) indicators are common-place onboard sailing craft of all sizes. The wind speed is invariably measured by 'cups' on a rotating shaft passing a magnet across a hall effect sensor. One device I recently repaired had the cup unit changed and the cups were rotating on a radius of some 50mm so if manufacturing one yourself then don't go 'too big'.
    Similarly, from what I could gather from the internals of a WS&D I recognised a Bournes 'potentiometer' that (I think) operated using hall effect. I keep meaning to look this device up but I can only assume it outputs a voltage proportional to the angle of the potentiometer shaft (which rotates through 360 degrees) - perhaps a search at the Bournes website might reveal the actual devices used?

    edit - a quick search at Bournes reveal rotary (360 degree) position sensors but nothing based on hall effect that I can see immediately. Anyone else seen/heard of devices like this?
    Last edited by kellyseye; - 15th July 2011 at 20:01.

  10. #10
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Pic based Wind Speed meter

    Well Bobbo_ZA, you must have quite a few magnets attached to the main shaft if you are expecting to get pulses at a 20 Millisecond interval. I would start with a slotted disk with about 8 or possibly 16 slots on it. Pass it thru an opto interrupter so as not to get any switch bounce as well as not have any drag from the magnets. Then look at the period of the waveform. that should give you good resolution on the LOW end of the spectrum as well as good resolution on the HIGH end of the spectrum. The math should be simple. You should be able to get 1 to 10 hz. update rate for the lcd display.

    Dave Purola,
    N8NTA

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts