LPComp Comparitor is Turning on at an Incorrect Value

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ToVa_285016
Level 5
Level 5
100 replies posted 50 replies posted 50 questions asked

Hi,

I have a comparitor set up to monitor overcurrent in a motor drive application.  The setup takes a reference voltage from an IDAC in the negative and has the current monitor voltage in the positive terminal.  The ISR is firing when the + input is way too low.  I have measured both voltages and confirmed that the ISR trips when the - input is about 20mV and the + input is around 2mV.  Any ideas what is going on here?  The calculations for the conditions back up the measurement.

LPComp.JPG

The 10x difference made me think I missed something, but I remeasured the input voltages a few times, and that seems to be the difference when it trips.

Thanks in advance for any help!

Regards,
Tom

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Tom,

Situation is actually worse, as there is extra ~500 oHm internal trace resistance between the Pin_Idac and IDAC. So the voltage that Comparator "-" sees is approx 20mV x (1.8k+0.5k)/1.8k = 26mV.

I suspect that the input signal is noisy (+/-50mV), which is sufficient to trip the comparator. Did you inspect it with the scope? Another reason could be a digital noise pickup from the adjacent pins. Try to make a test project with only parts shown above. Change pins to see if any effect.

Other thought is what precision do you expect from PSoC comparator? Down to 1mV? Typically, voltages on the Comparators are in some volts range, so +/- 10 mV is acceptable accuracy. Note that you are operating very close to the Vss rail, which may be an issue. The signal needs to be conditioned (amplified and filtered) prior to the Comparator.

/odissey1

View solution in original post

0 Likes
4 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Tom,

What is the PSoC Creator version and LPComp component version you are using ? Can you also share how the LPComp component is configured ?

Best Regards,
Vasanth

0 Likes

Hi,

PSOC Creator:  4.3

LPComp:  2.20

I believe all are latest revision.

The configuration is this:

pastedImage_0.png

Thank you,

Tom

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Tom,

Yes, these are the latest versions. Could you also the exact part number you are using ? Also are you using a psoc development kit  or custom board?

From the first view there does not seem to be an issue with the configuration. Now to avoid any issues in the hardware, could you please confirm If there any noise spikes in the Pin_Ibus input which may trigger the comparator ? Also if you are in a custom board, could you please let me know how the device is powered and power pin connections follow the hardware recommendations ?,

Best Regards,

Vasanth

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Tom,

Situation is actually worse, as there is extra ~500 oHm internal trace resistance between the Pin_Idac and IDAC. So the voltage that Comparator "-" sees is approx 20mV x (1.8k+0.5k)/1.8k = 26mV.

I suspect that the input signal is noisy (+/-50mV), which is sufficient to trip the comparator. Did you inspect it with the scope? Another reason could be a digital noise pickup from the adjacent pins. Try to make a test project with only parts shown above. Change pins to see if any effect.

Other thought is what precision do you expect from PSoC comparator? Down to 1mV? Typically, voltages on the Comparators are in some volts range, so +/- 10 mV is acceptable accuracy. Note that you are operating very close to the Vss rail, which may be an issue. The signal needs to be conditioned (amplified and filtered) prior to the Comparator.

/odissey1

0 Likes