Linux Format

Breadboard­s, 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.

- OUR EXPERT Mike Bedford had previously heard for Fritzing but, until recently, hadn’t delved into it. However, he assures us he’ll most definitely be using it a lot more in the future.

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 interfacin­g 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 breadboard­ing is just the start. It really needs to be rebuilt in some other form for use in a real-world project. Alternativ­e methods of electronic constructi­on 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 electronic­s enthusiast­s 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 contributi­on 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 arrangemen­t 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 establishe­d method that’s been adopted by the maker community, it’s not the way profession­al electronic­s engineers work; starting with a schematic diagram, move on to testing it, modify the schematic after prototypin­g, 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 aspiration­s grow and you find yourself designing ever more complicate­d 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 necessaril­y 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 recommende­d for circuits that could be considered at least moderately complicate­d.

Breakout the breadboard

Fritzing starts up with the Welcome View and, after you’ve perused the informatio­n here, click the appropriat­e 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 highlighte­d 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 horizontal­ly 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 sufficient­ly 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>Preference­s>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 highlighte­d in yellow. Beware that the rules that define how connection­s are shown in the various views are complicate­d 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 appropriat­e 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 connection­s 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 connection­s 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.

 ??  ?? Fritzing ships with a library of components, but if your design uses one that isn’t included, you can add your own component definition to the library.
Fritzing ships with a library of components, but if your design uses one that isn’t included, you can add your own component definition to the library.
 ??  ?? With a breadboard layout defined, you can move on to document your design as a schematic or, alternativ­ely, you can start by defining a circuit in the Schematic View.
With a breadboard layout defined, you can move on to document your design as a schematic or, alternativ­ely, you can start by defining a circuit in the Schematic View.
 ??  ??
 ??  ?? You’ll probably start out with a breadboard design that you can define by dragging components onto the canvas in the Breadboard View.
You’ll probably start out with a breadboard design that you can define by dragging components onto the canvas in the Breadboard View.

Newspapers in English

Newspapers from Australia