Overview    <<-BACK            HOME            UP --^           NEXT-->>  Demo-2
side4linux, a simple integrated development environment!

PCBS Demo-1     Create a new PCBS Project based on 'Sample2' and complete the schematics..


Purpose:  To provide a basic introduction to creating a new Printed Circuit Board design using 'side4linux' 'gEDA' and 'pcb'. We will build a Serial Communications input/output board to go with the demo CPU board which together makes up our prototype Machine Controller. The new board will be called 'Serial1' (that is shorthand for 'RS232C Serial interface board number 1').
You may of course not be interested in our Machine Controller. This is OK as side4linux can build anything you wish! We simply ask that you follow this Demo as an introduction on how to use the IDE and it's Tool set. Note also that you may have many invocations of the side4linux IDE open so you may wish to use one to show this Help while using another to do the Practicals. You could also print out this page to have some hard copy available for reference (very good if you are teaching a group of students as they may all have a photo copy). Please keep in mind that this is only a Demo, the actual printed circuit board of the Machine Controller is to be presented in a later Demo.

Requirements: Make sure that the 'GNOME' build environment is installed correctly, if not then read 'setup C build environment.txt' and also
'setup GNOME build environment.txt'.

Further requirements: Make sure that the latest PCBS support package is installed correctly.

Pre-Requisites: Read through and understand the content in the Overview first.


A photo of the PCB is shown next,

Demo1 example PCB


So to begin,
  1. Open 'side4linux' and click on 'Project>Open Project' in the Main Menue.
  2. Double click on the 'DEMOS' Product Area,
  3. Double click on the 'SIDEdemos' Product,
  4. In the file dialog double click the  'PCBS' folder. This takes you to where PCB projects are kept.
  5. Double click on 'Sample2', this opens the 'Sample2' project folder.
  6. Double click on 'sample2.prf'. This opens the 'Sample2' project file.
  7. Notice that the left bottom status bar window says 'Project: Sample2' which is the Project Name.
  8. Notice that the next window says 'Ptype: PCBS' which is the Project Type.
  9. Try clicking on 'Project' on the Main Menue, you will notice that 'Close Project' is now active.
  10. Notice that project names are set to be an upper case letter followed by lower case letters (easier on the IDE's Project routines).
  11. Click on the 'File Explorer' 'Files' tab on the left and view what schematic files are actually in the Project ('serial1' & 'serial1_connectors').
  12. Click on 'Open-SCH' in the Toolbar and open 'serial1.sch'.
  13. Close the smaller 'opening status' window and maximise the main window.
  14. Right click in the middle of the main window and left click on 'Zoom Extents' in the popup menue.
  15. Print the 'serial1' file to the printer 'File>Print', you will need this later on in the Demo.
  16. Close the 'serial1' schematic file by closing gEDA (left click on the 'X' in the top right hand corner.
  17. Close the 'Sample2' 'Project Project>Close Project' in the IDE.

Practical 1: Create a new PCBS Project,

Create a new Project called 'Try1' by following these steps,
  1. Click on 'Project>New Project.
  2. Left click on the 'combo box selector' and select 'PCB Project with PCB and Schematic files' as the Project Type.
  3. Left click on the 'Next' button.
  4. Select the 'SIDEdemos' Product Area and click 'Open'
  5. Select the 'product_directory' and click 'Open'
  6. Click on the Combo box selector, select 'SIDEdemos' and click on Next,
  7. In the 'Accept New Project' box enter the name of our new project as 'try1' (just try1 without the quote marks!).
  8. Left click on the 'Build' button.
  9. The bottom left 'Status' box should now say 'Project Try1' and the 'Status' box next to it should be 'Project Type: PCBS'
  10. Close the new Project, 'Project>Close Project'
  11. Reopen the new Project (done to read in Project specific information not available while creating it).
  12. Click on the 'Files' tab in the 'File Explorer' notebook (left hand side of the screen).
  13. Notice that there is only one schematic page called 'power' (this is created by default)
  14. We will not require this default page so remove it, left click on it to highlight it then 'Project>Remove File from Project'
  15. You will be asked in a dialog box if you really want to remove it, click on the 'OK' button.
  16. This brings up another dialog box but as we do not wish to rebuild the new Project yet click on the 'Cancel' button.
  17. Now we need two files the same as those in 'Sample2', if you have forgotten them then open side4linux in another workspace for reference.
  18. Click on 'File>New File' and select 'New Schematic File'.
  19. In the dialog box remove 'Untitled' and put in 'Serial1' without the quote marks and click the 'OK' button.
  20. Click on 'Open-SCH' on the Toolbar of the IDE and have a look at the new blank file 'Serial1'.
  21. In the bottom right hand corner is the title as 'Serial1 ver.0.0.1(c) 2006 ?? Part of the Try1 Project.'
  22. Close gEDA and add the new schematic file to the Project, 'Project>Add File to Project'.
  23. In the dialog box that opens left click on 'Serial1.sch' to highlight it then click on the 'Add' button
  24. This time click the 'OK' button to rebuild the Project.
  25. Check that 'Serial1' now appears in the 'Files' tab of the File Explorer and close the Project.
  26. Open 'nautilus' and copy the file 'Serial1_connectors.sch' to the 'src' directory of the 'Try1' Project.
  27. Reopen the 'Try1' Project and add the 'Serial1_connectors.sch' file to the Project and accept rebuild of the Project.
  28. At this point click on the 'Files' tab in the 'File Explorer' and view the two pages in the Project.
  29. Place the mouse cursor on 'Serial1_connectors' in the File Explorer and while holding down the left mouse button drag the page below 'Serial1'.
  30. This puts the files in the right order with 'Serial1' first so components will start at 101 on this page and 201 on the next.
  31. Now rebuild the Project, 'Project>Rebuild Project from Tree.
  32. Try opening each file one at a time with 'Open-SCH' to ensure all is well.
  33. Close the Project.
  34. Close the IDE.

Practical 2: Place components into the 'Serial1' schematic,

In this Practical we will add the components and the wires/buses needed to match the printout of 'Serial1.sch' that we printed earlier from the 'Sample2' Project. Make note here that you can open this project in another copy of side4linux at any time, preferably in another workspace but do try not to alter 'Sample2' by mistake! The Serial1 board that we are making will provide the CPU with an RS232C serial communications interface, one output port (DTE) and one input port (DCE) if you are not sure about RS232C then look HERE.
  1. Open the 'Try1' Project in a fresh invocation of the  side4linux IDE and click on 'Open-SCH' in the Toolbar of the IDE.
  2. Open the page 'serial1.sch' in gEDA, close the 'Opening Status' window, maximise the main window and zoom extents .
  3. We are going to add two components an MC1488 serial bus line driver and an MC1489 serial bus line receiver.
  4. Click on 'Add Component' on the gEDA Taskbar (looks like a two input logic AND gate!).
  5. In the left hand column of the 'Select Component' dialog highlight 'Interface' with a left click and then in the right hand box '1488.sym'
  6. Click on 'Apply' and moving the green component decal about where it is on your 'Sample2' printout left click once to place the component.
  7. Now press the escape key to disengage the selection (you could left click to place more before clicking escape but one will do!).
  8. Place the mouse cursor over the component and left click once to turn it red (selected).
  9. Now once selected hold down the left mouse button over the decal and drag it to the correct spot.
  10. Left click in clear space on the main window to turn the decal back to green (de-selected).
  11. Do the same to place a MC1489 component into the schematic page as in your 'Sample2' printout.
  12. Notice that the component ID is U?? We will 'renumber' the components later.
  13. Now close gEDA, close the Project and close the IDE. It is time for my caffeine break!
Component Selection
Selection of Component from gEDA component library.


Practical 3: 'Wire up' the components in the 'Serial1' schematic,

In this Practical we will add connections to the component 'pins' with 'nets' (also known as 'wires' or just 'connections') .
  1. Open the 'Try1' Project in a fresh invocation of the  side4linux IDE and click on 'Open-SCH' in the Toolbar of the IDE.
  2. Open the page 'serial1.sch' in gEDA, close the 'Opening Status' window, maximise the main window and zoom extents .
  3. Add the buses shown by firstly left clicking on 'Add Buses mode' on the gEDA Toolbar.
  4. Use your printout as a guide (the buses are the thick lines).
  5. Note that buses and off page connectors have no electrical significance, they are just a visual guide!
  6. Buses are really just piping or conduit which keeps wiring layouts neat.
  7. Buses are added by left clicking at the start and right clicking at the end while in 'Add Buses' mode.
  8. After you have laid out your buses click on 'Select mode' on the gEDA Toolbar and add the Off page Connector 'intepage_bidir'.
  9. To do this click on 'Add component' on the Taskbar and select from the 'Connection' parts library, place with left click then right click.
  10. Place mouse over the new part and type 'er' in lower case to rotate then hold down the left mouse button and drag into place.
  11. Left click on the new component to select it (colour green goes to red) and then double left click to bring up the 'Properties' editor.
  12. Left click on 'pages' and then right click, select 'delete' by a left click. This will remove the 'pages' property from the main window.
  13. Now add the name to the connector by clicking on the down arrow of the combo box and selecting 'description'.
  14. Type 'Serial' into the 'value' box, set up for 'Show Value Only' and click the 'Add' button as seen below,
Edit Component Attributes
Adding an 'attribute' to a component.

Now left click until only the 'Serial' label in the main window is red (selected) and drag it into the connector itself, the same as on your printout.

So far we have not actually wired up the component, we will now start this process.
  1. Zoom up the area around the MC1488 pins 2,4 & 5 so that it includes the left arm of our bus.
  2. Click on 'Add nets mode' in the gEDA Toolbar and left click on the little red dot on the end of pin2 and left click on the bus to the left.
  3. Right click to end. The connection on the bus points down this is OK but if you want it to point up then hold the mouse pointer over the connection.
  4. Left click on 'Select mode' on the Toolbar to end adding new nets.
  5. Left click on it to select it (turns red) then rotate the connection by typing in 'er' (edit rotate) until it reconnects in the up position.
  6. Notice that you use the mouse cursor to define the axis of rotation (use Edit>Undo to fix mistakes).
  7. Now to add the all important 'net name' which is the actual electrical connection. Select the straight blue part of the net wire by left clicking on it.
  8. When selected (turns red) double left click on it to bring up the 'Edit Attributes' dialog and add the net 'DTR-IN' as in the next graphic,
Name a Net
Naming the Net using the 'Edit Attributes' dialog box

Now left click until you have just the new net name 'DTR-IN' selected and drag it into place as per your printout.

Take note that all net wires do not need this naming if they are connected to a net that is named already. The new net takes on the name of the previously named net. To see this draw in and name the net connecting pin 4 of the MC1488 to the bus as 'RX-1'. Now draw in the connection from pin 5 to this net as per your printout and you will see a small red dot at the connection to net 'RX-1' as per the next graphic,

Connect to existing Net
Connecting a new Net to an existing Named Net

From this and a re-read of the 'Overview' that you read earlier you should now be able to complete and print out the schematic and compare it with the original. Do not forget to 'save' the drawing 'File>Save' as you complete the schematic and use 'Edit>Undo' to backup from errors.



Practical 4: Add 'footprints' to the components in the 'Serial1' schematic,

In this Practical we will add the component footprint that the pcb program 'pcb' will need for your new board's pads or pin holes.
  1. Highlight the MC1488 component in 'Select mode ' (red) and double click on it to bring up the 'Edit Attributes' dialog box.
  2. Now add a footprint by clicking on the 'Name' combo box down arrow and selecting 'footprint', type in the Value 'SO14' (small outline 14 pad surface mount).
  3. Do the same for the MC1489 component as well, selecting and dragging the footprints into place as per your original printout.
  4. Bring up the other schematic page in the Project and see how the 'netnames' have at least one beginning at a pin in one sheet and an end either on this sheet or the other sheet.
  5. Obviously all pins of the components must be connected either to a 'net' or to the special 'net' of 'NC' (not connected symbol) see pin 62 AREF on cpu.sch, Sample1.
  6. Expect DRC errors if there are interconnected nets (short circuits) or non-connected nets (open circuits).
  7. That completes the schematic requirements for this serial interface board so in the next practical we will begin to produce the pcb.

Adding a  Footprint to a component
Adding a Footprint to a Component


Practical 5: Prepare the Netlist and Layout files for the 'Serial1' Printed Circuit Board,

In this Practical we will renumber the components in the Project, run the DRC (schematic design rules check) and convert the gEDA's schematic file into the 'pcb' program's 'netlist' and 'layout' files. Refer to the 'Overview' if you get lost at some point in these Exercises!
  1. Close gEDA if still open and and ensure that the 'serial1' page is above the 'serial1_connectors' page in the 'Files' tab of the File Explorer.
  2. Click on the 'Renumber' Toolbar button in the IDE and observe the output in the IDE's Output window.
  3. It should read that it has processed both pages without error (you can open another IDE and run 'Sample2' in parallel for a comparison).
  4. Click on 'DRC' and check the output, there should be no errors or warnings found.
  5. Click on 'Sch->PCB' to make the conversion. An 'Xterm' window will open and should close by itself before five minutes is up, if not then close it yourself.
  6. If there are errors they are likely to be footprint errors so check the printout of your schematics against those of 'Sample2'.
  7. Once successful you can close the Project and the IDE as it is the end of Demo-1!


In Demo-2 we will Layout the Printed Circuit Board and create the Gerber files for the 'Try1' Project PCB.



We will provide other demos as 'side4linux' develops to cover integration into a real world machine controller.