Week #6- Journal

Ideation

Tell us about your assignment's idea for this week. Why do you care about this idea? What inspired you? (Please include images or links to sources of inspiration)


A big problem we all faced, Especially in the Corona pandemic, was touching surfaces with our hands, such as trashcans or bins.

And from here I started thinking about a solution for this problem that may seem like a small problem but Unfortunately, It causes infection and the spread of the disease.

The solution I thought about was a smart bin, when it sees the garbage, it opens automatically.

Tool Chain

Which software/machines/materials did you use in the assignment? Why?

A battery as a source of electricity

For seeing and detecting objects, I used an ultra sonic sensor.

A servo motor for opening and closing the bin

Cardboard for prototyping the bin

An USB cable for uploading the code on the Arduino

Arduino UNO as the brain and controller of the bin

For simulating the electric circuit and the connection between the components

Arduino IDE for uploading the code to the Arduino

Design/Preparation Process

Explain the design and/or preparation process of your assignment. How did you use the tool or software to design and/or prepare your assignment before fabrication/implementation?


The idea of the Ultrasonic sensor is very easy, it works like a dolphin, dolphins and bats don't see but they use waves to know the distance between them and the object in front of them.

It's the same idea, Ultrasonic sensor has four pins, two of them are VCC and ground, and the other two are trigger and echo, the trigger sends the wave and the echo receives it,

and by calculating the distance with the equation:

distance = time*speed

it can know the distance between it and the object in front of it.

I searched and I found a nice video that explained all.

First, I simulated the circuit on TinkerCad, it had one input (ultra sonic sensor) and one output (servo motor)

VID-20220823-WA0014.mp4

Development/Implementation Process

Explain the development/implementation process of your assignment. How did you use the machine/tool to manufacture or implement the design of your assignment?

Writing the code was not the easiest thing, even with using blocks, it was the first time for me, I got help from some videos I will put all the links in the assignment Files, but after many trials, the final result turned out like this


I started cutting needed pieces and glueing them together as told in the video until the final result turned out like this:

WhatsApp Video 2022-09-20 at 06.43.06.mp4

I tested the circuit several times, and after tens of failures, it alhamdullilah worked.

WhatsApp Video 2022-09-18 at 21.41.34.mp4

Overcoming Challenges

What kinds of challenges or problems did you face while doing the assignment, tutorials, or exercises? How did you solve them? Did you ask for help from an instructor or peer? Please provide a link to the tutorial or article that you used to solve your problem (if any)

After I finished all steps and made the circuit with real components, It didn't work!


I was shocked, I thought that the Ultrasonic Sensor might have been broken or something, So I tried using Ultrasonic but with another output to make sure that it works.

It worked also, and here I got confused, I didn't understand anything, why it wasn't working?!

I tried using the servo motor without the Ultrasonic sensor, maybe the problem is in the servo not in the Ultrasonic, but it also worked.

So, can anybody tell me please what is the problem, after a little bit of thinking I noticed that the voltage that the laptop gives to the Arduino is just 5v, since the Ultrasonic needs 5v and the servo needs 5v, it is logical that it doesn't work.

I added an external source of electricity and Alhamdulillah it finally worked!


Final Project

How can you use the skills and knowledge that you've acquired this week in your final project?

Arduino UNO

It's my first time making a project using Arduino UNO, I found it very easy especially using blocks on tinkercad.

I am sure it will help me so much in my final project inshaallah

Assignment Design Files