1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Anemometor - inductor measurement

Discussion in 'General Electronics Chat' started by Mikelagoud, Nov 18, 2017.

  1. Mikelagoud

    Mikelagoud New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes:
    0
  2. ClydeCrashKop

    ClydeCrashKop Well-Known Member

    Joined:
    Apr 28, 2005
    Messages:
    1,044
    Likes:
    175
    Location:
    Florida
    Yes you can.
    Do you have a unit to hack or are you starting from scratch?
    Is there a measurable voltage at the inductor?
    If so, what is the minimum voltage and maximum when spinning fast?
     
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,071
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    Welcome to ETO.

    Can you post a picture of the inductor? My guess is that the inductor, if it really is one, is producing pulses, not a continuous change in inductance.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    418
    Likes:
    23
    Location:
    Australia

    I bought mine for $12.00 For $12.00 you couldn't even make the fan.
    The fan is magnetic. The magnet is in the hub. The magnetic flux is picked up by a Hall device.
     
  6. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,201
    Likes:
    111
    Location:
    Seattle, WA
    Doesn't a magnet moving over a coil of wire make a generator? The output voltsge should be proportional to speed.
     
  7. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    418
    Likes:
    23
    Location:
    Australia
    Yes. But the coil is an alternator and you pick up the pulses. Dealing with the output voltage is far too difficult.
     
  8. Mikelagoud

    Mikelagoud New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes:
    0
    So I attached the circuit that the wind meter has and you can see the inductor on the top. I bought similar inductors from Amazon and when I measure the the ac voltage with a multi meter while blowing on a fan and having the inductor next to the fan the voltage is between 0-10mili volts. Can I convert this ac voltage to a digital pulse and read it with arduino?
     

    Attached Files:

  9. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    418
    Likes:
    23
    Location:
    Australia
    It doesn't convert the voltage. It detects the pulses.
     
  10. jbeng

    jbeng Member

    Joined:
    Apr 30, 2004
    Messages:
    668
    Likes:
    10
    Location:
    Illinois, USA

    Attached Files:

  11. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,139
    Likes:
    566
    Location:
    AZ 86334
  12. Mikelagoud

    Mikelagoud New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes:
    0
    Hello Sir, I made this circuit and I have a small fan with a magnet and was blowing to the inductor and was getting pulses on the oscilloscope, faster blowing more pulses. Attached photos. To count it with the arduino and translate it to a wind meter how do I do it? I mean I'm counting the pulses with pulseIn() but how do I translate it fast slow?
     

    Attached Files:

    • 1.JPG
      1.JPG
      File size:
      113.9 KB
      Views:
      12
    • 2.JPG
      2.JPG
      File size:
      108.6 KB
      Views:
      12
    • 3.JPG
      3.JPG
      File size:
      111.3 KB
      Views:
      13
    • 6.JPG
      6.JPG
      File size:
      103.1 KB
      Views:
      11
    • 7.JPG
      7.JPG
      File size:
      105.5 KB
      Views:
      12
    • 8.JPG
      8.JPG
      File size:
      103.5 KB
      Views:
      11
    • fan-circuit.JPG
      fan-circuit.JPG
      File size:
      97.5 KB
      Views:
      9
    Last edited: Nov 22, 2017
  13. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    418
    Likes:
    23
    Location:
    Australia
    It depends on how many pulses you need to detect in say 20mS.
    You "open the gate" and count in the background 20mA. Store the number of pulses detected.
    Hold the fan outside the window of the car. Drive at 49km/hr.
    Use this as a reference.
    It's so easy.
     
  14. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,071
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    Rather than count the number of pulses in a set period, I suggest timing single pulses. You can set an interrupt or flag for an edge (rising or falling) and capture the time between those events. At least that is how I would do it with a PIC and presumably arduino has the same capabilities.
     
  15. Mikelagoud

    Mikelagoud New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes:
    0
    Hmm I like this ideq, I know how to measure the pulses in a period of time but how do I do what you suggested? I understood to put a flag when the rising pulse occurs let's say 1 but how do I know when it's falling and becomes zero?
     
  16. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,071
    Likes:
    524
    Location:
    Cleveland, OH, USA
    ONLINE
    The difference between the methods is the responsiveness. Take your slow frequency which had a period of about 40 ms. If you counted ten cycles, it would take 400 ms and the counting error would be approximately +/- 10%. If you timed a single cycle ( or several cycles), your response time would be cut considerably and the MCU timer would easily give 1 part in 1000 (2^10) precision.

    The arduino is based on an Atmel chip, which is manufactured today by the same company that makes PIC's. They all seem to have very similar functionality -- including the ability to start and stop timing on a transition (low-to-high or high-to-low or both), and the timer runs at a few MHz. Of course, there are pre- and post-scalers for those counters, so you can adjust the timer to get the number of counts you want. I know how to do that with a PIC, which is quite easy. Unfortunately, I have never touched an arduino, but I suspect it is at least and probably more easy to do.

    Someone with that experience will surely chime in.

    John
     
    Last edited: Nov 23, 2017
  17. Joe G

    Joe G Member

    Joined:
    Dec 18, 2009
    Messages:
    507
    Likes:
    16
    Location:
    Florida. USA
    • Informative Informative x 1
  18. ClydeCrashKop

    ClydeCrashKop Well-Known Member

    Joined:
    Apr 28, 2005
    Messages:
    1,044
    Likes:
    175
    Location:
    Florida
    I made a very accurate tachometer for a Yanmar diesel that had a hall effect sensor getting signals from the ring gear teeth on the flywheel. I adjusted the timer to reset after it counted 2000 teeth at 2000 RPM and it was accurate throughout the entire range. No math or lookup tables. Just count pulses until the timer times out, display that number and start counting again. In this case, it counted the right number of teeth in about 1/2 second.

    So in your case, set your timer to count pulses for 1 second and like was said earlier, hold it out your car window at 50 MPH. If it is reading 90 MPH, shorten the count time. If it is reading 40 MPH, lengthen the count time.
     
    Last edited: Nov 24, 2017
  19. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    If you wish to use an Arduino you can try the following code sample. You can modify the code to fit your needs. As can be seen the code displays wind velocity expressed in MPH (Miles Per Hour) which can easily be converted to kph or if you like add a line or two of code and display both.
    Here is what it looks like in Arduino:
    Anamometer 1.png

    Anamometer 2.png

    The actual code sample:
    Code (text):

    int windPin = 2;    //This is the input pin on the Arduino
    double windRate;    //This is the value we intend to calculate.
    volatile int count; //This integer needs to be set as volatile to ensure it updates correctly during the interrupt process.

    void setup() {
      // put your setup code here, to run once:
      pinMode(windPin, INPUT);           //Sets the pin as an input
      attachInterrupt(0, Wind, RISING);  //Configures interrupt 0 (pin 2 on the Arduino Uno) to run the function "Wind"
      Serial.begin(9600);  //Start Serial
    }
    void loop() {
      // put your main code here, to run repeatedly:
      count = 0;      // Reset the counter so we start counting from 0 again
      interrupts();   //Enables interrupts on the Arduino
      delay (1000);   //Wait 1 second
      noInterrupts(); //Disable the interrupts on the Arduino
     
      //Start the math Calculate for mph or kph or both
      //windRate = (count * 5.00);        //Take counted pulses in the last second and multiply by 5.0
      //windRate = windRate * 60;         //Convert seconds to minutes, giving you Velocity / Minute
      //windRate = windRate / 1000;       //Convert windrate, giving you Velocity/ Hour
      Serial.println(count);  //Print the variable windRate to Serial
      Serial.println("Miles Per Hour");
    }

    void Wind()
    {
       count++; //Every time this function is called, increment "count" by 1
    }
     
    The last lines of code are remarked out:
    //Start the math Calculate for mph or kph or both

    These lines allow you to place your math functions in for your pulse count. Less the additional math functions as it is the display is pulses per second displayed.
    Serial.println(count); //Print the variable windRate to Serial

    Once you have your math worked out that will change to:
    SerialPrintln(WindRate); // That will display the eind velocity.

    You need a pulse count so I suggest Colin's method. Place the sensor on a vehicle on a calm wind day and get pulse counts for assorted speeds.

    Ron
     
  20. Mikelagoud

    Mikelagoud New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes:
    0
    Hi there, thank you very much! The program works perfect for what I need. I now just doing a calibration with a good anemometer I have.
     
  21. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,801
    Likes:
    282
    Location:
    Cleveland, Ohio USA
    Once you know the variables of what you have, as in how many pulses per unit and if the pulses are linear then you just remove the // from the lower lines and fill in the math functions. If you want to get fancy have the output display things like wind velocity in kilometers per hour as well as miles per hour. Heck, using an Arduino you can also toss in ambient temperature. :) Good luck with it. Just remember the final lines need to be setup.

    Ron
     
    Last edited: Nov 25, 2017

Share This Page