PGA using gain higher than 1 on PSoC 5

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi everyone,

   

I am new on PSoC programming and needing some help. My PC has Windows 10, 8GB of RAM, 1TB of HD and I am using PSoC Creator 2.1 with MiniProg 3. 

   

The problem: I did load the PGA example for PSoC 5 and it works very well. The project just has a PGA component which gain is 1 and 1 pin for analog input and 1 pin for analog output. The problem is when I try to change the gain to 2( or higher). The output just don't multiply by 2 the input.

   

 

   

Someone has some hint ? ( I already changed the C code to change the gain to 2).

0 Likes
11 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Daniel!

   

To solve problems it is always advisable to post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

The actual version for Creator is 3.2 SP1 and I would strongly suggest you to upgrade to latest version using Cypress Update Manager.

   

In the case that you are using an outdated development kit with a PSoC 5 (without the "LP") I would suggest to buy a CY8CKIT-059 witch has got the latest PSoC 5 chip on it.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

thanks for the answer!

   

I uploaded the project as you said. I am using the CY8CKIT-001 PSoC® Development Kit, and it details can be seen in this page http://www.cypress.com/documentation/development-kitsboards/cy8ckit-001-psoc-development-kit.

   

I already tried to use the PSoC Creator 3.2, but I can't find my device in the Device Selector. As you have said, probably my PSoC 5, which number is CY8C5568AXI-60, is outdated. Sadly I can't buy the CY8CKIT-059, because I live in Brazil and the importation fee is very high.

   

Is there a way of include my device number in the Device Selector inside PSoC Creator 3.2?

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

Keep in mind the following -

   

 

   

1) Analog inputs to pins on PSOC can only range Vdda >= Vpin >= Vssa,

   

no negative inputs allowed. Attached some methods to handle signals that

   

range < Vssa.

   

2) If you are using NI PGA, then its output simple,  Vout = G x Vin. If

   

inverting then you need to bias up input to get output into its CM range.

   

Also keep in mind the input Z of NI is ~ infinity, whereas the inv mode

   

is significantly lower due to feedback R's

   

 

   

https://www.dropbox.com/s/k1yn4m7heaixvmg/ADinput%20negative%20inputs.zip?dl=0

   

 

   

Here is a tool that will allow you to predict/design setting up correct CM range/bias.

   

 

   

http://masteringelectronicsdesign.com/differential-amplifier-output-common-mode-voltage-calculator/     CMR Calc IA Bias

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Hi Dana,

   

I'm using Vpin = 2.6v, Vdda = 3.3v and Vssa = 0v. And I used the Vref connected internally to ground. Since I am respecting the Vdda >= Vpin >= Vssa , I can´t see why it is not working.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I have got the same kit as you have, but a few years ago Cypress replaced all PSoC5 boards with PSoC5LP versions for free. Probably you have missed that action. I would suggest you to get in contact with one of the representatives.

   

The CY8CKIT-010 is exactly what you need to replace and whatever the price is, it is worth using the -001 Kit you have got., even when the fee is 100%.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks for the information. I am going to search about it.

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

Your input of 2.6 V x G = 2 is trying to drive the PGA output outside its CM range,

   

which in this case is 3.3V, but you are asking it to generate 5.2 V, the PGA out cannot

   

exceed Vdda.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

That's right ! I forgot to look the output range. I tried again but with Vin = 0.6v and the output was 1.2v (for gain = 2). Thanks for the help!

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

You are always welcome !

   

 

   

Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello,

   

I am facing similar issue, I am using psoc 5lp, input from a photodiode , when the analog range is 56 mv it shows pga (gain set 2)output of 110mv etc, howeevr whan gain 50 with same input shows only 130 mv, any reason for this ?attached workspace.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are waiting until one adc result is ready, but you read 20 values from ADC to average them. Better put the wait into the loop.

   

Is your VDDA 5V or are you powering with 3.3V?

   

 

   

Bob

0 Likes