Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Halmstad University 091103 From an idea to a Printed Circuit Board! Laboratory 1 & Laboratory 2 In electronic design there is very often an iterative process, there some steps must be repeated until we reach our goal, the final circuit board. This document tries to describe the process in drawing the schematics, simulating the circuit and finally making the layout. The drawing and simulation is carried out in Cadence Capture CIS while the layout is done in Cadence Layout plus. PCB=Printed Circuit Board 1 Contents: 1. 2. 3. 4. 5. 6. Introduction: ................................................................................................................... 2 Create and adapt a project for simulation ...................................................................... 3 Make a design for simulation ......................................................................................... 4 Simulation ...................................................................................................................... 7 Create own your device for simulation……………………………………………….11 Simulation of your own device……………………………………………………….18 End of Laboratory 1 7. Create a adapted project for layout…………………………………………………...20 8. Make your own components with footprints................................................................ 20 9. Create a netlist .............................................................................................................. 29 10. Create a project in the Layout program and import the netlist.................................... 30 11. Draw and create a layout .............................................................................................. 31 12. Printout of the Layout .................................................................................................. 35 End of Laboratory 2 1. Introduction: To manufacture a circuit board one needs an electronic circuit design of how different ICs are to be connected and of course how they look like and where to be placed. See the picture below of how a circuit board with components could look like. If you have a lot of components or complicated devices one must start by doing a symbolic circuit to get a good overview. It is good practice to simulate your design to see that everything works properly. The design flow is first to make a circuit schematic using Capture. Then simulate our design with PSpice. After this generate the netlist by using Capture. The netlist is a file that describes how the components are connected in the circuit. This netlist is used to create the layout. When the layout is finished it is printed on a special paper used for manufacturing of the circuit board. The circuit board should be exposed, washed in a developer, etched in an acid solution and then the holes are drilled and the components are mounted and soldered. Finally your circuit board are tested. The test should hopefully verify that it behaves in a planned manner. If not you might need to go back to previous stages in the process. 2 2. Create and adapt a project for simulation Click ! start->programs->Cadence PSD 14.2->Capture CIS Create a new project File->new->project Write a suitable name and browse for a directory. See below ! You should avoid using of characters like: å,ä,ö,@ or &. Keep that in mind for all names and directories. Now we start by making a project that can be simulated. Choose Analog or Mixed A/D Choose an empty project ! 3 3.Make a design for simulation Now we have an empty project with an open space ready to be used for our design. The grid pattern is very useful to make straight wires for the component connections. Click Window->Cascade and make the figure windows look like: 4 Project Message field Working space Different tools We are now ready to start adding components. Click on the button add parts to the right ! 5 Click on Add Library and add analog.olb and source.olb. You have now selected a few libraries and made their components selectable. The Place Part window should now look like below: When you select components check that the icon above is shown. This means that the component can be used for simulation ( left icon ). The icon to the right means that your component can be used for layout. 6 Add a resistor and the source VPULSE Connect the components with place wire. 4.Simulation Press PSpice-New simulation profile Choose Time Domain (Transient) ! This is found under Analysis , see below. ! 7 Start the simulation! If you don’t have any errors it should look like the figure below. Try some other values for the components and see if the circuit behaves as one can expect. Start simulation ! Then switch the source VPULSE to a source VAC . 8 Change the simulation settings to AC Sweep/Noice. See the figure below ! You have now simulated a frequency response of the circuit. What you can see below is the voltage output over the capacitor for different source voltage frequencies. Up to 100 Hz the source voltage will almost entirely end up over the capacitor, but eventually for higher frequencies the capacitor behaves more and more as a short-circuit. 9 Try and change the values one at a time and simulate and see if this is reasonable! Change the capacitor to a higher and lower value and simulate once again ! 10 5. Create own your device for simulation Naturally one can’t find all the components manufactured in the world within the libraries of Cadence. But for your disposal many manufacturers provides models of their components for simulation purposes. For instance Analog Devices has an operational amplifier, OP amp which we will create. The device is 8616 and consists of two op amps. The device is manufactured in different sizes, hole- and surface-mounted. The figure above comes from a datasheet and illustrates the fact that the device can be both as SOIC and MSOP. SOIC = Small-Outline Integrated Circuit MSOP = Mini Small Outline Package We will return and look into how the device physically looks like later. Now we will try to make our own device for simulation by copying the features from a similar device and save these within our device. First we make our own libarary where we can save our component. Mark the project window and press File->New->Library. The project should now contain a library called library1.olb 11 Mark the library and press save as. Save the library in a suitable directory. Click add part and choose LM158 in the library OPAMP. Add the component to the working space. 12 This is an OP amp with the same pin configuration and two amplifiers within the same device. (Parts per Pkg: 2) Look in the figure above ! Place the component somewhere on the workspace. The component is also in the design cache. Check this ! Mark the component LM158 in Design Cache and click Edit->Copy . See above ! Choose the created library tutorial.olb and select Edit->Paste. The component LM158 is now copied to its own library where we can do whatever we choose do. Remove LM158 from the workspace to avoid mixing it up with the original component. Now mark LM158 in your own library. Click Design->Rename and save it as AD8616. Doubleclick on AD8616 and change its value to AD8616. Close the edit window and save. Click on the workspace and then on the add part button. Now you have the component AD8616 in your library named to tutorial.olb 13 We can see the two icons indicating it can be used for layout and simulation, but right now there is no existing model that we can use. Press OK and add to the workspace. The correct simulation template (model) can we find on the Analog Devices website: . http://www.analog.com/ Search for AD8616. If everything is OK the information about AD8616 should be shown. Click on the link ”AD8616 SPICE Macro-Model” and save it as AD8616.mod. This is a text-file that should be connected with the graphical model that we recently created. Start with the making of a library by selecting File->New->PSpice Library. This opens the PSpice Model Editor. Click Model->Import and import the file MCP6042.mod. The PSpice Model Editor should now look like: 14 Choose File->Save As and save on a suitable directory. Please notice the order of input, output and Voltage supply. The numbers are not to be mixed up with pin-numbers or anything else. You must see to that this order is the same as for our graphical model. Doubleclick on our graphical model AD8616 and this opens the property editor. Check the order in the field PSpice Template once again ! It should be: X^@REFDES %+ %- %V+ %V- %OUT @MODEL X^@REFDES = reference to a PSpice template saved with the same name as in the field Implementation. Change in Implementation to AD8616 . See the figure ! 15 After ”%” the name for the pin is given. This is checked by a right mouse-button click on the graphical device and selecting Edit Part. Check the names on the pins by a double-click on them. See the figure window below ! 16 In this example one can see that pin number 8 has the name V+. This is consistent with what we said earlier about the order must be the same. * Node Assignments * * * * * * * .SUBCKT AD8616 noninverting input | inverting input | | positive supply | | | negative supply | | | | output | | | | | | | | | | 1 2 99 50 45 X^@REFDES %+ %- %V+ %V- %OUT @MODEL Compare this with a function call in the programming language C. In programming one must be careful with the order of the arguments. It has nothing to do with names of the variables. It is a difficult error to discover because there is no warning for this when you simulate the model. The result of the simulation is of course rubbish but to understand why can be difficult. 17 Close the PSpice Model Editor and Edit part. Check that the our graphical model refers to correct simulation model (template) by double-clicking and selecting Edit PSpice Model . It should now look like below if the PSpice Model Editor has opened the correct file. When it does we know that it uses the correct model in the simulation. If it responds can’t find the model. Check the names (AD8616). Close PSpice Model Editorn ! 6.Simulation of your own device Make the schematic below: In the schematic we have used the fact that we can name the connections (net) . The schematic becomes easier to understand and to follow. Name the connections with the button Place Net Alias. Put a probe on out and simulate the circuit with the following settings: 18 The result should be: What is it ? I guess you can easily understand it is a Low Pass Filter. Can you tell what order and cut-off frequency we have in our filter ? Remove the probe from the schematics and click Trace->Add Trace and enter in the field Trace Expression : 20* LOG10(ABS(V(out)/V(in))) 19 7. Create a adapted project for layout. The simulation is now ready and we start with drawing the schematics. är färdig och vi börjar Close the project and create a new one. Choose Schematic this time. Add the same components as in the simulation. 8. Make your own components with footprints We will now try to make a device that is not included in the library of Cadence. First we make our own library where we save our device. Mark the project and press File>New->Library . Our project should now look like below and with a library library1.olb . 20 21 22 Mark the library and press save as. Save the library in a suitable directory. Make sure that the library is active and press Design->New Part Place 4 pins (place pin) and mark the outside with place rectangle 23 Press save and close the window ! The device should now be searchable in Place Parts 24 Add the device in schematic and connections from the library Connector.olb. The one thing that is missing is the footprint to our device and the connections. The schematic looks now like: To find an appropriate footprint to the connections we need to start the program Cadence Layout Plus. Press Tools->Library Manager Look in the library BCON100T after a suitable footprint. Browse in the library and look after a footprint BLKCON.100/VH/TM1SQ/W.100/2 . See below ! 25 Double-click on the connector in the schematic and copy the text to the box below PCB Footprint . Repeat this for the other connector. For the sake of the exercise we make our own footprint for own device. Press Create New Footprint in the library manager ! Choose your own name and select Metric. Mark Pin Tool, click on the right mouse-button and choose New and place four ”Pads”. 26 Mark Global Layer and Obstacle Tool . Select an area as large as the device. 27 Choose Save as Now select Create New Library and choose a name for the library and press OK. The library should be visible in the library manager. Copy the name of the footprint and return to schematic and also write in the window PCB Footprint . 28 9. Create a netlist Activate the project and press Create Netlist. Check the tab Layout and press Ok. 29 Hopefully we have a netlist without any problems and that also means we are finished with the schematics. A netlist is a list of connections, components, component footprints and other things related to your schematic. From the netlist the PCB package can import all these things and load all the components to your empty board and then finally do the routing. 10. Create a project in the Layout program and import the netlist Start Layout Plus and click File->New Choose a template for example C:\Cadence\PSD_14.2\tools\layout_plus\data\jump6238.tch and browse and look for your netlist. The technology file you use defines the board layer structure and sets default values for trace width and route spacing, default, grids, padstack descriptions and default colours. 30 Press Apply ECO. If we do not have any errors then just approve ECO. AutoECO enables you to forward annotate a printed circuit board from Capture to Layout. AutoECO also resolves "pin-to-pin" conflicts that may arise, due to pins that are missing from a chosen footprint, or pins that are named differently in the Capture than they are in Layout. The Output Layout MAX file is a project file that contains the information to build the board. 31 If there are errors return to schematic, correct and make a new netlist. Otherwise accept the ECO and go to the Layout Plus program. Here you can find all your components in some kind of Rats Nest. If you have many components you will understand the name. 11. Draw and create a layout Start by placing the components/devices by pressing the button Component Tool . The components can be moved by marking them and then dragging them. Rotate with the short-cut command ´r´. Rotate and move the components so that no wires cross one another or at least as little as possible. Try to place them so it looks similar to the schematic. Also consider to place them so it is easy to solder and debug. A large surface-mounted component next to a smaller one could mean serious problems when it comes to soldering. 32 Please notice that the components can´t be placed outside the DRC-box. The DRC (Design Rule Check)-button are supposed to help the user to discover the mistakes as early as possible. The components can not be placed on top of each other. In order to make the DRCbox larger zoom-out and press View->Zoom DRC/Route Box and mark a new box. When all the components have been placed make a frame. Press the Obstacle Tool button and and make a box. Double-click on the line and then the Edit Obstacle window opens up. 33 Choose like in the figure window and press OK. Before routing the board. Select the proper thickness of the wires. Rules of thumbs are for the wires: 10 mil 0.3A 15 mil 0.4A 20 mil 0.7A 25 mil 1A 50 mil 2A 100 mil 4A Standard width is16mil. These rules of thumb can of course be changed on a thin copper board. Press View->Database Speadsheets->Nets and double click on the net you want to change. 34 Enter in Min, Conn and Max to the desired widths. When you perform manual routing check that the DRC-button is pressed otherwise the tracks/wires can cross one another. To control the route spacing set the distance by pressing Options-> Global Spacings. Change these to suitable distances. Press Edit Segment button and start routing manually. We must also keep in mind that when it comes to solder the through-hole devices there must be a copper-surface large enough both for drilling and solder the pins. This surface is called pod. In our case the drilling holes must be at least 0.8 mm. This we do manually in our labroom. This means that the pod-surface must have a diameter on at least 1.5mm. You can check this Tools -> Padstack -> Select from Spreadsheet. Here you can find the pod width for each and every component. 35 If you want to add text use Text Tool-button. Make a right-button click and select New. Select Bottom Layer and Mirrored. This is because you see the text from upper side in the Layout program. In some cases it is useful to let earth-layer be accessible all over the cicuit board and large enough. This can be arranged by letting the empty part of the circuit board become a copper-layer. Enter Obstacle in Tools-menu ! Make the following choices: Obstacle Type -> Copper Pour, Obstacle Layer -> BOTTOM and Net Attachment-> GND ( possibly 0) depends on what earth denotation you have used. Finally enter Hatch Pattern -> solid. 36 12. Printout of the Layout Before the printout check that everything is alright. Select Options->Post Processing Settings By the right mouse button choose the layer you want to print first and take a look in preview To see that everything looks OK. It mignt be necessary to return to schematic and make a new netlist. Choose Plot To Print Manager to write to a printer. When you choose what layer to print make also sure that you select Properties and ” Keep Drill Holes Open ”. Otherwise it can be difficult to perform manual drilling if the copperlayer don’t have any holes. Make a final check of everything !! 37