Hall Effect/Gear Tooth Sensor trouble

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need some help, I'm trying to interface a Melexis MLX90217LUA Hall Effect/Gear Tooth Sensor to an ATmega16L resting on an STK500. I've attached a wiring diagram. The problem is, I think I'm misunderstanding how the sensor works, I've tried passing both poles of moderately powerful magnets as well my steel knife blade in front of it to no success. The voltage on pin 3 (VOUT) never comes up from 0V, thus not triggering the AVRs rising edge interrupt. Nothing I can think of trying causes any reaction on the output pin. Ideas please? Any further information I can provide? Thanks.

--Matt

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

That device's output is open collector. You need a pull-up resistor (5k6.. though exact value isn't too important) from the output to VCC. The melexis only has the ability to pull that line to GND, when it is high it just releases the line. An external resistor has to pull the line high.

See page 5 on http://www.melexis.com/prodfiles... for the minimum circuit needed.

HTH!

-Colin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this sensor does require a pull-up resistor from the output to VCC, you might just be able to use the internal pull-up within the AVR port pin.

Just a thought.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for the long delay in replying, but your suggestions did work, and the AVRs internal pullup was sufficient for the purpose. Thanks!