Analog input and 4-20mA

Hi Everyone, I have to design a new PCB for our PLC. It’s a G400-D based device and I am wondering how to design the analog section. For now we were using analog inputs with just a voltage divisor using two resistor. We also add some protection using TVS diodes and a PTC. Now we want to support 4-20mA. Do you have any recommendations? design tips? usefull schematics?

I use 4-20mA sensors all the time. Dead easy to interface to an ADC.

You just need a sense resister placed between your ADC input and GND and then this will convert the current into a voltage.

I use a 100 ohm precision resistor (use foil types as they have better temperature range but they are expensive) and this gives a 0.4 to 2.0 volt input to the ADC. My ADC is 0 to 2.048 volts so this is ideal. Choose a different resistor value depending on your needs and ADC input range.

Because the 4mA input generates a voltage you can use this to detect open circuits or sensors not fitted. For shorts, you can detect the input being much higher than 20mA.

For protection, use the Maxim MAX14626 to protect the inputs from reverse connection. A reverse on a normal input will destroy your ADC and it’s very easy for this to happen. I’ve tried a Zener on each input but this wasn’t reliable. The Maxim part makes it bullet proof.

Hope this helps to get you started.


Hello Dave,

May you have the component library for eagle? It seems there something wrong in the package land pattern documentation…

The sapce between pads being 0.94mm height size and the pads being 0.46, the distance between pads limits is 2.34mm while they mention 2.39mm in the datasheet…

Who’s wrong?

2.39 is the centre land pad dimension, not the side pads.

Sorry, I only have the library in Altium format. Brett indicated your error though.

This is not as explicit as it should be…

actually, I think it is.

It’s clear that the measurement lines for all other measurements other than the 2.39 lines, don’t touch any part of the pad/distance they’re showing. The 2.39 lines are the same, but they had to go very close to the “feet” to show the part that they’re measuring - which leads to the chance of mis-interpreting.

But 0.05mm isn’t very “different” anyway. Does anyone have experience where that’s been an issue on a physical board?

It was clear enough. It uses standard engineering drawing practices to draw the dimension lines.

I used this to create the footprint for the part and the boards are working fine and no issues from the board population house when they made them.

The 2.39 refers to the central thermal pad vertical dimension. The width is 1.6mm

What is your issue with the drawing?

@ Brett -
@ Dave -
indeed but mechanical engineer and more manufacturers of metal plastic parts won’t do the assumption that there’s an equal distance between upper pad height /bottom pad and the thermal pad.

For sure I don’t think it will be an issue but when I create a component library, I want to have something if not perfect, as better I can do.

Where there is nothing showing for the centralisation of a pad, you assume this is central. Standard practice otherwise.