Counting Pulses from Hall Effect Sensor

Discussion in 'General Electronics Chat' started by geosync, Feb 5, 2009.

  1. geosync

    Thread Starter New Member

    Aug 13, 2008
    I don't have a Hall effect sensor yet.

    Can I connect it directly to a PIC to count its pulses? Or do I need to condition the pulses with something like a Schmitt trigger? Seems to me the Schmitt trigger could boost the pulse voltage in the process.

    Anyone have opinions about this approach?

  2. Tobias

    Active Member

    May 19, 2008
    Depending on if the hall is a stand alone or already connected to another system, you might need to do something. What I have learned is if it is connected to a data acq system, the data acq already has a resistor that is pulling the signal hi or low depending on the switch type.

    One thing you will need to consider is the manner in which you use the pulse from the hall sensor. If you have alot of counts per revolution you can get away with the 'Count' command. The problem is the response time though. You can miss an event while spending time counting. I use a PulsIn and measure the high pulse.

    Some PICS will count in the background while you do other parts of code. I haven't used it though because the number of channels that do that is limited to 3 or 4, I can't remember.
  3. mik3

    Senior Member

    Feb 4, 2008
    What is the part number of the hall sensor?
  4. geosync

    Thread Starter New Member

    Aug 13, 2008
    mik3, I don't have a part number for the Hall sensor because I haven't chosen one yet.

    The sensor would be for an anemometer on a hobbyist weather station. I'm a little over my head on this project, but I'll get there. :) I thought a Hall sensor would be a good idea in the wind vane I'm planning, too.

    Any part recommendations for the Hall sensor in this application?

    Tobias, you make some good points about the pull-up and the requirements for processing time. I've thought maybe I should use a "dumber" circuit just for counting pulses, with the μController periodically polling the counter.
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    Think about choosing one with a logic output. It will be much simpler to apply that output to any other counter or microprocessor.
  6. geosync

    Thread Starter New Member

    Aug 13, 2008
    What an excellent idea! Thank you for the recommendation, beenthere.
  7. KL7AJ

    AAC Fanatic!

    Nov 4, 2008
    It certainly can't hurt, and since it's so simple to implement, I'd say, "Why not." It's one of those situations where it's better to have it than to wish you had it!