Professional Documents
Culture Documents
hobbyist, students and enthusiast alike uses microcontrollers for their own
education use microcontrollers and play a huge role in the course syllabus.
the users want. It has many features compared to PICs and has a wide range of
The Raspberry Pi is a low cost, credit-card sized computer and has the
ability to interact with the outside world. It can be used to make electronic
projects and users can learn the Python programming language. From what the
researchers have observed from the theses section in the library, out of fifty
(50) researches gathered from year 2009-2014, only twenty-eight (28) have
used microcontrollers, only two (2) have used the Arduino platform and no one
used the Raspberry Pi. This is due to the students having little to no knowledge
1
of the Raspberry Pi. The students are not exposed to new technology and are
lagging behind the time. The introduction of Arduino is a good start but it is not
widen the knowledge of the students but also help them be more competitive.
b. Interfacing
c. Data communications
2
III - Significance of the Study
programming and circuit design. With this circuit trainer, we won’t be needing
computer the size of a credit card which only requires a small power source.
Due to the cheap price of the minicomputer, students won’t have to worry
breaking it during experiments. In the near future, single board computers will
IV - Target Beneficiaries
trainer which will be put into use in three engineering courses of the University
might be able to build or create other designs or projects which may further
3
Professors. Professors will also benefit from this project. Since the
traditional way of teaching is through theory, professors could use the trainers
sources like books, magazines, dissertations and journals which have been
beneficial to the development of the circuit trainer. The following contents has
connection with the current project on which have been studied by the
researchers.
Laboratory Trainer
fundamental principles of the field of study. Tools for teaching electronics have
before training schools and designers included breadboards into cases which
also contain onboard power supplies, function and pulse generators, switch
banks, LED indicators, and many other frequently used components. Today,
design kits offering built-in generators, power supplies, and many newer
features ranging into hundreds of dollars. Nevertheless, these kits are cheaper
4
and take much less bench space than having each piece of gear. A used analog
(http://www.electronicproducts.com).
found on their location had proved that the trainer is useful for experiments in
a study regarding low cost digital trainer using a parallel printer port as a
5
students during the author’s Digital Electronic course. The student feedback
Raspberry Pi
has penetrated the market of embedded systems and research (Pajankar, 2015).
According to Rouse (2012), the Raspberry Pi is about the size of a credit card,
has a 32-bit Advanced RISC Machines (ARM) processor and uses a Raspbian
Wheezy distribution of Linux for its default operating system (OS). It can be
programmed with Python or any other language that will compile for ARM v6.
6
workshops in June 2014 introducing students and teachers to computing with
the Raspberry Pi. The workshops used specifically designed electronics kits,
including Raspberry Pis and peripherals, that were handed over to the partner
15,000 free microcomputers were given to schools around the UK, with a view
Raspberry Pi Foundation hopes the free devices will inspire children to take up
coding. The pared-down Raspberry Pi, launched in 2012, was already a huge
7
Raspberry Pi 2 Model B
Model B. The Raspberry Pi 2 is the one that is most suitable for the average
performance from its predecessor, and represents the first time the company
has upgraded the CPU at the heart of the microcomputer. With the switch to a
Raspberry Pi is now multi-core for the very first time. It's also accompanied by
1GB of RAM – double that of the B+ – and the USB ports can now supply up
(https://www.raspberrypi.org).
graphics processor as its forefathers, but that was already a well built processor
that punches above its weight class with full 1080p video output capabilities.
The Raspberry Pi 2 also features an Ethernet port, a full HDMI port, a jack for
8
combined 3.5mm audio and composite video, and a micro-SD card slot. Users
will appreciate the 40 GPIO pins (the original Model B had 24), and camera
serial interface (CSI) and digital serial interface (DSI) connectors for direct
with existing hardware and software projects, so for upgraders, the transition
will be easy. Most most users will only need to re-download Raspbian OS to
One of the powerful feature of the Raspberry Pi is the GPIO. They are
pins (17 GPIO) whereas the models B+ and B2 come with 40 pins (26 GPIO).
The models B+ and B2 are pin compatible with models A and B (Prasad,
2014). Users can drive LEDs, spin motors, or read button presses because of
the Raspberry Pi’s biderectional GPIO. Driving the Raspberry Pi’s I/O lines
which is unusual since many devices (such as sensors, logic and functional
potential dividers and level shifters when interfacing 5 volt devices with the
9
attention to the max current intensity that can be delivered by the pins. This is
very important if users don’t want to damage the Raspberry Pi board. Also, the
3.3V power supply can deliver up to 50mA (or 0.165W which is really low).
The intensity of 50mA is the total current intensity for all pins simultaneously.
A single pin can deliver from 2mA to 16mA. It’s not suggested to draw a lot of
current. The Raspberry Pi GPIO is not designed to supply much power and
interface the GPIO and the final device with an amplification stage. Users
pin. To control such a small motor, users should use an interface with some
transistors and resistors. The general rule is to limit the current to the lowest
possible value (2mA or 3mA or even lower per pin). A value less than 1mA is
perfect but requires an amplifier to control a LED or a fan for example. Shown
in Figure 4 are the Raspberry Pi Model A and B’s physical pins and pin
10
Figure 5. Raspberry Pi A+, B+ and 2 Pin Configuration
Raspbian has been the default distribution (distro) for the Raspberry Pi
11
The Raspbian operating system is one of the most popular operating
that is easy to use and with a good support around the world. The Raspbian OS
is simple and familiar. Also, it is the best platform for teaching beginners to
work with the Raspberry Pi. Once the Linux operating system becomes familiar
to the user, it will be like riding a bicycle; users will never forget how to do it.
software, and if the user needs more for the Raspberry Pi, users can add
suites, etc.
Sensors
Sensors are sophisticated devices that are frequently used to detect and
property "temperature" and converts it into a signal that the controllers can
interpret. Robotics rely on sensors mainly on two reasons. First of all, they
make the robot become more autonomous because it can perceive its own
12
perceives. Sensors are also important to robotics for remote operation, because
they give the remote users the ability to "see" what is going on and make
decisions about what the robot should do next (Stansbury, 2002). Shown in
resolution, cost, and the repeatability of the sensors. It can be classified based
on power or energy supply requirement like active sensors that requires power
supply before using and passive sensors that do not require power supply
With the specialized advancement, more sensors are fabricated with Micro-
13
Electronics-Mechanic-Systems (MEMS) innovation. This regularly offers the
define a system that transmits the identity (in the form of a unique serial
has similarities to the bar code identification systems that people see in retail
stores every day; however, one big difference between the RFID and the bar
code technology is that RFID does not depend on the line-of-sight reading that
health care, retail, and manufacturing, RFID is used to track vehicles, cattle,
shipping containers, tools and equipment, and even personnel -- and in some
to the physical objects to be tracked. RFID tags are available as strips, chips,
picks up the energy, the tag sends back its unique identification number to the
14
2003). Shown in Figure 8 is an example of an RFID reader and tags
(http://www.14core.com).
engineering.
terms of the GPIO, the pins can only tolerate 3.3 volts compared to Arduino
Uno which can accept 5 volts from various outside devices. Aside from the
voltage tolerance, the Raspberry Pi 2 model B has only 1 PWM output. The
15
VII - Methodology
This section contains procedures taken into account for the development
A. Research Design
The research study was outlined using the structure of applied research.
It involved the application of basic principles about circuits and basic concepts
will be used to communicate with other devices. The design structure was
B. Conceptual Framework
the trainer based on minimum requirements of CHED and the course syllabus
implementing programming and circuit design subjects. Topics that are covered
designed a trainer and construct the main board that contained various circuit
16
Input Process Output
Experiment gathering
from various sources
based on the course
syllabus and or the
CHED Memorandum Hardware development
Order 13 Series of Component
2008 gathering
Hardware Create circuit
corresponding to Raspberry Pi
GPIO the component Laboratory circuit
Interfacing Test functionality trainer
Data Make into printed
Communications circuit board
Design Constraints Embed into an
enclosure
Economic
Environmental
Manufacturability
Sustainability
Both designs have the same modules and components. Components like
resistors, and transistors are soldered directly into the board. The difference is
mainly found in the circuit board. In Design A, the components are soldered
directly into the circuit board while in Design B has female pinheaders soldered
and the components are attached later. See figure 9 for Design A and figure 10
for Design B.
17
Figure 9 Design A
Figure 10 Design B
proposed designs:
Design A and Design B’s cost are almost comparable. However, in the long run
dismantled and remade while Design B can be easily replaced with new
18
Table 1. Costing
Design A Design B
Main Components Price Main Components Price
1 PCB 15x12 PHP 180 2 PCB 9.5x6.5 PHP 123.5
1 Raspberry Pi Kit PHP 2,678 1 Raspberry Pi Kit PHP 2,678.04
10 Female Pinheader PHP 80 30 Female Pinheader PHP 240
Total PHP 2938 Total PHP 2942
B as the main computer. Considering that the Raspberry Pi only uses 5 volts, 2
amperes direct current electricity, we can’t deny the fact that this consumes less
helps lessen the consumption of electricity and will lead to less use of fossil
fuels. Also, the researchers will use little to no hazardous materials in making
complete the trainer. This included the physical dimensions, circuit design, and
time consumption. With design A, the circuit components are soldered directly
to the circuit board while design B has pin headers that will be used to insert
wasted when a single component busts. Since the trainer is to be used by a lot
19
up of a design that will make replacement easy. Design B is more sustainable
D. Trade-offs
Somewhat not
Economical in the long
economical in the long
Economical run because of
run because of non-
replaceable components.
replaceable components.
Uses 5 volts 2 amperes Uses 5 volts 2 amperes
Environmental
power source. power source.
Components are
Components are directly
removable because of
Manufacturability soldered to the circuit
soldered female
board.
pinheaders.
Easier to sustain because
Less sustainable in the
Sustainability of easy component
long run
replacement.
Design A was discarded by the researchers since it is not that economic
and not easy to sustain as mentioned above. Design B has been chosen as it is
E. Design Standards
20
1. IPC-2221 (Generic Standard on Printed Board Design).
This standard establishes the generic requirements for the design of organic
boards and the quality and reliability assurance requirements that must
F. Research Procedure
The study was focused on creating a circuit trainer using the Raspberry
Pi.
the functionality.
3. After the functionality test, the circuits were made into a printed
21
The circuit trainer had several different laboratory exercises followed by
22
Testing Procedure:
This section contains the final design of the trainer and the results and
findings attained from the series of tests conducted to serve the purpose of the
study.
designed a trainer that the parts are easily replaceable incase a component
doesn’t work anymore. The dimensions of the enclosure of the trainer are 16
inches.
23
Shown in Figure 12 is the back part of the trainer which shows the AC
socket and the switch for turning on the trainer. There are two circuit boards as
shown in Figure 13. The dimensions of each board are 9.5 inches by 6.5
complicated components like motors and sensors. A 7-inch monitor is the main
24
The trainer has 26 components. It consists of components such as LEDs,
display, RGB LED, dot-matrix display, 74HC595, 16x2 LCD, LED bar graph,
DC motor, servo motor, stepper motor, relay, passive infrared sensor, tilt
expansion board and an expansion cable were also used. Shown in Figure 7 are
Shown in Table 3 are the results of the test procedures conducted for the
LED display. The objective was to ensure that the lights emitted by the LEDs
were stable. The tabulated data below show that the testing conducted was
successful.
25
Table 3. Light Emitting Diode (LED)
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 4 are the results of the test procedures conducted for the
Active buzzer module. The objective was to make an active buzzer sound and
ensure that it is functioning as it should be. The table below indicate that it was
working properly.
26
Table 4. Active Buzzer
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 5 are the results of the test procedures conducted for the
Passive Buzzer. The objective was to make an active buzzer sound and ensure
that it is functioning as it should be. The table below indicate that it was
working properly.
27
Table 5. Passive Buzzer
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 6 are the results of the test procedures conducted for the
Tilt Switch. The objective was to know whether or not the tilt switch works as
it should be by tilting it to a certain angle. The tabulated data indicate that the
28
Table 6. Tilt Switch
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 7 are the results of the test procedures conducted for the
button control. The objective was to know where or not the buttons are
consistent when pressed. The result of the test was successful as shown in the
29
Table 7. Button
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 8 are the results of the test procedures conducted for the
Relay. The objective to know where or not the relay works as intended. The
relay produces a sound whenever it opens or closes. The tabulated data below
30
Table 8. Relay
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Show in Table 9 are the results of the test procedures conducted for the
RGB LED. The objective was to ensure that all three colors of the RGB led are
okay and works at is it should. The tabulated data below show a result that the
31
Table 9. RGB Led
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 10 are the results of the test procedures conducted for
the 7-Segment Display. The objective was to guarantee that the lights emitted
by the nodes of the segment were equally distributed. The tabulated data below
is the trials conducted during the testing which give a successful result.
32
Table 10. 7-Segment Display
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 11 are the results of the test procedures conducted for
the 74HC959. The objective was to ensure that the IC can drive the 7-segment
display and the dot-matrix display. The tabulated data below is the trials
33
Table 11. 74HC595
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 12 are the results of the test procedures conducted for
the 4-digit 7-Segment Display module. The objective was to ensure that all
LED nodes of the display works. The tabulated data below shows that the
34
Table 12. 4-Digit 7-Segment Display
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 13 are the results of the test procedures conducted for
the 16x2 LCD. The objective was to know whether the LCD displays the
intended output. The data below tells that the testing was successful.
35
Table 13. 16x2 LCD
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 14 are the results of the test procedures conducted for
the Matrix Keyboard. The objective was to ensure that all keys are working.
The tabulated data below tells that the testing was successful.
36
Table 14. Matrix Keyboard
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 15 are the results of the test procedures conducted for
the Ultrasonic Sensor. The objective was to ensure that the sensor
communicates correctly with the Raspberry Pi. The result of testing was
37
Table 15. Ultrasonic Sensor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 16 are the results of the test procedures conducted for
the Temperature & Humidity Sensor – DHT-11. The objective was to ensure
the interconnection of the GPIO and the sensor was functional. The data below
38
Table 16. DHT11
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 17 are the results of the test procedures conducted for
the Dot-Matrix Display. The objective was to ensure that all lights are
functional and lights emitted are equally distributed. The tabulated data below
39
Table 17. Dot-Matrix Display
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 18 are the results of the test procedures conducted for
the Photoresistor. The objective was to measure the variable resistance based
on the light intensity. The tabulated data below show that the testing was
successful.
40
Table 18. Photoresistor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 19 are the results of the test procedures conducted for
the Thermistor module. The objective was to measure the variable resistance
41
Table 19. Thermistor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 20 are the results of the test procedures conducted for
the LED Bar Graph. The objective was to ensure that all light nodes of the LED
Bar Graph are all functioning. The tabulated data below tells that the testing
was successful.
42
Table 20. LED Bar Graph
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 21 are the results of the test procedures conducted for
the DC motor module. The objective was to ensure that the motor turns
according to the state commanded by the Raspberry Pi. The states of the DC
motor include forward, reverse, acceleration, deceleration and stop. The testing
43
Table 21. DC Motor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 22 are the results of the test procedures conducted for
the stepper motor. The objective was to ensure that the Raspberry Pi connected
to the motor driver are communicating correctly and that the motor turns
according to the Pi’s command. The tabulated data below show that the testing
was successful.
44
Table 22. Stepper Motor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 23 are the results of the test procedures conducted for
accelerometer works and the output changes depending on the axis of the
component. The tabulated data below show that the testing was successful.
45
Table 23. ADXL345
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 24 are the results of the test procedures conducted for
the PS2 Joystick. The objective was to ensure that all states of the joystick, left,
right, up, and down, are working properly. The table below show that the
46
Table 24. PS2 Joystick
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 25 are the results of the test procedures conducted for
the Potentiometer. The objective was to ensure that the output of the
potentiometer changes whenever the knob is turned. The tabulated data below
shows that the program used and the device are functional and stable.
47
Table 25. Potentiometer
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 26 are the results of the test procedures conducted for
the Passive Infrared (PIR) Sensor. The objective was to know where or not the
PIR sensor detects motion. The tabulated data below shows that the program
48
Table 26. Passive Infrared (PIR) Sensor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 27 are the results of the test procedures conducted for
the Servo motor. The objective was to ensure that the servo motor turns
according to the state command of the Raspberry Pi. The states are 0 degrees,
90 degrees, and 180 degrees. The tabulated data below show that the testing
49
Table 27. Servo Motor
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
Shown in Table 28 are the results of the test procedures conducted for the
RFID. The objective was to ensure that there is data communication between
the RFID card and the Raspberry Pi. The tabulated data below show that the
50
Table 28. RFID
Functional
1 Successful
2 Successful
3 Successful
4 Successful
5 Successful
6 Successful
7 Successful
8 Successful
9 Successful
10 Successful
11 Successful
12 Successful
13 Successful
14 Successful
15 Successful
51
Conclusions
Based on the findings of the study, the researchers came up with the
following conclusions:
were GPIO like LEDs and buttons, interfacing like motors, and data
Recommendations
Based on the results of the tests conducted by the researchers and the
model available.
52