Creating the vector graphic for the schematic view is much easier than for the breadboard. We don’t have to measure anything, because in the schematic, the breakout board will be just a single block with four inputs. To make things even easier, I suggest exporting existing Fritzing schematic and then editing that to suit your needs. To export part SVG graphic out of Fritzing, open the breadboard view, add some component (e.g. the Triple Axis Accelerometer from the Core parts), then open it in the parts editor by right-clicking and selecting “Edit (new parts editor)”. Another window will pop up; this is the parts editor. We will use it later on, when we combine all the graphics into a Fritzing part. For now, just go to the “File” menu and select “Export” → “as Image” → “SVG”. Open the SVG file in Inkscape.
Figure 17. The exported schematic
Now we need to add a new rectangle grid with 0.1 in spacing. This is because the schematic view graphics should be done in multiples of 0.1 in. For example, the leads are 0.2 in. long and their pitch is 0.1 in.
Figure 18. Preparing the schematic
The graphics exported out of Fritzing are grouped together, usually more than once, so just select everything and press “Ungroup” (Ctrl+Shift+G) until nothing is grouped anymore. Then, just edit the text, delete two of the leads and rename the others to match the breakout board. Group everything back together, save it as an SVG file, and we’re done with the schematic view!
Figure 19. Finished schematic
And here are the schematics for the other two sensors. Again, the process is the same with the exception of a different number of pins.
Figure 20. Schematic for BH1745NUC
Figure 21. Schematic for BD7411G
I have to say, I’m not a huge fan of Fritzing when it comes to drawing PCB layouts. Maybe it’s only because of being used to Eagle so much, but I will admit that Fritzing has its simplistic charm, especially for beginners. I can see myself designing a small, single-sided PCB in Fritzing, but not something more complex with two (or more) copper layers. That being said, the PCB view is an integral part of the environment, and if we want to be sure our new part will work correctly, we have to create a graphic for this view as well.
Just as with the schematic, the easiest way to start is to export an existing PCB graphic from Fritzing and edit that. I exported the 3-axis accelerometer part again from the PCB view of the parts editor. There’s a slight catch: when you open the exported file in Inkscape, you will only see the copper pads. That’s because in the SVG file, all the silkscreen shapes and text is white, even though it is displayed black in Fritzing. Inkscape allows you to change the document background color, so open the “Document Properties” window once again, and in the top section of the “Page” tab, change the background color to black.
Figure 22. The exported PCB graphic
Just as with the schematic, everything is grouped together. So, use the “Ungroup” command a few times until you can select all the white silkscreen shapes individually. Change the outline to be as big as the breakout board: 20.0 mm x 20.0 mm and resize the page to match it. Then, delete the silkscreen shapes we don’t need – the arrows and the chip outline in the middle. Our breakout board has only 4 pins, so we will change the silkscreen outline of the connector to match that as well. Finally, regroup the connector outline so we can move it easily and change its position so that it matches the real board.
Figure 23. PCB graphic after changing the silkscreen
Now we need to update the position of the copper pads. After exporting the PCB graphics from Fritzing, there are actually two sets of six copper pads stacked on top of each other, i.e. one for the top side and the other one for the bottom side. Move one of the copper pad groups away from the other, then ungroup it and delete the two pads we don’t need and regroup the other four. Then, align them to the center of the connector outline. Repeat the process with the second group of copper pads.
Figure 24. Finished PCB graphic
The last step is to change the structure of the SVG file so that it’s up to the Fritzing standard. SVG file is basically an XML (eXtensible Markup Language) file, so you can edit it directly in any text editor. However, it is much more convenient to use the editor that is built-in into Inkscape. Open it in the menu “Edit” by clicking “XML Editor” (Ctrl+Shift+X).
Figure 25. Inkscape XML editor
When you select one of the XML nodes, it will also select the appropriate objects in the main Inkscape window, so that you can easily identify which XML node corresponds to a given SVG object. We will need to add three new XML nodes, so select the root node (the top one, called “<svg:svg id=”svg2”>) and press the button on the leftmost edge in the top bar (“New element node”). You will be prompted to enter the node name, so type in “svg:g” without the quotation marks. This will create a new group node; we need to change its ID from the default value to “silkscreen”.
Figure 26. The new “silkscreen” node
Now, create two more group nodes with IDs “copper0” and “copper1”. Move all the nodes that contain silkscreen objects and the outline into the “silkscreen” node. Then, move the one of the groups of copper pads into node “copper0” and the entire node “copper0” into node “copper1”. Lastly, move the second group of copper pads into node “copper1”. You can see the final XML structure in the following picture.
Figure 27. The final XML structure
And here are the schematics for the other two sensors. Again, the process is the same with the exception of a different number of pins.
Figure 28. PCB footprint for BH1745NUC
Figure 29. PCB footprint for BD7411G
That’s it! We have prepared graphics for all three Fritzing views, so the only thing left now is to integrate them all into a brand new Fritzing part!