Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Can I measure current 0-20mA directly with the PSoc3?

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



Can I measure current 0-20mA directly with the PSoc3?
Moderator:
RKRM

Post Reply
Follow this topic



Can I measure current 0-20mA directly with the PSoc3?

SylvainKrT posted on 02 May 2013 4:37 AM PST
Member
2 Forum Posts

I have searched on applications notes and on forum but i haven't found a measurement current of 20mA directly with the psoc3 and development kit CY8CKIT-030.

Is it possible?

Escuse-me for my english, I am french.

Thank you

 




Re: Can I measure current 0-20mA directly with the PSoc3?

Bob Marlowe posted on 02 May 2013 04:57 AM PST
Top Contributor
1768 Forum Posts

Easiest would be to let the 20mA flow through a resistor (shunt) and measure the voltage across and then have the PSoC3 digitize that with the ADC. Calculate with Ohm's law the needed shunt and the needed max. voltage across.

Dana wil probably advise you to make an error-calculation for your design based on the precision you need for your results...

 

Bob



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 02 May 2013 05:05 AM PST
Top Contributor
1773 Forum Posts

If you are simply trying to measure a current, A/D and a Rsense to convert

I to V is all thats needed. But then you have to consider common mode

range needed for A/D. If Rsense is place in series with load in ground leg

that will meet CM range of A/D. If you do high side measurement then

you will need an external high side circuit, translator in effect. An example

of one -

 

www.planetanalog.com/document.asp

 

Hall effect -

 

www.google.com/url

 

Regards, Dana.



Re: Can I measure current 0-20mA directly with the PSoc3?

SylvainKrT posted on 02 May 2013 06:08 AM PST
Member
2 Forum Posts

Thanks for your replies.

I wondered if the current 0-20mA  could be injected directly into the PSoC and then measured without external component and with a TIA or other things but apparently it is impossible.

Sylvain



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 02 May 2013 08:04 AM PST
Top Contributor
1773 Forum Posts

The TIA does not have a low enough value R to handle 20 mA.

 

You could take a look at injecting current into an output pin driven low,

into saturation region of MOSFET output. But problem with this is

device to device variation of Rdson. If you did a production cal at

production test then you could correct for this variability. A/D would

be used on pin to measure voltage, hence compute current based

on measured V and knowlege of Rdson.

 

Another issue is complience range of a pin used like this would be

Vddio + .5V.

 

Regards, Dana.



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 02 May 2013 08:06 AM PST
Top Contributor
1773 Forum Posts

You would also have T to contend with -

 



Re: Can I measure current 0-20mA directly with the PSoc3?

pavloven posted on 02 May 2013 10:03 AM PST
Top Contributor
78 Forum Posts

Sources 4-20 mA allow the inclusion of low-resistance resistor in the circuit.
Bob suggested the use of a shunt. I do like the image below.
Of course there is no galvanic isolation.



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 02 May 2013 12:07 PM PST
Top Contributor
1773 Forum Posts

Some questions -

 

1) Is this a 4/20 mA current loop or just a single ended current source sinking to ground ?

2) Current source bipolar or mono ?

3) Range is 0 - 20 mA  or 4 - 20 mA ?

4) You want to measure current in hot side of load or ground side ?

5) Accuracy (absolute) you are trying to achive ?

6) Resolution of current measurment ?

7) Sample rate of measurements to be made ?

8) Current source DC or comprising a lot of noise ?

9) Absolute max peak current provided by source ?

 

Regards, Dana.



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 02 May 2013 01:24 PM PST
Top Contributor
1773 Forum Posts

The solution with TIA not appropriate. This is because you are settting G with external

R, thereby converting TIA to V amplifier. Reason is the onchip 20K TIA R has, most likely,

a horrible absolute value, 60% according to DS. Rather use a PGA, where G is a f( R/R ),

and onchip accuracies of ratioed R's is quite good, see G spec for PGA, at highest G 5%

G accuracy.

 

Note A/D has a G programmable input buffer, 1, 2 , 4 , 8 G's are available. If more G needed

use PGA.

 

Regards, Dana.



Re: Can I measure current 0-20mA directly with the PSoc3?

H L posted on 02 May 2013 05:35 PM PST
Top Contributor
679 Forum Posts

Looks like you want to use 20MA current loop for digital communication.
I would avoid measuring current directly as it most likely causing GROUNDING issue later on.
I would prefer to use opto-coupling.



Re: Can I measure current 0-20mA directly with the PSoc3?

danaaknight posted on 03 May 2013 02:28 PM PST
Top Contributor
1773 Forum Posts

This may help, attached, if current loop....

 

Regards, Dana.






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