z-logo
open-access-imgOpen Access
Self-driving Car Project in Embedded Systems Class
Author(s) -
Maddumage Karunaratne
Publication year - 2018
Language(s) - English
Resource type - Conference proceedings
DOI - 10.18260/1-2--28817
Subject(s) - microcontroller , embedded system , electronics , arduino , microprocessor , automation , firmware , software , class (philosophy) , computer science , engineering , software engineering , operating system , electrical engineering , mechanical engineering , artificial intelligence
With every increasing integrated circuit manufacturing prowess, today an astounding array of devices include embedded microcontrollers to provide connectivity, automation, power efficiency along with entertainment to end user. One example is the widely used light bulbs. They first became LEDs and then miniature controllers were added that can be programmed using a cell phone remotely. The widely known term smart device really comes from embedded microcontrollers in majority of the devices. Silicon manufactures have launched hobby industries around inexpensive electronics, particularly microprocessor boards, with more capabilities and easy to program systems such as Raspberry Pi and Arduino. For individual developer or capable consumer those devices offer vast levels of customization. When electrical and computer engineers are trained, it is imperative that nearly all acquire some level of exposure to embedded microcontroller and associated software development skills to effectively function as engineers in their careers. The nature of work performed in industry changes as they progress in careers. Lack of such exposure and experience will constrain their opportunities in different technical fields and even managerial advancements. At this university, electrical engineering and computer engineering majors take one semester course in microcontrollers to learn embedded system developments in their junior year preceded by a C programming course and an electronics course. This course facilitates their understanding of digital controllers and most of the senior capstone projects would select one or two microcontrollers as the heart of the project. Students have used Raspberry Pi, Arduino, and Freescale Dragon boards which the course and labs are based on due to its simplicity and legacy. With vast processing capabilities of electronics, Google and others are trying to push automation to a new degree with self-driving vehicles which have to read and interpret moving and stationary objects, black and white surface lines, light colors, etc. To provide more hands on experience and a flavor of such real world emerging technologies, the author recently introduced an automated vehicle project to students in lieu of the final written comprehensive assessment for the Embedded Systems course. This paper discusses the content and experience in having an automated line tracking and moving object avoidance project as final class assessment in Embedded Systems class. The project is to be done by two student groups with limited skeleton code and help from the instructor within a few weeks’ time toward end of the course. Students mount Dragon 12 microcontroller boards on cars after removing remote controller units, but leaving the motors intact. Some use 4-wheel drive cars and separate driver circuits along with sonar sensors, sound sensors and line sensors. Students learn to be creative and sharpen their engineering skills. Instructor evaluates the devices on a track shown to them on paper, but not made available for trials. The track contains left-right curves, cross roads, and moving objects are used to test their vehicles in front of an audience. part I: introduction Since the transistor was invented many decades ago, semiconductor and electronics industry continues to make vast strides in providing functionally rich inexpensive electronic devices for consumers and industries. In recent years that trend has even accelerated due to low power consumption of electronic processors and sensors allowing devices to be portable. Smart robots – both personal and industrial are proliferating fueled by efficient manufacturing combined with energy dense battery technology. At these devices contain embedded controllers and computing processors termed as microcontrollers which typically offer less performance than the latest processors used in laptop and desktop personal computers. Electrical and computer engineers will not be successful without having a good skill set and an understanding of how these proliferating smart devices work in terms of processing data and providing various control functions for the device such as voice and image recognition, speaking, precision movements, etc. While most of electrical and computer baccalaureate graduates may not enter careers to design semiconductor devices, they might still be designing or maintain systems developed using manufactured embedded processors. Also would still need to understand the trends, adapt, and adopt the technologies to be successful in their careers. Teaching Embedded Systems has been around for a long time for the purpose of giving the skills to students to develop such control and communication systems in both software and hardware. As has been the case in the beginning, electronic embedded systems eventually are constrained by power, memory, processing capacity and ultimately the overall efficiency. The programming language and the platform of choice is mostly C or C++ due to its efficiency in memory allocation, run time and ability to directly manipulate data in hardware components, although higher level functional languages such as Python are becoming popular. Both computer and electrical engineering programs meet the stated program educational objective of “Adapt to technological change,” and the student outcome of “having an appropriate mastery of the knowledge, techniques, skills and modern tools of their disciplines.” Every student in both programs takes an Embedded Systems course along with a lab course in their junior year of studies. By that time, students have taken a Digital Electronics course along with labs which would help them understand hardware in Embedded systems. Their prior semester long programming in C language helps them write C-programs to effectively utilize the microcontroller for this course. This course has three lecture periods and an associated 3-hour lab per week. Among assignments and assessments, the course includes two exams and a final exam given in the form of a project limited to 2 students per group to use the actual hardware board. Due to simplicity and versatility, this course is taught around Freescale HCS12 microcontroller, and the labs are done using Dragon12Plus boards with additional sensors and components. In addition, the course teaches how the embedded controller communicates with the external devices using different data communication protocols. This paper discusses the Embedded Systems course in general, and the automated car project used as the final examination in detail. After many quiz assessments and written exams, students put their learning into practice by building and programming a toy car to travel automatically along a marked path with moving obstacles and tight turns. It has to rely on tracking a contrasting (black on white) line to keep it on the path and make turns or other movements. Additional sensors are used to detect obstacles. Students’ feedback has always been positive, and their comments indicate that they learned much more by doing the project than studying for the exams. This challenging final project really builds students’ confidence in using other type of microcontrollers as well. Part II of the paper lists the course topics with a brief description, while Part III elaborates on the automated car project assignment and its assessment. Part IV ponders upon the results of a survey completed by students a few weeks later when they have received the grades and considered topics for their senior capstone projects. Part V states concluding remarks with future plans. part II: course content and objectives Students have taken one semester-long course in each of the three fundamental areas of electrical circuits, semiconductor electronics, and C programming prior to taking a Digital Electronic course which is a prerequisite for this Embedded Systems course. With the heavy emphasis on hands-on experience at electrical & computer engineering at this university, each of those courses has a 3-hour lab in addition to having a 3-hour lecture class. By the time students get to Embedded class, they have had rigorous lab experience and skills. This is a core course in both electrical and computer engineering programs taken in the second semester of junior year. The lab course reinforces learning and facilitates interconnecting various topics in this course. The lecture and lab courses are so tightly integrated inextricably that only a single letter grade is issued at the end. Table 1 lists the course organization of individual topics into major sections for easier content delivery. First three sections introduce the basic architecture and instruction execution inside a real, but simple data computing processor. As the 1 column indicates, the programming language is HCS12 assembly using Code Warrior software. At the beginning it is challenging for students to learn so much details about the hardware and how software relates to hardware actions. When they see the reasons for hardware instructions and actions and how some C language features (such as integer division, unsigned and signed integer operations, etc) are directly supported by processor, they realize and appreciate the reasons why certain C constructs were designed in particular ways. The lab component includes 5 labs, out of 10, in Assembly coding to use microcontroller ports to interface with the lights, speaker, and buttons on the Dragon12 development board. Teaching assembly is the best way for students to understand and appreciate the detail actions carried out by the processors. It is challenging to learn and apply assembly language compared to using C or higher level languages since each data manipulation has to be broken down into atomic actions taken by hardware – that is the basis of Assembly code. Without learning assembly instructions, students would not realize the reason for integer division in C language, or why C-code prefers k++ in loops, a

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom