Author Topic: Help with ADC Converter  (Read 2310 times)

0 Members and 1 Guest are viewing this topic.

Offline Manul

  • Super Contributor
  • ***
  • Posts: 1109
  • Country: lt
Re: Help with ADC Converter
« Reply #25 on: January 26, 2024, 04:31:08 pm »
I am going to move on to differential mode now which was my intention from the start.  I guess I expected this ADC to read voltage 'out of the box' like my DMM does and wasn't understanding why the ADC was so noisy.   Maybe because the DMM's power is isolated (9v battery?)

It can work as a multimeter. It is a mere 12 bit converter, if you get high noise, certainly you are doing something wrong. Not to criticise you, but it's probably a combination of using wrong ground, plus connecting everything willy nilly on the breadboard, plus maybe some common mode currents in your signal path due to power supply or something.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14214
  • Country: de
Re: Help with ADC Converter
« Reply #26 on: January 26, 2024, 05:37:37 pm »
The ADS1015 is a 12 bit ADC only, but the picture shows a PCB with the 16 bit brother ADS1115, that would be the much better choice.
These are both SD ADCs and are thus also kind of integrating. With no large pause between the conversions they can even have an advantage when it comes to the noise BW. One may want to do some extra averaging to get closer to a full number of main cycles, if mains hun is an issue. This could reduce the noise quite a bit.

For a test it could help to record the data at a resonable high speed and check if one can see the mains hum part. The ADCs are fast enough for this. This would also give a hint on the actual speed of the units.

The purpose of analog filtering would mainly be to avoid too much hum so that it could cause clipping or reduce the available range or ADC internal gain. To avoid extra noise from the resistor and loading effect from the ADC, I would not make the resistor too large. So I would avoid more than some 100 kOhms. The main low pass filtering can come from digital filtering by averaging.
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #27 on: January 27, 2024, 07:07:37 pm »
The more I work with this the more I understand it.  I don't think I am exactly there yet.  Here is my latest schematic based on differential measurements on the ADC:

www keyboard

I am also running a software filter that takes a measurement every 20ms and averages them over a total of 66 values.  Here is the output I get.  The Y-axis is in milivolts. So that is +/- .05 mV. 



Can you all let me know what I need to change next?

 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #28 on: January 27, 2024, 07:10:42 pm »
Sorry, typo on the diagram... I do have the 16 bit ADS1115 version.
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #29 on: January 27, 2024, 07:15:15 pm »
Thanks for the reply.  I was just making a comparison between my volt meter and this ADC.  My goal is read voltage from the photodiode module say 0 to the max the ADC can handle for decent dynamic range.

I understand the breadboard is really terrible.  I am just trying to get a feel for things before I do some proper permanent connections. 
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #30 on: January 27, 2024, 07:18:58 pm »
It is obvious I am struggling with some understanding here.  I just haven't had much experience with it and I am trying my best to learn.  I have learned a lot from this thread so I want to thank everyone for that.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: Help with ADC Converter
« Reply #31 on: January 27, 2024, 07:31:31 pm »
Are you twisting your leads around each other?  This can help noise.

Also, try a 20-100 nF or so cap across the inputs.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14214
  • Country: de
Re: Help with ADC Converter
« Reply #32 on: January 27, 2024, 07:33:16 pm »
The current number show a peak to peak noise of some 0.05 mV which already looks quite good. Of cause this depends on the FS range choosen for the ADC - chances are one would use a +-2 V or maybe +-4  V range.

The photodiode part is likely rather sensitive to mains hum, either electric and optically via the modulation of light sources with 120 Hz.

For hum suppression it makes sense to average multiple readings - ideally with no extra waiting time in between, just the speed how they come in from the ADC in free running mode. It looks like the slow modes are limited by the 16 bit resoultion / quantization. So it may make sense to not use the absolute slowest mode of the ADC but better use a higher speed and average a few more readings to cover the whole time.  Before I accidentily assumed 50 Hz mains - so the target for the integration is a multiple of 20 ms as mains period, but 16.67 ms for a 60 Hz country.
It may also make sense to measure fast enough (e.g. 860SPS)  to resolve the 60 / 120 Hz, so one knows how much hum is actually there to start with. For this a smaller capacitor for the analog filter would be needed.
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #33 on: January 27, 2024, 07:49:31 pm »
I haven't done any twisting yet but actually planned on it once I get a workable circuit.  Thanks for the reply
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #34 on: January 27, 2024, 07:54:39 pm »
Good stuff.  We are 60 hz.  And I was thinking about the AC light source.  Wish it was DC but can't afford that kinda setup with.  I had thought about using a trigger and interrupt to sync the light source with ADC before I new I needed to do all this averaging.  Lots of learning going on still.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: Help with ADC Converter
« Reply #35 on: January 27, 2024, 08:51:10 pm »
I haven't done any twisting yet but actually planned on it once I get a workable circuit.  Thanks for the reply

Twisting is incredibly important. The two wires are magnetically coupled.  The more area that magnetic field covers, the more noise you will produce and receive.  The noise you produce will interfere with the ADC.

You want your lead wires touching as much as possible.  On PCBs the two traces will be next to each other and the same length. 
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #36 on: January 27, 2024, 09:06:17 pm »
I think I have my final circuit figured out.  Just throwing this out there, I can make the signal wires from the photodiode module to the ADC very short, say like 1" maybe a lil less.  Would that help?  Or short conductors along with twisting? Twisted cable with a shield?? Maybe mount the entire thing in a metal enclosure?  Just brain storming some.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14214
  • Country: de
Re: Help with ADC Converter
« Reply #37 on: January 27, 2024, 10:17:54 pm »
A short cable from the sensor helps. The signal from the sensor is anyway not that sensitive, as it is a low impedance signal. No need for shielding as the signal is not sensitive to capacitive coupling anyway. A simple shield helps litte against magnetic coupling. This needs a small area / twisting and with a short distance it should not be that bad even if not twisted.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: Help with ADC Converter
« Reply #38 on: January 28, 2024, 05:14:25 am »
If it's short then don't worry so much about twisting.  Twisting helps keep the wires close together more than anything.  (In this application at least)
 

Offline AxisCatTopic starter

  • Contributor
  • Posts: 34
  • Country: us
Re: Help with ADC Converter
« Reply #39 on: January 28, 2024, 04:31:51 pm »
Just wanted to thank all the fine folks here with helping me out.  I was able to do my first measurement run.  Basically it is a VB program that controls both my monochromator and the MCU that reads the ADC.  It steps through a range of light wavelengths and records the intensity as read by the photodiode.

 
The following users thanked this post: JustMeHere


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf