The Smart Bag

Hello there. Today I will share with you my latest invention, the Smart Bag.

The Smart bag is designed to help old people suffering from dementia and other kinds of diseases that cause long-term memory loss. These old people will forget where they are, whether they locked the door, whether they turned of the stove and whether or not they have left their valuables far away from them.

This device is used to curb the last problem. The person will wear a microBit on his wrist and another will remain in the bag. If the microBit in the bag is a certain distance away from the microBit on the wrist, the microBit on the wrist will sound and alert the owner. If someone other than the owner attempts to take the bag, the microBit will sound to alert others that a thief is trying to take the bag.

The Smart Portable Air Purifier

Hello, reader. Today I will share with you my latest invention, The Smart Portable Air Purifier.

Have you ever lived in an area where the air quality is bad? There are already some smart air purifiers to help you, but most of them are only useful at home and when you step out of the house, you can at most only bring a mask, which does not guarantee that you breathe in clean air. And as we all know, haze ages the lungs.

The Smart Portable Air Purifier is special because as soon as the air quality takes a turn for the worse, it will activate. It has LEDs to show you what is the air quality. Green stands for good air quality, yellow stands for moderate and red stands for bad.

And that’s not all! The Smart Portable Air Purifier is portable too!

This is the code:

int measurePin = A5;
int ledPower = 12;unsigned int samplingTime = 280;
unsigned int deltaTime = 40;
unsigned int sleepTime = 9680;float voMeasured = 0;
float calcVoltage = 0;
float dustDensity = 0;

void setup(){
Serial.begin(9600);
pinMode(ledPower,OUTPUT);
pinMode(5,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
}

void loop(){
digitalWrite(ledPower,LOW);
delayMicroseconds(samplingTime);

voMeasured = analogRead(measurePin);

delayMicroseconds(deltaTime);
digitalWrite(ledPower,HIGH);
delayMicroseconds(sleepTime);

calcVoltage = voMeasured(5.0/1024); dustDensity = 0.17calcVoltage-0.1;

if ( dustDensity < 0)
{
dustDensity = 0.00;
}

Serial.println(“Raw Signal Value (0-1023):”);
Serial.println(voMeasured);

Serial.println(“Voltage:”);
Serial.println(calcVoltage);

Serial.println(“Dust Density:”);
Serial.println(dustDensity);

delay(500);

if ( dustDensity < 0.10){

digitalWrite(9,LOW);

digitalWrite(10,HIGH);

digitalWrite(11,LOW); }

else if ( dustDensity > 0.10 && dustDensity < 0.35){

digitalWrite(9,LOW);

digitalWrite(10,LOW);

digitalWrite(11,HIGH);

}else if ( dustDensity > 0.35){

digitalWrite(9,HIGH);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
}
if ( dustDensity > 0.05){
digitalWrite(5,HIGH);
}else{
digitalWrite(5,LOW);
}
}

And here are pictures of the machine:

My awards

Hi, reader. Today I shall talk about the awards I received from competitions I had entered.

My first award is a silver from the AMEC competition, which spans 2 days. I went to a building in NUS to participate (NUS is so big I cannot remember the building I was in). On the first morning, the instructor taught us about how to program with a device known as microBit. This device is like the arduino but much simpler. In the afternoon, the instructor told us to work with our group to create something using the microBit based on the theme “smart living”. Our gruop came up with a “keypad entry door ” thing that gave us silver the next day.

The next award I received was 2nd place in the IDE Junior Maker competition. It spanned a few weeks. On the first day, our instuctor, Mr Koh, introduced me and my teammates to the microBit again. We decided to create a smart bag, which is described on another post on this website. On the day of the judging, we did a presentation. We gave the judges our best, and they decided that it was good enough for 2nd place.

I learnt that alone, we are just a drop of water, but together, we are an ocean. If we are to succeed in anything, we must work together with others.

The Intelligent Walking Stick

Hi there, good reader. This is my latest Arduino project, the Intelligent Walking Stick.

When your elderly family member walks in dark alleys with no light source, are you worried he/she will not be able to see where he is going? When your blind family member walks in a crowded area, are you afraid he/she will knock into something?

Fear not, I have a simple solution.

My new invention, the Intelligent Walking Stick solves the problems your elderly folk may face. It allows your elderly/blind family member to stay safe while walking outdoors. With this smart stick, your relative will be safe, and you can put aside your fears!

My invention has 4 LEDs, and the darker the area your relative is walking in, the higher the number of LEDs that are lit! When your relative is too close to an obstacle, the stick will vibrate, alerting the elderly folk without bothering others! And, in the extremely rare case in which your elderly relative is in danger, there is a button that turns on a buzzer, which will sound SOS.

Other components include:

  • a LDR,
  • an ultrasonic sensor,
  • a vibration motor
  • another button.

Here is the code:

void setup() {
// put your setup code here, to run once:
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
pinMode(A0,INPUT);
pinMode(12,OUTPUT);
pinMode(13,INPUT);
pinMode(9,OUTPUT);
pinMode(6,INPUT_PULLUP);
pinMode(7,INPUT_PULLUP);
pinMode(9,OUTPUT);
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
LED();
Vibration();
SOS();
}

void LED(){
int var1 = analogRead(A0);
Serial.println(var1);
if (var1 <= 341){

digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);

}else if (var1 > 341){
digitalWrite(2,HIGH);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
}else if (var1 > 532){
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
}else if (var1 > 800){
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
}else if (var1 > 1000){
digitalWrite(2,HIGH);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
}
}

void Vibration(){
long duration, cm;
digitalWrite(12,LOW);
delayMicroseconds(2);
digitalWrite(12,HIGH);
delayMicroseconds(10);
digitalWrite(12,LOW);
duration = pulseIn(13,HIGH);
cm = duration*0.034/2;
if (cm < 20){
digitalWrite(9,HIGH);
}else{
digitalWrite(9,LOW);
}
}

void SOS(){
int var2 = digitalRead(6);
Serial.println(var2);
if (var2 == 0){
tone(10,2000);
delay(100);
noTone(10);
delay(100);
tone(10,2000);
delay(1000);
noTone(10);
delay(100);
tone(10,2000);
delay(100);
noTone(10);
delay(100);
tone(10,2000);
delay(500);
noTone(10);
delay(500);
tone(10,2000);
delay(500);
noTone(10);
delay(500);
tone(10,2000);
delay(500);
noTone(10);
delay(500);
tone(10,2000);
delay(100);
noTone(10);
delay(100);
tone(10,2000);
delay(100);
noTone(10);
delay(100);
tone(10,2000);
delay(100);
noTone(10);
delay(100);
}else{
noTone(10);
}