Create your own flashy DIY Christmas tree with PCBs in this step-by-step tutorial, packed with tips for soldering, designing in KeyCad, and more!
[0:00] it’s christmas project time there’s a
[0:02] box from pcb way let’s see what’s inside
[0:05] opening it up we have a free gift it
[0:09] looks like it’s a christmas tree
[0:12] slightly ironic given what this project
[0:14] is all about but let’s have a look at
[0:15] this it takes a coin cell battery so
[0:18] let’s power it up and see what it does
[0:22] stick the cell in
[0:24] and turn it on
[0:26] that’s pretty neat we have a flashing
[0:29] christmas tree i like it well let’s have
[0:31] a look at my pcbs which are also
[0:34] christmas trees
[0:36] these are amazingly well packed so this
[0:39] took me ages to actually unwrap but here
[0:41] we go
[0:42] so
[0:43] if any of you are my friends you’ll know
[0:45] what you’re getting for christmas you’re
[0:47] gonna get a little soldering kit
[0:50] so they look pretty good they come out
[0:51] really nicely so we’ll um examine these
[0:55] and then let’s get to the soldering
[0:57] station
[0:58] so i’ve got these nice flashing leds
[1:02] that um
[1:03] slowly blink and eventually they’ll go
[1:05] out of sync and start flashing
[1:07] independently so we need to get our
[1:09] resistors in so we’ll just insert them
[1:11] all and bend the legs a bit so they stay
[1:14] on and i’m going to use some sticky tape
[1:17] just to hold them in place to make it
[1:19] easier to solder i do find it quite hard
[1:22] when soldering with all of these um led
[1:25] leds and resistors to actually get the
[1:27] soldering iron in so i’m sorting them
[1:30] all up
[1:31] uh it’s not the best soldering job so
[1:33] i’ve fast forwarded it so you don’t have
[1:35] to watch my terrible soldering
[1:37] so we’ll get through all of these it’s
[1:39] quite tedious
[1:41] um but now we’re pretty much getting to
[1:43] the end and we’re almost done
[1:46] and the last one so let’s snip all the
[1:48] leads off
[1:49] they do fly everywhere it’s pretty
[1:51] dangerous so safety goggles or glasses
[1:54] are recommended or you can put your
[1:56] finger on the end and you get slightly
[1:58] stabbed when you’re doing it but either
[2:00] way they will fly around the bench
[2:03] so i’m powering mine from 5 volts
[2:05] and the square pin indicates the
[2:08] positive so we have to put the long leg
[2:10] in the square hole and i want to put the
[2:13] leds on this side of the board so let’s
[2:15] get all the leds inserted
[2:18] and this is a another fairly tedious job
[2:21] so we’ll fast forward this bit so you
[2:23] don’t have to watch it all but let’s get
[2:25] them in
[2:27] and if you’re very observant you will
[2:30] see that i have missed an led so i will
[2:32] solder these up and then when i actually
[2:34] test it
[2:35] i’ll realize i’m missing one led and
[2:37] we’ll have to add that and solder it in
[2:40] so what i do with leds normally is
[2:43] solder one leg and then you can see
[2:46] which ones are wonky or have come
[2:48] slightly out and
[2:50] what you can do is you can just push
[2:52] from the other side and then heat up the
[2:54] one leg you’ve soldered and push the led
[2:57] until it’s flat
[2:59] so there’s a few that need that doing so
[3:01] you melt the solder push and it pops
[3:04] into place and then there’s another one
[3:06] it’s quite difficult with all these legs
[3:08] sticking out not to stab yourself so be
[3:11] careful but we’ll um
[3:13] we’ll do these other ones that are
[3:14] sticking out and then we’ll be um
[3:17] we’ll be good to go once i’ve soldered
[3:19] in the missing led
[3:21] so
[3:22] so i look so i’ve missed one solder
[3:25] joint there
[3:26] we’re doing the other side of the
[3:28] soldering now so we’ll complete
[3:31] our leds
[3:35] and that’s all the leds done and here
[3:37] i’m adding the missing led so let’s get
[3:40] that one soldered into place
[3:54] and we’re done now it’s just a case of
[3:56] snipping off all the pins
[4:01] there is a lot of snipping in this
[4:03] project
[4:05] now to power it i’m going to use my
[4:07] bench power supply so i’m just sticking
[4:10] a header pin in and then we’ll solder
[4:12] that up and then connect it to my bench
[4:15] supply so a quick bit of soldering just
[4:17] make sure it’s level and flat
[4:20] so that’s that soldered and now we get
[4:23] our bench supply and connect it up
[4:29] the positive and the negative
[4:33] and there we go
[4:34] so you can see that one of the leds is
[4:37] not flashing
[4:38] initially i have thought this might be a
[4:40] broken led but it turns out i’d actually
[4:42] just forgotten to solder one of the pins
[4:45] so we’ll get that quickly fixed
[4:47] and then we have a fully working system
[4:56] so that’s our leds all soldered
[4:58] power it up and i really do like these
[5:01] um
[5:02] self-flashing leds they all start off in
[5:04] sync and then they slowly start to flash
[5:06] independently
[5:08] so let’s go and jump into keycad and
[5:10] i’ll walk you through the schematic and
[5:12] the design of this little christmas
[5:14] project
[5:22] so i’ve made a new project in key cad
[5:25] and let’s start placing our components
[5:27] so we hit the place key which is a and
[5:31] it will load up the library
[5:34] and now we want to have a resistor so
[5:36] let’s get one of our resistor symbols so
[5:39] we’ll just do a small resistor
[5:41] so we’ll place that
[5:44] and now we also want an led so we’ll
[5:47] bring up the component library again and
[5:49] we’ll search for
[5:50] leds so find a nice led symbol
[5:54] add that and we’ll rotate it so it
[5:57] connects onto the resistor and now we
[5:59] just need ground and power so for that
[6:02] we push the p key
[6:04] and we open up the power and search for
[6:07] ground
[6:08] and spread it correctly
[6:10] so now we have our ground pin so we put
[6:12] that on
[6:13] we’ll wire this up with the w button
[6:17] and then we’ll add in the power symbol
[6:19] so p and then search for five volts
[6:26] there we go oops so there’s our power
[6:28] it’s the key cad can be occasionally
[6:31] quite bonkers so let’s wire up our five
[6:34] volts
[6:35] and now we want quite a few leds and
[6:37] resistors so i’ll just um duplicate this
[6:40] several times
[6:41] by dragging it with shift and do that
[6:44] and repeat that until i have sufficient
[6:46] leds i’m going to start off with 11 leds
[6:49] and see how that looks so that’s our
[6:52] leds all wired and now we have a
[6:54] connector to actually connect up our 5
[6:56] volt and ground power supply
[6:59] so our next step we can annotate our
[7:01] schematic so that will put numbers
[7:03] instead of the question marks so this
[7:05] will automatically do it and we’ll just
[7:06] sort our components by x position so it
[7:09] should work from left to right and top
[7:11] to bottom giving our components numbers
[7:14] so we have d1 d2 d3
[7:16] i’ll also work out a nominal resistor
[7:19] value so if we have 5 volts and a 3 volt
[7:22] drop across our diode and i want about
[7:24] 10 milliamps so 0.01 so that gives us a
[7:27] value of 200 for our resistor
[7:30] so i’ll just populate the value there on
[7:33] the resistor so that we can read the
[7:35] schematic and know what we’re supposed
[7:36] to be doing
[7:38] when i actually sold it up i probably
[7:39] would just use the resistors i actually
[7:41] have on hand and because i’ve got a big
[7:43] box of random resistors so i’ll see what
[7:46] i have
[7:47] now the next step is to assign
[7:48] footprints to our symbols so we open up
[7:51] the assigned footprints it will load up
[7:53] the footprint library and also load up
[7:56] all of things in our schematic
[7:58] so we’ll start off with the
[8:00] diodes say we select all our diodes and
[8:03] then we filter by through whole leads
[8:06] now my leds are going to be three
[8:08] millimeter so we find that in the list
[8:11] of footprints
[8:12] and then i always have to remember to
[8:14] double click to actually assign the
[8:16] footprint so
[8:18] once i remember that and i double click
[8:21] we’ll be able to move on to the next bit
[8:24] so double click and now our leds all
[8:26] have footprints
[8:27] the next thing we’ll do is the connector
[8:30] so we’ll filter by connectors and i want
[8:34] a 2.54 millimeter connector and i need a
[8:38] 2 pin
[8:39] vertical so we double click on that
[8:44] and now we can do our resistors so we
[8:46] select our resistors and then go over
[8:49] and filter by through-hole resistors
[8:52] and then i’ll select the appropriate
[8:53] footprint for our resistors and double
[8:56] click again
[9:00] so that’s all our footprints done we can
[9:02] hit ok
[9:03] and now it’s time to move to our pcb
[9:07] so we’re going to open the pcb tool and
[9:10] once we’re in the pcb tool we can update
[9:13] this pcb with the schematic so that will
[9:16] load in all of our footprints into our
[9:18] pcb
[9:20] so there we go now we have all our
[9:22] components we’ll just place them at a
[9:24] convenient place and zoom in and take a
[9:26] look
[9:29] so now i’m going to import my board
[9:32] outline so i’ve already
[9:34] exported an svg from my drawing package
[9:36] and converted it to dxf
[9:39] go and locate that
[9:41] and we need to set that to the right
[9:43] scale so i know that three should work
[9:46] and we’re going to do it on the
[9:48] edge cut layer
[9:53] so there’s our nice christmas tree board
[9:55] outline we’ll just place that and i’ve
[9:58] also got some decorative lines that i
[10:00] want to put onto the silk layer so we’ll
[10:03] import that as well
[10:05] i want these to be
[10:07] nice thick lines so i will try changing
[10:10] the line thickness but we also apply it
[10:13] to the bottom silk layer
[10:15] so let’s see what we get
[10:25] now obviously that’s not quite what we
[10:26] want so we’ll try that again and we’ll
[10:28] just go back to the normal thickness i’m
[10:30] not sure what this um thickness actually
[10:33] means because it does say millimeters
[10:35] but that didn’t seem like um millimeters
[10:38] to me
[10:39] so then we um place our nice decorative
[10:41] lines and they’ll appear on the bottom
[10:43] silk layer
[10:45] so now’s a good time to go into the 3d
[10:48] viewer and see how our board is going to
[10:50] look so we open the 3d viewer up we can
[10:52] see our components and we can also see
[10:54] our board so if we rotate it around we
[10:56] can see the bottom silk layer so we can
[10:59] see our nice um decorative lines and one
[11:02] thing i noticed here is the
[11:04] components i’ve chosen vertical
[11:06] resistors
[11:07] rather than the horizontal resistors so
[11:10] let’s go back and fix that so we go back
[11:13] to our schematic
[11:15] and we go and change the footprints for
[11:17] the resistors so we open up the assigned
[11:19] footprints
[11:24] select our resistors
[11:26] and we want the horizontal version so
[11:29] we’ll filter by through-hole resistors
[11:32] and we go and pick the horizontal
[11:35] version of these resistors
[11:37] apply those
[11:38] by double-clicking
[11:40] and then hit okay
[11:42] and now we can go back to our
[11:45] pcb
[11:46] and we can hit the update button and
[11:48] that will update from our schematic
[11:51] and now our resistors should be the
[11:53] correct footprints
[11:55] so now if we zoom in we can see our
[11:57] resistors are actually the right
[11:59] orientation now and if we double check
[12:01] on the 3d viewer we can see that we have
[12:04] exactly what we want now
[12:06] so going back to our pcb layout we can
[12:10] now start moving the components into the
[12:12] position where we want them
[12:15] so the first thing i’ll do is turn off
[12:17] the rat’s nest just to make it slightly
[12:20] easier to see what we’re doing we can
[12:22] now see all our components and we’ll
[12:24] just move them into the positions where
[12:26] we want them so the first thing i’ll do
[12:28] is move the jumper down to the bottom of
[12:30] the tree and put it in the right
[12:31] position and then i’ll put the leds
[12:34] where i think it will be most elegantly
[12:36] arranged so we’ll move all of those into
[12:39] position
[12:40] and then we’ll start moving the
[12:41] resistors across as well
[12:43] so i’m trying to move the resistors to
[12:45] be close to the diodes that they
[12:47] correspond to
[12:51] so i’m just tweaking the positions
[12:53] slightly
[12:54] and i think we can add some more leds to
[12:57] this design
[12:58] so we’ll go back
[13:00] to the
[13:01] schematic and we’ll just duplicate these
[13:03] last two leds and resistors so we have
[13:06] more to put on our nice christmas tree
[13:09] so we duplicate them once again we can
[13:12] annotate the schematic by doing this so
[13:15] automatically assign numbers
[13:17] and now we can go back to the pcb
[13:20] and we can update our pcb which will
[13:22] bring in our new components
[13:27] so there’s our two new resistors and
[13:31] diodes so we’ll just move these into the
[13:33] correct positions as well
[13:36] so with all our components in the
[13:37] correct position i’m just going to move
[13:40] all of the leds to the other side of the
[13:42] board but i’m going to keep the label on
[13:44] this side of the board so that it
[13:46] doesn’t interfere with our nice design
[13:48] for the silk screen
[13:50] so we can jump into the 3d viewer to
[13:52] have a look at what our christmas tree
[13:54] is going to look like
[13:56] so let’s bring up the 3d viewer
[13:58] and it’s looking pretty good on this
[14:00] side let’s flip it over and see the
[14:03] other side which also looks quite good
[14:05] but if i look closely i can see that
[14:07] i’ve left one of the labels on the wrong
[14:10] silk screen so we can see a d and a
[14:13] number right there so switching back to
[14:16] the schematic we’ll just go and fix that
[14:18] up so we can zoom in and we can see our
[14:20] d13 there so we’ll just flip that to
[14:23] this side of the board and move it to
[14:25] somewhere convenient
[14:27] so that’s all our components done and
[14:29] our silk screen also finished so i just
[14:32] need to go down and
[14:34] fill in the details for the jumper so
[14:36] we’ll just move this label to a nice
[14:38] position
[14:39] rotate it and then change it so it says
[14:42] 5 volts and naught volts and that will
[14:45] tell us where to connect our power and
[14:47] what power to connect
[14:52] so we’re now ready to do the wiring up
[14:54] so i’ve switched back on the
[14:56] rat’s nest and i’ve also turned off the
[14:59] silk layers so we can see what we’re
[15:01] doing
[15:02] so what i normally do is have a look at
[15:04] the rat’s nest and just rotate the
[15:06] components so that it’s not so
[15:08] overlapping so in this case i’m only
[15:11] going to rotate the resistors because i
[15:13] want to keep all the diodes in the same
[15:14] orientation
[15:17] so now we can start
[15:18] wiring up
[15:20] so we’re going to start with the 5 volt
[15:22] line
[15:23] and now we move on to the
[15:25] zero volt line and fill in all the wires
[15:28] for that
[15:29] so now all the wires are done we’re
[15:31] ready to export our gerber files so i
[15:33] have run a drc first just to make sure
[15:36] everything is connected and now we just
[15:39] um plot the gerbers and then we also
[15:42] generate the drill files so generate
[15:45] drill file
[15:46] and what we’ll do is we’ll zip all these
[15:48] files up and then use an online gerber
[15:51] viewer just to check that it looks
[15:53] sensible
[15:54] so here’s our file in the gerber viewer
[15:56] we can view all of the details and just
[15:59] make sure that it does look sensible and
[16:02] we haven’t forgotten anything
[16:04] so
[16:04] i’m pretty happy with this so what i’ll
[16:06] do is i’ll now go on to pcb way and
[16:09] we’ll order the pcb
[16:12] so we can use the pcb instant quote and
[16:16] we just need to upload our gerber file
[16:19] so with our gerber file uploaded it also
[16:21] detects it’s a two layer board and it
[16:23] detects the size so i’m going to use a
[16:27] white solder resist mask so when we pick
[16:30] the white mask it will automatically
[16:32] default to a black silt screen and then
[16:36] we can just check out and then our order
[16:38] gets produced and gets shipped to us
[16:41] so there we go that’s our pcb christmas
[16:44] project done
[16:45] it’s pretty nice and i’m pretty pleased
[16:47] with the free gift i got from pcb way
[16:50] so
[16:51] i’ll be doing some more videos before
[16:53] christmas so there’ll be another one
[16:54] coming soon but if i don’t see you
[16:56] before then have a great christmas and
[16:58] i’ll see you in the new year