element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
1 Meter of Pi
  • Challenges & Projects
  • Design Challenges
  • 1 Meter of Pi
  • More
  • Cancel
1 Meter of Pi
Blog 2Pi Microgravity Garden Blog 6 | Water Level Sensor and Bug Catcher inside Rocket !
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kurama007
  • Date Created: 6 Dec 2020 8:38 PM Date Created
  • Views 907 views
  • Likes 6 likes
  • Comments 5 comments
  • 1meterofpi
Related
Recommended

2Pi Microgravity Garden Blog 6 | Water Level Sensor and Bug Catcher inside Rocket !

kurama007
kurama007
6 Dec 2020

1 Meter of Pi Blog Posts ...

Blog #1: 2Pi Microgravity Garden Blog 1 | Getting Started | element14 | 1 Meter of Pi

Blog #2: 2Pi Microgravity Garden Blog 2 | Raspberry Pi s... | element14 | 1 Meter of Pi

Blog #3: 2Pi Microgravity Garden Blog 3 | Hello World wi... | element14 | 1 Meter of Pi

Blog #4: 2Pi Microgravity Garden Blog 4 | Software Envir... | element14 | 1 Meter of Pi

Blog #5: 2Pi Microgravity Garden Blog 5 | Connect to Arduino and how plants get pollinated inside rocket without wind???

Blog #6: 2Pi Microgravity Garden Blog 6 | Water Level Sensor and Bug Catcher inside Rocket !

Blog #7: 2Pi Microgravity Garden Blog 7 | AI Image Recognition with Raspberry Pi and Tensor Flow

 

Blog 6 Task List

 

Just like previous blogs, the first part is Engineering work and second part is farming image

 

1. Engineering: Try Water Level Sensor

 

As plants get bigger, they absorb more water and nutrient at faster space. Thinking of astronauts, they want the watering system automated. So, I used a CQRobot Non-Contact Water sensor. I tried other water level sensor but it has some reliability problem meaning the water measurement started failing after 1-2 days. I think having the sensor electronic components close to water can cause a moisture problem. So, I've picked up a non-contact water sensor this time.

 

 

Hardware Wiring

image

Enviro has a GPIO breakout. This breakout includes 5V, 3.3V, I2C (SDA and SCL), GPIO4, and GND pins.

image

 

Python Code

image

I've used RPi.GPIO python package to configure one GPIO which is pin #4.

# External module imports
import RPi.GPIO as GPIO
import time

# Pin Definitons:
water_level_pin = 4 # Broadcom pin 17 (P1 pin 11)

# Pin Setup:
GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme
GPIO.setup(water_level_pin, GPIO.IN) # LED pin set as output

print("Here we go! Press CTRL+C to exit")
try:
    while 1:
        if GPIO.input(water_level_pin): # button is released
            print("water is there")
        else: # button is pressed:
            print("water is not there")
            time.sleep(0.075)
except KeyboardInterrupt: # If CTRL+C is pressed, exit cleanly:
    GPIO.cleanup() # cleanup all GPIO

 

Demo

If non-contact sensor can see the water thru the container, the LED becomes red and VSCode console on Raspberry Pi indicates that water is there! If not, water is not there.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I've also tried this on sarracenia (bug catcher plant) because this plant constantly requires water.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

2. Plant Growth Progressions

 

This week, green onions. Green onions grow easier with soil because if we add more water than required to the green onions (water level above the roots), they go bad.

imageimage

 

3. New Plant: Bag Catchers

 

Fruits and leafy plants attract bugs. I am not sure how bugs can survive in space rockets. But, it is not fun for astronauts with many bugs in tight area.

image

So, I've added sarracenia. This plant requires special care. The gardening tips are summarized in this page: https://green-scientist.com/2020/12/05/bug-catcher-sarracenia-catesbaei/

image

 

Next Steps

I would like to try image recognition with a camera to see how things turn out !

 

image

 

Personal Website

https://green-scientist.com/

 

1 Meter of Pi Github Repository

https://github.com/kurama007/1MeterOfPi

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 4 years ago +1
    Hi Satoshi, I enjoyed reading about your project. Thanks John
  • skruglewicz
    skruglewicz over 4 years ago +1
    Nice work
  • kurama007
    kurama007 over 4 years ago in reply to skruglewicz +1
    Thank you, Stephen. Satoshi
  • waterapp
    waterapp over 3 years ago

    Nice post. Thank you for posting something like this.
    Keep up the good work.....If you want to know more about Water Level Sensor then you can visit our site WaterApp.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kurama007
    kurama007 over 4 years ago in reply to skruglewicz

    Thank you, Stephen.

     

    Satoshi

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • skruglewicz
    skruglewicz over 4 years ago

    Nice work

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kurama007
    kurama007 over 4 years ago in reply to jw0752

    Thank you, John. Glad to hear you enjoyed reading the blog image

     

    Satoshi

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jw0752
    jw0752 over 4 years ago

    Hi Satoshi,

     

    I enjoyed reading about your project.

     

    Thanks John

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube