engineering-training-report-nawaj sharif

48
SHARIF, Mohammed Nawaj UID: 3035123095 Engineering Training Report (ELEC2840) 30 MAY – 24 JUNE 2016 Content: 1. Microcontroller (MIC) 2. CAD/CAE Tools Practice (CAD) 3. MCB Installation (MCB) 4. Virtual Instrumentation (VI)

Upload: nawaj-sharif

Post on 13-Apr-2017

103 views

Category:

Documents


13 download

TRANSCRIPT

Page 1: Engineering-Training-Report-Nawaj Sharif

SHARIF, Mohammed Nawaj UID: 3035123095

Engineering Training Report (ELEC2840) 30 MAY – 24 JUNE 2016

Content:

1. Microcontroller (MIC)

2. CAD/CAE Tools Practice (CAD)

3. MCB Installation (MCB)

4. Virtual Instrumentation (VI)

Page 2: Engineering-Training-Report-Nawaj Sharif

1

MODULE 1: MICROCONTROLLER (MIC) A microcontroller (MCU) is a small computer on a single integrated circuit containing a processor core,

memory, and programmable I/O peripherals. MCUs are designed for embedded applications, such as

automobile engine control systems, remote controls, biomedical appliances, power tools and other

embedded systems.

In this module we learnt how to connect a breadboard with a microprocessor and with some LEDs, lights

array and a keypad.

Upon completion we learnt how to make a fully functional Microprocessor Circuit Unit. The connections

were done manually and all the components were provided. Figure 1 below shows the physical end

product (i.e. the MCU):

Figure 1

After completing the connections on the breadboard and settling the microprocessor as the centre of the

circuit, we had to write program codes on the computer using the C language. By using these codes, we

had to run the LED lights accordingly.

Page 3: Engineering-Training-Report-Nawaj Sharif

2

The MCU was also connected to the computer by a cable. Once the program was written in C language, it

was to be downloaded onto the MCU and the result of the program could be seen by the behaviour of the

LED lights.

Basically, we learnt how to write, download and debug programs onto the MCU and see how the

Microprocessor dealt with the commands given.

The general structure of the C language is stated below:

/* Programmer: Sharif Mohammed Nawaj

Group HKUEEE */

#include <io.h>

void loopDelay(unsigned int n)

{

while (n>0)

{

n--;

}

}

int i=0xFF;

void main (void)

{

}

END PROGRAM

In the program above, the main instructions and commands of the program were written after the

function “void main (void)” and in between the brackets. Those are the codes which vary the outcomes

of each of the program made.

During the course of 5 days, the programs which were written and successfully downloaded onto the MCU

are given below.

Ex 1-1: Flash

Description: When the program was downloaded, the LEDs all started flashing.

Code:

#include <io.h>

Page 4: Engineering-Training-Report-Nawaj Sharif

3

void loopDelay(unsigned int n) { while (n>0) n--; } int i=0xFF; void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0xFF; while (1) { if (i==0x55) i=0xAA; else i=0x55; PORTA = ~PORTA; loopDelay(10000); } }

Ex 1-2: Counter

Description: In this program, the lights turn on as a counter and stay on until all LED‟s are lit. This count

is in binary form and the lights represent numbers in binary form.

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i=0xFF; void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01; while (1) { PORTA = PORTA+1; loopDelay(100000); } }

Page 5: Engineering-Training-Report-Nawaj Sharif

4

Ex 1-3: Walk

Description: When the program gets downloaded, the LEDs light up one by one and in one direction. The

previous LED goes off when the next one lights up.

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01; while (1) { PORTA = PORTA<<1; if (PORTA == 0x00) PORTA = 0x01; loopDelay(100000); } }

Ex 1-4: Scan

Description: In this program, when downloaded onto MCU, the LEDs turn on one by one, like “1-3

Walking”. But the only difference is that the lights walk back in reverse order when they reach the last

LED on each side. This way, the lights keep on running from side to side.

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01; while (1) { while(PORTA != 0x80)

Page 6: Engineering-Training-Report-Nawaj Sharif

5

{ PORTA = PORTA<<1; loopDelay(100000); } while(PORTA != 0x01) { PORTA = PORTA>>1; loopDelay(100000); } } }

Ex 1-5: Level

Description: In this program, when downloaded, the LEDs begin to turn on and stay on cumulatively until

all the LEDs are turned ON.

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i,j; void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01; while (1) { PORTA = (1<<i) - 1; i= ++i % 9; loopDelay(100000); } }

Ex 1-6: Pattern

Description: When downloaded, this program makes the LED‟s turn on in a specific manner. That specific

manner is already stated in the array given below in the program. So, basically, the array has all the

information to make the lights turn on accordingly.

Code:

Page 7: Engineering-Training-Report-Nawaj Sharif

6

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i=0; const char DATA[]= { 0x81,0x42,0x24,0x18,0x24, 0x42,0x81,0xF0,0x0F,0xF0, 0x0F,0xAA,0x55,0xAA,0x55, 0xff,0x00,0xff,0x00,0x99 }; void main(void) { DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01; while (1) { PORTA = DATA[i]; loopDelay(100000); i++; if( DATA[i] == 0x99 ) i=0; } }

Ex 2-1: SEGscan

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } void main(void) { DDRA = 0xFF; DDRC = 0xE0; PORTA = 0x00;

Page 8: Engineering-Training-Report-Nawaj Sharif

7

PORTC = 0xE0; while (1) { PORTA = PORTA<<1; if (PORTA == 0x00) PORTA = 0x01; loopDelay(100000); } }

Ex 2-2: NUMscan

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i=0; const char DATA[]= { 0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101 , 0b00000111, 0b01111111, 0b01101111, 0b00000000 }; void main(void) { DDRA = 0xFF; DDRC = 0xE0; PORTC = 0xE0; while (1) { PORTA = DATA[i]; loopDelay(100000); i++; if( DATA[i] == 0b00000000 ) i=0; } }

Ex 2-3: COLscan

Code:

Page 9: Engineering-Training-Report-Nawaj Sharif

8

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i=0; const char DATA[]= { 0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101 , 0b00000111, 0b01111111, 0b01101111, }; int j=0; const char DisplayPORTC[]= { 0x80,0x40,0x20 }; void main(void) { DDRA = 0xFF; DDRC = 0xE0; while (1) { PORTC = DisplayPORTC[j]; j++; if(j==3) j=0; PORTA = DATA[i]; i++; if(i==10) i=0; loopDelay(100000); } }

Ex 2-4: NUMcntr

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; }

Page 10: Engineering-Training-Report-Nawaj Sharif

9

int i=0; const char DATA[10]= { 0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101 , 0b00000111, 0b01111111, 0b01101111, }; const char count[3]= { 0x80,0x40,0x20 }; char D[3]; int j=0; void cal() { if(j==1000) j=0; D[0]=(j%100)%10; D[1]=(j%100)/10; D[2]=j/100; j=++j%1000; } int k=0; void main(void) { DDRA = 0xFF; DDRC = 0xE0; DDRE = 0b000; while (1) { for(k=0; k<10; k++) { for(i=0; i<3; i++) { PORTA = DATA[D[i]]; PORTC = count[i]; loopDelay(700); } } cal(); } }

Page 11: Engineering-Training-Report-Nawaj Sharif

10

Ex 4-1: INPcopy

Code:

#include <io.h> void main(void) { DDRA = 0xFF; DDRD = 0x00; DDRE = 0b010; PORTE = 0x00; while (1) { PORTA = PIND; } }

Ex 4-2: INPcopyPU

Code:

#include <io.h> void main(void) { DDRA = 0xFF; DDRD = 0x00; DDRE = 0b010; PORTE = 0x00; PORTD = 0xFF; while (1) { PORTA = PIND; } }

Ex 4-3: IOPcopyPU

Code:

#include <io.h> int j; void main(void)

Page 12: Engineering-Training-Report-Nawaj Sharif

11

{ DDRD = 0xF0; DDRE = 0b010; PORTE = 0x00; PORTD = 0xFF; while (1) { PORTD = j<<4|0b00001111; j = PIND&0x0F; } }

Ex 5-1: flagPTTN

Code:

#include <io.h> int i=0; int k=0; int flag=0; const char DATA[]= { 0x81,0x42,0x24,0x18,0x24, 0x42,0x81,0xF0,0x0F,0xF0, 0x0F,0xAA,0x55,0xAA,0x55, 0xff,0x00,0xff,0x00,0x99 }; interrupt [TIM0_COMP] void timer0_comp_isr(void) { if(k==1000) {k=0; flag=1; } k++; } void main(void) { TCCR0 = 0x0A; OCR0 = 0x7C; TIMSK = 0x01; #asm("sei"); DDRA = 0xFF; DDRE = 0b010;

Page 13: Engineering-Training-Report-Nawaj Sharif

12

PORTE = 0x0; while (1) { if (flag==1) {flag=0; PORTA = DATA[i]; i++; if( DATA[i] == 0x99 ) i=0; } } }

Ex 5-2: intrPTTN

Code:

#include <io.h> int i=0; int k; char DATA[] = {0x81,0x42,0x24,0x18, 0x24,0x42,0x81,0xF0, 0x0F,0xAA,0x55,0xAA, 0x55,0xFF,0x00,0xFF, 0x00 }; interrupt[TIM0_COMP] void timer0_comp_ISR(void) { if (k == 100) {k = 0; PORTA = DATA[i]; i=++i % 17; } k++; } void main(void) { DDRA = 0b11111111; DDRE = 0b010; PORTE = 0b000; TCCR0 = 0x0A; OCR0 = 0x7C; TIMSK = 0x01; #asm("sei"); }

Page 14: Engineering-Training-Report-Nawaj Sharif

13

Ex 5-3: cntrISR

Code:

#include <io.h> int a=0; const char DATA[10]= { 0b00111111, 0b00000110, 0b01011011, 0b01001111, 0b01100110, 0b01101101, 0b01111101 , 0b00000111, 0b01111111, 0b01101111, }; const char count[3]= { 0x80,0x40,0x20 }; char D[3]; int a; int j; int k; int EV; interrupt [TIM0_COMP] void timer0_comp_isr(void) { if(k==1) { k=0; a=++a%3; if(a==3) a=0; if(j==1000) j=0; D[0]=(j%100)%10; D[1]=(j%100)/10; D[2]=j/100; PORTA = DATA[D[a]]; PORTC = count[a]; EV++; if (EV==300) { j=++j%1000; EV=0; } } k++; }

Page 15: Engineering-Training-Report-Nawaj Sharif

14

void main(void) { TCCR0 = 0x0A; OCR0 = 0x7C; TIMSK = 0x01; #asm("sei"); DDRA = 0xFF; DDRC = 0xE0; DDRE = 0b000; PORTE = 0x0; while (1) { } }

Ex 5-4: EXTscan

Code:

#include <io.h> int i=0; int flag=0; void loopDelay(unsigned int n) { while (n>0) n--; } interrupt [EXT_INT1] void ext_int1_isr(void) { flag=1; if (i==0x01) i=0x00; else i=0x01; } void main(void) { MCUCR=0x0C; GICR=0x80; DDRA = 0xFF; DDRE = 0xFF; PORTA = 0x01;

Page 16: Engineering-Training-Report-Nawaj Sharif

15

#asm("sei"); while (1) if(flag) { if (PORTA ==0x01) i=0x01; else if (PORTA == 0x80) i=0x00; if(i == 0x01) PORTA = PORTA<<1; else PORTA = PORTA>>1; loopDelay(100000); } }

Ex 6-1: rowINP

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) n--; } int i=0x01; void main (void) { DDRA = 0xFF; DDRE = 0x06; DDRD = 0xF0; PORTE = 0x06; PORTD = 0x0F; while (1) { PORTA=PIND&(0x0F); } }

Ex 6-2: keyPAD

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) {n--; } }

Page 17: Engineering-Training-Report-Nawaj Sharif

16

int flag, i,j,k; const char DATA []={ 0x3F, 0x30, 0x9B, 0xB9, 0xB4, 0xAD, 0xAF, 0x38, 0xBF, 0xBD, 0xBE, 0xA7, 0x0F, 0xB3, 0x8F, 0x8E }; char DATA2 []={ 0x20, 0x40, 0x80 }; void main(void) { DDRA = 0xFF; DDRC = 0xFF; DDRE = 0x07; DDRD = 0xF0; PORTE = 0x07; PORTC=0xFF; k=0; while (1) { { PORTD=0b00111111; loopDelay(100); i=PIND & 0xF; if (i==0b0111) PORTA=DATA[13]; if (i==0b1011) PORTA=DATA[7]; if (i==0b1101) PORTA=DATA[4]; if (i==0b1110) PORTA=DATA[1]; } { PORTD=0b01011111; loopDelay(100); i=PIND & 0xF; loopDelay(100); if (i==0b0111) PORTA=DATA[0]; if (i==0b1011) PORTA=DATA[8]; if (i==0b1101) PORTA=DATA[5]; if (i==0b1110) PORTA=DATA[2]; } { PORTD=0b01101111; loopDelay(100); i=PIND & 0xF; loopDelay(100); if (i==0b0111) PORTA=DATA[14]; if (i==0b1011) PORTA=DATA[9]; if (i==0b1101) PORTA=DATA[6]; if (i==0b1110) PORTA=DATA[3]; } } }

Page 18: Engineering-Training-Report-Nawaj Sharif

17

Ex 6-3: keyINP

Code:

#include <io.h> void loopDelay(unsigned int n) { while (n>0) { n--; } } int in=0x0F,i=321; int k=0,num; char DATA[]={0b00111111,0b00000110,0b01011011,0b01001111,0b01100110,0b01101101,0b01111101,0b00000111, 0b01111111,0b01101111,0b01000000}; int pointer []={10,10,10}; interrupt [TIM0_COMP] void timer0_comp_ISR(void) { PORTA=0; PORTC=0b00000001<<k; PORTA=DATA[pointer[k]]; k=++k%3; } int scan() { int temp=0x0F; PORTD=0b00111111; loopDelay(50); num=PIND&0x0F; if (num==0x0E) temp=0x01; if (num==0x0D) temp=0x04; if (num==0x0B) temp=0x07; if (num==0x07) temp=0x0A; loopDelay(50); PORTD=0b01011111; loopDelay(50); num=PIND&0x0F; if (num==0x0E) temp=0x02; if (num==0x0D) temp=0x05; if (num==0x0B) temp=0x08; if (num==0x07) temp=0x00; loopDelay(50); PORTD=0b01101111; loopDelay(50); num=PIND&0x0F;

Page 19: Engineering-Training-Report-Nawaj Sharif

18

if (num==0x0E) temp=0x03; if (num==0x0D) temp=0x06; if (num==0x0B) temp=0x09; if (num==0x07) temp=0x0A; loopDelay(50); return (temp); } void main (void) { DDRA = 0xFF; DDRC = 0x07; PORTC = 0x07; DDRD=0xF0; PORTD=0x3F; TCCR0=0x0A; OCR0=0x7C; TIMSK=0x01; #asm("sei"); while (1) { in = scan(); if (in!=0x0F) { pointer[2] = pointer [1]; pointer[1] = pointer [0]; pointer[0] = in; } while (in!=0x0F) in=scan(); } }

Page 20: Engineering-Training-Report-Nawaj Sharif

19

MODULE 2: CAD/CAE TOOLS PRACTICE (CAD) Computer-aided design (CAD) is the use of computer-systems to assist in the creation, modification,

analysis, or optimization of a design. It is used in many fields. Its use in electronic design is known as

Electronic Design Automation.

While preparing PCB, we expose a specially coated copper plate to ultraviolet light. On the plate, a

transparency is placed. The transparency has the circuit printed on it and when the copper plate is

exposed to the UV light, every part of the plate except those covered by the circuit are removed of their

UV light-sensitive coating. After etching, the circuit is formed by the copper on the board.

So the transparency play the key role in circuit formation because it has the circuit printed on it. The circuit

drawing is made on computer. In this module we learnt to make such drawings.

Softwares used were: PowerLogic and PowerPCB.

PowerPCB, as the name suggests, deals with making of a PCB circuit. We used this software to make the

shape of each component (as it would occupy on the board), to draw the pinholes through which these

components will be soldered to the board and also to draw the circuit wires as they would be printed on

the board.

PowerLogic, on the other hand, deals with the schematics of our circuit. We use this software to draw the

physical shape of our components and then use these drawings when we are drawing the schematics of

our circuit.

The first thing we did was to make the component decals in Power PCB. This simply meant drawing the

shape each component would occupy on the board (with the proper measurements) and then drawing

circles to represent their pin holes. The first pin hole was always drawn as square so that the orientation

of the component may be determined easily. A library was created and all the decals were added to that

library.

Once decals were made for all the components, the next step was to make the symbols for these

components for use in our schematics. For this purpose PowerLogic was used. We made the component

symbols and then we linked them up with the component decals from our library so that each pin of the

component symbol may correspond to a specific pin of the decal. This was done for all the components.

Once the symbols for all the components were made, we moved on to drawing the circuit schematics.

This was also done in “PowerLogic”. First we specified our board size and then by inserting the different

components we drew our circuit. Each component was labeled.

After this we opened PowerPCB and started making the circuit as it would appear on the board. All the

components with their labels were present there along with the board. Because of the components we

made in PowerLogic, the software PowerPCB showed us which component would connect with which

component. Using this as the guideline we placed all the components on the board first and then manually

drew the wire connections between them. Much care was required when making the wire connections.

We had to ensure that there was enough gap between the wires and the components so as to ensure a

safe circuit. Not only this, but we also had to make our circuit as neat as possible.

Page 21: Engineering-Training-Report-Nawaj Sharif

20

Once this was done, our PCB circuit was complete and we only had to publish our circuits in the form of

Pdf files.

Three projects were given in this module but we were only required to complete 2 of them due to limited

time.

The first was the 12 hour charger. Figure 2 shows the basic schematic circuit of the 12 hour charger:

Figure 2

Page 22: Engineering-Training-Report-Nawaj Sharif

21

Following are the specifications of the 12V charger as shown in figure 3:

Figure 3

Figure 4 shows us how the components are placed on the circuit boar once it is physically made:

Figure 4

Page 23: Engineering-Training-Report-Nawaj Sharif

22

Below in figure 5 is the placement of the pins in the 12 hours charger. The square pin shows the number

1 pins of the components.

Figure 5

In figure 6 below, we can see the wiring of the 12 hours charger project. And note that no two wires are

overlapping one another.

Figure 6

Page 24: Engineering-Training-Report-Nawaj Sharif

23

The second project we had was the SMD Circuit-NE555 Organ. Following are the requirements of the

stated project as shown in figure 7:

Figure 7

Figure 8 outlines the basic schematic for the project:

Figure 8

Page 25: Engineering-Training-Report-Nawaj Sharif

24

Below in figure 9 represents how the components are placed on the circuit boar once it is physically made

and the placement of the pins in the SMD Circuit-NE555 Organ. The square pin shows the number 1 pins

of the components.

Figure 9

Finally, figure 10 shows the non-overlapping wiring of the PCB:

Figure 10

Page 26: Engineering-Training-Report-Nawaj Sharif

25

MODULE 3: MCB INSTALLATION (MCB) A miniature circuit breaker (MCB) is an automatically-operated electrical switch designed to protect an

electrical circuit from damage caused by overload or short circuit. Its basic function is to detect a fault

condition and interrupt current flow. When a fault causes the circuit to break, the circuit breaker can be

reset (manually or automatically) to resume regular operation.

The colour code of wires used is:

3-phases of 3-phase circuit: Brown, Black, Grey

Neutral: Blue

Earth: Green-Yellow

In this module we practised installing of MCB on the boards that resembled a typical arrangement in a

building. In addition, we learnt some basic AutoCAD drawing skills including basic shapes and room

designing. Two such examples are given in figure 11:

Figure 11

Page 27: Engineering-Training-Report-Nawaj Sharif

26

Later on we worked on the installation of MCB on the board. We learnt the concepts of ring circuit, radial

circuit and two-way switching. A summary of both concepts are illustrated in the following:

Ring Circuit: The ring circuit configuration is

shown in figure 12. In the ring circuit, the

appliances connected are individually protected

by a fused plug. The design enables the use of

smaller diameter wire than would be used in a

radial circuit of equivalent total current. The ring

starts at the consumer unit visits each socket in

turn, and then returns to the consumer unit. The

ring is fed from the circuit breaker in the

consumer unit. They are wired with 2.5mm2 cable

and protected by a 30A circuit breaker.

Figure 12

Radial Circuit: A radial circuit is a mains power circuit found in some homes to feed sockets and lighting

points. It is simply a length of appropriately rated cable feeding one power point, then going on to the

next. The circuit terminates with the last point on it and does not return to the consumer unit or fuse box

as does the ring circuit. There are two types of radial circuit used for sockets, Type A2 which uses 4mm²

CSA Twin & Earth fused at 30A or 32A covering a floor area of 75m², and Type A3 which uses 2.5mm² CSA

Twin & Earth fused at 20A covering a floor area of 50m². As with Ring circuits, there is no limit as to the

amount of sockets that can be fitted to a Radial circuit. Figure 13 illustrates a radial circuit system:

Figure 13

Page 28: Engineering-Training-Report-Nawaj Sharif

27

2-way switch: It is an interconnection of two electrical switches to control an electrical load (such as bulb)

from more than one location. For example, it allows lighting in hallway to be controlled from different

rooms. Figure 14 illustrates a 2-way switch system:

Figure 14

We then setup the following circuit configuration using the above concepts on the board where the

bottom right shows a ring configuration and bottom left shows a radial configuration for example. Figure

15 shows the whole configuration on the board:

Figure 15

Page 29: Engineering-Training-Report-Nawaj Sharif

28

After that we completed installing the MCB. We worked on to complete the wiring of Distribution Board.

Each phase was controlled by a circuit breaker. We made a total of six outlets for consumer units. We also

installed a two-way switch for operating a light bulb. There was one main circuit breaker fed with 3 live

wires of 3 different phases from the mains supply. Then it was split into six different sets of 3-phase

consumer units each controlled by a circuit breaker. Labelling was done with stickers for easier

identification of cables. Each set for a 3-phase consumer unit had a total of five wires including 3-phases,

one neutral and one protective earth wire. The complete wiring is shown in the images below:

Page 30: Engineering-Training-Report-Nawaj Sharif

29

Page 31: Engineering-Training-Report-Nawaj Sharif

30

Page 32: Engineering-Training-Report-Nawaj Sharif

31

MODULE 4: VIRTUAL INSTRUMENTATION (VI) Virtual instrumentation (VI) is the use of customizable software and modular measurement hardware to

create user-defined measurement systems, called virtual instruments.

Software Package Used: NATIONAL INSTRUMENTS LABVIEW

LabVIEW was used to make and design Virtual Instrumentation programs. By making these programs, we

simulated physical systems on the computer software by means of an interface for the user to deal with.

The addition of the interface was solely to make the instrumentation easier for the user to make it more

user-friendly and more realistic system than just a program.

We created several programs with different tasks of their own using this software. These programs were

created on a course of five days’ time and were created to help us get a better insight into virtual

instrumentation and its specific uses.

The LabVIEW has two parts:

1. Front Panel:

This is a front panel designed by us

correctly placing the signs and components

for user’s better understanding.

2. Block Diagram:

This is a typical Example

of a Block Diagram. In

the Block Diagram, the

real circuitry is done

that the end user

doesn’t really see. Each

component is linked

with the ‘easier to

understand’ front panel

and the connections are

completed as functions

so that the intended

purpose of the VI is

completed.

Page 33: Engineering-Training-Report-Nawaj Sharif

32

All the major tasks and projects done during the 5 days’ period are outlined as follows:

Day 1:

Convert C to F.vi

Objective: To create a VI and the icon and connector pane needed to use as a subVI.

In this exercise, our main aim was to have a temperature convertor from Celsius to Fahrenheit notation.

We completed this feat by making the following circuit as seen below. Also, the external representation

is seen below as well. This representation is the input screen seen by the user.

Thermometer.vi

Objective: This VI measures temperature using the temperature sensor on the DAQ Signal Accessory.

Page 34: Engineering-Training-Report-Nawaj Sharif

33

Project 1.vi

Objective: This was the final project of the day. In this project our aim was to have a program made which

connected to an external circuit that had a thermistor. The change in temperature tells us the change in

voltage. It will tell us either in AC or in DC. Also it tells us this in voltage or millivolts on our choice.

Page 35: Engineering-Training-Report-Nawaj Sharif

34

Day 2:

4.8 Temp Limit.vi

Page 36: Engineering-Training-Report-Nawaj Sharif

35

Objective: In this VI program, we had to use the Thermometer subroutine to generate a random signal.

Then we put limits on both ends. These were set by the user. If the signal exceeded these limits, the

warning sign would turn ON.

5.5 Cluster Excercise.vi

Page 37: Engineering-Training-Report-Nawaj Sharif

36

Objective: In this VI program, we learnt about how to create cluster and connect them via the block

diagram programming to select a sub-cluster items from the initial cluster elements.

Project 2C.vi

Page 38: Engineering-Training-Report-Nawaj Sharif

37

Objective: In this VI project, we had to display all the digits of temperature (stationary) from the

subroutine thermometer. We had to display with the help of LEDs.

Project 2D.vi

Page 39: Engineering-Training-Report-Nawaj Sharif

38

Objective: This VI program is the same as 2C but is moving instead of being stationary.

Day 3:

Calculator.vi

Page 40: Engineering-Training-Report-Nawaj Sharif

39

Objective: To make a simple calculator using the Case Structure. In this VI program, we make a calculator

and calculate the two input values accordingly.

Page 41: Engineering-Training-Report-Nawaj Sharif

40

Temperature Logger 7_9a.vi

Page 42: Engineering-Training-Report-Nawaj Sharif

41

Objective: In this VI, we had to log all the different temperatures each second. The record of the

temperature was saved in a file.

Kitchen Timer.vi

Objective: In this VI,

we made a small

timer like that of a

baking oven.

Page 43: Engineering-Training-Report-Nawaj Sharif

42

Project 3a.vi

Page 44: Engineering-Training-Report-Nawaj Sharif

43

Objective: In this, we had to create a virtual CRO enabled by a password. Same as the real one, we could

turn the knobs to change the waveform and amplitude etc.

Page 45: Engineering-Training-Report-Nawaj Sharif

44

Day 4:

USB Reader 08.vi

Page 46: Engineering-Training-Report-Nawaj Sharif

45

Page 47: Engineering-Training-Report-Nawaj Sharif

46

Objective: In this VI program, we attached a card reader to the computer and swiped cards to see the

result. It is a password protected card reader like ones found in room/building access. If the pre-recorded

number matched and was positive, the lock opened. The data was recorded too. This program also gives

the date and time of the card swipe.

Day 5:

Project 5 22.vi

Page 48: Engineering-Training-Report-Nawaj Sharif

47

Objective: In this final project, we displayed the temperature of an external microcontroller board. We

set high and low limits as well and logged all the information too. We can also see if the fan is above or

below the set limits.