Project Overview
This project is a Wenner Array, a device designed to find the resistivity of soil. It is comprised of a set of 4 equidistant electrodes, the outer two sending a small current between each other, and the inner two measuring the voltage difference between each other. This can be used to analyze the water content of soil, or to detect hidden objects under the ground. This micro Wenner Array has 13.33 mm between terminals, rather than the meters for a regular Wenner Array, but you can extend the same principles to a larger array. This Wenner Array was designed to measure up to 1 Mohm across the voltage terminals, or 84 kOhm meters. This array has 4 components:
Step-by-Step Instructions
Step 1: Create the 0.6V and 9.5V sources. Connect the 5V pin from the Arduino Uno to a voltage divider to generate a 0.6V source. Alternatively, you can set the output voltage of another pin to 0.6V. This value is chosen because it is approximately the same value as the voltage drop across a standard silicon diode. To get the 9.5V source, attach the 5V pin from the Arduino to the low terminal of your 4.5V battery. We need a voltage higher than 5V to power the op amp and transistor, since our 5V should be the maximum output voltage at our higher voltage electrode. The Arduino can read up to 5V input, and we want to use as much of that range as possible. Use the multimeters to test whether you've gotten the right voltages, connecting the black lead to ground and the red lead to whichever voltage you want to measure using banana-to-alligator-clip wires.
Step 2: Create the constant current source. There are two golden rules of op amps: there is no current into either the + or - terminals, and if there is negative feedback (that is, the - terminal is somehow connected to the output terminal), then the op amp will "try" to make the - and + terminals have the same voltage. We can use both of these rules. First, we put 240 kOhms of resistors to ground, which we will call a sense resistor. Right before the sense resistor we send a wire to the - terminal of the op amp, while the + terminal is connected to an 0.6V source. The output of the op amp goes to a transistor's base, whose emitter then goes through the soil sample to the sense resistor. Since the op amp has negative feedback (output to transistor through soil back to - terminal), it will try to make the voltage over the sense resistor 0.6V, by controlling the transistor. It will adjust the transistor to exactly 2.5 microamperes over it, since that is the amount of current flowing over the sense resistor that would produce a 0.6V drop. Notably, this is entirely separate from the soil sample, so it is a true constant current. This 2.5 microamps is relevant, since that is the current at which the higher voltage electrode will be at 5V at 100 MOhms between the terminals. On page 4 of the datasheet there is a pin diagram for the op amp: https://www.ti.com/lit/ds/symlink/lm324.pdf?ts=1700429304832&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM324%253Futm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dasc-null-null-GPN_EN-cpc-pf-google-wwe%2526utm_content%253DLM324%2526ds_k%253DLM324%2BDatasheet%2526DCM%253Dyes%2526gad_source%253D1%2526gclid%253DCjwKCAiAgeeqBhBAEiwAoDDhn59a9mKB2pXr6xTMMN7zqXNTTrlYGwNCPiOxN8cp7ChNBNtq1RtlFxoCjXcQAvD_BwE%2526gclsrc%253Daw.ds. Here, the VCC+ is connected to 9.5V, and VCC- is connected to ground. Test this to make sure that there is 0.6V across the sense resistor, and also place an arbitrary resistor between the transistor and the sense resistor: for example, a 1 MOhm resistor should return 2.5V across it.
Step 3: Configure the input electrodes. This will require some mechanical construction. First, 3d print the attached 4 electrode mini holder, using one of the shop's PLA printers. Next, place the 4 8-32 screws through the holes with a crimp lug ring in between the screw head and the holder, and tighten it in place with a nut. Finally, put a wire into the crimp lug ring, and crimp it in place with the crimper. Make sure you have an electrical connection using the multimeter. Now that your electrodes are complete, set them up to test by placing each of 3 resistors in between a pair of electrodes, as shown. I used 200 kOhm, but any resistance that's not greater than a MOhm should work. This will let you not have to test your Wenner Array in soil until you're completely sure it works. Place the two outer leads on the transistor emitter and the sense resistor, and detect the voltage at each of the inner two leads to test this step.
Step 4: Extract the voltage. Set up a pair of buffer op amps on the middle two electrodes. These use the rules of op amps to equalize the output voltage to the + terminal voltage, but without disturbing the current going through the circuit, since current doesn't go into the + or - terminals. Finally, drop the voltage by 0.6V using a diode, to compensate for the 0.6V over the sense resistor. Feed the output into your Arduino's analog inputs (A0, A1, A2...) and you're done with the physical setup.
Step 5: Output code. Use the attached program, WennerArrayProgram.ino, to get the resistance and between the middle two electrodes, or the resistivity of the material they've been stuck into. Get some clay or soil and test it out!