Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 20th April 2007, 04:53 PM   #1
Default Hall Effect Sensor

I just finished a basic example for a Hall Effect sensor (Allegro's A1102), and have a question about sample speeds



More about the programming/circuit can be found here

The datasheet specifies that a nominal load of 820ohms @12V for 400nS rise and fall times. Does this mean I can get the same results for a 5V supply with a ~330ohm resistor? (Decreasing the resistance to match current)

I don’t have a device that would mechanically spin fast enough to test 400nS rise/fall times, if I did, I'd try it out with that
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 20th April 2007, 06:06 PM   #2
Default

hi gramo,
Looking thru the datasheet, it looks as though a 15mA load current should give the same switching times.
The FET should give the same ON time with that load and maybe a little faster with the 330R pullup.

The +5V supply is within the specified supply limits.

Regards
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 20th April 2007, 08:36 PM   #3
Default

Your question raised interest for me also. From one of the application docs on the manufacture's web site I found this statement:

" Bandwidth
The bandwidth of Hall-effect sensors is typically 25 kHz to 30 kHz. In this era of 2 GHz microprocessors 25 kHz appears to be rather slow. In reality it is very rare for bandwidth to be a concern. Few mechanical systems will require or are capable of moving or spinning magnets fast enough to approach 25 kHz. "

So 33 to 40 usec looks like the fastest switching speed for this family of sensors, no?

Lefty
Leftyretro is offline  
Old 21st April 2007, 01:38 AM   #4
Default

There are two main types of Hall Effect sensors made by Allegro, they are Continuous Time Devices/Chopper-Stabilized.

The AN110x (Continuous Time Devices) have much faster turn on times and frequency response speeds, here’s an extract from page 7 of the datasheet

Quote:
Continuous-time devices, such as the A110x family, offer the
fastest available power-on settling time and frequency response.
Due to offsets generated during the IC packaging process,
continuous-time devices typically require programming after
packaging to tighten magnetic parameter distributions.

In contrast, chopper-stabilized switches employ an offset cancellation
technique on the chip that eliminates these offsets without the
need for after-packaging programming. The tradeoff is a longer
settling time
and reduced frequency response as a result of the
chopper-stabilization offset cancellation algorithm.
The A110x are so fast to turn on (4uS), you can simply turn them off when not in use to save power. Eg, have a PIC output connected too Vcc of the Sensor, and turn it on and wait for 4uS, then your good too go.

The rise and fall times of the A110x are 400nS, that allows for signals up to 1250000Hz (>= 800nS pulse period) to be accurately captured
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 01:49 AM   #5
Default

It's complete overkill for most applications - but its the power-on time I'm interested in.

You may need to utilize the 1250000Hz sample speed if you had a rather large mechanical device, and many magnets place around the edges to drastically improve sample accuracy at lower frequencies, as a single signal has a rather large 'unknown' state at low speeds.

For example, placing four magnets on a cog/wheel would provide 4 samples/rev, and if you were sampling for 500mS, then your lowest (accurate) recordable speed would be 4 times that of 1 sample/rev.

Some applications may require 20/30 samples/rev to allow even slower readable sample rates, and then keep in mind that something rotating at 41Khz will give near 1250000 samples/second (30 samples/rev)
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 07:59 AM   #6
Default

hi gramo,
The rise and fall times are defined at the 10% thru 90% transistion points on the response curves.
It dosn't mean the device is capable of switching ON/OFF at 400nSec.
The 'square' wave response times will be slower than the rise/fall times.

Regards
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 21st April 2007, 08:08 AM   #7
Default

Lose
Quote:
Originally Posted by ericgibbs
hi gramo,
The rise and fall times are defined at the 10% thru 90% transistion points on the response curves.
Isn't that for hysterisis to ensure there are no/limited errors?
(The image on page 7?)

Quote:
Originally Posted by ericgibbs
It dosn't mean the device is capable of switching ON/OFF at 400nSec.
The 'square' wave response times will be slower than the rise/fall times.
Hmm, fair enough. So the rise and fall times are 400nS with a 15mA load, what would be the maximum response frequency?
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 09:34 AM   #8
Default

hi gramo,

The hysterisis of a device is not normally specified in the rise/fall times of the device,
but usually the devices switch ON/OFF input voltage margins/threshold.

Ref the rise time, as its a measurement taken at the 10% above the 0Vref point, this means the applied signal must have been present for at least 10% of the time 'before' the 10% measurement was started.

The same applies to the 90% point, the applied signal must be persisting at least another 10% before it reaches 100%.

So by definition the 0% to 100% time must be longer than the 'rise' time quoted, this also applies to the 'fall' time.

>> So the rise and fall times are 400nS with a 15mA load, what would be the maximum response frequency?

No, the maximum response time to a 'square' wave input would be lower.
My best estimate is, the max frequency response would be in the order of 800KHz.

Does this help?

I would be interested in any results you have.
Regards
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 21st April 2007 at 09:39 AM.
ericgibbs is offline  
Old 21st April 2007, 11:23 AM   #9
Default

That’s really cleared a few things up for me. Another read of the datasheet didn't go astray.

I never get around to documenting projects, just basic interfacing with components I use, but I'll let you know how I go in the future with it when I throw it in my car for a digital speedometer with 4 magnets instead of one - to improve accuracy and the low end scale
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 11:40 AM   #10
Default

Quote:
Originally Posted by gramo
I never get around to documenting projects, just basic interfacing with components I use, but I'll let you know how I go in the future with it when I throw it in my car for a digital speedometer with 4 magnets instead of one - to improve accuracy and the low end scale
Not much point - you should measure the time between pulses at low speeds, NOT count the pulses - so adding magnets wouldn't increase accuracy at low speeds in any way.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st April 2007, 12:03 PM   #11
Default

Quote:
Originally Posted by Nigel Goodwin
Not much point - you should measure the time between pulses at low speeds, NOT count the pulses - so adding magnets wouldn't increase accuracy at low speeds in any way.

That’s the thing though, the same PIC is already performing several tasks - It simply couldn’t accommodate any large delay. I'm trying to keep interrupts too a minimum do to other timing specific functions as well. Its more of a time splicing(multi tasking) project
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.


Last edited by gramo; 21st April 2007 at 12:15 PM.
gramo is offline  
Old 21st April 2007, 12:07 PM   #12
Default

As far as improving accuracy, well with 4 magnets you would increase the accuracy 4 fold at slower speeds. You would still need to include a 'cut off' speed where the error rate is simply too high
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 12:24 PM   #13
Default

Brain storm - well you might just be onto something Nigel


After playing around with some code, I can still squeeze in a basic interrupt handle for the speedometer without affecting the rest of the program.

It’s untested, but should see the use of one magnet and an accurate read out from 1Km/hr and above
__________________
digital-diy.com - Hobby microcontroller projects and tutorials. Assembly, PICBasic and C examples.

gramo is offline  
Old 21st April 2007, 12:39 PM   #14
Default

Quote:
Originally Posted by gramo
As far as improving accuracy, well with 4 magnets you would increase the accuracy 4 fold at slower speeds. You would still need to include a 'cut off' speed where the error rate is simply too high
It wouldn't really increase accuracy at all - if you were pulse counting it would reduce the time between display updates by a factor of four, but it would still be far too slow to be of much use. If you were measuring the time between pulses, using four magnets would REDUCE accuracy, as you would be only measuring the time of 1/4 of a rotation, instead of a full rotation.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st April 2007, 01:49 PM   #15
Default

Quote:
Originally Posted by gramo
That’s the thing though, the same PIC is already performing several tasks - It simply couldn’t accommodate any large delay. I'm trying to keep interrupts too a minimum do to other timing specific functions as well. Its more of a time splicing(multi tasking) project
Some ideas that may get you out of your box. None of these may work for you but each address the problem.

If you are not running the processor at full speed, bump up the clock.
I recall that you like to use specific frequencies because it makes timing easier.

Use a faster processor.

Use one ore more addition PICs to do the time sensitive work. It is a trade off in that you need communication code between the processors. There are MANY shades of grey here.

You did say you were doing some multitasking. Think about using a RTOS. It may allow you to set task priorities such that everything can run on time.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Reply

Tags
effect, hall, sensor

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
What type of Hall Effect sensor is cheap and common? for rotation sensor with magnet. William At MyBlueRoom Electronic Projects Design/Ideas/Reviews 2 30th November 2006 07:59 AM
Hall Effect Sensor bryan1 General Electronics Chat 1 16th September 2005 09:21 AM
hall effect sensor koyeh182 Electronic Projects Design/Ideas/Reviews 5 26th December 2003 03:12 AM
Moderate Digital Hall Sensor Question iso9001 General Electronics Chat 3 18th December 2003 09:42 PM
Hall Effect Sensor Question... PWM too... iso9001 General Electronics Chat 11 15th December 2003 03:40 AM



All times are GMT. The time now is 12:33 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker