0% found this document useful (0 votes)
138 views19 pages

Embedded Systems: Quiz 2

The document discusses the process for designing an embedded system. It describes 6 key steps - project description, background research, pre-design, design, implementing a prototype, and preliminary testing. The steps involve understanding requirements, researching standards, brainstorming designs, partitioning hardware and software, developing diagrams, incrementally implementing and testing the system.

Uploaded by

171148 171148
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views19 pages

Embedded Systems: Quiz 2

The document discusses the process for designing an embedded system. It describes 6 key steps - project description, background research, pre-design, design, implementing a prototype, and preliminary testing. The steps involve understanding requirements, researching standards, brainstorming designs, partitioning hardware and software, developing diagrams, incrementally implementing and testing the system.

Uploaded by

171148 171148
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Quiz 2

Embedded systems

Under supervision of:


Dr. Ahmed seddik

Name: Omar Emad Alhoot


ID: 171040
Qa) page 2
A Microprocessor is a multipurpose programmable, clock driven, register based
electronic device that reads binary instructions from a storage device called
memory, accepts binary data as input, processes data according to those
instructions and provide result s as output

Microprocessor: It is clock driven semiconductor device consisting of electronic


logic circuits manufactured by using either a large scale integration (LSI) or very
large scale integration (VLSI) technique.

It is capable of performing various computing functions and making decisions to


change the sequence of program execution. It can be divided in to three
segments.

A. Arithmetic/Logic unit ( ALU ) : It performs arithmetic operations as addition


and subtraction and logic operations as AND, OR & XOR

B. Register Array: The registers are primarily used to store data temporarily during
the execution of a program and are accessible to the user through instruction.
The registers can be identified by letters such as B, C, D, E, H and L.

C. Control Unit: It provides the necessary timing and control signals to all the
operations in the microcomputer. It controls the flow of data between the
microprocessor and memory & peripherals.
Program counter (PC)

An incrementing counter that keeps track of the memory address of the


instruction that is to be executed next or in other words, holds the address of the
instruction to be executed next

Memory address registers (MAR)

Holds the address of a block of memory for reading from or writing to

Memory data register (MDR)

A two-way register that holds data fetched from memory (and ready for the CPU
to process) or data waiting to be stored in memory (This is also known as the
memory buffer register (MBR).

Instruction registers (IR)

A temporary holding ground for the instruction that has just been fetched from
memory.

Control unit (CU)

Decodes the program instruction in the IR, selecting machine resources, such as a
data source register and a particular arithmetic operation, and coordinates
activation of those resources.

Arithmetic logic unit (ALU)

Performs mathematical and logical operations

Floating-point unit (FPU)

Performs floating-point operations


QB) page 2
Q2) page 2
1- Project Description

The goal of the project description step is to determine what the system is ultimately supposed
to do.

Questions to raise and answer during this step include but are not limited to the following:

• What is the system supposed to do?

• Where will it be operating and under what conditions?

• Are there any restrictions placed on the system design?

To answer these questions, the designer interacts with the client to ensure clear agreement on
what is to be done.

It is essential that both parties agree on system requirements before proceeding further in the
design process.

The final result of this step is a detailed listing of system requirements and related
specifications.

2-background Research

In this step, the designer will ensure they understand all requirements and features required by
the project.

This will again involve interaction between the designer and the client

The designer will also investigate applicable codes, guidelines, protocols, and standards related
to the project.

This is also a good time to start thinking about the interface between different portions of the
project particularly the input and output devices peripherally connected to the microcontroller.

The ultimate objective of this step is to have a thorough understanding of the project
requirements, related project aspects, and any interface challenges within the project.
3- Pre–design

The goal of the pre–design step is to convert a thorough understanding of the project into
possible design alternatives.

Brainstorming is an effective tool in this step

a list of alternatives is developed.

Since an embedded system typically involves both hardware and/or software, the designer can
investigate whether requirements could be met with a hardware only solution or some
combination of hardware and software.

Generally, speaking a hardware only solution executes faster; however, the design is fixed once
fielded

On the other hand, a software implementation provides flexibility and a typically slower
execution speed.

Most embedded design solutions will use a combination of both hardware and software to
capitalize on the inherent advantages of each.

Once a design alternative has been selected, the general partition between hardware and
software can be determined

It is also an appropriate time to select a specific hardware device to implement the prototype
design.

If a microcontroller technology has been chosen, it is now time to select a specific controller.
This is accomplished by answering the following questions:

• What microcontroller systems or features i.e., ADC, PWM, timer, etc. are required by the
design?

• How many input and output pins are required by the design?

• What is the maximum anticipated operating speed of the microcontroller expected to be?
4- Design

With a clear view of system requirements and features, a general partition determined
between hardware and software, and a specific microcontroller chosen, it is now time to tackle
the actual design.

It is important to follow a systematic and disciplined approach to design.

In the design step, several tools are employed to ease the design process. They include the
following:

• Employing a top–down design, bottom up implementation approach,

• Using a structure chart to assist in partitioning the system,

• Using a Unified Modeling Language (UML) activity diagram to work out program flow, and

• Developing a detailed circuit diagram of the entire system.

Top down design, bottom up implementation. An effective tool to start partitioning the design
is based on the techniques of top–down design, bottom–up implementation. In this approach,
you start with the overall system and begin to partition it into subsystems. At this point of the
design, you are not concerned with how the design will be accomplished but how the different
pieces of the project will fit together. A handy tool to use at this design stage is the structure
chart. The structure chart shows the hierarchy of how system hardware and software
components will interact and interface with one another.You should continue partitioning
system activity until each subsystem in the structure chart has a single definable function.

UML Activity Diagram. Once the system has been partitioned into pieces, the next step in the
design process is to start working out the details of the operation of each subsystem we
previously identified. Rather than beginning to code each subsystem as a function, we will work
out the information and control flow of each subsystem using another design tool: the Unified
Modeling Language (UML) activity diagram. The activity diagram is simply a UML compliant flow
chart. UML is a standardized method of documenting systems. The activity diagram is one of
the many tools available from UML to document system design and operation.

In the design step, a detailed circuit diagram of the entire system is developed. It will serve as a
roadmap to implement the system. It is also a good idea at this point to investigate available
design information relative to the project. This would include hardware design examples,
software code examples, and application notes available from manufacturers.

At the completion of this step, the prototype design is ready for implementation and testing.
5- Implement Prototype

To successfully implement a prototype, an incremental approach should be followed. Again, the


top–down design, bottom–up implementation provides a solid guide for system
implementation. In an embedded system design involving both hardware and software, the
hardware system including the microcontroller should be assembled

first. This provides the software the required signals to interact with. As the hardware
prototype is assembled on a prototype board, each component is tested for proper operation
as it is brought online. This allows the designer to pinpoint malfunctions as they occur.

Once the hardware prototype is assembled, coding may commence. As before, software should
be incrementally brought online. You may use a top down, bottom up, or hybrid approach
depending on the nature of the software. The important point is to bring the software online
incrementally such that issues can be identified and corrected early on.

It is highly recommended that low cost stand–in components be used when testing the
software with the hardware components. For example, push buttons, potentiometers, and LEDs
may be used as low cost stand–in component simulators for expensive input instrumentation
devices and expensive output devices such as motors. This allows you to insure the software is
properly operating before using it to control the actual components.

6- PRELIMINARY TESTING

To test the system, a detailed test plan must be developed. Tests should be developed to verify
that the system meets all of its requirements and also intended system performance in an
operational environment. The test plan should also include scenarios in which the system is
used in an unintended manner. As before a top–down, bottom–up, or hybrid approach can be
used to test the system.

Once the test plan is completed, actual testing may commence. The results of each test should
be carefully documented. As you go through the test plan, you will probably uncover a number
of run time errors in your algorithm. After you correct a run time error, the entire test plan
must be performed again. This ensures that the new fix does not have an unintended effect on
another part of the system. Also, as you process through the test plan, you will probably think
of other tests that were not included in the original test document. These tests should be
added to the test plan. As you go through testing, realize your final system is only as good as
the test plan that supports it!
Qa) page 3
Arduino robot arm with smartphone controls

a) Small size, low weight: we need the robotic arm to have low weight because we are using small servo
motors and hence the size has to be small and compact

Low power: the project has low power usage of 30 watts, it runs on 12 volts servomotors

It doesn’t work in harsh environments because its just a model of the capabilities of the project but
a life sized arm can be equipped to do so easily

For safety it has a stop button to stop all operation

And for cost its seemingly pricy with a students standards, it costs around 1400 LE to print the parts
and about 600 for servos

b)

unit cost: it costs around 2500 LE over all, 1400 for printing, 600 for servos, and 500 for Arduino and
Bluetooth module and power circuit

NRE cost: it costs nothing as the system was pre designed on the internet

Size: its compact design lets it be crammed into a very small space of 30x30 cm box

Performance: other than the little bit of lag because of the microcontroller speed and the size of
the code the arm runs smoothly

Power: the system used around 30 watts of power which aren’t high

Time-to-prototype: it took about an hour to assemble and 5 days of writing code and debugging

Time to market: a very long time because this is just a prototype with a small size, for it to be practical it
needs changes in code, parts, and materials
Maintainability: its easy to maintain because it doesn’t contain that much parts

c)

for designing we went with a predesigned file on the internet so that it would have proper dimensions
and less printing cost, when printing the printer program accepts solidworks files so it was fairly easy to
print then we went to assemble the arm and it was fairly easy it had 6 screws with bolts

Ok, so at this point we are ready to assemble the robot arm. I started with the base on which I attached
the first servo motor using the screws included in its package. Then on the output shaft of the servo I
secured a round horn a bolt.

And on top of it I placed the upper part and secured it using two screws.

Here again first goes servo, then the round horn onto the next part, and then they are secured to each
other using the bolt on the output shaft.

We can notice here that at the shoulder axis it is good idea to include some kind of spring or in my case I
used a rubber band to give some help to the servo because this servo carries the whole weight of the
rest of the arm as well as the payload.

In similar way I continued to assemble the rest of the robot arm. As for the gripper mechanism I used
some 4 millimeters bolts and nuts to assembly it.
I made the app using the MIT App Inventor online application and here’s how it works. At the
top we have two buttons for connecting the smartphone to the HC-05 Bluetooth module. Then
on the left side we have an image of the robot arm, and on the right side we have the six slider
for controlling the servos and one slider for the speed control.

Each slider have different initial, minimum and maximum value that suits the
robot arm joints. At the bottom of the app, we have three button, SAVE, RUN
and RESET through which we can program the robot arm to run automatically.
There is also a label below which shows the number of steps we have saved.
Nevertheless, for more details how to build apps like this using the MIT App
Inventor you can check my other detailed tutorial for it.

Ok, now let’s see the program or the blocks behind the application. First, on the
left side we have the blocks for connecting the smartphone to the Bluetooth
module.
Then we have the sliders blocks for the servo position control and the buttons
blocks for programing the robot arm. So if we change the position of the slider,
using the Bluetooth function .SendText, we send a text to the Arduino. This text
consist of a prefix which indicates which slider has been changed as well as the
current value of the slider.
Qa) page4

Qb) page4
Sensor – It measures the

Physical quantity and converts it to an electrical signal which can be read by an


observer or by any electronic instrument like an A2D converter. A sensor stores
the measured quantity to the memory.

A-D Converter – An analog-to-digital converter converts the analog signal sent by


the sensor into a digital signal.

Processor – Processors process the data to measure the output and store it to the
memory.

D-A Converter – A digital-to-analog converter converts the digital data fed by the
processor to analog data.

Actuator – An actuator compares the output given by the D-A Converter to the
actual (expected) output stored in it and stores the approved output.
Qc) page 4
Single-functioned

An embedded system usually performs a specialized operation and does the same repeatedly.

For example: A pager always functions as a pager.

Tightly constrained

All computing systems have constraints on design metrics, but those on an embedded system
can be especially tight.

Design metrics is a measure of an implementation's features such as its cost, size, power, and
performance.

It must be of a size to fit on a single chip, must perform fast enough to process data in real time
and consume minimum power to extend battery life.

Reactive and Real time

Many embedded systems must continually react to changes in the system's environment,

And must compute certain results in real time without any delay

Consider an example of a car cruise controller; it continually monitors and reacts to speed and
brake sensors.

It must compute acceleration or de-accelerations repeatedly within a limited time; a delayed


computation can result in failure to control of the car.

Microprocessors based – It must be microprocessor or microcontroller based.

Memory – It must have a memory, as its software usually embeds in ROM. It does not need any
secondary memories in the computer.

Connected – It must have connected peripherals to connect input and output devices.

HW-SW systems – Software is used for more features and flexibility. Hardware is used for
performance and security.
Qd) page 4
Advantages

 Easily Customizable

 Low power consumption

 Low cost

 Enhanced performance

 Real-time operation

 Small size

 Reliability

 Safety

Disadvantages

 High development effort

 Larger time to market

Qe) page 4
Robotics Control

Communications

Smart Toys

Cruise Missile Guidance

Cars Automation Systems

House Apparatus
Page 5 Question
a) Project objective(s)
It is very Simple Follow Me Robot using NodeMCU. It uses NodeMCU HC SR04 Distance Sensor
to sense the nearby object/ human. When it detects the Object/ Human it will start follow.

b) Block diagram

c) Main hardware components


1) NodeMCU – Microcontroller

2) HC SR04 - Distance Sensor

3) L298N - Motor Driver

4) 2 X 150 RPM 12V/5V DC Motor with Wheels

5) Hylam Sheet - Mounting All Parts

6) DC-DC StepUp Converter Module

7) Power Bank

Caster Wheel

9) Breadboard
d) General software flow chart

e) Implementation procedures
The HC-SR04 sensor attach to the Breadboard The sensor Vcc is connected to the NodeMCU
+3.3V/5V The sensor GND is connected to the NodeMCU GND The sensor Trigger Pin is
connected to the NodeMCU Digital I/O D4 The sensor Echo Pin is connected to the NodeMCU
Digital I/O D3 Some Sensor works with 3.3V.

f) Testing procedures.
Check all the connections and making sure that it’s right then turn the power on
g) Your roll in the project team
Hardware

You might also like