Help with AIN4-20mA units



  • Hello
    I have two single channel AIN4-20ma units for a logging project. I am struggling to get them to work due to a combination of poor knowledge and documentation. I have the units connected to an ESP32 and I can see and read data from them but i do not know how to connect the 4-20ma signals. I have set the jumper to external 24V supply and have connected 24v to GND and 24V I only have a 4-20Ma tester and DFrobot 4-20Ma DAC all my attempts to connect these to the AIN4 give only a zero
    I am sure it is me can anybody help with a simple circiut diagram for me to test
    Couple of things i am running the module on 3.3V is that ok? and for the single channel unit the channel to use will be 0?
    Thanks in advance



  • This one?
    https://shop.m5stack.com/products/ain4-20ma-unit

    and you mean "external" as like so?
    0_1712315167054_65b7fad8-2387-436a-aa60-60298ce0f511-image.png

    Then you should not use the 24V and GND only IN+ and IN- like so and wtih your Transmitter/tester in "passive" mode (may need to read the manual of you tester):
    0_1712315949699_0d95eb03-883d-4a25-8939-e5d088f99477-image.png

    if your transmitter/tester is "active" then you should connect like this - i.e. no need for a separate power supply:
    0_1712315719161_2910772c-2f18-4d9d-a9eb-d15f487fb03b-image.png



  • Thank you very much i begin to see how to coonect the modules connecting in active mode seems to work with the tester
    Thanks again



  • Further to my post. I have two modules working on an ESp32 but i need to get them working on a ESP8266. I know the libraries have been written with ESP32 in mind
    I have got the code to compile for ESp8266 but when loaded it return only 255 or 65535 for the ADC values or i2c address
    Can anyone advise on what changes to make to the libraries
    Thanks