Pu-Hsuan Wu's profile

Smart Flower Pot

MICROPROCESSOR TERM PROJECT
Cross discipline of Computer Science and Industrial Design
January 2015. Undergraduate of CS depart., National Chiao Tung University
ABSTRACT
This is an academic work to demonstrate a possible application of microprocessor. This term project is about a self-watering pot. It can monitor soil moisture and automatically water the plant. The work can be break down into electronics, mechanics, programming, digital design, and fabrication. This work is partnered with Chiu Hsiang Hsu.
Figure 1: Rendering of Smart Flower Pot.The whole interior serves at water tank, the opening on upper left is filling hole, and upper right opening is for watering plant.
DESIGN
The idea is to have a simple design. The pot from outside is an ordinary flower pot, but all its functions are hidden inside. The entire interior holds as water storage, and with a minimum enclosure for holding circuit board. To make it easier for assembly, the pot is separated into exterior casing and interior main structure. Once all water tubes and circuit boards are correctly assembled, the two pieces can then screw together.
Figure 2: Cross section view of the design.
Figure 3: First attempt to make screw thread with 3D printing.
ELECTRONICS
As the course requirement, we have to use Intel 8051/8052 microprocessor. It is a challenge as we have no experience with wiring electronics. We looked up the datasheet and sketched a circuit diagram for this watering pot, the diagram is shown below. The interesting part is that we added an analog-digital-convertor (ADC) module for the use of  moisture sensor. Labels on the diagram are abbreviated, the "Y" means moisture sensor (as it looks like a fork). We added two 7-segment LEDs for displaying moisture value, and a few buttons for setting moisture level. Lastly, we have TA7291 for controlling motor (the water pump).
Figure 4: The circuit diagram for Smart Flower Pot. The labels are abbreviated: "Y" is moisture sensor, and "7" is 7-segment LED.
      Initially, we wire all those electronics on bread board for testing before soldering. Of course, it doesn't work for the first time. It just small glitches to correct. Nevertheless, we got a working prototype with ICE-simulator (a 8051 simulator):
Figure 5: Working prototype.
MECHANICS
To make it simple, we are very restricted in amount of space available. To achieve this, we decide to make our own water pump. Initially, we have thought to have water tank above plant, and have the water run down by gravity; however, the structure will become bulky, and it is not what we preferred. We decided to have the whole interior to store water, and to have mini water pump to pump water stream upward.
      We did a research about making a water pump, and we found a reasonable design from an article "Fun with 3D Printing: Print a Parametric Peristaltic Pump". It is using planetary gears and have planet gears squeezing fluid inside a soft tube outward; thous, created a water pump functionality. We took the design and shrink it down smaller version. 
Figure 6: Sketch of planetary gears driven water pump.
      As we have mentioned, we need to compact all the components inside a small enclosure. We planned to have two layers of logic boards that beside electronic motor and planetary water pump. The structural diagram is shown below:
Figure 7: The structural diagram for encapsulating all the components inside pot's enclosure.
Figure 8: 3D rendering for the pump.
PROGRAMMING
The functionalities are simple, however, the major problem we encountered is that 8051's data memory size is very restricted. Our code size far exceeds its limit. We, then, reach for 8052 as it has twice larger memory. During initial compile, we have our code size of 437 bytes,  we have no choice but to strip down our program. We removed 7-segment LED display and buttons controls, but obtains its essential function. That is, to monitor moisture level and automatically water the plant.
Figure 9: Screenshot of code size (bottom left highlighted in blue) with specifications of AT89 series microcontrollers (right highlighted in blue).
FABRICATION
We are lucky enough to have access to 3D printer for this project. The software we used for model is Autodesk Fusion 360, and 3D printer is Createbot (supplied by our department). Here is a quick rundown:
Figure 10: Screenshot of slicing software.
Figure 11: Printing base.
Figure 12: Product of planetary gears.
TESTING
Figure 13: First to test with wet paper tissues.
Figure 14: Then, we went for the real soil.
PRESENTATION
Let me say it first, it is not finished, not even close. We got programs right, but not mechanical parts. The major issue is that the 3D printed parts sucks water which cause water to leak. It was the night before presentation, we got our first printed interior housing and first tried to fill with water. Unexpectedly, very unexpectedly, once it is filled, slowing, small droplets drops off. Soon, we realized it's the time to stop. We can't go any further, it is very late in the night and we have no chance to print any other one. Sadly, we then prepare for our presentation.
 
Figure 15: The presentation table setup.
Figure 16: Evaluation.
METACOGNITIVE
It was an great experience to learn. It was my first attempt for trying digital design and digital fabrication, those this particular work is more specific to 3D modeling and 3D printing, but it was an unique experience to intermix different disciplines. It's also a great opportunity for extending my knowledge about microprocessor and for expending its application. Its very challenging to come up with idea, to sketch out the design, to build prototype, to work on functionalities, and to problem-solve all the obstacles throughout the whole design process.
      I wasn't very good at designing, especially the mechanical parts. I spend too much time researching about water pumps and solenoid valve. It took me many trials to make a smaller version of planetary gear-driven water pump, and none of them works. I should really ask someone from mechanical engineering background, maybe I will get a simpler solution.
       One more mistake I made is that the prototype is too small and I spend too much time in perfecting every components. Struggling to shrink down their size, and tied up their spacing and positioning. It just taking too long to plan and error-checking. In a simpler term, I wasn't good at scheduling that I wasted too much time in designing phrase and leave no time for printing phrase. To gain back time, I choose to rapidly print out a very very drafty prototype, that leaks, and that turns this work to a failure.
 
WORK CITED
Tim. "Fun with 3D Printing: Print a Parametric Peristaltic Pump." Web log post.
        Outguessing the Machine. N.p., 7 Sept. 2014. Web. 16 Mar. 2015.
Smart Flower Pot
Published:

Smart Flower Pot

This is an academic work to demonstrate a possible application of microprocessor. This term project is about a self-watering pot. It can monitor Read More

Published: