[chbot] Hall Effect Sensor
Charles Manning
manningc2 at actrix.gen.nz
Thu Jul 16 23:02:03 BST 2009
On Thursday 16 July 2009 19:18:27 jimmy allen wrote:
> for a project i am thinking about using a HES
> i have ordered one (a UGN3503U) and i am not too sure how to program one.
> so i was looking for a piece of sample code if anyone has worked with
> the before.
It depends on the sensor you use. South Island component centre has a
selection.
There are basically three main types:
* Analogue: Attach to an ADC pin and make an ADC reading.
* Unipolar Switch: Open collector. It looks like a switch to ground that turns
on when the magnet is close (polarity sensitive - only reacts to North or
South, I forget which). Turns off when the magnet goes away. You just hook
this up to an input pin with a pull-up (like a touch switch etc).
* Bipolar switch: Like Unipolar switch, but needs to be actively turned off.
Turns on with North and turns off with South (or vice versa, I forget which).
If you want code, you'll need to say what micro you're using.
-- CHarles
More information about the Chchrobotics
mailing list