Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Problem with GPIO s

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Problem with GPIO s
Moderator:
ANCY

Post Reply
Follow this topic



Problem with GPIO s

vgy posted on 11 Apr 2013 7:31 AM PST
Top Contributor
133 Forum Posts

hello to all,

         I am using opamp in non inverting mode with Rf=1k, R=1k, feeding input to positive terminal of OPAMP. but problem is that with out input voltage the opamp generating output voltage of around 2v. and also from my design PGA input is given from OPAMP externally, here also with out external connection to PGA , PGA out put goes to 2.43v. i dont know i am doing wrong.here all PINS configured in highimpedance analog mode.

 

Uploading the work.

Thanks




Re: Problem with GPIO s

hli posted on 11 Apr 2013 08:08 AM PST
Top Contributor
675 Forum Posts

Can you update to the latest Creator version (2.2)? I saw that many components nmeeded to be updated... Also, you then can draw into your schematic the external components so we can see how your complete circuit looks like.

As for your problem: it is a bad idea to leaven OpAmp inputs open. See e.g. http://www.analog.com/static/imported-files/rarely_asked_questions/unused_op-Amp_article.html for an explanation. Basically an open input might behave as if it gets over-driven.

So as long as your circuit behaves as it should with proper input signals, all is well.



Re: Problem with GPIO s

vgy posted on 11 Apr 2013 08:28 AM PST
Top Contributor
133 Forum Posts

To Opamp Positive terminal 30uA to 60uA current input.



Re: Problem with GPIO s

hli posted on 11 Apr 2013 12:30 PM PST
Top Contributor
675 Forum Posts

Is this your original or your new circuit? If its the original, you should not observe 2V or more on the output...



Re: Problem with GPIO s

vgy posted on 11 Apr 2013 08:33 PM PST
Top Contributor
133 Forum Posts

Hi Hli,

Thats my original Circuit only .



Re: Problem with GPIO s

vgy posted on 12 Apr 2013 10:58 PM PST
Top Contributor
133 Forum Posts

Hi Hli,what might me the problem,even i too astonished with that voltages



Re: Problem with GPIO s

hli posted on 12 Apr 2013 12:17 AM PST
Top Contributor
675 Forum Posts

I'm also astonished. When you have a buffer with gain=2, and set its input to 0, its output should be 0 too. My best guess is that something in your wiring is faulty. Did you double-check the ports and pins - maybe you connected a resistor to the wrong pin? Same goes for the resistors - are they all connected properly? Can you measure the proper voltage on all OpAmp pins?

One way to debug this is to add another analog output pin, and connect it inside the PSoC to the OpAmp pins, and then measure the voltage there. For example, on the negative input of the PSoC you should measure half the output voltage, and the positive one should really be zero.

Also - what does the OpAmp do when you connect a proper voltage to its input?



Re: Problem with GPIO s

danaaknight posted on 12 Apr 2013 03:11 AM PST
Top Contributor
1773 Forum Posts

First and foremost, are you trying to build a current to voltage converter, if so use

a TIA as it has onchip conversion gain setting R's and you can control the offset

for establishiung the complience conditions for the input current source. Addi-

tionaly it has selectable Cintegrate, eg. your LP filter. So you could roll your OpAmp +

LPF + PGA into one component......

 

 

In your case you have ~ 50 uA flowing thru 10K and a G = 2, so

Vout = 5 x 10 -5 X 1 x 10 4 X 2 = ~ 1 V. So you seem to have a gain error of 2.5, are

your G settings R's out of tolerance ? Is your I source actually a very poor I source

with its own complience offset ? The current you are measuring into the Vni pin of

OpAmp, is your current meter causing offsets ?

 

Regards, Dana.

 



Re: Problem with GPIO s

hli posted on 12 Apr 2013 05:05 AM PST
Top Contributor
675 Forum Posts

@dana: but we are talking about the case that no input signal is applied. In that case no output voltage should observed, apart from the (amplified)  offset voltage and maybe some current through this resistor. The offset voltage is about 2mV, and input leakage current is specified with 1nA or 14nA (depending whether its a GPIO or SIO pin).



Re: Problem with GPIO s

danaaknight posted on 12 Apr 2013 05:16 AM PST
Top Contributor
1773 Forum Posts

I thought he was getting 2V out for 40 - 60 uA in ?

 

Regards, Dana.



Re: Problem with GPIO s

hli posted on 12 Apr 2013 12:39 PM PST
Top Contributor
675 Forum Posts

The first posts stated:

but problem is that with out input voltage the opamp generating output voltage of around 2v

The comment about the current came later on...



Re: Problem with GPIO s

vgy posted on 15 Apr 2013 07:36 AM PST
Top Contributor
133 Forum Posts

I didnt understand what is this



Re: Problem with GPIO s

vgy posted on 15 Apr 2013 07:36 AM PST
Top Contributor
133 Forum Posts


Re: Problem with GPIO s

hli posted on 15 Apr 2013 12:08 PM PST
Top Contributor
675 Forum Posts

There are already some threads in the forum dealing with programming errors - did you check them? Also, cannot please open a new thread for this new problem? Nobody will suspect a problem with device programming in a thread dealing with GPIOs...

Thanks!



Re: Problem with GPIO s

hli posted on 15 Apr 2013 12:27 PM PST
Top Contributor
675 Forum Posts

Aargh!

s/cannot/can you/



Re: Problem with GPIO s

danaaknight posted on 15 Apr 2013 02:13 PM PST
Top Contributor
1773 Forum Posts

@vgy

 

Just curious, what was the found cause for the offset problem of the OpAmp ?

Was a TIA a better approach ? Or applicable for that matter ?

 

Regards, Dana.



Re: Problem with GPIO s

vgy posted on 16 Apr 2013 12:46 AM PST
Top Contributor
133 Forum Posts

Hi ,

i am still facing the problem. attched file has PGA , and code is

    PGA_Start();
    PGA_SetGain(PGA_GAIN_01);
    PGA_SetPower(PGA_HIGHPOWER);

but still getting the output voltage 1.7v with zero input voltage. input and output pins are High impedance analog drive.



Re: Problem with GPIO s

vgy posted on 16 Apr 2013 12:47 AM PST
Top Contributor
133 Forum Posts

hi dana,

      TIA is better Apprroach than OPamp, but as of now i have to use Opamp only.

Thanks



Re: Problem with GPIO s

danaaknight posted on 16 Apr 2013 02:41 AM PST
Top Contributor
1773 Forum Posts

Strange, some thoughts -

 

1) Vssa is terminated properly ?

2) PGA load is 100K or greater (for purposes of this test) ?

3) You have an infinite loop in main(), ie you have not "fallen out" of main() ?

4) Vdda is terminated properly ?

5) No chance you damaged either assigned PGA pins with static or overvoltage ?

 

Consider posting a project with just a PGA installed on schematic for forum to look at.

 

Regards, Dana.

 



Re: Problem with GPIO s

vgy posted on 16 Apr 2013 03:13 AM PST
Top Contributor
133 Forum Posts


Re: Problem with GPIO s

hli posted on 16 Apr 2013 04:58 AM PST
Top Contributor
675 Forum Posts

I can replicate this problem (at least somewhat). I used a '5568 on a -001 kit. When I ground the input of the PGA, the output is about 30mV. When I open th input, the voltage goes up to about 1.3V, then drops to 0.8V, Sometimes it also fluctuates up to 4V.

I guess the input just picks up any electrical noise. It has a really high input impedance...



Re: Problem with GPIO s

vgy posted on 16 Apr 2013 07:22 AM PST
Top Contributor
133 Forum Posts

Hi hli,

          what is the solution for that?



Re: Problem with GPIO s

hli posted on 16 Apr 2013 07:44 AM PST
Top Contributor
675 Forum Posts

" do not leave your lugagge unattented inputs unconnected"

which basically is good advice anyways. As long as your are somehow driving your inputs, you should not have problems. When I go back to your original schematic, the PGA was connected to the OpAmp output. This should be fine.

(I did not test what the OpAmp does when its input is just connected to a 10k pulldown, but will so this evening)



Re: Problem with GPIO s

hli posted on 16 Apr 2013 12:20 PM PST
Top Contributor
675 Forum Posts

I did some more tests. Pulling down the PGA input with a 1Mohm resistor sets the output to zero. (btw: just adding a wire to the input port on the -001 kit drives the output voltage from 0.8V to over 2V, so this is cleraly electric noise).

Then I tested your original OpAmp problem. I can see the same problem - the output goes to over 2V with open inputs. But grounding the input with the same 1Mohm resistor also drives the output to zero.

So when your original circuit, with pulling down the OpAmp input with a 10k resistor, still results in an output voltage greater than zero, you either have a bug in your circuit, or a defective PSoC (I would suppose it to be the former).



Re: Problem with GPIO s

danaaknight posted on 16 Apr 2013 05:29 PM PST
Top Contributor
1773 Forum Posts

TIA is simple, saves resources, and makes most sense.

 

Regards, Dana.



Re: Problem with GPIO s

vgy posted on 18 Apr 2013 12:34 AM PST
Top Contributor
133 Forum Posts

Hi ,

  Here i am posting work,  In the schematic i am supposed to give current to PIN 1 , corresponding output voltage should display on LCD. but As i said in my earler Posts with zero current , output volatage is 1.7 to 2.2v which should not happen.

where i am going wrong, what is the actual problem i couldnot able to debug, please help in this regard.

 

thanks



Re: Problem with GPIO s

Bob Marlowe posted on 18 Apr 2013 02:50 AM PST
Top Contributor
1768 Forum Posts

When compiling your design with creator 2.2

1) I get informed that your device is ES2 which no longer is supported.

2) There are several updates for user-modules you use which correct some issues

3) I get 9 Errors and the build-process is aborted

There is (or was?) an upgrade-program to deliver old PSoC3ES1 or 2 silicon to latest version for free (or just shipping cost)

 

Bob



Re: Problem with GPIO s

vgy posted on 18 Apr 2013 03:07 AM PST
Top Contributor
133 Forum Posts

Hi Bob,

             I made some changes , ressistors and capacitors should externally as mentioned in earlier post.and I as of now i am using PSoC 5 ES2 version only.But the kit i am using is not mine, so i have to use that only.

Thanks



Re: Problem with GPIO s

hli posted on 19 Apr 2013 12:16 AM PST
Top Contributor
675 Forum Posts

That's strange - I have never heard of PSoC5 ES2 - I knew only about ES1 so far (.

But back to your problem - seems we are back to square one. I specifically tested how the OpAmp behaves with a pull-down resistor, and it does what is to be expected: the output goes to zero.

So I can only repeat my questions from above: did you really double-check your connections? Especially that the input resistor to the OpAmp is connected to the right pin? What does the OpAmp do when you feed it some current?

(Side-note: I don't see any external components in the design schematic, maybe you want to add them. Which Kit are you using anyway?)



Re: Problem with GPIO s

danaaknight posted on 19 Apr 2013 04:15 AM PST
Top Contributor
1773 Forum Posts

Is this your problem, not connected to appropriate dedicated pins ?

 



Re: Problem with GPIO s

danaaknight posted on 19 Apr 2013 04:27 AM PST
Top Contributor
1773 Forum Posts

From the ap note on routing - www.cypress.com/

 



Re: Problem with GPIO s

hli posted on 19 Apr 2013 04:51 AM PST
Top Contributor
675 Forum Posts

@Dana, you are on the right track. The Pins 1..3 are connected to P0[2,5,0] respectively - and this is a mixture between two of the OpAmp pins (OpAmps 0 and 2). So the OpAmp in question is connected with the input pins of OpAmp 0, but to the output of OpAmp 2, And the the OpAmp connected to the VDAC is connected to the Output of OpAmp 0. The PGA seems to be fine, since it is routed to completely different pins (but I get the warning "Bonded pin(s) "P4[7]" are not used in your current design but have been connected in order to route the design.").

So I suppose whats happening is that the two outputs get somehow interconnected by the routing. You should be able to check that in the analog design viewer (one of the tabs in the design wide resource viewer). Then you should try to let Creator place the pins for you - it should choose the proper pins for each OpAmp.

 



Re: Problem with GPIO s

hli posted on 22 Apr 2013 06:36 AM PST
Top Contributor
675 Forum Posts

@vgy: can you report back whether this was the problem? Or does the problem still occur?

Thanks, hli






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20