---
title: Monitor My Plant
description: Using the micro:bit and gator:bit, students will learn about the soil moisture sensor and how they can use it to monitor when a plant needs to be watered.
image: https://lh4.googleusercontent.com/jrexbpV9M4JNtk9kyFigMWsEaM4ajTLamH0ahmuNLmVU3DpjegD115q_aaL9DChpl3Y2ekJkKXun59eVMNb3D-Kn18T5zOwnYi20X4qAT1ctqtSz2eFsu_ft8yph2n9aH_PhPXFe
---

[![Sparkfun](https://www.sparkfuneducation.com/img/logo.png)](https://www.sparkfuneducation.com/index.html)

- [SparkFun Webstore](https://www.sparkfuneducation.com)
- [Higher Ed](https://sparkfuneducation.com/higher-ed/index.html)
- [Contact Us](https://www.sparkfuneducation.com/contact-us.html)
- [Follow Us](https://twitter.com/SparkFunEDU)

- [Home](https://www.sparkfuneducation.com)
- [Blog](https://blog.sparkfuneducation.com)
- [Curriculum](https://www.sparkfuneducation.com/curriculum.html)
- [PD/Events](https://www.sparkfuneducation.com/professional-dev.html)
- [KITS/Materials](https://www.sparkfuneducation.com/materials.html)
- [Educator Stories](https://www.sparkfuneducation.com/educator-stories.html)
- [Activities](https://activities.sparkfuneducation.com)

![STEAM Classroom Download](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/jeff-classroom-backgroun.jpg?width=1440&name=jeff-classroom-backgroun.jpg "STEAM Classroom Download")

![steam-activities-2](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/steam-activities-2.png?width=600&name=steam-activities-2.png "steam-activities-2")

Bringing maker education and computational thinking to the classroom.

## Latest Activities

Search this site on Google

S

[Michael Jones](https://activities.sparkfuneducation.com/author/michael-jones)

Dec 13, 2019

## [How Turbid is Your Pond? Using Comput...](https://activities.sparkfuneducation.com/how-polluted-is-your-pond-using-computer-systems-to-monitor-the-environment)

[Arduino](https://activities.sparkfuneducation.com/topic/arduino)

<https://activities.sparkfuneducation.com/how-polluted-is-your-pond-using-computer-systems-to-monitor-the-environment>

[![Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/hs-fs/hubfs/agc_headshot.jpg?width=20&name=agc_headshot.jpg) Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/author/alexandra-gendreau-chakarov)

Oct 15, 2019

## [Monitor My Plant](https://activities.sparkfuneducation.com/monitor-my-plant)

[micro:bit](https://activities.sparkfuneducation.com/topic/microbit)

<https://activities.sparkfuneducation.com/monitor-my-plant>

[![Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/hs-fs/hubfs/agc_headshot.jpg?width=20&name=agc_headshot.jpg) Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/author/alexandra-gendreau-chakarov)

Oct 14, 2019

## [Classroom Noise Monitor with micro:bi...](https://activities.sparkfuneducation.com/classroom-noise-monitor)

[micro:bit](https://activities.sparkfuneducation.com/topic/microbit)

<https://activities.sparkfuneducation.com/classroom-noise-monitor>

[![Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/hs-fs/hubfs/agc_headshot.jpg?width=20&name=agc_headshot.jpg) Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/author/alexandra-gendreau-chakarov)

Oct 14, 2019

## [micro:bit Light and Music Show](https://activities.sparkfuneducation.com/light-and-music-show)

[micro:bit](https://activities.sparkfuneducation.com/topic/microbit)

<https://activities.sparkfuneducation.com/light-and-music-show>

## Featured Stories

- [micro:bit](https://activities.sparkfuneducation.com/topic/microbit)
- [Arduino](https://activities.sparkfuneducation.com/topic/arduino)

[![Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/hubfs/agc_headshot.jpg)](https://activities.sparkfuneducation.com/author/alexandra-gendreau-chakarov)

 By

[Alexandra Gendreau Chakarov](https://activities.sparkfuneducation.com/author/alexandra-gendreau-chakarov)

 October 15, 2019

<https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Factivities.sparkfuneducation.com%2Fmonitor-my-plant> <https://www.twitter.com/share?url=https%3A%2F%2Factivities.sparkfuneducation.com%2Fmonitor-my-plant> <http://www.linkedin.com/shareArticle?mini=true&url=https://activities.sparkfuneducation.com/monitor-my-plant>

## [Monitor My Plant](https://activities.sparkfuneducation.com/monitor-my-plant)

  [micro:bit](https://activities.sparkfuneducation.com/topic/microbit)

**Activity Name:**

Monitor My Plant

**Grade Level:**

7 (Could work for grades 5 - 8)

**Time Required:**

120 minutes (approximately 2 class periods)

**Expendable Cost:**

- Dirt
- Pots/cups

**Group Size:**

2

**Subject area:**

science, technology

 

**Summary:**

Students learn about the gator:soil sensor and how they can use it to monitor when a plant needs to be watered. Students calibrate the gator:soil for the value of dry soil and wet soil. Then they program the micro:bit to monitor the soil moisture using the gator:soil and the 5 LEDs and speaker on the gator:bit to indicate moisture levels and when the plant needs to be watered. This could work in a science class that is growing plants for another experiment or in any classroom that has plants. Students don’t have to each have their own plant, they could monitor any plants in the classroom. Multiple students can monitor one plant.

 

**Keywords**:

micro:bit, soil moisture, watering plants, sensors, middle school, coding

 

**Educational Standards:**

*ISTE*

- Computational Thinker 5b 
    - Students collect data or identify relevant data sets, use digital tools to analyze them, and represent data in various ways to facilitate problem-solving and decision-making.
- Creative Communicator 6a 
    - Students choose the appropriate platforms and tools for meeting the desired objectives of their creation or communication.

*NGSS*

- SEP 1: Asking Questions and Defining Problems 
    - MS-ETS1-1: Define the criteria and constraints of a design problem with sufficient precision to ensure a successful solution, taking into account relevant scientific principles and potential impacts on people and the natural environment that may limit possible solutions.
- SEP 4: Analyzing and Interpreting Data 
    - MS-LS2-1: Analyze and interpret data to provide evidence for the effects of resource availability on organisms and populations of organisms in an ecosystem.

**Prerequisite Knowledge:**

Students should have some experience programming the micro:bit. Provided they have worked through some of the tutorials on the [MakeCode website](https://makecode.microbit.org/) they should be able to complete the activity.

 

**Learning Objectives:**

1. Students learn about different ways to display information and determine which one they deem to be most useful for monitoring soil moisture.
2. Students define the problem of collecting soil moisture information by first determining the minimum and maximum levels of soil moisture.
3. Students collect relevant data using the gator:soil sensor to determine when the plant needs to be watered.

**Materials List:**

- Micro:bit
- USB cord
- Power supply (micro:bit battery pack should be sufficient)
- gator:bit
- gator:soil Sensor
- 3 alligator clips
- Soil
- Pot
- Seeds/Plant
- Computer or tablet capable of flashing code to micro:bit

**Introduction / Motivation:**

*(Bring out a plant that hasn’t been water in a while, make sure that the leaves a drooping, the soil is dry, and overall doesn’t look healthy)*. How does this plant look to you? *(Write list on the board of students observations, hopefully at least one of them will bring up that it looks like the plant needs water)*. How do you know when you need to water a plant? *(Make list on the board)* Do you think you can ever water a plant too much? *(If students think this answer is no, show them these pictures).*

image source: [https://www.binleyflorist.com/index.php/news/gardening-tips/216-overwatered-houseplants-fixing-the-damage](https://www.binleyflorist.com/index.php/news/gardening-tips/216-overwatered-houseplants-fixing-the-damage)

How can we make sure to always water a plant exactly when you need to? *(If your students are familiar with the sensors and the micro:bit, hopefully some of them will bring up how they could use them. If students aren’t familiar with the sensors, ask them about things they know to alert them that something needs to happen like a timer on the microwave or alarm clock. For example you could say… Just like your alarm clock wakes you up in the morning, you can make an alarm to let you know when you need to water your plant.)*

Each of you is going to create a system to monitor the soil moisture level of a plant. As a class we are going to come up with a set of criteria for what it must include.

 

**Procedure:**

*Clearly explain the step-by-step procedure to follow to conduct the hands-on activity. Make sure to include connections to engineering and address activity objectives. To clarify the activity setup and procedure, place images, photographs and diagrams throughout this section and the activity write-up. Use figure numbers if the image is referenced in the text. Include metric units.*

 

*Background*

Make sure you are familiar with the different capabilities of the gator:bit and micro:bit. The main ones to focus on here are the different ways to represent information using the 5 LEDS on the gator:bit controlled by pin P12, the speaker controlled by pin P0, and the 25 LEDs on the micro:bit itself (see Figure 1). In addition, make sure you are familiar with the gator:soil sensor and how to wire it, the two main things to remember are:

1. Connect the ground wire first
2. Power the gator:soil using P1 or P2 not the 3.3V output. This allows the sensor to last longer while only powering it when you want to take a reading.

For more information about the gator:soil sensor see the [hookup guide](https://learn.sparkfun.com/tutorials/sparkfun-gatorsoil-hookup-guide/all). The gator:soil returns values between 0 and 1. These decimals can be hard for students to understand and interpret. I recommend having students multiply the result by 100 to make the results easier to understand. I support this in the tutorial and there is a MakeCode block math that will do this for the students. I don’t think a long explanation is necessary here simply saying something like converting a decimal number to a percent should suffice.

 

![Figure 1](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/Figure%201.jpg?width=429&name=Figure%201.jpg)*Figure 1: Ways to use the gator:bit/micro:bit to represent information.*

 

*Before the Activity*

- Gather all materials together.
- Create a station of soil samples that are different levels of wetness for calibration. I recommend having at least four different options of soil to test.
- Write up the urls for the tutorial on big stickies, whiteboard, share them on Google Classroom, etc.

*With the Students*

1. Divide the class into pairs and make sure each pair has a set of the materials
2. The first step is to calibrate the gator:soil for their specific soil.
3. First students have to wire their gator:soil using the below wiring diagram.

 

| ![Figure 2a](https://lh4.googleusercontent.com/jrexbpV9M4JNtk9kyFigMWsEaM4ajTLamH0ahmuNLmVU3DpjegD115q_aaL9DChpl3Y2ekJkKXun59eVMNb3D-Kn18T5zOwnYi20X4qAT1ctqtSz2eFsu_ft8yph2n9aH_PhPXFe) | ![Figure 2b](https://lh6.googleusercontent.com/lvwpVy-oUOhCOKCUVPDHr6c_RV5ZnoyQRGL2alrik4QeQ1KLqG1_S9XZE6M78kRE_kMJlV88gagUhLhQbQ3OtoxNIJ3SeGN0IhNPWbW1kocXd9yNYRrfIcifkiIALR3ZdGaUytfu) |
| --- | --- |

*Figure 2: Suggested wiring diagram for the gator:soil and an actual picture of wiring up the sensor.*

1. Confirm that students have wired the sensor correctly by having them share their wiring configuration with another pair of students.
2. Now the students are ready to code the calibration. For more experienced coders, they can create a new project on [MakeCode](https://makecode.microbit.org/) and import the gator:soil library by going to Extensions and searching for [this repository](https://github.com/sparkfun/pxt-gator-soil) (see *Figure 3*). For students who are less experienced, they can start with [this tutorial](https://makecode.microbit.org/#) that imports the libraries and the blocks they need for them. This is an example [MakeCode Project](https://makecode.microbit.org/37914-90474-17205-76621) for calibration.

| ![Figure 4a](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/Figure%204a.png?width=183&name=Figure%204a.png) | ![Figure 4b](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/Figure%204b.png?width=152&name=Figure%204b.png) | ![Figure 3c](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Soil%20Moisture/Figure%203c.png?width=1184&name=Figure%203c.png)   | ![Figure 3d](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Soil%20Moisture/Figure%203d.png?width=300&name=Figure%203d.png) |
| --- | --- | --- | --- |

*Figure 3: Sequence of moves in MakeCode to add the gator:soil sensor.*

1. Once students have their calibration program coded, they should test it out on different levels of soil moisture and record the results.
2. Have students share their calibration results with another pair of students. Results should be similar across groups by may vary slightly depending on which battery packs students are using.
3. After the calibration phase, students get to design their soil moisture monitoring system. If students are familiar with the different options on the gator:bit and micro:bit, they can proceed to making their design plan.
4. Show students the different options they have for creating their plant monitoring system. This can be done by showing one you created yourself or just illustrate the different features on the gator:bit/micro:bit as shown in *Figure 1*.
5. Before students start to code their plant monitoring system, they need to make a design plan. Things that their design plan must include are:
6. Now students code their design. Again experienced students can create a new project on [MakeCode](https://makecode.microbit.org/) and import the soil moisture library by going to Extensions and searching for [this repository](https://github.com/sparkfun/pxt-gator-soil) (see *Figure 3*). If students want to use the LEDs on the gator:bit they should import the neopixel library (see *Figure 4*). For less experienced students and students who need extra help, they can use [this tutorial](https://makecode.microbit.org/#) which imports the necessary libraries and gives them a set of blocks to work with. This is an example [MakeCode Project](https://makecode.microbit.org/60851-98487-38175-98038) to monitor soil moisture.

| ![Figure 4a](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/Figure%204a.png?width=189&name=Figure%204a.png)   | ![Figure 4b](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/Figure%204b.png?width=143&name=Figure%204b.png)   | ![image4 edit](https://activities.sparkfuneducation.com/hs-fs/hubfs/EDU/Activities/2019/Lights%20and%20Music/image4%20edit.png?width=800&name=image4%20edit.png)   |
| --- | --- | --- |

*Figure 4: Sequence of moves in MakeCode to add the neopixel library*

1. Once students complete their programs, have them test it out on the different levels of soil moisture to ensure that their code is correct.
2. Students conduct design share outs where they explain their design choices. Some suggested strategies for doing this are
3. Finish with a brief whole class discussion on struggles the students had completing the tasks and how they overcame them.

**Troubleshooting Tips:**

- Coding
- gator:soil Sensor
- Wiring
- Displays

**Going Further:**

- Since individual data points can be incorrect, have students take three consecutive measurements and compute the average.
- For further plant monitoring incorporate the [environmental sensor](https://learn.sparkfun.com/tutorials/sparkfun-gatorenvironment-hookup-guide/all) to monitor humidity and carbon dioxide around the plant. Monitoring humidity can allow you to measure transpiration.

![](https://static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png)

### Subscribe Email

### Popular Activities

<https://activities.sparkfuneducation.com/keep-out-make-an-electronic-safe-with-remote-alarm>

[Keep Out! Make an Electronic Safe with Remote Alarm](https://activities.sparkfuneducation.com/keep-out-make-an-electronic-safe-with-remote-alarm) Aug 13, 2019

<https://activities.sparkfuneducation.com/classroom-noise-monitor>

[Classroom Noise Monitor with micro:bit](https://activities.sparkfuneducation.com/classroom-noise-monitor) Oct 14, 2019

<https://activities.sparkfuneducation.com/heart-rate-monitor>

[Heart Rate Monitor](https://activities.sparkfuneducation.com/heart-rate-monitor) Oct 10, 2019

### Popular Tags

[micro:bit](https://activities.sparkfuneducation.com/topic/microbit) [Arduino](https://activities.sparkfuneducation.com/topic/arduino)

[Tweets by @SparkFunEDU](https://twitter.com/SparkFunEDU)

[Previous Post](https://activities.sparkfuneducation.com/classroom-noise-monitor)

##### [Classroom Noise Monitor with micro:bit](https://activities.sparkfuneducation.com/classroom-noise-monitor)

[Next Post](https://activities.sparkfuneducation.com/how-polluted-is-your-pond-using-computer-systems-to-monitor-the-environment)

##### [How Turbid is Your Pond? Using Computer Systems to Monitor the Environment](https://activities.sparkfuneducation.com/how-polluted-is-your-pond-using-computer-systems-to-monitor-the-environment)

[![SparkFun Education](https://www.sparkfuneducation.com/img/logo.png)](http://www.sparkfuneducation.com/index.html)

#### Other Resources

- [Contact Us](http://www.sparkfuneducation.com/contact-us.html)
- [About SparkFun](http://www.sparkfun.com)
- [FAQs](https://www.sparkfun.com/static/faq)

- [Customer Service](https://www.sparkfun.com/support)
- [Shipping](https://www.sparkfun.com/support)
- [Terms and Conditions](https://www.sparkfun.com/terms)

#### Sign Up for Newsletter

© Copyright 2016. All Rights Reserved.