yes, i know lm339 need input voltage to pin 4 and 8 i think, anyway its in the datasheet, i will try with the internal pull of but, id rahter use the external one......Either should work, and the value is not critical, so anything 3k or higher ohms.only as a doubt, the output of the pull-off resistor goes again to v+ rightNo, because It's possible to run the LM339 chip at a higher voltage then the arduino runs at, and in that case you wouldn't want to wire the output pull-resistor to that higher voltage. It needs to be wired to the arduino +5vdc pin, if your LM339 is not being powered already from +5vdc. By not using the pull-up resistor and just using the arduino pull-up option you don't have to worry about this at all. That make sense?, that what it call hysteresis??Hysteresis feedback is just a method to make the comparator a little less likely to switch high and low sporadically if there is no input signal present, or if it's a very weak input signal. As long as you have a suitable voltage input signal wired to the chip you probably don't need to use that feedback 'feature'.Lefty
I just tested with an LM339 I happened to have lying around.That works fine:
@retroleftyThank for the link about the LM339 datasheet. I did have one, but not that one you link. The circuits will give me some ideas. And the pull-up resistor, <-- I did know about this little info In my experience with the LM339, it work fine for a signal going from 0 V to positive and back. But I try with an AC signal in, Flat line... just be aware of that fact.
i tried it right now and works fine, monday will look test ir with an osciloscope to see it better, but i tried with a 4.7k and 470R resistors i had lying there ... this work really well with both of my sensor inductive one and also for the optical sensor....
ummm somethig its wrong with this i just try it and see that there its a problem,