micro:bit Tinker Kit Project 05 – Plant Monitoring Device

What you will learn

In this article,we are going to talk about how to use micro:bit with buzzer, OLED and moisture sensor to build a case of plant detection device.

  • Get to know the buzzer, OLED and moisture sensor
  • Make something with a moisture sensor

What you need

  • 1 x BBC Micro:bit
  • 1 x Micro USB Cable
  • 1 x Breakout Board
  • 1 x Mini Buzzer
  • 1 x OLED
  • 1 x Moisture Sensor
  • 2 x Female-Female Jumper Wires

How to assemble

In this project, we are going to create a plant monitoring which the buzzer will sound when there is not enough water. A message will always be displaying on the OLED, showing the moisture level. Firstly, plug in the OLED. You are able to plug it into any of the three rows.

Connect buzzer to P0. Make sure the color of wire follows the pin color on breakout board.

Plug in the moisture sensor to P1.

At this time, a dialogue box appears. Search “tinker kit” in the box and then click on the “tinkercademy-tinker-kit” for downloading this package.

Click on Tinkercademy inside the Code Drawer to find our custom blocks for the various components in your kit.

After that, use blocks under the Tinkercademy section to initialize the OLED.

Since there are only two conditions, we need only one “else-if” statement. Micro:bit reads values from moisture sensor continuously.  When the moisture sensor value is less than 50, this indicates that there is not enough water in the pot. As a result, the buzzer will sound and a message “Water your plant” will be displayed on OLED. Else if the moisture sensor value is larger than 50, the buzzer will be in silence and a message “Your plant is in good condition” will be displayed on OLED.

If you don’t want to type these code by yourself, you can download the whole program in the link below: https://makecode.microbit.org/_DV547gK8j9ms

Or you can download from this page:

Finally! You have created a device to monitor your plant! Now, let’s try it!

Download these code into micro:bit. Find a green plant and plug moisture sensor panel into the soil and watch. When there is not enough water, the buzzer will alarm to tell you “it’s time to water your plant!”. And when the plant has enough water, then the OLED panel will show you water is enough and no need to water the plant.

Tinker Kit Projects

  • Project 01 – Music Machine
  • Project 02 – Smart Light
  • Project 03 – Electro-Theremin
  • Project 04 – Simple Alarm Bot
  • Project 05 – Plant Monitoring Device
  • Project 06 – Intruder Detection
  • Project 07 – Fish Feeder
  • Project 08 – Motion Detector
  • Project 09 – Lie Detector
  • Project 10 – PADDLEBALLSUPERSMASHEM
  • Project 11 – Avoid Asteroids
  • Project 12 – Remote Control Everything
  • Project 13 – micro:bit Car
  • Project 14 – Flipping Pancakes
  • Project 15 – Maze Runner
  • Project 16 – QUICK MATHS
  • Project 17 – Pitch Perfect
  • Project 18 – Finger Dexterity
  • Project 19 – Electric Spirit Level
  • Project 20 – Space Shooter
  • Project 21 – Flappy Bird
  • Project 22 – Wire Transmission
  • Project 23 – Snake Game

 

First published at 1:49pm on July 16, 2019
Last updated at 5:45pm on November 14, 2019