Introduction: Web Controlling Your Water Irrigation

In this instructables I'm going to control a 12 volt solenoid via a webinterface with a wemos D1 mini this makes it possible to control all of your solenoids from a central webpage. I will also include the code and the schematic for 2 solenoid so you can expand as you like. In the future I will include a PCB you can order.

Step 1: Needed

Step 2: Wiring

In the image above you see how to wire everything. You also have to apply 12v to the powerrail where the solenoids are connected and 5v to the powerrail of the wemos. Don't let the 5v power connected while programming this can destroy your wemos! I only have one 12v solenoid but I included a second solenoid as an example in the case you wan't to drive more then one solenoid.

Step 3: Coding

  • Connect the usb cable (if 5V isn't connected to the wemos board)
  • Download the code
  • Open file
  • Go to tools
  • Select the wemos D1 R1 board
  • Select the com port where the wemos is connected to under tools, port
  • Change your-ssid with your home SSID
  • Change your-password with your wifi password
  • Click the upload button

Step 4: Testing

In the previous step we uploaded the code.
Everything should work now. In order to test this we need to know the IP-address and we need to connect a garden hose.

Your IP-address you can see via the serial monitor or on your wireless router

  • Go to tools, serial monitor
  • There you see your ip-address (see first image)

Now it's time to test everything outside.

  • Screw on the 2 garden hose connectors
  • Attach the solenoid onto a faucet on one side and onto the garden hose on the other side.
  • Go to the link http://yourip/sol2/1 and to http://yourip/sol2/0 to turn it of.
  • If you wan't to control the other solenoid http://yourip/sol1/1 and http://yourip/sol1/0

Step 5: Conclusion

In this instructable you learned how to drive solenoids remotely over wireless. Arduino projects related to gardening are the kind of instructables you can expect from me in the future. If you have other propositions these are always welcome in the comments.