Project Development

 In this page, I will:

  1. Briefly describe my team chemical device

  2. Show how the team planned, allocated the tasks, and executed the project. 

  3. Document the entire design and build process of the chemical device and include videos, pictures, and screen captures of the processes.

  4. Include “Hero shot” of every milestone of the processes, example the part A that was 3D printed, part B that was laser-cut, electronics components moved/worked according to the program. Hero-shot is taken with the person-in-charge holding/working/making the parts.

  5. Include the name of the person who was in-charge of every part of the project. 

  6. Document my individual contribution to this project.

  7. Provide the link to the page of the blog of my teammates. 

  8. Describe problems encountered and how the team solved them.

  9. Include all the project design files as downloadable files. 

  10. Embed the final prototype design file, i.e., the final fusion360 design file showing the entire prototype.

  11. Type my Learning reflection on the overall project development.


  1. Our team Chemical Device

  • In this section, I will briefly describe my team's chemical device.

  • What it is. What problems will the chemical device solve? 

  • Below is the hand sketch of the chemical device.


CHEMICAL DEVICE: 

Our team’s chemical device is an automated watering system to water plants. 


BACKGROUND:

Based on the article published in “The Straits Times”, Covid-19 has led to a botanic boom in Singapore as more people become plant parents to relieve stress while working from home. Many people think that plant parenting has been especially helpful during the circuit breaker as more people spend time at home beavering in front of their computers. Hence, planting has given them an extension of their own space into the outside world and a chance to reconnect with nature. 



Plant sellers like Terrascpaes, a nursery specialising in exotic plants, saw a 10% increase in sales. They mentioned that they sold about 1000 plants in the circuit breaker period from April to June after it started retailing its plants online. 


Now, our borders have lifted and people started to travel more frequently as compared to the pre-covid period. HOW are plant owners supposed to water the plant when they are overseas? HOW can we help plant owners from overwatering their plants? HOW can we ensure that plant owners have the time to water their plants, even during their daily busy schedules?


EXISTING SOLUTION:

Plant owners can ask their friends or relatives to look after their plants while they are overseas. However, it may be troublesome to seek help from friends to look after the plants as they might be busy, or they would not know the right amount of water to give. This may do more harm than good to the plant. 


There are many DIY self-watering kit tutorials available for plant owners to construct; however, it can be very time-consuming to build and control the amount of water flowing into the soil. Additionally, plant owners may not have the materials required to build these DIY kits. This may lead to them spending more money than what is needed in order to purchase these materials. 


OUR SOLUTION:

Our SmartPot, named Tod, will solve this issue by providing plant owners with a convenient way to keep their plants hydrated. The soil moisture sensor will sense the moisture level of the plant. If the sensor senses a low moisture level (i.e. < 15%), the sensor will send an output signal to the pump to start the pump. The pump will then be pumping the water to the soil to keep the plant hydrated.  Once the sensor senses a high moisture level (above 15%), the sensor will send an output signal to stop the pump. To let the plant owners know/observe the moisture reading, we also added an LCD screen to display the soil moisture readings to the user. 


This will ensure that plant owners will not have to worry about forgetting to water their plants, or dispensing the right amount of water to them. 


PROBLEMS THAT OUR CHEMICAL DEVICE (SmartPot) CAN SOLVE: 

Problem #1: User overwater the plant

Solution #1: Based on the current soil moisture level of the plant, SmartPot will supply water to the plant to bring the moisture level into the acceptable range. 


Problem #2: User does not have the time to water the plant

Solution #2: SmartPot’s automated watering system can last for 2 weeks. Users will only have to replenish the water tank every 2 weeks. Users will only have to worry about refilling the tank every 2 weeks. 


Problem #3: Existing solutions are impractical, expensive and time-consuming to assemble the components. Hence, reducing the reliability of the device.

Solution #3: Our SmartPot is compact, inexpensive and user-friendly. Users only have to refill the water tank and plug in the power source.


THE ISSUE WE WANT TO SOLVE:

The main issue we want to solve is to find a convenient way to keep users’ plants hydrated with little effort needed. 


PROBLEM STATEMENT:  

How can we enhance the user’s plant parenting experience so that plant owners can save time and cost?


Here’s the link to find out more about the news article: https://www.straitstimes.com/lifestyle/home-design/covid-19-has-led-to-a-botanic-boom-in-singapore-as-more-people-become-plant 


  1. Team Planning, allocation, and execution

  • In this section, I will list down my team member's name and their respective roles (CEO, CFO, COO, CSO)

  • I will show the finalized BOM (BILL OF MATERIALS) table.

  • I will show the finalized Gantt chart (planned and actual) and the tasks allocation for each team member. (to be finalised and put in by Saturday: en ting and hannah) 

Fusion team: Hannah, Justin & Keith

Coding team: Jun Hao & En Ting




  1. Design and Build Process

In this section, I will provide documentation of the design and build process.

Part 1. Using Fusion360 to finalise the CAD of SmartPot. (done by Hannah). Link it to Hannah’s blog

https://cp5070-2022-2b04-group2-hannah-to.blogspot.com/p/project-development.html 

Part 2. Design and Build of Part B (done by Justin). Link it to Justin’s blog

https://cp5070-2022-2b04-group2-justinhong.blogspot.com/p/project-development.html

Part 3. Design and Build of Part C (done by Keith). Link it to Keith’s blog

  • Documentation for task 3.

  • Hero shot for task 3.

Part 4. Programming of pump and soil moisture sensor (done by En Ting). Link it to En Ting’s blog

https://cp5070-2022-2b04-group2-yao-en-ting.blogspot.com/p/project-development.html 


Part 5. Programming of potentiometer and LCD (done by Jun Hao). Link it to Jun Hao’s blog

The first thing to do here is to find the I2C address for the LCD. We need this address to ensure that the size of the LCD is written properly in the code. This code is one that I downloaded online:

#include <Wire.h>


void setup() {

  Wire.begin();


  Serial.begin(9600);

  while (!Serial);

  Serial.println("\nI2C Scanner");

}


void loop() {

  byte error, address;

  int nDevices;


  Serial.println("Scanning...");


  nDevices = 0;

  for (address = 1; address < 127; address++ ) {

    Wire.beginTransmission(address);

    error = Wire.endTransmission();


    if (error == 0) {

      Serial.print("I2C device found at address 0x");

      if (address < 16)

        Serial.print("0");

      Serial.print(address, HEX);

      Serial.println("  !");


      nDevices++;

    }

    else if (error == 4) {

      Serial.print("Unknown error at address 0x");

      if (address < 16)

        Serial.print("0");

      Serial.println(address, HEX);

    }

  }

  if (nDevices == 0)

    Serial.println("No I2C devices found\n");

  else

    Serial.println("done\n");


  delay(5000);

}


             After I downloaded this file and used the code, I opened up the serial monitor that shows my                 I2C address. This address will be used in the codes that use an LCD in the declaration of the                 I2C of the LCD. 
            From the serial monitor above, I can tell that the addrees is 0x27, so I will be using this address             in the codes that require this LCD.


Next I made a simple code that would read the value of the potentiometer and change it to percentage inside of the serial monitor for easier reading.

int sensor_pin;

int percentValue;  


void setup()

{

  pinMode(A0, INPUT);

  Serial.begin(9600);


}



void loop()

{

 percentValue = ((sensor_pin-180)*100L/(1023-180)); //change the values of the potentiometer to percentage


 //Print these lines in the serial monitor

 Serial.print("Mositure : ");

 Serial.print(percentValue);

 Serial.println("%");


}

After this I downloaded example of the LCD code from Dr. Noel's blog, which he had pointed me towards. I added the potentiometer code to this and now it looks like this:

/* I2C LCD with Arduino example code. More info: https://www.makerguides.com */

// Include the libraries:

// LiquidCrystal_I2C.h: https://github.com/johnrickman/LiquidCrystal_I2C

#include <Wire.h> // Library for I2C communication

#include <LiquidCrystal_I2C.h> // Library for LCD

// Wiring: SDA pin is connected to A4 and SCL pin to A5.

// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)

LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // my I2C address is 0x3F and 16, 2 because the LCD I used.


#define POTENTIOMETER_PIN A0; // define the potentiometer as pin A0


void setup() {

  // Initiate the LCD:

  lcd.init();

  lcd.backlight();


  // Declare the pin of the potentiometer and the frequency of the serial monitor

  pinMode(A0, INPUT); 

  Serial.begin(9600);

}

void loop() {

  Serial.println(analogRead(POTENTIOMETER_PIN));

  delay(5000);

  lcd.setCursor(1, 0); // Set the cursor on the 2nd column and 1st row.

  lcd.print("Soil  Moisture"); // Print the string "Soil Moisture"


  lcd.setCursor(6, 1); // Set the cursor on the 7th column and 2nd row

  lcd.print(analogRead(POTENTIOMETER_PIN)); // Print the value of the potentiometer on the LCD

}

            After abit of testing and editing, we had major issues with this code not working as required.                Therefore, as will be gone more into detail in the Problems & Solutions portion of this blog, we             decided to cut the potentiometer from our prototype. 
           
            Some reasons for this is that we wanted to focus more on the more important parts of the code                like the pump and the soil moisture sensor and ensuring that it could all work together                            harmoniously.

Part 6. Integration of all parts and electronics, including the assembly of the final prototype (done by everyone)

  • Embed the finalized fusion 360 design files.

  • Documentation for integration.

  • Hero shot for integration. 


[DOCUMENTATION]

Alright! Now we are ready to assemble all the components together! 


Step 1, Glue all the acrylic pieces 

We used acrylic glue to glue the acrylic pieces together and used masking tapes to hold the pieces in place. 


Step 2, Glue all the 3D printed pieces 

Once the acrylic glue has dried out. We then used super glue to glue all the 3D printed components (hinges, handle & latch) onto the acrylic and the cover respectively. 


Step 3, Create a water tank

Previously, we wanted to laser cut our water tank but we are afraid that our water tank will be not leakproof. We also didn’t want to waste the 3D filament to print our water tank. Hence, we repurposed a plastic bottle into a water tank. We used scissors to cut the plastic bottle. 

Next, we cut a U-shaped slot for the tubes and wire so that we can cover the tank properly. 


Step 4, Combine all the codes 

We came together to combine all the separate codes for each components (soil moisture sensor, pump and LCD screen) together. 


Here’s the final code for our prototype:







Step 5, Attach the arduino kit & breadboard into our electronic box

We used duct tapes to secure the arduino kit and the breadboard to the wall of the electronic box. We also used zip ties to group the wires to make our wiring system more organised and aesthetically pleasing. Furthermore, we also added small tiny tags to label the jumper wires to reduce confusion.

[add pics]

  


Step 6, Cut holes on the tube 

First, we had to find the section of the tube which will be inside the SmartPot. Next, we decided to cut the holes such that they will be facing the plant. At first, we cut a total of 6 holes into the tube, however, through trial and error we found out that using 2 holes was enough to supply the plant with sufficient water. As such, we taped up the rest of the holes using duct tape.


Step 7, Transfer the plant into our prototype 

We used a shove to transfer the plant into our prototype. 



HERO SHOT with TOD:


  1. Problems and solutions 

In this section, I will describe the problems encountered in the design and build process and how the team solved them.


    Problems faced by the coding team (done by En Ting & Jun Hao)               

Problem

How we solved it

Problem #1: Short of components 

The pump code could not work with the existing components inside the Arduino kit. We are short of 3 components which are a 9v battery, a transistor IRF520, and a Rectifier diode IN4007. 


We needed a 9v battery as the submersible pump used, draws a larger current than the current that the Arduino output pins can supply. 


We needed an IRF520 transistor to control the pump from the low-current signals of the Arduino’s digital pins. 


We needed a diode which will be added in parallel with the pump to only allow the current to flow in one direction to protect the circuit. 

Difficulty level: Easy

We went down to Sim Lim Tower to get the IRF520 transistor. 


We got the diode from the lab and brought the 9v battery from fairprice. 

Problem #2: Used the wrong type of code

After copying and editing the soil moisture sensor code we searched online, the sensor wasn’t able to sense any values. The serial monitor was generating small tiny boxes instead of a numerical value. 


Capacitive sensor (one probe):


Soil moisture sensor (two probe):


Difficulty level: Easy

We relooked at the code and realised that the code we copied was used for a capacitive sensor which is also used to measure soil moisture but it is different from the one we got from the lab. The one that we got from the lab was called a moisture sensor module which is a simpler version than the capacitive sensor as does not require a library inside the code. 


After identifying the correct type of sensor we are using, we went to search for the code and managed to let the code work. 

Problem #3: Overheating of the module board

When we were conducting our test run, the module board (also known as the hydrometer) was overheated and started to transmit the wrong soil moisture value to the LCD screen. The sensor was supposed to sense a value of 1% but it sensed a value of 46%. 



Difficulty level: Moderate

We did a quick search and realised that we might have connected the jumper wires wrongly after we unplug the wires to assemble all the components together. 


We connected the VOC pin (module board) to the GND pin (Arduino kit) and the GND pin (module board) to the 5v pin (Arduino kit) which is wrong. This will cause the voltage regulator to overheat


Hence, we quickly unplug the USB cable, reconnect the wires and let the module board to cool for a while to bring down the temperature. 


To avoid this error, we added tags/ labels to each wire to reduce confusion and efficiency. 


Problem #4: LCD Liquidcrystal library was wrong

To use a LCD, the Arduino must have a library provide the functionality of the LCD into the code. Arduino libraries are written using C or C++. This means that for our LCD we must have a library known as “Liquidcrystal” downloaded. Fortunately, Arduino provides this library on their website. Unfortunately for us however, this library did not work as there as line of code inside of one of the C++ files that was written incorrectly. 


Difficulty level: Easy/moderate/ hard

To fix the issue of the Liquidcrystal library being wrong, we had to access the C++ file and change it manually. To do this Jun Hao downloaded Microsoft Visual Studio which is a app that allows the user to code in different languages like C#, C++ and more. After downloading this app, he manually changed the incorrect line of code, however the issue that we had during this process was that for some reason, the code would not save as the correct one. Because of this reason the code had to be delayed until we could ask someone with more knowledge. 


The person we asked was Dr. Noel, our lecturer for CPDD. He kindly helped us by downloading a new correctly made library into our computers and now with the correct library, the LCD could work

Problem #5: Potentiometer not working with LCD

Our original plan was to make the SmartPot with 2 inputs and 2 outputs. These 2 inputs would have been the soil moisture sensor and a potentiometer that users could use to select the soil moisture level of the soil ranging from 20% to 60%. However, when doing the code for this part, there were many issues with connecting the potentiometer to the LCD. The main one was that the value of the potentiometer, which was supposed to show up on the LCD,  did not update on the LCD when ever it was changed. For some reason the LCD did not detect the change in the potentiometer

Difficulty level: Hard

To fix this issue we had done a lot of research on this topic and nothing came up. We suspect the reason for this to be that we had actually crafted this portion of the code by ourselves without any references other than the knowledge of how the coding language worked. 


Due to this issue, we ultimately decided to cut this part of the SmartPot from our prototype. In the end, we decided that the SmartPot will only have 1 input and 2 outputs. Those being the soil moisture sensor, the LCD and the pump respectively.

Problems faced by the fusion/design team (done by Hannah, Justin & Keith)

Problem

How we solved it

Problem #1: Inaccurate orientation of the pipe

The orientation of the pipe in the pot did not ensure that the water will be directly dispensed onto the plant (i.e. the pipe runs along the sides of the pot, but not in the middle where the plant is). 

Difficulty level: Hard

We decided to tape the tubes together in a way such that the areas where there are holes do not touch the walls, this will ensure that the water coming from the holes does not drip down along the walls but instead goes to the plant directly.


We also made the holes facing the plant. This can be seen in the pictures below.

Problem #2: Did not consider the placement of the soil moisture sensor

The soil moisture sensor was placed at the side of the pot. This means that it will only measure the moisture level of the soil at the sides of the pot. Hence, it will not accurately measure the moisture of the soil around the plant (which is placed in the middle of the pot). 

Difficulty level: Moderate

We made a hole along the side of the electronic box which gave the soil moisture sensor a shorter route to reach the middle of the pot, due to its short wire length.

Problem #3: Did not consider the possible plant size 

The plant we received was extremely small (i.e. only ~2cm across the diameter). This meant that our pot dimensions (15cm x 15cm x 15cm) were extremely oversized

Difficulty level: Hard

We decided to change the dimensions of our pot to 15cm x 7cm x 15cm. This led to us having to redo the CAD design on Fusion360. 

Problem #4: Incorrect placement of LCD screen

Placing the LCD screen on the cover of the electronic box turned out to be troublesome as the wires that connected the Arduino to the LCD screen were not long enough. 

So, it will be a problem when opening the electronic box. Additionally, the placement of the LCD screen may not be very convenient for the user to view the moisture level from. 

Difficulty level: Moderate

We decided to place the LCD screen on the top of the electronic box, facing upwards. We felt that this was the most logical spot to place the LCD screen as the pot will usually be on the floor and it will automatically be facing the user when checking the soil moisture level.

However, it also took us some time to come to a conclusion on where to place the LCD screen as it could have interfered with the latch (our working mechanism). 

Problem #5: Estimating and deciding on how we were going to cut the holes along the pipe. 

Finding out the number of holes to cut and their placements along the tube

Difficulty level: Moderate

We first had to estimate the section of the tube that will be in the SmartPot. Next, we decided to cut 6 small holes that are facing the plant. Through trial and error, we decided that 3 holes were enough to supply the plant with water. As such, we used duct tape to cover the rest of the holes.



  1. Project Design Files as downloadable files

In this section, I will provide all the design files (Fusion360 files, .dxf files, .stl files, arduino programs files) as downloadable files. 


(upload these files in onedrive or google drive of your personal account. Each person must have these files. Always check that the links to download the files are working.)


  1. final coding file - pump + sensor + lcd

int pumpPin = 9; // declare that the pump is at pin 9

int sensor_pin = A0; // Soil Sensor input at Analog PIN A0

int output_value ; // declare output_value as a valid value


/* I2C LCD with Arduino example code. More info: https://www.makerguides.com */

// Include the libraries:

// LiquidCrystal_I2C.h: https://github.com/johnrickman/LiquidCrystal_I2C

#include <Wire.h> // Library for I2C communication

#include <LiquidCrystal_I2C.h> // Library for LCD

// Wiring: SDA pin is connected to A4 and SCL pin to A5.

// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)

LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // my I2C address is 0x3F and 16, 2 because of the LCD used.


void setup()         // put your setup code here, to run once:

  Serial.begin(9600); //set the rate of the serial port to be 9600 baud. This is to ensure that the values can be read from the serial monitor at the correct frequency

  pinMode(pumpPin, OUTPUT); // set the pump as the output

  pinMode(sensor_pin, INPUT); // set the soil moisture sensor as the input

  Serial.println("Reading From the Sensor ..."); // for better presentation of the serail monitor and what it is showing 

  delay(2000);


  // Initiate the LCD:

  lcd.init();

  lcd.backlight();


  int sensor_pin = 0; // set the value of the soil moisture sensor to be 0 at the start of the code

}


void loop()

{

 

 output_value= analogRead(sensor_pin); //set the output value to be the value taken from the sensor

 output_value = map(output_value,200,1023,100,0); //set the output value to show a percentage within the range of the sensor instead of the raw value

 Serial.print("Mositure : ");

 Serial.print(output_value);

 Serial.println("%");

 delay(5000);

 if(output_value <15){

  digitalWrite(pumpPin, HIGH); //When the soil moisture percentage is below the 15%, the pump will turn on

 }

 else

 {

  digitalWrite(pumpPin, LOW); //When the soil moisture percentage is above the 15%, the pump will turn off

 }

  delay(1000);


  lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

  lcd.print("SoilMoisture (%)"); // Print the string "Soil  Moisture (%)"


  lcd.setCursor(7, 1); // set the cursor on the 8th column and the 2nd row

  lcd.print(output_value); //Print the value of the soil moisture percentage


  delay(2000); //delay to allow the user to read the soil moisture level

  lcd.clear(); //clear the screen to avoid any bugs in the lcd display

}



Hyperlink for all the design files: https://drive.google.com/drive/folders/10VrltQO_TXpeELxPgPR7GCSvnjyK6sNl?usp=sharing 


  1. Below is my Learning Reflection on the overall Project Development.

I have learned a lot during this project and it has been an incredibly fun and thrilling journey throughout. This arduous road has had many bumps in it but we made it in the end. So, I shall start from the beginning of this long voyage.

At the start, we first had to come up with the idea for this prototype. We had to come up with the idea in class and after researching for a while, En Ting found and proposed the idea of a self-watering plant pot to us. She found a document that had some pictures and simple details on how this product worked. We had no other ideas and found this to be an interesting one, so we decided to go for it. I will now briefly go through the processes we did to produce our prototype.


First, we individually made designs for this pot and compared them to one another by using a matrix to calculate how well-designed the pot is. Personally, I felt that mine was the best, but we went with Hannah's because it seemed the most well-rounded and well-liked by all the group members.


Next, we decided what we needed to make this prototype work in terms of equipment, skills and its

attachments in terms of electronics. After this, we decided what our roles and responsibilities would be

and I was tasked with programming the SmartPot alongside En Ting, which I was glad for since I feel

that my understanding of coding language would be much more suited for this instead of my poor CAD

skills.


We also decided to make a cardboard model for this prototype just to ensure that there will be no issues

with the end product in terms of size and shape. After making "Tod" our cardboard model, we decided to

change our designs a little for the final product. I was quite happy with these decisions as we could

definitely have messed up a lot more should "Tod" not have been made.


The next part is where we actually start designing the prototype and this will lead to the final product.

En Ting and I split our part to ensure that we could focus on making the whole thing work more

efficiently. During my coding process, I learned and processed a lot of knowledge.


One of the things I learned that was probably the most difficult was how to do a little bit of C++ coding.

The reason for this was already stated previously but here I will talk about my feelings on this experience.

Due to the issues with the Liquidcrystal library, I had to consult some of my computer engineering friends

on how to fix the issue. Luckily, C++ is a language that is quite similar to Arduino, so the learning curve

was not as steep as it could have been. In the end, I was not able to do anything with this knowledge in this

project as the library would not accept my changes to the code. This makes me slightly regretful as I was

forced to learn something that would not be useful at all. However, if I view this as an experience for the

future, I would be able to use C++ as a new skill that I have, so this may have been a blessing in disguise.


The rest of the coding process was honestly quite a simple and natural process of just learning how En Ting's

code worked and implementing my own into it. Some troubleshooting was bound to occur, but nothing else

too major happened so the issues were fixed relatively quickly.


In conclusion, we finished our prototype on time and complete all that we had to do. My thoughts and

feelings on this entire project are quite positive and we completed our difficult goal with not too many

issues in the whole scheme of things.


This is the final blog of the CPDD module. The next blogs would likely be for my final year project.

I hope to see you there next time! Well, that's goodbye for now!👋👋