Hey guys Matt here from MKSmartHouse.com and in this video I am going to show you how to
build the door sensor.
[Intro]
So, in this video we are going to go over all the parts required for the door sensor
and then we are going to make it.
To start off with the parts we are going to need 2 2 pin pcb terminals, 1 4 pin female
header, male header strips that we can cut to length, 2 pin jumper, 10k resistor, 5v
to 3.3v regulator, ESP8266, Custom Printed circuit board more on that later, plastic
enclosure, magnetic switch sensor, 2 conductor 22 Gauge Cable, Male usb connector and a 5v
USB Wall adapter.
The wall adapter can be any usb 5v adapter like a phone charger.
For tools we are going to need a soldering iron with ST7 tip, flux, steel wire, solder,
wall tac, PCB holder, helping hands, wire strippers, small wire cutters, small flat
screwdriver and a hot glue gun.
That is everything that we will need.
The links to all the parts and tools will be in the description.
In the beginning I did say custom circuit board because to make this easier I designed
a custom circuit board so that way not only will it be very stable and have strong connections
with no guess work in assembling it but, also so I can make many of them really easily for
my house.
I have provided the gerber file in the description as well as where to get it made.
Also, I have made a video on my website showing how to order the custom circuit board from
iTead so that way there is nothing to be scared of and you know exactly how to order it.
Since all the connections are already made on the circuit board all we have to do is
solder the components on to the board.
First let's take the circuit board and put it into the circuit board holder.
If you look closely at the circuit board you will see that there are labels next to the
component slots, when I say where to put the component that is what I will be referring
to.
I like to solder from the less sensitive components to to most sensitive so, let's start off with
the 2 pin terminals, take the terminals and put them in J1 and J4.
Then take the wall tac and temporarily secure the component.
After flip the pcb so we can start soldering.
When soldering I recommend taking the flux and putting some on the on the soldering area,
so it makes a better solder connection.
Then take your soldering Iron and put it on the component and put the solder behind the
component.
Clean the soldering iron with the steel wire often.
Once the solder is cooled remove the wall tac from the component.
Great we soldered our first components!
To make this guide simple I won't repeat myself with the wall tac, flux and how to solder
instead I will just refer to the whole process as soldering.
Next take the 4 pin female header and put it into J2 and solder it in.
If the leads get long and stick out cut them with wire cutters.
Then take a strip of the male header and using the wire cutters make a header that is 3 pins
long.
Take that 3 pin male header and solder it into J3.
Now take the 10K resistor and bend one side so the two leads are parallel to each other
and solder it into slot R1.
Next take the 5v to 3.3v regulator and match up its leads to the board and solder it in.
Great now we have one component left to solder and that is the esp8266.
I recommend putting flux on every single pad of the esp8266 and of the circuit board and
then solder it in.
Now that everything is soldered take the 2 pin jumper and put it on the pins above PGM.
Next take the Magnetic Switch Sensor and strip its leads and fold them over so they are touching
the wire insulation.
Then loosen the terminal screws where it says Sensor Input using the small flat screw driver.
Now take the leads of the Switch Sensor and put it in the holes of the terminal, it does
not matter which lead goes into which hole.
Then take the screwdriver and tighten the screws.
Now we are going to make the power cable for the device so go over to where you are going
to have the device and cut how much 22 gauge wire you think you are going to need for the
device to the nearest outlet.
Then take one end of the wire and strip it to expose the 2 conductors.
Strip a little of the each conductor and then take wire boot and plastic boot of the usb
connector and slide it over the 2 conductors.
Next take the helping hands and put the 22 gauge wire in one of them and the usb connector
in the other.
Then solder the black wire to the far left pin and the red wire to the far right pin.
Now put some hot glue on the connector and slide over the plastic boot and the wire boot.
If you want you can connect the USB to the 5v wall adapter but do not plug it into the
wall.
Almost done, strip the other end of the 22 gauge cable and then loosen the two screws
on the 2 pin terminal above the 5v.
Then take the red wire and put it into the hole parallel to where it says + and the black
into the hole above the - symbol and tighten the screws.
Finally take the PCB and put it into the plastic enclosure, but don’t put on the lid yet
because we still need to install its software which is what we will cover in the next video.
Alright thank you for watching and If you have any questions leave them in the comments
section below or head over to mksmarthouse.com/forum where you have a better chance of it getting
answered.
Good Bye!