Page 1 of 1
Raspberry pi 4 and 4-20mA analog input
Posted: Mon Jun 08, 2020 6:18 pm
by penguin_38
Hi guys,
As a first project, I would like to measure my fuel oil tank level and read it from a webpage.
To do so, I get a 4-20 mA sensor.
I visited several websites, trying to get information about how to link a 4-20 mA sensor to a Raspberry pi.
Some people use Arduino and I didn't get enough information to success.
Does anyone can help in this first project ?
Re: Raspberry pi 4 and 4-20mA analog input
Posted: Tue Jun 09, 2020 4:17 pm
by boyoh
4 - 20 ma senses uses current loop in their operation ,Used a lot in Industrial operation sending signals to PLCs and
micro processors. An example to tell if a motor is stopped, or just idling off load , A PLC or Microprocessor will want to
know the difference. In a nut shell you want know if 4ma current flowing is indicating motor stopped or running off load.
Use the 20ma current as motor full load indication
If you use it for level indicating , you will want to know if 4ma current flowing indicates tank empty or you have reserve showing
Use the 20ma current flowing to indicate tank full.
Regards BoyOh
Re: Raspberry pi 4 and 4-20mA analog input
Posted: Wed Jun 10, 2020 6:06 pm
by ghellquist
You will need some extra hardware. The Raspberry does not have any analog inputs available. The 4-20 mA current loop can show a value from 0 to 100% (or how you want to scale the signal) and the values in between. An analog input would show that signal as a number, say from 0 to 32000 and then you scale that to between 0% to 100%, or if you preferr you could scale it to number of liters in the tank.
Best is if you can find some solution that is already prepared for this. I suggest you do a google search for, as example, "raspberry 4-20mA input" or "raspberry 4-20mA receiver".