Вы находитесь на странице: 1из 10

MECHATRONICS ME156P SECTION E03 EXPERIMENT NO.

1
Experiment TITLE: SPACESHIP INTERFACE

Salvado, John Henry M. Date Performed: Nov. 13, 2019


2013102950 Date Submitted: Nov. 20, 2019
Professor: Engr. Edward Ang Course and Year: MFGE/3
Group # 4

Discussion:
This experiment titled the spaceship interface is about controlling the power
states of the Arduino. The experiment wants us to emulate a spaceship interface out of
an old science fiction movie. Where in while the button isn’t pressed a green light is
constantly lit, then when the button is pressed it shuts off and a red LED turns on. A
countdown starts then it turns off then another Red LED turns on, then another
countdown then it shuts off and the green LED turns on. In short it turns LEDs on and
off with a time delay in between after pressing a button. To achieve this, we will be
controlling the digital pins of the Arduino. Which can read two states which are if there is
voltage or not. These two states are call High and Low, High being a powered state and
low being a non-powered state. To tun on a pin we use the command DigitalWrite() and
use HIGH.

Learning Objectives:
This experiment’s objectives are to familiarize the students with working on the
Arduino. This first experiment allows the students to tinker with the Arduino and set it up
for the first time. By using a very simplified set up any student can properly connect all
the components together and learn how to properly check the connections if they are
indeed working. In line with the ABET objectives student are able to apply their
knowledge in engineering and to further improve on them.

The experiment’s programming side allows the students to tinker with the given
code. Adjusting the variables to achieve different results. This also exercises the
students Data gathering skills, when checking if changing different variables in the
program is achieved in practice.
Course Objectives and Anticipated Student Outcomes:
“a” to “k ” and “ L ”outcomes. The ABET outcomes taught and assessed in this course
are:

“A” Ability to apply knowledge of mathematics, science, and engineering


- The ability to apply knowledge of science and engineering was practiced in
this experiment as we were allowed to tinker with the Arduino and its code.
“B” Ability to design and conduct experiments as well as analyze and interpret data
- We were only able to conduct and experiment and change around values to
interpret different results.
“C” Ability to design a system to meet desired needs.
- We were not able to design a system to meet desired needs, as we only
changed around values to see different results.
“D” Ability to function on multidisciplinary teams
- We were able to spread out the workload among the group members evenly
so that each member has a role in the experiment.
“E” Ability to identify, formulate, and solve engineering problems.
- We were able to identify certain errors in our code and our set up. We were
able to confirm that some of our wiring wasn’t connected properly and we
were able to fix the issues in both the hardware and software side of the
experiment.
“F” Understanding of professional and ethical responsibility
- We were able to work independently as a group and finished the experiment
responsibly
“G” Ability to communicate effectively
- We were able to communicate together as a group and finished the work
efficiently.
“H” Broad education necessary to understand the impact of engineering solutions in a
global/societal context
- The scope of this experiment was very limited and didn’t tackle any global
issues.
“I” Recognition of the needs for and ability to engage in lifelong learning
- Aside from working as a group this piqued my interest in the programming
side of the Arduino experiments.
“J” Knowledge of contemporary issues.
- In the current Philippine situation we lack innovators on that could compete
on a global scale, this experiment could be an eye opener for many students
“K” Ability to use the techniques, skills, and modern engineering tools for engineering
practice
- We exercised our skills in working with the modern engineering tool the
Arduino.
“L” Knowledge and understanding of engineering and management principles as a
member and leader in a team, to manage projects and in multidisciplinary environments
- As a member of the group we were able to acknowledge the different roles
we had to play in the experiment.
Group Assignments/Task done by EACH member:
GROUP NUMBER 2
EXPERIMENT #5
Experiment Title: CNC ROUTER MACHINE Due Date:
1/16/19
Group Member
Name: Brief % Completed
No. Group Member Description of by Members Your Score
Signature: the Work
assigned to
Members

Salvado, John
Henry Assembly of the
1 100% 100
Setup

Roca , Reimbert Programming


2 Randalla and brought 100% 100
Laptop

Mendoza , Carlo E. Calibrated and


3 100% 100
brought laptop

Fernando , Bon
Keno R. Gathered the
4 100% 100
Data

San Juan , Marco P.


Troubleshoot
5 100% 100
the setup

*100% means the member completed his/her assigned work.


By signing this assignment cover sheet, I agree that the percentages stated in the %
completed column reflect the contribution made by me and the other members of the group.
List of materials Needed for the Experiment:

1. USB Data Cable (Yellow)


2. Arduino Uno
3. Bread Board
4. 2 pieces Medium length Connecting Wires (Green)
5. 1-piece Short length Connecting Wire (Green)
6. 2 pieces Red LED
7. 1-piece Green LED
8. 1 Piece Push button Switch
9. 4 pieces Medium Length Connecting Wire (Red)
10. 3 pieces 220 ohm Resistor
11. 1 piece 10k ohm Resistor
Schematic Diagram:

Legend:
1. USB Data Cable (Yellow)
2. Arduino Uno
3. Bread Board
4. 2 pieces Medium length Connecting Wires (Green)
5. 1-piece Short length Connecting Wire (Green)
6. 2 pieces Red LED
7. 1-piece Green LED
8. 1 Piece Push button Switch
9. 4 pieces Medium Length Connecting Wire (Red)
10. 3 pieces 220 ohm Resistor
11. 1 piece 10k ohm Resistor
List of ACTUAL SAFETY procedures implemented in this experiment:
Steps:
1. Identify the different parts needed for the set up
2. Assemble the Spaceship Interface setup, referencing from the manual provided.
3. Assemble all the parts onto the breadboard and connect it to the Arduino Uno.
4. Connect the Arduino Uno to the Laptop using the Provided Data Cable.
5. Open the Arduino Program
6. Referencing from the Manual copy the Code for the spaceship interface.
7. Upload the Code onto the Arduino.
8. Make necessary adjustment to the code if errors are found.
9. Measure the time delay between the LEDs if they correspond with the program.
10. Once data has been confirmed run a second test with different time variables.
11. Repeat confirmation of data gathered.
12. Disassemble the set up and return to the box.

Arduino Code:
void setup () {
pinMode (3, OUTPUT); //sets the pin mode for pin 3
pinMode (4, OUTPUT); //sets the pin mode for pin 4
pinMode (5, OUTPUT); //sets the pin mode for pin 5
pinMode (2, INPUT); //sets the pin mode for pin 2
}
void loop () {
int switchState = 0; //tells the variable that it stores
switchState = digitalRead (2);
if (switchState == LOW) {
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
}
// the codes in the loop starting at switchstate , powers the Green LED in pin 3 as long
as the button is not pressed
else {
digitalWrite (3, LOW);
digitalWrite (4, LOW);
digitalWrite (5, HIGH);
delay (2500);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
delay (2500);
}
// the Code above starting from the else{ comman contains a loop, in this loop once the
push button is pressed, it switches pin 3 into a LOW state , and makes pin 4 a LOW
state , and make pin 5 a HIGH state. After a time delay which would be 2500 ms in here
, it will then make pin 4 a HIGH state and pin 5 a low State, then another time delay of
2500. This is a repeating loop as long as the button is pressed.
}
Data Sheet/ Gathered:
TRIAL 1:
LED # COLOR TIME
1 RED 2.48
2 RED 2.68
3 GREEN 0

TRIAL 2:
LED # COLOR TIME
1 RED 9.99
2 RED 10.11
3 GREEN 0
ANALYISIS:
The only data that we could gather in this experiment was the time delay
between the powering on and off of the LEDs. This was only done to confirm that our
programming was correct. The data we gathered was done using a stopwatch app on
our smartphones. We succeeded with the experiment because the program was easy
to analyze and to tweak. The Data we gathered was also successful because the
variables we set in the program were in line with the data we gathered with human error
playing a big part for the differences in the times.

I learned the basics of the Arduino Uno and how to upload programs to it. I also
learned how to tweak the program provided by the manual to achieve our desired
results.

Recommendation:
I recommend that we be given situations or problems, wherein we have to tweak
the program so that the LEDs react properly to the given situation. This would enhance
our problem solving skills, and our ability to tweak with the Arduino programs.

Conclusion:
In conclusion to this experiment we were able to achieve the objectives set for
us. We were able to set up the Spaceship Interface on the breadboard and Arduino
Uno. We were also able to properly tweak and adjust the program provided to us by the
manual so that it reacts properly when we press the push button on the breadboard. We
were able to program the Arduino so that there is a variable we can adjust so that we
may change the time delay between the powering on and off of the different LEDs.
Answer to Questions:

a. What is “HIGH and LOW” meaning in the experiment programming code.


- This refers to the amount of voltage supplied by the pins.
b. If I change the delay to 1000, what do you thing will happen to the blinking
LED.
- The light will stay powered on for a total of one second.
c. Suggest the undustrial application of this kind of experiment.
- This setup may be used for a Drag tree timing light. The Drag tree is used for
staging of the racecars and to signal the start of the race. There is a certain
time delay between the changing of the lights so this set up is perfect for this
situation.
d. Individually suggest electrical and mechanical standards or codes and locar
or international applicable in the experiment.

Вам также может понравиться