ADS1015 I2C ADC

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
deshipu
Posts: 1385
Joined: Thu May 28, 2015 5:54 pm

ADS1015 I2C ADC

Post by deshipu » Fri Jun 10, 2016 9:30 pm

ADS1015 is a nice I2C-based analog-to-digital converter chip, with four 12-bit channels and configurable gain. Here's a driver for it: https://bitbucket.org/thesheep/micropython-ads1015/src​

joehunt588
Posts: 26
Joined: Wed Jul 27, 2016 5:06 am

Re: ADS1015 I2C ADC

Post by joehunt588 » Mon Aug 22, 2016 4:13 am

Hi deshipu thank for the code :)

may i know how to read 16bit(65536)

>>from ads1015 import*

>>ads=ADS1015(i2c)
>>ads.read(0)
>>1076

how to convert it for readable value?
i try using this equation:-
(1076*3.3)/65536
but cannot got actual value,im using ads1115 for the test. Using multimeter value is 3.2volt

User avatar
deshipu
Posts: 1385
Joined: Thu May 28, 2015 5:54 pm

Re: ADS1015 I2C ADC

Post by deshipu » Mon Aug 22, 2016 7:43 am

Not sure what you mean by "readable value". Also, you won't get a 16-bit value from this, since the ADC is only 12 bit -- so the range should be 0-4096.

joehunt588
Posts: 26
Joined: Wed Jul 27, 2016 5:06 am

Re: ADS1015 I2C ADC

Post by joehunt588 » Mon Aug 22, 2016 8:28 am

Thank you for reply
May i know how can i change it for 16bit any code i need to change for can be use,as i know ads1015 n ads1115 is same address ,

Sent from my ASUS_T00J using Tapatalk

User avatar
deshipu
Posts: 1385
Joined: Thu May 28, 2015 5:54 pm

Re: ADS1015 I2C ADC

Post by deshipu » Mon Aug 22, 2016 10:24 am

As per our conversation on IRC, that library now has a class for ADS1115, which returns 16-bit results.

joehunt588
Posts: 26
Joined: Wed Jul 27, 2016 5:06 am

Re: ADS1015 I2C ADC

Post by joehunt588 » Mon Aug 22, 2016 11:00 am

Image

Sent from my ASUS_T00J using Tapatalk

User avatar
mcauser
Posts: 491
Joined: Mon Jun 15, 2015 8:03 am

Re: ADS1015 I2C ADC

Post by mcauser » Mon Aug 22, 2016 12:40 pm

Thanks for sharing. I ordered a ADS1115 today. Good timing :)

joehunt588
Posts: 26
Joined: Wed Jul 27, 2016 5:06 am

Re: ADS1015 I2C ADC

Post by joehunt588 » Mon Aug 22, 2016 11:08 pm

Nice mcauser,

Sent from my ASUS_T00J using Tapatalk

Post Reply