BLOG# 10 -Edible Algae System - (Growing Spirulina in space)

Application Implementation and Tests

This is my 10th blog post in a series of blog post for the Design Challenge 1 Meter of Pi

version 1.1

,<<< PREVIOUS BLOG

NEX BLOG  >>

Blog# 9 Developmental Unit Testing

Blog# 11  EAS - Conclusions and Enhancements for Future Systems

INTRODUCTION

  • In this blog I will attempt to Code and test the Workflows described in Blog#7
    • First, I will show some pictures of the growing house and the PI with the hats and sensors attached. The wireing is not pretty, but since it's a prototype I needed to experiment with connections.
      • Also showing a light source, water heating pads and the water pump. Which I do not have attached and working at the moment.
    • Then, I'll I display the code for each workflow. These will be python scripts that implement the workflow diagrams from Blog#7.. I have included the workflow diagrams here as well for reference.
    • Next, I will show examples of Test runs for each workflow. Showing screenshots and photos,  of the terminal run.
    • And finally, I will display Charts and Reports showing the progress of the scipts over time. These will be used to analyze and debug the Telemetry data.
  • The system will be used to assist in the growth of edible algae. The real acid test will be if the growth of the algae fails at any point, then I will have to readjust the configuration and start another growth Cycle.

 

Growing House and Growing Container

Hear is the Growing House. A storage bin I had around the House

I needed to have a controlled environment to contain the PI Control unit and Growing Container

I'm using a wireless keybord and mouse with one of my televisions that I use as an HDMI monitors.

And here is a top view of what is underneth the Gorowing House Storage Bin

THe Control unit and growing Container

Showing the PI Control Unit on the Left hand side.

And the Growing Container with the waterpub, HeatingPad and Lamp on the right hand side

growing houseControl unit and growing Container

 

ANother perpective of the Growing ContainerRight Side Perpective

 

Left Side Perpective

Closer shoot of the Growing Containr with the lamp on

Also shows the LED test circut I used to test the Automation Hat Controler Output channels

 

Top view of the Control Unit

Showing the PI, with the 2 hats attached.

A breadbord that has the Waterproof tempreture sensor atached

and if you look real close, a breadbord used as a junction box for PI shared pins.

A close up shot with a little better shot of the Junction box between the PI and the Hats

 

Ok now onto the Code.....

 

CODE

  • WORKFLOWS

    • WF1.py -- Make sure the room light is operational

      • THe CODE -- WF1.py

 

    • WF2.py --  Maintain the Water Tempreture to 90F
    • The CODE --  WF2.py

 

    • WF3.py -- Maintain the right amount of Light for the Growing Container

-
    • The CODE -- WF3.py

 

 

 

    • WF4.py -- Try to keep the Growing House Humidity level at 50%


    • The Code -- WF4.py

 

    • WF5.py  -- Try to keep the Growing House Tempreture at around 70%

    • The Code -- WF5.py

 

 

    • WF6.py - Maintain good Oxidation in the water for the Growing Container

         

    • The Code -- WF6.py
    • -

TEST

  • WORKFLOWS

    • WF1.py-- Make sure the room light is operational
      • In this screen shot I show the test run of the code I ran the test for about an hour starting at 12:28 on december 29 2020.
      • you can see the alerts collection too the left with the alert messages.

 

 

 

    • WF2 .py--  Maintain the Water Tempreture to 90F
    • Test run --  December30 2020

    • Test run --  December30 2020

       

    • -
    • WF3.py -- Maintain the right amount of Light for the Growing Container

    • Test run --  December30 2020
    • -
      Test run --  December30 2020

      <PICTURE HERE>

       

 

    • WF4.py  -- Try to keep the Growing House Humidity level at 50%

    • In this screenshot I show the terminal window running the script on the left hand side.

    • The VS code editor with the code is on the right hand side

    • I'll be coming up with some reports and charts using Mongodb atlase for this test run

    • Test run --  December30 2020

       

    • WF5.py -- Try to keep the Growing House Tempreture at around 70%

    • In this screenshot I show the terminal window running the script on the left hand side.
      • The VS code editor with the code is on the right hand side
    • Test run --  December30 2020

       

 

    • WF6.py  -- Maintain good Oxidation in the water for the Growin

    • Test run --  December30 2020
    • Test run --  December30 2020

       

 

  • TEST - ALL 6 scripts Running

  • VIDEO TOO LARGE

     

 

Updated

Monitoring The Test with Charts and Reports

  • This section will be used to display charts on the test data. in order to analyze the test run for the scripts
  • MongoDb Atlas Charts will be used to build charts
  • Charts

Updated

EAS Dashboard

This is the Atlas Charts Dashboard that I created to display the test data. In each of the following section, I have display the chart  in the Chart editor for each Script.

 

WF1.py -- Make sure the room light is operational

This chart shows the room light Intensity Levels in LUX

 

WF2.py --  Maintain the Water Temperature to 90F

Here is the editor view using the collection waterTemp

Notice the temperature going up and down with the heating pad going down

I shut the system down on new years eve December 31 an brought it back up on January 1, 2021.

Notice the gap in time between those dates.

 

 

WF3.py -- Maintain the right amount of Light for the Growing Container

. Looks like the light was out overnight to give the Spirulina a rest.

 

WF4.py -- Try to keep the Growing House Humidity level at 50%

THe humidity over the 3 days pretty much layered around 88%

 

WF5.py  -- Try to keep the Growing House Temperature at around 70%

The Room Temperature did not change that much over the 3 days of testing. The chart shows that the temperature ran between 68 and 70 degrees Fahrenheit over the test time period

 

WF6.py - Maintain good Oxidation in the water for the Growing Container

This report, shows the Date and Time the Water Pump was turned on

The Water Pump should come on 3 times a day. This chart will show the number of times it was set to OFF and ON. Midnight, 8:00 and 16:00.respectively.

 

 

Conclusion and Summary

  • I am not completely done with this Blog at the time I "Published" it. I plan to Update the last section on MongoDB Charts in a few days.It's taking me a little longer getting results with it than I anticipated.
  • I hope everyone is having a great Holiday season, considering what is going on now in our world
  • Everything has come together with this final implementation and testing of the system.
  • I have never programmed as much python code a I have in the past 2 weeks. I'm fairly new to the language.  I had to really come up to speed quickly. I'm beginning to realy enjoy it.
  • I have some development experience with MongoDB. This experience has enlightened me on using it for IOT Telemetry data.
  • I was a little short on getting the Automation HAT connected to my 6 devices.as described in my Design
    • My design called for these devices to be switched on and off, as different conditions happen in both the Growing House and Groewing Container.
    • I could not get the lamp, pump and heating pad to work at all?
    • I'm not real familiar with Power circuits and I think there might be too much load for the Hat Output channel. It works with the Test circut using an LED and a Resistor. If anyone has experience hooking up these devices to the hat, It would help me get over this hurdle.
    • I'll need to do some more experiments with the Automation HAT Mini. The other hat has more power and relays, I might give it a try.
  • The Environ HAT and the Waterproof sensors are working out nicely. All the Test detected as they wre suppose to. I'm very please with the way my design came to life using it.
  • I will be testing and playing with Mongodb and will update this blog as I go.
  • Now onto my final blog to be completed before the deadline.

 

              HAPPY NEW YEAR EVERYONE

 

 

 

 

REFERENCES

 

,<<< PREVIOUS BLOG

NEX BLOG  >>

Blog# 9 Developmental Unit Testing

Blog# 11  EAS - Conclusions and Enhancements for Future Systems