If you're interested in electronics or want to learn electronics I'll not only show you
a 3D print for holding the battery box on a snap circuits but I'll show you how you can
use tinkercad to simulate circuits and then produce something that'll allow you to make
a shield for an arduino. I'll show you all the steps on today's Filament Friday
This video is sponsored by pcbway. PCB prototype the easy way with a
full featured custom printed circuit board prototype service from pcbway. Filament
Friday is also brought to you every week by the generous donations of these patreon supporters.
Many years ago I wrote this book arduino: a beginner's guide to programming electronics.
It's got like 13 projects to help you get started learning electronics and programming.
After this book was released, snap circuits came out with this snapino. It's got an arduino module
in it plus all the components and the manual to build 20 projects with the code and everything.
It's a great place to start to get a kid started in electronics and that's really a kid from five
to ninety five years old. Because it's a a lot of fun to play with and under fifty dollars.
Very very affordable. And now with tinkercad the same software I use to design all my 3D prints,
you can do circuits. You can build a circuit, you can write the code, you can simulate it
and then when you're ready transfer the code to this and actually run it on hardware. It's
really a great platform to learn electronics. So while I was 3D printing something for this
I found another feature. Let me tell you the whole story how I got from here to an arduino shield.
This is how it started I had a loose battery box so I went into tinkercad and designed a
new bracket to hold the battery box this thing will just snap into the base of the snap circuits
just like this and then the battery box holds in place. So now I can pick this thing up move it and
the battery stays in place. While I was still in tinkercad I want to try out the circuits feature.
I've used this a few times in the past but now I want to try an actual circuit from the snapino
kit. So I found this one which they call stoplight which is basically a traffic light. Controls three
leds and includes the code. So I'm gonna build this in tinkercad. I click on create new circuit
bring in the arduino and then I'm gonna build this schematic right here but the pins d9 d10 and d11
that are on the snapino are on the opposite side so I need to rotate the arduino and I
use the rotate tool. Now d9 d10 and d11 are on the bottom. Now i'll bring in my LEDs. First a red one
and then I'll bring in another LED and change the color to yellow and then I'll bring a third
one in and we'll make that one green. And I made sure that the anodes are at the top
and the cathodes are at the bottom. Now the snap circuit leds have a resistor built in.
I need to add them here so I'm going to add 100 ohm resistor to each of these. This would actually
work in the computer if I didn't do this but I wanted it for another reason I'll show you. So
pin 9 pin 10 and 11 are connected to the resistors and then I'll finish the rest of the connections
and then finally the ground wire coming from the arduino to all the cathodes of the LEDs.
Once I've got this now I need to write some code to run it. So you click on the code button and you
can write in these blocks which seems easier, and you can also do a mode where it's blocks and text,
but I highly recommend you learn the text mode and that's what the manual gives you in
snap circuits. So select the text mode and now you can type it in. Well I already typed it in I'm
not going to show you that so I'm just going to paste it in here and here's the program that was
part of the manual. So it's got a delay for one second you set up the connections for your LEDs.
Make them all outputs and then here's the loop that controls the green the yellow and the
red. So we can come up to the top here click on start simulation and it's going to run this code
and actually light the LEDs. The green, the yellow, the red. The green and the red light for
one second the yellow for half a second so let's change that. Let's change make it two seconds
because this will run better if I want to build this in snap circuits.
So it's two seconds on the green two seconds on the red one second on the yellow.
So let's take this and build it in the snap circuit so here's the schematic.
I'm gonna build it first the snapino then the ground bus connect that to ground then the LEDs.
And this actually built quicker than building it on a computer. And it was a lot more fun.
So there's a schematic now I need to get the code for that. I launched the free ide for Arduino
on my computer and then I connect the USB cable that comes with the snapino kit to the computer.
Now I'm not going to retype the code I'm just going to copy it from tInkercad and then paste
it into the Arduino screen on my computer. So I'll just highlight all this paste it in place
and then I can actually click on verify to make sure I didn't screw anything up
and it compiled with no errors so we're good. So now I have to make connections proper connections
to the Arduino so go up to tools and I'll select the Arduino board and then also select the proper
port that I'm connected to USB port and we're ready to upload. So I click on the upload button
it compiles again and then programs the snapino. And here it is the same program running
in actual hardware on the snapino setup. Here's where it gets really interesting. In tinkercad
you can export the circuit. You're exporting the eagle.brd file or circuit board layout file
so I can download this and then open fusion 360, another 3d printing tool, and say new electronic
design. Then I click on this icon here at the right and that's going to bring in the board
file. I select it from my computer and there's the one I downloaded from tinkercad. I open it up
and here it is all this the board layout for a shield all the components the rat's nest
showing the connections. So now all I have to do is place the components where I want them
on the shield and then I just need to make connections to them. So once I got all the
components in place then I laid the traces to make the connections. And then I moved from design
to manufacturing with fusion 360 and I select the cam processor. And here's where it produces
all the files in rs 274 x gerber format. The top layer bottom layer the drill file,
everything I need so I click on export as dot zip and process the job and download that file.
Now I can take those files and because I have a pcb mill from bantam tools I can load it into
their software and I can mill this board and that's what I did here. I just milled the board
using this tool and here's the result. It's just a single sided board. It came out really good
so I'm gonna put the components in this and build up my shield. I had all the components in my
electronics lab and here's the finished shield all soldered up with all the LEDs. So let's plug this
back into snapino which is already programmed and there it is running without all the extra
components. In fact I could plug this directly in to a regular arduino and it works just fine.
And you don't have to have an expensive pcb mill to do this you can do with a low-cost cnc.
I'm working on a video to show you how to do that but even cheaper, go to pcbway.com. You can get 10
circuit boards for five dollars from pcbway.com. Just use those same files,
upload them to pcbway.com and get 10 boards for five dollars. Check them out pcbway.com. I know
this wasn't a typical Filament Friday where I give you a bunch of 3D printing tips, but everything
you're learning about 3D printing can easily apply to other maker technologies such as electronics,
cnc, and making products. So you can CNC a board after you've done the
electronics and maybe 3D print a case and actually produce a product you can sell.
There's so many things you can do once you understand how this technology works. If you
like what I'm doing here maybe check out some of the other videos popping up. And if nothing
else click on the CHEP logo and subscribe. I'll see you next time right here at Filament Friday.