Jayawant Shikshan Prasarak Mandal: Laboratory Manual Computer Engineering
Jayawant Shikshan Prasarak Mandal: Laboratory Manual Computer Engineering
Jayawant Shikshan Prasarak Mandal: Laboratory Manual Computer Engineering
Programming Lab-III
Laboratory Manual
Computer Engineering
1
Programming Lab-III
Embedded Operating
System
Laboratory Manual
2
Table of Contents
4. Course Objective 13
5. Laboratory Objective 15
7. Lab Plan 19
Group A
Sessions
Develop an application using Beeglebone Black/ ARM Cortex A5 20
1. development board to simulate the operations of LIFT.
Group B
Sessions
1. Write an application to and demonstrate the change in BeagleBoard/ 40
ARM Cortex A5 /Microprocessor /CPU frequency or square wave
of programmable frequency.
2. Develop a network based application by setting IP address on 47
BeagleBoard/ ARM Cortex A5
Group C
Sessions
1. Develop Robotics (stepper motor) Application using Beagle Board. 53
References 58
Vision
To impart quality education to the students at all levels that meets the changing needs of the
industry.
To provide state-of-art facilities and resources to solve real-world complex problems and for
discovery of new knowledge through innovative research that encourages entrepreneurship
and economic development to benefit our global society.
4
K A D I
Applying Problem Design & Investigation
Knowledge Analysis Development of problems
(PO:a) (PO:b) (PO:c) (PO:d)
M E E T
Modern Engineer & Environment Ethics
Tool Society Sustainability (PO:i)
Usage (PO:f) (PO:h)
(PO:e)
T O M I
Individual Communication Project Life Long
& Team (PO:k) Management Learning
work & Finance (PO:l)
(PO:g) (PO:j)
5
This Manual uses icons as visual cues to the interactivities during the session.
6
Icons Graduate Attributes
Applying Knowledge
Problem Analysis
Investigation of Problem
Environment Sustainability
Ethics
Communication
Lifelong Learning
Blooms Taxonomy
Remembering
Understanding
Applying
Analyzing
Evaluating
Creating
7
This icon is used to indicate instructions for faculties.
PEO I To prepare graduate for productive engineering career in industry and also to pursue
higher studies and research.
PEO II The graduate of program will have solid foundation in Computer Engineering.
PEO III The graduate of program will have exposure to cutting edge technology, adequate
training and opportunities to work as team with effective communication skills and
8
leadership qualities.
PEO IV The graduate of program will have skills to identify, analyze, design, implement
and manage the software projects using modern tools for benefit our global society
and promote them to disseminate it.
PEO V The graduate of program will able to keep pace with continuous upgrading
technology as well as aware of social, environmental issues and professional ethics
and codes of professional practices.
Program Outcomes: -
10
PO to PEO Mapping with the help of Articulation Matrix: -
b
c
d
e
f
h
i
g
k
j
l
Course Outcomes:
CO1: Describe concepts of real time operating system and its tasks
11
CO2: Develop an application using Beagle bone-Black and ARM .
CO3: Recognize need of Linux, Linux kernel in embedded operating system and analyze
CO4: Explain boot loader, MTD file system, embedded development environment and
CO5: Resolve problems in embedded Linux and develop an application by interfacing stepper
CO6: Illustrate embedded android system and point out various embedded android applications.
12
CO1
CO2
CO3
CO4
CO5
CO 6
13
Laboratory Objectives: -
LO1: Develop applications on Beaglebone Black board with ARM Cortex Processor
LO3: Demonstrate various peripherals interfacing with Beaglebone Black Board ARM Cortex
Processor.
LO: 1
LO: 2
LO: 3
14
Experiment Learning Outcome: -
ELO1: Explain and formulate Lift operations using Beaglebone Black/ ARM Cortex
development board.
ELO2: Design and Demostrate Traffic Signal controlling system using Beaglebone Black/ARM
cortex processor.
ELO3: Explain and design the Square wave of programmable frequency on BeagleBoard Black.
ELO4: Develop a network based application using IP address of Beagle board /ARM Cortex
Processor.
ELO 5: Construct a robotics application using stepper motor interfacing with Beagle board /ARM
Cortex Processor.
ELO: 1
ELO: 2
ELO: 3
ELO: 4
ELO: 5
15
GROUP A
EXPERIMENT NO.1
16
Session Plan
Time Content Learning Aid / Faculty Approach Typical Skill / Competency
Methodology Student Developed.
( min)
Activity
OBJECTIVES:
17
1. Use Beaglebone Black/ ARM Cortex, 1+3 elevator simulator.
PROBLEM STATEMENT:
Develop an application using Beeglebone Black/ ARM Cortex A5 development board to
simulate the operations of LIFT.
HARDWARE REQUIRED: Beeglebone Black/ ARM Cortex Processor, Lift 1+3 elevator
simulator, interfacing cables
s=initial state
e = end state
f= functions
DD-deterministic data it helps identifying the load store functions or assignment functions.
18
States: S0 S1 S2 S3 S4 S5
S1: Elevator
THEORY:
Beeglebone Black/ ARM Cortex development board
The BeagleBoard is a low-power open-source hardware single-board computer produced
by Texas Instruments in association with Digi-Key and Newark element14. The BeagleBoard
19
was also designed with open source software development in mind, and as a way of
demonstrating the Texas Instrument's OMAP3530 system-on-a-chip. The board was developed
by a small team of engineers as an educational board that could be used in colleges around the
world to teach open source hardware and software capabilities.
On the left side of the screen switches appear and on the right side of the screen there are LEDs.
The lift facility has a total of the inputs. The contactors are designated and the light indicators.
By clicking on the switch the corresponding actuator is activated. There are also contactors for
the lift motor, which moves the cage up and down of the various floors. The light indicators are
located within the cage in the floor select buttons and directly to the right of the buttons to
indicate the last floor arrived at. The switch numbers are identical to the input numbers of the PC
adapter. The sensor or switch statuses of the facility are indicated via LEDs on the right side. All
20
facility outputs are generally designated with switches and are set when the operating elements
are activated using when the lift cage activates a floor limit switch.
There are two operating elements for the selection of the desired floor. One operating element is
the lift call button on the destination floor and the second is the floor selection button inside the
cabin. If one of the buttons is activated, the floor selection is stored.
Determining the Up/Down Direction of the Lift
The up/down direction of the cage is dependent on the current position of the lift and the
requested destinations. The lift destinations are stored. For the position it suffices to know
whether the cage was last on the ground floor or on the second floor. The cage goes down if
someone wants to reach the ground floor, but has not yet reached it or when the cage was on the
21
second floor and the destination selected was the 1 st floor. When travelling down, lift up
operation must still be inhibited so that the cage does not continuously change directions. This
results in a control whereby the previous direction, even with a stopover, still has the first
priority; prior instructions are treated with preference. The lift up direction becomes active when
someone requests the 2nd floor as destination, but has not yet arrived there or when the lift was
down on the ground floor and the 1st floor was selected as the destination.
Signaling
If an operating element is activated for floor selection, the appropriate signal indicators are
switched on until the destination floor is reached.
CONCLUSION:
Hence, we have successfully simulated Lift operations using Beeglebone Black/ ARM Cortex
development board.
OUTCOME
ELO: Explain and formulate Lift operations using Beaglebone Black/ ARM Cortex development
board.
QUESTIONS:
22
9. Define and Explain ARM assembly language program.
10. Give list of arithmetic instruction of ARM.
11. What is the use of TST instruction?
12. What is the use of TEQ instruction?
13. Write the general form of source lines in assembly language.
14. How is the literal pool accessed?
15. Write the syntax for load and store instructions.
16. Give list load and store instructions.
17. What is the maximum size of constant that can be used in immediate mode.
18. Explain read only and read write memory.
19. Write syntax LDM and STM instruction.
20. Explain ARM 9.
23
EXPERIMENT NO.2
24
Session Plan:
Time Content Learning Aid / Faculty Approach Typical Skill / Competency
Methodology Student Developed.
( min) Activity
To simulate the working of Traffic Signal System using Beaglebone Black board.
PROBLEM STATEMENT:
Develop an application using beaglebone black ARM Cortex development board to simulate
working of Signal lights.
HARDWARE REQUIRED: Beaglebone black bone board with ARM cortex processor, Traffic
light simulator, interfacing cables.
s=initial state
e = end state
f= functions
DD-deterministic data it helps identifying the load store functions or assignment functions.
26
NDD- Non deterministic data of the system S to be solved.
States: S0 S1 S2 S3 S4 S5 S6
S1: Monitor Display editor (Write and Design application using gedit)
27
DD=Deterministic Data it helps identifying the load store functions or assignment functions. As
we are trying to simulate the Traffic control system, our LED’s will in DD state if they are in ON
state when system is working properly and traffic is not deadlocked.
True
True / pedestrain
None Working
Crossing
NDD=It is Non deterministic data of the system S to be solved. Here only Non deterministic
state is pedestrian walk as shown in fig.
Success-If Simulator works successfully to simulate proper working of Traffic Signal System
THEORY:
The BeagleBone is a 1GHz credit card sized computer that runs Linux operating system and has
extensive input/output capabilities to control and measure the world around it. The performance
is comparable to a 'smart phone'. Using a 32-bit ARM processor, the BeagleBone Black can
serve webpages interact with a cell-phone, control motors and act as the brains of a robot
Initially intended for academic use, the BeagleBone computer has gain popularity with the maker
movement, tinkerer and the interested. The powerful computer is used in new applications for
industrial, automation, education, and arts and imaginative and evens some quirky projects. The
28
low cost provides easy accessibility to extensive technology. All this fits in a small Altoid mint
tin!
The BeagleBone Black Can Be Programmed In Many Ways. This is a great way to learn.
BoneScript (JavaScript)
Python
Perl
C/C++
Bash
The first time you plug in the BeagleBone it will appear as a 'USB thumb drive' with the required
drivers in the Driver folder (Windows, Mac OSX and Linux versions). (Takes about 20 seconds)
29
History of BeagleBone Black:
BeagleBone Black is the latest generation of low-power, single-board, highly-capable open-
source hardware based on the ultra-efficient ARM processing platform. Produced by Circuitco
and backed by Texas Instruments, BeagleBone Black was designed to be a community-
supported, maker-centric technology. However, this small size, low cost form factor has shown
the potential to cross over into the commercial space as companies like Element 14’s Embest
begin ramping up production of their own, BeagleBone Certified, version of the board. Rev C of
the BeagleBone Black, with double the flash memory and Debian Linux onboard, will launch in
May. Logic Supply engineers are hard at work exploring the potential of this exciting innovation
by focusing on software development as well as enclosure, cape and board design for
BeagleBone Black and other emerging ARM-based form factors.
30
Traffic Light Control
Traffic lights, which may also be known as stoplights, traffic lamps, traffic signals, signal lights,
robots or semaphore, are signaling devices positioned at road intersections, pedestrian crossings
and other locations to control competing flows of traffic.
Illumination of the green light allows traffic to proceed in the direction denoted,
Illumination of the yellow/amber light denoting, if safe to do so, prepare to stop short of
the intersection, and
Illumination of the red signal prohibits any traffic from proceeding.
31
Usually, the red light contains some orange in its hue, and the green light contains some blue, for
the benefit of people with red-green color blindness, and "green" lights in many areas are in fact
blue lenses on a yellow light (which together appear green).
CONCLUSION:
In this experiment we have studied simulation of traffic control system using ARM cortex
processer with Beaglebone black borad interface
32
OUTCOME
ELO: Design and Demostrate Traffic Signal controlling system using Beaglebone Black/ARM
cortex processor.
QUESTIONS:
33
GROUP B
EXPERIMENT NO.1
34
Session Plan
Time Content Learning Aid / Faculty Approach Typical Skill / Competency
Methodology Student Developed.
( min)
Activity
35
Discusses Comprehension
OBJECTIVES:
To Study change in BeagleBoard/ ARM Cortex A5 /Microprocessor /CPU frequency.
programmable frequency.
HARDWARE REQUIRED: BeagleBoard, ARM Cortex A5, DC Motor Interfacing cables and
CRO.
s=initial state
e = end state
f= functions
36
DD-deterministic data it helps identifying the load store functions or assignment functions.
States: S0 S1 S2 S3 S4
S1: Monitor Display editor (Write and Design application using gedit)
S3: DC Motor
THEORY:
37
Processor: AM335x 1GHz ARM® Cortex-A8
3D graphics accelerator
Connectivity
Ethernet
HDMI
2x 46 pin headers
Software Compatibility
Debian
Android
Ubuntu
FREQUENCY: Frequency describes the number of waves that pass a fixed place in a given
amount of time
38
Example: if the time it takes for a wave to pass is is 1/2 second, the frequency is 2 per second. If
it takes 1/100 of an hour, the frequency is 100 per hour.
Usually frequency is measured in the hertz unit, named in honor of the 19th-century German
physicist Heinrich Rudolf Hertz.
METHOD:
39
CONCLUSION:
Hence, we have successfully studied concept of frequency and generation of square wave of
programmable frequency.
OUTCOME
ELO: Explain and design the Square wave of programmable frequency on BeagleBoard Black.
QUESTIONS:
40
1. What is beagleboard black?
2. What are the features of beagle board balck?
3. What is the process to update the SW in the board?
4. How can boot from the microSD instead of the eMMC?
5. Explain the Device Tree?
6. Where can find Android for the BeagleBone Black?
7. How do get the BeagleBone Black Drivers to work on my Windows 8 computer?
8. What is the polarity of the DC power jack?
9. Define frequency?
10. What is the unit of frequency?
11. Draw diagram for different type of general frequency?
12. Define Amplitude?
13. Define Wavelength?
14. What is DC motor?
15. Explain working of DC Motor?
16. Write difference between AC and DC?
17. What is CRO?
18. List different types of embedded linux operating system?
41
EXPERIMENT NO.2
Session Plan
Time Content Learning Aid / Faculty Approach Typical Skill / Competency
42
( min) Methodology Student Developed.
Activity
OBJECTIVES:
1. To create any network application using IP address of Beagle Black Bone.
43
PROBLEM STATEMENT:
Develop a network based application by setting IP address on BeagleBoard/ ARM Cortex A5.
HARDWARE REQUIRED: Beagle black bone board with ARM Cortex Processor & cables
for interfacing.
INPUT: Input will be setting static IP address of BEAGLE BLACK BONE and Linux System
s=initial state
e = end state
f= functions
DD-deterministic data it helps identifying the load store functions or assignment functions.
THEORY:
By default, the IP address of the Beaglebone Black is set dynamically using the DHCP server on
your network. That is very useful; however, if we wish to map the Beaglebone to an external port
(virtual server) on your network, or you wish to force your Beaglebone to have a specific
identifiable location in your home you need to change our IP address to be static. The static
address of BEAGLE BLACK BONE and Linux system should be same so it is useful to
44
communicate between them.
The first thing we need to do is set the nameserver(s) manually, as once you go through step 2,
removing dhcp support, this setting will likely be lost. If you wish to use the nameserver that you
currently have as above (192.168.1.1 in my case), simply call the script set-nameservers (note:
8.8.8.8 is the Google Public DNS – always a useful backup DNS if your local DNS fails):
Step 2- Changing the Network Settings
Connman Command:-
It provides a daemon for managing internet connections within embedded devices running the
Linux operating system. The Connection Manager is designed to be slim and to use as few
resources as possible, so it can be easily integrated. It is a fully modular system that can be
extended, through plug-ins, to support all kinds of wired or wireless technologies. Also,
configuration methods, like DHCP and domain name resolving, are implemented using plug-ins.
The plug-in approach allows for easy adaption and modification for various use cases.
CONCLUSION:
Hence, we develop network application like chat,file transfer using static IP address of
BEAGLE BLACK BONE.
OUTCOME
45
ELO: Develop a network based application using IP address of Beagle board /ARM Cortex
Processor.
QUESTIONS:
46
GROUP C
EXPRIMENT NO: 1
Session Plan
Time Content Learning Aid / Faculty Approach Typical Skill / Competency
Methodology Student Developed.
( min) Activity
47
Application
OBJECTIVES:
1. To demonstrate movement of Robotic arm using stepper motor.
PROBLEM STATEMENT:
Develop Robotic (stepper motor) Application using Beagleblack bone Board.
HARDWARE REQUIRED: Beagle black bone board with ARM Cortex Processor, Robotic
Arm (stepper motor) and cables for interfacing.
s=initial state
e = end state
f= functions
DD-deterministic data it helps identifying the load store functions or assignment functions.
States: S0 S1 S2 S3 S4 S5
S1: Monitor Display editor (Write and Design application using gedit)
THEORY:
A step motor can be viewed as a synchronous AC motor with the number of poles (on both rotor
and stator) increased, taking care that they have no common denominator. Additionally, soft
magnetic material with many teeth on the rotor and stator cheaply multiplies the number of poles
(reluctance motor). Modern steppers are of hybrid design, having both permanent magnets and
soft iron cores.
A stepper motor is made up of a rotor, which is normally a permanent magnet and it is, as the
name suggests the rotating component of the motor. A stator is another part which is in the form
of winding. In the diagram below, the center is the rotor which is surrounded by the stator
winding. This is called as four phase winding.
Unipolar vs Bipolar
Unipolar motors use 6 wires and require a unipolar driver. In addition to the A and B phases,
there are two extra wires called the common wires, Current always flows in one direction: from
the phases, through the common wires. In addition, only one portion of the motor is energized at
a time. Bipolar motors use 4 wires and require a bipolar drive. Common wires are not used.
Current can flow in two directions. In addition, two phases can be energized at one time.
Stepping Sequence
In order to get correct motion of the motor, a stepping sequence has to be followed. This
stepping sequence gives the voltage that must be applied to the stator phase. Normally a 4 step
sequence is followed.
50
When the sequence is followed from step 1 to 4, we get a clock wise rotation and when it is
followed from step 4 to 1, we get a counter clockwise rotation.
Step No A A B B
1 1 0 0 1
2 1 1 0 0
3 0 1 1 0
4 0 0 1 1
Interfacing Diagram
The diagram shows the interfacing of stepper motor to a micro-controller. This is general
diagram and can be applied to any micro-controller family like ARM, PIC micro-controller,
AVR or 8051 micro-controller.
51
Since, the micro-controller cannot provide enough current to run the motor, a driver like a
ULN2003 is used to drive the motor. Similarly, individual transistors or any other driver IC can
also be used to drive the motor. See to it that if required, the external pull up resistors is
connected to pins depending on the micro-controller you use. The motor must never be directly
connected to the controller pins. The motor Voltage depends on the size of the motor.
A typical 4 phase uni-polar stepper motor has 5 terminals. 4 phase terminals and one common
terminal of the center tap that is connected to ground.
The programming algorithm for continuous rotation in clockwise mode is given below-
CONCLUSION:
Hence, we have successfully developed and demonstrated Robotic Arm application using
stepper motor with Beagleblack bone board.
OUTCOME
ELO: Construct a robotics application using stepper motor interfacing with Beagle board /ARM
Cortex Processor.
52
QUESTIONS:
53
References
TEXT BOOKS:
T1: Lyla B. Das, “Embedded Systems: An Integrated Approach” Pearson, ISBN:978-81-317-
8766-3
T2: Christopher Hallinan, “Embedded Linux Primer”, Prentice Hall, ISBN-10: 0-13-167984-8,
ISBN-13: 978-0-13-167984-9
REFERENCE BOOKS:
R1: Peter Barry, Patric Crowley, “Modern Embedded Computing, Elsevier, ISBN: 978-93- 81269-77-0
R2: Karim Yaghmour, “Embedded Android”, O'Reilly, ISBN: 978-1-449-30829-2, Pdf
54