Hall Effect Sensors

I am working on a project where a microcontroller needs to read hall effect sensors. Could someone direct me to an information source that covers algorithms on how to count pulses from a hall effect sensor?. Note I can't use an input capture pin. I can only use an A to D input to read the hall input.

Thanks, Paul C

Reply to
Paul
Loading thread data ...

There shouldn't be anything magic about hall sensors per se. Relevant questions:

  1. Will there be any bounce on edges (probably not)?
  2. What are the minimum pulse widths?
  3. What is the cost of missing an edge?

If you can't trigger an interrupt on a transition, then you must poll fast enough to catch each edge transition. Otherwise, you need to either generate an interrupt or clock a counter with an edge.

--
Thad
Reply to
Thad Smith

formatting link

There are at least two kind of hall effect sensors.

One will have a proportional output to the strength of the magnetic field applied. The other is a switch that will change state with the magnetic field applied.

Which type of sensor do you have or want to use ??

donald

Reply to
Donald

I am using a hall effect sensor that outputs a voltage proportional to the magnetic field strength applied.

I think what I need to do when using an A to D converter is. Establish a threshold. Compare the A to D value to the threshold. If the voltage is above the threshold a high pulse is occurring. If the voltage is below the threshold there is no pulse present.

What I am concerned about if there are details I need to include such as timing, or delays that I need to worry about?. I know that if I sample the A to D channel twice as fast as the signal frequency being applied I should be able to detect pulses with out error.

Thanks for the responses,

Paul C

Reply to
Paul

I would not say without error.

Is the purpose to find pulses or for timing ?

Do you need to respond to a "high" within a preset time ?

You may need to sample many times the signal frequency to get timing information.

Good Luck

donald

Reply to
Donald

Why (see below)?

This is what a Hall effect switch would do for you for less than what the analog Hall sensor costs. Unless you have something else going on in the circuit that actually uses the field strength readings, a Hall effect switch would be much better for this application.

If you used a Hall effect switch, you could extend the low time by adding a small capacitor to the circuit to be sure that a pulse did not go undetected.

Reply to
Gary Reichlinger

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.