EEM102 Lecture Notes_usmeem102-Copy
EEM102 Lecture Notes_usmeem102-Copy
ENGINEERING PRACTICE
LECTURE NOTES
Copy No:
Chapter 1: Electrical Hazard and Safety Practices
Using the minimum value of current from the ‘death’ range (100mA), you can easily determine the
potential hazardous voltage that can cause fatality during a shock incident to your body. Using multimeter,
1
you need to measure the resistance of your body and then calculate the potential voltage using Ohm’s
Law. Table 1.1 shows the table that you can use to determine the hazardous voltage.
Electric Shock
There are nine rules that you need to follow covering personal, equipment and ambience aspects in order
to avoid the electrical shock. Table 1.2 summarizes the rules and safety practices.
Mechanical Injuries
This class of safety rules applies to personal working with electrical tool and machinery. There are five
rules for safety practices that you need to follow as tabled in Table 1.4.
3
1.3 Basic First Aid
DRABC procedure is a standard First Aid routine to use in case of suspected serious injury especially when
the casualty is unconscious. In unconscious condition especially when without breathing or pulse, you
need to promptly perform the cardiopulmonary resuscitation (CPR) to resuscitate the victim. Figure 1.2
shows the figure of DRABC and its description.
For an individual working with electrical equipments, it is an essential knowledge to learn and know
how to perform cardiopulmonary resuscitation (CPR). CPR is very important because it can save life
during a cardiac or breathing emergency. Table 1.5 shows the simple step-by-step guide on how to
perform the CPR and administering them correctly. The guide is cited from the American Red Cross
Training Services.
During PCB fabrication processes, a lot of hazardous, toxic and corrosive chemical materials are used in
the process such as Ferric Chloride, Sodium Carbonate Monohydrate, Potassium Carbonate, Catalyst, Salt
Remover and Stripper Solution. There are many potential hazards when working with it but with
appropriate precautions, all of the hazards can be avoided. The safety precautions that need to be
followed are as follows:
1. Always wear rubber shoes, safety goggles, gloves and apron while handling the materials.
2. Always read the label or material safety datasheet of the materials to know the potential hazard
before handling it.
3. Wash with a lot of water if the materials splashed to your skin or into your eyes. Seek immediate
medical assistance if necessary.
4. For chemicals that can be washed down the drain, be sure to wash it away perfectly to avoid any
accidental leftover reaction.
5. Always keep the chemical in its specific container. Do not seamlessly mix unknown chemicals
together to avoid any unknown reaction.
4
Table 1.5 American Red Cross CPR Steps
Before Giving CPR
Step
1 Check the scene and the person.
Make sure the scene is safe, then tap the person on the shoulder and shout "Are you OK?"
to ensure that the person needs help.
2 Call 999 for assistance.
If it's evident that the person needs help, call (or ask a bystander to call) 999, then send
someone to get an automated external defibrillator (AED).
(If an AED is unavailable, or a there is no bystander to access it, stay with the victim, call 999
and begin administering assistance.)
3 Open the airway.
With the person lying on his or her back, tilt the head back slightly to lift the chin.
4 Check for breathing.
Listen carefully, for no more than 10 seconds, for sounds of breathing. (Occasional gasping
sounds do not equate to breathing.)
If there is no breathing, begin CPR.
5
Chapter 2: Simulation Design Using OrCAD Capture
From the parent directory, subfolders for Capture, Layout Plus and PSpice can be explored thoroughly.
Figure 2.3 shows the valid library path to be filtered for the PSpice simulation purpose which is ‘C: >
Program Files > Orcad > Capture > Library > PSpice’. In this folder, all libraries have the associated symbols
and PSpice templates. Always remember to include only libraries from the PSpice subfolder for the
simulation based project.
7
Figure 2.3 Directory path for PSpice Library
8
2.3 Creating a New PSpice Project
Circuit diagram can be drawn using Capture or Capture CIS. CIS stands for ‘Component Information
System’ which allows you to place component from a database instead of a library.
To start the Capture program, you may navigate to ‘… > Orcad > Capture’ and click the ‘capture.exe’ to
execute the program. Typically, from the start menu you can also navigate to the Orcad submenu and run
the program.
In the ‘New Project’ window as shown in Figure 2.6, you need to choose the project type, name the project
and set the location path for your project. There are four choices that can be choosed for your design.
Analog or Mixed A/D – used for
PSpice Simulation
PC Board Wizard – used for
schematic to PCB project
Programmable Logic Wizard –
used for CPLD and FPGA design
Schematic – used for schematic
and wiring diagram
9
The next window to appear is ‘Create PSpice Project’ which sets up the project for PSpice simulation as
shown in Figure 2.7.
Generally, after the first interface is successfully created, the next steps are to place components, connect
components, label wires and run the circuit to perform PSpice analysis.
To simplify all the general steps, a simple DC series circuit as shown in Figure 2.8 will be used as an
example. In this example, you are needed to determine the voltage potential at Node A and the total
current for this circuit.
Using Ohm’s Law, clearly we can get VA=50V and IT =0.5A. Instead of using the theoretical calculation, you
will use PSpice to determine and validate the calculated values.
Placing Components
The first step that you need to perform is placing all the components in the workspace. These are the
points that you need to be very careful when placing the components:
1. Always use part/symbol from the PSpice library
2. Always search and select the correct symbol for your component
3. Always set the correct value and gain for your component
4. Always observe the polarity of your component
5. Always include ‘0 Ground’ for your reference point
10
In Figure 2.8, the part name is VDC for the DC voltage supply and R for the resistor.
To place the component, you can click ‘Place >
Part’ from the top menu or click the ‘Place Part’
icon as shown in Figure 2.9. Hover over the icon
to see the brief description of that icon.
Alternatively, you can press P from your keyboard
for the shortcut.
Next, you need to add the PSpice libraries to the ‘Place Part’ window before you can start selecting and
placing your components. Figure 2.10 shows the ‘Place Part’ window. It serves as to add and remove
library and also to perform the part search.
After finished adding libraries, you can start drawing your circuit by placing all the needed components in
the workspace. Type and input VDC (you can use lower case or upper case) in the ‘Part’ box and make
sure all libraries are highlighted in the libraries box as shown in Figure 2.11.
11
Under the CIS box, you can see a small icon depicted the PSpice which means the component is allowable
for the simulation purpose.
Although the CIS symbol for the DC voltage source is different from Figure 2.8 but it is actually the correct
symbol for the intended source. Sometimes in two similar circuits, they use different symbols to represent
the same component.
After you click OK, move the component to
your desired initial point and CLICKL to
place the component. CLICKR and ‘End
Mode’ to finish placing the component or
you may also hit ESC to end the mode.
Repeat with the part name R.
Always remember to include the ‘0 Ground’
for PSpice circuit. Click ‘Place > Ground’ or
click ‘Place Ground’ icon to place the ‘0
Ground’. The default library for the ‘0
Ground’ is ‘SOURCE’.
You can also use any other ground part as
long as you change its name to 0.
Some shortcuts that can be used to speed up the design process are as follows:
P – to place component
I – to zoom in
O – to zoom out
C – to centre the page
R – to rotate component
W – to wire component
G – to place ground
F – to place power
All these shortcuts are also shown in the ‘Place’ top menu.
After finished placing all components, you need to assign the correct value for each component.
12
Assigning Component Value
Any valid printing character may be placed in the value field. It can contain decimal point, integer
exponent or symbolic exponent with positive or negative sign. Table 2.1 summarizes the PSpice scale
factor. PSpice is not case sensitive, so a suffix may be either a capital or lower case letter.
Connecting Components
The circuit that needs to be analyzed must be in closed loop. You can connect all components using ‘Place
Wire’ icon or ‘Place > Wire’ from the top menu. Click the icon and start wiring exactly at the
centre of the positive terminal grey square box of V1. CLICKL and wire to the centre of the adjacent grey
square box of R1. If you wire perfectly, the original square boxes will be vanished. Complete the wiring
process as in Figure 2.8.
Use the keyboard shortcut W to toggle wiring on/off. To draw a diagonal wire, hold Shift +CLICKLH. Figure
2.13 shows the complete circuit.
13
Note at a junction, a node is automatically
created to show two or more wires are
connected together. If you accidently
connected two wires together, you can
toggle off by clicking the ‘Place Junction’
icon .
Typically, in PSpice circuit, all components are connected using wire. However, there are more methods
that can be used to connect and simplify connections and it will be explained in details in Chapter 3.
Simplification methods that can be used are:
Assigning Bus
Assigning Net alias
Placing Off page connecter
Placing VCC and GND
14
Net Aliasing Components
One of the most important steps that ease the troubleshooting process during error and warning is
assigning the net alias to the circuit branches.
Click ‘Place > Net Alias’ from the top menu or click ‘Place Net Alias’ icon to assign individual branch
net alias. After you click the icon, input your own alias in the ‘Place Net Alias’ window. You may also change
the font type, style and size from the window. Click OK and CLICKL the net alias exactly at the top or
bottom of the targeted net. Now, instead of using random net name assigned by Capture, you have three
predefined nets labeled +VDC, Net1 and GND.
15
Figure 2.15 shows the complete final
circuit with markers for voltage and
current at node A.
Click OK to save the setting. The next step is to run the PSpice analysis. Click ‘PSpice > Run’ or click run
icon . Alternatively, you may hit F11 for the shortcut.
16
The next window to appear is the ‘Probe Window’ displaying the simulated waveforms as shown in Figure
2.17. The output file will be automatically named with the profile name which is ‘DC Series.dat’. A lot of
customizations and fine tunes can be done in this probe window to display the best final results.
Archiving Project
After the project is successfully simulated and saved, you can archive all Capture’s project files, library
files and output files into a portable device. Minimize your workspace and click the Project Manager. To
archive your desired files, click ‘File > Archive Project’ from the top menu and save the files to your target
destination.
17
Add/Delete Trace
The common method to display the output results in the probe window is using the probe marker.
Another method that is very useful to use is using the add trace menu. Click ‘Trace > Add Trace’ from the
top menu or hit Insert to display the ‘Add Traces’ window. From the ‘Simulation Output Variables’ box,
you can choose more traces to be displayed in the probe window. The chosen variable will be displayed
in the ’trace expression’ box. After you click OK, the probe window will display all traces in a single plot.
To delete individual trace in the probe window, simply highlight the trace name and hit Delete. To delete
all traces at once, you can click ‘Trace >Delete All Traces’ or use shortcut Ctrl+Delete.
Table 2.2 shows the complete permissible functions for a valid trace expression.
Axis Settings
By default, the probe window is equipped with major and minor grids. Sometimes, it is necessary to hide
the grids to show only the trace waveform during analysis. To change the axis and grid settings, click ‘Plot
> Axis Settings’. You can also CLICKR anywhere in the probe window to pop up the ‘Axis Settings’ window.
Figure 2.19 shows the ‘Axis Settings’ window. All axis and grids preferences can be customized here.
In this example, all grids will be removed from the probe window.
Click ‘X Grid’ tab and set major and minor grids to ‘None’. Repeat with ‘Y Grid’ tab.
Click ‘Y Axis’ tab and name the ‘Axis Title’ to DC Current. Click OK.
The probe window will display only I(R2) without any grids.
You can also set the user define ‘Data Range’ for X and Y axis.
19
Trace Properties
In order to show a clear and sharp trace, customization is needed to intensify the default shape of the
trace. Click at I(R2) trace to highlight it. CLICKR and click ‘Properties’ to open ‘Trace Properties’ window.
20
If you have more than one trace, simply highlight the other symbol’s trace and perform the steps earlier
to label it.
To edit or delete the label, toggle off the ‘Toggle Cursor’ icon. Move your mouse exactly at the label and
DCLICKL to edit or CLICKL + Delete to delete the label.
Add Y Axis
Besides add other plot to the probe window, you can also add other Y Axis to differentiate your data such
as voltage and current. Click ‘Plot > Add Y Axis’ to add more Y axis to the similar plot window.
Customization for each Y axis can be done using ‘Axis Settings’ menu explained earlier.
21
2.5 Components and Parts
There are many circuit parts or components contain in the default PSpice library. Some of them are
independent sources, dependent/controlled sources, passive elements, discrete elements, power
semiconductors, magnetic elements, transmission lines and vendor-supplied elements.
With rapid changes in semiconductor technologies, a lot of manufacturer also developed their own PSPice
model library that can be downloaded from the Internet to be used in Capture.
In this section, you will learn how to use and apply analog and stimulus sources in PSpice Capture. Typically
for sources, they can be categorized into four main categories which are:
1. General Usage Independent Sources
2. Special Purpose Independent Sources
3. Special Purpose Dependent/ Controlled Sources
4. Special Purpose Independent Transient Sources
22
You can DCLICKL value to change the DC or AC value.
For all sources in Figure 2.22 and Figure 2.23, its positive terminal needs to be wired to the positive of
connecting element to set a positive current path.
Exclusive for IDC and ISRC only, its negative terminal needs to be wired to the positive of connecting
element to set a positive current path.
The uniqueness in all of the dependent sources is that they always have gain in the control part. For
example, you have an F part with gain of 1.5. To input the gain value, you can use
either ‘Edit Properties’ menu or ‘Edit Part’ menu. Figure 2.25 shows the steps to
input the gain value using ‘Edit Properties’ menu.
23
CLICKL your targeted controlled
source.
Next, CLICKR and click ‘Edit
Properties’ to open ‘Property Editor’
window.
Follow the steps in Figure 2.25 to set
the 1.5 gain value.
Finally, close the ‘Property Editor’ to
go back to the schematic page.
The other method that can be used to input the gain value is using ‘Edit part’ menu. Actually in PSpice,
this menu is very useful not only to input the gain value of a controlled source but also to set new internal
properties of a component. Besides, you can also alter the graphical symbol of a component using that
menu. Figure 2.26 shows the ‘Part Editor’ window.
24
Special Purpose Independent Transient Sources
Modern day practical circuits have a lot of time varying sources in their circuit. In simple case, time varying
source is modeled using simple switch. However, in complex case, a model for time varying source that
follows certain mathematical behaviour is needed in the schematic. This model usually used in transient
analysis. The special transient sources are:
VSIN, ISIN – damped sinusoidal voltage or current source, eg: v(t)=25e-4tsin(50t-30o)V
VPULSE, IPULSE – voltage or current pulse
VEXP, IEXP – voltage or current exponential source, eg: i(t)= 5[1-exp(-0.2t)]A
VPWL, IPWL – piecewise linear voltage or current function, which can be used to create an
arbitrary waveform
26
Table 2.4 shows the property description for the part name’s property.
28
Stimulus Source, VSTIM and ISTIM
Another method that can be used to generate the transient time varying waveform is using the stimulus
source. Figure 2.35 shows the stimulus voltage source and stimulus current source.
To set the internal property of VSTIM or ISTIM, select the targeted part. Next, CLICKR and click ‘Edit PSpice
Stimulus’ to open the ‘Stimulus Editor’. In the “New Stimulus’ window, choose and set the internal
property of the desired stimulus source as explained before.
You can also select the targeted part and click ‘Edit > PSpice Stimulus’ from the top menu to open the
editor. Figure 2.36 shows the ‘Stimulus Editor’.
29
2.6 DC Circuit Analysis
Circuit in Figure 2.8 shows you how to analyze a DC circuit using general time domain analysis setting.
PSpice is also capable of performing more complex analyses to develop circuit tolerant of variations in
expected operating conditions and component values. Other types of analyses that can be set are:
Parametric Sweep
DC Primary Sweep
DC Nested Sweep
Parametric Sweep
Consider a circuit as shown in Figure 2.35. You need to add curl braces to the sweeping component. Search
for ‘Param’ to place the ‘Parameters:’.
30
Figure 2.37 Sweeping Output Waveforms at R1
DC Primary Sweep
Consider a circuit as shown in Figure 2.38. In this circuit you need to observe the relation between VDC
and the voltage across R2 using a linear sweeping.
In the ‘Simulation Settings’ window, change the ‘Analysis Type’ to ‘DC Sweep’. Make sure the ‘Primary
Sweep’ option is checked. Set the variable settings as shown in Figure 2.39.
31
0
50
Next, Run PSpice to generate plot as shown in Figure 2.40. Clearly from the plot you can see the
relationship between VDC and R2 when VDC changes. Use ‘Mark Label’ to precisely label the data
coordinate.
32
DC Nested Sweep
Consider a circuit as shown in Figure 2.41. In this circuit you need to plot the I-V characteristic of 2N3944
BJT. You will sweep collector-emitter voltage, VCE and base current, I1. The parameter that you need to
analyze is the collector current, IC(Q1).
In the ‘Simulation Settings’ window, change the ‘Analysis Type’ to ‘DC Sweep’. Make sure the ‘Primary
Sweep’ is checked and set the variable settings as shown in Figure 2.42. Then, check the ‘Secondary
Sweep’ and set the variables as shown in Figure 2.43.
33
Figure 2.43 Secondary Sweep Variables
Next, Run PSpice to generate plot as shown in Figure 2.44. The probe window shows the exact theoretical
I-V characteristic of Q2N3944 BJT. Use ‘Mark Label’ to precisely label the data coordinate.
34
2.7 AC Circuit Analysis
PSpice can perform AC sweep analysis for a single frequency or multiple frequencies that vary linearly, by
decade or by octave. AC sweep is used for phasor and frequency response analysis and it will output the
Bode gain and phase plot. In this AC analysis, PSpice also can simulate for both time domain and frequency
domain. The components that usually used for the frequency domain analysis are VAC and IAC as shown
in Figure 2.45. For the time domain analysis, VSIN and ISIN are used to represent the source. Besides
displaying the output traces in the probe window, another alternative is using pseudo components to
send results to the output file. Figure 2.46 shows the pseudo components that are used to print and plot
the output traces in the output file. This method is usually used in the frequency domain analysis.
Table 2.6 summarizes the general usage of the pseudo components. These components will command
PSpice to show all the desired outputs in the output file.
The internal properties for all of them are AC, DC, DB, TRAN, REAL, IMAG, MAG and PHASE.
To print or plot the property in the output file, simply set the preferred value using ‘Yes’ or ‘OK’.
To disable the property, just leave blank to ignore the value.
The procedures for using PSpice for AC analysis are quite similar to that required for DC analysis.
Now, you will try to draw and simulate circuit for both:
Time domain analysis
Frequency domain analysis
35
Time Domain Analysis
Consider an AC circuit as shown in Figure 2.47. Use VSIN for the AC source to simulate in the time
domain analysis.
In the ‘Simulation Settings’, choose ‘Time Domain’ analysis and set the RTT to 60ms for a complete three
full cycles. Figure 2.48 shows the real-time waveform output of the AC source.
36
Frequency Domain Analysis
Consider an AC circuit as shown in Figure 2.49 and the redrawn PSpice Capture schematic as shown in
Figure 2.50. Use VAC for the AC source to simulate the circuit in the frequency domain analysis.
Firstly, you need to convert the VAC sine function to cosine function and determine the circuit
frequency.
20sin2t V = 20 cos(2t-90o) V
f = ω/2π = 0.31831Hz
37
Next, input the magnitude and phase of VAC, L and C.
Always remember the unit for inductor is ‘Henry’ and the unit for capacitor is ‘Farad’.
Input also the gain value for F using ‘Edit Property’.
Observe the polarity of IPRINT.
In the ‘Simulation Settings’, choose ‘AC Sweep/Noise’ for the analysis type and set the variables as shown
in Figure 2.51.
Finally, from the output file, you obtain the current, i value:
i = 6.243cos(2t +46.91o) A or i = 6.243↙46.91o A.
38
2.8 Miscellaneous
PSpice is very reliable and useful software to predict the behaviour of a circuit or to inspect waveforms at
your desired node. However, there are some limitations that need to be configured properly while
drawing the circuit in PSpice Capture. This is to avoid from getting error messages upon running PSpice.
Some of them are:
1. Always have the zero reference ground in your circuit.
Node 0 is the default node for circuit ground and it is the reference point for all voltages and
currents at any particular locations.
2. Avoid open circuit in your design.
PSpice cannot handle open circuit and will refuse to perform an analysis if it occurred. Be careful
when you use net alias in your design.
3. Avoid component loops.
PSpice cannot handle certain uninterrupted loops of components in a circuit, namely voltage
sources and inductors in DC analysis. This is because PSpice will treat inductor as a short circuit
and capacitor as an open circuit during steady state condition. Figure 2.53 shows the correct
configuration when using inductor in a DC circuit under steady state analysis. Simply add a very
small resistance value in series with the inductor to break the short circuit loop. 1pΩ is added to
each branch so as to not substantially impact the circuit operation.
Figure 2.54 shows the correct configuration when using series capacitors in a DC circuit under
steady state analysis. Simply add a very large resistance value in parallel with the capacitor to
allow a DC current path to each capacitor for analysis. 1TΩ is added in parallel with one of the
capacitors to allow the DC current path.
40
Example 2.1
Solution:
• Place and wire all components correctly.
• Add ‘0 GND’ to the reference point of the circuit.
• Place Voltage Marker at Vo.
• Choose ‘Time Domain’ analysis for the simulation settings (you may use any suitable value).
• Probe window should show Vo = 3.23V.
41
Example 2.2
Solution:
• Connect a VDC source to the circuit (you may use any suitable value).
• Choose ‘Time Domain’ analysis for the simulation settings (you may use any suitable value).
• Run PSpice and hit ‘Insert’ to add the correct trace expression.
42
• Input V(V1:+)/ I(R7) in the ‘Trace Expression’ box (refer to the schematic circuit).
• Probe window should show Req = 6Ω.
43
Example 2.3
Solution:
• Connect all terminals for CCCS correctly. Check the source terminals and node terminals.
• Input the gain value of 2. Observe the CCCS polarity.
• Probe window should show Ix = 1.111A
44
Example 2.4
Find voltage potential across C1 at t = 0.7s for the circuit in Figure 2.59.
Solution:
• Place ‘Sw_tOpen’ and set the open time at t=0.6s.
• Choose ‘Time domain’ analysis and set the RTT value to 1s.
• Mark and label the cursor at t=0.7s.
• Probe window should show V(t)=1.7824V.
45
46
Example 2.5
Construct a circuit using one ‘Stimulus Voltage’ and one 500Ω resistor to generate a pulse voltage as
shown in Figure 2.60.
Solution:
• Place and connect one VSTIM and one 500Ω resistor in series.
• Set the internal property of VSTIM as shown in the solution.
• Set RTT to 1us using time domain analysis.
47
Example 2.6
Probe the current waveform passing L1 using time domain analysis for the circuit in Figure 2.61.
Solution:
• For the time domain analysis, use VSIN. Input 20 for the magnitude and 60 for the frequency.
• Set RTT to 40ms in the simulation settings.
48
Example 2.7
Solution:
• Frequency domain analysis is the best analysis to be used. Choose AC SWEEP for analysis type in
simulation settings.
• Place VAC and input the magnitude and phase.
• Place VCVS and set the gain to 2. Observe its polarity.
• Calculate the single frequency value, 400/2π = 63.66Hz.
• Place VPRINT1 across R3 and set AC, MAG and PHASE to ‘yes’.
• Run PSpice and view the Simulation Output File. It should show VM = 26.77V and VP = -74.47o.
• Vo = 26.77cos (400t – 74.47) Volt.
49
Example 2.8
Solution:
• Frequency domain analysis is the best analysis to be used. Choose AC SWEEP for analysis type in
simulation settings.
• Place IAC and input the magnitude and phase. Observe the polarity of the current source (negative
terminal needs to be connected to the positive terminal of R2).
• Place VAC and input the magnitude and phase.
50
• Calculate the single frequency value, 1/2π = 0.1592Hz.
• Place VPRINT1 at V1 and V2 respectively and set AC, MAG and PHASE to ‘yes’.
• Run PSpice and view the Simulation Output File.
• V1 = 113.6↙5.32o Volt, V2 = 80.19↙12.8o Volt.
51
Example 2.9
Plot the current waveform passing through L1 in the circuit of Figure 2.64. Assume L1 has an initial current
value of 10mA.
Solution:
• Place and wire all components correctly.
• Using ‘Edit Part’ menu for L1, DCLICKL to open the user properties box. Input 10m at IC column.
• Using time domain analysis, set RTT to 70us.
52
Example 2.10
Determine the frequency response of the filter circuit in Figure 2.65 from 1Hz to 1kHz. Plot and compare
both magnitude and phase for the voltage across C2 in a single probe window. V1 is a sinusoidal signal
generator having 1V magnitude and zero phase angle.
Solution:
• Frequency domain analysis is the best analysis to be used. Choose AC SWEEP for analysis type in
simulation settings.
• Set ‘AC Sweep Type’ to Linear, Start frequency = 1, End frequency = 1000 and Total points = 200.
• Place voltage marker at C2.
• Run Pspice to display the voltage across C2.
• To compare both magnitude and phase in a single probe window, use ‘Add Plot to Window’ menu.
• To display the phase angle for C2, input VP(C2:1) in the Trace Expression box.
53
2.9 Additional Reading
These are some additional textbooks for your references:
1. Joseph G. Tront, PSPICE for Basic Circuit Analysis, McGraw Hill, 2005.
2. Alexander & Sadiku, Fundamentals of Electric Circuits 6th Edition, McGraw Hill, 2017.
3. Paul Tobin, PSpice for Circuit Theory and Electronic Devices, Morgan & Claypool Publisher, 2007.
4. Dennis Fitzpatrick, Analog Design and Simulation Using OrCad Capture and PSpice, Newnes, 2012.
5. PSpice resources, https://www.pspice.com/resources.
54
Test Your Skills:
55
Determine V1 and V2. [Ans: 0V, 12V]
56
Find the ammeter and voltmeter reading. Assume ω=1rad/s.
[Ans: IM=7.354A, IP=-11.32o, VM=73.53V, VP=-48.18o]
57
Chapter 3: Schematic Design Using OrCAD Capture
Table 3.1 shows the characteristic differences for these diagrams. Typically, schematic is used widely in
electronic circuit while single line diagram is mainly used in electrical circuit or system. Single line diagram
is also known as one-line diagram.
From the top menu, click ‘File > New > Project’ to
create a new project.
Remember to choose ‘Schematic’ option because
this project is intended to draw schematic and
wiring diagram of Figure 3.2 only.
Figure 3.3 shows the ‘New Project’ window. Name
the new project to ‘5V Regulator Circuit’.
Click OK to display the schematic page.
Next, use all steps as explained in Chapter 2 to add
libraries, connect components and inputting
component’s value.
For Capture Schematic, you have the freedom to
add any libraries that you prefer from the
‘.../Orcad/Capture/ Library’ and it is not limited to
‘PSpice’ subfolder only.
59
The components that you need to place are BATTERY, LM7805, R and LED. Figure 3.3 shows the complete
schematic circuit of Figure 3.2. Note that by default, LM7805 will only have two terminals.
In the next section you will learn how to make visible the hidden pins of a component using ‘Edit part’
menu. Label also the nets as shown in Figure 3.3 using ‘Place Net Alias’.
60
Click OK and you will have a three pins LM7805 in your editor. Close the editor and update the part to go
back to the schematic page. Next, connect the new visible pin to GND as shown in Figure 3.5.
Notice that in schematic, placing a ground symbol is not mandatory as in PSpice.
Figure 3.5 Schematic Circuit of Figure 3.2 with all Pins Visible
Beside from making visible the hidden pin, this menu is also used to alter a lot of the physical symbol of a
component. Some of them are:
To alter the pin arrangement – CLICKLH a pin to move the targeted pin to a new location.
To hide/unhide pin names and numbers – DCLICKL anywhere on the editor page to open the ‘User
Properties’ window in order to alter the component internal properties.
To place IEEE symbol – Click to place any desired IEEE symbols in the editor.
To place pin – Click to place new pin to the selected symbol.
The final step before you can archive your project is to generate the Layout netlist file. This file is needed
in Layout session in order to create the initial environment of that circuit artwork.
61
Figure 3.6 Layout Netlist File Generation
Step 1: Highlight design name to activate the ‘Tools’ toolbar and ‘Tools’ top menu.
Step 2: Click ‘Annotate’ icon and in the settings, leave everything intact.
Step 3: Click ‘Design Rules Check’ (DRC) icon to open the ‘Design Rules Check’ window. Set your
preferred settings and make sure the report file path is correct with the *.drc file.
Step 4: Click ‘Create Netlist’ icon to open the ‘Create Netlist’ window. Choose the ‘Layout’ tab and set
the settings as shown in Figure 3.7. Make sure the netlist file path is correct with the *.mnl file.
62
3.5 Connection Simplification
Usually for a simple circuit, you will use wire a lot to connect between components. However, when the
complexity of a circuit is increased, different connecting methods need to be introduced in the circuit.
This is to simplify the connections and to make the schematic page looks less dense. Aside from the normal
wire connection, these are five methods that you may use to simplify circuit connections:
1. Assigning Net Alias
2. Placing Off-page Connector
3. Placing Alternative Power Symbol
4. Placing Alternative Ground Symbol
5. Assigning Bus Connection
Figure 3.8 shows the connection simplification using these five methods to connect components together.
header 5
63
Placing Alternative Ground Symbol
Create a short wire at all terminals that need to be connected together. Click ‘Place Ground’ icon and
choose your desired ‘GND symbol’ to be connected at the created short wire. You may use similar or
different symbols as long as the symbols have same name. The library for this connector is ‘CAPSYM’.
64
3.6 Inputting the Component’s Footprint
One of the important information that contains in the Layout netlist file is the actual physical dimension
and specifications of a component. This physical information is called ‘footprint’. Footprint is the physical
description of a component and it consists of three elements which are padstacks(thrucodes), obstacles,
and text.
There are two methods that can be utilized to input the footprint name:
1. Method one - using ‘Edit Properties’ menu in OrCAD Capture where you will type the complete
footprint names for all components.
2. Method two - using ‘AutoECO’ dialog box in the Layout software to link the missing footprint
name. This method will be explained in details in Chapter 4.
Sometimes for a circuit with plenty of components, you will need to combine both methods to produce a
correct and working PCB artwork file.
Referring to Figure 3.5, you will use method one to input all component’s footprint using ‘Edit Properties’
menu. The component footprint’s names are as follows:
1. Battery (BT1) - BLKCON.100/VH/TM1SQS/W.100/2
2. LM7805 (U1) - TO225AB
3. 100Ω R (R1) - AX/.325X.100/.031
4. LED (D1) - DAX2/DO204AR
Select all components or press Ctrl+A to highlight all components. CLICKR and click ‘Edit Properties’ menu
to open the ‘Property Editor’. Follow steps as shown in Figure 3.10 to input the component’s footprint
name.
65
Test Your Skills:
Draw the schematic circuit using OrCAD Capture. Generate the netlist file.
Draw the schematic circuit using OrCAD Capture. Generate the netlist file.
66
Chapter 4: Artwork Creation Using OrCAD Layout
It is very important to know some of the important terminologies used in Layout. Figure 4.2 shows an
example of a double-sided PCB artwork produced using Layout showing all terminologies used.
The first step that you need to do before you place the components in your Layout workspace is to set up
the board. There are many steps involved in the setup process but not all of them are necessary for every
board. Some of the steps are as follows:
Load board template Define vias
Set the units of measurement Optimize component properties
Set system grids Set net properties
Measure board dimension Add mounting hole
Create board outline obstacle Set global spacing
Define the layer stacks
Define padstacks
69
4.2 Creating a New Printed Circuit Board Design
In this example you will create a PCB artwork using the Layout netlist file (*.MNL) of Figure 3.5 generated
earlier. You will create a board from scratch and use only the basic technology file. There are two common
basic technology files namely DEFAULT.TCH for conventional unit and METRIC.TCH for metric unit. Based
on your preferred ‘Option’ as in Figure 3.7, you need to choose either DEFAULT.TCH or METRIC.TCH
technology file as your template file. Assume you select ‘User Properties are in millimeters’ for your
option, therefore you need to load METRIC.TCH as your template file.
From the start menu, choose the ‘Layout Plus’ to open OrCAD Layout. Once you open the Layout, from
the top menu click ‘File > New’ to load your suitable technology file. The default directory path for these
templates is ‘.../Orcad/Layout_Plus/Data’. Browse for METRIC.TCH and click OK.
Next, load the netlist source (*.MNL) of Figure 3.5 which is ‘5V REGULATOR CIRCUIT.MNL’ from your
stored directory and click Open. Finally, save your new board file with ‘5V REGULATOR CIRCUIT.MAX’
before continuing with more advanced parameters settings. Actually, all these steps taken are
demonstrated as in Figure 4.3(b).
70
Table 4.1 shows the full lists of technology template that you can choose and load to create your new
board from scratch.
1BET_ANY.TCH Based on Level A as described above, a standard DIP IC pin has 62-mil pads
and 38-mil drills. Routing and via grids are 25 mils, the placement grid is 100
mils, and route spacing is 12 mils.
2BET_SMT.TCH Based on Level B as described above, it is used for surface mount or mixed-
technology boards. A standard DIP IC pin has 54-mil pads and 34 mil-drills.
Routing and via grids are 81/3 mils, the placement grid is 50 mils, and route
spacing is 8 mils.
3BET_ANY.TCH Based on Level C as described above, a standard DIP IC pin has 50-mil pads
and 34-mil drills. Routing and via grids are 121/2 mils, the placement grid is
50 mils, and route spacing is 6 mils.
DEFAULT.TCH Default technology template for typical boards. Based on Level A, a standard
DIP IC pin has 62-mil pads and 38-mil drills. Routing and via grids are 25 mils,
the placement grid is 100 mils, and route spacing is 12 mils.
JUMP5535.TCH Used for single-layer boards with 55-mil vias and 35-mil drills.
JUMP6035.TCH Used for single-layer boards with 60-mil vias and 35-mil drills.
JUMP6238.TCH Used for single-layer boards with 62-mil vias and 38-mil drills.
METRIC.TCH Used for metric boards. If you are designing a board that is using metric units,
you should start with the METRIC.TCH technology template to achieve the
best precision.
71
PROTEL.TCH Used to translate files from Protel.
For a design with known board specification, board templates (*.TPL) can be used as a foundation to build
your board. Layout has approximately 70 board outlines that you can choose and all these templates use
the same design rules as described for DEFAULT.TCH in Table 4.1.
The most common unit used to design a board is ‘mil’ which is actually one thousands of an inch.
72
Disable online DC first
Toggle off the online DRC icon at the top toolbar to deactivate the online DRC.
Next, you need to measure and display the board dimension of 5cm x 5cm before a board outline can be
placed in the workspace.
From the Top Menu, click ‘Tool > Dimension > New’. You should see a small cross in the workspace
indicating an active state. CLICKR and click ‘Properties’ to open ‘Autodimension Options’ as shown in
Figure 4.8. Decide your best options then measure and display the board dimension as in Figure 4.9.
74
After you created the global layer border outline obstacle in your artwork, you can add additional
obstacles into the design. The most common types of obstacles are copper pour, insertion outlines and
place outlines. Table 4.2 simplifies the full obstacle types and its description.
Board outline A line that defines the board edge for routing and placement. There can be
only one board outline per board, and it must be on all layers (Global layer).
Comp group keepin An area you define to contain all components of a certain group.
Comp group keepout An area you define to exclude all components of a certain group.
Comp height keepin An area you define to contain all components of a certain height or greater.
Comp height keepout An area you define to exclude all components of a certain height or greater.
Copper area A copper-filled zone on the board that can be used for noise suppression, to
draw heat away from components that tend to get hot, or as a routing barrier.
It can be assigned to a net or attached to a component pin. It doesn’t affect
placement. It can be filled with hatched lines or it can be solid.
Copper pour A copper-filled zone on the board that features automatic voiding where there
are tracks or pads. Tracks can pass through it. Copper pour can be used for
noise suppression, shielding, to draw heat away from components that tend
to get hot, or to isolate signals. It can be assigned to a net or attached to a
component pin. It doesn’t affect placement. It can be filled with hatched lines
or it can be solid. It repours when you choose the refresh all toolbar button.
Detail A line not used in placing or routing used for silkscreens, drill information, and
assembly drawings, which can be attached to footprints.
Free track A line or track that can be assigned to a net or attached to a component pin.
A free track obstacle may appear on the artwork and act as a routing barrier
unless the track belongs to a net. A free track obstacle doesn’t affect
placement.
Insertion outline An insertion outline defines the size and shape of a component, to allow for
the insertion machine’s head dimensions without hitting another component.
It is usually defined in the footprint library as a part of the footprint.
Place outline A place outline defines the outline of the component, plus clearance, and is
used to maintain spacing between parts. Both interactive placement and
75
autoplacement routines need this information. A place outline can exist on
the top or bottom layer for surface-mount parts, or on all layers for through-
hole parts.
Route/via keepout An area you define that excludes routes and vias.
To insert other obstacle types in the design, simply repeat the procedure on how to create the global layer
board outline except in the ‘Obstacle Type’ drop-down list, choose your preferred obstacle to be created
in the design. Figure 4.12 shows PCB samples of mixed obstacles in one board design.
76
Defining the Layer
Layer is a level in a board on which tracks are arranged to connect components. To connect from one layer
to other layers, vias are used accordingly. There are three types of manufactured PCB commonly known
as single-sided PCB, double-sided PCB and multi-sided PCB. From these three main categories, they then
will be divided into more specific specifications based on industrial standards.
Single-sided PCB is a board with only one side with copper or conductive material to arrange the nets. It
is the easiest board to design and can be manufactured quickly. It is also very suitable for low density and
low components count design and very cost effective. Double-sided PCB is a board with both sides clad
with copper or conductive material to place nets. Vias will connect tracks from one layer to another layer
and a process called through-hole plating need to be used to deposit conductive material through the
through-hole padstacks connecting both layers. Multi-sided PCB is the most complex board to
manufacture and a lot of optimizations are needed to create this board design. This board is an excellent
choice for a super dense and high speed design. The size of a board also can be reduced significantly using
this type and it has the highest production cost compared to the other two types. These three board types
can accommodate and suitable to use with through hole devices (THD) and surface mount devices (SMD).
A lot of time, THD and SMD are combined together in a board design and manufactured using through-
hole technology and surface mount technology (SMT).
To define layers in Layout, you need to use the spreadsheet. Using the spreadsheet, you can define the
number of layers that will be used in your board design. Based on Box 4.1, you will need to design a
double-sided PCB which means the ‘Top’ and ‘Bottom’ layers need to be enabled.
From the Top Menu, click ‘Tool > Layer > Select From Spreadsheet’ or click the ‘View Spreadsheet’ icon
and choose ‘Layers’ from the toolbar. A ‘Layers’ spreadsheet window will appear as shown in Figure
4.13. From the spreadsheet, DCLICKL ‘TOP’ layer to open the ‘Edit Layer’ window. Change the ‘Layer Type’
to ‘Routing Layer’ and then click OK. Repeat with the ‘BOTTOM’ layer. Alternatively, you may also highlight
your desired layer name,
CLICKR and click ‘Properties’ to
open the ‘Edit Layer’ window.
If you changed a routing layer
to a plane layer, change the
‘LibName’ to ‘PLANE’.
Plane is simply a coppered clad
layer with no tracks and usually
used for power and ground
signals and generally located on
the inner layers.
You can check the enabled
routing layer name using the
layer drop-down list.
77
Table 4.3 shows the layer name and its description and Figure 4.14 shows the default layer colour for
obstacle, text and net.
78
Defining the Padstacks and Vias
Padstacks is a numbered list of component pin or via stack descriptions. Each description contains a pad
or via definition, including layer, style, drill diameter, size, offset and solder mask guard width. In a simpler
word, padstacks define the pads of the footprint. In Layout footprint library, there are seven standard
padstacks types namely T1 through T7. Table 4.4 simplifies the definition used in each padstack.
To define padstacks, click ‘Tool > Padstack > Select from Spreadsheet’ or click ‘View Spreadsheet’ icon
and choose ‘Padstacks’ from the toolbar. A ‘Padstacks’ spreadsheet window will appear as shown in Figure
4.15.
Select and highlight a padstack that is
similar to the one that you want to
create. CLICKR and then choose ‘New’
from the pop-up menu. A new
padstack is added at the bottom of the
spreadsheet. Select the new padstack
and choose Properties from the pop-
up menu and change the desired
values accordingly.
79
The easiest way to define it is by
targeting each footprint individually.
Click the ‘Component Tool’ icon
and select any footprint that you want
to modify. Assume you select
BATTERY, BT1. Hit ‘Esc’ key and open
the ‘Padstacks’ spreadsheet. The
spreadsheet will automatically
highlight the footprint that you
selected earlier as shown in Figure
4.16. You may change the pad values
accordingly.
For both cases, to add a drill hole to the
padstack, define a round padstack on
the drill layer. Copper clearance
around the drill hole is created by a
round padstack on each plane layer
that is larger than the drill size.
Figure 4.16 Targeted Padstacks Spreadsheet
For double-sided and multi-sided board, Layout automatically assigns vias to the design. You can define
the types of vias that you want to use when routing your board, either vias or free vias (denoted by the
letters FV). Layout regards free vias as stand-alone components, therefore you can shove them, place
them in isolation (free of tracks), or connect them to multiple tracks on the same net.
Placing Components
There are two methods to place the components which are by using:
automatic placement strategy
manual component placement
In automatic placement strategy, you need to load a strategy file to set up your components placement
in order to display the appropriate elements such as place outlines, electrical connections and reference
designators. There are two types of strategy files in Layout namely placement strategy files and routing
strategy files. Table 4.5 simplifies the strategy files that you can choose for your automatic placement.
The common placement strategy file used is called standard placement file (PLSTD.SF). To load the
strategy file, click ‘File > Load’ and choose PLSTD.SF from the ‘Data’ subfolder.
80
Table 4.5 Automatic Placement Strategy Files
Strategy File Description Strategy File Description
2__SMD_H.SF Used for a two-layer, single- 2__SMD_V.SF Used for a two-layer, single-
sided or double-sided, surface- sided or double-sided,
mount or mixed-technology surface-mount or mixed-
board, with layer one technology board, with layer
horizontal. one vertical.
2__THR_H.SF Used for a two-layer, through- 2__THR_V.SF Used for a two-layer, through-
hole board, with layer one hole board, with layer one
horizontal. vertical.
4__SM1_V.SF Used for a four-layer, single 4__SM1_H.SF Used for a four-layer, single-
sided, surface-mount or mixed- sided, surface-mount or
technology board, with layer mixed-technology board, with
one vertical. layer one horizontal.
4__SM2_V.SF Used for a four-layer, double- 4__SM2_H.SF Used for a four-layer, double-
sided, surface-mount mixed- sided, surface-mount or
technology board, with layer mixed-technology board, with
one vertical. layer one horizontal.
4__THR_H.SF Used for a four-layer, through- 4__THR_V.SF Used for a four-layer,
hole board, with layer one through-hole board, with
horizontal. layer one vertical.
FAST_H.SF Used for quickly checking on a FAST_V.SF Used for quickly checking on a
particular placement, with layer particular placement, with
one horizontal. layer one vertical.
JUMPER_H.SF Used for boards with jumper JUMPER_V.SF Used for boards with jumper
layers, with layer one layers, with layer one vertical.
horizontal.
REROUT_H.SF Used for rerouting boards, with REROUT_V.SF Used for rerouting boards,
layer one horizontal. with layer one vertical.
VIARED_H.SF Used for a via-reduce sweep on VIARED_V.SF Used for a via-reduce sweep
a completely routed board, on a completely routed board,
with layer one horizontal. with layer one vertical.
STD.SF Used for the default routing 386LIB.SF Used for libraries translated
strategy. It is automatically from OrCAD PCB386+.
loaded into each board if the
board is translated into Layout’s
binary format. You can also use
this strategy file with boards
that are not translated.
In manual component placement, you have the choices either to place the component individually or to
place the components by groups. Basically for both choices, the idea is to place the components which
execute similar task in one matrix area where it is easier to locate errors during the troubleshooting
process. In a simpler word, you design a board with block-by-block placement according to their function
and task. Figure 4.17 shows an example of a board design with block-by-block placement.
81
Figure 4.17 PCB with Block-by-Block Placement Figure 4.18 Final Components Placement
To place the component manually, click the ‘Component Tool’ icon . CLICKL the targeted component
and move it to your desired location or your block location.
CLICKR to perform optional task such as rotate, opposite, swap and lock. Repeat with all components to
place them as depicted in Figure 4.18.
You can also modify the original footprint assigned to each component using the ‘Component Tool’ icon.
CLICKL to select your preferred component then CLICKR and click ‘Properties’ to open the ‘Edit
Component’ window. You can choose different footprint by clicking the ‘Footprint’ button.
Back annotate is used to automatically save all changes made in Layout seamlessly into OrCAD Capture
Schematic and will be explained in details in Section 4.6.
82
Editing Nets
Net properties are extremely important for routing because it will set the behaviour of the ratsnests in
the board design during manual routing, autorouting and autoplacement. A ratsnest represents the
unrouted connections that need to be routed to form tracks in a layer.
To open the Nets spreadsheet, click the the ‘View Spreadsheet’ icon and choose ‘Nets’ from the
toolbar to open the ‘Nets’ window as shown in Figure 4.19. Based on the net specification given in Box
4.1, DCLICKL the ‘+VE B’ net name to change the connection width to 0.051cm as shown in Figure 4.20.
Repeat and apply to the other net names.
Based on the IPC-2221 standard, the formula to calculate the allowable current through a net can be
determined using equation below:
where;
I is the net current
k is the constant; k=0.024 for internal layer and k=0.048 for external layer
∆𝑇𝑇 is the temperature rise
A is cross sectional area of the trace
83
Temperature rise is the difference between the maximum safe operating temperature of your PCB
material and the typical operating temperature of your board. Typically, in a board design, 10 degrees is
a safe rule of thumb for most applications.
Table 4.6 summarizes the minimum net width value that you can set in relation with your current
consumption for nominal 3mil copper thickness PCB.
84
Always remember, autoroute is just an initial routing process to expedite the routing process. Next, you
need to optimize the autorouted nets using ‘Edit Segment Mode’ or ‘Add/Edit Route Mode’ tools.
In ‘Edit Segment Mode’, you select an existing track and change its position while Layout automatically
adjusts the angle and sizes of adjacent segments to maintain connectivity. In ‘Add/Edit Route Mode’, you
route existing track manually without using the shove algorithm. Relatively, both modes are quite similar
as they allow manual adjustment to the autorouted nets.
Click or to activate the manual routing mode. Click your targeted track to alter and CLICKR to pop
up the optional menu. From the menu, you can change the connection width and vertex angle, add via
and free via, lock and unlock net and also route and unroute segment.
Using these manual modes also allow you to easily route between layers by pressing the layer hotkey
which is ‘0 to 9’ and ‘Ctrl+0 to Ctrl+9’ as shown in column ‘Layer Hotkey’ in Figure 4.13 while routing the
targeted segment. Figure 4.22 shows the routed board design using autoroute and manual modes.
Figure 4.21 Autorouted Board Figure 4.22 Autorouted and Manual Modes Board
85
The ‘Text Tool’ can be used to move the
silk screen text or add text to your board
design. Click the icon to activate the text
tool. CLICKR and click ‘New’ to add text
strings to your artwork.
To move the silk screen text, click the
targeted text and move it to a new position.
Figure 4.23 shows the finalized board with
combination of border outline and free track
obstacles, text string and optional mounting
holes.
Ensuring Manufacturability
To check the integrity of your board design, you need to run the Design Rules Check. Click ‘Auto > Design
Rules Check’ from the Top Menu to perform the DRC. Uncheck any rules that you want to omit and click
OK to verify your board. Rectify any errors found from the DRC.
In case you have errors in your design, the errors are marked on the board with circles. To investigate it,
click ‘Query’ icon to display the query window. Next, click the ‘Error Tool’ icon and choose the
error circle and the description of that error will be displayed in the query window.
To allow you to reroute again the problem area, you need to remove the violations. Click ‘Auto > Remove
Violations > Board’ to remove the violations.
Lastly after you rectify all the errors, you can clean up your design by clicking ‘Auto > Cleanup Design’. You
should always run the DRC after running Cleanup Design.
86
Back Annotating
To automatically update the schematic that corresponds to your board with any changes you made during
the board design (such as changing footprint, component name etc.), you need to perform the back
annotation. The Back Annotate creates a back annotation file (*.SWP) that you can use to update the
schematic.
Post Processing
In this step, you need to set the post processing and gerber settings to enable Layout to generate required
output files (known as gerber files) for PCB manufacturing. Gerber is a standard industry file format to
communicate design information for PCB manufacturing used by fabrication machines. It is an open 2D
binary vector image format to represent the artwork images for all layers in a board design. There are two
standards gerber namely the ‘Extended Gerber (RS-274X)’ and ‘Standard Gerber (RS-274D)’. The extended
gerber (X) is the current file format used nowadays but in Layout you have some choices to choose for the
suitable machine output format.
In addition, you also need to preview each layer to ensure all elements are present and visible before
submitting them for manufacturing.
To set the gerber output format, click ‘Options > Post Process Settings’ from the Top Menu to open the
‘Post Process’ window as shown in Figure 4.25. In this example you will use extended gerber (RS-274X) as
your output gerber file format. However, if you prefer to change it to a different format, DCLICKL the
targeted layer to open the ‘Post Process Settings’ window as shown in Figure 4.26 and change it
accordingly.
87
Figure 4.25 Post Process Window Figure 4.26 Post Process Settings Window
Always check ‘Create Drill Files’ option in the ‘Post Process Settings’ window to allow Layout to produce a
drill tape file (*.TAP) during run post process command. During the manufacturing process, the drilling
machine reads this file to determine the size and location of the drill holes on your board. For though-
hole components, Layout outputs a file named THRUHOLE.TAP. In addition, Layout automatically
generates drill tape files for each layer pair that shares a blind or buried via and names them accordingly.
For example, a file with the name 1_4.TAP includes data related to layers 1, 4, and all layers in between.
To preview a layer of the board in Figure 4.23, click ‘Options > Post Process Settings’ from the Top Menu
to open the ‘Post Process’ window. Click ‘Window > Tile’ to display both design window and the post
process window. Select any layer that you want to preview, CLICKR and click ‘Preview’. You can click the
‘Refresh All’ icon to end the preview. Finally, click ‘Window > Reset All’ to return the design window
to its previous size. Figure 4.27 and Figure 4.28 shows the top and bottom layer preview image.
Figure 4.27 Top Layer Preview Figure 4.28 Bottom Layer Preview
88
Running Post Processor
This command creates files for the layers that batch enabled in the ‘Post Process’ spreadsheet called
gerber design file (*.GTD), drill tape file (*.TAP), and output error and activity list file (*.LIS).
To run post processor, click ‘Auto > Run Post Processor’ from the Top Menu to generate these three files.
Creating Reports
To generate the output reports of the board, click ‘Auto > Create Reports’ from the Top Menu to open the
‘Generate Reports’ window. Select the reports that you want to be reported and choose either to view or
save the reports. Click OK.
89
Test Your Skills:
Using the circuit below, build an optimized PCB layout/artwork with these specifications:
a) Board outline obstacle of 10cm x 10cm (show the dimension)
b) Best components placement with suitable THD footprint.
c) Double- sided PCB
d) Net size ≥ 12mils
e) Utilize copper pour and free track obstacles.
90
Chapter 5: Printed Circuit Board Fabrication
There are several standards imposed to the PCB design. The purposes for the standards are to set rules
for board certification and to obey laws imposed by governance. Some of the popular standards
organizations are as follows:
Institute for Printed Circuits (IPC-Association Connecting Electronics Industries)
Electronic Industries Alliance (EIA)
Joint Electron Device Engineering Council (JEDEC)
International Engineering Consortium (IEC)
Military Standards
American National Standards Institute (ANSI)
Institute of Electrical and Electronics Engineers (IEEE)
Consumer Electronics Association (CEA)
Internet Security Alliance (ISA)
A manufactured PCB can be classified based on the standards mentioned earlier. Table 5.1 shows an
example of a PCB classifications based on IPC-CM-770E (Guidelines for Printed Board Component
Mounting) standards. The classification includes performance class, producibility level, fabrication type
and assembly subclasses.
91
Fabrication Type Type 1 - single-sided printed board
Type 2 - double-sided printed board
Type 3 - multilayer printed board without blind or buried vias
Type 4 - multilayer printed board with blind and/or buried vias
Type 5 - multilayer metal-core printed board without blind or buried vias
Type 6 - multilayer metal-core printed board with blind and/or buried vias
Assembly Subclasess Subclass A - through-hole devices (THD) only
Subclass B - surface-mounted devices (SMD) only
Subclass C - mixed THD and SMD (simple)
Subclass X - complex THD/SMD, fine pitch, BGA packages
Subclass Y - complex THD/SMD, ultrafine pitch, chip-scale packaging
Subclass Z - complex THD/SMD, fine pitch, flip-chip packaging
Generally, there are three soldering methods popularly used which are:
Manual soldering (hot-air pencil, soldering iron, induction coil)
Mass soldering (wave, oven reflow, vapour phase reflow and conduction reflow)
Directed energy (hot gas, hot bar, laser, iron and pinpoint torch)
Manual soldering technique is widely used for many applications from simple PCB assembly to simple
repair works.
92
5.2 PCB Fabrication Processes
There are many steps involved in the fabrication stage. The complexity to manufacture it is highly
depending on the complexity level of the board design. Single-sided PCB is the easiest board to fabricate
and uses the least physical processes compared to double-sided and multi-sided PCB. Figure 5.1 shows
the typical flow chart for a general PCB design during fabrication stage.
Typical processes are shown as depicted in Figure 5.2 to Figure 5.11.
Figure 5.12 shows an example of standard and custom PCB specification manufactured by a company
called Advanced Circuits.
93
Preparing the Phototools
94
Laminating
Exposing
Developing
95
Etching
Stripping
Solder Masking
96
Tin Plating, Washing, Drying and
Cutting
Figure 5.12 Standard and Custom PCB Specification Manufactured by Advanced Circuits.
97
Chapter 6: Single Phase Domestic Wiring System in Malaysia
“No wiring or rewiring of an installation or extension to an existing installation shall be carried out by an
Electrical Contractor or a Private Wiring Unit without first obtaining the approval in writing from a licensee
or supply authority, as the case may be: Provided that no approval is necessary for an extension to an
existing wiring of a domestic installation where the total current consumed at any one time by the said
installation, as a result of the extension, does not exceed the maximum current demand as agreed upon in
the supply contract between the owner and the licensee or supply authority.”
Secondly, they need to prepare the electrical work plan to be approved by the supply authority (SA). The
steps for the planning works are as follows:
1. Site visit and inspection
2. Investigate and determine the load demand
3. Calculating the maximum load demand
4. Submit plans, drawings and specifications
Figure 6.1 shows the planning flowchart to be followed by competent practitioners for single phase and
three phase system for commencement in electrical wiring installation.
98
Figure 6.1 Electrical Works Planning Flowchart
99
6.2 Single Phase Domestic Wiring System
Electricity is generated from synchronous alternator (usually powered by coal, oil or hydro) when
interaction of flux in the field and stator windings resulted in the generation of AC voltage. It then will be
stepped up to certain high voltage values to be transmitted using transmission lines and finally stepped
down again and distributed to the consumers for residential and commercial use. Figure 6.2 shows the
general flow on how the electricity is generated, transmitted and delivered to the consumer.
For single phase residential consumers, the root mean square (rms) voltage is typically rated at 240V,
50Hz. In order to utilize this rated voltage safely, you need to always check the appliances tag before
connecting them to the system. Make sure the appliances are designed for 240V, 50Hz system before
connecting them to the socket outlet.
100
Single phase wiring system consists of fuse cutout and neutral link, kilowatt-hour meter, main switch,
circuit breakers, grounding (including lightning arrestor), and receptacle points and can be simplified using
single line diagram as shown in Figure 6.3.
The first two items namely cutout and neutral link and kWh meter are provided by Tenaga Nasional
Malaysia (TNB). Main switch, residual current device (RCD) or earth leakage circuit breaker (ELCB), and
miniature circuit breaker (MCB) are the items that are installed in the distribution board (DB) of a
consumer unit. Figure 6.4 shows the typical distribution board of a single phase domestic wiring system.
The housing of the DB can be made of plastic or metal with different dimensions depend on the total
consumer’s load demand.
101
In the DB, the protective devices are arranged in a manner to provide isolation and different zones of
protection primarily from overcurrent, earth fault and leakage and also from the lighting strike. The
arrangement is set with main switch positioned at first position followed by RCD/ELCB and finally by MCBs.
The placement can be from right-to-left or left-to-right order. From the MCBs, the electricity is then
distributed to the receptacle points or usually known as final circuits.
The receptacle circuit can be divided into two main categories namely lighting circuit and power circuit.
Lighting circuit is the circuit that accommodates lighting and fan points. Power circuit is the circuit that
provides electricity to the socket outlets and can be configured using radial circuit or ring circuit. Figure
6.5 shows the general arrangement and connections of a complete single phase domestic wiring. Table
6.1 shows the permitted MCB specifications for power circuit based on IEE regulation.
102
Methods of Wiring
Generally, there are three methods for the wiring installation which are:
1. Surface/ clipped direct wiring
2. Embedded wiring
3. Conduit wiring
Each method is designed for specific condition and need to be configured based on the standards set by
the legislators. Table 6.2 shows the comparison for the wiring methods and its description. Figure 6.6
shows the picture of all wiring methods.
103
Figure 6.6 (a) Surface Wiring (b) Embedded Wiring Before Plastering Work
(c) Conduit Wiring Using PVC Pipe (d) Conduit Wiring Using Trunk (e) Conduit Wiring Using Tray
Earthing/Grounding
Earthing or grounding is a mechanism to remove earth fault condition such as fault current and leakage
current from damaging the wiring system or electrical equipment instantly. The grounding/earthing
system for single phase and three phase domestic wiring is configured using the ‘TT System’ which is
actually a ‘no earth provided supplies’ system. This system is typically found when the installation is fed
from overhead cables. The supply authorities (SA) do not provide an earth terminal to the residential area
from the overhead cables thus the consumer needs to provide its own earthing mechanism by means of
using earth electrode or rod usually made of steel clad with copper. Usually the electrode or rod is driven
into the ground to serve as a zero voltage reference point. The consumer needs to connect all circuit
protective conductors (CPCs) to earth using the earth electrode.
In TT system, it consists of two types of grounding namely system grounding and equipment grounding.
The first T indicates the state of the system grounding while the second T indicates the state of the
equipment grounding. System grounding means the connection of earth ground to the neutral points of
current carrying conductors such as the neutral point of a circuit, a transformer, rotating machinery, or
a system, either solidly or with a current-limiting device (IEEE Standard 142-2007 1.2). Equipment
grounding means the connection of earth ground to non-current carrying conductive materials such as
conduit, cable trays, junction boxes, enclosures, and motor frames.
There are six grounding techniques which are by using:
1. Earth electrode/rod or pipe
2. Tapes or wires
3. Plates
4. Underground structural metalwork embedded in foundation
5. Welded metal reinforcement of concrete (not pre-stressed)
6. Lead or metallic covering of cables
104
For single phase wiring system, earth electrode is usually used for the grounding purpose. The earth rod
is driven into ground and it is placed in an earth chamber made of concrete or PVC. Table 6.3 shows the
maximum earth rod resistance allowable for domestic wiring.
Figure 6.7 shows the grounding system configured using TT system installed in a three phase and single
phase domestic wiring. Figure 6.8 shows the earth rod, earth chamber and the finished grounding
installation.
Figure 6.7 TT Grounding System Figure 6.8 (a)Earth Rod and Clip (b)PVC Earth
Chamber Cover (c)Rod Driven into Ground
Distribution Board
There are four main components inside the distribution board that act as isolator, fault protectors,
mounting rail and bus bar connectors as shown in Figure 6.9. They are main switch, ELCB and MCBs, bus
bar and DIN rail.
Main switch acts as an isolator to isolate the mains supply from entering the circuit. ELCB and MCBs act
as the circuit breakers that provide protection to the wiring system during current and earth fault
condition while neutral and earth bus bar act as the common connection point for neutral and earth
conductor respectively. DIN rail is a standard type metal rail used to mount all breakers inside the
distribution board. Table 6.3 simplifies the description of all protective devices installed in the distribution
board. Figure 6.10 shows the wiring connections of live and neutral conductors in distribution board.
105
Figure 6.9 Components Inside Distribution Board
106
Miniature Circuit Breaker It acts as a fault current breaker to remove the overcurrent fault
condition.
It provides protection for live connection only.
It comes with different current protection rating typically rated at 6A,
20A and 32A to protect the final circuit.
It will automatically trip during current fault condition and after the
fault is removed, it needs to be manually on to restore the connection.
It has three types of mechanism namely thermal, electromagnetic and
hydraulic-magnetic.
Two or more MCBs can be connected together using bus bar which is
specifically design to operate at 40A, 63A or 100A.
107
Cable and Conductor
One of the most important parameters that influence the healthy of a wiring system is the cable or wire
selection. The selection of the cable is decided based on lot of factors such as insulation type, operating
temperature, wiring method, and circuit type. Table 6.4 simplifies the typical choices of copper cable in a
single phase domestic wiring system with its specific application.
There are two types of cable used in domestic wiring namely fixed cable and flexible cable (flex). Fixed
cable is the cable that is used to install the final circuits permanently. Due to its inflexible characteristic, it
serves as a great conductor either in surface or concealed wiring method.
Flexible cable less than 4mm2 is typically used to connect the electrical accessories to the final circuits. It
cannot be used as the permanent conductor and shall be used in application where the connection is less
than 3 meters. Table 6.5 simplifies the complete cable colour codes in a single and three phase domestic
wiring system.
108
For the moment, Malaysia is still not using the IEE Amendment No. 2 to BS 7671: 2001 which specified
new cable colour codes for all fixed wiring in UK electrical installations. Based on the new standard, the
colour codes for single-phase system are brown for live conductor, blue for neutral conductor and green-
yellow for earth conductor (just like flexible cable) whereas for three-phase system are brown, black and
grey for live conductors, blue for neutral conductor and green-yellow for earth conductor.
Figure 6.11 shows the terminal connections in a wall socket using fixed cables and the terminal
connections in a three pin plug using flexible cables.
Another important factor to consider during electrical installation is the ageing effect of conductor. A lot
of factors are influencing the deterioration and it is hard to determine precisely the exact life cycle of a
conductor. Estimating the life of a cable can only be approximate because of the obvious difficulties in
gathering data. Based on IEE wiring regulations BS 7671:2001 standard, there is general understanding
that PVC cables with continuous conductor operating temperature of 70oC have a life of 20 years. Figure
6.12 shows the ageing expectancy plotted by Malaysian Cable Manufacturers Association (MCMA) from
initiation to retirement stage. Obviously from the study, a lot of cable failure cases occurred after 40 years
of its service. Table 6.6 shows the general approximation of cable life cycle based on Figure 6.12.
Table 6.7 shows the complete electrical standards for electrical installation in Malaysia based on IEC, MS
and BS Standards.
Table 6.8 shows the current-carrying capacity for single core PVC insulated fixed cable based on BS6004,
BS6231, and BS6346 standards used in domestic wiring system.
110
Table 6.8 Current-Carrying Capacity for Single Core Fixed Cable
111
Electrical Testing
The electrical contractor is charged with a responsibility to carry out a number of tests on an electrical
installation and electrical equipment. The reasons for testing the installation are to ensure that the
installation complies with the Malaysian standards and regulations, the installation meets the
specification and also to ensure that the installation is safe to use. There are five tests that need to be
performed before an electrical installation can be approved by the supply authority (SA). The electrical
contractor also needs to submit Form G and Form H to the SA in order to verify all tests performed.
The tests are:
Continuity test
Insulation resistance test
Polarity test
Earth electrode resistance test
Residual current device (RCD) test
Some of the equipment used in the testing are multimeter, Ohmmeter, tong tester (clamp meter),
continuity meter, voltage indicator, RCD tester, earth resistance tester and insulation resistance tester.
Analog or digital multimeter can be set to resistance and AC voltage range to test for continuity and
voltage presence. Using both multimeter, you need to set the scale to ‘X1 Ω’ range to test for continuity
whereas for AC voltage presence, you need to set the scale to ‘250ACV’ range to measure the potential
voltage.
Non-contact voltage detector pen is used to detect the presence of AC voltage in hidden place especially
in enclosed wiring system without touching the conductor material. Usually it can detect voltage from
90VAC to 1000VAC. You need to hover over the tester near the cable to detect the presence of voltage.
The tester usually emits beeping sound and flashing light to indicate the presence of the AC voltage.
Test pen is used to detect the presence of electricity in a cable. Typically, it is used to check the presence
of live connection in single and three phase wiring system where the maximum voltage is below 500V.
112
You need to touch the tip of the test pen to the terminal connection to test for live connectivity. The neon
will glow when it detects the presence of live connection.
113
Test Your Skills:
Can you identify all parts used in the domestic wiring in the figure below?
[Ans: From top left side - 2-way box, single way box, inspection elbow, bayonet lamp holder, Edison lamp
holder, angle box, 3-way box, ceiling rose, straight Batten lamp holder, nut box, female adapter, bar
saddle, clip saddle, socket connector, conceal nut box.
Can you match the terminal conductors with the correct cable colour code?
114
In your assigned group, install the single phase wiring system onto the wiring trainer board using the
diagram below.
115