11 Replies Latest reply on Apr 30, 2019 8:09 AM by user_1669321

    Can't output VREF with OPAMP

    user_1669321

      Hi,

       

      I'm using a CY8CKIT-059. I want to output 1.024V to pin 2.6. See below my top design. The opamp is in High Power mode.

      At the start of main(), I call VREF_OPAMP_Start(). What is connected to pin 2.6 is a 10k resistor in series with a 10k NTC connected to ground. However, I only read 70mV at pin 2.6. What am I doing wrong?

       

      Thank you,

       

      Fred

        • 1. Re: Can't output VREF with OPAMP
          user_1669321

          I also tested to output 0.256V instead of 1.024V and now I read 18mV.

           

          1.024 / 0.070 = 14.6

          0.256 / 0.018 = 14.2

           

          There is a divider of about 14, is this expected?

          • 2. Re: Can't output VREF with OPAMP
            LinglingG_46

            Could you try to assign the pins to P0[1], P3[6],P0[0] or P3[7] to test the voltage?

            From the Opamp component datasheet, it says it has the specific output pins like below:

            Capure.PNG

            • 3. Re: Can't output VREF with OPAMP
              LePo_1062026

              Fred,

               

              If you are using an Opamp in follower mode, you should have a 1:1 relationship of input to output.

               

              LinglingG is correct. On this CPU only pins P0.1, P0.0, P3.6 and P3.7 have the higher Opamp drive capability (>10mA @ +/-0.5V loss ).

              The main reason is that these pins can be directly connected to the Opamp associated with it with near 0 ohm routing resistance.  If an Opamp is routed to some other pin (such as P2.6) there needs to be additional routing through one or more switches.  Each switch can have 250 to 450 ohms of series resistance which will significantly contribute to your loss of output voltage.  You can see by the analog editor how each Opamp has a direct connect.  Connection to other pins have switch resistance losses.

               

              Using a little " back of the napkin" calculation: Assuming your NTC is at 10K @ RT, you're drawing (0.07V/20K =) 35uA.  This  means you have ~ ((1.024V-0.07V) /35uA = ) 27257 ohms of internal series resistance.  This does seem very excessive.

               

              Is it possible you actually have an output voltage of 0.7V?  This would make more sense.  Current draw => (0.7V/20K =) 350uA.  Internal series resistance ((1.024V-0.7V)/350uA =) 926 ohm.  Much more reasonable.

               

              You may want to try the thermistor circuit below.  I've used this circuit recently to great effect.  It also has the advantage that no Opamps were used.  The trick is that the PIN_therm_feed must be an SIO pin.  On the PSoC5LP this means it is limited to pins 12.0 through 12.7

              Note the Thermistor_calc component.  It takes no HW resources but if you set up the component correctly, it will allow your program to use the non-linear curve of the thermistor circuit below to calculate the temperature.  Consult the datasheet for more info.

               

              Len

              • 4. Re: Can't output VREF with OPAMP
                user_1669321

                Thanks for the answers, everyone.

                 

                Unfortunately, I cannot test any of them without cutting traces on the PCB. I was able to use an IDAC instead of an op-amp to measure the value of the NTC.

                 

                From another thread (Follower-output voltage breakdown?), it really looks like the pinout of the op-amp is the problem.

                 

                @Len, the voltage was really 0.07V, not 0.7V.

                 

                Concerning your ADC top design, does that really compile? I've tried routing one analog pin to 2 different ADC inputs and I get the error "Signal "Net_2669" is expected to connect to only one GPIO analog pin but instead it connects to "\ADC_VBAT:AMuxHw_1_CYAMUXSIDE_B\". Please fix the connection."

                • 5. Re: Can't output VREF with OPAMP
                  BoTa_264741

                  Fred,

                  To visualize CY8CKIT-059 in/out connections, you can use the Annotation Library:

                  Annotation library for CY8CKIT-059 Prototyping Kit

                   

                  179878.png

                   

                  To speed-up temperature calculation (~15 times) and to get better precision (~0.001 degC), you can use Fast Thermistor Calculator:

                  Fast Thermistor Calculator

                  myThermistor demo (2).png

                  /odissey1

                  • 6. Re: Can't output VREF with OPAMP
                    LePo_1062026

                    Fred,

                     

                    You are correct.  My example does not compile.  This is because I substituted the ADC_SAR_SEQ in place of the two components I actually used in my design which are a AMux and a ADC_SAR.  I forgot that the ADC_SAR_SEQ checks for multiple connections on the analog inputs and does not allow them.  I wish Cypress would explain why they are making that a build violation.

                    The circuit above compiles.  However, you need to control the Amux yourself (easy enough).

                     

                    I thought about using an IDAC as the source feed for the thermistor circuit.  What drive current did you end up using?

                     

                    Len

                    • 7. Re: Can't output VREF with OPAMP
                      user_1669321

                      Ok, that explains it.

                       

                      25uA was enough to get a good reading (I don't need the full ADC range).

                      • 8. Re: Can't output VREF with OPAMP
                        LePo_1062026

                        Fred,

                         

                        I'm glad you found a solution.

                         

                        Based on your 25uA set IDAC, you're looking at about 0.25V at hot (125C) and about 5V at cold (-40C).  Good to know.

                         

                        Len

                        • 9. Re: Can't output VREF with OPAMP
                          user_1669321

                          Len,

                           

                          The NTC is 10k @ 25C, so 10k*25u = 0.25V. 125C would be lower.

                          • 10. Re: Can't output VREF with OPAMP
                            LePo_1062026

                            Fred,

                             

                            Sorry.  I was referring the voltage across the entire thermistor circuit including the reference resistor (10k).

                             

                            You are correct, the voltage @ the Rthermistor would be 0.125V @ 25C and close to 0V @ 125C.

                             

                            Len

                            • 11. Re: Can't output VREF with OPAMP
                              user_1669321

                              0.250V @ 25C measured between NTC and GND (reference resistor is irrelevant)

                               

                              0.717V @ 0C

                               

                              0.014V @ 125C