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 #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
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
Enviro has a GPIO breakout. This breakout includes 5V, 3.3V, I2C (SDA and SCL), GPIO4, and GND pins.
Python Code
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.
I've also tried this on sarracenia (bug catcher plant) because this plant constantly requires water.
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.
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.
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/
Next Steps
I would like to try image recognition with a camera to see how things turn out !
Personal Website
1 Meter of Pi Github Repository
Top Comments