Creating a Stacked PCB Design in Fritzing

by Team Nebula - CanSat 2021-22 in Circuits > Electronics

1014 Views, 1 Favorites, 0 Comments

Creating a Stacked PCB Design in Fritzing

cansatpcbs.PNG
maxresdefault.jpg
243639528_886435058644242_7226726736627480498_n.jpg

Hey there! We are Team Nebula, competing in the UK's CanSat competition for 2022. We wanted to share with you our process for designing a set of stacked PCBs in Fritzing software.

Stacked PCBs are where multiple PCBs are vertically connected to each other, allowing you to make more efficient use of the limited space you may be provided by a project, by expanding your electrical connections into the third dimension. For us, we need to stuff all our electronics into the size of a drinks can, hence we do not have the liberty to connect all our sensors and mechanisms onto a single, flat, wide surface.

This article is sponsored by JLCPCB, who have kindly offered to speedily manufacture our PCBs for free. JLCPCB is one of the most popular leading PCB manufacturers in the world, and they are passionate about inspiring and encouraging young engineers and students, to help turn their ideas and creativity into reality.

The CanSat competition is one where teams of students aim to build a functioning satellite that fits in the size of a drinks can. The drinks can is launched into the sky, either by drone, rocket or weather balloon, and it performs experiments on descent. All teams complete one primary mission, which is to analyse environmental data, and one secondary mission of the team's own devising. We have decided to attempt to perform an autonomous landing of our satellite, by steering a parafoil with the aid of servos and a motor.

Supplies

Fritzing_logo_(new).png
homeOrderFace.e14e56ed.png
shutterstock_1016913463.jpg
85-05.jpg
16_Pin_Header.jpg
6_Pin_Female_Header.jpg

What We Are Using:



CAD Software:

Fritzing - The software we are using to design the PCB. Recommended for beginners/intermediate designers, this software is not as advanced as EasyEDA, EAGLE, KiCad, etc. but is still very powerful.


Manufacturing:

jlcpcb.com - An incredible PCB supplier and manufacturer, providing affordable prices and quality PCBs.

A Soldering Kit - We will be soldering all our components to the PCB by hand

Circuit Parts - there is an option for JLCPCB to source the parts and solder them onto your circuit board, but we will not be choosing this for the sake of simplicity (and also for the satisfaction of soldering a circuit by hand). This option typically makes the order cost more.

Headers - these can either be male (they have pins) or female (they have holes which accept the pins). Stacked headers are special long headers that are a combination of male and female headers, that allow us to plug the PCBs on top of one another, hence allowing electronic signals to travel vertically up/down a stack. You can buy these cheaply off eBay - Stacked headers, Headers.


Other tools:

Your Hands

GRIT - Guts, Resilience, Initiative, Tenacity

and last but not least

A Burning Desire to create something WONDERFUL

Plan Your Layout

cansatpartsinstructable.PNG

You need to think about what components your circuit will use, and then sort your circuit into different sections according to the type of component. This will help you decide which components go on which layers.

For example, you may have the some or all of the following:

Microcontroller (MCU) layer - a layer dedicated to just the microcontroller, as it takes up a lot of space by itself. It essentially acts as a breakout board, i.e. each pin on the MCU is connected to a hole, and the pins are connected to the layers above/below via these holes. In our project, we will be using the Raspberry Pi Pico, a 3V3 device that can be powered using up to 5.5V.

Actuator layer - high-power components, such as servos and motors, will consume a lot of current. These cannot be powered directly from the MCU, as the voltage provided would not be high enough (the Pico only supplies up to 3.3 Volts) and the high current draw can damage the MCU. Ideally you would power these components with a different power supply, then connect them both to the same "ground", to prevent interference to the MCU's power supply. For our project, we are choosing instead to use two separate voltage regulators, one for the Pico and another for the actuators.

Sensors layer - Modules that run off 3V3 may be powered directly by the Pi Pico's output. There is only space for an accelerometer/gyroscope module and a radio transmitter on this layer.

However, we also have to consider external electrical connections. Our Can will use servos, which are required to be located near the top of our Can. Hence, the "actuator layer" will have to be the topmost layer. Not just this, but our SD card reader module, temperature/pressure sensor and GPS will fit on this layer too, each with their own reasons; the SD reader would be in an easily accessible place, the temperature/pressure sensor has to be kept near the outside of the Can (so can be connected to the PCB inside the can via wires) and the GPS will be connected to an external antenna. Our radio module on the "sensor layer" is positioned in such a way that the antenna connection faces away from the PCB.

Drag, Drop and Connect Components

cansatradiopcb.PNG

There are two ways of going about this - either you drag and drop your components in the breadboard editor, wire them up, and then switch to the PCB editor to connect the components which are already loaded, or you can skip straight to using the PCB editor. The advantage of the first method is that it provides a "ratsnest" in the PCB editor, i.e. it shows you all the connections according to how you wired the circuit up in the breadboard editor, and then allows you to quickly replace the ratsnest with copper traces using the "autoroute" feature.

Because we are designing a stacked PCB layout, we will need multiple PCBs in the PCB editor, which you can do by copying and pasting the original PCB that is provided. We will be designing all layers in the same Fritzing file for convenience.

Then it's a case of placing the desired components on each layer and routing the layers accordingly. Fritzing lets you use up to two layers of electrical connections. This means that copper paths on two different layers may intersect without interfering with each other, making design more convenient and saving space.

Make sure to double-check your pinouts and connections once you are done with your design. Fritzing also has a "Design Rule Check (DRC)" tool that allows you identify any problems with your PCB, e.g. overlapping electrical connections, short-circuits, etc.

Ground Fill and Copper Fill

fritzingcopperfillinstructables.png

Fritzing has a list of options under Routing > Ground Fill. A ground fill is essentially when you cover a large area of the PCB with copper, except for areas around existing traces, and connect this area to ground. This prevents signals in neighbouring copper traces from interfering with each other, as well as to make connecting components to ground easier. These may be useful to prevent "noise" or unwanted disturbances in signals, as well as acting as a heatsink. For more information about why a ground fill is useful, you may want to read this article.

Not all ground pins will be connected to the ground fill - you are free to decide which ones will. To select which pins get connected to the ground fill, right click each of the desired pins and choose Set Ground Fill Seed. To reset all ground fill seeds, right click any existing one and then select Clear Ground Fill Seeds. You can then go to Routing > Ground Fill > Ground Fill (top and bottom) to apply the ground fill to one PCB at a time (select the PCB first). For a top layer ground fill only, at the options bar at the bottom of the screen, switch view from "Both Layers" to "Top Layer" (or bottom for bottom layer only) and then perform the Ground Fill.

A copper fill is the same as a ground fill, except it is not connected to ground, so this cannot be used as a shortcut for grounding a component.

Export and Order PCBs

exportinstructables.PNG
jlcpcbinstructables.PNG
file-j6bow9rvdc.png
file-1QbscCDfcS.png

Once you are ready, triple-checked your connections and have had a successful Design Rule Check for each PCB, you can export each PCB as a set of Gerber files using the "Export for PCB" option. Note that you can only export one PCB at a time. Export the files into a single folder for each PCB - you can then compress these folders into .zip files (one .zip per PCB), and then upload them onto JLCPCB. Their website offers a very helpful "Gerber Viewer" which allows you to see what you PCB will look like after it has been manufactured. From then on, choosing manufacturing options and finally ordering your PCBs is a very self-explanatory process.

Soldering and Assembling

From then on, all that is left is waiting for your PCBs to arrive, then soldering the necessary components and headers onto your PCB. For advice on how to solder well, check out this article.

By the end, you should have a set of PCBs that can be stacked onto one another via headers.

Conclusion

ef4df640b7c9448b8642cb26536a052b.jpg

PCB design is rarely a simple process, however, once it is complete, it can feel incredibly rewarding to finally obtain the manufactured product. Do not give up, and do not be afraid to be bold with design changes that you make! If you end up finding out that your manufactured PCB has a design error after all that effort you put into making it, then do not be discouraged - think of it as a way of improving and learning how to make better designs in the future.

We would like to once again thank JLCPCB for sponsoring our CanSat team. If you are a student working on a PCB project, and you would also like to be sponsored by JLCPCB, check out their website's page on sponsorship to find out how.

You can also follow our competition progress at our website on teamnebula.tech, and on Instagram as @nebula_cansat.

Good luck with your PCB designing journey, and we hope that we have helped you with it in some way or another!