Monkey Detector Part 3: The Monkey Squirter

The full D1 mini project laid out on a breadboard.

What do you need for this project?


  1. D1 mini firmware to switch the relay
  2. Monkey Detector Android App


Affiliate links are included on this website. Please support my future projects! Another way to support my work, and help yourself to free stuff at the same time, is to check out DigitalOcean with their promotional 2 months free hosting. If you haven’t yet heard of them, they are the best and cheapest virtual server on the market right now, the link is in the banner at the top of my site.

I was hoping to power the whole thing from 12 volts but the voltage regulator was getting a bit hot, and my main directive for this whole project is to use what I’ve got (otherwise I would have a relay shield like this one instead of the bare 5v relay which I had to trigger with a transistor).

  1. Breadboard
  2. D1 Mini:
  3. D1 mini relay: OR:
  4. Relay: OR:
  5. you can buy the relays in bulk really cheaply here:
  6. More relays but 3v ones (if you use these just take out the transistor in my circuit):
  7. Solenoid valve like this:

Test out the breadboard:

Instructions for editing and uploading D1 mini code are on the first part of this series: The code is the same, it’s just a WiFi switch after all. This time we are switching a relay instead of an LED.

Now visit the IP address of the D1 Mini in your browser:

You should hear a click from the Relay when you select ON (Socket #1) – and if you have connected the Solenoid Valve to 12v you will hear a louder click from that. The circuit works!

Trigger from the Android App:

Edit the Monkey Detector Android App, changing IP address to the one of your D1 Mini, like we did in the Teddy Bear Detector, but this time we will not change the detected object. We want to detect monkeys. While you are waiting for this to compile, check out the version on the Google Play Store – and the related project I made, Pet Detector!


Point the phone camera at a monkey (monkey pics work fine) and you will hear an alert sound, as well as the relay and Solenoid Valve clicking open. Now all that’s left to do is to solder everything together inside a nice box with wires coming out and attach this to the sprinkler tap. No more monkey problem.