element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Blog# 10 Application Implementation and Tests
  • 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: skruglewicz
  • Date Created: 30 Dec 2020 10:45 PM Date Created
  • Views 636 views
  • Likes 3 likes
  • Comments 0 comments
  • eas
  • 1meterofpi
Related
Recommended

Blog# 10 Application Implementation and Tests

skruglewicz
skruglewicz
30 Dec 2020

image

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
  • CODE
      • WORKFLOWS
        • WF1.py -- Make sure the room light is operational
          • THe CODE -- WF1.py
          • The CODE --  WF2.py
        • WF3.py -- Maintain the right amount of Light for the Growing Container
          • -
        • 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
  • TEST
      • WORKFLOWS
        • WF3.py -- Maintain the right amount of Light for the Growing Container
        • WF4.py  -- Try to keep the Growing House Humidity level at 50%
        • WF5.py -- Try to keep the Growing House Tempreture at around 70%
        • WF6.py  -- Maintain good Oxidation in the water for the Growin
        • TEST - ALL 6 scripts Running
  • Updated
  • Monitoring The Test with Charts and Reports
    • Charts
      • EAS Dashboard
      • WF1.py -- Make sure the room light is operational
      • WF2.py --  Maintain the Water Temperature to 90F
      • WF3.py -- Maintain the right amount of Light for the Growing Container
      • WF4.py -- Try to keep the Growing House Humidity level at 50%
      • WF5.py  -- Try to keep the Growing House Temperature at around 70%
      • WF6.py - Maintain good Oxidation in the water for the Growing Container
  • REFERENCES

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

imageimage

 

ANother perpective of the Growing ContainerRight Side Perpective
imageimage

 

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

imageimage

 

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
imageimage

 

Ok now onto the Code.....

 

CODE

  • WORKFLOWS

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

    • image

      • THe CODE -- WF1.py

 

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

 

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

    • image
-
    • The CODE -- WF3.py

 

 

 

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


    • image
    • The Code -- WF4.py

 

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

    • image
    • The Code -- WF5.py

 

 

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

          image

    • 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.
      • image

 

 

 

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

    • Test run --  December30 2020
      image

       

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

    • Test run --  December30 2020
    • image
    • -
      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

    • image
    • Test run --  December30 2020
      image

       

    • 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
      • image
    • Test run --  December30 2020
      image

       

 

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

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

       

 

  • TEST - ALL 6 scripts Running

  • VIDEO TOO LARGE

    image

     

 

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.
image

 

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

This chart shows the room light Intensity Levels in LUX
image

 

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.

image

 

 

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.
image

 

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

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

 

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
image

 

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.

imageimage

 

 

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
  • Sign in to reply
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