4 Replies Latest reply on Oct 1, 2020 4:42 AM by BoTa_264741

    LPComp Comparitor is Turning on at an Incorrect Value

    ToVa_285016

      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

        • 1. Re: LPComp Comparitor is Turning on at an Incorrect Value
          VasanthR_91

          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

          • 2. Re: LPComp Comparitor is Turning on at an Incorrect Value
            ToVa_285016

            Hi,

            PSOC Creator:  4.3

            LPComp:  2.20

            I believe all are latest revision.

             

            The configuration is this:

             

            Thank you,

            Tom

            • 3. Re: LPComp Comparitor is Turning on at an Incorrect Value
              VasanthR_91

              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

              • 4. Re: LPComp Comparitor is Turning on at an Incorrect Value
                BoTa_264741

                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