Pages: [1]   Go Down
Author Topic: Hall effect sensor help Allegro 3144 [Solved]  (Read 2517 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

Beginner with hardware I need some help with a Hall Effect switch. I am planning to use it to control the speed of two motors of a very simple robot design (turns out one of the motors is faster than the other but that's another story)

I got some Allegro MicroSystems 3144 switches

Dunno which one I got, it says 3144 OH 09 on mine

So the vendor said I can directly plug it in and the datasheet says it can be used with suitable pull-up resistor

Quote
With suitable output pull-up, they can be used with bipolar or CMOS logic circuits

(first page)

I don't know how to plug it in, I tried directly and the input I read is 0 when I get a magnet really close but when no magnet is nearby, it just varies a lot between 0 and 1 (or 0 and n on a analog input)

What am I doing wrong (apart from plugging in things without knowing better  :-[)?
« Last Edit: December 26, 2010, 07:39:58 am by julien » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Datasheet

(was not allowed to include in my first post)
« Last Edit: December 25, 2010, 11:10:31 am by julien » Logged

Seattle WA
Offline Offline
Full Member
***
Karma: 1
Posts: 208
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

According to Allegro, the 3144 has been out of production for a while, but does have a replacement...

Anyhow, I assume by the directly plugging in refers to something like a motor controller with hall effect sensor inputs. That's not what you have. When the output of this sensor turns on, it will pull the output pin to ground. Otherwise, it will tend to float. That's why you need the pull-up. That's just a resistor to the Arduino's 5V pin; I usually use 1K but it's probably not critical.

Arduino pins have built-in pullups that are under program control. You turn them on by setting the pinMode to INPUT and then writing the pin HIGH.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Should be pretty simple to wire up. Wire supply and ground terminals of the sensor to Arduino +5v and ground pins respectively. Wire the signal terminal to your desired digital pin. You will then need to either wire an external resistor (10k ohms is fine) from the Arduino digital input pin and +5vdc, or by software command enable the internal pull-up resistor for that digital input pin. A reading of zero means magnet sensed and reading a one means no magnetic field sensed.

Info on enabling internal pull-up resistors: http://www.arduino.cc/en/Tutorial/DigitalPins

Lefty
« Last Edit: December 25, 2010, 11:38:51 am by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot to both of you, the internal pull-up resistor did the job for me.

This is a lot of fun  smiley-grin
Logged

Pages: [1]   Go Up
Jump to: