Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteris

How to convert a 4-20mA to 0-10V signal for Analog inputs

Program Arduino analog inputs


What is a 4-20mA Signal?

Why is 4-20mA standard?

A 4-20mA signal is an analog signal which if it is connected to an Arduino board or an Arduino based PLC identifies the value from the sensor. The controller receive a current from the sensor which allows the PLC to transform that electrical signal to an understandable value. ready for being used on the software code. This value is used for the programmer to know the right units of measure received from that sensor and to understand the situation on the Industrial project developed.

4-20mA is mainly used for long-distance cables because the current signal receives less interference from noise or EMC issues than a voltage signal such as 0-10Vdc analog inputs.

Arduino is not able to receive a current analog signal because the analog signals from Arduino work from 0 to 5Vdc so it is necessary to transform the current analog signal to a Voltage. It is important to know that Industry voltage analog signal standards work from 0 to 10Vdc so the way to transform a 4-20mA to Arduino is quite different as transformed for Arduino based PLC which works at 0-10Vdc.

Arduino Industrial application for Analog Signals:

It is necessary to convert a 4-20mA to a 0-10Vdc signal. As you can see in the below diagram. You can understand how to transform a 4-20mA to 0-10v using Ohm Law. 

The product families Ardbox Analog and Ethernet PLC have some analog /digital configurable inputsignals.

To do this it is necessary to connect an impedance of 500Ohm between the analog 4-20mA signal and the ground signal as shown in the diagram. If you do, the analog value will change from current to Voltage.

How you can program 4-20mA on Arduino devices?

Odoo - Sample 1 for three columns

You can use Arduino based PLCs

Arduino as a single board is not able to be used on Industrial environments for that reason Industrial Shields has developed an Industrial Shield for Arduino which include an original Arduino board inside and it is fully compatible for Industrial Standards.

Odoo - Sample 2 for three columns

4-20ma to 0-10V converter

Through the Ohm Law it is easy to understand how to transform a 4-20mA to 0-10Vdc through a 500Ohm resistance. If you need to test it using an Arduino Uno, Arduino Mega or Arduino Leonardo Boards you must replace the 500Ohms to 250Ohms for transform 4-20mA to 0-5Vdc.

Odoo - Sample 3 for three columns

Arduino IDE

If you want to test it easyli you can use the Arduino IDE using the example "analog Input" which allow the user read the 10bits analog inputs from the Arduino to 0 - 1023 values.

If you have not used Arduino IDE before you can also join the course.


Ethernet or 20 I/Os PLC:

Ethernet PLC20 I/Os PLC

Industrial Shields Boards:

How to install the Industrial Shields Boards

How does the input value change to Arduino?

When you have a signal of 4-20mA for 10bits you get the following data:

4-20mA signal

10 bits


0 value


1023 value

but, if you convert this signal to 0-10Vdc, the results are:


0-10Vdc10 bits

204 value* (aproximately)


1023 value

(*) As you can see the result of 4mA (2Vdc), it is close to 204. Below is the linear graph where the results come from:

It has a process to be automated. Contact Industrial Shields to implement the complete solution or if you need more information.

Do you want more information?

Open Source technology allows you to develop your installations.

Just fill the form and we will contact you as soon as we can.