Comparator not responding; offset in PGA generated reference!

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

cross mob
Anonymous
Not applicable

Hi All,

   

Yet another PSoC beginner. I've approximated an SC block as an op-amp to use it as a differentiator. (My Input after external Capacitor goes to P2.3; the o/p port P0.3 is shorted to P2.3 via a feedback resistor).  A very simple application.

   

 

   

I'm giving a reference voltage of 1.25V thru a PGA (Vinp=AGND; Gain=0.5) to the SC block's ACMux. My input is fed to BMux after going through external capacitor.  My differentiator's (SCblock's) o/p has to start at 1.25V.

   

 

   

I face the following problems,

   

 

   

1. The differentiator's o/p starts at 1.6V rather than 1.25V. Reason for this offset ? Also, I measured the PGAs o/p before it was routed to SC block and it gave 1.25V.

   

 

   

2. The differentiator's o/p is routed to another SC block approximated as op-amp which I use as a comparator. This one has a reference from another PGA (1.72V). I observe on the CRO that my differentiator's o/p crosses 1.72V comfortably but still the comparator doesnt switch to 5V. Why  ?

   

 

   

Please clarify,

   

RAM.

0 Likes
4 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You might post youir project so forum can take a look at it.

   

 

   

When you say "The differentiator's o/p starts at 1.6V rather than 1.25V.",

   

is this for input floating ? What is the size of the Rfeedback used on

   

differentiator ? Is bias current creating a large offset ? Or is this just

   

creating a follower out of OpAmp, hence with input floating the differentiator

   

will be at Vdd/2 ?

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Couple of points to check:

   

1. What is the power settings and the column clock frequency? Please see application note - AN2223 (PSoC 1 Approximating an opamp with switched capacitor integrator) - http://www.cypress.com/?rID=2630 for guidance.

   

2. If input is floating, the approximated opamp, will act as a voltage follower (with a resistor connected between -input and output). But the output voltage will depend on the CA, CB capacitor values. See equation 8 in AN2223. If the feedback resistor is too high, it can affect the output voltage too, depending on the column clock frequency.  

0 Likes
Anonymous
Not applicable

For the comparator question: SCBLOCK, approximated as opamp, can only work if operated in a closed loop system. Otherwise it is a pure integrator. Please follow cookbook provided in appendix of application note AN2041 (http://www.cypress.com/?rID=2899) to know the parameters for comparator configuration.

0 Likes
Anonymous
Not applicable

 @ rjvb, 

   

 

   

Thanks a lot!

0 Likes