Monkey Detecting Sprinkler overview

Using the power of Machine Learning we will create an Android app to detect the intrusion of any type of monkey (or baboon). This app can be programmed to send a signal to a WiFi connected device which can trigger a tap to turn on, and thus set off the sprinkler. This is an effective way to deter monkeys from hanging around, as they don’t like getting wet.

The nice thing about this project is it can be adapted to detect almost anything! I adapted the Android app to detect my son’s stuffed monkey toy by changing one line of code. Download Teddy_Bear_Detector here.

The ML platform we will be using for the Android app, fritz.ai, provides pre-trained models as part of their api so you don’t have to go through the hassle of training a model and getting dirty with low level ML stuff.

The Source code will be provided both for the Android app (in Kotlin) and D1 mini firmware (Arduino) for the monkey squirter. An alternative Machine Learning monkey detector implemented in Python will also be explored, for the desktop, or possibly a Raspberry Pi…

If you just want to play with this project for fun, you can set it up quite quickly on a breadboard, using just an LED as an indicator instead of the relay powered solenoid tap valve.

To just test this out you will need:

  1. Android phone to run the Monkey Detector App
  2. Android Studio
  3. Breadboard: http://s.click.aliexpress.com/e/KdMqDwrA
  4. D1 Mini: http://s.click.aliexpress.com/e/4Tb1vTn6
  5. USB cable to program and charge D1 mini: http://s.click.aliexpress.com/e/ltrlczMG
  6. Arduino IDE

For the full project you will need:

Software:

  1. Android Studio OR:
  2. Pycharm (recommended python IDE)
  3. Arduino IDE

Hardware:

  1. Breadboard http://s.click.aliexpress.com/e/KdMqDwrA
  2. D1 Mini: http://s.click.aliexpress.com/e/4Tb1vTn6
  3. D1 mini relay: https://s.click.aliexpress.com/e/_s05zgs OR:
  4. Relay: https://s.click.aliexpress.com/e/_sbpC45 OR:
  5. you can buy the relays in bulk really cheaply here: https://s.click.aliexpress.com/e/_sBPnJB
  6. More relays but 3v ones (if you use these just take out the transistor in my circuit): https://s.click.aliexpress.com/e/_shriep
  7. Solenoid valve like this: https://s.click.aliexpress.com/e/_s5P3Hj

Try out the first test run of the project now! Switching on an LED when a soft toy is detected.

See the history and idea behind the monkey detecting sprinkler (blog posts)

Check out the Monkey Detector standalone app on Google Play Store