43oh

# 4-20mA signal to MSP430 questions....

## Recommended Posts

Howdy everybody!

School and work has had me snowed under, I am finally getting back to getting a bit further into the MSP's

For a 4-20mA signal input to a MSP430 2 wire signal

I know I need to setup the ADC to read the signal, I found some of the TI documentation on setting it up but I think I am more confused now than I was when I started.

If I have the transmitter running at 3.3 volts I can go right to the MSP with it right?

If I need to run higher voltages I can use an OP amp to work around the higher voltage level, or measure the V difference across the transmitter?

Any ideas or direction to point me in?

Thanks guys!

I plan on using the signal in to generate a PWM output signal

##### Share on other sites

Not sure if this would be a good fit - TI RCV420. It would depend on how accurate you needed to be and your willingness to provide additional power supplies along with scaling the output.  FWIW....

##### Share on other sites

No you can't, the digital I/O and operating voltage of the MSP430G2 launchpad (assuming you're using that) is 3.6 volts, so 3.3 volts should be fine.

However, the Analog output is not capable of using that entire voltage range! IIRC the ADC can sample voltages up to 1.5 volts. The ADC input voltage is up to 2.5 volts.

You know the easiest way to change your current of 4-20mA into a voltage is to use a resistor.

Assuming the ADC input resistance is infinite, a current of 20mA converted to 1.5 volts is 1.5/20m = 75 ohms, the resulting voltage for 4mA will then be 4m * 75 = 0.3 volts

Assuming the ADC input resistance is infinite, a current of 20mA converted to 2.5 volts is 1.5/20m = 125 ohms, the resulting voltage for 4mA will then be 4m * 125 = 0.5 volts

##### Share on other sites

Thanks guys!

I'll try some of that this weekend. I meant to type 3.6 volts last night. I was about brain fried after all the other reading.

##### Share on other sites

I don't mind having additional power sources, then have a regulator just to feed the msp

##### Share on other sites

check these out ==> TIDA-00095TIDA-00165TIDA-00247

##### Share on other sites

Any microprocessor can receive analog input. Normally 0-255 (char). but if 4-20 mA. It may use converter or library  code to convert.

##### Share on other sites

I'll try that this weekend to. I need to have a feedback to the msp. I am attempting to make a controllable ac current source 60 amp max. So I'm basically trying to build an ac adjustable current source controlled by the msp along with some other features. I may use a amplified mV analog input instead of the mA.

##### Share on other sites

No you can't, the digital I/O and operating voltage of the MSP430G2 launchpad (assuming you're using that) is 3.6 volts, so 3.3 volts should be fine.

However, the Analog output is not capable of using that entire voltage range! IIRC the ADC can sample voltages up to 1.5 volts. The ADC input voltage is up to 2.5 volts.

You know the easiest way to change your current of 4-20mA into a voltage is to use a resistor.

Assuming the ADC input resistance is infinite, a current of 20mA converted to 1.5 volts is 1.5/20m = 75 ohms, the resulting voltage for 4mA will then be 4m * 75 = 0.3 volts

Assuming the ADC input resistance is infinite, a current of 20mA converted to 2.5 volts is 1.5/20m = 125 ohms, the resulting voltage for 4mA will then be 4m * 125 = 0.5 volts

Maybe i'm misreading, but I thought the MSP430 analog input range was 0 - Vcc not 0 - 2.5V?

ADC10CTL0, SREFx = 000 sets Vref+ to Vcc, and VRef- to Vss

##### Share on other sites

@@basil4j, I read it the same as you for 430G2 and the F5529 which are the two I use. Just now I set up my 430G2 with 2.93 volts on pin 2 and used Energia and analogRead to read voltage. I read Vcc to be 3.5V on my LaunchPad. When I use that and convert analogRead values I get exactly 2.93 volts from the LaunchPad as well.

##### Share on other sites

@@basil4j @@Fmilburn Ohh, you're right, I've never used the Vcc as VRef+ option, I used the internal reference, which is either 1.5V or 2.5V as on pages 38 and 535. But you're right, Vcc is an option too.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
• Blog

• #### Activity

×
• Create New...