Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

4-20 mA using pic 16f72

Status
Not open for further replies.
I thought from your #17 post that you were using some special hardware to derive a voltage from your 4 to 20mA current. But you are just using a 470ohm resistor. Why that value? If you use a 122ohm (122.55oahms to be exact) as I said before, you will get a count of 125 for 20mA and a count of 25 for 4mA. All you then need to do is subtract 25 from the measured D/A value to get the scale of 0 to 100 that you want. You should check that the value is 25 or higher before you subtract, otherwise the register will 'roll under' to give you a value of something just less than 255.
 

Hi pebe,

Thats the task i have been given with a fixed hardware, thts why i can't change it.

Thanking you.
 

Then the only thing I can suggest is that you get the A/D values for 4mA and 20mA and make a look-up table that gives 0 and 100 for those values, and interpolate for all values in between.

I believe you can also do the calculations in software using floating point math, but I have never done it.
 

Hi pebe,

Yes you are right. I think i have to derive certain formula. Because sometimes scale may change from 0-100 or 0-200 or 0-1000 anything like that.

Thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top