LM393 - Hall Sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tamunave
New user
Posts: 2
Joined: 28 Mar 2016, 19:07

LM393 - Hall Sensor

#1 Post by tamunave » 31 Mar 2016, 08:50

I've got a problem with a LM393 with a hall sensor connected to it.

Been having troubles with this setup for days now.
This is what i've tried:
Various pins on the ESP, on setting 'normal','output low','output high'. When I set the output value, the pulse counter goes crazy, counting like there is no tomorrow.
On normal setting counting is normal. It's counts the real pulses spot on. But i'm getting ghost pulses. Tried different power sources, no difference.

When I try this setup on nodemcu with a mysensors example for "pulse water meter" everything works perfect. Counts like a charm and no false readings.
For the mcu you'll need to use pin 2 or 3 (those are the only ones that generate interrupt (whatever that may be).
#define DIGITAL_INPUT_SENSOR 3
#define SENSOR_INTERRUPT DIGITAL_INPUT_SENSOR-2
attachInterrupt(SENSOR_INTERRUPT, onPulse, RISING);

This is the code that gets the pulse.
Are there "interrupt" ports on the ESP? Or do i have to configure it way differently on the ESP?

Thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests