🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Help with AIN4-20mA units

    Modules
    2
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      davidrhysthomas
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • C
        Cognitive5525
        last edited by Cognitive5525

        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

        1 Reply Last reply Reply Quote 0
        • D
          davidrhysthomas
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • D
            davidrhysthomas
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post