1
00:00:00,180 --> 00:00:06,630
So you've already seen the schematic that makes up the circuit for the terrorism controller and I've

2
00:00:06,630 --> 00:00:12,480
also shown you how to implement it using a mini breadboard or a larger sized breadboard.

3
00:00:12,780 --> 00:00:16,230
Now let's have a look at the PC version of the same circuit.

4
00:00:16,770 --> 00:00:25,530
So here in Kickout, switch over to BCB New and the PC be for this circuit looks, I guess it's almost

5
00:00:25,530 --> 00:00:27,080
a perfect rectangle.

6
00:00:27,090 --> 00:00:30,750
So it's a shape that I think makes it easy to create a box.

7
00:00:31,050 --> 00:00:34,380
So I wanted to go for this shape in the middle.

8
00:00:34,600 --> 00:00:38,850
It's going to clean up a few things, actually show you the 3D version.

9
00:00:40,310 --> 00:00:49,510
The 3D view of the PCB looks like this in the middle of the bay, of all of the components that the

10
00:00:49,510 --> 00:00:56,380
user will not have to interact with, and as you'll see in a minute, that the ESB 32 deficit will be

11
00:00:56,380 --> 00:01:01,930
on its head and will cover all of these resistors, capacitors in the tip, 122, of course, a tip

12
00:01:01,930 --> 00:01:02,890
122.

13
00:01:03,430 --> 00:01:08,740
You can bend its pins down so that it's flat on the PSP.

14
00:01:09,070 --> 00:01:16,660
They won't be taking any space down the bottom of got the input of the barrel connector for External

15
00:01:16,660 --> 00:01:25,590
Power, the connector for the DHT 22 with a long wires and then the battery and the pump motor crude

16
00:01:25,660 --> 00:01:26,740
terminals as well.

17
00:01:27,110 --> 00:01:33,310
And on the other side of the indicator, the jumpers, so that we can get the appropriate voltage to

18
00:01:33,310 --> 00:01:34,750
measure for the MCU.

19
00:01:35,080 --> 00:01:38,590
And the moisture sensor is plugged in here.

20
00:01:38,600 --> 00:01:46,270
The only difference from what you see in this 3D representation versus the actual one is that this connector

21
00:01:46,270 --> 00:01:49,030
is a female header on the other side.

22
00:01:49,040 --> 00:01:52,290
I've got instructions on how to use the compass here.

23
00:01:52,900 --> 00:01:56,620
Let's have a look at the actual PSP now on my bench.

24
00:01:56,920 --> 00:02:03,850
So here's the implementation of the circuit in the form of a PC B and looks like this.

25
00:02:06,390 --> 00:02:12,570
It's quite almost a rectangular sibiya, having designed a case for it yet, but will be doing so as

26
00:02:12,570 --> 00:02:14,230
well as you can see it again.

27
00:02:14,280 --> 00:02:19,470
So we're seeing the first part of this lecture is that they decided to put all of the linear components

28
00:02:19,470 --> 00:02:22,740
are basically the things that the user would not be interacting with in the middle.

29
00:02:23,100 --> 00:02:31,680
And then I've got the two headers along the sides where I can mount the EU, the two with three pins

30
00:02:31,680 --> 00:02:40,560
on it, and the rest are just inputs and outputs for the indicators of the header for the moisture sensor,

31
00:02:40,920 --> 00:02:48,720
the barrel jack here for power input, the jumpers and the screw terminals for the motor and its battery.

32
00:02:49,050 --> 00:02:54,540
And also should point out that the schematic and the PITIABLY implementation and design that I showed

33
00:02:54,540 --> 00:02:57,420
you in the first part of this lecture is version two.

34
00:02:57,630 --> 00:02:58,560
This is vision one.

35
00:02:58,560 --> 00:03:00,660
And I haven't got version two yet.

36
00:03:00,840 --> 00:03:06,720
The main difference between version one and version two is that in version two, I've also got provision

37
00:03:06,720 --> 00:03:09,870
for the DHT 22 cents.

38
00:03:09,870 --> 00:03:12,420
I've got an additional screw terminal for that.

39
00:03:13,080 --> 00:03:13,470
All right.

40
00:03:13,980 --> 00:03:21,220
Now let's have a look at the version of the bill with the components attached to it in populated areas.

41
00:03:21,350 --> 00:03:25,100
They can see in the middle of code or the linear components.

42
00:03:25,240 --> 00:03:31,200
There is the tip 122 nicely fitting in the space available for it.

43
00:03:31,510 --> 00:03:35,790
I've got the resistors and the diet here for the motor on the other side.

44
00:03:36,180 --> 00:03:42,420
And then my thirty eight pin is P 32 module fits just nicely on it.

45
00:03:42,450 --> 00:03:49,470
You can see that of course the jumper wire, this is the, the sensor that did twenty two cents.

46
00:03:49,470 --> 00:03:55,800
So I had to do a hack here because this is version one is a set and at that point I had not decided

47
00:03:55,800 --> 00:03:57,300
to use it due to twenty two.

48
00:03:57,540 --> 00:04:07,890
And I decided that a little later after I decided to include it to the 22 sensor, I redesigned or altered

49
00:04:07,890 --> 00:04:15,360
the board so that its screw terminal three pens would go down here where now we've got the IS and then

50
00:04:15,360 --> 00:04:17,430
I move the jumpers up on the top side.

51
00:04:17,430 --> 00:04:23,340
And that allowed me to actually make everything fit without changing the dimensions of the board in

52
00:04:23,340 --> 00:04:24,240
this implementation.

53
00:04:24,240 --> 00:04:28,410
I'm simply going to attach my board right there.

54
00:04:30,700 --> 00:04:35,550
Gently, without moving any of the wires right out.

55
00:04:37,120 --> 00:04:38,230
Snaps in place.

56
00:04:43,810 --> 00:04:44,930
It looks like this.

57
00:04:51,880 --> 00:04:55,810
I remove that temporarily so that I can stop that one, just kill.

58
00:04:58,950 --> 00:05:00,960
OK, and then the sensor goes back on.

59
00:05:05,410 --> 00:05:06,070
And.

60
00:05:07,880 --> 00:05:11,750
Put the phone back on to this terminal here to 22.

61
00:05:11,870 --> 00:05:14,480
All right, so it's a little hack, but it works.

62
00:05:14,520 --> 00:05:20,770
Now, I'm going to redo this once I receive the Bisbee's from BCB way on the motor.

63
00:05:20,780 --> 00:05:27,740
I have attached a large capacitor to use as bypass, just providing a little bit of extra power when

64
00:05:27,740 --> 00:05:29,230
the motor starts to spin.

65
00:05:29,900 --> 00:05:37,790
And then on the other side, I have also saw that a smaller ceramic capacitor to help me with noise

66
00:05:38,600 --> 00:05:40,760
so that we don't have too much interference.

67
00:05:41,000 --> 00:05:47,930
I discovered by testing that when the motor spins, especially this one, not the actual pump, it's

68
00:05:47,930 --> 00:05:55,010
a little smaller, but this one when it spins, I discovered that it was causing interference to the

69
00:05:55,010 --> 00:05:57,920
DC 22 sensor so it wasn't able to take readings out of it.

70
00:05:58,430 --> 00:06:03,190
So that's why I attached this ceramic capacitor.

71
00:06:03,200 --> 00:06:05,720
It helps with a noise on the data line.

72
00:06:07,430 --> 00:06:07,760
All right.

73
00:06:07,770 --> 00:06:10,690
So that's all there is about the pitcher beer.

74
00:06:10,700 --> 00:06:14,270
I'm going to plug it in now to show you how it works, so.

75
00:06:15,860 --> 00:06:18,420
You go, it's up and running.

76
00:06:18,560 --> 00:06:25,700
Now, let's say that the soil needs a bit of moisture.

77
00:06:25,760 --> 00:06:34,940
So if the soil humidity drops below a certain level that I have already programmed in our note read,

78
00:06:35,750 --> 00:06:36,770
I'm going to simulate that.

79
00:06:36,770 --> 00:06:43,820
But simply taking the sensor out of the soil back about half until the motor begins to spin.

80
00:06:50,100 --> 00:06:51,510
For the sense of back into the soil.

81
00:06:53,220 --> 00:07:00,390
It's gone above a threshold, so actually that the reading dropped below the threshold, so the motor

82
00:07:00,540 --> 00:07:02,730
stopped spinning, couldn't take it out again.

83
00:07:04,940 --> 00:07:09,470
The motor starts simulating water now going back into.

84
00:07:10,420 --> 00:07:11,320
The terrarium.

85
00:07:17,160 --> 00:07:24,580
All right, so the motor will operate for up to five seconds before a new value is read and then evaluated

86
00:07:24,960 --> 00:07:28,920
to decide whether the pump should continue to operate for a bit longer.

87
00:07:30,350 --> 00:07:35,250
I also want to show you what the water pump looks like and how it works.

88
00:07:35,780 --> 00:07:38,000
So this is a submersible water pump.

89
00:07:38,180 --> 00:07:39,980
It operates at around five votes.

90
00:07:39,980 --> 00:07:42,730
It can go up to maybe nine without any issues.

91
00:07:42,950 --> 00:07:48,320
And of course, the more voltage she can provide, the faster the motor inside this pump spins to,

92
00:07:48,320 --> 00:07:52,410
the more volume of water it can move around this part here.

93
00:07:52,430 --> 00:07:55,850
This is the intake and this is where the water comes out of.

94
00:07:56,210 --> 00:07:59,720
And you just need to connect it to a hose like this.

95
00:07:59,750 --> 00:08:06,500
You can purchase this online to the length that you want and attach it to the outlet.

96
00:08:06,890 --> 00:08:17,900
Then you just submerge the pump into the water reserve while the lead is not that long and you will

97
00:08:17,900 --> 00:08:27,320
need to extend it, which is what I've done here so that you don't have to have your baby directly next

98
00:08:27,320 --> 00:08:29,470
to the pump and the water reservoir.

99
00:08:30,500 --> 00:08:32,900
So I'm going to give you a little demonstration.

100
00:08:32,900 --> 00:08:38,860
I have connected the pump to my battery power supply.

101
00:08:38,990 --> 00:08:41,270
That's just six votes in here.

102
00:08:41,540 --> 00:08:46,750
There are four batteries alkaline, so that gives me about six votes when they're fully charged and

103
00:08:46,760 --> 00:08:47,660
fresh batteries.

104
00:08:48,440 --> 00:08:49,520
I'm going to switch it off.

105
00:08:49,880 --> 00:08:56,250
Normally, I would put the hose into the terrarium, but of course, it's already water and that would

106
00:08:56,280 --> 00:08:56,840
flooded.

107
00:08:56,960 --> 00:09:02,320
So I'm going to recycle the water back into the job that contains it.

108
00:09:03,170 --> 00:09:06,920
So I'll switch it on and there's a water coming out.

109
00:09:07,490 --> 00:09:12,320
The sequence is quite a bit of volume there.

110
00:09:12,320 --> 00:09:13,760
There's a lot of water coming out.

111
00:09:13,760 --> 00:09:18,230
And that's why you need to be very careful when you're actually experimenting and working with this

112
00:09:18,230 --> 00:09:27,560
to to make sure that the pump is turned off even in case where, for example, you lose power in your

113
00:09:28,460 --> 00:09:34,220
in your controller or there is no communication between the controller and no read.

114
00:09:34,460 --> 00:09:39,560
And in my sketch for the SB 32, I've got a failsafe way.

115
00:09:39,560 --> 00:09:44,360
If there's no communication after five seconds, then the pump will automatically turn off.

116
00:09:45,320 --> 00:09:46,490
So you go.

117
00:09:46,520 --> 00:09:48,170
This is all there is to it.

118
00:09:48,380 --> 00:09:56,720
Normally, once the testing and prototyping phase is finished, you will connect the wires, the power,

119
00:09:57,050 --> 00:10:00,770
the pump directly to your PC.

120
00:10:00,770 --> 00:10:03,860
Be where right now I've got the motor connected to.
