2010-05-24 05:15 AM
4-20mA current to 0-3.3V
2011-05-17 04:52 AM
In your resister network design, allow for an ADC input impedance of 1K.
Cheers, Hal2011-05-17 04:52 AM
In addition to what Trevor said I'd set Vref+ and Vref- to cover the 4-20mA range. You may want to set those so you can detect over/under-range (e.g. 3.5mA-20.5mA)--that is Vref- to 0.56V (160 x 0.0035) and Vref+ to 3.28V (160 x 0.0205).
2011-05-17 04:52 AM
Hi,
I'd use a 160 ohm resistor instead of 250 ohm (160 is a standard E24 value) and this would give a 0 - 3.2V range for 0 - 20mA. You would not need a resistor divider. If the leakage current into the ADC pin is too great for the accuracy you require then add a buffer which will present a high impedence to the input and will drive the ADC pin with a low output impedience. A buffer + resistors + clamping diodes may be required anyway if you want to protect the STM32 from anything nasty on the current loop but only you can say if that is a requirement of your application. Regards Trevor2011-05-17 04:52 AM
Hi All,
Thanks alot for the responses! Trevor, The Buffer you are talking about shall present a high input impedance for the ADC input pins, Can that be done using LM348? Can you kindly point to me some references or designs ? Thanks alot Ravi2011-05-17 04:52 AM
Hi,
Yes a basic LM324 should do the job as there is low gain (1) so input offset error are not such an issue. Watch out for ''rail to rail'' issues (this is why I suggested a range slightly below 3.3V). Regarding reference designs you just need to google. I do not know what your exact specification / requirements are therefore I cannot point you to what you need. If you still need help I'm a consultant and can offer my services if you require. Good luck. Regards Trevor2011-05-17 04:52 AM
For information on voltage protection and rail performance, see April 29 ''Current Range To ADC In STM32F107'' post on this forum.
Cheers, Hal2011-05-17 04:52 AM
Hi,
Please find attached circuit for measuring 4-20mA current signal using STM32(100-Pin) 's ADC pin. Kindly correct me if i'm doing some mistake or suggest me if i there is a better design! Thanks alot Ravi