Cut the traces on the potentiometer to isolate it from
the rest of the circuit board. If you’re using a Cool Touch
toaster, make the cuts as shown in Photo 2. Next, connect
two wires of a cable to the circuit trace to replace the
onboard potentiometer. These go to the analog output of
the digital potentiometer. Solder two wires of a cable to
the pads connected directly to the potentiometer.
These go to an analog input port and a ground
connection on the Arduino. I used a single four-conductor
cable, but you can also use a pair of two-conductor cables
to make the connections.
The soil moisture sensor and pump system
are shown in Figure 3. Consider
weatherproofing the connections to the soil
moisture sensor, and adding a splash proof
housing for the motor and other electronics if
you plan to mount the electronics outside.
I used a prototyping shield with screw terminals on
the Arduino Uno to facilitate testing and hookup as shown
in Figure 4. I also used a socket for the digital
potentiometer so that I can swap in a 10K or 100K
version for other projects. You can see that I used two
10K resistors instead of a single 20K resistor for the soil
moisture sensor voltage splitter circuit.
There are two major safety issues associated with
working with a toaster. The first is heat. Make certain the
wires are physically bonded to the board before you
solder, and verify that the wire insulation can take the high
temperatures. The other issue is working with 110 VAC.
Although the board on my toaster is powered by 12 VDC,
assume the leads carry 110 VAC until proven otherwise.
A partial listing of the source code for the project is
shown in Listings 1-3. As you can see in Listing 1,
standard Arduino libraries do most of the heavy lifting. For
example, the digital potentiometer (an SPI device) relies
on the SPI library. After the constants and variables and
output pins on the Arduino are identified, the Setup
44 March 2017
PHOTO 3. Soil moisture sensor and controller-pump assembly.
Feel free to substitute a pump/motor controller of your choice.
PHOTO 4. Digital potentiometer mounted on screw
terminal shield for the Arduino. The eight-pin digital
potentiometer is mounted in the center of the shield.
Digital potentiometers are mixed analog-digital
devices. The digital side communicates with a
digital microcontroller and the analog side is
essentially a three-terminal analog
potentiometer. When selecting a digital
potentiometer, consider the voltage rating,
current rating, resistance range, and the step
size. For example, a 5V device won’t do if
you’re splitting a 12 VDC signal. The current
rating for digital potentiometers is typically
well below 50 mA, so think of digital
potentiometers as relatively delicate low power
devices. Choose a resistance range and step
size to match circuit requirements.
Why Not Simply Fully
With the simple example provided in this tutorial, an
obvious question is why not simply fully automate the
second system. After all, even complex automobiles are
going fully autonomous. The point of a translational
reality interface is to provide for human monitoring and
control when full automation isn’t practical or possible.