Neeraj PDF
Neeraj PDF
Neeraj PDF
TRAINING REPORT
On
Neeraj Kanwar
Degree of
BACHELOR OF ENGINEERING
IN
ELECTRICAL ENGINEERING
I Neeraj Kanwar, student of 4th year of Electrical Engineering Department of Rajasthan College
of Engineering for Women would like to thank my guide Mr.Ravindra Singh Shekhawat,
Research Engineer. I appreciate his presence for giving all discussions, suggestions and the time
for me whenever I needed him.
I would also like to give my special thanks to the Dr. Arihant Khicha, Principal and the
management of Rajasthan College of Engineering For Women for providing the opportunity to
me to undertake this work.
I also want to thank my friends and family for their encouragement and support. In particular, I
am grateful to my parents for their love and for instilling in me a deep sense of academic pride.
Lastly, I offer my regards and blessings to all of those who supported me in any respect during
the completion of the work.
Neeraj Kanwar
TABLE OF CONTENTS
1 1.1 Microcontroller IC 2
12 6.3 L293D 21
13 6.4 L298 21
14 6.5 IC L-293 22
2. 10.1 Operators 35
Topic : Remote control car with automatic headlights using LDR sensor and use of various
sensors.
In our project, we made a remote control car with the help of transmitter and receiver. we
insert a receiver in car for receive the signal and a transmitter in our remote to send or
transmit the signal. thus remote transmit the signal with the help of transmitter and receiver
receive the signal, according to them our will move .
In our project , we also include some sensor for automation and for safety purpose. we
make headlights of car automatic by using LDR sensor, by which lights will automatically
on in dark and off in light by sensing the density of light. we can also use the alcohol
sensor near by driver seat ,if the driver is drunk over a limit then car will not start in any
condition. that help us in reducing the accident by drunk and drive. we can also use the
seatbelt sensor , if the any person in car is not wear the seatbelt then car will not start.
Chapter 1.
INTRODUCTION of MICROCONTROLLERS
You must be knowing about Digital Integrated Circuits (ICs) right ? For example:
There are AND, XOR, NAND, NOR, OR logic gate ICs, Counters, Timers, Seven Segment
Display Drivers and much more. Just check out 7400 Series and 4000 Series of Integrated
Circuits.
Now let’s take Quad 2 input AND gate IC. It has 4 AND gates, each having 2 pins for input
and 1 pin for output. The truth table or the function table of each gate is fixed. This is as
follows,
Similarly all the Integrated circuits have their function tables and input and output pins fixed.
You cannot change the function and no input pin act as output and vice versa. So whenever
you want to design some circuit you first have to get the output as a function of inputs and
then design it using gates or whatever the requirement is.
So once a circuit is built we cannot change its function ! Even if you want to make some
changes again you have to consider all the gates and components involved. Now if you are
designing any circuit which involves change of the function table every now and then you are
in trouble ! For example if I want to design an Autonomous Robot which should perform
various tasks and I don’t just want to fix the task. Suppose I make it to move in a path then I
want to change the path ! How to do that ?
Here comes the use of Microcontrollers ! Now if I give you an Integrated Circuit with 20 pins
and tell you that you can make any pin as output or input also you can change the function
table by programming the IC using your computer ! Then your reactions will be wow ! that’s
nice :-) That’s what the most basic function of a microcontroller is. It has set of pins called as
PORT and you can make any pin either as output or input. After configuring pins you can
program it to perform according to any function table you want. You can change the
configuration or the function table as many times you wants.
1
There are many Semiconductor Companies which manufactures
microcontrollers. Some of them are:
Intel
Atmel
Microchip
Motorola
We will discuss about Atmel Microcontrollers commonly known as AVR in this section.
Answer: Well I cannot go into lot of details about the working because it is a vast topic in
itself. I can just give an overview.
Answer: You basically write the program on your computer in any of the high level
languages like c. Then you compile the code to generate the machine file. Now you will ask
what this machine file is ? All the machines understand only one language, 0 & 1 that is on
and off. Now this 0 & 1 both corresponds to 2 different voltage levels for example 0 volt for
0 logic and +5 volt for 1 logic. Actually the code has to be written in this 0, 1 language and
then saved in the memory of the microcontroller. But this will be very difficult for us ! So we
write the code in the language we understand (C) and then compile and make the machine file
(.hex). After we make this machine file we feed this to the memory of the microcontroller.
Answer: Assuming you have the machine file (.hex) ready and now you want to feed that to
the flash of the microcontroller. Basically you want to make communication between your
computer and microcontroller. Now computer has many communication ports such as Serial
Port, Parallel Port and USB (Universal Serial Bus).
Let’s take Serial Port, it has its own definition that is voltage level to define 0 & 1 (yeah all
the data communication is a just collection of 0 & 1 ) Serial Port's protocol is called as UART
(Universal Asynchronous Receiver & Transmitter) Its voltage levels are : +12 volt for 0 logic
and -12 volt for 1 logic.
2
Now the voltage levels of our microcontroller are based on CMOS (Complementary Metal
Oxide Semiconductor) technology which has 0 volt for 0 logic and +5 volt for 1 logic.
Two different machines with 2 different ways to define 0 & 1 and we want to exchange
information between them. Consider microcontroller as a French and Computer's Serial Port
as an Indian person (obviously no common language in between !) If they want to exchange
information they basically need a mediator who knows both the language. He will listen one
person and then translate to other person. Similarly we need a circuit which converts CMOS
(microcontroller) to UART (serial port) and vice versa. This circuit is called as programmer.
Using this circuit we can connect computer to the microcontroller and feed the machine file
to the flash.
Atmel Microcontrollers are very famous as they are very easy to use. There are many
development tools available for them. First of all we need an easy IDE for developing code. I
suggest beginners to use CVAVR (Code Vision AVR) Evaluation version is available for free
download from the website. It has limitation of code size. It works on computers with
Windows platform that is Windows XP & Vista.
AVRGCC is a very nice open source compiler used by most of the people.
1.2 Programmer
Hardware depends on the communication port you are using on the computer (Serial,
Parallel or USB). I suggest beginners to use Serial Programmer as it is very easy to build.
Software for that is Pony Prog. Some famous Windows (XP, Vista) programmers are:
3
Chapter 2.
ATMEGA 16 MICROCONTROLLERS
2.1 Features
4
Fig. 2.1 Pin Configuration
5
Fig. 2.2 Block Diagram Atmega 16
6
GND: Ground. (0 V) Note there are 2 ground Pins.
RESET: Reset Input. A low level on this pin for longer than the minimum pulse length
will generate a reset, even if the clock is not running.
AVCC: AVCC is the supply voltage pin for Port A and the A/D Converter. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should
be connected to VCC through a low-pass filter.
AREF: AREF is the analog reference pin for the A/D Converter.
So let’s start with understanding the functioning of AVR. We will first discuss about I/O
Ports. Again I remind you that I will be using and writing about Atmega-16. Let’s first
have a look at the Pin configuration of Atmega-16. Image is attached, click to enlarge.
You can see it has 32 I/O (Input/Output) pins grouped as A, B, C & D with 8 pins in is
group is called as PORT.
7
PA0 - PA7 (PORTA)
PB0 - PB7 (PORTB)
PC0 - PC7 (PORTC)
PD0 - PD7 (PORTD)
Notice that all these pins have some function written in bracket. These are additional
function that pin can perform other than I/O. Some of them are.
2.6 Registers
All the configurations in microcontroller is set through 8 bit (1 byte) locations in RAM
(RAM is a bank of memory bytes) of the microcontroller called as Registers. All the
functions are mapped to its locations in RAM and the value we set at that location that is at
that Register configures the functioning of microcontroller. There are total 32 x 8bit
registers in Atmega-16. As Register size of this microcontroller is 8 bit, it called as 8 bit
microcontroller.
8
Chapter 3.
I/O Ports
Input Output functions are set by Three Registers for each PORT.
Go to the page 50 in the datasheet or you can also see the I/O Ports tab in the Bookmarks.
First of all we need to set whether we want a pin to act as output or input. DDRX register sets
this. Every bit corresponds to one pin of PORTX. Let’s have a look on DDRA register.
Bit 7 6 5 4 3 2 1 0
PIN PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
Now to make a pin act as I/O we set its corresponding bit in its DDR register.
If I write DDRA = 0xFF (0x for Hexadecimal number system) that is setting all the bits of
DDRA to be 1, will make all the pins of PORTA as Output.
Similarly by writing DDRD = 0x00 that is setting all the bits of DDRD to be 0, will make all
the pins of PORTD as Input.
Now let’s take another example. Consider I want to set the pins of PORTB as shown in table,
For this configuration we have to set DDRB as 11010001 which in hexadecimal is D1. So we
will write DDRB=0xD1
Summary
This register sets the value to the corresponding PORT. Now a pin can be Output or Input.
So let’s discuss both the cases.
If a pin is set to be output, then by setting bit 1 we make output High that is +5V and by
setting bit 0 we make output Low that is 0V.
Let’s take an example. Consider I have set DDRA=0xFF, that is all the pins to be Output.
Now I want to set Outputs as shown in table,
For this configuration we have to set PORTA as 11000110 which in hexadecimal is C6. So
we will write PORTA=0xC6;
If a pin is set to be input, then by setting its corresponding bit in PORTX register will make it
as follows,
Tristated means the input will hang (no specific value) if no input voltage is specified on that
pin.
Pull Up means input will go to +5V if no input voltage is given on that pin. It is basically
connecting PIN to +5V through a 10K Ohm resistance.
Summary
10
3.2 PINX (Data Read Register)
This register is used to read the value of a PORT. If a pin is set as input then
corresponding bit on PIN register is,
For an example consider I have connected a sensor on PC4 and configured it as an input
pin through DDR register. Now I want to read the value of PC4 whether it is Low or
High. So I will just check 4th bit of PINC register.
We can only read bits of the PINX register; can never write on that as it is meant for
reading the value of PORT.
Summary
I hope you must have got basic idea about the functioning of I/O Ports. For detailed
reading you can always refer to datasheet of Atmega.
11
Chapter 4.
LCD INTERFACING
Now we need to interface an LCD to our microcontroller so that we can display messages,
outputs, etc. Sometimes using an LCD becomes almost inevitable for debugging and
calibrating the sensors (discussed later). We will use the 16x2 LCD, which means it has
two rows of 16 characters each.
Hence in total we can display 32 characters.
There are 16 pins in an LCD; See reverse side of the LCD for the PIN
configuration. The connections have to be made as shown below:
12
Fig. 4.2 LCD Connections
When we connect an LCD to Atmega16, one full PORT is dedicated to it, denoted by PORT-
X in the figure. To enable LCD interfacing in the microcontroller, just click on the LCD tab
in the Code Wizard and select the PORT at which you want to connect the LCD. We will
select PORTC. Also select the number of characters per line in your LCD. This is 16 in our
case. Code Wizard now shows you the complete list of connections which you will have to
make in order to interface the LCD. These are nothing but the same as in the above figure for
general PORT-X.
13
Fig. 4.3 LCD settings on CVAVR wizard window
As you can see, there are some special connections other than those to uC, Vcc and gnd.
These are general LCD settings. Pin 3 (VO) is for the LCD contrast, ground it through a
<1kΩ resistance/ potentiometer for optimum contrast. Pin 15 & 16 (LEDA and LEDK)
are for LCD backlight, give them permanent +5V and GND respectively as we need to
glow it continuously.
Now once the connections have been made, we are ready to display something on our screen.
Displaying our name would be great to start with. Some of the general LCD functions which
you must know are:
4.3.1 lcd_clear()
Clears the lcd. Remember! Call this function before the while(1) loop, otherwise you
won’t be able to see anything!
4.3.2 lcd_gotocy(x,y)
Place the cursor at coordinates (x,y) and start writing from there. The first coordinate is
(0,0). Hence, x ranges from 0 to 15 and y from 0 to 1 in our LCD. Suppose you want to
display something starting from the 5th character in second line, then the function would be
14
lcd_gotoxy(5,1);
4.3.3 lcd_putchar(char c)
lcd_putsf(“IIT Kanpur”);
To display a variable string, which is nothing but an array of characters (data type char) in
C language . e.g., You have an array char c[10] which keeps on changing. Then to display
it, the function would be called as
lcd_puts(c);
Now we have seen that only characters or strings (constant or variable) can be displayed on
the LCD. But quite often we have to display values of numeric variables, which is not
possible directly. Hence we need to first convert that numeric value to a string and then
display it. For e.g., if we have a variable of type integer, say int k, and we need to display
the value of k (which changes every now and then, 200 now and 250 after a second... and
so on). For this, we use the C functions itoa() and ftoa(), but remember to include the
header file stdlib.h to use these C functions.
It stores the value of integer val in the character array arr. E.g., we have already defined
int i and char c[20], then
itoa(i,c);
lcd_puts(c
);
Similarly we have
It stores the value of floating variable f in the character array arr with the number of
decimal places as specified by second parameter. E.g., we have already defined float f and
char c[20], then
15
Now we are ready to display anything we want on our LCD. Just try out something
which you would like to see glowing on it!
16
Chapter 5.
AUTONOMUS ROBOTS
Includes wheeled or any type of chassis with all the necessary actuators fitted on the
chassis to achieve desired goal. We mostly use DC geared motors as actuators.
2. Electronics
Electronics includes Sensors, motion control circuits, power management system etc.
3. Power Source
Usually battery pack consisting of Lead acid, Nickel cadmium, Nickel metal hydride
or Lithium batteries is used.
4. Intelligence
This is the most important part of the autonomous robots. Usually intelligence is achieved
by using Microcontroller.
First step in making an autonomous robot is to chalk out what tasks we are expecting the
robot to perform. After gauging these we get a vague idea about the design and appearance
of the robot.
Power for motion is provided by back wheels and turning is achieved using front wheels.
17
Fig. 5.1 Robot With Steering Wheel
Advantages:
1. When path to be followed is straight in nature with curved turns this configuration gives
fastest speed and graceful path following.
2. Don’t need to modify left or right wheels velocity to follow the path. This is very
advantageous when we want precision velocity control. In this case back wheels take
care of velocity control and front wheels take care of direction control.
Disadvantages:
1. It will not able to take very sharp turns. Hence it is difficult to move robot on the grid of lines.
A method of controlling a robot where the left and right wheels are powered independently.
The Three Wheel Differential drive uses two motors and a caster or an omni-
directional wheel easiest to design and program.
18
Fig. 5.2 Ball bearing caster, wheel based swivel caster and omni directional wheel
The radius and centre of rotation can be varied by the varying the relative speed of
rotation between the two motors.
For a smooth turn, rotate the wheels in the same direction but with different speeds.
Greater the difference in speeds, smaller the radius of rotation.
Advantages:
2. Easy to move when path to be followed is contoured and zigzag in nature. E.g.,
navigating along the maze of lines.
Disadvantages:
1. If we want to move along curved path we have to control left and right motor’s velocity
independently. Hence precision velocity control becomes difficult as actual velocity of
the robot will be average of the both wheels.
19
Chapter 6.
MOTOR DRIVER
6.1 H- Bridge:
It allows a circuit full control over a standard electric DC motor. That is, with an H-
bridge, a microcontroller, logic chip, or remote control can electronically command
the motor to go forward, reverse, brake, and coast.
H-bridges are available as integrated circuits, or can be built from discrete components.
A "double pole double throw" relay can generally achieve the same electrical
functionality as an H-bridge, but an H-bridge would be preferable where a smaller
physical size is needed, high speed switching, low driving voltage, or where the
wearing out of mechanical parts is undesirable.
The term "H-bridge" is derived from the typical graphical representation of such a
circuit, which is built with four switches, either solid-state (eg, L293/ L298) or
mechanical (eg, relays).
To power the motor, you turn on two switches that are diagonally opposed.
20
Fig. 6.2 The two basic states of an H-bridge.
The current provided by the MCU is of the order of 5mA and that required by a motor is
~500mA. Hence, motor can’t be controlled directly by MCU and we need an
interface between the MCU and the motor.
A Motor Driver IC like L293D or L298 is used for this purpose which has two H-
bridge drivers. Hence, each IC can drive two motors.
Note that a motor driver does not amplify the current; it only acts as a switch (An H
bridge is nothing but 4 switches).
21
Fig. 6.5 IC L-293
Drivers are enabled in pairs, with drivers 1 and 2 being enabled by the Enable pin.
When an enable input is high (logic 1 or +5V), the associated drivers are enabled and
their outputs are active and in phase with their inputs.
When the enable pin is low, the output is neither high nor low (disconnected),
irrespective of the input.
Direction of the motor is controlled by asserting one of the inputs to motor to be high (logic
1) and the other to be low (logic 0).
To move the motor in opposite direction just interchange the logic applied to the two
inputs of the motors.
Asserting both inputs to logic high or logic low will stop the motor.
Resistance of our motors is about 26 ohms i.e. its short circuit current will be
around. 0.46Amp which is below the maximum current limit.
It is always better to use high capacitance (~1000µF) in the output line of a motor
driver which acts as a small battery at times of current surges and hence improves
battery life.
Difference between L293 and L293D: Output current per channel = 1A for L293
and 600mA for L293D.
L293 is quadruple half-H driver while L298 is dual full-H driver, i.e, in L293 all
four input- output lines are independent while in L298, a half H driver cannot be
used independently, only full H driver has to be used.
Output current per channel = 1A for L293 and 2A for L298. Hence, heat sink is
22
provided in L298.
Protective Diodes against back EMF are provided internally in L293D but must be
provided externally in L298.
To control motor speed we can use pulse width modulation (PWM), applied to the
enable pins of L293 driver.
PWM is the scheme in which the duty cycle of a square wave output
from the microcontroller is varied to provide a varying average DC
output.
What actually happens by applying a PWM pulse is that the motor is switched ON
and OFF at a given frequency. In this way, the motor reacts to the time average of the
power supply.
23
Chapter 7.
SENSORS
24
The output can be taken to a microcontroller either to its ADC (Analog to Digital
Converter) or LM 339 can be used as a comparator.
It does not respond to any stray IR, it only responds to IR falling on it at a pulse
rate of 38 KHz. Hence we have a major advantage of high immunity against
ambient light.
No comparator is required and the range of the sensor can be varied by varying the
intensity of the IR emitting diode (the variac in figure).
25
Chapter 8.
INTRODUCTION OF MATLAB
Introduction
MATALB stands for MATrix LABoratory. Hence, as the name suggests, here we play
around with matrices .MATLAB is a high-level language .It was originally designed for
solving linear algebra type problems using matrices. It provides an interactive environment
for
• Numerical Computation
• Visualization
• Programming
• Numerical Computation
• Data Processing
• Image processing
• Programming
• Design Games
APPLICATIONS
• Aerospace
• Biometrics
26
• Medical
• Finance
• Control System
• Animation
Features of MATLAB
Following are the basic features of MATLAB:
It also provides an interactive environment for iterative exploration, design and problem
solving.
It provides vast library of mathematical functions for linear algebra, statistics, Fourier
analysis, filtering, optimization, numerical integration and solving ordinary differential
equations.
It provides built-in graphics for visualizing data and tools for creating custom plots.
MATLAB's programming interface gives development tools for improving code quality
and maintainability and maximizing performance.
File Extensions
• .fig >> MATLAB Figure
28
Chapter 9.
WORKING IN MATLAB
STEPS TO START UP
OPEN MATLAB
29
Current folder Directory: It is useful when you need to execute the function from
command window directly.
As MATLAB is based on MATrices, so, let’s begin with the matrix manipulations
only. Below is an example, how to right single dimensional and multidimensional
30
matrix or array.
MATLAB allows adding two matrix directly as it’s so difficult in Mathematics to add
for M x N matrix by calculations on paper.
31
Simply a=1:100 means an array which holds values from 1 to 100.
32
Chapter 10.
BASICS OF MATLAB
Command Window - This is the main area where you enter commands at the
command line, indicated by the command prompt (>>).
Workspace - The workspace shows all the variables you create and/or import from files
Command History - This panels shows or rerun commands that you entered at the command
line.
33
MATLAB environment behaves like a super-complex calculator. You can enter commands
at the >> command prompt.
MATLAB is an interpreted environment. In other words, you give a command and MATLAB
executes it right away.
MATLAB supports the following commonly used operators and special characters:
Operator Purpose
+ Plus; addition operator.
- Minus; subtraction operator.
* Scalar and matrix multiplication operator.
.* Array multiplication operator.
^ Scalar and matrix exponentiation operator.
.^ Array exponentiation operator.
\ Left-division operator.
/ Right-division operator.
.\ Array left-division operator.
./ Array right-division operator.
Colon; generates regularly spaced elements and represents an
: entire row or column.
Parentheses; encloses function arguments and array indices;
() overrides precedence.
[] Brackets; enclosures array elements.
. Decimal point.
34
… Ellipsis; line-continuation operator
, Comma; separates statements and elements in a row
; Semicolon; separates columns and suppresses display.
% Percent sign; designates a comment and specifies formatting.
_ Quote sign and transpose operator.
._ Nonconjugated transpose operator.
= Assignment operator.
In previous chapters, you have learned how to enter commands from the MATLAB command
prompt. MATLAB also allows you to write series of commands into a file and execute the
file as complete unit, like writing a function and calling it.
The M Files
Scripts - script files are program files with .m extension. In these files, you write series
of commands, which you want to execute together. Scripts do not accept inputs and do
not return any outputs. They operate on data in the workspace.
Functions - functions files are also program files with .m extension. Functions can
accept inputs and return outputs. Internal variables are local to the function.
You can use the MATLAB Editor or any other text editor to create your .m files. In this
section, we will discuss the script files. A script file contains multiple sequential lines of
MATLAB commands and function calls. You can run a script by typing its name at the
command line.
MATLAB does not require any type declaration or dimension statements. Whenever
MATLAB encounters a new variable name, it creates the variable and allocates appropriate
memory space.
If the variable already exists, then MATLAB replaces the original content with new content
and allocates new storage space, where necessary.
35
Data Type Description
int8 8-bit signed integer
uint8 8-bit unsigned integer
int16 16-bit signed integer
uint16 16-bit unsigned integer
int32 32-bit signed integer
uint32 32-bit unsigned integer
int64 64-bit signed integer
uint64 64-bit unsigned integer
single single precision numerical data
double double precision numerical data
logical logical values of 1 or 0, represent true and false respectively
char character data (strings are stored as vector of characters)
array of indexed cells, each capable of storing an array of a
cell array different dimension and data type
C-like structures, each structure having named fields capable of
structure storing an array of a different dimension and data type
function handle pointer to a function
user classes objects constructed from a user-defined class
java classes objects constructed from a Java class
36
Chapter 11.
In this section, we will provide lists of commonly used general MATLAB commands.
MATLAB provides various commands for managing a session. The following table
provides all such commands:
Command Purpose
clc Clears command window.
clear Removes variables from memory.
exist Checks for existence of file or variable.
global Declares variables to be global.
help Searches for a help topic.
lookfor Searches help entries for a keyword.
quit Stops MATLAB.
who Lists current variables.
whos Lists current variables (long display).
MATLAB provides various useful commands for working with the system, like
saving the current work in the workspace as a file and loading the file later.
It also provides various commands for other system-related activities like, displaying
date, listing files in the directory, displaying current directory, etc.
37
date Displays current date.
The format function has the following forms used for numeric display:
Format Function
Display up to
38
Chapter 12.
MATLAB SIMULINK
MATLAB SIMULINK
Simulink is a simulation and model-based design environment for dynamic and
embedded systems, integrated with MATLAB. Simulink, also developed by
MathWorks, is a data flow graphical programming language tool for modeling,
simulating and analyzing multi-domain dynamic systems. It is basically a graphical
block diagramming tool with customizable set of block libraries.
It allows you to incorporate MATLAB algorithms into models as well as export the
simulation results into MATLAB for further analysis.
Simulink supports:
System-level design
Simulation
There are several other add-on products provided by MathWorks and third-party
hardware and software products that are available for use with Simulink.
39
Simulink is capable of systematic verification and validation of models through
modeling style checking, requirements traceability and model coverage analysis.
Simulink Design Verifier allows you identify design errors and generates test case
scenarios for model checking.
Using Simulink
simulink
Simulink opens with the Library Browser. The Library Browser is used for
building simulation models.
40
On the left side window pane, you will find several libraries categorized on the basis
of various systems, clicking on each one will display the design blocks on the right
window pane.
Building Models
To create a new model, click the New button on the Library Browser's toolbar. This
opens a new untitled model window
Model elements are added by selecting the appropriate elements from the Library
Browser and dragging them into the Model window.
Alternately, you can copy the model elements and paste them into the model window.
Examples
Drag and drop items from the Simulink library to make your project.
For the purpose of this example, 2 blocks will be used for the simulation - A Source
(a signal) and aSink (a scope). A signal generator (the source) generates an analog
signal, which will then be graphically visualized by the scope(the sink).
41
Begin by dragging the required blocks from the library to the project window. Then,
connect the blocks together which can be done by dragging connectors from
connection points on one block to those of another.
42
Select 'Sinks' from the library and drag a 'Scope' block into the model.
Drag a signal line from the output of the Sine Wave block to the input of the Scope block.
Run the simulation by pressing the 'Run' button, keeping all parameters default (you can
change them from the Simulation menu)
You should get the below graph from the scope.
43
44
References
45
46