amplifyer
gives
Good morning. The LM319 is actually a dual comparator, which is optimized to operate as an on-off indicator of the diference between the voltages at the - and + inputs. This works kind of like an op amp would, except a comparator is made to switch fast and not spend a lot of time between "ON" and "OFF".
Another feature about most comparators including the LM319 is that they have open collector outputs. That means that, when the output is low, it sinks current. When the output is high, the comparator output transistor is off. If you have a pullup resistor, that gives you a high output.
Now, if you look at the datasheet
you can get some clues about what's happening.
VCCVCC + + | | - C| VCC ^ C| + | C| | | | 5.6K.-. | | | | | | | | '--o |\\| '-' | -|-\\ | |/ | >----o----| -|+/ | |>
|/| .-. | | | | 1K | | =3D=3D=3D '-' GND | =3D=3D=3D GND created by Andy=B4s ASCII-Circuit v1.24.140803 Beta
Under normal operation, when the comparator is off, you should see a voltage divider between the 5.6K and the 1K resistor. For a 13.8V battery voltage, that should give you around 2.1V at the output pin. When it's on, it's sinking the current from the 5.6K resistor, about
2mA. The data sheet on p.4 shows that the output vopltage should be pretty near zero.You're getting pretty close to the full battery voltage when the comparator is off, and about 1.3V when on. Again, looking at the datasheet, you can see that the comparator transistor "on" voltage starts to rise pretty dramatically when it's trying to sink more than about 5mA.
That leads me to suspect that there's too much current going into that node, when the comparator is ON or OFF. First guess -- your transistor pinout is wrong. with the flat of the TO-92 plastic package facing toward you and the pins down, the pinout from left to right is E - C - B=2E As a first guess, I'd suggest you've got it wired up as E - B - C, like the 2N3904 and a lot of other small signal NPN transistors. You didn't mention what the battery voltage is (12 or 13.8) when you're running this, but this would explain what you're describing. Switching the collector and base will turn this into a forward-biased diode between the relay and the comparator. The current from the relay will swamp the voltage divider into a much higher voltage like you're seeing.
Try rewiring and see if it works. You may have smoked either the transistor or the comparator, so if it still doesn't work, replace the transistor first.
Good luck Chris