hi. i wanna read the value of 4-20 ma sensor using arduino uno analog input. i did the circuit and the code in the attached pictures. but always when i turn on the arduino uno it is destroyed. kindly what is the error i did and how can i solve this pb?
when i turn on the arduino uno it is destroyed
??
Connections are correct.
If the currect source does correct 4..20mA, the UNO should be happy
Power uno before supplying power to analog pin
Please post code inline between code </> tags.
Circuit is correct. Get out your multimeter and measure the actual voltage across the resistor, it should be no more than 5V. If it is, the sensor produces >20 mA and is probably broken (or your resistor value is >250Ω).
Sounds like you may have a faulty connection to the resistor, before blasting another Arduino with 24V put a 24k or 27k resistor in series with the analog input pin, that will limit current through the ESD protection diodes to less than 1 mA.
As pointed out by others, you need 250R or 500R for 5 or 10-volts from 4-20mA - don't forget the 4-mA offset to get it scaled right. Normally, you would use a 0.1% precision resistor, but it doesn't matter here.
If you shoved in 0 - 10 volts, then that's curtains. Again, it doesn't matter here, but 4-20-mA devices have to have enough oomph (compliance) to run everything. It's quite normal for a 4-20 device to output to several measuring items (chart recorder, data-logger, telemetry system) all in series, but if the total voltage drop across all the resistors exceeds the compliance voltage, it won't work.
Yes, get the DMM out before connecting to the Arduino or anything else or you won't get a career in instrumentation.
Out of interest, what is your 4-20 device?
I would use a 51ohm resistor (E24 value), and some protection parts around it.
Then measure with 1.1volt Aref enabled in setup().
That will give you stable readings, independent of the Arduino's 5volt supply.
And over-current protection to 100mA, and more.
Just a random 4-20mA page with diagram in post#10.
That will also reduce voltdrop in the circuit (1volt instead of 5volt),
so your sensor supply can be lower.
Leo..
Are the Arduino and transducer referenced to earth ground.