Breadboards, circuits and PCBs
Designing a circuit to interface to a Raspberry Pi or Arduino? Then grab a copy of the open source Fritzing package. Mike Bedford is your guide.
Are you designing a circuit to interface to a Raspberry Pi or Arduino? Then grab a copy of the open source Fritzing package. Mike Bedford is your guide.
Building an electronic circuit – perhaps for interfacing external devices to a single board computer like a Raspberry Pi or Arduino – is commonly carried out on a breadboard. This might be as far as you need to go, but if you’re building the circuit as part of a practical project, then breadboarding is just the start. It really needs to be rebuilt in some other form for use in a real-world project. Alternative methods of electronic construction involve either using a stripboard if you’re only going to build a single circuit, or a printed circuit board (PCB) if you either need to build several or if you want to publish your design for others to build.
Fritzing is an electronic CAD package that was designed for electronics enthusiasts and the maker community. It provides three different views of a circuit – breadboard or stripboard design, the schematic, and the PCB layout – and enables you to switch between them. What’s more, making changes in one view results in those changes also being reflected in the other views.
Mostly free
Fritzing is unusual in that, even though it’s open source, the executable code can no longer be downloaded freely from the Fritzing website (www.fritzing.org). Instead, you can only download it (for Windows, Mac or Linux) if you support the project by making a contribution of at least 8 Euro. If this goes against the grain, you can compile the source code yourself from Github or, if you don’t feel confident to do that, you might find it in your repository. We were able to install it from the Ubuntu 20.04 LTS repository, but only a beta version.
It seems that the most common way in which Fritzing is used – and the intention of its designers at the University of Applied Sciences in Postdam, Germany – is to enter the circuit as an arrangement of components on a previously built and proven breadboard design, and then convert it to a schematic and/or a PCB design. While this is the established method that’s been adopted by the maker community, it’s not the way professional electronics engineers work; starting with a schematic diagram, move on to testing it, modify the schematic after prototyping, and finally generate a PCB design. Both methods are supported by Fritzing, but it’s useful to take a look at the pros and cons of each approach.
For designing simple circuits, starting out with a breadboard design is perfectly workable and, if this is what you’re used to, and you still find it relatively easy to work in this way, then there’s no need to change course yet. However, as your aspirations grow and you find yourself designing ever more complicated circuits, sooner or later you’ll find that starting out by patching up components on a breadboard isn’t easy. This is because the layout of a physical circuit – whether that’s on a breadboard, stripboard or PCB – doesn’t necessarily follow the logical flow of signals.
A schematic, on the other hand, so long as it’s been well planned out, is able to do exactly that. And so,
starting out with a schematic is highly recommended for circuits that could be considered at least moderately complicated.
Breakout the breadboard
Fritzing starts up with the Welcome View and, after you’ve perused the information here, click the appropriate tab to select the Breadboard View. You’ll notice that a breadboard is already in place, but if your breadboard is a different size, select it by clicking it and then choose a different size in the Inspector dialog at the bottom right.
Next you need to drag each of your components on to the breadboard from the Core Parts dialog at the top right. As you drag a component onto the breadboard and if its leads line up with one or more holes – indicating that a connection would be made if you dropped the component at that point – the hole will be highlighted in blue.
Note that you can rotate the currently selected component using the Rotate button at the bottom of the screen and, for polarised components such as diodes or tantalum capacitors, you can flip them horizontally using the Flip button. If the component leads aren’t long enough to reach their holes, you can extend them by clicking the end of the lead and dragging it to another position. Also, if the leads are sufficiently long, you can bend them by clicking at the required bend point and dragging. Components like resistors, that have particular values, will have default values when you first drag them onto the screen, but you can change the values in the Inspector dialog.
Once all the components are in place, add the patch leads that are on your physical breadboard. You can add these in the same way as the other components, by dragging the component called ‘wire’ from the Core Parts dialog, but there’s an easier way. Just click one hole on the breadboard and drag to the other hole. When you add it, the patch lead will be in its default colour, but it would be a good idea to make it match the colour on your prototype by selecting a new colour in the Inspector dialog.
Patch leads probably look best curved, and this can be achieved by selecting ‘Curvy wires and legs’ from Edit>Preferences>Breadboard View. Now, using the same operation that we described for bending a wire at a single point, the patch lead can be bent as a continuous curve. Finally, as a utility to help you check out your breadboard layout, note that if you click a hole on the breadboard, every other hole that’s connected will be highlighted in yellow. Beware that the rules that define how connections are shown in the various views are complicated if you swap between the Breadboard and the Schematic View, so it’s best to complete the breadboard design before moving to the schematic.
When you’ve completed your breadboard design, click the appropriate tab to see the Schematic View. Each of the components on your breadboard will appear here, but as their symbols instead of an image of their physical appearance, and the connections between them will appear as dashed lines in various colours. This initial schematic is a so-called rat’s nest for obvious reasons, and to make it into a schematic that looks tidy and is easily understood, each of those lines have to be manually re-routed.
Before doing that you’ll probably also need to move the components around. Components are moved by clicking them and dragging them to their new location. And the lines that represent connections are moved by clicking somewhere on the line and dragging it, usually until the resultant lines have horizontal and vertical
The component symbols in the schematic view are of the American type, for example, a zig-zag line for a resistor instead of the rectangle as used in Europe and most other places. If this is a problem, you could create new versions of the affected components which differ only in their symbols.