MY SCHOOL PROJECT: AUTOMATIC HAND SANITIZER DISPENSER

Words
614
Reading
3 min
Listen
Play
4y

I happen to be the group leader of ten people working on this project, so getting the materials and finishing it before the deadline would be simple. Having to build this project reinforced my learning and taught me a lot of new things.

B7E3DF1B-F08F-4EFB-9A94-B62DD0603FC8.jpeg

The truth is that not many people contributed to the project; they were only concerned with the money required to obtain the components. Many of my group members did not show up from the start of this assignment to the end.

F15ADB06-F444-4592-B86C-C5BB07267368.jpeg

The project is simple, but because it is something I don't do often, I had a lot of problems with the sensor and the battery. Initially, I attempted to use an IR Sensor for this project, but discovered that when exposed to light, the IR Sensor always turns HIGH, which was not what I desired. The sensor was supposed to turn HIGH only if there was an obstacle or an object in close proximity to it.

IMG_20230206_142557.jpg

0001927F-5ABD-4212-B95A-0D454EB64924.jpeg

AEE7841C-9332-4DE3-90B7-014E65EA5B73.jpeg

Using an IR Sensor meant writing fewer lines of code in my Arduino, which was why it was my first choice, and it was also less expensive than the Ultrasonic Sensor. I was using a 5v Submersive Pump, which cost about $8, to pump the liquid out. It seemed quite pricey, but because I was getting it locally, they raised the price.

Except for the light issue, the IR Sensor performed admirably, even better than the Ultrasonic Sensor. I went ahead and used the Ultrasonic sensor because a friend of mine who is more knowledgeable in this area advised me to.

The components and Items eventually used for this Project are:

  • Arduino Uno
  • Jumper Wires (Male and Female)
  • Pipe
  • 5v Submersive Pump
  • Relay Module
  • Container to hold the liquid

Below is the Block and Circuit Diagram for this project:

IMG-20230209-WA0001.jpg

IMG-20230209-WA0000.jpg

This diagram was made using the Fritzing Software...

Below is the Arduino Code used:


int trig = 3;
int echo = 4;
int relay = 8;
int a,distance;

void setup()
{
  Serial.begin(9600);
  pinMode(trig, OUTPUT);
  pinMode(relay, OUTPUT);
  pinMode(echo, INPUT);
}

void loop()
{
   digitalWrite(trig, LOW); 
  delayMicroseconds(5);
  digitalWrite(trig, HIGH); 
  delayMicroseconds(10);
  digitalWrite(trig, LOW);
  a = pulseIn(echo, HIGH); 
  distance= a*0.034/2;
  Serial.println(distance);
  if (distance <10)
  {
    digitalWrite(relay, HIGH);
    delay(3000);
    digitalWrite(relay, LOW);
    delay(3000);
    
    
  }
  else 
  {
    digitalWrite(relay,LOW);
  }
 
}

Yesterday was the submission of this project, and I face serious issues with powering the project. The 9-volt battery I got for the project was not really functioning well or was not enough to power the pump. I noticed that if I disconnected the pump from the battery, the whole circuit worked very well and the relay would trigger.

At some point, the pump worked, but when I called my lecturer to check out my project, the whole thing stopped working all of a sudden. I didn't bring extra batteries and didn't have the cash to get new ones. The lecturer told me to come finish up the project on Monday.

So I would have to build a battery pack that would be powerful enough to power the pump and Arduino. Hopefully, I will get to do that before next week so I can get full grades for this project.


WHO IS STARSTRINGS01


image.png
Designed by @ grisvisa

Starstrings01, also known as Giftedhands, attends the Federal University of Agriculture in Abeokuta to study Mechatronics Engineering. He is a lover of the hive, a guitarist from Nigeria, and a student.

His ambition on Hive is to be more than just an ordinary blogger; he wants to be someone with a purpose. That's why he started the newbies initiative newbies-hive@newbies-hive to help guide and support newbies. Please follow the newbies-hive@newbies-hive curation trail by clicking here.

He tries to juggle education with being active on the chain, but his love and passion for Hive keep him on track..


All images are mine except indicated otherwise
All gifs included are powered by Tenor


54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png

IF YOU LOVE THIS POST, YOU CAN KINDLY SUPPORT IT WITH YOUR COMMENTS, REBLOG AND UPVOTE. IT WOULD BE MUCH APPRECIATED

54TLbcUcnRm3sWQK3AJf6fuxkTxiKXRNCarffscTjF9JnBqLzj89NH5s1rKH2Cga4QvMPvvEcb4koTvuCHZXnviw8k7xAcqd9HsbFKjw6hj1Y72M87h86FHy9hno4Dmynf1K26XEe.png

THANKS FOR VISITING MY BLOG 馃槆馃挄
MY SCHOOL PROJECT: AUTOMATIC HAND SANITIZER DISPENSER | Ecency