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

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

cross mob
Anonymous
Not applicable

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

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

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

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

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.

0 Likes
Anonymous
Not applicable

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

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

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.

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

You would also have T to contend with -

   

 

   

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

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.

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

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 ?

   

😎 Current source DC or comprising a lot of noise ?

   

9) Absolute max peak current provided by source ?

   

 

   

Regards, Dana.

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

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.

0 Likes
Anonymous
Not applicable

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.

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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

   

 

   

Regards, Dana.

0 Likes