I'm feeding 5V from an arduino to the circuit. I'm comparing the voltages across 2 trimpots. I use 4K7 as a pullup resistor.
I measure 2.5V at the Positive Input (Pin 10) and 2.503V at the Negative Input (Pin 9).
The Output (Pin 16) reads HIGH, but it should read LOW, since 2.5<2.503
Only at 2.508 is the switch happening, and the Ouput isn't a steady LOW but it's fluctuating, I guess because of noise. At 2.509V and above it is steadily LOW.
Is this behavior normal for a LM339 ? Meaning, is there always a delta?
js-:
I'm feeding 5V from an arduino to the circuit. I'm comparing the voltages across 2 trimpots. I use 4K7 as a pullup resistor.
I measure 2.5V at the Positive Input (Pin 10) and 2.503V at the Negative Input (Pin 9).
The Output (Pin 16) reads HIGH, but it should read LOW, since 2.5<2.503
Only at 2.508 is the switch happening, and the Ouput isn't a steady LOW but it's fluctuating, I guess because of noise. At 2.509V and above it is steadily LOW.
Is this behavior normal for a LM339 ? Meaning, is there always a delta?
The datasheet shows the worst case DC offset for the LM339 is 5mV and for the LM339A is 3mV, at 25C.
If you need a precision comparator you'll need a difference device, or amplify the signals with a precision
opamp before comparing them.
You can also consider trimming the device to compensate - this won't be perfect, but its doable.
If you are measuring those voltages with a multimeter, keep in mind that the multimeter has internal noise and that the meter leads pick up environmental electrical noise, introducing that into the circuit.