cancel
Showing results for 
Search instead for 
Did you mean: 

TS332 comparator not working as expected

MNazir
Associate II

Objective: I am trying to perform a basic comparison between two values via TS332 comparator.

Details: The comparator's inputs are output from Nucleo STM32L432KC DAC. The code for DAC values generation is verified using the internal comparator which works perfectly. The Nucleo board is equally used to supply the comparator (3.3V & GND). A pull-up resistor of 10 kOhm is connected between the positive supply voltage and the output.

Problem: The output is always HIGH except when the inverted input (-) of the comparator becomes equal to the supply voltage ! Does anyone have an insight on what may be the cause of such behavior?

Thank you in advance.

4 REPLIES 4
Uwe Bonnes
Principal III

Bad connections, wrong connection, missunderstanding of comparator working restrictions. Double check and if still not working, show the schematics. B.t.w, where is IN+ connected?

MNazir
Associate II

Thank you for your answer.

The wrong/bad connections were the first thing that occurred to me so I soldered another piece of the comparator on another PCB but I have the exact same behavior so I highly doubt that this is the source of the problem.

Maybe there is something I misunderstood about the comparator's working restrictions, however I doubt that as well since the same code worked for the internal comparator (the one integrated inside the MCU).

In the attached picture, the schematic is shown where PA4 and PA5 are the DAC outputs which are input to the IN- & IN+ inputs of the comparator. Normally when IN- becomes >= IN+ the output should become LOW, however in my case the output is always HIGH unless IN- becomes =Vcc+.

P.S: The 10k resistor is a pull-up resistor and it is needed since the output of this comparator is open-drain.

0693W000005ClYxQAK.png

Uwe Bonnes
Principal III

If complex setups fail. try simple things first. Make a chain of 3 same resistors about 10k or so connected between GND and VCC. Connect the the lowe of the two divided voltages to IN+ and the upper to IN-. Output should go low . Swap and output should go high. If not, TS332 is broken or some other part. If it works, measure the IN +/- voltages in your complex setup. Probably IN+ is also nead VCC.

Thank you for the proposal.

i actually also tried a simpler setup where I used a voltage supply directly for IN+ & IN- which yielded the same result.

I will try pulling up IN+ and keep you informed.