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

Integration of C Programming and Iot in A Raspberry Pi Controlled Robot Car in A Freshmen Sophomore Engineering Core Class

The document discusses integrating a project-based learning activity involving programming a Raspberry Pi controlled robot car into a freshman/sophomore engineering course. The project aims to increase student engagement, make programming more relatable by combining it with hardware, and expose students to IoT topics. Student surveys found the project improved programming skills and demonstrated software-hardware connections but was less effective at introducing IoT concepts.

Uploaded by

macacopaulista44
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Integration of C Programming and Iot in A Raspberry Pi Controlled Robot Car in A Freshmen Sophomore Engineering Core Class

The document discusses integrating a project-based learning activity involving programming a Raspberry Pi controlled robot car into a freshman/sophomore engineering course. The project aims to increase student engagement, make programming more relatable by combining it with hardware, and expose students to IoT topics. Student surveys found the project improved programming skills and demonstrated software-hardware connections but was less effective at introducing IoT concepts.

Uploaded by

macacopaulista44
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Paper ID #30981

Integration of C programming and IoT in a Raspberry Pi Controlled Robot


Car in a Freshmen/Sophomore Engineering Core Class
Dr. Shaghayegh Abbasi, University of San Diego
Shaghayegh Abbasi received her Ph.D. in Electrical Engineering from University of Washington in 2011.
In her thesis, titled ’Integrating top-down and bottom-up nanomanufacturing: Controlling the growth
and composition of seeded nanostructures’, an innovative nanomanufacturing method is explored and
optimized. Upon graduation, she started her career as Senior System Design Engineer at Lumedyne
Technologies. She worked on design, simulation, and testing of a Time Domain Switched (TDS) ac-
celerometer.
Dr. Abbasi joined University of San Diego as an adjunct faculty for Shiley-Marcos School of Engineer-
ing in 2014. She is also doing collaborative research with Bioengineering Department at University of
California, San Diego on rTMS systems.
Dr. Ernest M. Kim, University of San Diego
Ernie Kim received his BSEE from the University of Hawaii at Manoa, and MSEE and PhD in Electrical
Engineering from New Mexico State University. He has been an electronics engineer at the National
Bureau of Standards (now NIST) at the Boulder CO labs where he performed research on precision optical
fiber metrology, staff engineer with the Advanced Systems Group of Burroughs Corporation, Manager of
Electro-Optics at Ipitek Corporation where he developed early fiber optic CATV systems. Dr. Kim has
worked at a number of start-up companies in fiber optic transmission including All Optical Networks,
and Lightwave Solutions in San Diego. He joined the University of San Diego Department of Electrical
Engineering in 1990. Dr. Kim is a licensed Professional Engineer (EE), and regularly teaches FE and PE
exam review courses.

c American Society for Engineering Education, 2020


Integration of C programming and IoT in a Raspberry Pi Controlled Robot
Car in a Freshmen/Sophomore Engineering Core Class (Work in Progress)

Abstract

Project-based learning (PBL) is an important component of active learning techniques, and it helps
students integrate their knowledge and skills in a hands-on experience [1, 2]. This paper studies
PBL in the context of a freshman/sophomore engineering core class. The project combines
hardware and software components and it is aimed at making programming more relatable to
every-day applications for students. Student surveys have been used to quantitatively evaluate the
effectiveness of the project on different learning objectives. Our studies demonstrate that PBL
facilitates student learning both for basic concepts and for real world applications.

I. Introduction

Programming is an essential part of engineering education. One of the challenges in teaching


programming is that students find the material very abstract and hard to relate to [3]. The
connection between programming and the every-day engineering applications is usually not made
clear to them until junior or senior year and in more advanced courses. Hence in the
freshman/sophomore programming classes it is usually a challenge to engage students in the
classroom.

One of the methods to engage students in the classroom and expose them to a wider range of
educational goals such as design and teamwork is PBL in groups. This active learning technique
keeps students engaged during the class since it has a strong hands-on component. It also teaches
them how the engineering design process is implemented, and how to work well together.

It is also important in engineering and programming courses to expose students to the topics most
relevant in industry today [4]. As an example, Internet of Things (IoT) is a rapidly expanding topic
in Electrical and Computer Engineering, and as such, it is important to teach students about it early
on in their education; as it may help them in choosing their educational and career path.

In this study, a new project was introduced to Electromechanical System Design, a


freshman/sophomore engineering core course. This addition was motivated by three main
objectives: 1) increase student engagement and improve student learning through PBL, 2) make
programming more relatable by combining it with hardware elements, 3) expose students to topics
of current technology, specifically IoT. In order to quantitatively assess and evaluate the effects of
the new project on student learning, student surveys were conducted. The results (based on
students’ self-evaluation) show that the project was highly effective in improving students’
programming skills, demonstrating software-hardware connection, and exposing students to
everyday applications of programming. On the other hand, the project was not as effective in
introducing the concept and applications of IoT to students. This is an area that needs to be
explored further. Suggestions for improvement can be found in section VI of the paper.
II. Course Description

Electromechanical System Design is a freshman/sophomore course designed to teach students


about basics of programming, as well as mechanical structures and electrical circuits. The
programming language taught in this class is C. The use of Raspberry Pi 3B+ enables students to
take data from sensors and control actuators through programming.

III. Project Definition and Components

The first half of the semester is dedicated to teaching students about basics of programming and
operation of sensors and actuators. The second half of the semester is dedicated to a group project
which is an essential element of this course. Students complete the project in groups of 3 or 4, and
the instructor guides them through the basics of teamwork. The project consists of a Robot Car
and the parts are obtained from Osoyoo Company (Fig. 1) [5]. The car is controlled through
Raspberry Pi 3B+. The goal of the project is to use the required sensors and actuators and program
the car in order to accomplish the following tasks upon execution of the program:
1. The desired speed of the car is taken from the user in m/s unit. Once the user enters the
speed, the car starts moving.
2. The car follows a 2.5cm-wide black line on a white surface.
3. If there is an obstacle on the way, the car stops, goes around the obstacle, and continues its
path.

In addition to these features, students should be able to control the car manually from their phone
or their computer.

Figure 1: Osoyoo Robot Car

III. A. Hardware

The main components in our robot car project are as follows:


i. Line follower sensors
ii. Ultrasonic sensor
iii. Camera
iv. DC motors
v. Servo motor
vi. Raspberry Pi 3B+

Fig. 2 shows the components in detail.


Camera

Servo motor

DC motors

Ultrasonic sensor

Line follower sensors

(a)

(b)
Figure 2: Hardware components of the robot car project: (a) line follower sensors (red), ultrasonic sensor (green),
DC motors (blue), servo motor (purple), and camera (yellow) (b) Raspberry Pi 3B+.

III. B. Software

The programming language for this project is C. Students are instructed to write separate functions
for each project outcome as listed in section III. A. There are some additional elements in the
program as well, such as a code to control the servo motor on which the camera is mounted.

III. C. Internet of Things (IoT) Component

Raspberry Pi 3B+ is capable of connecting to a computer through internet. In addition, Osoyoo


provides a smart phone application through which the Pi can be connected to a smart phone via
internet. This enables the students to use the camera to see the car’s surroundings on their computer
and their smart phone. In addition, they are able to control the car through the web or the phone
application (Fig. 3).
Figure 3: Smart phone interface for the Robot Car. The surroundings of the car can be viewed through the camera,
and the direction and speed of the car can be controlled through the interface.

IV. Project Evaluation

Students turn in a final report for the project which contains the following sections: design process,
challenges, and lessons for future. The C code for the project is attached to the report as an
appendix.

In addition to the final report, students are required to demonstrate the project outcomes as a group
in front of the instructor. A Demo Day is scheduled and the instructor examines the Robot Car
built by each group and verifies that the required project outcomes have been met.

V. Assessment Methods

A student questionnaire was designed to quantitatively assess the effectiveness of the project in
achieving the following goals:

a) Improving C programming skills in students


b) Demonstrating the connection between software and hardware
c) Making programming connected to every day applications
d) Introducing IoT and its applications

The questionnaire captures students’ perception of their knowledge and skills in different areas.
For goal (a), students were instructed to assess their programming skills in a comparative manner
before and after completion of the course project. The rating options were as follows:

1: Excellent
2: Good
3: Average
4: Poor
5: Terrible

For goals (b) – (d), students were instructed to assess the effectiveness of the course project in
achieving the goals using the following rating:

1: Extremely effective
2: Very effective
3: Moderately effective
4: Slightly effective
5: Not effective at all

The anonymous questionnaire was filled by 34 students in 2 sections of Electromechanical System


Design (ENGR102). The results are demonstrated and discussed in section VI.

VI. Assessment Results and Summary

The first goal of the project (goal (a)) was to improve C programming skills in students. The
corresponding question was designed as a comparative study, looking at the skills before and after
the course project. The results are shown in Fig. 4 (rating details explained in section V). It can be
seen that there is an improvement in students’ programming skills after completing the course
project. The average student rating has increased from 2.67 before the project to 3.85 after the
project.

25
Before Course Project
After Course Project
20
Number of Students

15

10

0
1 2 3 4 5

Skill Level
Figure 4: A summary of student survey results on C programming skills before and after the course project.

The average ratings for effectiveness of the course project in achieving goals (b) – (d) is
demonstrated in Fig. 5 (rating details explained in section V). These results suggest that for goals
(b) and (c), demonstrating software-hardware connection and everyday applications, the project
has been effective (average ratings 3.88 and 3.85, respectively). However, for goal (d),
demonstrating the concept and applications of IoT, the project has not been as effective (average
rating 3.23). We believe this can be improved by allocating more time to cover the basic concept
of IoT and how it was developed to improve student understanding.
5

Average Student Rating


4

1
Software-Hardware Everyday IoT
Connection Applications
Project Goals

Figure 5: A summary of student survey results on effectiveness of course project in achieving learning objectives.

The results of the self-evaluating survey overall demonstrate that the project has been effective in
improving students’ programming skills, as well as showing them the software-hardware
connection and real world applications of programming in practice. The effectiveness of the
project in introducing IoT to students can be improved by dedicating more time to this topic and
covering more background and implementation methods in the field of IoT. In addition, in future
studies we plan to utilize other quantification methods in addition to student surveys such as exam
grades and project grades. These will create a more comprehensive measure of the learning
benefits of PBL in general and the Robot Car project in particular.

References

[1] J. W. Thomas, “A Review of Research on Project-Based Learning”, 2000.


[2] S. Wurdinger, and M. Qureshi, “Enhancing College Students’ Life Skills through
Project Based Learning”, Innovative Higher Education (2015) 40: 279.
[3] A. Gomes, A. J. Mendes, “Learning to Program - Difficulties and Solutions”,
International Conference on Engineering Education ICEE 2007.
[4] J. Grimson, “Re-engineering the curriculum for the 21st century”, European J. of
Engineering Education (2002), 27: 31.
[5] Pinetree Electronics Ltd, https://osoyoo.com/category/raspberry-pi-
diyproject/raspberry-pi-robot-car/

You might also like