Week 7 - 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)

This week's assignment is to build and program a smart circuit using an Arduino UNO which reads a signal from an input component to control an action component using Arduino C (Text Code).
M
y idea is to make a sensor park that uses in vehicles to assist you to park without crashing.

It's about an ultrasonic sensor that sends waves and receives them again to calculate the distance before crashing and a buzzer, RGB LED to warn you depending on the distance.

I want to upgrade the last week's assignment and add some features like an ON/OFF switch, RGB led, and make an enclosure.

I have searched and been inspired by these videos.

Video1 Video2

Tool Chain

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

Software: Tinkercad

To simulate the circuit

Software: Arduino IDE

To write the code and upload it to the Arduino UNO

Components:

  • Mini Breadboard

  • Arduino UNO

  • cables

  • 220-ohm resistors

  • ON/OFF Switch

  • Jumpers

  • Buzzer sensor

  • RGB LED

  • Ultrasonic sensor

  • Crocodile wires

Materials:

  • Cardboard

  • Cutter

  • Glue

  • Glue gun

  • Tape

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?

First, I tried to make the circuit and simulate it on tinker cad.

The buzzer sensor, RGB led worked as output components and the ultrasonic sensor works as an input component
Wired the buzzer sensor and RGB led to the Arduino to digital pins 8,6,3,5 respectively and GNDs.

Wired the ultrasonic sensor with 4 pins, Trigger as input (pin 9), Echo pin is an output (pin 10), Vcc to powers the sensor, and the Ground of the system.

Wired the slide switch with a 5v pin, GND, pin 13 to control the whole circuit.

  • I used the Arduino IDE to write the code and made it 4 parts for 4 modes.

  • I have set the Arduino to read the inputs and outputs from the ultrasonic sensor and the switch.

  • I have made an If conditions and puts distances. In every mode, the output changes depending on the distance.

1st mode when the distance is between 20 and 25 cm the buzzer and the led will beep and light with a slow rhythm.

2nd mode when the distance is between 15 and 20 cm the buzzer and the led will beep and light with a little bit faster rhythm.

3rd mode when the distance is between 8 and 15 cm the buzzer and the led will beep and light with a faster rhythm to warn that you are close to crashing with something behind you.

4th mode when the distance is between 3 and 8 cm the buzzer and the led will beep and light nonstop to warn that you almost crashed with something behind you.

The colors of the RGB led change depending on the distance between the car and the object behind the car.

I had defined the digital pins of the ultrasonic sensor before the void setup, Sets the trigger pin to High, Read the echo pin, and return the sound wave.

In void setup defined the pins as inputs and outputs.

In void loop made an if condition to the ON-OFF switch if it is high only, go for the next conditions.

Put the equation of the ultrasonic sensor to convert to real distance.

opened another if condition to the 1st mode and put the distances and specific color of the RGB led and the buzzer.

Then delay and turn them off and repeat the loop to reach the output of the video below.

I just did the same things for the 3 other modes.


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?

I started to build the circuit on the breadboard and Arduino UNO.
Connect the buzzer sensor
and the RGB led with the Arduino to digital pins 8,6,3,5 respectively and GNDs.

Connect the ultrasonic sensor with 4 pins, Trigger as input (pin 9), Echo pin is an output (pin 10), Vcc to powers the sensor, and the Ground of the system.


Then, I tried to add the ON/OFF switch with a 5v pin, GND, pin 13 to control the whole circuit in case you want to stop the sensor assist and park on your own.

IMG_0345.MOV

After that, I worked on the enclosure of the body of the vehicle.

IMG_0342.MOV

Final outcome

IMG_0343.MOV
IMG_0344.MOV

Community of Learning

Did you ask for feedback? What are the ideas that others have contributed or suggested? What was someone else’s idea that you built upon? How did you help your peers? How did your peers help you?

I asked Esraa about what to add to my project and she suggests adding an ON/OFF switch to have two input components. Also, we reached to replace the regular led with RGB led.

Overcoming Challenges

When you got stuck, what/who did you turn to? At what point did you have to pause to research or learn more before moving on? What are some mistakes, pitfalls, or challenges that others can avoid if they were doing this assignment?

When I got stuck I go to google and YouTube videos to get inspired by their ideas.
Video1 Video2
I faced a problem while
writing the code in Arduino because this is my first time using Ultrasonic in coding, I tried to search for others codes and used code blocks in tinker cad also to understand how it works.

Final Project

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

I think this assignment will help me a lot when I started my final project, it helped me understand how the Ultrasonic sensor will work.
And. I want to add this feature to my RC car.


WOW!

What is the coolest thing that you've learned this week? What is something that you will never forget from this week?

The coolest thing I have learned this week is how to use the DH11 sensor that uses to calculate the temperature and humidity.

IMG_0331.MOV

Assignment Design Files