Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

using ADS1115

RodneyC
2016-09-18
2019-05-18
  • RodneyC - 2016-09-18

    I'm wanting to use an ADS1115 16 bit ADC on my project. If anyone else using these? I find the MCP3008 lacking for my needs. I'm having a hard time finding a reasonably detailed writeup on creating a device library from scratch, or even modifying existing device files to create new libraries. I could even use a prebuilt library so I could learn from that.

     
  • alesles - 2016-09-21

    I have written the library a while ago. The library is not fully tested, but it worked for me. You will find the library, device description file and an example inside the archive.

    ADS1115.zip [252.22 KiB]

     
  • RodneyC - 2016-10-22

    alesles hat geschrieben:
    I have written the library a while ago. The library is not fully tested, but it worked for me. You will find the library, device description file and an example inside the archive.

    Hello,

    I've finally made time to tinker with this.

    The ADC is being powered from 5V and my single ended input (potentiometer) is referenced to the same 5v. PGA is set to FSR_6144mV. (2/3)

    With the input held ad VDD, I'm still only getting 4700 max reading. Same with all inputs.

    Any help you could give would be appreciated greatly.

     
  • RodneyC - 2016-10-22

    It looks like a found where the issue was coming from.

    It seems your library has the raw data being converted to a max reading based on the PGA setting. So, FSR_6144mV means that it will only output a max data reading of 6144. For my purposes I need resolution, so I changed all those type presets to 16383. Now I'm reading close to 12600 max reading, which is about right, since I'm still set to 2/3 gain, or +/-6144mV full-scale.

    It would be nice to trade this PGA for an external reference input.

     
  • StefanH90 - 2019-05-18

    alesles hat geschrieben:
    I have written the library a while ago. The library is not fully tested, but it worked for me. You will find the library, device description file and an example inside the archive.

    Hi, i have Downloaded your Library, and i installed it in my program, but i get no Values from it. Maybe you can explain Step by Step how to setup your library and do it working in my program.

     

Log in to post a comment.