Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Data acquisition with ADS1255

ultrab

Newbie
Joined
Jan 10, 2022
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
26
I am using the below circuit to input data from a sensor. The sensor has a buffered output and can supply enough drive current for the ADC. The sensor is also temperature sensitive and I don't need or want the temperature portion of the signal, which is obviously a very slow change throughout the day. I therefore devised the 2 RC filter design so that I only pass the difference betwen the slow temperarture section and the actual wanted signal which is much faster but at most 5Hz. That part seems to work fine.
data_problem_circuit.png


The problem seems to arise in the ADC. There is a jump in data level on a fairly regular basis (see red arrows). The below image is data taken straight from the ADC and written to file then shown on a chart. I have checked and rechecked the software and it seems fine. The same exact sofware is used on another pcb without any problems. I don't currently have an oscilloscope so can't verify if the signal enters the ADC like that or if the ADC is having zero-crossover issues when AIN1 goes above or below AIN0. Any ideas?


data_problem.png
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
5,396
Helped
1,142
Reputation
2,296
Reaction score
1,163
Trophy points
1,393
Location
California, USA
Activity points
29,505
Your circuit doesn't make sense to me. Where’s ground?

What‘s your time scale?

what is your voltage scale?

Further, if YOU don’t know if the problem is in the signal or the ADC, how do you possibly expect anyone else to know? Would you like us to guess?
 

ultrab

Newbie
Joined
Jan 10, 2022
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
26
WOW Barry, you are as rude as they get. You are a level 5 member apparantly yet can't understand a simple circuit.

Yes I forgot to indicate where ground is. Its at the bottom of C9 where most experienced people would expect it to be.

The time scale is not relevant, neither is the voltage scale. I am 99% sure its a digital problem due to the sudden and instantanious change in voltage level which is near impossible on the analogue side.

The reason I posted is because someone with experience in this field might see the graph, recognise the problem and make a suggestion as to the likely cause.

Clealy you are not that person.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
21,113
Helped
4,534
Reputation
9,080
Reaction score
4,633
Trophy points
1,393
Activity points
139,348
Hi,

I can see nothing rude. I see no personal assault.
I can only speak for myself: I regurarily get misunderstood as "rude", although I try to focus on technical issues. In a worldwide forum there are may different people, differently raised. Without saying good or bad: Some are used to get "problematic" informations in a clear, direct way, others are used to get them in a more diplomatic way.

When talking about technical issues I try to act like a computer (in opposite to my private life). To exclude circuit faults I also want the information whether a node is: floating, connected to GND, or driven externally (maybe VCC/2 like I did in a similar circuit)

*** Back to the question.

Some things can not validated because of missing informations.

You have no scope... so why don't you modify the ADC's input multiplexer to see AIN0 as single ended input...AIN1 as single ended input.

Without seeing the code we are not able to validate the timing for data sampling/reading.
I recommend
* hardware driven
* interrupt driven
... to avoid delays caused by other tasks.

There are many possible issues: I've seen problems where a floating interrupt input on one microcontroller caused timing problems (raising a lot of interrupts) while on another board (identical hardware and software) there were no interrupts raised.

We don't see schematic and PCB layout. In another thread - a couple of days ago - a member had temperature measurement errors (offset) that can be cancelled out by adding bypass capacitors.
It's not unlikely that jumps in ADC code are caused by Vref and/or Vcc. On one of my designs I had a "missing code" problem on a SAR ADC that got cancelled out by adding bypass capacitors (although good PCB layout and initial capacitor values according datasheet)

Klaus
--- Updated ---

Added:
I personally avoid "hardware solutions" when a microcontroller is involved.
In your case I'd omit the whole second channel with it's amplifier.
The benefits are:
* reduced part count, part cost assembling cost
* reduced PCB space
* reduced supply current
* reduced errors like: noise, unlinearity, offset drift, cutoff frequency accuracy/drift
* flexibility: software update instead of soldering works

The drawback is
* a couple lines of code (maybe just 3 lines)

But surely it's a kind of individual preferences..
 
Last edited:

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
49,426
Helped
14,442
Reputation
29,148
Reaction score
13,239
Trophy points
1,393
Location
Bochum, Germany
Activity points
284,427
can't verify if the signal enters the ADC like that or if the ADC is having zero-crossover issues when AIN1 goes above or below AIN0.
You are showing one signal plot. Nothing about AIN0 and AIN1 and crossover. Please provide complete information.

Also the ADC input configuration isn't clear. What are the absolute input voltage levels at AIN0 and AIN1?
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
21,113
Helped
4,534
Reputation
9,080
Reaction score
4,633
Trophy points
1,393
Activity points
139,348
Hi,

I just reviewed the data.
the "jump" rather look like a jump in time than a jump in voltage. If you want us to validate this we need full code and information about sampling (rate..), storing data (FIFO?) and the according data interface and it´s speed.
* the values are around 3.7 million with a noise of about 10,000 (13 bits?). If this is the case, then either a 12 bit ADC could do the job, or there is something wrong with the circuit.
* if you show the values for differential measurement "AIN1-AIN0" then it´s likeley that the absolute input values are beyond the allowed input voltage range (like FvM already mentioned).

Klaus
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
5,396
Helped
1,142
Reputation
2,296
Reaction score
1,163
Trophy points
1,393
Location
California, USA
Activity points
29,505
WOW Barry, you are as rude as they get. You are a level 5 member apparantly yet can't understand a simple circuit.

Yes I forgot to indicate where ground is. Its at the bottom of C9 where most experienced people would expect it to be.

The time scale is not relevant, neither is the voltage scale. I am 99% sure its a digital problem due to the sudden and instantanious change in voltage level which is near impossible on the analogue side.

The reason I posted is because someone with experience in this field might see the graph, recognise the problem and make a suggestion as to the likely cause.

Clealy you are not that person.
Nonsense.

“Most experienced people”, in fact, would not assume ground was at the bottom of C9. Most experienced people would assume you have a mistake in your circuit. Most experienced people would say you didn’t supply enough information. Most experienced people would say YOU are the rude one for blasting me for pointing out YOUR errors.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top