# UPDATED Who's up for another round of bashing/reviewing my soil moisture sensing and analysis device circuit/schematic?

## So here is the newest version of my soil moisture sensing and analysis device.

I received allot of valuable lessons from the last review and I have incorporated many of them into this design.

One question. Is 330mA more current than I will need to drive the sensors?

Have at it.

Here are the datasheets
Current Sense Amplifier
Op-Amp
Voltage Regulator

Here is a link to the previous review

• Also a beginner here, but why is the power pin of U2A connected to a capacitor and then ground? I'm assuming you just forgot to connect it to the 5V rail.
– jb0
Jan 31, 2023 at 3:29
• Also, what's the deal with those transistors and op amps in the top left?
– jb0
Jan 31, 2023 at 3:30
• There is so much stuff that should be corrected .Good luck getting it done for free. Feb 1, 2023 at 1:18
• Many of the same issues remain that were pointed out in your previous post. We don't need to know how the circuit elements work, as much as the overall theory of operation and the design specifications. That would be, essentially, the currents and voltages involved in the measurement of soil resistance, and the degree of accuracy that is to be attained. AND, all of that information should be in the body of your question, NOT in comments. Feb 1, 2023 at 4:01
• @PStechPaul Should I fall back to a 12 bit ADC? What sort of applications would require 24 bits? I did not realize that the fact that it is a switching regulator would preclude its use as a reference. Is there a sub-circuit that I can put the 5V through which will make it useable. I am going to start developing a Theory of Operation. Feb 1, 2023 at 21:23

I don't know if 330 mA is sufficient to drive the sensors. But I question how you plan to read soil resistance by measuring current, where that current is already being regulated to 330 mA. The current sensors will always read 330mA * 15 mOhms = 4.95 mV until the soil resistance exceeds the ability of the 5V source to supply this current, and that may result in an unstable situation. I think you will want to measure the voltages on the probes to GND, assuming that the applied current is properly regulated to 330 mA, and if that voltage exceeds about 4.9 volts, it can be assumed that the soil has a resistance greater than 4.9/0.33 = 15 ohms.

You may want to be able to adjust the applied current to read higher resistance. And you will need to do your own research to determine the range of resistance readings are important for your purposes, and also find out how much the applied current actually affects the soil resistance, and see if resistance changes according to the time current is applied. It may be better to use an AC current source, or at least try reverse polarity.

• My intention was to measure the difference between current available and return current. That might be bad reasoning, like thinking that a bucket of dirt world provide ground. Feb 1, 2023 at 23:52

U2 is sensing the current generated by U1 and the MOSFETs so it's not going to work.

Soil resistance is pretty high so it should be measurable with much less than 1mA, and it is preferable to use AC to avoid probe corrosion. So the simplest solution would be a RC oscillator with the soil acting as the frequency setting resistor. This can be implemented with an opamp, a comparator, or a 555. The microcontroller can measure frequency accurately, which avoids an ADC.

Per my calculations, your constant-current-calculating op amps aren't set right. I calculate 4.95 V at each IN+:

$$\frac{100}{101}\cdot5~\mathrm{V} = 4.95~\mathrm{V}$$

which means you're dropping 50 mV across the 15 mΩ current setting resistors:

$$i = \frac{V}{R} = \frac{0.05~\mathrm{V}}{0.015~\mathrm{\Omega}} = 3.3~\mathrm{A}$$

Change R5 and R7 to 150Ω to set the current to 333 mA.

(Also the VS net on U2A is not connected to the 5 V rail, as previously noted by jb0.)

• One of many things to sort out . Feb 1, 2023 at 1:19