Week 7

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 time I'm going to make some small changes to the previous week's project and make an enclosure for the components, the idea was inspired by the "Ramadan Lantern", which is the closest application to what will be implemented in the final project. The goal is to make an electronic unit that is sensitive to light. When the light is low, a LED and DC-Motor are turned on in parallel with the possibility of controlling the intensity of the light.

Tool Chain

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

Software:

  1. Tinkercad: To design the electrical circuit, make sure that all parts are working and simulate what will happen in reality.

  2. Arduino IDE: to write and upload the code to the Arduino Board.

Components:

  • Arduino UNO to control all the components.

  • USB Cable to connect Arduino Board with Laptop.

  • Hobby gear motor for the movement. 3-12 VDC - 190 mA

  • L298N Driver Module to control the power and speed of DC-motor.

  • Green LED 2.2 VDC - 20 mA

  • Resistors - 220 Ohm for LED

  • LDR Module To sense the intensity of light and give the signal to the Arduino board

  • 1K Potentiometer for LED intensity control

  • Breadboard to connect the components.

  • 9V Power-supply

  • ON/Off Switch

  • Jumper wires + Crocodile wires

Tools:

  • screwdriver to make holes and help me to assemble the components.

  • Cutter to cut the enclosure parts.

  • Wax gun to assemble the enclosure parts.

  • Arabic calligraphy pens to write the text.

Material:

  • Cardboard for the enclosure.

  • Wax for assembling the enclosure parts.

  • Tooth stick to hold the Sufi shape and connect it to the motor.

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?

I used the Tinkercad to design the electrical circuit and make sure that all parts are working and simulate what will happen in reality. and I used the previously mentioned components.

I made a simple modification to the previous circuit and replaced the DC motor with a Hobby Gearmotor to note the change in speed, and I modified the power value to 9 volts, and on the real circuit, I will add an on/off switch.

Mode off

Mode on

Code Test

I wrote the code on the Arduino IDE, and uploaded it to the board

Note: I did not find any difference in the motor speed when changing the values in the code.

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 assembling the circuit with the following steps:

  • I connected the positive and negative from the breadboard to the Arduino

  • I connected the LED to the breadboard and the resistor and make the anode of the LED connected to the digital pin number 9 to read the analog voltage.

  • I connected the potentiometer to the breadboard and make its middle-end connected to the Analog pin A0 to control the led light intensity

  • I connected the LDR Sensor module to the breadboard and make its DO Pin connected to the digital pin number 2 to sense the light intensity

  • I connected the DC- Gearmotor to the L298N driver module based on the attached circuit diagram, and the module to the Arduino board using the digital pins 3,4 and 6

  • I Connected the positive and negative from the power source to the breadboard

  • I Connected the on/off switch to the power source lines on the breadboard

  • I uploaded the code using Arduino IDE

  • Test Full circuit. and finally, it works.

  • I made a very simple enclosure and I assembled the components inside.

Final Result

I noticed that the wiring must be planned before making the enclosure so that I do not have to change the places of the components, and it is better to put the LDR sensor on top.

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?

This week Anas helped me with this video which contains a method for rotating shapes 360 degrees, and this will help me find design solutions for the final project.

Later I found that Sharqawi needed almost the same information, so I shared it with him

I also learned from Ahmed Abdel-Fattah and Mohamed Ayman some points in writing the code for operating the push button in the electronic circuit that we implemented at the end of this week, in addition to Ahmed Abdel Nasser's method of consuming fewer wires on the breadboard.

I also learned from this week's activities how to divide the task and gradually debug the errors.

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?

I faced a problem when uploading the code to the Arduino board, and by searching on YouTube I found the solution, I followed the steps and tried to discover the error, then I re-uploaded the code and the problem was solved.

How DC GEARMOTOR WORK WITH ARDUINO AND L298N

Before writing the code for the motor, I needed to know how to write it, so I searched on YouTube to find out more details and this video was useful...

Although the circuit works, I doubted the correctness of the connections due to the presence of a flash during the electricity connection, so I took the opinion of my peers, and indeed I found an error in the connection and I modified it, but so far the flashing is still present and I have not yet reached a solution.

Latest result, but the flashing is still there

Final Project

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

This time I got very close to the idea of the final project, I used almost the same pieces that I will use and generated the code that is similar to what will be implemented in the final project.

WOW!

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

I really enjoyed trying out the temperature sensor, writing its code, and monitoring the room temperature

Weekly Digest [OPTIONAL]

Tell us about any other cool things that you've made this week: in the Hands-on activity, tutorial examples, exercises, or any other cool mini-project that you tried out aside from the assignment.


Assignment Design Files