0% found this document useful (0 votes)
18 views

Lab ECE 2

This document summarizes three Arduino circuit experiments conducted as part of an introductory engineering lab course. In the first experiment, students simulated circuits with motors and an LED. The second experiment involved building a circuit with an LED that blinked according to Arduino code. The third experiment used a motor controller circuit to rotate motors clockwise and counterclockwise. A second project involved building a "spaceship interface" circuit with multiple LEDs controlled by a switch and Arduino code. Issues with incorrectly placed wires were troubleshot. Functions like delay() were used to control LED blinking speed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lab ECE 2

This document summarizes three Arduino circuit experiments conducted as part of an introductory engineering lab course. In the first experiment, students simulated circuits with motors and an LED. The second experiment involved building a circuit with an LED that blinked according to Arduino code. The third experiment used a motor controller circuit to rotate motors clockwise and counterclockwise. A second project involved building a "spaceship interface" circuit with multiple LEDs controlled by a switch and Arduino code. Issues with incorrectly placed wires were troubleshot. Functions like delay() were used to control LED blinking speed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ELCE 100 – Introduction to Engineering (ECE Lab) REPORT

School of Engineering and Digital Sciences


Department of Electrical and Computer Engineering
[Fall, 2023]

[Aruzhan Temreshova, 202154971]

[Kamila Bissenbayeva, 202152713]


[Nurzhaina Dubek, 202235998]
[Zhambyl Muratkhan, 202249502]
LABORATORY 2: Introduction to Arduino and circuits
26.10.2023
1) TinkerCad simulation:

1. Exercise 1 – motors:

Circuit schematics:

Figure 1. Ex1 circuit schematics

TinkerCad link:

https://www.tinkercad.com/things/b8jAl4BDDC3-
exercise1/editel?sharecode=FZ4S49pea6MCfcI3Id1s37_7dbluv_u62QpMSYTC7XQ

Comments on circuit:

This circuit consists of two batteries of the same voltages, resistor of 220Ω resistance and
DC motor. Basically, this circuit is rotating the motor with a speed which is proportional to the
voltage of the system. This exact system has a total voltage of approximately 3V, so the speed of
the motor in this case is 1323 rpm which can be seen on Figure 2.

Figure 2. the speed of the motor

2. Exercise 2 – Hello world:

Circuit schematics:

2
Figure 3. Ex2 circuit schematics

TinkerCad link:

https://www.tinkercad.com/things/gS3tKkHfkxG-
exercise2/editel?sharecode=0ffhPikbploNIGLmBvN3GW96pU5vn7Gulqman672SXM

Comments on circuit:

In this circuit there can been seen the usage of the Arduino uno, resistor of 200Ω and the red
LED. In this circuit can be seen the light emitting from the LED (figure 4) according to the
pattern which was in the prewritten code of the Arduino uno (Figure 5). If we explore the code in
Arduino, it can be seen that the LED if the circuit is acting the same as the built-in LED of the
Arduino within the period of a second.

Figure 4. the light emitting circuit.

3
Figure 5. the prewritten code of the Arduino.

3. Exercise 3 – wheels:

Circuit schematics:

Figure 6. Ex2 circuit schematics

TinkerCad link:

https://www.tinkercad.com/things/5xk5ffTN44I-
exercise3/editel?sharecode=keyk22EZMVsbGFRr2_684BMK5Af3Dscl0BL__RYu8bM

Comments on circuit:

This scheme consists of two DC motors connected to the Arduino Uno through the
L293D motor controller. In this exercise two motors at first need to be rotating clockwise and
then counterclockwise. This can be achieved via coding the Arduino, so the code and the circuit
can be seen on Figure 7. It can be seen that the motors are starting movement first clockwise
(Figure 7), represented with the positive numbers (Figure 8), then counterclockwise, represented
with the positive numbers. If we explore the written code, it can be seen that the direction of the
rotation of the motor changes every second. Their speed appears to be the same 9393 rpm.

4
Figure 7. the circuit with the code rotating clockwise

Figure 8. the circuit with the code rotating counterclockwise

2) Experimental part:
Project 1: LED using Arduino as power source.

Introduction:
In the first project the aim was to comprehend the Arduino technology and enlighten how
to build circuits on a breadboard with certain components and understand their functionalities.

Objectives:

● To understand how the Arduino Uno microcontroller works


● To familiarize with the electrical components such as resistors, switchers and
the LED

5
Methods:
Firstly, we connected Arduino Uno to the breadboard with wires to use it as a power
supply of 5 volts. The red wire was connected to the 5V power, and the dark one was attached to
the ground. After that the 220-ohm resistor and switch were connected. Next, the anode side of
the LED was placed after to the other side of the switch, while the cathode side was connected to
the ground with another wire to make a closed circuit. Finally, a USB port was plugged in.
Afterwards, the series and parallel circuits were built in the same pattern, but involving
one more switch. In the first case, only a wire was needed between the two switches, and another
one between the second switch and the LED. However, in the parallel circuit, both switches were
wired to the resistor separately, and their ends were connected to the LED.

Results:

Figure 9. The simple circuit

Figure 10. The series circuit

6
Figure 11. The parallel circuit

Discussion:
The first circuit was easy to make by just looking at the illustration. The LED, wires, a
switch and a resistor were used. Only after clicking the switch, the LED would light up. After
which the remaining two circuits were more complicated to build, but they also performed
successfully. More wires and one more switch was used. When the circuit was made in series
both switches were required to be pressed to light up the LED. In the second case, where they
were placed in parallel, either of the switches could be pressed to give the same result.

Project 2: Spaceship Interface


Introduction:
Project 2 involved creating a more complex circuit on Arduino, also known as Spaceship
Interface. The main objectives of the project were to build a circuit panel with LEDs and digital
pins that can be controlled and use a code to run an Arduino program. The program behavior was
further explored by calling different functions and arguments in the programmed code.
The list of components used in the experiment include breadboard, Arduino Uno, two the
same colored LEDs, one different colored LED, a switch, 10k-ohm and 220-ohm resistors, USB
cable, and six jumper wires. Figure 4 represents the schematics of the constructed circuit.

7
Figure 12. Detailed setup of circuit for Project 2

Methods:
To start with, we connect the breadboard to Arduino’s 5V and ground pin with two wires
as a source of power. Two identical (green) LEDs and a different (red) colored LED are placed
on the breadboard. The short leg of it, a cathode, is attached to the 220-ohm resistor and the next
leg to the pins 3-5, respectively.
Next, we put the switch in such a way that it joined the power from one side and pin 2 on
the Arduino side. Another 10k-ohm resistor is needed to connect the ground and switch when the
switch is open. This resistor ensures that it states LOW when the switch is closed, and no voltage
is available.

The last step of implementing this program is to create a code that manages the behavior
of LEDs using the switch. First, the main functions setup() and loop() are declared to tell
Arduino what to do. The setup() is executed only once to configure digital pins to be an input or
output, whereas loop() runs repeatedly to check the voltage level of an input. One more function
used in the code is if() and else statements. This function allowed us to turn on and off the red
and green LEDs when we pressed the switch depending on the arguments we wrote in the
digitalWrite().

Results:

8
Figure 13. The constructed circuit

Figure 14. The circuit when pressing the switch

Discussion:
According to our objective for this lab work, we built the circuit controlled by the
Arduino program. In the beginning the circuit we constructed did not perform as expected.
Although the red LED was turned on, the green LEDs did not work when we pressed the switch.
At first, we tried to rewrite the Arduino code several times on different laptops and computers in
the lab room, thinking that we might have made a minor error in our code. However, after
reviewing our circuit, we found out that the problem was with the circuit itself. It turned out that
we accidentally plugged one wire into the wrong hole, which led to no access to the voltage
supply for the green LEDs.
After correcting our inaccuracy, we were able to reach all the aims of the project. As
intended, the red LED lit up when there was HIGH voltage for digital pin 3 and the green LEDs
were turned off due to LOW voltage for pins 4 and 5. As opposed to it, when we pressed the
switch, the green LEDs started blinking while the red one was turned off for the same reason as
in the previous part of the experiment. Based on our experience of creating a complex Arduino
program, it is recommended to be extra careful while placing the wires, LEDs, and other
components of the circuit.

9
Furthermore, we were able to change the speed of the light flashing using the function
delay() in our programmed code. The delay() function in this case sets the time interval during
which the light is not emitting from the LED. inside the bracket of the delay() function you need
to write the time period and it will be set as the time of the emission of light. So, this function
gives an opportunity to change speed or in other words set the period of the light.

10

You might also like