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)

I was thinking of making a circuit that could be later developed into a smart home system. I chose to begin with sensing temperature and light intensity and I got inspired by this video to use an LCD to give the user feedback regarding the sensors' readings.

Tool Chain

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

Softwares

  • Fritzing for design and wiring.

  • Arduino IDE for coding.

Hardware

  • Arduino UNO board.

  • LCD with I2C module.

  • LDR module.

  • LM35 temperature sensor.

  • Button.

  • LED + 330 ohm resistor.

  • Jumper wires.

  • 5v adaptor.

Enclosure

  • cardboard.

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

I used Fritzing to design and connect my circuit

  • I used an LCD with I2C module. The module wasn't included in the main library so I downloaded it from here.

  • I also couldn't find the LDR module so I downloaded it from here. I connected it to A0 pin because i am going to use the analog input from my module to make it more customisable.

  • I connected the temperature sensor to pin A1.

  • I connected the button to pin 3.

  • I connected the LED with 330 0hm resistor for current limiting then connected it to pin 9.

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?

Circuit Connection

  • I used a medium sized breadboard to connect my circuit so it'll fit inside the enclosure.

  • I connected the components as described in the design section.

Code Preparation

  • I installed "LiquidCrystal I2C" library.

  • I used I2C scanner to detect the LCD address.

Coding

Initialisation

  • Included necessary libraries for LCD.

  • Sat variables for temperature sensor equation with the help of this code.

  • Sat input and output pins.

  • Initialised serial port and LCD.

Functions

In my project I have two main functions

  • ledControl and it controls the LED based on the LDR reading. It turns the led on when it's dark and turns it off when there is light.

  • showData and it displays on the LCD the current temperature and based on the LDR reading whether it's morning or evening.

Loop Function

  • It checks the temperature sensor reading and convert the current voltage value to degrees value.

  • Runs the ledControl function to change the LED status if the LDR reading changes.

  • Checks if the button is pressed and when it's pressed it calls the showData function to update the information displayed on the screen.

Testing before changing components to fit in enclosure

VID_20220916_064408.mp4

Testing after changing the connections

Enclosure

  • I used cardboard to make the body of the project.

  • I used double-faced tape and sellotape.

  • I used on side to mount the user interface component, another side to mount the light sensor, and a side to mount the power socket.

  • I fixed the breadboard and Arduino board at the bottom of the box.

VID_20220916_071753.mp4

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

  • My glue gun ran out of glue.

solution

  • I used tapes and tried to fix it supporters from inside, it wasn't the best but it worked.

Problem 2

  • LED turns on or off only when i press the button but it's supposed to function automatically.

Solution

  • I made a two separate functions one to control the LED and one to display readings when button is pressed and they both function independently.


VID_20220915_204609.mp4

Assignment Design Files