You are on page 1of 42

I.

Introduction

Microcontrollers play a huge role in the electronics world. Electronics

hobbyist, students and enthusiast alike uses microcontrollers for their own

project making. This is because microcontrollers make circuit making easier

since it uses user coded programs. Microcontrollers are even implemented in

schools. For example, in the University of Mindanao, students in the fields of

computer, electrical, electronic engineering and even in the fields of computing

education use microcontrollers and play a huge role in the course syllabus.

Currently, students use the Programmable Interface Controller (PICs) made by

Microchip Technologies. It is great but it is becoming outdated due to the

demands of users to include more features. The Arduino is an example of what

the users want. It has many features compared to PICs and has a wide range of

tutorials online. Due to the popularity of single-board microcontrollers, many

companies have created single-board computers that can recreate

microcontrollers do and also have fast computing capabilities. An example of

this is the Raspberry Pi.

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

enough. If there are new technologies, it should be slowly implemented.

The student’s education will improve if new technologies are

introduced. The introduction of Raspberry Pi is a good start. Thus, developing

a laboratory circuit trainer based on Raspberry Pi will not only widen the

knowledge of the students but also help them be more competitive.

II. Objectives of the Study

This study aimed to develop a Raspberry Pi Laboratory Circuit Trainer.

Specifically, the researchers aim to achieve the following objectives:

1. To develop a circuit trainer that is capable of performing different

kinds of laboratory experiments using the platform of Raspberry Pi.

2. To conduct a function test on various modules and components

included in the trainer in terms of:

a. General-Purpose Input/Output (GPIO)

b. Interfacing

c. Data communications

2
III. Significance of the Study

The development of the Raspberry Pi Laboratory circuit trainer is a new

way of introducing an interactive instructional device that benefits the students

and teachers of the University of Mindanao for courses that involved

programming and circuit design. With this circuit trainer, we won’t be needing

a desktop computer that is bulky. In contrast, the Raspberry Pi is just a small

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

become a hype and will be used by many, so, Raspberry Pi is a good

introduction to create and build educational exercises and projects.

IV. Target Beneficiaries

The researchers aimed to develop a Raspberry Pi laboratory circuit

trainer which will be put into use in three engineering courses of the University

of Mindanao mainly the computer, electrical and electronics engineering.

Through this, the proposed study should benefit the following:

Students. The circuit trainer will be able to develop student’s technical

and academic expertise when it comes to programming and circuit designing.

While doing some or after the completion of laboratory exercises, students

might be able to build or create other designs or projects which may further

help develop their academic skills.

3
Professors. Professors will also benefit from this project. Since the

traditional way of teaching is through theory, professors could use the trainers

to demonstrate the theories discussed.

V. Scope and Delimitations

This study aimed to develop a Raspberry Pi laboratory circuit trainer to

help the students of the University of Mindanao in performing laboratory

experiments on general purpose input/output (GPIO), interfacing and data

communications. The study is also targeted to a number of engineering courses

specifically, computer engineering, electronics engineering and electrical

engineering.

The main single-board computer will be the Raspberry Pi 2 model B. In

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

Raspberry Pi 2 doesn’t have embedded analog-to-digital converter (ADC) and

must be bought separately.

VI. Methodology

This section contains procedures taken into account for the development

of the device. It includes the research design, consideration of multiple designs

and constraints, design standards, and procedures.

4
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

of computers. Also, it involves the application of programming languages that

will be used to communicate with other devices. The design structure was

proven essential for the development of the trainer.

B. Conceptual Framework

The researchers had designed a number of laboratory exercises in using

the trainer based on minimum requirements of CHED and the course syllabus

as shown in Figure 1. This is followed by the computer engineering program in

implementing programming and circuit design subjects. Topics that are covered

by the device are cross-referenced with these guidelines. The researchers

designed a trainer and construct the main board that contained various circuit

modules suited for the laboratory exercises.

Input Process Output

Experiment gathering
from various sources
based on the course Circuit design, circuit Raspberry PI
syllabus and or the testing and board Laboratory circuit
CHED Memorandum fabrication trainer
Order 13 Series of
2008

Figure 1. Conceptual framework of the study

5
C. Multiple Designs and Constraints

The researchers had considered two designs, Design A and Design B.

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.

Figure 9. Design A

Figure 10. Design B

6
The researchers considered the following realistic constraints of the two

proposed designs:

Economic Constraint. Based on the cost analysis as shown in Table 1,

Design A and Design B’s cost are almost comparable. However, in the long run

if ever there will be damages to some components, Design A will have to be

dismantled and remade while Design B can be easily replaced with new

components, thereby making the latter more economical.

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

Environmental Constraint. Both designs A and B has a Raspberry Pi 2

Model 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 electricity compared to a typical desktop computer. With this,

the research 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 the circuit trainer.

7
Manufacturability Constraints. The researchers had considered many

things to 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 the components.

Sustainability Constraints. Design A makes sustainability hard since all

is wasted when a single component busts. Since the trainer is to be used by a

lot of students, there is a possibility of items wearing down. The researchers

came up of a design that will make replacement easy. Design B is more

sustainable because of easy component replacement. Since the trainer is to be

used by a lot of students, there is a possibility of items wearing down. The

researchers came up of a design that will make replacement easy.

D. Trade-offs

Table 2. Constraints summary per design

Constraints Design A Design B

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.

8
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

more economical and has potential for sustainability.

E. Design Standards

After, considering the realistic constraints, researchers opted to pursue

design B and the following industry standards will be followed:

IPC-2221 (Generic Standard on Printed Board Design). This standard

establishes the generic requirements for the design of organic printed boards and

other forms of component mounting or interconnecting structures, including PC

card form factors. The organic materials may be homogeneous, rein- forced, or

used in combination with inorganic materials; the interconnections may be single,

double, or multilayered.

IPC-6011(Generic Performance Specification for Printed Boards).

This specification establishes the general requirements for printed boards and

the quality and reliability assurance requirements that must be met for their

acquisition. The intent of this specification is to allow the Printed Board user

and supplier flexibility to develop optimum procedures for the Manufacture

and Procurement of Printed Boards

9
F. Research Procedure

The study was focused on creating a circuit trainer using the Raspberry

Pi.

1. At the early stage of the research, the proponents have gathered

electronic components that are applicable to the said circuit trainer.

2. Next, create a circuit corresponding to experiment and then test the

functionality.

3. After the functionality test, the circuits were made into a printed

circuit board and the researchers had embedded it to a presentable

enclosure. Shown in Figure 9 is the process flow of how the circuit

trainer was made.

The circuit trainer had several different laboratory exercises followed by

observational questions in order to evaluate student’s progress and learning

regarding on what type of experiment they have performed. The Raspberry

laboratory circuit trainer consists of 26 electronic components. The researchers

have conducted 15 trials per component.

10
Figure 9. Process Flow for the Development of the Trainer

Testing Procedure:

1. Generate a sample Python program to be run by the Raspberry Pi.

2. Connect the component according to correct pinning to the GPIO

pins of the Raspberry Pi

3. Observe the output and collect data

11
VII. Findings of the Study

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.

Raspberry Pi Circuit Trainer

Shown in Figure 11 is the actual design of the trainer. The researchers

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 by 13 inches by 4 inches with cover of dimensions 16 inches by 13

inches. 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

inches. The trainer consists of components from basic electronics to

complicated components like motors and sensors. A 7-inch monitor is the main

display of the circuit trainer.

12
Figure 11. Final Trainer

Figure 12. Final Trainer (Back)

13
Figure 13. Printed Circuit Board

The trainer has 26 components. It consists of components ranging from

simple GPIO components like LEDs to data communication component like

RFID. Shown in Figure 14 are the components found in the circuit trainer.

Figure 14. Components of the Trainer

14
Functionality Test Results

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.

Table 3. Light Emitting Diode (LED)

Functional

No. of Trials Yes No Remarks

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

15
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.

Table 4. Active Buzzer

Functional

No. of Trials Yes No Remarks

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

16
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.

Table 5. Passive Buzzer

Functional

No. of Trials Yes No Remarks

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

17
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

test conduct was successful.

Table 6. Tilt Switch

Functional

No. of Trials Yes No Remarks

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

18
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

tabulated data below.

Table 7. Button

Functional

No. of Trials Yes No Remarks

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

19
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

show that the testing was successful.

Table 8. Relay

Functional

No. of Trials Yes No Remarks

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

20
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

testing was successful.

Table 9. RGB Led

Functional

No. of Trials Yes No Remarks

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

21
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.

Table 10. 7-Segment Display

Functional

No. of Trials Yes No Remarks

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

22
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

conducted during the testing which give a successful result.

Table 11. 74HC595

Functional

No. of Trials Yes No Remarks

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

23
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

experiment was successful.

Table 12. 4-Digit 7-Segment Display

Functional

No. of Trials Yes No Remarks

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

24
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.

Table 13. 16x2 LCD

Functional

No. of Trials Yes No Remarks

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

25
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.

Table 14. Matrix Keyboard

Functional

No. of Trials Yes No Remarks

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

26
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

successful based on the tabulated data below.

Table 15. Ultrasonic Sensor

Functional

No. of Trials Yes No Remarks

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

27
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

shows that the testing was successful.

Table 16. DHT11

Functional

No. of Trials Yes No Remarks

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

28
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

show that the testing was successful.

Table 17. Dot-Matrix Display

Functional

No. of Trials Yes No Remarks

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

29
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.

Table 18. Photoresistor

Functional

No. of Trials Yes No Remarks

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

30
Shown in Table 19 are the results of the test procedures conducted for

the Thermistor module. The objective was to measure the variable resistance

based on temperature. As shown in data below, the testing was successful.

Table 19. Thermistor

Functional

No. of Trials Yes No Remarks

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

31
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.

Table 20. LED Bar Graph

Functional

No. of Trials Yes No Remarks

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

32
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

result was successful as shown in the tabulated data below.

Table 21. DC Motor

Functional

No. of Trials Yes No Remarks

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

33
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 output of the stepper motor is to rotate

forward, backward and stop. The tabulated data below show that the testing

was successful.

Table 22. Stepper Motor

Functional

No. of Trials Yes No Remarks

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

34
Shown in Table 23 are the results of the test procedures conducted for

the accelerometer ADXL345. The objective was to ensure that the

accelerometer works and the output changes depending on the axis of the

component. The tabulated data below show that the testing was successful.

Table 23. ADXL345

Functional

No. of Trials Yes No Remarks

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

35
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

testing conducted was successful.

Table 24. PS2 Joystick

Functional

No. of Trials Yes No Remarks

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

36
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.

Table 25. Potentiometer

Functional

No. of Trials Yes No Remarks

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

37
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

used and the device are functional and stable.

Table 26. Passive Infrared (PIR) Sensor

Functional

No. of Trials Yes No Remarks

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

38
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

was functional and stable.

Table 27. Servo Motor

Functional

No. of Trials Yes No Remarks

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

39
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

testing was functional and stable.

Table 28. RFID

Functional

No. of Trials Yes No Remarks

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

40
VIII. Conclusions

Based on the findings of the study, the researchers came up with the

following conclusions:

1. The layout design of the trainer makes it capable of performing

different kinds of laboratory experiments. The components which

were used in the trainer are made up of basic electronic circuit

components to full modules are what makes these activities

important in studying.

2. All of the components used where functioning well based on the

concepts for which it was tested on. The components tested were

GPIO like LEDs and buttons, interfacing like motors, and data

communications like RFID.

IX. Recommendations

Based on the results of the tests conducted by the researchers and the

conclusion drawn, the following are recommended:

1. The development of the Raspberry Pi trainer will be essentially

helpful for all students who are enrolled in subjects that has circuit

testing and programming as a tool to be used for conducting lab

experiments and activities.

2. Further studies can be done to improve the trainer. Since the

Raspberry Pi is a computer itself, future researchers can implement

41
computer usage to the components used on the trainer. One can use

web based servers to control the components wirelessly.

42

You might also like