WEBVTT

00:00.140 --> 00:05.540
And I know it's quite a lot of videos before we actually do the circuit, but there were a few things

00:05.540 --> 00:08.240
that you needed to know before you can do anything.

00:08.270 --> 00:13.430
Don't worry, because after this section, when we continue to work on the circuit, we won't need to

00:13.430 --> 00:17.270
do any setup and we will be able to dive directly right in.

00:17.300 --> 00:23.930
So when I do a circuit or if I improve the current one, I will first use this software tool here to

00:23.960 --> 00:24.890
design the circuit.

00:24.890 --> 00:30.200
And then I will also show you in the same video the real circuit on my real breadboard and Raspberry

00:30.200 --> 00:32.390
Pi for each circuit.

00:32.420 --> 00:38.540
Also on the corresponding lesson, you can download the image of the circuit that I'm doing here, so

00:38.540 --> 00:43.100
I recommend you to watch the entire video before you start the circuit by yourself.

00:43.100 --> 00:45.080
And just a quick parenthesis before we start.

00:45.080 --> 00:48.170
So I'm using this software because it will be easier to explain.

00:48.200 --> 00:48.410
Okay.

00:48.440 --> 00:50.780
The name is called Fritzing.

00:50.810 --> 00:53.270
You can find it online if you want.

00:53.300 --> 00:55.100
You absolutely don't need this.

00:55.130 --> 00:58.760
Okay, here's the website of fritzing.org.

00:59.000 --> 01:00.980
As you can see now it is paid.

01:00.980 --> 01:04.600
So if you want this tool you have to pay here about 10 USD.

01:04.870 --> 01:09.790
I'm using a previous version that was free at the time, but anyway, it was just to show you the tool

01:09.790 --> 01:10.450
I'm using.

01:10.450 --> 01:12.490
You absolutely don't need this tool.

01:12.520 --> 01:15.850
Okay, I'm just using it because I think it's a better teaching experience.

01:15.850 --> 01:18.580
And anyway, you can download the image.

01:18.610 --> 01:18.850
Okay.

01:18.880 --> 01:21.880
With this lesson you can download the image with the secret.

01:21.880 --> 01:23.650
So don't worry about that.

01:23.650 --> 01:25.240
So let's start the secret.

01:25.270 --> 01:29.290
Here I have my breadboard okay I have my Raspberry Pi.

01:29.320 --> 01:31.630
I have an LED okay.

01:31.660 --> 01:34.270
And I have my one kilo ohm resistor.

01:34.270 --> 01:39.850
As you can see here, I have brown, black and red because it's a four band resistor.

01:39.850 --> 01:42.940
And then the tolerance here doesn't really matter.

01:42.940 --> 01:48.280
And so the first thing we are going to do is to actually connect the ground.

01:48.280 --> 01:54.070
So for the ground in the breadboard we will use that line here that blue line.

01:54.070 --> 01:57.730
And then what pin will we use on the Raspberry Pi.

01:57.760 --> 01:59.590
Well you will have.

01:59.590 --> 02:02.590
So you see we have two different lines of Gpio okay.

02:02.620 --> 02:05.170
So we have 20 here and 20 there.

02:05.170 --> 02:09.480
We're going to go to the line that's closest, that's on the inside of the Raspberry Pi.

02:09.480 --> 02:11.160
And we're going to count to five.

02:11.160 --> 02:14.940
So one, two, three, four and five.

02:14.970 --> 02:18.450
This here this is a ground pin.

02:18.480 --> 02:18.990
Okay.

02:18.990 --> 02:26.910
So I'm just going to take my wire and connect it to that line on the first.

02:26.940 --> 02:28.770
On the second it doesn't really matter.

02:29.070 --> 02:32.040
And I can just do that.

02:34.440 --> 02:38.310
Okay I make it look nicer when I take the screenshot.

02:38.310 --> 02:41.820
And I'm just going to use a black wire.

02:42.300 --> 02:42.870
Okay.

02:42.900 --> 02:44.220
We use black usually.

02:44.250 --> 02:44.490
Okay.

02:44.520 --> 02:47.130
That's the convention for ground.

02:47.160 --> 02:48.000
We use black.

02:48.000 --> 02:51.540
So you know that when you see a black wire this is for the ground.

02:51.540 --> 02:53.550
So we don't make any confusion.

02:53.580 --> 02:53.760
Okay.

02:53.760 --> 02:55.980
And you could connect this to any pin.

02:56.010 --> 02:56.280
Okay.

02:56.310 --> 02:59.910
As you can see any pin on that line they are all connected together.

02:59.910 --> 03:00.840
So it doesn't matter.

03:00.870 --> 03:01.140
Okay.

03:01.170 --> 03:05.730
So now the ground of the breadboard here and the ground of the Raspberry Pi are connected together.

03:05.760 --> 03:06.360
Good.

03:06.390 --> 03:08.100
Now we're going to take our LED.

03:08.400 --> 03:14.760
And you can see that the LED has two legs, but one of them is shorter than the other one.

03:14.760 --> 03:20.490
So the short side is going to be the negative side and the long side.

03:20.490 --> 03:24.390
So the long leg is going to be the positive side.

03:24.390 --> 03:29.730
So here I'm going to put my uh LED here on the circuit.

03:29.730 --> 03:31.440
I'm going to go a bit more on the left.

03:31.440 --> 03:33.810
So we have more space for the following.

03:33.810 --> 03:37.860
And I'm going to connect the shorter leg to the ground.

03:37.860 --> 03:38.940
So how to do this.

03:38.940 --> 03:43.140
As you can see here, all those dots here are connected vertically.

03:43.800 --> 03:45.270
So I will take one of the dots.

03:45.300 --> 03:51.990
So for example that one or that one or that one and just connect it to the ground with a black wire

03:52.020 --> 03:52.230
here.

03:52.230 --> 03:57.180
So ground is connected here and is connected there on the other side of the LED.

03:57.180 --> 04:01.500
So on the longer leg I will take my resistor.

04:01.500 --> 04:06.540
And I told you previously about the correct way to read the resistor from which side to start.

04:06.540 --> 04:11.920
But when you connect this resistor to a circuit there is no positive or negative side.

04:11.950 --> 04:12.100
Okay.

04:12.130 --> 04:22.090
You can just take your resistor and connect one leg to the positive side here of the LED and another

04:22.090 --> 04:25.870
leg that you connect to any other dot.

04:25.900 --> 04:28.990
Here you can see that on a different column.

04:28.990 --> 04:38.620
And then to close this circuit well we are going to connect that side here of the resistor to this pin

04:38.620 --> 04:39.100
right here.

04:39.100 --> 04:43.150
So the one next to the ground that is called Gpio 17.

04:43.150 --> 04:47.710
So you can see here on the image we want the Gpio 17.

04:47.740 --> 04:50.770
And so there are two ways to represent pins.

04:50.770 --> 04:55.210
You can see we have the gray numbers with 12345 etc..

04:55.210 --> 04:57.700
So the GND here would be the pin number nine.

04:57.700 --> 05:00.370
And this one would be the pin number 11.

05:00.370 --> 05:02.920
But we're going to use the alternate names.

05:02.920 --> 05:05.110
So here it's going to be GND.

05:05.110 --> 05:08.110
And this one is going to be Gpio 17 okay.

05:08.110 --> 05:11.290
That's going to be important for when we write the code.

05:11.440 --> 05:11.920
And just.

05:11.950 --> 05:17.850
Okay I see here it's Raspberry Pi four model B, I'm using a Raspberry Pi five, but the Gpio panel

05:17.850 --> 05:20.760
is the same between those two Raspberry Pi boards.

05:20.760 --> 05:22.950
So for the circuit it doesn't matter here okay.

05:22.980 --> 05:24.420
So don't be confused with this name.

05:24.420 --> 05:33.750
So what I will do is I will take this Gpio and connect to that here that leg of the resistor and use

05:33.780 --> 05:35.130
a I'm going to use a.

05:35.160 --> 05:37.800
So here I'm going to use a yellow cable.

05:37.830 --> 05:40.170
So make sure you don't use black for this.

05:40.170 --> 05:44.070
And also don't use red but you can use any color you want okay.

05:44.100 --> 05:45.810
So in the end the circuit is complete.

05:45.810 --> 05:47.640
You can see we start from the ground.

05:47.670 --> 05:48.870
We go here.

05:48.900 --> 05:53.490
Ground is connected to the shorter leg of the LED then goes through the LED.

05:53.790 --> 05:56.940
The longer leg is connected to one side of the resistor.

05:56.970 --> 06:02.850
The other side of the resistor is connected to this Gpio number 17 and the circuit is complete.

06:02.850 --> 06:06.210
So double check especially the connection you make here okay.

06:06.240 --> 06:08.760
Double check that everything is correctly placed.

06:09.330 --> 06:11.400
And here is the real circuit.

06:11.400 --> 06:12.450
So what do I have here?

06:12.450 --> 06:18.440
I have my Raspberry Pi first with the with the case, you might not have a case.

06:18.470 --> 06:20.510
So first make sure that you unplug.

06:20.540 --> 06:20.930
Okay.

06:20.960 --> 06:22.070
The Raspberry Pi.

06:22.070 --> 06:23.930
So it's powered off completely.

06:23.960 --> 06:28.250
If you don't have a case I would recommend to remove the SD card.

06:28.280 --> 06:28.910
Okay.

06:28.910 --> 06:34.520
And then plug it back at the end here because the case is protecting it I can leave it there.

06:34.550 --> 06:34.820
Okay.

06:34.850 --> 06:38.990
And I have some space here to plug the wires for the Gpio panel.

06:38.990 --> 06:41.720
So I'm going to use the case as is.

06:42.110 --> 06:42.380
Okay.

06:42.410 --> 06:43.550
That's not going to be a problem.

06:43.550 --> 06:47.300
I have my breadboard and then I have a black wire.

06:47.690 --> 06:50.570
I also have a yellow wire.

06:50.570 --> 06:58.880
So those two are male to female wires I have my LED which you can see has a shorter leg and a longer

06:58.880 --> 06:59.480
leg.

06:59.510 --> 06:59.720
Okay.

06:59.750 --> 07:02.810
So the shorter leg here is on the left.

07:03.380 --> 07:04.550
And then I have my resistor.

07:04.550 --> 07:07.910
So the resistor I just showed you before what.

07:08.180 --> 07:09.980
Either side okay.

07:10.010 --> 07:10.640
It doesn't matter.

07:10.640 --> 07:13.130
You can plug any side where you want.

07:13.160 --> 07:15.380
It doesn't have any direction.

07:16.160 --> 07:19.630
So I will start with the ground and plug the ground.

07:19.630 --> 07:24.850
So I will count here one, 2345 on the inside.

07:25.720 --> 07:26.020
Okay.

07:26.050 --> 07:27.910
So 12345.

07:27.940 --> 07:32.560
Again I make sure that it is plugged to the right place.

07:32.560 --> 07:38.140
And then I will start for example here plug on that minus line.

07:38.590 --> 07:40.540
So now the ground is connected.

07:40.570 --> 07:41.320
Great.

07:41.350 --> 07:43.210
I will take my LED.

07:43.690 --> 07:50.830
And what I did what I did in the, in the software is that I just plug the LED like this for example

07:50.860 --> 07:53.920
between two between two columns.

07:53.920 --> 08:01.480
And then I have another black wire between the shorter leg and the minus line.

08:01.480 --> 08:08.500
But what I can do here is going to be simpler is I'm just going to put directly the shorter side.

08:08.560 --> 08:14.380
So the shorter leg directly on the ground just like that.

08:14.620 --> 08:17.380
And then plug this one like this.

08:18.520 --> 08:18.760
Okay.

08:18.790 --> 08:28.380
So you can see the shorter leg is directly on the ground, and the longer leg is in another column here

08:28.380 --> 08:29.490
in the breadboard.

08:29.520 --> 08:30.540
So that's the same thing.

08:30.540 --> 08:34.440
We just save one wire that we don't really need for that.

08:35.670 --> 08:41.850
Then I will take my resistor and plug it between that leg of the LEDs.

08:41.850 --> 08:45.630
So make sure it's on the same column and on another column.

08:45.630 --> 08:47.370
So I'm just going to do like this.

08:48.480 --> 08:48.630
Okay.

08:48.630 --> 08:52.620
You can see here how the resistor.

08:53.100 --> 08:56.130
And finally I'm going to take this wire.

08:56.130 --> 08:57.750
So it could be any color.

08:57.780 --> 09:02.490
Just avoid black and red because black is going to be used for ground and red for power.

09:02.490 --> 09:05.190
So we try to keep this consistent.

09:05.190 --> 09:08.280
But then for other connections it doesn't really matter.

09:08.280 --> 09:09.660
And I'm going to connect.

09:09.660 --> 09:11.850
So one side of the resistor here.

09:11.850 --> 09:18.690
So the same column to the Gpio number 17 which should be just right to the ground.

09:18.690 --> 09:20.400
So that's going to be that one here.

09:22.910 --> 09:33.230
Okay, so I check again 12345 on the inside for the ground and then six for the, uh, wire here.

09:33.500 --> 09:35.180
And the circuit is finished.

09:35.180 --> 09:42.260
You see, I have put everything at the top here on one short part of my breadboard, so I have enough

09:42.260 --> 09:46.730
space for all the other LEDs and push buttons and other stuff we're going to add later.

09:46.760 --> 09:47.180
Okay.

09:47.210 --> 09:49.970
And to recap, so we have the ground going here.

09:49.970 --> 09:53.240
And then the shorter leg of the LED is connected to the ground.

09:53.270 --> 10:00.590
The longer leg is connected to another column that is also connected with one side of the resistor.

10:00.740 --> 10:07.010
And then the other side of the resistor is connected to Gpio number 17 and the circuit is done.

10:07.010 --> 10:13.490
So now you can put the SD card back if you removed it and put the case back, everything back.

10:13.490 --> 10:18.890
And we can now plug the Raspberry Pi again.

10:18.920 --> 10:20.030
It's going to boot.

10:20.030 --> 10:24.500
And now we can program our Gpio and program our LED.
