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 device using an Arduino UNO which reads a signal from a multiple input components (Sensor, Switch, or variable resistor) to control a multiple actions components (Motor, Buzzer, LED...etc) using TEXT CODE instead of using code blocks.

I chose to implement the second step for my final project idea.

Tool Chain

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

Software:

  1. Arduino IDE: To write the codes responsible for programming Arduino compatible boards.


  1. TINKERCAD (website): to predict and test the output of your circuits before implementing them in real life

*TinkerCad is a simple website that provides the feature of simulating electronic circuits., as well as provide explanations to some of the wiring problems that result in damaging the components in your circuit during simulation (i.e. if the current passing through a component is larger than what it can handle, etc.)

Electronics components

  • 3 Resistor (220 Ω)

  • RGB LED Light

  • LM35 Temperature sensor

  • Piezo Buzzer


  • Breadboard

  • Arduino UNO Board

  • jumper wires (per need)

Design 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?

Explaining the idea:

As mentioned before, the temperature sensor should senes the temperature variables and indicates them in colors stages (that have been mentioned).

The second step of my final project: is to use a sound alert that alerts you using a buzzer when your cup temperature reaches a certain degree and a pushbutton to stop the buzzer as a sign that you have heard the alarm.

Simulating the circut on Tinkercad

Circuit design:

The circuit design is similar to the last week, temperature sensor (as an input component) to sense the temperature variables, and the LED light (as an output component) should indicate these variables with color changes, a Piezo Buzzer (as an output component) will alerts you when the temperature reaches a certain degree, and a pushbutton (as an input component) stops the buzzer sound.

I connected the temperature sensor and the RGB LED the same way in the previous week, then I connected the buzzer and the pushbutton.

Note: In TinkerCad simulation, there isn't LM35 temperature sensor, so I used TMP36 instead.

semulation.mp4

TinkerCad simulation

Coding design:

Explaining the code:

First: I defined the component I used and which pins they are connected to on the Arduino.

Second: in the Void Setup sekchen, I wrote the processes I want to be run for once.

Third: Void loop sekchen:

  • firs in the loop sekchen; reading the temperature and The process of changing temperatures from the Fernheit to the Celesius, and printing this to the serial monitor.

  • The same color indication.

  1. The first step is: If the temperature is below 15c, The LED's color will be BLUE and indicates that the cup is very cold.

  2. Second: If the temperature is below 20c, The LED's color will be CYAN which indicates that the cup is getting cold.

  3. If the temperature is below 25c, The LED's color will be GREEN which indicates that the cup is at the perfect temperature.

  4. If the temperature is below 30c, The LED's color will be MAGENTA which indicates that the cup is warm close to hot.

  5. Finally: If the temperature is above 30c, The LED's color is RED which indicates that the cup is burning hot. and the buzzer pin will be set to HIGH.

  6. If the push button was pushed means that the pushbutton pin is set to HIGH the buzzer should stop means that the buzzer pin is set to LOW.

Uploading the code to Arduino Board:

Finally, connecting the Arduino to the laptop and Uploading the code to the Arduino board and test it.

Preparing Process

Wiring the circuit on the physical breadboard and connected it to the Arduino UNO board.

I connected each RGB LED's color with a current limiting resistance,

connect each of them to a different Arduino pin. (red goes to pin1, blue goes to pin2, green goes to pin3)

I connected LM35 to the breadboard

then I connected it to an analog pin (A0) on the Arduino board

I connected the buzzer's negative side to the common GND, the positive side is connected to pin 5 on the Arduino.

one side of the push button is connected to the common GND, and the other side of the push button is connected to pin 6 on the Arduino.

then I connected them to pins on the Arduino board (pin 5,6)

The whole circuit

Finally, connected them all to a common GND and VCC from the Arduino.

For the enclosure I used

  • Cardboard

  • Exacto knife& Ruler

  • Tap

  • Pencil&Paper

I used cardboard for the enclosure, I cut out all the main parts two circles and rectangle to make the rectangle round, then I taped the bottom circle and the rectangle together.

also I cut out the pushbutton and LED place.

I taped the breadboard inside the enclosure.

I built the wiring circuit

finally, I assembled them.

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?

color indecation.3gp

color indications

VID_20220311_161633.3gp
real implementaion.3gp

final implementation

(buzzer alarm and pushbutton stop 1:10)

readings.mp4

serial monitor readings

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?

Wiring electronic components and coding are a little confusing, especially 'cause I am not previously familiar with the specifications of some components, as I failed to complete the Hands-on and Midweek activities in the right way, also it was difficult for me to troubleshoot the assignment :(.


  1. didn't know how to arrange the code and what should come first ...etc.

  2. a lot of Syntex wrongs in the code.

  3. didn't know how to connect the push button to the buzzer at first, then I try different ways in TinkerCad till I figure it out.

error.3gp

because of the wrong arrangement of codes lines (in the buzzer-push buttton sekchen), the reason why the sound of the buzzer did not come out

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?

As usual, I get stuck in-circuit wiring and coding XD, in the EOWeek session, AHMED HAMMAD and I were in one group and he explained the whole circuit wiring and coding process to me, really, he helped me a lot understanding.

also, I had a problem uploading a library to IDE, Mr. Sherif help me with it.

Final Project

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

This assignment aims to learn how to control multiple components by Arduino board through multiple input. This gives you more control over the components in your circuit and the ability to program each one of them individually to do certain tasks, That will help me controling my final project components as I need.

Assignment Design Files