NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Sensors, Actuators, and Robotics » open drain output hall sensor

February 03, 2012
by Gil
Gil's Avatar

i bought a allegro ats627 hall sensor. data sheet says it has an open drain output. i set a pin up on my atmega168 as input with pull up resistor on and connected it to the "open drain output" just like a simple switch. why doesn't this work? when the sensor is "on" it should pull the input pin low just like the switches i have been using, right? it doesn't. what am i missing?

February 03, 2012
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Gil,

It doesn't sound like you are missing anything, from your description what you are doing should work. We now just have to figure out why it isn't working =).

The first thing to do is separate the two systems and try to test them separately. Make sure you have properly set up an input pin with a pull up resistor by just removing your hall effect sensor and testing the voltage at the pin with a multimeter. To make sure its 5V when nothing in connected to it, and make sure it goes down to 0V when you connect the pin to GND.

Once you verify that your pull up resistor is doing the right thing, connect your hall effect sensor up again and using a multimeter test to make sure that the voltage actually is being pulled low when you move a ferrous material back and forth in front of it. Looking over the datasheet for your chip, it looks like it is doing a fair amount of magic to reject irregular gear or broken teeth. It is possible this circuitry is preventing any output at all when you are slowly passing something in front of it manually. You might have to setup a quick test rig with a gear you can spin manually to see the chip working.

Also make sure that that you are in fact using a ferrous material to test your hall effect sensor. On more than one occasion I have waived aluminum in front of hall effect sensors and wondered why it wasn't working.

Humberto

Post a Reply

Please log in to post a reply.

Did you know that inductors try to keep their current constant over short periods of time? Learn more...