Jump to content
Jake

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×