Author Topic: Help needed with Adc ADS1118  (Read 1078 times)

0 Members and 1 Guest are viewing this topic.

Offline steve41993Topic starter

  • Newbie
  • Posts: 8
  • Country: de
Help needed with Adc ADS1118
« on: April 09, 2021, 05:39:18 pm »
I try to get the ADS1118 running properly but can't get it right.
The adc is running in single shot, the sample rate is set to 16 samples per second and there is no filter on the inputs. The input voltage for this measurement is generated by a battery with a potentiometer.
This is what I've got:
1209544-0
What you can see is that the values are stable at 671 for most of the time. But some times it jumps to 702. It's jumping only between this two values and I have no clue why this happens.
What I thought about:
  • Noise on the input: not very likely because the values should be more random
  • Noise on the supply voltage / voltage reference: not very likely because the values should be more random
  • Transmission errors:  not very likely because the values should be more random
So everything which comes to my mind is unlikely because it's jumping exactly between two values.
Another interesting point is that this happens only on some voltage levels. If I measure around e.g. 1167 "ticks" than there is not a single jump at all.
I never had this behavior on any other adc before. Does someone had a similar problem or a solution / explanation for this? I'm completely lost here.
« Last Edit: April 09, 2021, 05:45:12 pm by steve41993 »
 

Offline erikj

  • Contributor
  • Posts: 23
  • Country: se
Re: Help needed with Adc ADS1118
« Reply #1 on: April 10, 2021, 04:08:13 pm »
My guess: communication issues with the ADC
I have no experience with this particular ADC, but just looking at the two values 671 and 702 in binary I get:
001010011111 (671)
001010111110 (702)
The only difference really is a missing zero.

Noisy clock signal or timing issues perhaps?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14445
  • Country: fr
Re: Help needed with Adc ADS1118
« Reply #2 on: April 10, 2021, 05:09:56 pm »
And, if it is indeed a communication error, it may just come from using the wrong SPI mode. Which is a very common issue.

As to noise, I take it you don't have a scope. That would be handy.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6185
  • Country: ro
Re: Help needed with Adc ADS1118
« Reply #3 on: April 10, 2021, 05:33:49 pm »
I've had similar issues with ADS1118, especially when used at 5V.  At 3.3V it was happening much rare, or not at all.

They are transmission error.  To be more precise, my conclusion was those were reflections in the wires, wires that act like transmission lines with unmatched impedances at their ends.  My guess was at 5V the chip was even faster, so any reflections were even more perturbing.

Ideally the impedance between the transmitter, the wire and the receiver should be adapted so they match, but in practice that might be not possible (at any impedance mismatch a signal is reflected back to where it came from, with the same or opposite sign - depending of the two impedances ratio - therefore after one or many reflections the voltage waveform of a signal is altered enough that the receiver sees a different bit than it was transmitted <- if this doesn't make any sense, read about reflections in a transmission line).

As a workaround, try adding some 10...1000 ohm resistors in series with the digital wires (at the transmitting side of each wire), and see if the communication improves.  Shorter wires might help, too.
« Last Edit: April 10, 2021, 05:49:45 pm by RoGeorge »
 

Offline steve41993Topic starter

  • Newbie
  • Posts: 8
  • Country: de
Re: Help needed with Adc ADS1118
« Reply #4 on: April 10, 2021, 05:44:32 pm »
Thanks for your suggestions. :-+
I will do the measurements tomorrow and post them here. Also I will have a look into the SPI configuration and double check.

@RoGeorge
Thanks for sharing. I will give this a try as well.
 

Offline SuzyC

  • Frequent Contributor
  • **
  • Posts: 792
Re: Help needed with Adc ADS1118
« Reply #5 on: April 10, 2021, 09:43:15 pm »
Could just be a bad spot on the pot, check the pot output voltage with a DVM.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Help needed with Adc ADS1118
« Reply #6 on: April 10, 2021, 11:13:46 pm »
I've extensively used the I2C version, with none of that behavior - so I agree it's almost certainly the SPI end of things.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: Help needed with Adc ADS1118
« Reply #7 on: April 11, 2021, 01:07:23 am »
First thing to do is get a scope and check the clock edges versus the data and then check the datasheet when the data is sampled by the microcontroller.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline steve41993Topic starter

  • Newbie
  • Posts: 8
  • Country: de
Re: Help needed with Adc ADS1118
« Reply #8 on: April 11, 2021, 03:08:02 pm »
Measurements are done. But i thinks this doesn't reveal anything.
SPI communication looks fine. The MISO line is set on the rising edge of the CLK and the MCU samples it on the falling edge.
In this case the values are toggling between 689 and 657 / 658. This is perfectly fine on the SPI.

689: SDS00001.png
657: SDS00002.png

I think there is no issue on the SPI communication part and it's directly related to the ADC itself.

During writing this I decided to change the ADC. And it seems that this fixed the issue and the part was damaged in some way.
So thanks for all your help  :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf