NAME:
MATRIC NO:
DEPARTMENT: MECHATRONICS ENGINEERING
COURSE CODE: MTE206
GROUP: GROUP 8
PRATICAL NO: ONE (1)
TITLE: BLINKING A LED BULB WITH ARDUINO USING TINKERCAD
AIM/OBJECTIVE: (I) TO BLINK A LED LIGHT WITH ARDUINO UNO R3
(II) TO GET FAMILIAR WITH TINKERCAD
DATE: 20TH JUNE, 2024.
APPARATUS: LED bulb
Breadboard
Arduino uno R3
Resistor
jumper wires
EXPERIMENTAL SETUP:
PROCEDURES
1. I went to my web browser and search for tinkercad
2. I created an account and head to new project
3. I read the instruction on the screen, then proceeded to my project
4. From the right side of the screen, I saw all the apparatus needed
5. I located the Arduino, drag it to the interface and named it
6. I did that also for the breadboard and LED bulb.
7. Then I brought out a resistor and changed the resistor to 200ohms
8. Using a jumper wire, I connected the negative line of the breadboard to the ground (GND) of the power
side of the Arduino
9. Using a jumper wire, I connected the positive (+) line of the breadboard to the 5V power pin of the
Arduino
10. I put the LED on line d-8&9 and connected the resistor to the cathode and on the negative line
11. I connected a jumper wire to the anode and pin 13 on the Arduino
12. Then I went to the code section and wrote a C program to control my LED bulb
PRECAUTIONS
1. I ensure I add a resistor to the LED bulb to prevent burnout
2. 2. I ensure the power was disconnected before making any connection adjustment
3. 3. I ensure the jumper wires were connected to the right pin when connecting
4. I noted the cathode and anode in the LED bulb were connected to the right source while performing the
experiment
5. I ensure the code was free from error before inputting into the Arduino
OBSERVATIONS
1. I observed the LED turns on (lights up) when the digital pin is set to a high level (5V).
2. I observed It turns off when the digital pin is set to a low level (0V).
3. I observed the LED blinks at a regular interval to the time and delay I set in my code
COMPARISON OF THEORETICAL AND PRATICAL RESULTS
In theory, I use pin d8 then program it to output a high level (5V), for the LED to turn on. Then program to output a
low level (0V) to turn the LED off. I then repeated this process, to achieve a blinking LED. While the theoretical
implies Opening Tinkercad and create a new circuit, adding an Arduino Uno board to the workspace, Connect an
LED to the board. Then I connected the LED’s anode (positive, longer leg) to a digital pin (pin 13), I then Upload a
simple Arduino sketch that toggles the pin high and low with delays to create the blinking effect.
CONCLUSION
I was able to perform basic operation like blinking and LED bulb using TinkerCAD on my computer.
PRATICAL NO: TWO (2)
TITLE: CONTROLING A LED BULB BRIGHTNESS WITH ARDUINO USING TINKERCAD
AIM/OBJECTIVE: (I) TO CONTROL A LED BRIGHTNESS LIGHT WITH ARDUINO UNO R3
(II) TO GET FAMILIAR WITH TINKERCAD
DATE: 20TH JUNE, 2024.
APPARATUS: LED bulb
Breadboard
potentiometer
Arduino uno R3
Resistor
jumper wires
EXPERIMENTAL SETUP:
PROCEDURES
1. I Open tinkercad and create a new circuit
2. I added an Arduino uno board and a breadboard to my workspace
3. I connected an LED to a digital pin on the Arduino
4. I place a resistor of 200 ohms in series with the LED
5. I added a potentiometer to the breadboard
6. I connect one of the potentiometers to 5V
7. I then connect the other end of the potentiometer to the ground (GND)
8. I connect the middle pin of the potentiometer to analog pin on the Arduino
9. Then on my coding iDE, I wrote a code that reads the analog value from A0 using analogRead()
10. , I map the analog value to a range using map()
11. I adjust the LLED brightness using analogwrite() on the specified digital pin
PRECAUTIONS
1. I ensure I add a resistor to the LED bulb to prevent burnout
2. 2. I ensure the power was disconnected before making any connection adjustment
3. 3. I ensure the jumper wires were connected to the right pin when connecting
4. I noted the cathode and anode in the LED bulb were connected to the right source while performing the
experiment
5. I ensure the code was free from error before inputting into the Arduino
OBSERVATIONS
1. As I turn the potentiometer knob, the LED’s brightness changes.
2. I observe when the potentiometer is at its minimum position, the LED is dim.
3. I notice a smooth transition between brightness levels as I turn the potentiometer.
COMPARISON OF THEORETICAL AND PRATICAL RESULTS
In theory, we use pulse width modulation (PWM) to vary the brightness of an LED which rapidly switches the LED
on and off at different duty cycles. By adjusting the duty cycle, I control the average voltage applied to the LED, thus
changing its brightness while the practical implements Open Tinkercad and create a new circuit, add an Arduino
Uno board and a breadboard to my workpiece, connecting an LED to a digital pin (e.g., pin 9) on the Arduino,
connecting a resistor in series with the LED, adding a potentiometer to the breadboard., connecting one end of the
potentiometer to 5V, the other end to ground (GND), and the middle pin (wiper) to analog pin A0. And finally,
writing an Arduino sketch that reads the analog value from A0, maps it to a range (e.g., 0-255), and uses
analogWrite() to adjust the LED brightness.
CONCLUSION
I was able to control an LED bulb brightness by ardiuno on tinkercad using my computer