cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to read the comparator's output voltage without connecting the output pin to the ADC?

KKIM.6
Senior

I know the microcontroller has built-in comparators and I'm trying to use it as a transimpedance amplifier. So, I want to test the comparators but the Necleo-WB55 developer kit doesn't have built-in comparators.

 0693W00000WI0LNQA1.png0693W00000WI0LrQAL.pngSo, I have to test it on my custom board with the STM32WB55VGY6TR microcontroller.

However, there is two big concern.

The one is that I didn't connect any output pin of the comparator to ADC in my custom board.

The other is that ADC cannot read negative voltage but the transimpedance amplifier is inverted OP-AMP. So, the output could be negative.

So, I have a question here.

Is there any way to read the comparator's output voltage without connecting the output pin to the ADC? (or is the microcontroller designed already for this purpose? because I found that it is not mandatory to assign the output pin in STM32cubeMX.

If not, can I connect the output pin to the ADC even though the comparator may generate a negative voltage?

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

You cannot use a comparator as a transimpedance amplifier. Unlike operational amplifiers, comparators have no phase compensation, which makes them completely unstable in the analogue range.

So you will have to implement the transimpedance amplifier externally and then you can also use the first, non-inverting circuit to stay in the positive range.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Peter BENSCH
ST Employee

You cannot use a comparator as a transimpedance amplifier. Unlike operational amplifiers, comparators have no phase compensation, which makes them completely unstable in the analogue range.

So you will have to implement the transimpedance amplifier externally and then you can also use the first, non-inverting circuit to stay in the positive range.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Oh. I understood.

Thanks for your reply.

Could you recommend any I-V converter that makes positive feedback instead of a transimpedance amplifier?