Sampling a potentiometer with an ADC
David Betz
Posts: 14,516
I'm working with the ESP8266 chip that is on the Parallax WX wifi module and I'm trying to connect an external ADS1115 chip to read an analog potentiometer. Unfortunately, the signal from the ADC is very noisy. I did a web search and found that this sort of problem can be caused by the radio on the ESP8266 drawing too much power from the power supply and generating noise on either the internal ADC or an external ADC chip. Can anyone point me to a good power supply design for the ESP8266 that will solve the ADC noise problems. I tried connecting a big 1000uF capacitor across the power supply and that helped but didn't completely fix the problem.
Also, how good are the software ADCs for the Propeller 1? I don't really need a lot of resolution to read a pot. Might that be a better choice than the ADS1115? It, of course, could be used for a lot more than just reading a pot!
Also, how good are the software ADCs for the Propeller 1? I don't really need a lot of resolution to read a pot. Might that be a better choice than the ADS1115? It, of course, could be used for a lot more than just reading a pot!
Comments
I have used an MCP3202 with great success that I used with the Gimbal sold by Parallax.
That's what I used for the Plug and Play demo.
Mike
The ESP8266 on the other hand has a higher draw due to the 2.7 mhz WiFi connection that it has to maintain to operate. I would think that the ADS1115 would have some smoothing of the power on it's input unless your having interference from the transmitter on the ESP8266.
Mike
In my setup the ESP8266 is using the 3.3v supply while the MCP3202 is using a 5v supply.
Mike
Mike
Mike
Mike
Mike
Shawn
I've had trouble reading 10K pots directly with ADC chips. Adding an op amp buffer really helps.
I know I was told the same thing by someone on the forum and adding the buffer cured the troubles I was having.
Due to its specs, perhaps TI's OPA388 (singles; OPAx388 is the general nomenclature, spanning up to quad devices/package) can be a good choice for a try, speccialy in such a low voltage application.
As for the price, it starts from US 2.54 (single units, @Digikey), but can come down easily to near a buck (in 1000s, @Digikey, or even lower, directly from TI), depending on package selection.
Both good points. High impedance sources may not provide enough current to fully charge the ADC input capacitance, so a suitable op amp may be needed to take care of that.
It's pretty much the easiest OpAmp circuit there is. No resistors needed in this circuit.
The output from the OpAmp goes to both the ADC input AND the negative feedback on the OpAmp.
I signal you want to buffer connects with the positive feedback pin.
Here's part of a schematic for a quad buffer.
I hope others will correct me if there's a better way.
Edit: To be clear, the schematic shows four buffer circuits. You only need one OpAmp if you only have one signal.
The capacitor solution mentioned in this thread can sometimes work but there are a few caveats which make the OpAmp buffer a more reliable solution (based on what I've learned so far).
I looked for the thread where all this was discussed without any luck.
https://ti.com/product/OPA325
At its datasheet, there is enough information at the application section, in order to drive you safely, towards getting the results you want.
Hope it helps
I've been using the ADS1115.
You'll also need to configure PGA's FSR to +-4.096V, in order to get a proper range.
Since the common-mode input impedance of the amplifier is way high (6MOmh, typical) at both the +-4.096V and +-2.048V ranges, you can also craft a suitable resistive divider, in order to attain a total excursion near 2.2V 2.0V (easy with commonly available resistor values), and set PGA's FSR to +-2.048V, in order to max resolution.
By properly selecting divider's resistors values (and percent tolerance; precision ones are better), you can get even closer to 2.048V, and enjoy ADC's maximum resolution, but then you will be depending on voltage regulator's precision.
There will be ever some trade-offs to consider.
I'm just wondering how to apply it to you exact problem, without having to resort to any external op amp, since reading thru TI's forum posts and comparing the stated solution to available information at the datasheet, still shows that programming the internal PGA will not be enough to get rid of ADS1115's sensibility to more than ~1kOmh of input inpedance.
Unless the potentiometer you'd selected has indeed a low resistance, IMHO you'll still need to select a suitable low noise, rail-to-rail operational amplifier, with all its surruounding bells and whistles, in order to get the samplings.
https://e2e.ti.com/support/data-converters/f/73/t/696357?ADS1115-voltage-divider-measurement
I don't know enough about opamps to know which one is a good choice for this application.
You're probably safe to use one of the ones suggested by Yanomani.
Here's a dual OPA2388 opamp in a SOIC package on Mouser (an early recommendation by Yanomani).
Here's a link to a OPA325 Yanomani also recommended.
I case anyone wasn't sure what Yanomani meant by
You substitute "x" with the number of channels. The chip I linked earlier is OPA2388 and has two opamps in the chip. An OPA4388 has four opamps per chip. The single opamp chip of this type is the OPA388.
Just as the OPAx388 may have different numbers of channels, the OPAx325 uses the same sort of naming convention. Here's a four channel OPA4325.
I don't think I've used any of the chips listed above myself but I don't have any reason to think they wouldn't work well for this application. I've used the OPA4317 chip before but I didn't design the circuit in which it was used and I don't know why that particular opamp had been selected.