Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] ADS1115 Driver #13559

Closed
wants to merge 19 commits into from
Closed

[WIP] ADS1115 Driver #13559

wants to merge 19 commits into from

Conversation

iyer-suchet
Copy link

Describe problem solved by this pull request
Whilst designing and implementing a power monitor module for the Pixhawk, I decided to use an ADS1115 4-channel 16-bit ADC connected via I2C. This pull request aims to add a driver for the ADS1115.

Describe your solution
I found an issue (#11755) which aimed to implement the INA226 I2C driver. I approached building the driver using the INA226.cpp as a base reference, but have since moved away from it.
I am still very early on in the driver creation, but fixing the read/write operations should speed things up:

  • There seems to be more data being read from the Configuration Register than expected. We are expecting 2 bytes of data (0xA243) but receiving 4 bytes of data, where the last byte is not acknowleged.
    reading from config reg, having sent 42A3

Additional context
Datasheet -
ADS1115.pdf

… and built to test working. Progress is at the same place as it was before this process.
@LorenzMeier
Copy link
Member

We unfortunately can’t really help in driver development when it comes to the device side. That would totally overload the team. Please ping us here when the PR is ready for review.

@iyer-suchet
Copy link
Author

Of course, thank you for acknowledging. I was hoping other people attempting to arrive at a similar solution might be able to help out.

@SalimTerryLi
Copy link
Contributor

I have already implemented such a driver for ads1115, but haven't create a pr due to the incomplete design of adc system. How about that we firstly work out the poorly designed adc part?

@dagar
Copy link
Member

dagar commented Nov 22, 2019

I have already implemented such a driver for ads1115, but haven't create a pr due to the incomplete design of adc system. How about that we firstly work out the poorly designed adc part?

@SalimTerryLi are you able to join the weekly dev call to discuss?

@SalimTerryLi
Copy link
Contributor

I have already implemented such a driver for ads1115, but haven't create a pr due to the incomplete design of adc system. How about that we firstly work out the poorly designed adc part?

@SalimTerryLi are you able to join the weekly dev call to discuss?

I' m able to join next week but with poor English speaking ability. Maybe there is some challenges for me :)

@bys1123
Copy link
Contributor

bys1123 commented Nov 25, 2019

@SalimTerryLi I'm asking Jinger to help you.

@mrpollo
Copy link
Contributor

mrpollo commented Nov 27, 2019

@SalimTerryLi please join the hardware channel on Slack and ping us (@dagar @mrpollo)

@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Mar 3, 2020
@TSC21 TSC21 requested a review from dagar April 4, 2020 17:08
@stale stale bot removed the stale label Apr 4, 2020
@stale
Copy link

stale bot commented Jul 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@dagar
Copy link
Member

dagar commented Jan 10, 2021

We have an adis1115 driver in master.

* This driver configure ADS1115 into 4 channels with gnd as baseline.
* Start each sample cycle by setting sample channel.
* PGA set to 6.144V
* SPS set to 256
* Valid output ranges from 0 to 32767 on each channel.
*/
class ADS1115 : public device::I2C, public I2CSPIDriver<ADS1115>

@dagar dagar closed this Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants