Welcome back everybody to my final blog! For this blog I will be documenting my group's semester long journey in creating a chemical product. My group consists of Brice, Devin, Yuhan and myself! Our group will be creating a door handle steriliser.
1) Our team's Chemical Device
Chemical Device: Door handle steriliser
Project Background:
Door handles are a significant culprit in the spreading of viruses and bacteria. This is because everyone must touch them to open the door, and they rarely get cleaned since they do not
look dirty to the naked eye. Also, most door handles are made of stainless steel, which is a
perfect material for bacteria to cultivate on. Some examples of viruses that can spread are
the coronavirus (COVID-19), norovirus, hand foot and mouth disease, and influenza.
To emphasise, ever since COVID-19 started, the need for sterilisation tools/equipment/media to minimise its spread has increased. One of the commonly touched
areas that requires specific sterilisation equipment is door handles. Disinfecting and
sterilising are types of decontamination, a process that makes something safe to touch. The
purpose is to kill enough germs so the risk of infection, in this case COVID-19, is extremely
low.
Hence, we would like to propose a product that can solve this problem: an automatic door
handle steriliser
Issues to be solved:
A door handle that can self-sterilise itself and is able to kill germs such as COVID-19 to minimise spread of the said germs.
Below are the hand sketches of our chemical device as it evolves across the semester:
Allocation of roles:
Ji Hinn - Chief Security Officer (CSO)
Devin - Chief Executive Officer (CEO)
Yu Han - Chief Financial Officer (CFO)
Brice - Chief Operating Officer (COO)
Finalized BOM (Bill Of Materials):
Ji Hinn - Arduino Programming
Brice - Computer Aided Design (CAD)
Devin - Laser Cutting
Yu Han - Prototyping and Device assembly
3) Design and Build Process
Part 1: Programming of the Ultrasonic sensor, warning buzzer and LED light (done by me! Ji Hinn)
Below are all the codes needed for the program to run:
#include "pitches.h"
const int trigPin = 9;
const int echoPin = 10;
int LED = 13; // connect LED to PIN 13 (UV light)
long duration;
int distance;
// notes in the melody:
int melody[] = {
NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4
};
// note durations: 4 = quarter note,
int noteDurations[] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(LED, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
digitalWrite(LED, LOW); //turns off UV light
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Reads the echoPin, returns the sound wave travel time in microseconds
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
// if distance greater than 30 cm (no one nearby)
if (distance > 30) {
digitalWrite(LED, LOW); //turns off UV light
}
else {
while (distance < 30) {
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
}
delay(5000);
digitalWrite(LED, HIGH); // turns on UV light
for (int thisNote = 0; thisNote < 8; thisNote++) {
// to calculate the note duration, take one second divided by the note type.
//e.g. quarter note = 2000 / 4, eighth note = 2000/8, etc.
int noteDuration = 2000 / 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);
}
digitalWrite(LED, LOW); // turns off UV light
// stop the tone playing:
noTone(8);
}
}
For the creation of the code I wanted to program the ultrasonic sensor as it is our way of detecting the usage of the door handle.
const int trigPin = 9;
const int echoPin = 10;
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600); // Starts the serial communication
}
Above is the initial set up code for the ultrasonic sensor. It starts by assigning the trigPin and echoPin to pins 9 and 10 respectively and creating the variables 'duration' and 'distance'.
Afterwards the void setup() is used to start up the serial communication and allow trigPin to output the sound waves and the echoPin to receive the soundwaves outputted by trigPin.
I then created the bulk of the code which will actually allow the program to run as seen below:
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
// if distance greater than 30 cm (no one nearby)
if (distance > 30) {
}
else {
while (distance < 30) {
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
}
For the below part of the code, the void loop() allows the trigPin and echoPin to continously send out and receive the sound wave:
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
Afterwards I created a way to allow the arduino board to calculate the distance the sound wave travelled as shown below:
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
Serial.print("Distance: ");
Serial.println(distance);
With the distance calculated, I then created an if-else loop which will do different action depended on if the distance travelled is more than 30 cm:
if (distance > 30) {
}
else {
while (distance < 30) {
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
}
Inside the else loop I created a while statement which will continuously check that the distance is under 30 cm, this ensures that the code will not exit out the while statement until the distance detected by the ultrasonic sensor is above 30 cm aka when the door handle is no longer touched.
With the ultrasonic code done, I then proceeded to program the LED light.
int LED = 13; // connect LED to PIN 13 (UV light)
void setup() {
pinMode(LED, OUTPUT);
}
Above is the code used to set up the LED light. 'int LED = 13' allocates the LED to pin 13
while void setup() is used to set pin 13 as OUTPUT to display the light.
I then implemented the LED light into the void loop() code with the ultrasonic sensor.
void loop() {
digitalWrite(LED, LOW); //turns off UV light
if (distance > 30) {
digitalWrite(LED, LOW); //turns off UV light
}
else {
while (distance < 30) {
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
}
delay(5000);
digitalWrite(LED, HIGH); // turns on UV light
}
digitalWrite(LED, LOW); // turns off UV light
}
I started by ensuring the LED light will always be off at the start up of the program using the code 'digitalWrite(LED, LOW);'.
Afterwards I implemented the LED light into the if-else loop. I needed the LED light to always be off as long as no one as touched the door handle (distance > 30). Hence, the if loop is used for this feature:
if (distance > 30) {
digitalWrite(LED, LOW); //turns off UV light
}
When someone touches the door handle, the code goes into the else loop and will only switch on the LED light when the door handle is no longer being touched for safety reasons.
else {
while (distance < 30) {
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
}
After exiting out of the while statement, the LED light will switch on after 5 seconds:
delay(5000);
digitalWrite(LED, HIGH); // turns on UV light
digitalWrite(LED, LOW); // turns off UV light
Finally, the warning buzzer needs to be implemented. I actually received some help from Devin as I was unable to make the warning buzzer create the warning sound.
Nevertheless, with his help I was able to figure out the code.
We start by setting up the notes and adding in the notes file (pitches.h):
#include "pitches.h"
// notes in the melody:
int melody[] = {
NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4
};
// note durations: 4 = quarter note,
int noteDurations[] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
};
Next as we wanted our buzzer to sound during the time the LED is lighted up to signal the danger of the LED light (which would be UV light). I added the code in between the LED lighting up and dimming down:
digitalWrite(LED, HIGH); // turns on UV light
for (int thisNote = 0; thisNote < 8; thisNote++) {
int noteDuration = 2000 / noteDurations[thisNote];
tone(8, melody[thisNote], noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
}
digitalWrite(LED, LOW);
noTone(8);
With the code for the buzzer done, I have completed all the coding necessary for the program to run!!
My hero shots!!!
Similarly to me, my groupmates have also done their parts. Please go visit their blogs for the documentation of their task!
Part 2: Computer Aided Design (CAD) and 3D printing ( done by Brice)
Brice's hero shots!!
Part 3: Laser Cutting (done by Devin)
Devin's hero shots!!
Yu Han's hero shots!!
Finally, with the product assembled here is the video demonstrating the usage of the automatic hand steriliser!!!!!:
4) Problems and solutions
Along our journey, my group and I actually encountered some problems which required our product to evolve to solve these issues.
Problem 1:
The first problem we encountered was in our week 9 design.
We utilised the above solutions and created a new design that takes into account the problems.
Problem 2:
After some consultation with our module lecturer, Mr Chua, we realised that we needed a mechanism to be a part of our product! In addition we realised that since our product will be using a power bank, more space will be required inside the product.
Problem 3:
Another problem arose once we made the switch over to a lever and LDR system. During the coding for the new system, I realised that the LDR we were planning to use was not very sensitive and in order for the code to work all the time, the wall from the lever will need to be extremely big which will take up a lot of space and is impractical.
The solution we made is:
In this new design the wall will lift up when the door handle is pressed and it will change the distance the ultrasonic sensor detects. In this case the ultrasonic sensor is set at 30 cm, and when the wall is lifted up, the distance will be cut to 15-20 cm which causes the ultrasonic sensor to send a signal to the Arduino board to turn on the warning buzzer and LED light once the door handle is not being touched.
Problem 4:
As we approach the final week of the project, we continued building our product. During the assembly we realised that the wire for the power bank took up more much space than initially intended, hence our product needed to change a little.
We extended the length of the cylinder to 203mm and the diameter to 106mm and proceeded to print out the extensions.
We added on the extensions to our product and wrapped cardboard around it to be more aesthetically pleasing and for added structural integrity.
And at last our final design for the hand steriliser is done!
Problem 5:
Our last and final problem came with the actual usage of the product. During our testing, we realised that it was difficult for the movement of the door handle to press down and lift up the wall consistently due to the lack of stability provided by the two acrylics. Hence, we came out with our final solution.
Our final change to the entire product is the addition of the pivot and with it we were finally done with our product.
Image of pivot being used:
Despite all these problems being present, I am proud that my group and I were able to overcome and resolve these issues and reach our goal!
5) Project Design Files downloads
Below are all the links to the design files:
- Arduino programming - LINK
- Laser cutting - LINK
- Original cylinder - LINK
- Hollow cylinder extension - LINK
6) Learning Reflections
When I was first told that I will be taking part in designing a chemical product, I was extremely nervous as this would be the first time I will be taking part of such a large scale project from start to end. When we got to choosing our choice of product to build, I was actually quite disappointed as it a hand steriliser seemed like an extremely boring topic. But with hindsight I am actually quite relieved for working on the hand steriliser as it allowed me to develop my skills while enjoying the product design journey building a relatively simple product.
The beginning of the journey started out quite slow as we slowly learn about all the skills we will be using such as Arduino programming and laser cutting. As such, this was the calmest period of time for my group as we worked on the our design ideas (most of the time we just had to complete the worksheets given!).
As our ideas became more refined, I grew more excited at the prospect of starting to work on actually bringing our idea to life.
Once my group have gotten approval from our teachers on our design idea we finally began on our prototyping. This was actually the most hectic part of the journey as we only had around 3 weeks to complete our prototype and prepare for a presentation. To add on to the already strict timeline, my group had final exams coming up! Needless to say I was under a lot of stress and frustration during this period.
Fortunately, my group managed to spread out the task load and equally distribute them. The tasks we were allocated were actually based on what our strengths were. For me personally, I had previous experience with coding and as a result applying what I had learnt to Arduino was not hard at all and I managed to finish my task in time. Similarly my groupmates got tasks that best allow them to utilise their strengths and combining our efforts allowed us to finish our product on time!
During this journey I have developed a lot of skills that might prove useful in the future such as 3D printing and laser cutting. I also have the opportunity to practice and improve skills that I have learnt in the past such as programming.
Overall, this have been a fruitful journey. In addition to the design skills I have learnt, I feel that I have also learn from the mistakes I have made such as creating the design in CAD wrongly. Thankfully, I got the opportunity to work with a great group and they helped me overcome my confusion and mistakes in this journey and I will forever be thankful for making my CPDD lesson so much better. I have achieved the goals I made to create a prototype and learn more about Arduino programming from all the way back to the start of my journey (in the about me section) and I look forward to applying everything that I have learnt to my life.
Thank you for reading my blog one final time. Goodbye!!!!
Comments
Post a Comment