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)

For me, a person who doesn't like interacting with people, social distancing was a bless and I've been thinking why don't we keep distance from others forever?

So, I decided to make a social distancing alarm.

Tool Chain

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

Software

  • Tinkercad for simulation.

  • Arduino IDE for programming Arduino board.

Hardware

  • Arduino UNO as a brain.

  • Ultrasonic sensor as an input component.

  • RGB LED as an output component.

  • 3x 330 ohms resistors for current limiting.

  • Piezo buzzer as an output component.

  • Jumper wires for connections.

  • USB cable for programming Arduino.

  • 5V adaptor as a power source.

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?

Ideation and circuit connection

  • For the social distancing alarm, I used the Ultrasonic sensor for distance detection. I connected the trigger and echo terminals to 7,6 Arduino pins and VCC and Ground to the common VCC and ground points on the board.

  • I needed something to indicate whether the space is enough or not and instead of using two different LEDs, I used an RGB LED that changes colour based on the situation, blue for safe and red for if someone is getting too close. I connected the common cathode to the common ground point.

  • I used resistors to limit the current on the LED. I then connected the resistors to pins 9,10,11 which are analog outputs.

  • I also added a buzzer to emphasise the danger. I connected it between ground and pin 3.

Programming

  • I used if statement to make a decision regarding the Ultrasonic sensor readings.

  • I used a comparison operation to set a limit for the safe distance.

  • I sat the outputs, red light and buzzer on if the condition is met.

  • I sat the outputs, blue light and buzzer off otherwise.

You can find the circuit here.

brave_TocVMez9oU.mp4

Circuit Simulation

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?

Hardware Connection

  • Ultrasonic connection: trigger and echo terminals to 7,6 Arduino pins and VCC and Ground to the common VCC and ground points on breadboard.

  • RGB LED: common cathode to common ground and other terminals to 330 ohm resistors.

  • Resistors: to pins 9,10,11.

  • Buzzer: negative terminal to common ground and positive terminal to pin 3.

Programming

  • I copied the autogenerated code from Tinkercad and pasted it in a new project in IDE.

  • I connected the Arduino to the laptop and uploaded the code.

VID_20220915_142526.mp4

Assignment Design Files

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)

Problem 1

LED light is green not blue.

Solution

I figured out that I switched green and blue pins while connecting them in the real circuit so I connected then in the correct order and it worked.

Problem 2

Ultrasonic detecting objects nearby when i tried to make the distance 1m.

Solution

I made the distance 30 cm to be easier in testing

VID_20220915_143550.mp4