robert-hh / ads1x15

Micropython driver for ADS1115 and ADS1015
90 stars 25 forks source link

Is this library compatible with the ADS1114? #5

Closed JoeCharlieH closed 5 years ago

JoeCharlieH commented 5 years ago

Hello, I'm trying to implement an transimpedance amplifier in a sensor circuit and the ADC I'll use is the ADS1114. By reading the registers page in the datasheet and by going through the hole python library, I don't know if this library may be compatible with this specific ADC. Could it be compatible or should I create a new library only for that ADC?

robert-hh commented 5 years ago

Looking at the data sheet, It should be compatible. Only the channel selection is not effective. You have to specify a channel, but it will not be used. And it is always differential A0 - A1. So if you want to use it single ended, you have to connect A1 to GND. Note: The example in readme.md is for the microypthon.org version. For the Pycom version, the instantiation of I2C is a little bit different. But that's all. The driver itself works with both MicroPython variants.

robert-hh commented 5 years ago

i added two derived classes for ADS1114 and ADS1113, removing the need to specify parameters which will be discarded. Using a ADS1115 for testing worked.

JoeCharlieH commented 5 years ago

Thank you very much, I'll be testing this as soon as I solder the components