Fluctuation in ADC

I have a problem with the connection between the voltage divider circuit and the analogue channel. My task is to connect my pH and EC sensor and get their reading from Arduino. In the beginning, I used the voltage divider circuit to step down the incoming voltage so that the voltage is acceptable to enter the analogue channel. I connect my ph and ec sensor with the voltage divider circuit by using the breadboard. It was working very well and minor fluctuation occurs. Then, I soldered the voltage divider circuit into the stripboard, a large fluctuation occurs. How can I solve the issue, or where is the root reason for this strange phenomenon?

1 Like

Hello
Post your schematic and sketch to see how we can help.

2 Likes

Also please post the datasheets (or at least article id) of your sensors. Also if you could post what signals you're getting and what you expect, would be helpful.

1 Like

yes, btw, i forgot to say, I am using Pmod ad1 instead of the normal analog pin in arduino. And connect the Pmod AD1 into the Arduino board. The voltage divider circuit is shown as follow:

The sensors detail are follow:
https://www.dfrobot.com/product-1782.html
https://www.dfrobot.com/product-1797.html

2 Likes

strip board layout

red is vcc, grey is ground, blue is data.

i think the problem is sth to do with either cable or the strip board itself. Otherwise my breadboard won't work

Hello
try a voltage divider circuit by using resistors in the range of 10 k-ohms

1 Like

Also put a small capacitor behind to voltage divider.
The chip only has one single ADC built in and just a multiplexer in front of it that switches one of the analog inputs internally to the ADC circuit. This circuit has s sample and hold (S/H) at the input which is basically a switch and a capacitor. So when you switch to the channel you want to measure, the signal is routed to the S/H where you need to charge the capacitance quickly. With a high impedance input you can't charge the capacitor fast enough and get wrong results (they depend on the charge still in the capacitor from the last measurment). So you have crosstalk between the inputs. How big this crosstalk is depends on the circuit in the MCU but also on the impedance of your external circuit. If you want accurate results, you will need to buffer your inputs (use an Opamp as voltage follower for example). But already reducing your resistor values and adding a 100n or 1u cap will improve your situation a lot (the cap will also help to filter out a bit of the random noise).

Always keep in mind, that a measurment will always influence your signal (in german:"wer misst, misst Mist", literal translation "whoever measures, measures c**p"). You'll always have measurment errors. The important thing is to know them, know how to minimize them and bring the into acceptable (known) limits.

but i really don't know why breadboard can give no or minor fluctuation? I used the same resistor and I did not insert any capacitor as well.

Ok looking into the matter.

5.6MOhm and 6.8MOhm are crazy high values

That's probably because breadboards have quite a high internal capacity. So you had an implicit capacitor installed.

@lukelouyu1029, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project :wink: See About the Installation & Troubleshooting category.

One possible cause might be the difference in wiring; and now it picks up noise from the ebvironment.