What is the best practice to create a 4-20mA input that can be feed in to microcontroller ADC pin?
What is the best practice to create a 4-20mA input that can be feed in to microcontroller ADC pin?
You need to read up on 4-20mA interfacing - lots of stuff on the web.
There are many ways to make a 4-20mA input to a micro - it's often simpler simpler to use an external ADC combined with the 4-20mA receiver.
But you want to use the ADC on your micro:
It can be done with basic op amps and passive components but I can't suggest a design with out knowing a LOT more about your application.
There are 4-20mA receiver chips like the TI RCV420 and I suggest you look at these.
Mouser have them in stock but they are not cheap (£8.20 each).
MK
This may work for you :Current to Voltage Converter Module 0/4-20mA to 0-3.3V 0-5V 0-10V Voltage Transmitter Signal Conversion Conditioning Board
A 500 ohm resistor across the 4-20mA creates a 2-10v input. 250 ohm for 1-5v input. Use code to check for a value below 1 or 2v (open).
If the signal is bipolar, 6v becomes zero, 10v full scale, 2v full scale negative.
The commons need to be tied together.
Thanks for the info michaelkellett . I will look into the details.
Thanks for the info Steve524
Thanks robogary .