FREE Shipping on all orders over $99 & LIMITED TIME USE CODE "NEW" FOR 10% OFF

Control: Sprinkler Control MQTT OpenHAB ESP8266 Hardware

Sprinkler Control MQTT OpenHAB ESP8266

Hardware: 

 

Click to Download Sprinkler System Gerber

Hey guys Matt here from MKSmartHouse.com and in this video I am going to show you how to build the sprinkler system.
 
So, in this video we are going to go over all the parts required for the sprinkler system and then we are going to make it. To start off with the parts we are going to need 5 2 pin pcb terminals, 1 4 pin female header, male header strips that we can cut to length, 2 pin jumper, 6 330ohm resistors, 3 1N4001 Diodes, 3 2n2222 transistors, 5v to 3.3v regulator, ESP8266, Custom Printed circuit board more on that later, plastic enclosure, 3 5v relays, sprinkler valve power adapter, 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, dremel, drill and a hot glue gun. That is everything that we will need. The links to all the parts and tools will be over on my website link is 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.
 
1. 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.
2. 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, J2, J3, J4 and J5. Then solder them in.
 
If you want to know how to solder or how I solder then check out my guide for the door sensor because in that video I went over it in detail.
 
3. Next take the 4 pin female header and put it into J6 and solder it in. If the leads get long and stick out cut them with wire cutters.
4. Then take a strip of the male header and using the wire cutters make a header that is 3 pins long.
5. Take that 3 pin male header and solder it into J7.
6. Now take the 3 1N4001 diodes and bend both side so the two leads are parallel to each other.
 
When soldering diodes you want to match up the line on the diode with the line on the PCB.
 
7. Solder the diodes into slots D1, D2, and D3.
8. Now take the 6 330 ohm resistors and bend their leads the same way you did the diodes, except when putting in resistors it does not matter which way you put it in the slots.
9. Put the resistors into slots R1, R2, R3, R4, R5, and R6 and solder them in.
 
I know in the video you see two different sets of resistors with different values, just ignore them I messed up when recording, just know that they all should be 330 ohm.
 
10. Next up is the transistors, so take the three 2N222 transistors and solder them into slots Q1, Q2, and Q3.
 
When soldering the transistors you will need to spread their leads in order for them to go into the slots.
 
11. After that we are going to solder in the relays so grab the 3 5 volt relays and solder them into slots Relay 1, Relay 2, and Relay 3.
 
When soldering the relays you may have to adjust there leads a little and also press down onto the relay in order for it to fit snug so you can solder it.
 
12. 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.
 
13. I recommend putting flux on every single pad of the esp8266 and of the circuit board and then solder it in.
14. Now that everything is soldered take the 2 pin jumper and put it on the pins above PGM.
 
Now that the PCB is done lets move over to the enclosure because there are a couple of modifications we have to do it.
 
15. The first thing we have to do is make the standoffs shorter because with the relays the pcb is very tall so the case does not close. So grab a drill with a massive drill bit and simply drill each of the 4 standoffs down a little. I do not know exactly how much to drill down so just keep checking by putting the PCB in the case and trying to close it, if it closes then you are good if it does not close then keep drilling each stand off.
16. The second thing is make mounting holes, so grab a drill with a drill bit suitable for the screw you are going to be using for mounting, I am using a 4mm screw to mount the device so I grabbed a 4.5mm drill bit. Once you find your drill bit make two holes in the back of the case.
17. After that, I took a counter sink and countersunk the holes so that way when I mount the case the screws are close to flush with the case.
18. The third and last thing is we have to make a giant hole so we can plug the cables into the PCB through the case. To do this grab the PCB and put it in the case.
19. Then take a Dremel and barely engrave a line, marking where the holes on the terminal blocks are, this will be the guide we will use instead of keeping the PCB in the case with the risk of damaging components.
20. So take out the PCB and the use the Dremel and cut a line below the engraving.
21. Then take the Dremel and cut a line above the engraving.
22. After we have the two lines we have to remove the middle engraving so use the Dremel and stick it in the bottom cut and angle it up to cut that side loose, then do the same thing for the other side.
 
You should now have a giant hole in the side of the enclosure.
 
23. Put the PCB and see how it came out, you might have to go back in and fix the hole with the Dremel like I did.
 
Once you finished the hole the enclosure is now complete so you can leave the PCB in it.
 
Next we are going to work on the power cable to the device, not the sprinkler valve power cable because we will work on that in the final installation video. No, I am talking about the 5 volt power cable.
 
24. First thing we have to do is take the 2 conductor 22 Gauge cable and cut it to length, I cut mine the same length as the sprinkler valve power adapter.
25. Then take one end of the wire and strip it to expose the 2 conductors.
26. 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.
27. Next take the helping hands and put the 22 gauge wire in one of them and the usb connector in the other.
28. Then solder the black wire to the far left pin and the red wire to the far right pin.
29. 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.
 
30. 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.
31. 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.
 
That is it for the hardware of the actual device now all it needs is some software which will be 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!