In this chapter of the Zero2Maker workshop, we'll be exploring different methods to assemble our electronics, why some methods might be suited to your project more than others, and we'll walk through a couple of examples together. If you're new to this workshop, Jarrod and myself will be taking you on a fast-paced and practical journey to learn a wide variety of maker skills, so that you have the tools and knowledge to make anything. Follow along as we develop our own projects and share insights into the process.
In previous chapters, we looked at different electrical components, microcontrollers, inputs, and outputs, but how do we package these together in a neat and considered way to complete our project? To do this, we need to integrate each component into a circuit, and we'll be investigating three options for doing exactly that: Breadboards, protoboards, and printed circuit boards, or PCBs.
We used breadboards in previous chapters along with jumper wires. This combo allows us to freely make and remove connections or components from our circuit super easily. Protoboards offer a more permanent solution. To use them, plan where each of the wires and components need to go, then solder them to a prototyping-oriented jack-of-all-trades board. And a PCB has its designed wires into the board, making it the most permanent and custom of the three. Often used in commercial products, but you can design them from home and have them delivered in small quantities quite cheaply. We'll walk through designing PCBs in the next chapter.
Each option has their pros and cons, but not all projects are the same and will probably suit one assembly style more than the others. I'll use all three electronic methods to make a node in my project. If you haven't been following, I'm making plant pulse, a system to monitor and automatically water a plot of plants. But what does the node include? In the chapter on inputs, I introduced my microcontroller, an ESP32, the sensors, a soil moisture sensor, and our PiicoDev atmospheric sensor, or any I2C device for that matter. And I'll be adding a new one, a power timer, so that we can properly battery power our project.
No matter which assembly method you go with, we'll need a plan of how each component connects. In electronics, this is called a schematic. So let's get started by drawing out all of our components and their connections. We'll get started with the microcontroller. We'll add the power connections from the get-go. We've got three volts and ground, and we'll use some schematic symbols here. So we've got ground and three volts. First up, we've got our atmospheric sensor. Here we've got three volts, ground, SDA, and SCL coming from the PiicoDev connector. I've researched our microcontroller I2C pins already. We'll use pin 8 for data and pin 9 for clock. Great, that's our atmospheric sensor wired up. Next up, we'll have a look at the soil moisture sensor. Here's the soil moisture sensor. This has ground, voltage, and analog out connections. We'll call that VGA out. We need to connect 3.3 volts, ground, and our analog output should be connected to pin 0 of our microcontroller. The power connections here in our soil moisture sensor mean to connect that back to the microcontroller's power outputs. And finally, the power timer. We could use a 5-volt input on the ASP32, but that isn't the best. So we need to solder to dedicated battery pads underneath the ASP32. And I'll call those plus and minus. I'll group those nicely there. These need to connect to the plus and minus out pins on the power timer. And to let us know that it should go into a low battery state, we need to add the done pin. And we'll connect that to pin 44 of the ASP32. Connected to our power timer, we'll also have a battery. These are the input pins here and we'll be connecting a LiPo battery. That's our schematic done. We've got each of the components connected and powered by our microcontroller. With our schematic here, I'm going to keep this handy as I build each of our circuits.
Let's start by building our schematic on a breadboard. Breadboards provide a quick and easy way to build and modify circuits without soldering. Ideal for temporary setups. And they come in many different configurations: tiny, full-size, half-size, and these massive ones. And so many more different form factors. The inside section of the breadboard is in groups of five, allowing for easy component and wire placement. And the power buses on the outside allow for efficient power distribution. If you want to learn more about breadboards, head to the link below where Jared goes in depth in the Pico Workshop.
There's a couple of options when connecting your circuit. We can use jumper wires or these pre-bent and cut solid core wires. Or even off a spool if you want to keep your projects tidy. Let's see why we may or may not want to use breadboards. So once we know where a connection needs to go, it's very fast and easy to connect. All you need to do is place your component in and then the wires. If you make a mistake, no worries. It's easy to fix the connections. They aren't permanent. They're a maker staple. If you've done electronics, you probably have more than one kicking around your workshop. For the number of times you will use them, it's worth investing in a decent breadboard. But of course, each method comes with its cons. If you're making a robot that jolts around a lot, components and wires can fall out. Breadboards aren't great for moving projects. And jumper wires can look unsightly. Lots of connections start to look like a rat's nest. You could of course learn the art of bending each wire into place, but not all of us have the patience and skill to do that for every project. And testing our circuit with a multimeter or other test instruments are a lot harder because of the plastic grid on top. And these spring-loaded connections are only usually good for a few amps and don't pass high-frequency signals very well. So breadboards. Great for prototyping on quick projects that won't move. But onto the second example: Protoboards. And they also come in a few styles. Some that look like breadboards, but instead of the spring-loaded connections, were met with solderable pads, called tie points. The breadboard style has bridges across a few pins. We can test it out with this multimeter in continuity mode. There are individual tie-point protoboards where each pad isn't connected to anything else. And there's even protoboards to match microcontrollers or ecosystems. These suit the Raspberry Pi Pico and Raspberry Pi single-board computer. And here we've got a PiicoDev protoboard. Lots of different styles in different configurations. And one will probably suit your project. Regardless, you'll have to use a soldering iron to connect everything much more permanently. We have a guide dedicated to soldering down in the description below.
But why are protoboards good? Protoboards are still pretty quick to assemble. I've given myself about an hour to make this board and test it. The connections are much more reliable and strong compared to a breadboard, depending on your soldering. They're cheap and very easy to keep a bunch on hand. With these connections, we can pass more current and depending on the layout, there's capability for some higher frequency signals. And it's easy to pull out a multimeter and test around your protoboard to make sure you've got good connections. But there are cons, meaning a soldering iron to make the connections and safety gear to make sure we don't get hurt, like safety glasses, a fume extractor and a soldering mat. Once we make a project, the boarding components are unrecoverable. De-soldering at its best is annoying, and at its worst, it can take ages to remove a component, only to realize that it's now ruined. For more expensive parts, we can use headers and sockets to make sure that we can plug and unplug our devices. Each solder connection takes time, so this process can take hours for more complex projects. And depending on how you wire everything together, they still won't always be the cleanest. I've gone the extra mile here with solid core wire to make it super clean. That's protoboards. A bit of a step up from breadboards, but perfect for projects that rattle around.
And finally, printed circuit boards, or PCBs. These are great for when you're confident with your design and want to wrap everything up in a neat package. We get to take full control here, from the size and shape of the components we use, the shape of the board, and we even get to embed the wires. If all goes well during the design, we get a super clean and robust final project. You can even use surface mount components to get the smallest form factor possible. We don't have to wire any of the components together, just solder them on the PCB and away we go. Once we design the PCB, we can easily order more. If your project calls for hundreds, it's very easy just to click reorder. If we spend a bit more, we can even get the components placed and pre-soldered onto the PCB, saving us a little more time. And that's exactly what I did here on my robotics project. Each of these little components in here were assembled by the factory. We can even pick the colour of our boards. Don't like generic green? Make it red or purple.
For the drawbacks, PCBs share the same problems of protoboards. We might need additional soldering tools, so we might want to grab an SMT hotplate. And desoldering can still be very annoying. Learning how to use this software isn't difficult, but it's another thing we have to learn during our project. But it's a forever skill, so add it to your LinkedIn. For more complex projects, a lot of time goes into designing and verifying it will work. Think about how long went into designing the Raspberry Pi. And mistakes after we've got the PCBs manufactured can be hard to impossible to fix, and sometimes require another revision to be sent off for production. As soon as it's shipped, it's set in stone. PCBs are great for the final revision of your project, or when you just want to make everything look a little bit more professional.
So that's the three main ways we can assemble our electronics. Depending on your project, you might even want to try a couple. In the next chapter, we'll design a PCB for the node, walking through the design software, and some of the decisions we have to make when designing a PCB. Stay tuned for the next chapter. Thanks for watching.
Makers love reviews as much as you do, please follow this link to review the products you have purchased.