Hi,
As I said in the other topic, I'm building something... it doesn't matter what :grin: :grin:
So, I need to put a sensor in a roll that can say to me how many "turns" make the roll.
I thought of a magnetic sensor or an infrared sensor, which you advise me and why?
You may be better off getting a hall switch instead of a full linear analog device, then you just have to have it close enough and you'll get a definitive 0 or 5v
don't forget you need a pullup and that pay attention to the pinout the smd is different than the thru hole one, I've burnt one before I figured that out
with your sensor you will have to detect the peak and besides analog reading take more time
Google or ebay search hall sensor switch, they are usually cheaper actually (I bought by accident once thinking they were the linear kind)
One more note, The A1302 is a ratio metric device, the quiescent (No Mag field) is approx Vcc/2. As the other gentleman suggested you might do better with a Hall effect Switch if an On / Off sense is needed, although a pair of those A1302’s and containment (pole pieces for shielding) would make a nifty coarse position or X/Y indicator as the output polarity changes with magnetic polarity @ +/-2.5mV per N/S Gauss change in polarity or intensity, A1301’s will give a +/-1.3mV / N/S Gauss change. I bought a couple from eBay for $2.00 or $3.00 and had great fun with them. I thought to make a ‘unique mag key’ with one and an op-amp for level shifting (Decode) small coil of wire (solenoid)/ LM350T (encode) and two Arduino’s for encode/decode… I do hope this is useful information…
From the Allegro Data Sheet @ (1.508.853.5000; www.allegromicro.com)
Focusing on the device he has now, supplied with 5V the sensor should have an output of 2.5V (digital high) with no magnetic field near it. He’s getting a low.
Unless the sensor or Arduino pin is fried the only possibility I see is that it’s wired backwards.