Embedded Systems: Quiz 2
Embedded Systems: Quiz 2
Embedded systems
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)
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).
A temporary holding ground for the instruction that has just been fetched from
memory.
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.
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:
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.
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.
In the design step, several tools are employed to ease the design process. They include the
following:
• Using a Unified Modeling Language (UML) activity diagram to work out program flow, and
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
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
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
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.
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.
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.
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 cost
Enhanced performance
Real-time operation
Small size
Reliability
Safety
Disadvantages
Qe) page 4
Robotics Control
Communications
Smart Toys
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
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