Assignment for this week Design and program a smart device that perform a certain function or solve a problem: program Arduino UNO to read signals from multiple input components (Sensor, Switch, or variable resistor) to control multiple action components (Motor, Buzzer, LED...etc) using Arduino C (Text Code).
I was very confused about choosing the project, but I spoke to my friend and we discussed the problems that could be solved, and she suggested that I make a product for the blind, and I got very excited about the idea and began to define the input and output component
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-ULTRASONIC SENSOR
4- RGB led
5- 3 resistors
5- Buzzer
6- Sensitive Resistance Light Detection
7- jumber Wires
8- Battery 9v
breadboard
Arduino uno
Resistor 220 ohm
jumber Wires
RGB Led
buzzer
crocodile wires
ultrasonic sensor
Battery 9v
ADapter 9v
First Step
Design Circuits on Tinkercard
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, ULTRASONIC SENSOR, Rgb Led,Sensitive Resistance Light Detection ,and resistor of 220 ohm.
i placed the LED in the breadboard On the upper Right side.
i placed the ULTRASONIC SENSOR in the breadboard On the upper left side.
connect the negative leg of LED with a resistor on the breadboard.
connect the Red leg of LED with a Wires on the Arduino (pin 8).
connect the Green leg of LED with a Wires on the Arduino (pin 9).
connect the Blue leg of LED with a Wires on the Arduino (pin 10).
connect the negative leg of ULTRASONIC SENSOR with a Wires on on the breadboard..
connect the Trig leg of ULTRASONIC SENSOR with a Wires on the Arduino (pin 6).
connect the Echo leg of ULTRASONIC SENSOR with a Wires on the Arduino (pin 5).
connect the Positive leg of ULTRASONIC SENSOR with a Wires on on the breadboard..
i placed the Sensitive Resistance Light Detection in the breadboard On the upper Center side.
connect the Positive leg of Sensitive Resistance Light Detection with a Wires on on the breadboard.
connect the negative leg of Sensitive Resistance Light Detection with a Wires on on the breadboard.
connect the AO leg of Sensitive Resistance Light Detection with a Wires on the Arduino (A0).
i placed the Buzzer in the breadboard On the upper right side.
connect the negative leg of Buzzer with a Wires on the Arduino (A1).
connect the Positive leg of Buzzer with a Wires on the Arduino (GND).
Design circuits on tinkercad using this component :
1- Breadboard
2- Arduino Uno
3-ULTRASONIC SENSOR
4- RGB led
5- 3 resistors
5- Buzzer
6- Sensitive Resistance Light Detection
7- jumber Wires
8- Battery 9v
the circuit on TINKERCAD
The device is a Blind stick the input ultrasonic sensor , Sensitive Resistance Light Detection
and the outputs are lighting RGB LED and Buzzer.
I used 5V adapter as all the components operate with 5V. The LED and the resistor, ultrasonic sensor, Sensitive Resistance Light Detection
So I used 5V to run all components but I changed the adapter to battery 9v to make the blind stick portable
Second Step
Coding on Arduino
This code is written in the Arduino programming language and is meant to control an Arduino board with various sensors and actuators connected to it. Here's a brief explanation of what the code does:
The first few lines define some integer variables and assign them to specific pins on the Arduino board. These pins will be used to control various sensors and actuators.
The readUltrasonicDistance function is defined to measure the distance between an object and the ultrasonic sensor. It takes two arguments: triggerPin and echoPin, which are used to trigger the sensor and read its output, respectively. The function sends a trigger signal to the sensor, waits for an echo signal to be received, and then calculates the distance based on the time it took for the echo to arrive.
In the setup function, the input/output modes for each pin are set using the pinMode function. The initial states of the output pins are also set to LOW using the digitalWrite function, and the Buzzer is turned off using the noTone function.
In the loop function, the readUltrasonicDistance function is called to measure the distance between an object and the ultrasonic sensor. If the distance is less than 30 cm, the Buzzer is turned on and the green LED is turned off. If the distance is greater than or equal to 30 cm, the Buzzer is turned off using the noTone function.
The light sensor is also read using the analogRead function, which returns a value between 0 and 1023 based on the amount of light detected. If the light level is below 500, all LEDs are turned off. If the light level is above 500, the Buzzer is turned off, and the red, blue, and green LEDs are turned on.
Third Step
Design Circuits on Real and test it
Video of Electric Circuit
I changed the adapter to battery 9v to make the blind stick portable
Video of Electric Circuit
with battery
Fourth Step
Make enclosure (cardboard)
The materials used
i used this material to make blind stick , then put the component
Plastic pipe
Box of cardboard
Finally
Video of Blind stick
My device needed to be connected to electricity, but it was moving, so I had difficulty moving it with the adapter, so I resorted to the battery 9v solution so that I could move it easily
I used more than input and output great challenge And this is help me in the final project
this week asmaa I explained to us
how to make light mask with (led and battery)
It was very interesting and I was very happy.
thanks asmaa
Title of Media