Coder Social home page Coder Social logo

greenhouse-monitor-system's Introduction

Greenhouse-Monitor-System

This is a proof of concept system used to automate a greenhouse consisting of one plant. While this is the case it would not be difficult to scale this project up in size. I wrote this code for a class project for my intro to computer architecture course. This is written for the mbed platform but can easily be ported to the Arduino using a few modifications.

How it works

There are two sensors connected to analog inputs that the microcontroller is constantly checking to see if they fall below or above certian thresholds. The two sensors I use are a TMP36 sensor for monitoring the temperature of the system and a soil moisture sensor to moniture the moisture of the soil. The if the temperature gets too cold, the microcontroller will turn on two 60 watt light bulbs to produce heat. The way I achieved this was using a relay rated for 220v, since the lightbulbs run on 120v (http://www.onallcylinders.com/2015/01/02/relay-case-whys-hows-using-relays-automotive-wiring/). Please note to use precaution when working with high voltage. If the temperature gets too cold, the system turns on a 12v fan using an h-bridge. Note that the fan can be connected in any configuration and you can use either input to the h-bridge (https://en.wikipedia.org/wiki/H_bridge). If the moisture content falls below a defined threshold, a 12v water pump will turn on for a short period of time. Note, unlike the fan, the pump must be wired so positive goes to positive and ground goes to ground otherwise the pump will not work.

Additionally you can use four buttons to manual enable all of these devices. The first button is used to toggle the manual state, while the other three are for the fan, lights, and pump. Note that when the manual mode is enabled, the microcontroller will not turn on the devices based on the enviromental conditions.

The polling time and all of the thresholds for the devices can be changed using the command line interface using a serial connection.

Improvements to be made

While the project works, many improvements can be made. First of all, the fan I used for this system is way too small. I accidently order a 30mm by 30mm fan which essentially does nothing. Second, adding a real time clock and data logging would be a useful feature. While I did have a SD card reader, my lack of a real time clock made useful data logging difficult. Additionally, one could design a lux meter, using a photoresister. To do this you need an actual lux meter and a multimeter. Then in various, lighting conditions you can measure the lux and the resistance accross the photoresister. You can then fit the data points you get with an exponential curve. Lastly, a worthwhile improvement to make would be scheduling regular waterings using the real time clock.

greenhouse-monitor-system's People

Contributors

aguerriero1998 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.