want a sample of reading a 4-20ma out

hi everybody

can someone give ma a way to find a sample that give how a AnaInmamps works, all i want is to read the out of a 4-20 ma of a sensor

I have no idea what AnaInamps is, but if it is a ADC then,

usually you either connect a low resistance value resistor (bad accuracy) and measure the voltage over it induced by the current from your sensor,

or you insert a transimpedance amplifier (good accuracy) to measure the resulting voltage.

There is a sample called adc_rd_ma.c for the BL4S100 and BLxS200 series of SBC’s. These boards have on board loop resistors that can be jumpered in on the first 4 ADC inputs. Which core/SBC are you using?

If using a core module, you will need to add a 100 ohm resistor from the ADC input to analog ground to create a current loop path. In essence, you are then reading the voltage drop of the 100 ohm resistor. You can calibrate the system to remove much of the errors due to variations in components.