BBB Data Aggregation Unit using external ADC

Hi everyone,

I am new to the world of using MCUs and am looking for some assistance on a project that I am currently working on. To sum things up quickly, I am building a data aggregation unit that can convert analog voltage readings to digital values that is to be stored on a USB or SD card. The DAU will collect 3 types of signals, a buffer signal, clipped signal, and a signal passed through a LPF. In the end, the data should be stored as either a MatLab file or .xml file. However, I am facing a few road blocks relating to my design.

1.) I need to use a 24 bit ADC for high resolution purposes based on design requirements that were just given to me as I will be collecting data from .1mV to 50V and it has to have a high sample speed rate. Has anyone connected an external ADC to the BBB? If so, what was the brand of your external ADC? How did you connect the ADC to the BBB? (It’d be greatly appreciated to be able to see a design).

2.) If you have had a similar project to this, was wondering how you went about it. Any advice would be greatly appreciated.

As I said before, all of this is very new to me. So thank you for taking the time to help me out.

Chelsea

To start with, the ADC that will meet your requirements:

http://www.ti.com/product/ads1278

This is a 24 bit ADC sampling at 144kHz.

To sample 50V, you will need a signal conditioning front end that will scale your input voltage to a level compatible with your ADC. A simple resistor divider won’t work because of the error it will introduce each time the ADC samples the data. You need an opamp based signal conditioning circuit to scale the input voltage.

The ADS1278 uses SPI for communications and that can be interfaced to the BBB without difficulty. However, you will need to write a device driver as spidev won’t be fast enough. Also, I suspect that you will want to sample continuously so a ping-pong or cyclical buffer (DMAengine terminology) will do what you want.

Regards,
John

Hi John,

Thanks for getting back to me. I was actually looking at that same ADC converter as you posted in your reply. Just looking for some clarification on a few things. What type of error would a simple resistor divider introduce into the system? I am currently using a cascaded inverting op amp system. Not really sure if this will scale the input voltage to a level that is compatible with my ADC.

The circuit diagram looks like this:
Inline image 1

Looking forward to your reply,
Chels

Hi John,

Thanks for getting back to me. I was actually looking at that same ADC converter as you posted in your reply. Just looking for some clarification on a few things. What type of error would a simple resistor divider introduce into the system?

You can calculate this from the info provided in the datasheet on page 24 and 25. The error occurs because of the sample and hold which uses a 9pF capacitor. Use T=RC to calculate the time constant. R is the impedance of you input circuit. Given the sampling time, you can calculate the measurement error.

I am currently using a cascaded inverting op amp system. Not really sure if this will scale the input voltage to a level that is compatible with my ADC.

The circuit diagram looks like this:
Inline image 1

No image visible. You have to provide a link to an image.

Regards,
John

Look at page 39 for a suitable input circuit.

Regards,
John

Hi Chelsea,

I have cc beagleboard because someone else might learn from this discussion. Looking at the link you provided, it won’t work because ADS1278 requires a differential input. Look at page 39 for circuits that will work for you.

Regards,
John

Hi John,

Just wanted to say thank you for really helping me with this. It has been a struggle for me and my team to get help from different resources at school as well as our liaisons where we are getting our design requirements from. (This is our senior engineering project.)

I am having still a little difficulty in understanding how the circuitry I shared with you may give me a single input instead of differential that the ADC requires.I attached the actual design of the system, so if you could help me understand how it won’t work it’d be much appreciated.

Also, may you tell me your background in relation to all of this? You are very knowledgeable in this area, and when I relay some of this information to my team I would like to share from whom I received this information from.

Sincerely,
Chelsea

buffer system.PNG

Also in the attachment, the parts labeled MCU will now be ADC. (Sorry about that.)

Hi Chelsea,

Here are some reference I have found helpful:

http://www.analog.com/library/analogdialogue/archives/39-05/op_amp_applications_handbook.html
http://www.analog.com/library/analogDialogue/archives/39-06/data_conversion_handbook.html

Regards,
John

Hi John,

These are very helpful links. I was wondering if there was an online document on all functions that I can code BBB in either in C, C++, python, etc.

Thanks,
Chelsea

Chelsea,

Basically, you have access to any libc library function, and any library function you care to import personally. So, for the most part. You can get a good book on Linux programming, and just follow along.

One thing I’m personally unclear on, is that if these libc headers are already installed as base, or through the build-essential package. I could probably find out, but never bothered because in order to write C / C++ code you should install that package anyway. As it installs the GNU Compiler Collection, and everything else needed to get started with C/C++ development.

Python, I could not say exactly, but I’m fairly certain it’s roughly the same. Just apt-get install

I have found these references to be the most helpful.

The Linux Programming Interface by Michael Kerrisk

Linux Kernel Development, Third Edition by Robert Love
Linux Device Drivers, 3rd Edition by Jonathan Corbet …

Regards,
John