hall effect sensor -help

hello, I have problems with my hall effect sensor AH543, to read. the documentation I've found is this:http://www.google.com.ar/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CD4QFjAC&url=http%3A%2F%2Fwww.zip-2002.ru%2Fjpg%2Ffile.php%3Fid%3D742&ei=IMD-UYWtDub7igLRkoCABw&usg=AFQjCNEF2sfGtZ_dclLavK0U1S-WqW3bQQ&bvm=bv.50165853,d.cGE


This seems like it Should be a simple setup. Pin one = 5v Two = Ground Pin Pin 3 = Digital Pin2 on arduino

I have a pretty powerful magnet, and no matter what I do, or what angle I approach the sensor, digital read is always returning 0, even with the magnet out of range.

Is there anything obvious that I am missing? Does anyone out there have any experience with this type of component?

int sensorPin = 2;
int counter = 0;

void setup() 
  // setup serial - diagnostics - port
  pinMode(sensorPin, INPUT);

void loop() 
  int sensorValue = digitalRead(sensorPin);
  Serial.print(" ");

That sensor has an open collector output so you need to either provide an external pull up resistor or enable the internal one.

as I do that?, that resistance value I need?

Do this  pinMode(sensorPin, INPUT_PULLUP);to enable the internal resistor

external pull up resistor: that resistance value I need?


Why not use the free internal ones?

AWOL: 10k?

Why not use the free internal ones?

because it does not work =(


AWOL: 10k?

Why not use the free internal ones?

because it does not work =(

That means something else is wrong. If the internal one doesn't work then nether will an external one.

So post a photograph of your setup.