DC Fan RPM detection

Discussion in 'The Projects Forum' started by Enforcer83, Jan 12, 2011.

  1. Enforcer83

    Thread Starter Member

    Oct 29, 2010
    25
    0
    I am using a Sunon 12V DC fan, similar to those used in computers, to moderate the temperature inside of a power supply. The fan has PWM control for the RPM based on temperature utilizing a MIC502. What I am trying to do is take the tachometer output and display information to an LCD that is part of the system. I had intended to use a Microcontroller (MCU) timer input, however, due to silicon issues, my intended use is not available.

    The fan produces 2 pulses every revolution and has a maximum revolution of 3600 rpm. I intend on sampling a MCU 8 bit port at a rate greater than or equal to 60Hz and less than or equal to 100Hz. FYI MCU is also polling an ADC and Updating the LCD with current values from both ADC conversion and calculations based on those ADC conversions. MCU core operates at 80MHz and is based on the ARM Cortex-M3 processor (TI part number LM3S9B96). I know the MCU is grossly over powered for my application but it is what I have for development tools.

    Any recommendations on how I can do this? I have my own but want to see if anyone has a better and or easier suggestion.
     
    Last edited: Jan 12, 2011
  2. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,059
    So you need a digital frequency meter with a divide by two function, reading up to 3600 Hz (=rpm)?

    I think a pulse counter that counts during a known interval is the likely solution. Reset at each read.
     
  3. Enforcer83

    Thread Starter Member

    Oct 29, 2010
    25
    0
    RPM = revolutions per minute. So for a fan running at 3600 RPM it completes 60 revolutions every second which corresponds to a frequency of 60Hz. Further this means there is a 50% duty cycle, square wave pulse train at 120Hz.

    You are right about the pulse counter. I have considered such a solution but considering and implementing are two different beasts.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,059
    Hah! Yes, those pesky details, like minutes versus seconds. But what's a factor of 60 between friends.

    I'm pretty sure pulse counting is how a typical DAQ device estimates frequency. Count pulses, count clock ticks, accumulate a running frequency calc. between pollings, reset when polled. You need registers large enough - or polling intervals short enough - to avoid overrunning the registers.
     
  5. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Wow, you can say that again! I would think that a little Picaxe-08M (8 pin DIP) @ ~$2.50 would suffice for this application. As already stated, ADC doesn't seem to find any application here and pulse counting would seem more logical .
     
  6. Enforcer83

    Thread Starter Member

    Oct 29, 2010
    25
    0
    Lol. Nothing between friends, everything when engineering.

    I have to apologize. I reread my reply and I realize I came across as being a bit of an a-hole. I was having a very bad day and lashed out at you for no good reason. I am sorry.

    Yes that would work but I am performing ADC operations, something I didn't specify as I was not having a problem with that portion, only the pulse counting. Errata C3 for the MCU points to a silicon error preventing timers from up counting from an external clock. So, being that I have a couple ports I am not using for any thing nor plan on using for anything, I felt a more discrete counter could be used.

    I have determined after 125 ms the fan will have produced 15 pulses at full speed. So what do I need to use to count to max 15, hold the count at a value based on an already in place Interrupt Service Routine (slightly modified to cause a hold condition) if not already held due to a maxed out count, and have the processor clear the counter once it has read the value.
     
  7. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,795
    951
  8. Enforcer83

    Thread Starter Member

    Oct 29, 2010
    25
    0
    Ooo. Never considered the option of using a frequency to voltage converter. It would make life a little easier, not to mention fewer parts involved.

    Thank you. Researching the part now.
     
Loading...