CPDD Blog Project Development
For this blog entry, we are going to talk about:
Our chemical device
How our team planned, allocated the tasks, and executed the project.
Documentation of the entire design and build process our your chemical device
In charge of every part of the project
Documentation of individual contribution to this project
Links to page of teammates’ blog
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
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:
We encountered several problems during the entire process of the project.
Assembly of parts
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.
- 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.
- 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.
- 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
Code used
#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
Post a Comment