Hi, can anyone point me in the direction of a safe way of interfacing a hall effect (speed) sensor to the input of a PIC microchip? I am sure there are probably driver chips to do the interfacing but I am not aware of any.
Cheers,
Ed
Hi, can anyone point me in the direction of a safe way of interfacing a hall effect (speed) sensor to the input of a PIC microchip? I am sure there are probably driver chips to do the interfacing but I am not aware of any.
Cheers,
Ed
Which hall effect sensor?
If it has a digital output you just connect the output of the Hall sensor to an input on the PIC, (perhaps with an external pullup or with an internal pullup programmed, if the Hall sensor is open drain/collector).
Best regards, Spehro Pefhany
-- "it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Unfortunaltely not, see my reply above :)
Are you talking about the one you emailed to me? (copied below,m along with my reply.
Ed wrote: >
Sounds like not a hall effect sensor at all, but just a small magnet wrapped in wire... an inductive sensor. This is inherently an analog sensor, so either you use an analog input to measure its output and determine zero crossings or you use an opamp or comparator to convert the sine want to a digital output that can connect directly to a digital input.
You could connect one end of the sensor to a 2 resistor divider to hold it at about half of the supply, put a pair of diodes across it, to limit the swing to +- a volt or so, and measure its output voltage with an A/D or comparator input in the PIC. Or, Connect that signal to a comparator that has its other input tied to the divider, and use its output to connect to a PIC digital input.
Neither will work all the way to zero speed, however, since the sensor open circuit output voltage is proportional to velocity.
so it turns out it's not a hall sensor.
maybe something like this. comparator |\\ -------- | | / >-+---[100K]------+-------|+/ | |/ `--[10M]--< 1/2 zVcc number of pulses will be proportional to distance traveled, so frequency is proportinal to speed. pick the capacitor (and/or adjust the resistors) to keep the voltage low enough at high speeds.
-- Bye. Jasen
Hi Ed,
check with allegro.com Also see the section
You can enquire any such question to us at snipped-for-privacy@emittsol.com
Also, add some hysteresis. Put a large resistor from the output, back to the +ve input. This is the standard input circuit for tacho type systems.
Best Wishes
On a sunny day (Fri, 05 Jan 2007 19:30:08 -0500) it happened John Popelish wrote in :
Some PICs have simple comparators. Bias comparator internally with software from divider at 1/2 Vzener:
100n 1k 1k from -----| |----- R1 -------- R2 ----------- comparator input PIC inductive- C1 | biased at 1/2 V zener sensor --- \\ 5V zener if / \\ 5V PIC supply --- | GND-------------------------------------- limiter square wave from -.7 to +5VR1 is current limit zener. R2 limits neg current in PIC C1 must accomodate lowest speed, as PIC comparator has a very high input impedance, the time constant C1 ZinPIC allows for a low value of C1. C1 also blocks any DC from flowing in the sensor coil.
Circuit not tested, use at own risk. Wild guess values.
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.