Smart Coster
Assignment for this week is to Build and Program a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks
Simply, I like to drink hot beverages, at a cool temperature
So I always left the hot drink to cool down, but I forgot about it, and it became snow, so I thought of a product that I set at a suitable temperature, and when the drink reaches the temperature, it gives me a sound and lights up
Arduino ID
to Write the code
Tinkercad portal
to build and simulate the circuit online
Design circuits on tinkercad using this component :
1- Breadboard
2- Arduino Uno
3-Temperature Sensor (LM35)
4- led
5- one resistors
5- Buzzer
6- ON/OFF switch
7-jumber Wires
breadboard
Arduino uno
Resistor 220 ohm
jumber Wires
Temperature Sensor
Red Led
buzzer
crocodile wires
First Step
I begin with open the tinkercad and drag and drop the component in the working area then built the circuit as shown in the image below.
I used the Tinker cad to simulate the circuit and building the coding of the Arduino Uno with the blocks code method.
First, i choose the Ardunio Uno, mini breadboard, LED, and resistor of 220 ohm.
i placed the LED in the breadboard On the upper center side.
i placed the Temperature Sensor in the breadboard On the upper left side.
connect the negative leg of LED with a resistor on the breadboard.
connect the Positive leg of LED with a Wires on the Arduino (pin 9).
connect the Left leg of Temperature Sensor with a Wires on the Arduino (5V).
connect the Center leg of Temperature Sensor with a Wires on the Arduino (A0).
connect the right leg of Temperature Sensor with a Wires on the Arduino (GND).
i placed the Buzzer in the breadboard On the upper right side.
connect the negative leg of Buzzer with a Wires on the Arduino (11).
connect the Positive leg of Buzzer with a Wires on the Arduino (GND).
In this project, I used one input (Temperature sensor) ,two outputs ( Led) for lights, and (Buzzer) for alarm sound.
circuits on tinkercad
Second Step (coding)
i opened the Blocks code tab in the tinker cad, then I choose from the Control panel If conduction to the workspace.
I choose from the control math panel << <30 >> and choose from input panel "read temperature sensor <<A0>>
i entered the Pins i connected above with the Led , choose from the output panel<<set pin 9 to 50>>,<<set pin 11 to high>>
I simulated the code to check all things gonna alright, and it is working well
Then, I opened Arduino IDE and copied the text code from tinker to it.
then I saved the file, and upload it to the Actual Ardunio after porting it with the USB.
code blocks on tinkercad
code on Arduino
the circuit video on TINKERCAD
The next step was to implement it using physical components and the Arduino UNO board to build it.
the function is When the temperature is less than 30, the device lights up and gives a sound ،
When I was shooting the video, the temperature in the room was 21, so the device light up and give a sound
it is first time to use Temperature Sensor , so I did a search for data sheet To know how to use it
The project has a great relationship with the final project because it taught me a lot of skills that I will use when I work on the final project, because I learned the used sensor and the way to deal with it and coding it.
The special thing this week is getting to know the different sensors
Spacial Day (dishparty)
on that week we have Activity to To implement task as a group of 2 , my group was with Ahmed Mokhtar
the Activity was:
Build a Smart Waving Hand using Arduino
Manual Mode: controlled manually by a human using a potentiometer
Automatic Mode: controlled via signals received from an ultrasonic sensor at the input of the Arduino board
Pictures during implementation
Finally implementation :D