Request for AD7367 Library for Arduino

I am currently working on a project that involves interfacing the AD7367 (a precision analog-to-digital converter) with my Arduino. While I have found libraries for other ADCs like the ADS1115, I am unable to find a dedicated library for the AD7367.

Can anyone help me with a library or any example code for using the AD7367. with Arduino? Any guidance or suggestions on how to integrate this ADC with an Arduino would be greatly appreciated!

You are right, there are no libraries for that ADC. You will have to write your own.

1 Like

From a quick look at the data sheet it seems to be a simple serial clocked interface with a few control lines to start the conversion and determine when it completes. The configuration is by digital inputs which could be set by digital outputs from the controller or tied high or low if you don't need to change it during operation.

It looks like the dual power supply and analog input signal conditioning would be the more challenging parts.

Link to datasheet?

In case the OP has problems

1 Like

mmm, different interface than I have seen before, don't know any (partly) compatible one.

As @oldcurmudgeon states serial in (data / clock / chip select(CS) => looks like SPI )

Here's what I do for a similar device.

//
// Read 12 bits from ADS7818
//
uint16_t readAdc()
{
  PORTD &= ~(1 << ADC_CS);
  uint16_t val = SPI.transfer16(0);
  val = (val >> 2) & 0xFFF;
  PORTD |= (1 << ADC_CS);
  return val; 
}

Replace the PORTD stuff with enabling/disabling the CS pin. Not guaranteed to work, but should point you in the right direction.

[edit]
On taking a closer look at the datasheet, you need to do more than that. So the above might not be so helpful afterall.

any one work with this adc (AD7367)
with arduino?

@adith_187

I could write one as sponsored project on short term. Expect it will take between 10-15 hours of work. You should do the testing as you have the hardware. The project will be released under MIT license on GitHub, were all my libraries (good, bad and ugly) resides.

If interested send a PM.


Created a placeholder - GitHub - RobTillaart/AD7367: Arduino library for the AD7367, 2 channel simultaneous sampling ADC
So I might work on it someday in the future (my backlog for new libs is > 50)

1 Like

Created a todo/ readme.md - GitHub - RobTillaart/AD7367 at develop
to hold current ideas.

i will check and let you know

@adith_187

Added default build-CI code in develop branch.

how to get it?

What do you want to get?

I've not put much effort in it, did not receive any PM so I assumed you are not interested.

Thank you for the offer. Could you confirm whether this sponsorship includes financial compensation or if it is strictly a contribution to the open-source project under the MIT license?

Sponsoring is a free donation, so no money back if it does not fit your needs.

But if you say you will sponsor me afterwards if the library meet your needs is OK too.
I can start today to have the library implemented.
You have the hardware so you provide feedback if it works or how it fails.
Normally in a few iterations (takes typically several days) the library should work and be stable.

Thank you for the offer and for being willing to work on this. Unfortunately, I’m unable to provide financial sponsorship at this time. However, I’m happy to collaborate by testing the library on my hardware and providing detailed feedback to help refine and stabilize it. Currently, I also need to build the PCB for the ADC, which I plan to use as part of this project.

If you’re still interested in proceeding under these terms, I’d be glad to work together and contribute to the open-source development process. Let me know how you’d like to move forward!

OK, I will have a look today to see how far I can come.

So you cannot test now, let me know (on GitHub) when you are able to test.
When do you expect to have your PCB ready?

Okay, I’ll focus on building the PCB for the ADC over the next two days. Once the library is ready, please let me know, and I’ll test it as soon as my hardware is complete. I really appreciate your efforts and am looking forward to trying it out!"

Updated the readme.md with asynchronous interface.
writing the minimal .h version now