Circuit board design to finished product: hobbyist’s guide to hardware manufacturing
This is a modal window.
Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.
Formale Metadaten
Titel |
| |
Serientitel | ||
Anzahl der Teile | 112 | |
Autor | ||
Lizenz | CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 4.0 International: Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben. | |
Identifikatoren | 10.5446/60777 (DOI) | |
Herausgeber | ||
Erscheinungsjahr | ||
Sprache |
Inhaltliche Metadaten
Fachgebiet | ||
Genre | ||
Abstract |
|
EuroPython 202212 / 112
5
10
14
17
19
23
25
29
31
32
34
44
47
51
53
54
57
61
69
70
82
83
88
93
94
97
101
105
106
00:00
Elektronischer ProgrammführerProdukt <Mathematik>HardwareNP-hartes ProblemGoogolVorzeichen <Mathematik>Atomarität <Informatik>SummierbarkeitEDV-BeratungPerspektiveMetropolitan area networkBitZusammenhängender GraphTermInformationMAPSpeichermodellPunktSystemaufrufCOMComputeranimation
01:27
Gerichtete MengeGamecontrollerZusammenhängender GraphTextur-MappingMikrocontroller
02:04
SoftwaretestPrototypingCodeEinfach zusammenhängender RaumCASE <Informatik>MikrocontrollerTypentheorieMultiplikationsoperatorComputeranimation
03:03
MAPDatensichtgerätAnalogieschlussQuaderCoxeter-GruppeDemo <Programm>Ein-AusgabeMinimum
03:52
Produkt <Mathematik>NP-hartes ProblemPermanenteEinfache GenauigkeitZusammenhängender GraphEinfach zusammenhängender RaumProjektive EbeneComputeranimation
04:35
EinsFormation <Mathematik>SchlüsselverwaltungDifferenteHauptplatineComputerschachMaschinenschreibenSpieltheoriePersönliche IdentifikationsnummerCASE <Informatik>MP3Bimodul
05:16
Zentrische StreckungMultiplikationsoperator
05:46
Zentrische StreckungSchreiben <Datenverarbeitung>Zusammenhängender GraphEinfach zusammenhängender RaumHochdruckMultiplikationsoperatorBitTermKurvenanpassungProdukt <Mathematik>Ordnung <Mathematik>MarketinginformationssystemSmith-DiagrammZweiTouchscreenSerielle SchnittstelleVerdeckungsrechnungRechter WinkelDatenverarbeitungssystem
08:03
Ordnung <Mathematik>ProgrammierumgebungMailing-ListeProgrammierumgebungBitrateZusammenhängender GraphKartesische KoordinatenBimodulEinfach zusammenhängender RaumDiagrammTermZeitrichtungInteraktives FernsehenMikrocontrollerSoftwaretestProfil <Aerodynamik>MereologieComputeranimation
10:36
HochdruckGeradeStochastische MatrixZahlenbereichTreiber <Programm>EntwurfsautomationCodeMinimumKlasse <Mathematik>InstantiierungProtokoll <Datenverarbeitungssystem>Mailing-ListeComputerunterstützte ÜbersetzungSymboltabelleComputeranimation
12:08
Zusammenhängender GraphDiagrammMAPSoftwaretestMathematikTwitter <Softwareplattform>Ordnung <Mathematik>
12:56
SmileyZeitzoneTexteditorTexteditorMikrocontrollerZusammenhängender GraphEinfach zusammenhängender RaumÄhnlichkeitsgeometrieSpieltheorieProgrammierungSoftwareGraphiktablettPunktPersönliche IdentifikationsnummerProgrammbibliothekSymboltabelleZahlenbereichDiagrammGamecontrollerZeitzoneRechenschieberVersionsverwaltungComputerspielMeta-TagMAPComputeranimation
15:46
TexteditorMehrwertnetzKommensurabilitätLie-GruppeLokales MinimumTUNIS <Programm>CASE <Informatik>ProgrammierungZusammenhängender GraphCracker <Computerkriminalität>ComputeranimationProgramm/Quellcode
16:23
ZeitzoneTexteditorUmfangCAN-BusZusammenhängender GraphTexteditorPhysikalismusEinfach zusammenhängender RaumMultiplikationsoperatorComputeranimation
17:11
TaupunktGammafunktionRuhmasseGanze FunktionGraphiktablettMaschinenschreibenComputeranimation
17:53
GEDCOMAtomarität <Informatik>ProgrammierumgebungStreaming <Kommunikationstechnik>Persönliche IdentifikationsnummerMaschinenschreibenComputeranimation
18:18
Inklusion <Mathematik>MaschinenschreibenLeistung <Physik>PunktMultiplikationsoperatorIndexberechnungGeradeMikrocontrollerEreignishorizontComputeranimation
19:39
UmfangElektronische PublikationOrdnung <Mathematik>DateiformatProzess <Informatik>Elektronische PublikationVorzeichen <Mathematik>Zusammenhängender GraphKonfiguration <Informatik>Produkt <Mathematik>Computeranimation
21:02
Zusammenhängender GraphFlächentheorieEinfacher RingProdukt <Mathematik>Computeranimation
21:30
Produkt <Mathematik>TouchscreenRechter WinkelCASE <Informatik>MinimumProgrammierumgebungZusammenhängender GraphDatensichtgerätZahlenbereich
21:58
Einfache GenauigkeitFirmwarePunktFeuchtigkeitTermBridge <Kommunikationstechnik>Patch <Software>Fluss <Mathematik>Prozess <Informatik>DifferenteBitSchar <Mathematik>PlastikkarteDifferenz <Mathematik>Faktor <Algebra>Zusammenhängender GraphGeradeComputerspielSoftwaretestWeb-SeiteExogene VariableKonfiguration <Informatik>UltraschallEinfach zusammenhängender RaumSkriptspracheDienst <Informatik>FormfaktorZentrische StreckungSchreiben <Datenverarbeitung>FirmwareGraphiktablettAbgeschlossene MengeStochastische MatrixFlächentheorieMinkowski-MetrikStellenring
27:13
GraphiktablettSpieltheorieRichtungPrototypingZusammenhängender GraphMultiplikationsoperatorPunktEinfache GenauigkeitMereologieQuaderRechter WinkelKnoten <Statik>Computeranimation
28:16
Dienst <Informatik>QuaderQuellcodeDistributionenraumProdukt <Mathematik>Treiber <Programm>GraphiktablettZusammenhängender GraphMikrocontrollerDienst <Informatik>GamecontrollerMessage-PassingStichprobenumfangComputeranimation
29:48
XML
Transkript: Englisch(automatisch erzeugt)
00:06
Yeah, I'm going to quickly talk about, I guess circuit board design from a hobbyist's perspective. Since we only have 30 minutes, let's get right to it. Yeah, my name is Sebastian Roll, and I run a small consulting company in Norway.
00:22
But on the side, I do a little bit of hardware design together with my friends. It's nothing special, but we like to create small things that we can use in conjunction with Python workshops. So we teach people MicroPython by having them something tangible that they can work with during the workshops.
00:44
So I hope to share a little bit about my experiences. I would call myself an entry level hardware designer. But hopefully there's something together in terms of information. The agenda will be that we'll be looking at how to get the components that you want,
01:04
how to figure out which components you want and how to get them from a distributor. We'll look into PCB design itself, the assembly process, and sometimes it doesn't go as you hope. So that's where the experience points comes in.
01:23
So we definitely learned a lot along the way. So starting out with the topic of how you connect components to the microcontroller. In our case, we used microcontrollers. You see here a very simple device where you have a presence detector, a little buzzer and a tail, which is a temperature sensor.
01:48
These are all connected directly through jumper wires to the microcontroller. So that might be as easy as it gets. It could be useful for some circumstances, but mostly not.
02:02
You'll just end up in trouble. So the next step is to use a breadboard to connect things together. This is great for some types of workshops, some educational purposes. We have tried using that, but it turns out that way too much time is spent on connecting these for the attendees.
02:26
And even worse than that, if something does not work as they want it to work, it's very difficult for them to know if it's a problem with their microcontroller or any of the connections or maybe their code. So we decided we wanted to have something so they could skip the assembly process during the workshops.
02:47
But it does have its use cases. It's very configurable. And if you do make a mistake, like you put the jumper cable wire in the wrong spot, you can always fix that mistake easily.
03:03
So this is one device that we started out with. It's a box with some input devices, like two push buttons there. It has an analog stick, a display in the middle and a microphone below it.
03:22
I used this in presentations to demo, and it was a real nightmare because this is what it looked like on the inside. You have a breadboard, a white breadboard on the left there. It was very difficult if a wire came loose to even spot that it came loose, and trying to get it back in was very difficult.
03:48
So this just wouldn't work long term. So the next step is to try something called a protoboard. So you have on top there a strip, something called a stripboard.
04:01
But the idea there is that you solder the connections together, which leads to a much more robust device. You have more permanent connections. It can be very good if you have one-off projects that you want to make a single one of something. You might not need to go to the PCB to sign them.
04:22
But it can be laborious if you have a lot of components that you want to connect. And it can be hard to undo mistakes as well because you have lots of solder everywhere. Here is one example where we used a protoboard. So this was a music game that we had with touch sensors and some LEDs
04:45
to signal when you're supposed to touch the sensors for different ones, for eight different ones. And you also had some music playing using an MP3 module. And you can see that in this case you have some nice screw terminals that we soldered onto the protoboard.
05:04
The motherboard itself can be connected through some female pins. So in this case we found this to be a nice use case for a protoboard. But when we decided to make this device for workshops, we had to make about ten of these.
05:25
We found out quickly that it takes a lot of time. It took maybe one to two hours to solder these, each one of these. And you end up with kind of some of the same issues that we had with the breadboard.
05:40
It did work much better, but we wanted to see can we go take this even further. So we ended up looking into this PCB thing. Can we design our own PCB, printed circuit board. One advantage of being able to do that is that it works well if you want small scale, if you only want a couple of PCBs.
06:06
They're really cheap to order, so you can get five small PCBs for $2 if you know where to get them. And it's also very easy to scale up to bigger production if you have the design finished up.
06:21
The connections between the components are embedded onto the PCB. We call them traces. You're able to have much denser in terms of components next to each other. You can use smaller components. But it has a slight learning curve. And the second potential issue is that you order this from a supplier, possibly a Chinese supplier.
06:49
It might take you two weeks until you get the PCB in your hands. And that's when you find out you have a mistake in your design. So you have to fix the mistake in your design and order a new one.
07:01
It takes two more weeks, and that's when you find the second mistake in your design. So that's something to be aware of, is to give yourself enough time to get it right. And also, if you're the thorough person, or if you're not the thorough person, to be a little bit thorough when you look at your design before you order it.
07:23
So a PCB consists of a substrate, which is plastic material, I think, which gives it material strength and rigidity. And it has one or more conducting layers in copper. And on each side you have something called a solder mask, which protects the copper layer.
07:45
But it also exposes copper where you need to place your components. And on top of that, again, you have the silk screen, where you can basically print labels, write custom stuff, anything you want, really.
08:06
Yeah, so you want to build yourself a printed circuit board with components. You first need to figure out which components you'd like to have, and then you want to figure out how to use that component. So maybe testing it out on its own is a good idea.
08:22
Then you move on to designing the PCB, and you order and assemble it. So, I guess you can split it into three parts. You have the manufacturers, you have the distributors, and also the aggregators. I interact mostly with the distributors, so I've used LCSC, which is a Chinese distributor.
08:47
I like their prices a lot. If I want to get, if I have more urgent need for my components in terms of shipping, I use Arrow, but you guys are free to use whichever you want. One good thing is that they've recently become much more aware of the hobbyist market segment, so you're
09:06
able to buy one or a few of the components and get decent shipping rates and stuff like that. I would also recommend aggregators like Octopart and Findchips. What you do there is you just search for the component
09:22
that you want and it will give you a list of suppliers that have it available and their respective prices. So that's good to know. Okay, so here we have an environment sensor from Bosch called the BME280. It reads the temperature and the humidity and the air pressure from the environment.
09:44
I found a data sheet, the data sheet for the sensor, and you will, if you look for a connection diagram or a typical application circuit, you will find a schematic of how it's supposed to be set up.
10:01
And to the right here, you can see a sensor module. So basically someone took this BME280 and designed a very small circuit board for you to be able to connect to it through like a breadboard or a protoboard. So that can be handy to get a hold of.
10:22
You connect to it, you make sure it works the way you want it to work, that you understand the device, the component properly, you know how to use it. That's a very good idea. And then a quick shout out to MicroPython since this is a Python conference. I love using MicroPython, it's Python for microcontrollers.
10:45
Here we are using five lines of code to extract the data, the values from the sensor. Yeah, I can quickly note that line number two there where you import BME280, this is the driver
11:06
of the sensor and it's just a Python class. So we're just importing a Python class and instantiating it. Using this I2C, this is a protocol. All this stuff I would just recommend you look up on
11:21
your own. It's actually fairly straightforward to learn. All right, then we move on to designing the PCB itself. You need a so-called EDA tool, electronic design automation tool. So if you want to go like the
11:42
corporate route, the big companies, they spend a lot of money on licenses for these tools and they're very, I bet they're very good, but I haven't had the chance to use them. So I list now three free variants, three tools, which are all good, I think, but the one I've used the most is KiCad at the bottom. So I guess that's where my recommendation goes.
12:08
Now, when you want to design a printed circuit board, there are a couple of steps that you do. The first step is that you draw a schematic, like a symbolic schematic diagram of your PCB.
12:24
And then for each component that you placed in your schematic, you assign a footprint for that component. So basically how it will look like in the physical world. Then you draw the layout of the PCB. So now you're at the stage where you draw a physical two-dimensional layout.
12:47
And then finally, you order the PCB and the components and you assemble and test it and hopefully everything works. Probably not though. Yeah, drawing the schematic looks like this. I can show you quickly, I think. So here I have KiCad open. I'm going to open the schematic editor.
13:12
So this contains the entirety of the gaming pad that I showed you in the previous slide. So maybe the PCB final version of this workshop controller.
13:27
And in the middle here, you will see the connections to the microcontroller. And let's just quickly zoom into the BME280 here. So it looks pretty similar to the datasheet that was provided. You can start
13:47
by placing a symbol and you can search up BME280. It's a popular component. You have libraries of thousands of components. You add that to your diagram
14:01
and then you start placing connections of where it's supposed to go, these guys. So number five should go to ground. Here you can see number four should go to something called I2C-SCK. So that is the clock.
14:21
And this is the data pin. So basically you want the clock and the data pin to go to the microcontroller. So you just add a label and you give that label a name, I2C-SCK. And then on the microcontroller, you give it the same name on pin 27, I2C-SCK.
14:41
So now the program will know that you're supposed to connect these things physically through a trace, using a trace. This is another example of the similarity between the datasheet and what we have in our design software.
15:04
Okay, next we assign component footprints. So footprints are like the landing zone of your component. So it defines, I guess, the physical layout of the connection points for your component.
15:23
So this is what it will look like for the BME280. I don't know how many different sizes this sensor has. But if you're looking at, for example, a capacitor or a resistor, they have multiple different sizes for the same value.
15:40
So you need to specify the footprint for those as well. Now, how we do that in our program is tools and assigned footprints. So we are looking at U2 here. That's what we gave the label for that sensor.
16:02
And we see that all of the components here have a footprint. And going down to U2, yeah, some Bosch footprint that is correct in this case. And they are also downloadable into your program. And you can also create custom footprints if you'd like to do that or if you have to do that.
16:27
Okay, now, when you've done doing that, then you basically have a set of components that you have decided on and also what the component looks like physically.
16:43
Now, you go to a layout editor, and you import these components and they will all be clustered in the middle, and you have to move them out to where you want them to be on your PCB. And all of the connections that you specified in your schematic diagram, you will have to
17:02
actually draw a trace manually from where it's supposed to be to where it's supposed to go. So let's quickly try to open that as well. We go to the PCB editor. Yeah. And
17:23
yeah, here you can see the entire pad. You're also able to view it in a 3D viewer. So you can see it. This is always a lot of fun to look at the 3D viewer. It helps with the motivation a lot.
17:43
This touch sensor here is actually a custom footprint that we created just to show our logo and that you can touch it. So that's cool. In the layout here, I'm going to zoom into the environment sensor. That's the U2 here.
18:02
And you can see that the ground pin, the pin that's supposed to go to ground has a very short trace into a so-called via. So this is a penetration into another layer of the PCB. So if we look at the ground layer here, you can see that the penetration actually touches the ground layer.
18:24
So this will now be connected to ground, which is nice because you don't have to make a long trace to some other place. The same with the power. But if we look at the data pin, for example, it
18:41
should go to the microcontroller. That's a long way and it's probably connected to more I2C devices. What we can do is we can try to delete it and you might see there's an indicator line that tells you you need to create a trace from this point to that point. So very helpful.
19:03
Now the more specialized corporate tools, they have automatic tracing. So maybe you don't have to spend so much time on it, but we do. At least I do. So what you can do also, if you decide to have multiple layers of a PCB, you can use two
19:22
layers for the signal. So what we've done here is that we've created a via that goes to the other side of the PCB so that we can actually cross paths because they're not on the same layer, if that makes sense. Alright, that is the last step of the design process. After you've done that, you want to order your PCB. So these
19:53
design tools, they have a way for you to generate so called Gerber files. And these are like a standardized format, which defines
20:04
I guess, good way to To the production process. So it's basically a something you can visualize. The Gerber files you can view and see if everything makes sense or if there's something wrong with the files. But you take these Gerber files and you upload them to your PCB manufacturer. I listed three of them here.
20:31
The one I've been using the most is JLCPCB also a Chinese PCB manufacturer. And as an option, you might want to consider ordering a stencil and I'll quickly, I will shortly tell you what a stencil is.
20:48
Okay, now you have your PCB in place and you might have your components that you've tested on its own and you want to assemble it all together. So you have a couple of options of doing that. So let's first look at hand soldering.
21:04
Hand soldering when it comes to printed circuit boards are good for through hole components. So that are components in which it goes through a hole in the PCB. I don't know, I don't know how to to place surface mounted components using a hand solder.
21:24
Maybe some people know how to do it, but I think it would be very difficult to do. So in our case here, this is the final product. You can see the environment sensor to the to the left bottom left of the screen there
21:41
to display. And you also have some push buttons on the right. And these are through hole components. So I just simply push them through the holes because it matches with the footprint of the component and then I turn it on its other side and I solder them together.
22:04
And they are then connected because you have traces to each point. So that's great. Before we start discussing the two other options. There's the stencil thing. So when you order your PCB, you can also order a stencil, which is a like a metal sheet with holes where the solder is supposed to go on the PCB.
22:30
So if you align it properly and you secure the printed circuit board and then you put this stencil on top, you can apply solder paste
22:40
using a credit card or whatever you find handy. We like using cards. I would recommend not over applying solder paste because then these small pads might actually be bridged with solder when you heat it up. That's not good. Also, the solder paste tends to dry up pretty fast. So you might want
23:03
to refrigerate it, keep it cool. It will double the lifetime of the solder paste. And if it's already dry, you can try mixing some flux into the solder paste, which will help loosen it up, giving it some moisture.
23:24
Next up, in terms of assembly is the hot air gun, which can be very good for like setting up one or a few devices. It can also be very good for fixing small mistakes, for placing and for removing small sensors, stuff like that.
23:45
But it can, at least if you're not very good at it, it can be easy to overheat, maybe even damage the component. You might loosen some of the nearby components because it gets too warm. So there's one thing you can do is you can put the whole PCB on top of
24:02
a heating plate and heat it up, because then the temperature difference will not be as high. So you heat it up until a little bit below melting point for the solder. You can also use aluminum foil if you want to like really pinpoint where the hot air goes.
24:22
This is a learning process, definitely. But if you want to make it really easy for you, you apply the solder with the stencil and then you put it into this PCB reflow oven, if you have one of those at home.
24:41
They're very nice for putting surface mounted components together. Of course, it's easier if you have all of the components on one side. If not, you might have to run it again on the opposite side and I don't know if you might actually lose the original components that you put in initially.
25:02
But this is a really nice if you have like small scale factory, we needed to make a couple or maybe 25 of these guys. So that helped a lot. Yeah, in terms of assembly, you want to use flux. Don't be afraid of using flux. This is like a chemical reagent that heats up, you
25:26
can apply, it's like a paste you can apply and it heats up the solder very nicely. It makes life easier. Also making life easier is if you use proper tools, so don't cheap out too much on the soldering iron, etc.
25:41
Be wary of very small form factors. So one of our sensors was an MPU9250, which is like a gyro sensor, accelerometer thingy. And we had lots of trouble with that because our solder paste was dry and we had to fix more than half of them.
26:02
Simply because the pads are very small and very close together, so it's easy for them to bridge. And then finally, a very good idea to write test firmware because it's not like, it's not like code, you have physical stuff that can, you can have issues with connections, there's a lot of things that can be wrong.
26:22
So it's a good idea to just have one script that tests all the components after you've placed it. So you can do like a little assembly line there. Yeah, joining your local maker space will save you a lot of money, you don't have to buy all this equipment yourself. There's a lot of skilled people there that might be willing to help you.
26:47
When it comes to soldering also, there's so many small things that you can do to improve drastically how you do it. So just hanging out with people who know what they're doing has helped tremendously for me. In our hackerspace, we also have an ultrasonic cleaner that you can see, which makes your PCBs look like they just came out of the factory.
27:08
So it removes flocks and fat very nicely. You might have access to a 3D printer, we used it to mount this direction pad to our PCB, our gaming pad.
27:22
You might have access to a laser cutter that you can make to use to use to make these cute enclosures. We used it to basically decide what size our printed circuit board should be. So we just made a wooden prototype of it just to see how it feels in the hand.
27:42
So all of these tools can help out in its own way. You can organize your components when you get them from the distributor, they come in these strips. So you might want to get these tiny boxes, these are resistors. It will help you if you're mounting more than one thing, then it's really beneficial.
28:05
It does take a lot of time to take these tiny components out of the strips, you can see the garbage bag is full. Also, if you do this, it creates a single point of failure, which I guess I'm the single point of failure.
28:20
I dropped it on the ground, and it's not so fun to make sure we put them in the right boxes again, that was, we didn't even bother. So yeah, if you decided you've been able to make something cool, and you don't want to assemble it yourself,
28:43
there are services that can do the PCB manufacturing, they can help you out with finding the correct components that you decided you want. They will even assemble it for you and keep inventory of your product and can even help with sales and distribution.
29:02
So if you do find a really cool gadget and you want to really commit to it, that could be one fun approach, I would say. Yeah, MakerFabs, I haven't used them myself, but I heard good things about them.
29:21
Yeah, I think that's it. All the source code for the design of the pad is available on GitHub, as well as the source code for all of the drivers. With MicroPython, you can actually pip install stuff directly onto the microcontroller. So if you do that with this pad, you'll get all the drivers that it has. That's a really nice little detail.
29:45
And that's it. Thanks a lot.
Empfehlungen
Serie mit 25 Medien