Advertisement

Quick Links

SparkFun gator:soil Hookup Guide
Introduction
Do you have a science experiment involving plant growth?
SparkFun gator:soil - micro:bit Accessory Board
 SEN-15272
The gator:soil is the perfect tool to monitor the moisture content of the soil of your test subjects. This tutorial will
show you how to get started using this soil moisture sensor with the gator:bit (v2) in the micro:bit development
environment.
Product Showcase: gator:boards - micro:bit Accessory Boards
Product Showcase: gator:boards - micro:bit Accessory Boards

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Gator:soil and is the answer not in the manual?

Questions and answers

Summary of Contents for sparkfun Gator:soil

  • Page 1  SEN-15272 The gator:soil is the perfect tool to monitor the moisture content of the soil of your test subjects. This tutorial will show you how to get started using this soil moisture sensor with the gator:bit (v2) in the micro:bit development environment.
  • Page 2  DEV-14208 To easily use the gator board ecosystem, the gator:bit (v2) will help breakout the necessary pins. You will also need alligator cables to connect the gator:bit to the gator:soil. SparkFun gator:bit v2.0 - micro:bit Carrier Board Alligator Test Leads - Multicolored (10 Pack)
  • Page 3: Suggested Reading

     DEV-15162  PRT-12978 Suggested Reading There isn't much to learning how to use the gator:soil (moisture sensor). However, you may find the following concepts useful along the way. Voltage, Current, Resistance, and Ohm's Law Analog to Digital Conversion Learn about Ohm's Law, one of the most fundamental The world is analog.
  • Page 4 Product Showcase: micro:bit and SparkFun bits Product Showcase: micro:bit and SparkFun bits micro:bit Ecosystem We would also recommend taking a look at the following tutorials if you aren't familiar with them. Getting Started with the micro:bit Getting Started with MicroPython and the...
  • Page 5: Hardware Overview

    Used to sample soil moisture content for sensor. Power We recommend powering the gator:soil with between 3.3V - 5V. Please note that the analog value returned will vary depending on what voltage is provided for the sensor. Power connection pads.
  • Page 6: Output Signal

    Connecting your gator:soil to the gator:bit (v2) is simple. Connect GND to GND, SIG to an analog pin (P0-P2) , and PWR to either 3.3V OUT or to a digital pin that is not in use (P0-P2, P8, P16, or P5). This can easily be done with alligator cables.
  • Page 7: Installing Extensions

    If this is your first time using the gato:bit (v2), please review our SparkFun gator:bit v2 Hookup Guide. The easiest way to get started using the gator:soil is to use Microsoft MakeCode, a web-based block editor. This tutorial assumes you are familiar with the with MakeCode, the gato:bit (v2), and the micro:bit development board. If this is your first time check out this guides linked in the suggested reading section (above).
  • Page 8 Click on the the Extensions block to open the extensions page. Click on image to enlarge. There are two methods for finding the gator:soil extension: Search for the name used on the extension . Use the link to the GitHub repository for the pxt-package as the search term.
  • Page 9 Search for Extension. Then, click on the box to add it to the block library. Click on image to enlarge. Then, click on the box for the extension to add it to the block library. The gator:soil extension should now appear in the block library.
  • Page 10: Block Function

    Now that you have added the gator:soil extension to the Editor, lets start with some example code. Plug the micro:bit into your computer using an USB micro-B cable after you have assembled your hardware with the instructions from the previous section. The micro:bit should appear on your computer as a removable storage device.
  • Page 11 Once you have an idea what values your sensor is outputting in completely dry and completely wet situations, it's time to calibrate your sensor for the specific soil you want to monitor. Test your soil when it is as dry as possible, then measure it when the soil is completely saturated with moisture.
  • Page 12: Troubleshooting Tips

    The output is redirected over the serial port to avoid conflicts on pins , which are also used for serial communication. To read the sensor values, pull up your favorite serial terminal emulator. Then, connect to the serial port that the micro:bit is on; the default baud rate is 115200 bps. Below, is an example of the sensor output for the example code.
  • Page 13: Resources And Going Further

    GitHub Product Repo micro:bit Landing Page SFE Product Showcase Interested in the micro:bit? Check out some of these other micro:bit products: SparkFun Inventor's Kit for micro:bit Lab Pack SparkFun gator:bit v2.0 - micro:bit Carrier Board  LAB-15229  DEV-15162 micro:bit Educator Lab Pack SparkFun Inventor's Kit for micro:bit ...
  • Page 14 A weather station kit that is built on top of the Get started clipping sensors and lights to the micro:bit inexpensive, easy-to-use micro:bit and Microsoft with the gator:starter gator:board from SparkFun! MakeCode. Wireless Remote Control with micro:bit SparkFun gator:bit v2 Hookup Guide...

Table of Contents