arduino-libraries / Arduino_PortentaMachineControl

The official, revamped Arduino Library for the Portenta Machine Control.
Mozilla Public License 2.0
10 stars 8 forks source link

Analog Input in 4-20mA control inaccurate resistance #20

Open SteveBorensteinNOAA opened 1 month ago

SteveBorensteinNOAA commented 1 month ago

The Portenta documentation and 4-20mA example for the analog inputs specifies a 120 ohm resistance and 3.0V reference voltage, when the input is put into the 4-20mA mode. However, the design of the Portenta PCB puts the TS12A44514PWR between the resistor and the analog channel. Thus, the insertion resistance for the analog switch needs to be accounted for. In my application, I calculated this to be about 130 ohm total, but the datasheet for the switch suggests this could be higher.

Running the AI in voltage mode with an an external precision resistor is an option, however the AI is referenced to 10V - a 500 ohm resistor would be needed to take advantage of the full AI range.

image image

facchinm commented 2 weeks ago

@navalog can you take a look?

navalog commented 2 weeks ago

@SteveBorensteinNOAA TS12A44514PWR internal resistance should be taken into account to increase the accuracy of the measurements. For higher accuracy I suggest the opta + opta analog expansion A0602