Hall effect sensor wiring?
-
Hi,
Just received my hall effect sensors (http://www.aliexpress.com/item/bidbus-Useful-New-Hall-Switch-Sensor-Motor-Speed-Test-Smart-Car-Accessories-Module-For-Arduino-Effectively/32254906793.html)
I couldn't find any wiring or code to drive these. has anyone did it before? I don't feel like I can do this from scratch yet!
Moshe
-
From what I understand the dout pin will go high when the threshold is reached. The threshold is set by the pot meter. Connect power to the + and - terminals and the dout pin to a digital pin on the Arduino. You should be able to use a standard switch sketch.
Cheers
Al
-
@Sparkman thanks! this is scary.... will give it a try
-
@Sparkman ummm doesn't seem to do anything, stuck on "on". A silly question: do i turn the thingie clockwise or counterclockwise to get it to be less sensitive?
-
I used the BinaryLightSwitch sketch
-
That's the sketch I was thinking off, although it may need to be tweaked a bit to not use the internal pull-up. Not sure on clockwise or counter clockwise on that particular module. Turn it all the way one way and check voltage level on dout with power connected to the + and - terminals. Then turn it all the way the other way and check voltage level again. What do you see?
-
@Sparkman there is no "all the way". I have been turning it for a whole minute.....
-
No, it is definitely not working with the binary switch. I managed to trip it with a magnet but nothing goes on the gateway...... there is an LED on it that shows that it was tripped.
-
After tinkering with it and looking up stuff for a while here are my observations :
- there are two kinds of hall effect sensors, ones that detect magnetic field (on/off)
- ones that measure the magnetic field.
The sensor on the shop id the on/off one. it is not very sensitive. seems to be worse than reed switch... still couldn't figure what would this be used for. the other kind, A1301 or A1302 do not come in module form but they seem to require no special resistors or capacitors and can be connected directly to the arduino. they might have some use as you can probably detect very weak magnetic fields with them.
Disclaimer - I don't know much about this stuff. its just the results of my experiments and what i read.
@hek it might be better to replace the link in the shop to http://www.aliexpress.com/item/A1301KUA-T-A1301KUA-A1301-01K-ALLEGRO-TO92-Linear-Hall-Effect-Sensors-New-ORIGINAL/2043420052.html?spm=2114.32010308.0.71.CQN9jO
as they are cheaper and probably better I think
-
Hmm.. I see now that the ebay variant has a analog out but aliexpress doesn't. Adding a mental not to update the aliexpress link.
-
@Moshe-Livne Must be a continuous turn pot-meter than. I thought it would have been a multi-turn trim pot.
-
@Moshe-Livne said:
After tinkering with it and looking up stuff for a while here are my observations :
- there are two kinds of hall effect sensors, ones that detect magnetic field (on/off)
- ones that measure the magnetic field.
The sensor on the shop id the on/off one. it is not very sensitive. seems to be worse than reed switch... still couldn't figure what would this be used for. the other kind, A1301 or A1302 do not come in module form but they seem to require no special resistors or capacitors and can be connected directly to the arduino. they might have some use as you can probably detect very weak magnetic fields with them.
The sensor module you have has additional circuitry that converts it to a digital output (on/off). The actual sensor at the end should produce an analog output. Is there a part number visible on it? You could desolder it and try connecting it to the Arduino direct - would need to be to an analog input, not a digital.
Cheers
Al
-
@Sparkman it say 3144 415 so its the a3144 i think. found a you tube video https://www.youtube.com/watch?v=1ZkX1-gJYjQ (i think the guy there misses the part that it gives 2.5v and goes up or down according to the polarity but its good enough for me...) will give it a try later and see how sensitive it is