Designing a PCB with Bradán Lane
S05:E39

Designing a PCB with Bradán Lane

Episode description

Welcome to a new episode of The CircuitPython Show! Bradán Lane joins the show for a second time and shares his process, tips, and tricks for designing a PCB that uses CircuitPython.

We’re now on Bluesky!

00:00 Welcome

00:24 Recommended tools

2:54 Where to start when designing a board?

4:24 Finding open source hardware examples and schematics

7:02 Designing a board to support CircuitPython

9:00 The board layout and its constraints

12:28 Creating a feature board aka the kitchen sink

14:12 Picking out parts and components

17:14 Placing parts on the board

19:19 Advice for new board designers

20:37 The DC NextGen Graffiti Badge

25:28 Getting CircuitPython to run on a board

29:39 Wrap-up

Download transcript (.srt)
0:00

Welcome to the CircuitPython Show. I'm your host, Paul Cutler. This episode I welcome back Bradán Lane, who first appeared on the show back in Episode 19, which I've linked to in the show notes.

0:14

Bradán, welcome back to the show.

0:16

Thank you. It's great to be back.

0:17

I'm excited to have you here. Designing a PCB is something I'm hoping to tackle myself this year, so I'm excited to learn more.

0:24

Let's start at the beginning and someone wants to design a board. What tools would you recommend for someone just starting?

0:31

So designing a board actually has one prerequisite before that and that is figuring out what the circuitry or what the design needs to do.

0:40

But jumping into what about designing the board, there's a few different tools.

0:45

And you know there's third party and commercial tools but the two within the bulk of the community that I keep seeing pop up over and over again.

0:52

One is a web-based tool called EasyEDA, and it has a small download module if you want to do it offline.

0:59

But EasyEDA, first of all, is very simple in its user interface, it's very intuitive in its user interface, and it integrates very well with one of the PCB manufacturers that we tend to use a lot.

1:12

A big step up from that is KiCad.

1:17

And KiCad is an open source project.

1:19

For years it's been sponsored and funded by CERN.

1:22

And so it has a permanent staff.

1:23

It has a budget.

1:25

They know what they're doing.

1:26

And starting three or four years ago,

1:29

KiCad shifted to a major update every year.

1:33

And that really got people on board

1:35

because before that it was kinda,

1:37

when are they gonna fix this feature?

1:38

When are they gonna add that feature?

1:40

And so going to point releases throughout the year and a major release that people can depend on, you know, approximately every 12, 12 and a half months really gave people who were on the fence that last bit of nudge they needed to move it in.

1:54

Now, the learning curve on KiCad, some people are going to say it's pretty steep, but the truth is the learning curve on almost any design tool is pretty stiff.

2:03

You know, getting the basics in there, you can do that pretty well with easy ADA and you can do that pretty well with KiCad.

2:09

The big advantage for me, at least, I went to KiCad almost immediately, was it let me

2:15

grow as a designer.

2:17

Whereas within EasyEDA, I started to bump up against its limits pretty quickly.

2:22

That being said, the majority of boards that even I design today could easily be done in

2:28

EasyEDA if I were more fluent in it.

2:31

So those are the two that I kind of talk to people about.

2:34

If I go into a school and I'm talking to students, I'm going to talk to the teaching staff and

2:38

probably recommend EasyEDA. It also has an advantage in the academic space because if

2:44

schools and stuff have like firewalls and lockdowns and they can't install software,

2:48

EasyEDA is a browser-based solution and that works great. So those are my two recommendations.

2:53

What are some of the tricks you use when you're first starting out designing a board?

2:57

There's a number of different types of boards, but the boards that I tend to design are feature

3:02

boards as opposed to say a development board. So if you think about a lot of what Adafruit provides

3:09

and what Spark and some of the other groups provide, a lot of them are building development

3:15

boards. These are boards with a number of pins that run down either side that are broken out

3:19

and so you buy the board and then you start adding capability to it external to that.

3:24

And I use development boards as a precursor to designing my own custom board. Then I will jump

3:30

into designing my own custom board which has all of those extra accessories or sensors built into

3:36

and on the board. So I start with a standard PCB breadboard and I stick a development board,

3:43

often from Adafruit or a third party, in the middle of that and then start sticking other

3:47

components off the sides to just make sure that I'm not out in left field somewhere. I don't need

3:53

everything to work but I need to know that like stuff is going to work. So as an example, getting

3:58

a touch sensor to work? Well, getting a touch sensor to work isn't really difficult, but

4:03

understanding the nuances of how a touch sensor changes depending on the size of it or its

4:10

placement or what else may be around is much easier to do on a breadboard than it is jumping

4:15

immediately to a printed circuit board. And again, I use various resources on the internet to help me

4:22

kind of get that done. So then it's time to start putting it down in a design tool like EasyEDA or

4:27

or a keycad, and the very next step that I do is I start looking for resources so that I don't make, you know, beginner mistakes. And that comes down to the open source hardware community. And there's actually an entire initiative of open source hardware and there's registration and stuff. But all I'm really interested in is I want to look at the schematic for a board that I know works. And potentially I want to look at the PCB layout for certain little pieces of that board. I'm not interested in the whole board, but I'm interested in pieces of it.

4:57

it. And so I looked to the open source community and a couple of places that I can give examples

5:03

is like the very first time I wanted to design a board around the Raspberry Pi Pico, the chip on

5:09

that's called an RP2040. Well I started with a Pico on a breadboard and said okay now I understand

5:14

how to code for it, I understand how it works, I want to design the actual board. So I went out and

5:20

looked into the open source hardware community and found two sources right off the bat. One was

5:26

is Adafruit, who publishes all their board designs, they publish their schematics, they

5:30

publish their PCB layouts, you can see everything they do. Another one was a group out of Europe

5:35

called Solder Party, and they too are very big in the open source. They open source everything

5:40

they do. And so by looking at those two sources, I started to understand little things around

5:46

routing of power or routing the USB, because reading the data sheet and reading the official

5:54

electrical engineering descriptions of like how to route USB, there's lots and lots of constraints.

6:01

The truth is, for a lot of these chips, you can get pretty sloppy and it still works perfectly

6:07

fine. And there's no way to know that without either designing your own board or looking at

6:12

other people's boards that you know work. And so that's kind of one of the things that I start to

6:16

dig into before I design my own board is, can I find examples to help me avoid a lot of mistakes

6:23

or a lot of iteration. And so that gets me, that probably jumps two or three iterations into my design, because I'm taking from other people and using the work that's already published in the open source community.

6:34

-Standing on the shoulders of giants, we like to say in the open source. -Yeah, or as the literary people say, you know, what is it? Good authors plagiarize, great authors steal outright.

6:43

- Exactly. So it's really not that different than learning to code. A lot of people will take a look at an existing program, rip it apart, put it back together, add little bits. So you're doing the similar thing when you're writing your schematic. You're looking at other people's designs that are in the open source community to get ideas and to learn those best practices.

7:01

>> Exactly. That's even more true when you start dealing with boards that you want to support CircuitPython.

7:08

Because CircuitPython can support almost anything, but CircuitPython is very easy to support if you're using stuff that other boards have already done ahead of you.

7:19

So again, it's standing on the shoulders of giants.

7:21

So for instance, if I know I want a board to support CircuitPython, let me use as an example, you know, that early RP2040, the Pico kind of base thing.

7:32

Well, not only did I find that SolderParty had created their RP2040 stamp, which had all the broken out capability I wanted, it also supported CircuitPython.

7:42

So I knew right up front that, okay, if I use the RP2040 the same way they did, and I use the same

7:48

memory chip that they did, and I use the same crystal, and I use the same USB, then I'm very

7:54

likely to be able to support CircuitPython as easily as they did. And sure enough, when I went

7:59

to add CircuitPython to that design, I started with their code again, because that too is open source.

8:05

I look for examples of hardware that somebody else has already tested to work together.

8:09

LEDs that work together or serial that works together or infrared was something that I started playing with last year in earnest.

8:17

And so I looked at Adafruit's example from their Circuit Playground Express, I believe is the hardware that they use.

8:25

And I also classify that as sort of a feature board as opposed to a dev board. And so I looked at their board, I looked at how they did their chip, I looked at the memory they used, and then I looked at the various components they used, looked at their schematic, and then I started building my schematic.

8:39

based partially on that and then partially on the RP2040

8:45

schematics that I had found and kind of pieced it together.

8:48

And so that getting the schematic mostly figured out came

8:52

from just like you were saying with code, copying, pasting,

8:56

bits and pieces from other open source opportunities.

8:59

Once I had the schematic,

9:01

then it was a matter of the board layout.

9:04

If you think about a dev board, most of them are rectangular,

9:07

Very simple rectangular, quite often they'll have headers down either side.

9:11

And so I'll go into the PCB layout, import the schematic data, and that just gives me all these parts.

9:19

And what they call rat's nest, which is these unofficial lines that connect pins together based on the schematic.

9:27

And I look at, well, what are the going to be the constraints of my board?

9:32

So if I'm doing a development board, the constraints are going to be those pin headers.

9:34

They got to go down both sides.

9:36

They have to be spaced apart a certain amount.

9:39

And so I'll lay those out and then start looking

9:41

at the rat's nest to try to figure out

9:43

what parts most likely belong in different areas

9:47

around the board.

9:49

And I'll spend a fair amount of time

9:50

just moving parts around until I can see

9:54

that the rat's nest don't cross over too much,

9:57

and they're as short as they can be,

9:59

and there are logical things in the right place.

10:02

And then I'll actually start doing

10:05

what they call the routing.

10:06

And the routing is where they connect physical traces

10:11

of copper between the different pins that represent

10:15

what that rat's nest was telling me I needed to do.

10:18

So the great thing about these EDA tools is,

10:21

when you go from schematic to PCB,

10:24

they kind of tell you what work you need to do

10:27

and how you need to do it.

10:29

So as long as you got your schematic correct and configured,

10:32

then when you go to do your board layout,

10:34

you have that information in front of you as sort of hints.

10:37

And it's sort of like notes in the margin.

10:40

And so you then go through the process

10:41

of laying out the parts.

10:42

And there's a few tricks.

10:44

You'll notice on some boards,

10:46

if there's a microcontroller,

10:47

there's pins on all four sides of a microcontroller,

10:50

which means you've got these routes going every which way.

10:53

And if you've got those rails going down

10:55

the left and the right side of a board,

10:57

one of the tricks they do is they'll put the chip on the 45.

11:01

So instead of having a top, a bottom, a left and right,

11:03

What you have is you kind of have an upper left and a lower left and an upper right and

11:07

a lower right, which now makes them much easier to get to those pins that run up and down

11:11

the sides of a board.

11:12

And that's a trick that I didn't understand until I tried to lay out my first board.

11:16

And then I went and looked at, you know, a board layout from another company or another

11:20

group in the open source area.

11:22

And it's like, Oh, now I know why they did that.

11:25

Sure.

11:26

Little things like that.

11:27

You know, there's also hints you'll get, you know, for instance, if you've got a USB connector,

11:32

the best practice is try to keep those traces as short as possible.

11:35

Try not to have stuff cross over and under those traces.

11:39

And so there's best practices out there that over time you learn.

11:42

All my first boards, no USB at all on them. They were just battery powered.

11:46

And so over time the boards get more and more complex. But to begin with,

11:51

you know, it's the schematic to the PCB. Now that said, there's,

11:54

there's a few things that as a very early designer,

11:58

when I first started out,

12:00

One of the things that I did was I'd create a board

12:03

that was just part of the problem that I was trying to solve.

12:06

So for instance, the touch sensors example.

12:09

Well, okay, so I created a board

12:11

that had nothing but touch sensors on it.

12:14

And it cost me, you know, a couple of bucks

12:16

to have me manufactured.

12:18

But then I could plug it into my breadboard

12:20

and hook it up to an Adafruit Feather or another board

12:24

and learn how it worked.

12:26

Same with LEDs.

12:28

sometimes I'll actually do that.

12:30

Now I've graduated from doing that

12:31

to doing what I call a kitchen sink,

12:34

which is if I'm starting down a new path,

12:37

I'll design a board, I don't care what shape it is,

12:39

but I'll put like everything on it

12:41

that I think I might wanna use.

12:43

And I'll populate part of it and test it and get it to work.

12:48

And then I'll add a couple of pieces

12:49

and I'll hand solder parts on and hand solder parts on

12:52

and figure out what worked and what didn't

12:53

and what I understood and what I got wrong.

12:55

And so when I'm designing a feature board,

12:57

Often I'll design what I call a kitchen sink.

13:00

Just throw everything you think you might want to learn

13:02

about it on there.

13:03

And it's great because over time,

13:05

you populate the whole board.

13:08

And not only do you learn about the design of the board

13:10

and what worked and what didn't,

13:11

but you also learn how to code for the board

13:13

you just created.

13:14

Those are kind of the approaches I've taken.

13:16

I start with maybe designing just part of a board

13:19

or a board and put everything on it,

13:21

making sure that I can remove stuff and it'll still work.

13:24

- That's a really good tip.

13:25

I would have never thought about designing

13:27

almost a sub board and considering how cheap some of those fabrication companies are that it's just a couple bucks or ten bucks to get five of them.

13:34

To build that back into your design on the breadboard is genius.

13:38

I do that at least once a year. I'll design two or three of these little sub boards knowing that I need to test them out. And the great thing about them is I keep them.

13:48

So if I went like I'm working on a new chip right now, well if I want to design into that feature board that I'm going to create, touch sensors, well I can go grab a touch sensor board.

13:57

board I've got that has, you know, touch sensors of various sizes and touch sensors that are, that are masked or exposed. Same for an LED board, you know, boards got, you know, just four LEDs on it, or it's got four NeoPixels on it. And so I could just reuse those.

14:12

So we've got the board schematic done, we've got the layout done, and the components are picked out and the traces are all run. What comes next?

14:20

One of the things that occurs, and you touched on it,

14:24

but it can actually be more work than we often imagine,

14:27

which is we pick out the parts.

14:29

Well, we need to pick out the parts in one of two ways.

14:32

Either the parts we're gonna order ourselves,

14:35

or if we're gonna have somebody else

14:36

manufacture the board for us,

14:38

we need to pick out parts that they have available to them.

14:41

I wanna jump back to the EZ-EDA example.

14:44

One of the things that's great about EZ-EDA

14:46

is it's completely integrated

14:47

with one of the board manufacturers in China.

14:51

And that board manufacturer will do assembly for you.

14:54

And the most cost-effective low-cost solution

14:57

for their board assembly is if you use parts

15:00

they have in their catalog.

15:02

So the great thing about EZ-ADA is when you pick parts,

15:04

it knows what parts are in the catalog.

15:07

And so it tells you right up front,

15:10

this is the LED you should use.

15:11

And if you pick a different LED, it's gonna warn you,

15:13

well, you can use that LED,

15:14

but we don't have it in our catalog.

15:16

EasyEDA is great from that standpoint because they help you with the schematic, they help

15:22

you with the PCB layout, they help you with what's called the BOM, the bill of materials,

15:27

and picking parts that are in inventory and cost effective.

15:31

And then when you submit it, all that data, the board layout, the artwork for the board,

15:37

the bill of materials, the part numbers down to the part numbers that that company uses

15:42

to do assembly of the board is all submitted in one big bundle.

15:48

When I do it, I do my own assembly.

15:50

And I initially started out with, you know, doing hand assembly,

15:54

and I created some hand assembly tools.

15:56

And I now have a few pieces of equipment that kind of helped me do assembly in my lab.

16:00

I have a list of parts that I know I can get easily through

16:05

DigiKey or Mouser or LCSC.

16:09

And some of those I have in stock.

16:10

And so I know, for instance, there's a thing that happens in almost every board design, and these are called decoupling capacitors.

16:17

And all they're really there to do is filter out noise on the board.

16:21

They tend to always be attached to wherever voltage or ground is close to each other.

16:26

You have these decoupling caps.

16:27

Well, the decoupling caps are almost always the same values.

16:31

They're either 100 nano farad or they're one micro farad or they're 10 micro farad.

16:37

Well, capacitors are really cheap.

16:39

And so you don't buy 10 of them.

16:40

you buy a thousand of them.

16:42

And so now you've got these in stock.

16:43

And so now if you know you're going to design a board,

16:45

you don't have to look up the part, you know you've got it.

16:48

So there are certain parts, I don't go to the next level

16:51

of finding out the actual part number

16:54

because that would be a manual step for me.

16:56

But in general, yes, what you're going to do is

16:58

you're going to go through and from your EDA tool,

17:01

whether it be EZ-EDA or KiCad,

17:04

you can have it generate a spreadsheet,

17:07

a report of these are all the parts you have on your board.

17:11

And this is how many of each one you need.

17:14

And also these are where they go on the board.

17:17

And one of the cool things is with KiCad,

17:19

because KiCad is open source,

17:22

there are people who build custom plugins

17:23

and additions and extensions to it.

17:25

One of the greatest extensions somebody has created

17:27

is a browser extension that takes your bill of materials

17:36

in a browser and it lists out all your parts and if you click on a part it will show you

17:41

where it is on the board. And if you click on a part on the board it shows you where

17:44

it is in your inventory or your bill of materials. And people actually if they're going to do

17:48

hand assembly of their board can actually pull this up and have it in front of them.

17:52

And it will run on an iPad or an Android tablet. What they'll do is they'll literally have

17:57

it show them what part they have to place and it will show them on their board where

18:02

it needs to go. And then they click a little button and it shows them the next part they

18:05

they have to place and where on the board it needs to go.

18:07

And so they can work right down through the board

18:09

and graphically see what they're gonna do.

18:12

In general, I would recommend for a lot of people,

18:15

if you are designing in something like EZ-EDA,

18:19

plan in advance to actually have the board manufactured

18:22

by the assembly shop for a couple of reasons.

18:25

One is it allows you to a lot more creativity

18:28

with your board design, because they're gonna use

18:30

what's called SMD parts or SMT parts,

18:33

which are surface mount parts.

18:34

and they can be very, very small.

18:36

And they have no problem placing a very, very small part.

18:40

But if you're trying to do it by hand,

18:42

it's a lot of work and it gets frustrating

18:44

and you can make mistakes and the board might not work.

18:46

If you're designing a board with what might classify

18:49

as old school parts, which are through hole,

18:51

then it's much easier to do by hand.

18:54

If you want to focus on the design of your board

18:58

and not the difficulty in assembly,

19:00

then having a board manufacturer actually go

19:03

and put all the parts on the board, solder it for you,

19:05

and then ship you a finished board

19:07

is a great sort of low threshold to consider.

19:11

And again, with like EasyEDA and the board manufacturer,

19:15

if you use their inventory, it's very cost-effective.

19:19

- So with all that said, we've now built a board.

19:21

Are there any other pieces of advice

19:23

for someone just starting their journey

19:25

and learning PCB design that you might have?

19:28

- A lot of it's gonna come back to

19:29

stand on the shoulders of giants.

19:31

That was a great quote. I'm so glad you put that out there. I tell people, I don't have a background in electrical engineering. Five years ago, I knew what a resistor was from high school, and that was about the extent of my knowledge. And through joining a couple of discords and catching a couple of people on social media that were willing to answer my questions, I got my first board to work. And I got the first parts of that first board to work.

19:58

Leveraging open source projects, leveraging, you know, various communities around this is really what got me to the point where I can design a board that does what I want it to do.

20:14

And now five years on, I'm turning around and now I'm the one who's answering a lot of those questions of the people who are coming in behind me.

20:21

And as I explained to them, it's not that I have a formal education and it's not that I'm an expert in this area.

20:27

I've just made every conceivable mistake you can probably make at this point.

20:30

And I'm just trying to help you avoid them just like other people

20:33

helped me avoid them early on.

20:35

Sure.

20:36

So I wanted to ask you about one of the kitchen sink boards

20:39

that you designed last year.

20:41

Tell me about the DC NextGen Graffiti Badge.

20:44

I loved the graffiti badge.

20:46

There was a few things that came from that.

20:49

One is I wanted to design a board for learning.

20:53

I'd seen the Adafruit Circuit Playground Express and said, you know, this is really

20:57

great, but there's a few more things I'd like to have on it. And I'd like to package it

21:03

up with, you know, a 3D printed back and its own USB cable and everything it needs to work.

21:10

And while I'm at it, I might as well design an entire workshop series and some training

21:14

education and a bunch of different tutorials and a whole bunch of example code. And so

21:19

I thought this would be a great conference badge. One of the things that's popped up

21:22

over the past probably 10 years is this notion of badge life, which is a few of the tech

21:26

conferences started using electronic badges and it exploded. The complexity and depth

21:33

of electronic badges that are at some of these conferences is crazy. What spawned from that

21:38

is an entire indie sort of cottage group that broke out from that, which were groups or

21:44

individuals that said, "Oh, I want to design a small badge that I can take and give and

21:49

trade with other people or maybe sell." And so I had this idea for a conference badge

21:54

that would be easy to program, had lots and lots of functionality on it, looked cool.

22:00

And for me, CircuitPython was the logical foundation for that.

22:06

So I come back to Solder Party Express and their RP2040 stamp, right?

22:11

That was the genesis of saying, okay, let me look at how they designed that.

22:16

Okay.

22:16

Let me put that on a, on a board with a PCB.

22:18

Now let me add touch sensors and NeoPixel LEDs and audio.

22:24

Well, geez, where am I going to get audio from?

22:26

Oh, Adafruit must have an example.

22:29

Sure enough, Circuit Playground Express has a little PWM audio and a little amplifier.

22:34

I use the exact same one on mine.

22:37

And then I wanted, since the badge wasn't going to have a battery,

22:41

that was a distinct decision to not only keep the cost down,

22:44

but also shipping and lithium batteries and all that kind of fun stuff.

22:49

So how do you make a badge that's going to have personalization on it?

22:54

Well, an e-paper display came to mind.

22:57

And so again, I went back to Adafruit and I looked at Adafruit's repertoire of

23:01

boards and sure enough, they had a little breakout board for e-paper.

23:05

Also Waveshare, who a lot of people use for boards.

23:08

It turns out Waveshare open sources all their designs too.

23:11

And so a combination of those two, I designed a prototype that included the breakout for an e-paper display.

23:19

That badge was really an amalgam of various open source capabilities that I found from lots and lots of sources.

23:28

And then it was, let me tie it together with a theme.

23:31

And since it was going to be for a youth group, youth oriented group, typically 11 to 17, I think is the target audience for DC NextGen.

23:39

I wanted something kind of fun, a little edgy.

23:40

And so this idea of graffiti on a, you know, like a tag on a wall, a PCB can be any shape you want.

23:49

So I used a, I think I used Inkscape and kind of created a box and then I kind of squished it at one end and squished it at the other and kind of got what, you know, the artist would say is perspective and then laid out, you know, like what would look like a brick on it.

24:02

So now it's got this brick wall in perspective, graffiti tag on it.

24:07

Okay, I've kind of got the artwork figured out.

24:10

Now, how do I integrate the artwork with the electronics?

24:14

And this comes back to some of the other things like, okay,

24:17

touch sensors would be kind of an easy thing to integrate.

24:20

And the great thing about touch sensors

24:21

is it's part of the PCB.

24:23

So there's no hardware you have to solder.

24:25

It's literally part of the PCB.

24:28

So DC NextGen, that's nine letters.

24:30

You know, okay, let's put every single letter

24:34

is a touch sensor.

24:35

Okay, we can do that.

24:36

not a problem. And then the e-paper display, the LEDs, etc. etc. That's a case where the

24:44

art drove the shape of the badge and even drove some of the functionality of the badge

24:48

or the PCB. And again, there was nothing really special or unique about it. Almost everything

24:56

on that badge came from other open source projects. I think the ultimate display driver

25:03

was based off of what Waveshare had. The audio was based off of what Adafruit provided. The RP2040

25:10

was from Solder Party. It was an amalgam of all these different things. And then when it came time

25:16

to get it certified for CircuitPython, because I had leveraged stuff that was already used by other

25:24

groups, most of those building blocks were already part of CircuitPython as well. In the next episode,

25:29

I talk with CircuitPython core developer Dan Halbert about building CircuitPython from source for boards. In your experience, how easy or hard has it been getting CircuitPython running on your boards?

25:40

There was two steps to getting CircuitPython on any of my boards. One is getting it to work, and that's relatively easy. And then it's any of the customization so it's more intuitive to the programmer.

25:53

So if we look at the graffiti badge as an example, because I had used the solder party,

25:59

RP2040 stamp as the basis, then CircuitPython already supported the RP2040, it already supported

26:06

the memory flash that was being used by that, the crystal nose one. So getting CircuitPython to run

26:13

on that was very easy. The next step was getting it to have all the integrated capabilities.

26:19

And the CircuitPython core support team is incredible.

26:25

Adafruit manages a Discord server,

26:27

and within that Discord server,

26:29

there's many, many channels.

26:31

The two that I spend a fair amount of time in,

26:33

one is they have a hardware design one, which is great.

26:36

You can ask hardware design questions

26:38

if you're designing your own board.

26:40

There's also one for CircuitPython help.

26:44

These are people who are trying to write CircuitPython

26:47

and need some help getting things to work.

26:49

There's a whole separate channel just for people who are developing customized versions of CircuitPython for their boards.

26:56

And you have an option of designing a custom version of CircuitPython for your board and just keeping it that way, or submitting it back in, in the world of source control.

27:06

This is called a pull request.

27:08

And the team will work with you to make it normalized so it fits in with all the other boards.

27:14

So using the same language or the same labels for things that other people are using.

27:19

So it becomes much easier for the person who's going to write CircuitPython against your board.

27:24

And so that was relatively easy. When I did my second CircuitPython board, it was a little

27:29

more nuanced because if you think about almost any development board that's got USB on it,

27:36

when you plug it into your computer, your computer is going to recognize that USB.

27:41

And often they have these things called vendor IDs and product IDs.

27:47

And getting your own vid and PID is going to be different for every board.

27:53

So Raspberry Pi handles all the PID assignments

27:56

for anybody who's developing a board for RP2040.

28:00

You send them a note and say, this is kind of what my board's doing.

28:03

This is what I'd like.

28:05

Would you give me a product ID?

28:07

And almost always they're going to come back and say yes.

28:09

and they send you a code and that's your code for life. My second board most recently uses the

28:16

Microchip SAMD21 and that's a completely separate thing. Microchip doesn't provide USB IDs so they

28:24

don't provide the the PID for those. However, there's a an open source organization that does.

28:31

So again you go through the process you submit what you're requesting what you plan to do

28:35

and they coordinate and say, well, we'll do it as long as your board is open source.

28:40

So this comes back to the same community that got me started. A lot of my designs are related to

28:46

open source designs that are already out there. This organization that will provide you a USB ID

28:53

says we'll provide it to you for free rather than spending tens of thousands of dollars for it.

28:58

If your board is also going to be open source so you can help the next group. And so I have no

29:03

problem I publish all my hardware anyways. I sent them the link, this is the link, this is the board.

29:08

They said, okay, all the stuff that we expect to be open source is available online. You're good to

29:14

go. Here's your ID. So then I take that ID and I have to go back to CircuitPython and make sure

29:19

that my build of CircuitPython uses the ID that I was just assigned. So there's a few places where

29:26

the process loops around on itself. But again, the open source community and in particular,

29:32

the resources that Adafruit provides is incredible for people who are trying to design boards.

29:39

Bradán, this has been great. Thank you so much for coming on the show and sharing your

29:42

experience in designing boards. Thanks, it's been wonderful and I'm sure that there's lots

29:47

of questions still to be had and the great thing about it is the community that's available for

29:52

answering questions is huge. Just need to reach out and ask. I couldn't agree more. Thanks again.

29:58

Thank you for listening to the CircuitPython Show. To learn more about Bradán, check out

30:02

the show notes for links to his homepage and his past visit on the show back in episode 19.

30:07

Next episode, I'm joined by CircuitPython Core Developer Dan Halbert to talk more

30:11

about building and customizing CircuitPython. Until next time, stay positive.