Professional Documents
Culture Documents
ME 507-03
Mechanical Control System Design
Josh Castle
Kylie Fernandez
1. Introduction
The goal of our Plantiful Care project is to create an automated plant care device for small indoor potted
plants. The device uses several sensors to provide information about the plant’s current environment to a
program that actuates physical changes to the given environment. Although there are a variety of
variables in a plant’s environment that can alter its health, our team decided to focus on two basic needs,
water and sunlight. As a result of these more narrowed considerations, the overall automated system can
be divided into two more basic subsystems. The first of these is the water subsystem, which reacts to the
measured soil moisture and responds according to the programmed specifications. The second of these
subsystems is the sunlight subsystem, which measures the amount of light being received by the plant and
reacts accordingly.
In order for the water subsystem to be successful, a moisture sensor is needed to signal to the system
when and how much water is needed. A water storage tank is necessary to store the water. A valve and
piping system is needed to deliver the water to the plant, and a flowmeter is needed to measure how much
water is being delivered to the plant.
For the sunlight subsystem to be successful, a light sensor is needed to measure how much sunlight is
being received by the plant. A shade is needed to block the plant from the sun with a motor to actuate the
covering and uncovering of the plant. Additionally, an encoder is necessary to provide the system with
feedback regarding the location of the shade in reference to the plant.
The ideal customers for a Plantiful Care device are people who own a small indoor plant and are looking
for a simple way to ensure that it receives the proper care. A well-rounded design considers a range of
potential customer operations, from an individual who merely wants to keep their plants alive despite
being forgetful to a more advanced case where a user wants to deliver specific amounts of water and
sunlight throughout the day and knows the proper care that will result in optimum plant growth.
Three things are needed for optimal use and are assumed present in the system:
1. The owner is able to refill the water tank at somewhat regular intervals.
2. The plant has access to a theoretically unlimited light source, whether that be sun from a nearby
window or a type of plant growth lamp.
3. The system is located near a standard power outlet.
Ultimately, the Plantiful Care automated system benefits a variety of potential users but requires some
user-provided environmental attributes to function appropriately.
2. Specifications
In order to quantify a successful design, certain target parameters are specified. These specifications, their
target values, and units where appropriate are tabulated in Table 1. Regarding the water subsystem,
specifications include the size of the water storage tank and moisture sensor style. In addition, the motor
and valve voltage, photocell sensitivity, and microcontroller features are specified.
Table 1. Project design specifications.
Specification Target
The final design meets each of these specifications. The storage tank holds 52 ounces of water and the
moisture sensor is capacitive. The DC motor takes 6 volts and the valve can take anywhere from 6 to 12
volts. We decided to supply them both with 9 volts and saturate the motor duty cycle at 67% to avoid
overheating. The light sensor responds to light between 400 and 600 nm wavelengths. The selected
microcontroller accepts the minimum number of inputs and has the necessary PWM outputs. Further, it is
capable of controlling an extra LED for debugging.
3. Design Development
Before the selection of components, two versions of the Plantiful Care design were developed. The first is
a longer, more horizontal design with a footprint suited for a planter box. The shade structure consists of
two motors that move a shade over top of the plant while keeping the shade level. Water is stored behind
the planter box. An initial sketch of the horizontal design is shown in Figure 1.
IC Header
Electrical connections between the sensors, actuators, and PCB are all made through header pins and
wires. The board is powered by a 9V DC barrel jack that is connected to a wall power supply. The 9V
power is needed to supply the motor driver IC, and a linear regulator is used to reduce the voltage to 5V,
the microcontroller logic level. Programming the microcontroller flash memory is done by connecting the
AVR pocket programmer to the 6-pin male AVR ISP header on the board. Serial communication with a
computer terminal is accomplished with a USB to UART interface chip. The fully connected and
mounted PCB is shown in Figure 8.
4. Results
After testing the sensors and actuators, constructing the physical system, and assembling the printed
circuit board, we attempt to download and run our main program. This is with the intention of debugging
and optimizing the device through physical testing. We are confident about how to operate the sensors
and actuators due to preliminary testing with an Arduino Uno and sensor breakout boards. However, the
main program assesses how well the components work together. Unfortunately, there are functional issues
with actuation of the physical system.
Troubleshooting the DC motor and valve operation led to discovering that the motor driver is not
outputting signal. We began testing each of the motor driver connections. The input pins receiving PWM
from the microcontroller are checked with an oscilloscope and found to have the appropriate square wave
signal. Power input to the motor driver is measured at the appropriate 9 volts, and the enable pin is
correctly pulled high. The problem is assumed to be one of two things: a faulty chip or faulty board traces.
After visual inspection of the PCB, we first attempt to add solder to the power input pin and create a more
desirable connection. This does not solve the issue. Next, we remove the motor driver entirely and replace
it with an extra DRV8833 chip. The replacement chip does not output signal to the actuators either,
leading us to believe that the board traces are the culprit.
In order to demonstrate sensor functionality without use of the motor and valve, a short program is written
that prints light and moisture readings. Also, when the moisture sensor detects a measurement greater than
900, represented by touching the sensor with fingers, the system responds by turning on an LED. It is
unfortunate that this is the best Plantiful Care could perform during the project demos, but there was not
enough time to use the motor driver breakout board as demonstration due to the PWM pins not having
headers.
The aspects of the project that made it successful are the microcontroller selection and PCB stencil. By
using the microcontroller present on an Arduino Uno board, we are able to write and use code that
includes the Arduino library. This greatly simplifies the process of creating software. It is also easier to
get FreeRTOS working because we can use the Arduino version. The printed circuit board itself is quick
to assemble thanks to applying solder paste over a stencil. We highly recommend ordering from JLCPCB
for affordability and timeliness.
If we were to make improvements for future iterations of Plantiful Care, more accurate sensors would be
an upgrade. Using a folding hand fan style shade to make the structure more compact could increase
modularity. Lastly, the PCB should have been designed with more headers to make debugging and
troubleshooting a lot quicker and easier. Overall, the project was fun and creative. We learned how to use
Eagle, Eclipse, and C++ to operate a variety of sensors and actuators in a short amount of time.
Appendices
Appendix A - Eagle PCB Schematics
Appendix B - Eagle PCB Layout
Appendix C - Doxygen Documentation