CPDD Blog Project Development

 For this blog entry, we are going to talk about:

  1. Our chemical device

  2. How our team planned, allocated the tasks, and executed the project.

  3. Documentation of the entire design and build process our your chemical device

  4. In charge of every part of the project

  5. Documentation of individual contribution to this project

  6. Links to page of teammates’ blog

  7. Problems the team faced and how we overcome them

1. Our team Chemical Device


The chemical device that we made is the tea maker and its objective is to make tea automatically as tea brewing is a very technical skill and steeping tea has to be done very precisely. This makes it very hard to consistently make the tea and thus making it automatically done will help with the ease the tea making process and the taste.




2. Team Planning, allocation, and execution

Our team consists of 4 members: Xavier (me) as the CSO, Nick as the CEO, Kieran as the COO, Anwar as the CFO 





3. Design and Build Process
Part 1: Design and Sketching of Tea Maker (done by Nick)
Link to blog:
https://cp5070-2021-2b01-group2-nick.blogspot.com/2022/02/project-development.html

Part 2: Design of Parts in Fusion 360 (done by Kieran)
Link to blog:
https://cp5070-2021-2b01-group2-kieran.blogspot.com/2022/02/project-development.html


Part 3: Assembly of Parts (done by Anwar)
Link to blog:https://cp5070-2021-2b01-group2-anwar.blogspot.com/2022/02/project-development.html


Part 4: Wiring (done by me)
During the wiring, I had a lot of troubles with one of the parts that we were using which was the LCD panel for many reasons. The first reason was that the bread board was very small and thus it made the wiring of the LCD very hard as the LCD panel needed to use a potentiometer on top of the wiring. This made it very difficult to identify what the problems were when there was a problem and well we did have problems. The LCD panel which worked fine one week decided not to work and I had to rewire everything to try to find out what was causing the issue. This made me rewire everything an umpteen amount of times and used up a lot of time. Once we had confirmed that the wiring is not the problem, we tested the wires to see if they had problem with the 
multimeter. In the end we found out that the LCD panel was spoiled and had to change it.


Part 5: Coding (done by Nick)
Link to blog:
https://cp5070-2021-2b01-group2-nick.blogspot.com/2022/02/project-development.html



Part 6: Integration of Parts and Electronics (done by everyone)
https://www.youtube.com/watch?v=AHLaScZIrOc&ab_channel=NickTay
4. Problems and solutions
We encountered several problems during the entire process of the project.

3D Printing:
Tray to hold electrical components was printed too small
Solution: Laser cut the tray instead
Joineries for 3D printed parts were wider than expected and did not fit through the holes
Solution: Design the holes bigger to allow extra space for joineries to fit in
Arduino wiring:
The problem encountered during the arduino wiring was that we could not get our LCD panel to work despite wiring it properly although it was working fine in the week before that.
Solution: We first completely rewired the LCD panel to ensure our wiring was correct. Secondly, we had to check if the wires were working properly so we had checked it with multimeter to see if we had any spoiled wires. After confirming that those were not the case we then could assume that our LCD panel was spoiled and asked for a new one which worked fine.
Wires disconnect easily, hindering our progress
Solution: Keep wires connected together as a bunch so that they do not come undone

Assembly of parts 
Glue from gun glue was not meant to hold the acrylic pieces
Solution: Use acrylic glue
 Not enough acrylic glue applied, causing tea maker to fall apart
Solution: Reinforce the structure with more acrylic glue

Laser cutting:
The problem encountered during laser cutting was that one of parts we wanted to laser cut could not be selected and thus the colour of it could not be changed to red from black. This made us unable to cut it. This was caused by an error with the system
Solution: We had to reupload the file in order to get the system to work. 

Other Limitations and Shortcomings
It was difficult for me to place the wired electrical components into the electronics compartment all at once. This was because all the walls of the electronics compartment were glued together at a slight angle, thus putting in the breadboard and Arduino Maker-Uno board directly inside with the wiring connected was difficult.
  • Workaround: I disconnected all the wires first, placed the breadboard and Arduino Maker-Uno board inside by tilting it at an angle, then reconnected all the wires to the electrical components.
  • Possible Improvement: We could design the tea maker to be longer in terms of its breadth. This would make placing the electrical components wired to the breadboard and Arduino Maker-Uno board easier.
The stirrer length was too short, thus when the cup was fully filled with water, it was only partially submerged under the water. The partially submerged stirrer would not be able to mix the water and tea easily.
  • Workaround: I placed a small piece of acrylic under the cup, so that the cup would be more elevated, and the stirrer would be able to be fully submerged under the water.
  • Possible Improvement: The stirrer length can be increased. Alternatively, we can increase the height of the cup so that it can be filled with more water.
There was no space for us to install the LCD Display at the front of the tea maker. Without a place to put the LCD Display, our LCD Display would dangle away at the side, and potentially be disconnected due to its weight dragging the connecting wires apart.
  • Workaround: We balanced the LCD Display on top of the tea maker wall. This ensured that our wiring would not get disconnected, and our LCD Display would function as per normal.
  • Possible Improvement: We can design a separate piece to be laser cut for the LCD Display to rest on. This piece will act as a platform for the LCD Display.
Lastly, there was no space in the back for the Arduino cable to fit through to connect to the power source. Without a power source, our tea maker was unable to function.
  • Workaround: The cover piece was removed so that the Arduino cable would be able to connect to the power source.
  • Possible Improvement: We can design a small slot on the back plate for the cable to pass through, so that it can connect to a power source without having to remove the cover piece.

Lastly, some other potential improvements that we can make are including a speaker for the buzzer, so that the alarm sounds emitted by the buzzer to notify the tea’s completion can be amplified to reach its user who may be in another room. We can also code the buzzer to emit different tunes at different timings, as the code currently used only contains one sound file. This means that even though the Arduino board was programmed to buzz at different timings, the buzzer would still emit the same soundtrack at each timing, thus there is no way for the user to know if their tea has actually finished brewing, or is just past a certain timing.

5. Project Design Files as Downloadable Files
The link to download the files can be found here:  
https://a360.co/3LpEFMr
https://a360.co/34UksxH
https://a360.co/3J3J9Gk
https://a360.co/3oWIfnv
https://a360.co/3BKBJpn

Code used


//I2C bus support
#include <Wire.h>
//I2C 
#include <LiquidCrystal_I2C.h>
//OneWire bus suport
#include <OneWire.h>
//DS18B20 temperature sensor support
#include <DallasTemperature.h>
//DS18B20 sensor pin
#define ONE_WIRE_BUS 2
#include <Servo.h>
#include <pitches.h>
int buzzerpin = 8;
unsigned long timer1 = 119000; // 2 min
unsigned long timer2 = 179000; // 3 min
unsigned long timer3 = 239000; // 4 min
unsigned long timer4 = 299000; // 5 min
unsigned long TimeNow;
bool startbuzzer=false;
bool startedbuzzer=true;
bool startedbuzzer2=true;
bool startedbuzzer3=true;
bool startedbuzzer4=true;
// Setup a oneWire instance to communicate with any OneWire devices 
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
 
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0;    // variable to store the servo position
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display
// notes in the melody:
int melody [] = {
 NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5, NOTE_C5
};
// note durations: 4 = quarter note:
int noteDurations [] = {
 4, 4, 4, 4, 4, 4, 4, 4
};
void setup()
{
  lcd.init();
  lcd.backlight(); //Turns backlight on
  sensors.begin();
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  startbuzzer = true;
  // buzzer code (for loop)
}
void loop()
{  
  sensors.requestTemperatures();
  
  //Read first sensor
  float temp = sensors.getTempCByIndex(0);
  
  //Print first sensor results
  lcd.setCursor (0, 0 );
  lcd.print("T: ");
  lcd.print(temp);
  lcd.print("      ");
  // print the number of seconds since reset:
  lcd.setCursor (2, 1 );
  lcd.print(millis() / 1000);
  //Wait 0.1 sec
  delay(100);  
  for (pos = 0; pos <= 0; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(0);                       // waits 15ms for the servo to reach the position
  }
  for (pos = 0; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(0);                       // waits 15ms for the servo to reach the position
  }
  unsigned long currentTime = millis();
  if (startbuzzer){
    TimeNow = currentTime;
    startbuzzer = false;
    startedbuzzer = true;
    startedbuzzer2 = true;
  }
  if (startedbuzzer){
  if((unsigned long)(currentTime - TimeNow >= timer1)){
    buzz();
    startedbuzzer = false;
  }}
  if (startedbuzzer2){
  if((unsigned long)(currentTime - TimeNow >= timer2)){
    buzz();
    startedbuzzer2 = false;
  }}
  if (startedbuzzer3){
  if((unsigned long)(currentTime - TimeNow >= timer3)){
    buzz();
    startedbuzzer3 = false;
  }}
  if (startedbuzzer4){
  if((unsigned long)(currentTime - TimeNow >= timer4)){
    buzz();
    startedbuzzer4 = false;
  }}
}
void buzz(){
  // iterate over the notes of the melody:
  for (int thisNote = 0; thisNote < 8; thisNote++) {
   // to calculate the note duration, take one second divided by the note type.
   //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
   int noteDuration = 1000 / noteDurations[thisNote];
   tone(8, melody[thisNote], noteDuration);
   // to distinguish the notes, set a minimum time between them.
   // the note's duration + 30% seems to work well:
   int pauseBetweenNotes = noteDuration * 1.30;
   delay(pauseBetweenNotes);
   // stop the tone playing:
   noTone(8);
}
}

Comments

Popular posts from this blog

Handphone stand