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)
The assignment for this week is to make a smart device with multiple inputs and actions. I will make roulette game with ultra sonic sensor activation. I was inspired by a mini game.
Tool Chain
Which software/machines/materials did you use in the assignment? Why?
We Used Tinker CAD to simulate The Circuit and its component.
It is easy to use and safer to test our project without risking the component.
We Used Arduino as the brain for the project.
We use Arduino IDE to write the code.
Components:
Cardboard
Wires
Power adapter
Breadboard
LEDs
DC motor
Crocodile wires
Arduino Uno
Bluetooth module
Ultrasonic sensor
Driver Module L298n
Adapter
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?
For Input we use Ultrasonic sensor and on and off switch.
The ultrasonic sensor will turn on the circuit at certain distance and turn it off when the distance increase.
For output we use LED and DC motor.
We use driver module to protect Arduino.
We put adapter because Arduino cannot power the DC motor efficiently.
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?
Connect the (+) of the breadboard with the 5v pin on the Arduino.
Connect the (-) of the breadboard with the ground pin on the Arduino.
Put the LED on the breadboard.
Connect the one end of a resistor with the cathode end of the LED and the other with the (-) of the breadboard which is connected to the Arduino.
Connect the anode end of the LED with the digital pin 12.
Connect the Ultrasound distance sensor as follows: Power to the (+) of the breadboard, Ground to the (-) of the breadboard, Trigger to pin 9, Echo to pin 10.
connected the DC motor in parallel to the circuit so every component receives the full voltage of the power.
We connect the DC motor to the motor Driver and because we do not need to control direction of rotation, we use one pin to control the on and another for off function.
Dc motor connected to pin 11 = High
Dc motor connected to pin 8 = Low
Added a switch to the circuit and connected it to pin 13.
Code:
We Set the on function based on one of these conditions:
If the ultrasonic sensor read distance less than 3 cm or the switch is on
when on, The Dc motor starts, and the LED turns on.
We set the off function based on one of these conditions:
If ultra sonic sensor read distance other than 3cm or the switch is off.
When off, The DC motor stops, and the LED turns off.
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)
The challenge was that the DC motor was not working after connecting to the motor drive. I searched and found out that it has to be connected to adapter because the 5v from Arduino board is not enough to run the DC Motor and it needs 9v or 12v adapter and it needs a common ground with Arduino so I did it and it worked.
Final Project
How can you use the skills and knowledge that you've acquired this week in your final project?
Now I can after many tries I guess, make a simple code for my project.
WOW!
What is the coolest thing that you've learned this week? What is something that you will never forget from this week?
Coding !!!