Sie sind auf Seite 1von 61

WHAT IS PCB?

A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate.

Types of PCB
Single sided Double sided (PTH) Printed Through Hole Multi Layer. DIODE AND TRANSISTOR CODES

First Number 1 = Diode 2 = Transistor 3 = FET


EXAMPE: 1N4007 Diode.

Second Letter

Subsequent numbers Serial Number of device

TRANSISTOR GENERAL CODE

First Letter Specifies semiconductor material A B Germanium Silicon

Second Letter Specifies type of device

Subsequent Characters

A Diode - low power or signal B Diode - variable capacitance C Transistor - audio frequency, low power D Transistor - audio frequency, power E Tunnel diode F Transistor - high frequency, low power G Miscellaneous devices H Diode - sensitive to L Transistor high frequency, power N Photo coupler P Light detector

The characters following the first two letters form the serial number of the device.

Q Light emitter R Switching device, low power, e.g. thyristor, diac S Transistor - switching low power T Switching device, low power, e.g. thyristor, triac U Transistor - switching, power W Surface acoustic wave device X Diode multiplier Y Diode rectifying Z Diode - voltage reference

Transistor bottom view of BC147, SL100, 2N3055

3-BAND RESISTOR COLOUR CODE


COLOUR

DIGIT

MULTIPLIER x 0.01 x 0.1

TOLERANCE 10% 5% 1% 2%

TOLARANCE

Silver Gold Black Brown Red Orange Yellow Green Blue Violet Grey White
Calculation: The value is

0 1 2 3 4 5 6 7 8 9
Brown,Black,Red

x1 x 10 x 100 x 1 k x 10 k x 100 k x 1 M x 10 M x 100 M x 1 G 1*10-6/K 0.5% 0.25% 0.1% 10*10-6/K 5*10-6/K 100*10-6/K 50*10-6/K 15*10-6/K 25*10-6/K

3 BAND, 4 BAND- RESISTOR COLOUR CODE IDENTIFICATION

Resistor Wattage The flow of current through a resistor increases, it heats up, and if the temperature exceeds a certain critical value, it can be damaged. The wattage rating of a resistor is the power it can dissipate over a long period of time.

Wattage rating is not identified on small resistors. The following diagrams show the size and wattage rating:

RESISTOR DIAMENTION

Fixed Resistors Carbon composition (In the range upto 100M OHMS, and power ratings 1/8 to 2W) Carbon film (R value range from 10 ohms to 10M ohms with 2Watts) Metal film (Range from 10 ohms to 1M ohms with power rating upto 5Watts)

Wire wound.

(Two types 1. Power style and 2. precision style)

Variable Resistors Potentiometer (pot) This is a variable resistor either of carbon or wire wound type. It smaller in size refereed as pot

Wire wound pot: There are two types: Single turn, and (b) Multi Turn Range is 50 ohms to 5 ohms and in power ratings of 2 to 5W. Multi turn pot:-

Multi turn or helical pots are used in applications the requires precise setting of a resistance value. The range is 50 ohms to 250k ohms and power ratings upto 5W. Rheostat:A wire wound pot that can dissipate more than 5 watts is referred to as a Rheostat. Variable resistor Photo-resistor Variable resistor has an adjustable resistance (2 terminals) (3 terminals)

Potentiometer Potentiometer has an adjustable resistance Reduces resistance when exposed to light

Power resistor Power resistor is used for high power circuits and has large dimensions. Surface mount This type of resistors have small dimensions. The resistors are surface mounted on the printed circuit board (PCB), this method is fast and (SMT/SMD) requires small board area. Resistor network Resistor network is a chip that contains several resistors with similar or different values.

Carbon resistor General types Trimmer or Trim pot. A trimming potentiometer is used where the resistance must be adjustable but not continuously variable. The rage is Few ohms to 5m ohms and power rating is 1W.

SMD Transistor

SMD Capacitor

SMD LED

SMD Resistor

What is capacitor:-Capacitor is an electronic component that stores electric charge. The capacitor is made of 2 close conductors (usually plates) that are separated by a dielectric material. The plates accumulate electric charge when connected to power source. One plate accumulates positive charge and the other plate accumulates negative charge. They are used in 1.Tuned circuits, 2.Timing circuits, 3.Filters, 4.Amplifier circuits, 5.Oscillator circuits, Capacitors are generally classified according to the dielectric use. Most commonly used dielectrics are

Air, Electrolyte, Ceramic, Plastic, Mica and paper.

IMPORTANT:- only electrolytic capacitors have polarity. Fixed capacitors: are 1. Aluminium type 2. Tantalum type a. Ceramic capacitor (Disc capacitor) b. Tubular capacitor c. Plastic capacitor d. Polyester capacitor e. Mica capacitors f. Paper capacitor 2. Variable capacitor. A air variable capacitor (Gang type and Trimmer capacitor),Range few pico farads upto 500pF voltage range 9kv How capacitor works?

The capacitance is measured in units of Farad *F+ (usually in microfarad *F+ ). Capacitor disconnects current in DC circuits and short circuit in AC circuits. P pico=10-12 ,n nano 10-9 m micro = 10-6.

HOW TO TEST DIODE? SELECT DIODE MODE IN DIGITAL MULTIMETER Forward bias: Connect DMM (+) Test Red lead to anode DMM (-) Test Black lead to cathode If the DMM reading is from 0.478v to 0.668v the condition is GOOD

Verification: Reverse bias:

Connect DMM (+) Test lead to cathode DMM (-) Test lead to anode Verification: If the DMM reading is OL (or) 1 or open (over load) then condition is GOOD If you get reading in forward bias as 0000 or OL or 1, and in reverse bias as 0000 (or) low values the diode can be FAULTY and needs replacement. IMPORTANT: (0.548V Means = 548 mV RANGE )

NPN Transistor Testing By Digital multimeter Forward bias: Step 1. Connect DMM (+) Test Red lead to Base DMM ( -) Test Black lead to Collector = display shows the reading = 0.615v DMM (-) Test Black leadto Emitter = 0.645v

Verification: If the DMM reading is from 0.641v to 0.645v the condition is GOOD Reverse bias: Step 2. Connect DMM (-) Test lead to BASE DMM (+)Test lead to Collector reading shows = OL or '1' or OPEN DMM (+)Test lead to Emitter = OL or '1' or open Verification: If the DMM reading is OL the condition is GOOD CONDITION. Step 3. DMM (+) Test lead to collector DMM (-) Test lead to Emitter DMM Reading shows = OL or '1' or open (over load) the condition is GOOD

Step 4.

DMM (-) Test lead to collector DMM (+) Test lead to Emitter DMM Reading shows = OL or '1' or open (over load) the condition is GOOD

HOW TO TEST SCR AND TRIAC Connect positive test lead to cathode Negative test lead to Anode= DMM READING SHOWS OL or 1 or open

Connect Negative test lead to cathode positive test lead to Anode= DMM READING SHOWS OL or 1 or open positive test lead to Gate = .235V

Connect positive test lead to cathode Negative test lead to Anode= DMM READING SHOWS OL or 1 or open Connect Negative test lead to cathode positive test lead to Anode= DMM READING SHOWS OL or '1' or open (MEANS OVER LOAD) the condition is GOOD Verification: If you get reading in forward bias as 0000 or OL or 1 or open and in reverse bias as 0000 (or) low values the device can be FAULTY and needs replacement.

Ohm's law

Ohm's law definition :- The resistor's current I in amps (A) is equal to the resistor's voltage VR=V in volts (V) divided by the resistance R in ohms ()

V is the voltage drop of the resistor, measured in Volts (V). Sometimes E is used instead of V . E denotes electromotive force. I is the electrical current fl0wing through the resistor, measured in Amperes (A) R is the resistance of the resistor, measured in Ohms ()

Voltage calculation

When we know the current and resistance, we can calculate the voltage. The voltage V in volts (V) is equal to the to the current I in amps (A) times the resistance R in ohms ():

Resistance calculation

When we know the voltage and the current, we can calculate the resistance. The resistance R in ohms () is equal to the voltage V in volts (V) divided by the current I in amps (A)

Since the current is set by the values of the voltage and resistance, the Ohm's law formula can show that:

If we increase the voltage, the current will increase. If we increase the resistance, the current will reduce. Example =1 Find the current of an electrical circuit that has resistance of 50 Ohms and power supply of 5 Volts.

Solution:V = 5V R = 220 I = V / R = 5V / 220 = 0.02A = 22 mA

ALL ELECTRONICS SYMBOLS


Symbol
Device name

Details

Electrical Wire

Conductor of electrical current

Connected Wires

Connected crossing

Not connected Wires

Wires are not connecte

SPST Toggle Switch

Disconnects current when open

SPDT Toggle Switch

Selects between two connections

Pushbutton Switch (N.O)

Momentary switch - normally open

Pushbutton Switch (N.C)

Momentary switch - normally closed

DIP Switch

DIP switch is used for onboard configuration

SPST Relay Relay open / close connection by an electromagnet

SPDT Relay

Jumper

Close connection by jumper insertion on pins.

Solder Bridge

Solder to close connection

Ground Symbol
Earth Ground Used for zero potential reference and electrical shock protection.

Chassis Ground

Connected to the chassis of the circuit

Digital / Common Ground

Resistor Symbols
Resistor Resistor reduces the current flow. Resistor

Potentiometer Adjustable resistor - has 3 terminals. Potentiometer

Variable Resistor / Rheostat Adjustable resistor - has 2 terminals. Variable Resistor / Rheostat

Capacitor Symbols
Capacitor Capacitor is used to store electric charge. It acts as short circuit with AC and open circuit with DC. Capacitor

Polarized Capacitor

Electrolytic capacitor

Polarized Capacitor

Electrolytic capacitor

Variable Capacitor

Adjustable capacitance

Inductor / Coil Symbols


Inductor Coil / solenoid that generates magnetic field

Iron Core Inductor

Includes iron

Variable Inductor

Power Supply Symbols


Voltage Source Generates constant voltage

Current Source

Generates constant current.

AC Voltage Source

AC voltage source

Generator

Electrical voltage is generated by mechanical rotation of the generator

Battery

Generates constant voltage

Battery

Generates constant voltage

Controlled Voltage Source

Generates voltage as a function of voltage or current of other circuit element.

Controlled Current Source

Generates current as a function of voltage or current of other circuit element.

Meter Symbols
Voltmeter Measures voltage. Has very high resistance. Connected in parallel.

Ammeter

Measures electric current. Has near zero resistance. Connected serially.

Ohmmeter

Measures resistance

Wattmeter

Measures electric power

Lamp / Light Bulb Symbols


Lamp / light bulb

Lamp / light bulb

Generates light when current flows through

Lamp / light bulb

Diode / LED Symbols


Diode Diode allows current flow in one direction only (left to right).

Zener Diode

Allows current flow in one direction, but also can flow in the reverse direction when above breakdown voltage

Schottky Diode

Schottky diode is a diode with low voltage drop

Varactor / Varicap Diode

Variable capacitance diode

Tunnel Diode

Light Emitting Diode (LED)

LED emits light when current flows through

Photodiode

Photo transistor

Photodiode allows current flow when exposed to light

Transistor Symbols
NPN Bipolar Transistor Allows current flow when high potential at base (middle)

PNP Bipolar Transistor

Allows current flow when low potential at base (middle)

Darlington Transistor

Made from 2 bipolar transistors. Has total gain of the product of each gain.

UJT Transistor

N-channel field effect transistor

JFET-P Transistor

P-channel field effect transistor

NMOS Transistor

N-channel MOSFET transistor

PMOS Transistor IGBT

P-channel MOSFET transistor

Misc. Symbols
Motor Electric motor

Transformer

Change AC voltage from high to low or low to high.

Electric bell

Rings when activated

Buzzer

Produce buzzing sound

Fuse The fuse disconnects when current above threshold. Used to protect circuit from high currents. Fuse

Bus

Contains several wires. Usually for data / address.

Bus

Bus

Optocoupler / Opto-isolator

Optocoupler isolates onnection to other board

Loudspeaker

Converts electrical signal to sound waves

Microphone

Converts sound waves to electrical signal

Operational Amplifier

Amplify input signal

Schmitt Trigger

Operates with hysteresis to reduce noise.

Analog-to-digital converter (ADC)

Converts analog signal to digital numbers

Digital-to-Analog converter (DAC)

Converts digital numbers to analog signal

Crystal Oscillator

Used to generate precise frequency clock signal

Antenna Symbols
Antenna / aerial

Transmits & receives radio waves

Antenna / aerial

Dipole Antenna

Two wires simple antenna

Logic Gates Symbols


NOT Gate (Inverter) Outputs 1 when input is 0

AND Gate

Outputs 1 when both inputs are 1.

NAND Gate

Outputs 0 when both inputs are 1. (NOT + AND)

OR Gate

Outputs 1 when any input is 1.

NOR Gate

Outputs 0 when any input is 1. (NOT + OR)

XOR Gate and EX-NOR GATE

Outputs 1 when inputs are different. (Exclusive OR)

D Flip-Flop

Stores one bit of data

Multiplexer / Mux 2 to 1

Connects the output to selected input line.

Multiplexer / Mux 4 to 1

Demultiplexer / Demux 1 to 4

Connects selected output to the input line

Tracks
There is no recommended standard for track sizes. What size track you use will depend upon (in order of important) the electrical requirements of the design, the routing space and clearance you have available, and your own personal preference. Every design will have a different set of electrical requirements which can vary between tracks on the board. All but basic non-critical designs will require a mixture of track sizes. As a general rule though, the bigger the track width, the better. Bigger tracks have lower DC resistance, lower inductance, can be easier and cheaper for the manufacturer to etch, and are easier to inspect and rework

Pads
Pad sizes, shapes and dimensions will depend not only upon the component you are using, but also the manufacturing process used to assemble the board, among other things. There are a whole slew of standards and theories behind pad sizes and layouts, and this will be explained later. Suffice it to say at this stage that your PCB package should come with a set of basic component libraries that will get you started. For all but the simplest boards though, youll have to modify these basic components to suit your purpose. Over time you will build up your own library of components suitable for various requirements. There is an important parameter known as the pad/hole ratio. This is the ratio of the pad size to the hole size.Each manufacturer will have their own minimum specification for this. As a simple rule of thumb, the pad should be at least 1.8 times the diameter of the hole, or at least 0.5mm larger. This is to allow for alignment tolerances on the drill and the artwork on top and bottom layers. This ratio gets more important the smaller the pad and hole become, and is particularly relevant to via.

Clearances
Electrical clearances are an important requirement for all boards. Too tight a clearance between tracks and pads may lead to hairline shorts and other etching problems during the manufacturing process .

Clearances for Electrical Conductors


The track size varies with how much voltage is applied, below the table

0-15V 16-30V 31-50V 51-100V

0.05mm 0.05mm 0.1mm 0.1mm

Basic Routing
Now its time for some basic routing rules. Routing is also known as tracking. Routing is the process of laying down tracks to connect components on your board. An electrical connection between two or more pads is known as a net. Keep nets as short as possible. The longer your total track length, the greater its resistance, capacitance and inductance. All of which can be undesirable factors. Tracks should only have angles of 45 degrees. Avoid the use of right angles, and under no circumstances use an angle greater than 90 degrees. This is important to give a professional and neat appearance to your board. PCB packages will have a mode to enforce 45 degree movements, make use of it. There should never be a need to turn it off. Contrary to popular belief, sharp right angle corners on tracks dont produce measurable EMI or other problems. The reasons to avoid right angles are much simpler - it just doesnt look good, and it may have some manufacturing implications. Forget nice rounded track corners, they are harder and slower to place and have no real advantage. Stick to 45 degree increments. Rounded track bends belong to the pre-CAD taped artwork era. Snake your tracks around the board, dont just go point to point. Point to point tracking may look more efficient to a beginner at first, but there are a few reasons you shouldnt use it. The first is that its ugly, always an important factor in PCB design! The second is that it is not very space efficient when you want to run more tracks on other layers. Enable your Electrical grid, which is sometimes referred to as a snap to center or snap to nearest option. Let the software find the centers of pads and ends of tracks automatically for you. This is great for when you have pads and tracks which arent lined up to your current snap grid. If you dont have these options enabled then you may have to keep reducing your snap grid until you find one that fits. Far more trouble than its worth. There is almost never a reason to have these options disabled. Always take your track to the center of the pad, dont make your track and pad just touch. There are few reasons for this. The first is that its sloppy and unprofessional. The second is that your program may not think that the track is making electrical connection to the pad. Proper use of a snap grid and electrical grid will avoid problems here. Use a single track, not multiple tracks tacked together end to end. It may make no difference to the look of your final board, but it can be a pain for future editing. Often youll have to extend a track a bit. In this case its best to delete the old one and place a new one. It may take a few extra seconds, but its worth it. People looking at your finished board may not know, but YOULL know! Its the little touches like this that set good PCB designers apart. Make sure your tracks go right through the exact center of pads and components, and not off to one side. Use of the correct snap grid will ensure that you get this right every time. If your track doesnt go through the exact center then you are using the wrong snap grid. Why do you need to do this? It makes your board neater and more symmetrical, and it gives you the most clearance. Only take one track between 100 thou pads unless absolutely necessary. Only on large and very dense designs should you consider two tracks between pads. Three tracks between pads is not unheard of, but we are talking seriously fine tolerances here. For high currents, use multiple vias when going between layers. This will reduce your track impedance and improve the reliability. This is a general rule whenever you need to decrease the impedance of your track or power plane. Dont drag tracks to angles other than 45 degrees Neck down between pads where possible. Eg, a 10 thou track through two 60 thou pads gives a generous 15 thou clearance between track and pad. If your power and ground tracks are deemed to be critical, then lay them down first. Also, make your power tracks as BIG as possible.

Keep power and ground tracks running in close proximity to each other if possible, dont send them in opposite directions around the board. This lowers the loop inductance of your power system, and allows for effective bypassing. Keep things symmetrical. Symmetry in tracking and component placement is really nice from a professional aesthetics point of view. Dont leave any unconnected copper fills (also called dead copper), ground them or take them out. If you are laying out a non-plated through double sided board, then there are some additional things to watch out for. Non-plate through holes require you to solder a link through the board on both the top and bottom layer. Do not place vias under components. Once the component is soldered in place you wont be able to access the joint to solder a feed through. The solder joint for the feed through can also interfere with the compnent. Try and use through hole component legs to connect top tracks to bottom tracks. This minimises the number of vias. Remember that each via adds two solder joints to your board. The more solder joints you have, the less reliable your board becomes. Not to mention that that it takes a lot longer to assemble.

An example of GOOD power routing (Left) and BAD power routing (Right)

An example of GOOD routing

BAD routing

Finishing Touches
Once you have finished all your routing, your board isnt done quite yet. There are a few last minute checks and finishing touches you should do.

If you have thin tracks (<25 thou) then its nice to add a chamfer to any T junctions, thus eliminating any 90 degree angles. This makes the track more physically robust, and prevents any potential manufacturing etching problems. But most importantly, it looks nice. Check that you have any required mounting holes on the board. Keep mounting holes well clear of any components or tracks. Allow room for any washers and screws. Minimise the number of hole sizes. Extra hole sizes cost you money, as the manufacturer will charge you based on not only the number of holes in your boards, but the number of different hole sizes you have. It takes time for the very high speed drill to spin down, change drill bits, and then spin up again. Check with your manufacturer for these costs, but you cant go wrong by minimising the number of hole sizes. Double check for correct hole sizes on all your components. Nothing is more annoying than getting your perfectly laid out board back from the manufacturer, only to find that a component wont fit in the holes! This is a very common problem, dont get caught out. Ensure that all your vias are identical, with the same pad and hole sizes. Remember your pad to hole ratio. Errors here can cause breakouts in your via pad, where the hole, if shifted slightly can be outside of your pad. With plated through holes this is not always fatal, but without a complete annular ring around your hole, your via will be mechanically unreliable. Check that there is adequate physical distance between all your components. Watch out for components with exposed metal that can make electrical contact with other components, or exposed tracks and pads. Change your display to draft mode, which will display all your tracks and pads as outlines. This will allow you to see your board warts and all, and will show up any tracks that are tacked on or not ending on pad centers.

If you wish, add teardrops to all your pads and vias. A teardrop is a nice smoothing out of the junction between the track and the pad, not surprisingly, shaped like a teardrop. This gives a more robust and reliable track to pad interface, better than the almost right angle between a standard track and pad. Dont add teardrops manually though, its a waste of time. But if your program supports automatic teardrop placement, feel free to use it.

Single Sided Design


Single sided design can greatly reduce the cost of your board. If you can fit your design on a single sided board then it is preferable to do so. Look inside many of todays consumer items like TVs and DVD players, and you will almost certainly find some single sided boards. They are still used because they are so cheap to manufacture

Double Sided Design


Double sided design gives an extra degree of freedom for designing your board. Things that were next to impossible on a single sided board become relatively easy when you add an additional layer.

Silkscreen
The silkscreen layer is also known as the component overlay or component layer. It is the layer on the top of your board (and bottom if needed) that contains your component outlines, designators (C1, R1 etc), and free text.

Solder Mask
A solder mask is a thin polymer coating on your board which surrounds your pads to help prevent solder from bridging between pins. This is essential for surface mount and fine pitch devices. The solder mask typically

covers everything except pads and vias. Your PCB program will automatically remove solder mask from pads and via

Design Rule Checking


Design Rule Checking (DRC) allows you to automatically check your PCB design for connectivity, clearance, and other manufacturing errors. With the large and complex PCBs being designed today, it is impractical to manually check a PCB design. This is where the DRC comes into its own, it is an absolutely essential step in professional PCB design. Examples of what you can check with a DRC are: Circuit connectivity. It checks that every track on your board matches the connectivity of your schematic. Electrical clearance. You can check the clearance between tracks, pads, and components.

Soldering
Soldering considerations need to taken into account when laying out your board. There are three basic soldering techniques - hand, wave.

PCB DESIGNING TUTORIAL/SPC This tutorial leads you through the design of a PCB using layout software from ExpressPCB, which is freeware available. Before beginning you should make sure your computer has both Express PCB and Express SCH, if not than you should download the software. Before beginning the PCB process, you should come up with the initial design, build it and test it on a breadboard, fix any errors, and determine specific components. It is also useful to have datasheets and dimensions for all of the special components such as transistors, ICs, sensors, actuators, etc., on hand. For this tutorial, we will use a drawer burglar alarm circuit, which had the following form after testing on a breadboard:

There are two stages remaining in the process to creating the circuit board. In the first stage, you build the schematic using the ExpressPCB schematic editor. In the second stage you layout the circuit board. It is possible to skip directly to the layout editor. However, doing the schematic first will allow you to link the schematic into the layout editor reducing the probability of error.

Entering the Schematic into ExpressSCH


Open ExpressSCH to create a fresh schematic. The first time you start ExpressSCH you will get a dialog box with a link to a quick start guide for ExpressSCH. This can be useful if you want to get a general overview for the tool. Once you are ready to start, close the dialog box to view the empty schematic.

Click on Op-Amp-like symbol to place components. To place the resistors, select Passive-Resistor in the text box in the upper right corner.

Then click on the schematic for the 4 resistors (not including the photo resistor or potentiometer) in roughly the location you want them to display. Then zoom in using the magnifying glass tool (or the wheel on the mouse) and pan the display (using the sliding bars) to improve your view.

Now you need to give each of the resistors unique identifiers. Right click on a resistor and choose Set component properties. In the Component Properties box, under Component ID, select Auto assign Part ID. The program should assign this resistor to be R1. Set its value 10k in the Part Name field and hit OK. Repeat this process to identify and label R2 (10k), R3 (100k), and R4 (10k).

Rotate R4 by right clicking on it, selecting Rotate component and then Body left 90

Now add the capacitor, potentiometer, comparator, and transistor to the circuit by first clicking back on the component placement tool (the red op-amp symbol) and using the component names Passive-Capacitor polarized, Passive- Potentiometer, IC National - LM311 Comparator DIP-8, and Semiconductor Transistor NPN. Use set component properties to assign all of these parts Part IDs, label them and position them (using the arrow tool) in a logical manner.

Now we need to add some components (the photor esistor and the buzzer) that dont exist in the library. Lets start with the photoresistor. The easiest way to make new parts is to start with a symbol thats already close to what you want and modify it. Place a regular resistor on the layout (using the placement tool with Passive Resistor). Go to the selection tool (the arrow), choose that resistor and go to the Component menu at the top and select Ungroup component

Using the circle shaped tool from the tool menu, draw a circle around the resistor.

Select the whole object (using the arrow tool), and choose Component -> Group to make component

In the component properties box that appears, assign the photoresistor a unique part ID, such as PR1.

For future use, save this as a custom component by selecting Component -> Save custom component and then in the dialog box that appears give the component a name such a photoresistor. (If someone else has already completed the tutorial on this computer, the part may already exist, in that case you should either save this component with a unique name, or save your component on top of the one already existing)

Move the photoresistor to the spot you want it in the circuit. Now we will create the buzzer. The buzzer is a polarized device, so a good starting point is a polarized capacitor. Go to the component selector, choose a polarized capacitor, ungroup the capacitor, and then add a circle to the symbol to distinguish it as a buzzer. Group the entire object as a component with part ID, BZ1, and label CEP2224 and save the component as a Buzzer under custom components. At the last step, youre display will be as follows:

Now we need to add our connections to power and ground. Lets start with ground. Go to the symbol or signal label tool, which looks like a ground, and select Power ground from the text box in the upper right.

Place 5 grounds into the circuit, at the bottom of R2, near pins 1 and 4 of the LM311, near the bottom of the capacitor, at the emitter of the BJT, and at the bottom of the potentiometer.

Repeat this process, but using Power Voltage Supply +9V to put 5 power connections in at the top of R1, the photoresistor, pin 8 of the LM311, the top of R3 and the top of the buzzer.

Now lets add in our battery connection. Place a battery into the circuit, using Misc Battery. Assign the battery the part ID B1 and give it the label 9V. Then, use the symbol tool to add a ground connection and a +9V network connection (this will link the positive terminal of the battery with every other point in the circuit that should go to 9Vif you wanted to add a switch to the circuit, you would add it between the + terminal of the battery and the +9V symbol.)

Now select the wire tool, and wire your circuit together. The left-click starts the wire and sets a bend, and the right click ends a wire. After wiring, the schematic should appear as follows:

Save your work, using Save As.. to create a unique filename. Check your file for netlist errors using File -> Check schematic for netlist errors

The pins inside of the BJT are not specified (this is because pin assignments vary for different BJTs) so you will probably will get an error message, like that shown below:

Hit cancel on the error message, and then as that message suggested, select the part and choose Component and then Ungroup Component. This example uses the 2n1711 BJT in the little tin can (the TO-39 package). For this package the base is pin 2, the emitter is pin 1, and the collector is pin 3. To set this in the schematic, double click on just the collector pin, and assign it to pin 3.

In a similar fashion, assign 2 to the base, and 1 to the emitter. Then select the entire component (this takes a lot of shift-clickingbe sure to get all the little parts), choose Group to make component from the Component menu, and assign the part ID to be Q1.

If youre going to be using the transistor again, its probably a good idea to then click on it, select Component -> Save custom component and save it as the transistor name, which in this case is 2n1711.

Now check your file for netlist errors again, using File -> Check schematic for netlist errors, you might get an error like that shown below (if not skip to #0)

The cause of this error is that the wire isnt really connected. The snap-to-grid function has prevented you from making a connection. Hit continue to exit the netlist check. Then toggle the snapto-grid function off, select the errant line end(s) and move it (them) into the correct position. Repeat this process until all the lines are properly connected.

Reattempt the netlist error check. Once the netlist error check runs clean, you will be asked to save your file, which you should definitely do. The final schematic should look like this:

Print your schematic to reference as you work on your layout. At this point, you should review your schematic carefully to check for errors. Once you are satisfied that the schematic is correct, close ExpressSCH.

Creating the Layout in ExpressPCB


When doing the layout, it is particularly useful to have the actual components and/or in front of you, along with a ruler or set of calipers (the ruler and calipers are unnecessary for this tutorial). Open ExpressPCB. When you first open the program, a dialog box appears with links to the Quick Start Guide and a PCB Design Tips file. If you have time, both of these links can be instructive. Once youre ready to continue, hit OK to go to a new file. Under File select New file. Choose the 2-layer board, with Default via 0.056 round via with 0.029 hole. Change both default clearances for the filled planes to 0.05 (the maximum allowed). Hit OK and again OK on the warning that appears in the next window.

The yellow line on the screen shows the boundary for the PCB. The default boundary is 3.8 x 2.5 inches, which matches the express PCB miniboard service. This demo will use the entire board however for our class project you should only use half the board (1.9 x 2.5) so that we can double

up designs. Also, be aware that no copper (pads or traces) can be placed closer than 0.025" to the perimeter of the board. The first thing you need to do is to place all of your components onto the layout. Lets start with the resistors. Select the component placing tool, which looks like a little IC, and from the pull-down menu on the upper right choose Resistor-0.25 watt (lead spacing 0.4 inch). (This description matches the small resistors in Ri-024). Put 4 resistors on the schematic.

Now double click on each of the resistors to bring up the component properties box, and assign the resistors with part IDs R1, R2, R3, and R4.

The LM311 for this example is in an 8-pin DIP package, so you place the comparator using the component Dip 8-pin. Notice how the square pad denotes pin 1.

Double-click on the component and assign the part with the part ID U1

Now add the following components (this assumes that each of these component descriptions match the components in the circuitits good to confirm this with a ruler when you go to build your own circuitmatching lead spacings are particularly important): A capacitor with the description Cap radial electrolytic Lead spacing 0.2 inch and give it part ID, C1 (notice how the square pad denotes the positive lead) A transistor with the description Semiconductor TO-39 and give it part ID, Q1 A potentiometer with the description Potentiometer Bourns series 3386H and give it partID, R5

Save your work. Now we need to build the components that arent already in the library: the photoresistor, and the buzzer. Lets start with the photoresistor. The photoresistor dimensions are as follows (you could get this either from the data sheet or by measuring the actual component with calipers):

Like before, the easiest way to build a new component is to start with one that is similar. So we look through the component options for a two-pin component with a 0.1 lead spacing. A good choice is Cap lead spacing 0.1 inch. Place this component on the diagram, and zoom in so that you can get a better view.

Now select the component and choose Component -> Ungroup PCB Component to break the component down into parts.

Remove the boundary around the part, and then draw in a circle using the arc tool. Then double click on the circle to set its properties, and set the radius to 0.0825, and the layer to the silkscreen layer (the yellow layer).

Select the entire part, and then choose Component -> Group to make PCB component

Double click on the new component, and give it the part ID PR1 to match the photoresistor ID from your circuit schematic.

To use this component again, save your component using Component -> Save custom component, and save the component as photoresistor (if you use this in your design later, be sure that your photoresistor matches these dimensionsif not you will need to create a new part).

Now we will repeat this process for the buzzer, which has the dimensions shown below (given in mm):

To create this part, we will start with a capacitor base again, this time with a lead spacing of 0.6 inch (15 mm). Its best to use a polarized capacitor, as the buzzer is polarized. Lets use Capacitor Axial electrolytic Lead spacing 0.6 inch. After placing this part, the display will be as follows:

Ungroup the component, delete the rectangle, and add a circle in the silkscreen layer that has a radius of 0.5 inches. Move other components out of the way if they are too close. Your display will then look as follows:

Now we need to check that the pads are large enough for the buzzer, which has fat leads. Double click on one of the pins to pull up its properties:

The holes have a diameter of 0.035, which corresponds to 0.89 mm. This could be a little tight for our buzzer, where the pin diameter is specified as 0.8 +/- 0.1 mm. Pull down on the pad type menu and select 0.100 square pad with 0.046 hole which gives us a little clearance. (You need to make the pad and hole large enough that it the part will fit considering tolerances on pin dimension and placement, but if you make the holes too big it will be harder to solder the part in place --- a beginner should err on the side of making the hole too large).

Repeat this process with the other pad to make it 0.100 round pad with 0.046 hole

Select all the parts of the buzzer, group it as a component, and give the component part ID BZ1 to match the schematic. Save your component as buzzer to use again later. (If someone else has already completed the tutorial on this computer, the part may already exist, in that case you should either save this component with a unique name) Finally, we need to add in the battery, which is going to be connected by a battery strap to the circuit, and therefore requires only two pads (the battery will lie off of the board). This is a good opportunity for us to create a part from scratch. Use the pad tool to place a pad with the description 0.150 square pad with 0.079 hole to be the positive battery lead.

Make this pad correspond to pin 1 for the battery by choosing it with the select tool, and assigning it to be pin 1.

Create another pad, this time round, using the description, 0.150 round pad with 0.079 hole, near the first pad, and assign it to be pin 2. Then select both pads, and group them to make a component. Label the component with the Part ID B1. Save the part as battery strap connection in the component library.

Now (Finally!) we have all the components on the board. You can now link in the schematic file. To do this, select File -> Link schematic to PCB

Select your schematic file. You should then get a message like this:

Now if you select the net tool, and click on a pin, Express PCB will highlight all of the pins that should connect to that pin. For example, select the net tool and click on the + terminal of the battery, you should see something like this:

Click on some of the other pins to check your work and to get a sense of how the parts will connect.

Now, we want to arrange our components in a logical fashion. Your goal is to minimize the length of connecting wires. You also would like (ideally) to have a single ground plane on the back and all of other connections on the front surface, which means that you want to avoid having to cross wires over one another (this cant always be avoided). To rotate a component, right click on it and select the desired rotation. For example, here it might be nice to rotate R4:

Rotate the transistor and arrange the other parts until your board looks like this:

Now its time to draw in connection lines. One thing that you must consider when drawing connector lines is the current capacity of the lines on the board. Here are some general rules of thumb on line widths from the ExpressPCB web site: 0.010" 0.3 Amps 0.015" 0.4 Amps 0.020" 0.7 Amps 0.025" 1.0 Amps 0.050" 2.0 Amps 0.100" 4.0 Amps 0.150" 6.0 Amps

Most of our circuits will not draw more than 100 mA, so any line width should be acceptable. However, if your circuit uses a component that draws a significant current, such as a motor, than you should err towards larger line widths. Lets begin with the +9V lines. Use the net tool to highlight the +9V net on your board. Then click on the wire tool and select the upper metal (red) layer, and a 0.1 trace width (this is overkill, but its a good habit to make the power lines fat). Connect the + terminal of the battery to the top of the buzzer:

Now connect to the other +9V points in the circuit.

The potentiometer (R5) is a little close to the one power connection, so rotate it and shift it over:

Now create the signal connections. Highlight the unconnected pin of the photoresistor with the net tool, then select the wiring tool and a 0.025 line width, and connect the photoresistor to the potentiometer as shown:

Complete the connections and repeat this process for the other signal nodes in the circuit. When you get to R4, you may notice that the component would be more easy to wire if it were flipped, you can right-click on the component to accomplish this:

After all the signal lines are completed, your circuit should look as follows (only the grounds are unconnected):

Now for the ground plane. Select the Place a filled plane tool, which is the green tool right above the circle tool. Say OK to the informational message on the tool that pops up, and then create a box that encompasses the entire circuit on the bottom layer of the chipbut leaving a boundary of at least 0.025 from the board edge. To do this, choose the green layer from the top bar, then click near the upper left corner of the board (at least 0.025 from both boundaries). Click again near the upper right cornerat this point your display looks something like this:

Continue down to the bottom right corner and then to the bottom left corner. Then right-click to end the box. Your display should now look like this:

Notice how there is a space around each pad in the layer. The width of that space is controlled by Board Properties, under the Layout menu, and we set that at the largest possible size when we started this process (in step 0). Now we need to make our ground connections. Use the network tool to highlight the ground connections. Right-click on the ground pad for the battery. Select Bottom layer pad shape and then Thermal pad to filled plane. This will link that pad to the ground plane. The thermal pad has some thermal isolation between it and the rest of the plane, which will make it easier to solder later.

Repeat this for all of the ground pads in your layout. Your layout should now look like this:

For your own circuit, you should also add your initials in an unused corner of the chip. Do these initials in the top metal (red) layer rather than in the silkscreen (yellow) layer, because if we use miniboards, the silkscreen layer is not included. To add text, select the text tool, select the layer where you want the text to appear, and enter the text in the box on the upper right. Then click on the layout to place the text:

Carefully inspect your circuit board. Use the layer visibility tools in the bottom left corner to turn off and on layers. Zoom in to check for connections. Highlight all of the pads with the network tool on to verify that they are correctly connected. Print out your circuit and confirm that every connection specified in the schematic is present. With circuit boards, you definitely want to measure twice and cut once. At this point, you would be ready to submit the circuit.

Das könnte Ihnen auch gefallen