LeafAlone Hydroponics System GROUP 9 KHALID AL CHARIF MATTHEW DILEONARDO MIKE LOOMIS JUSTIN WALKER...

Post on 21-Dec-2015

213 views 0 download

Tags:

Transcript of LeafAlone Hydroponics System GROUP 9 KHALID AL CHARIF MATTHEW DILEONARDO MIKE LOOMIS JUSTIN WALKER...

LeafAloneHydroponics SystemG R O U P 9

K H A L I D A L C H A R I F

M AT T H E W D I L E O N A R D O

M I K E L O O M I S

J U S T I N WA L K E R

Sponsor: Duke Energy

2

Work DistributionName Hardware PCB Software Communications Power

Mike X X

Khalid X X

Matt X X

Justin X X

Michael Loomis
Change from chart to bullet list

3

Hydroponics BasicsHydroponic Essentials:

Balanced nutrients and pH (varies by plant)

Adequate water and oxygen supply

Light source

Deep Water Culture (DWC) setup shown in figure to the right

4

Motivation Hydroponic gardening requires plant specific knowledge base

◦ Each plant varies in optimal pH and nutrient levels

Setup can be lengthy and requires daily maintenance◦ Monitor and adjust pH, water, and nutrient levels

Traditional soil gardening can lead to subpar plant growth ◦ Hydroponics allow for maximum water and nutrients uptake for best results◦ Competing products cost +$2000 for similar functionality

Michael Loomis
Mention competitive analysis

5

Goals and Objectives Create system that monitors and adjusts hydroponic variables autonomously

◦ Notify user via email/text message if action required

Eliminate lengthy setup/research by pre loading user specified plant values

Low maintenance ◦ No need for daily monitoring or adjustments

System able to function using solar power◦ Promote sustainable energy

Produce results greater than soil based gardening

6

SpecificationsAttribute Value

Battery Life Without Charge 24 hours

Number of Plants 1-2

Weight (Empty) Approx. 5lbs.

Dimensions 30" x 20" x 14"

Total Lifespan 6 months

Operating Temperature 10 - 35◦C

Water Consumption 1-15 liters per day

Reservoir Volume 75 L

Working Temperature 10-40 ◦C

Sensor Measurements 25 minutes intermittently

Electrical Conductivity Range 100-3000 ppm

pH Sensor Range 0-14 pH

Attribute Value

Liquid Dispenser Flow 10-50mL min−1

Air Pump Flow 500-1000mL min−1

Enclosure Sealing Weather resistent

Battery Capacity 5Ah

Battery Voltage 12V

Solar Panel Power Output 20W

Communications Wi-Fi

Data Rate 6-54Mbps

Maximum Signal Power 15dBm

CPU 8bit AVR

Microprocessor Speed 8MHz

7

Overall Block Diagram

pH Probe

EC Probe

Photo-transistor

pH Amplifier

EC Circuit

Water Level

Battery

Charge Controller

Solar Panel

AC to DCConverter

120V AC

ATmega328

Wi-Fi pH Buffer Pump

Nutrient Pump Air Pump

Air Filter

Sensors

Communications

Power Supply

Motors

Device EnclosureRequirements

Rainproof enclosure to protect electronics from moisture.

Easily mountable on most generic reservoir

Plastic container to be easily produced and modified

8

6.3in.

7in.

4.3in.

Enclosure Xray View

9

Sensors

pH Probe

EC Probe

Photo-transistor

pH Amplifier

EC Circuit

Water Level

Battery

Charge Controller

Solar Panel

AC to DCConverter

120V AC

ATmega-328

Wi-Fi pH Buffer Pump

Nutrient Pump Air Pump

Air Filter

Sensors

10

pH Content pH of the water needs to stay within a certain range (pH 5.5-7)

◦ Allows for optimal nutrient absorption◦ Sensor provides feedback on current pH level◦ pH buffer solution adjusts current pH level

pH Sensor◦ Glass electrode probe◦ BNC connector to microcontroller◦ Generates voltage that corresponds to

pHS200C Sensorex Probe

11

pH Problems and SolutionsPROBLEMS

1. Interfacing a high impedance probe with a microcontroller

2. Calibrating the probe

3. Filtering out unwanted signals

SOLUTIONS

1. Using low input bias current op amps as buffer to the microcontroller

2. Using trimming potentiometers to adjust gain and offset signals

3. Using delay on probe measurements to allow outside voltages to dissipate

12

pH Probe Amplifier Schematic

Gain Stage

Precision VoltageReference

VoltageOffset

13

Electrical Conductivity Electrical conductivity (EC) corresponds with the nutrients level in the water (parts per million)

◦ Ppm measurements allow device to regulate nutrient supply to the plants

◦ Initial water ppm is used as baseline reference

EC probe is used to measure conductivity◦ AC voltage input◦ DC voltage output

Sensorex CS150 EC Probe

14

EC Problems and SolutionsPROBLEMS

1. Enabling the circuit to be toggled on/off so that it will not interfere with other sensors

2. Generate two power supplies for oscillator signal

3. Rectifying AC signals to precise DC voltage levels

SOLUTIONS

1. Use MOSFET schematics to allow positive and negative voltage rails to be grounded

2. Use an buck/boost dc to dc converter IC in a voltage inverting schematic

3. Implement precision voltage rectifier

15

EC Probe Reference Schematic

16

Additional Sensors Photoresistor

◦ Measures general light level on plant

Water Level Float Switch◦ Measures if water level falls below a certain point◦ A float valve attached to a garden hose will keep the water reservoir full

Water Level Switch Light Sensor

17

Motors

pH Probe

EC Probe

Photo-transistor

pH Amplifier

EC Circuit

Water Level

Battery

Charge Controller

Solar Panel

AC to DCConverter

120V AC

ATmega328

Wi-Fi pH Buffer Pump

Nutrient Pump Air Pump

Air FilterMotors

18

Diaphragm Pump

Air Pump SpecificationsCost $7.95

Voltage 12 VDC

Current ~30 mA

Airflow 2 L/m

Pressure 350 mmHg

KPM27H-12B512VDC Air Pump

2.75in.

1.125in.

19

Nutrient/pH Buffer Pumps

Air Pump Specifications

Cost $56.94Lifetime 500-1000 hrs

Voltage 12 VDCCurrent ~100-260 mA

Flow 20-80 ml/min

Max. Pressure Height

8 m (Water)

SR 10/30 12VPeristaltic Pump

2in.2.9in.

20

Motor Control Schematic

21

Communications

pH Probe

EC Probe

Photo-transistor

pH Amplifier

EC Circuit

Water Level

Battery

Charge Controller

Solar Panel

AC to DCConverter

120V AC

ATmega328

Wi-Fi pH Buffer Pump

Nutrient Pump Air Pump

Air FilterCommunications

22

Atmega16u2 MicroprocessorSpecifications Value

Flash Memory 16 kilobytes

Pins 32

Operating Frequency 16MHz

CPU 8-bit AVR

• USB Interface Capable• Firmware allows USB to SPI interface

23

Atmega328p MicroprocessorSpecifications Value

Flash Memory 16 kilobytes

Pins 32

Operating Frequency 16MHz

CPU 8-bit AVR

• Main processor used for program memory

24

Main Processor Schematic

CC3000 Wi-Fi Schematic

3.3V Logic Level

26

Power Supply

pH Probe

EC Probe

Photo-transistor

pH Amplifier

EC Amplifier

Water Level

Battery

Charge Controller

Solar Panel

AC to DCConverter

120V AC

ATmega328

Wi-Fi pH Buffer Pump

Nutrient Pump Air Pump

Air Filter

Power Supply

27

Power Subsystem Block Diagram

Solar Panel

Charge Controller Battery

Nutrients Pump

Microcontroller

Air Pump

pH Correction Pump

EC Probe

50W

12V50W

12V3.2W

5V0.15W

CC3000 WiFi3.3V.5W

+/- 5V0.35W

Power Subsystem Requirements

1. Safe outdoors

2. 12V, 1 Amp output

3. 24 hours of Battery life

4. Solar Energy Recharging

29

Printed Circuit Board

Prototype design created with Altium

◦ 2 Layers, Standard Spec

Prototype manufacturer:◦ Sunstone Circuits

Specifications

Dimensions 3.125 x 3.900 in

Minimum Purchase 2 Boards

Turn Time 3-5 days

30

PCB Board Layout

31

PCB Rendering

32

PCB Problems and SolutionsPROBLEMS

1. Cross signal interference causing high speed connections to fail

2. Populating ~80 components

SOLUTIONS

1. Using peripheral board for WiFi and system programming

2. Used a stencil and solder paste and reflowed the components into place

33

System Activity Diagram

34

System Software Built using Arduino IDE 1.0.5 Rev.2

◦ Libraries Used:◦ AdafruitCC300

◦ SPI

◦ String

◦ Utility/Debug

◦ Utility/Socket

Runs local host TCP server listening on port 7 Sends HTTP GET requests with sensor data to client server

35

Server Activity Diagram

36

Server Software Server written using Node.js platform

◦ Lightweight◦ Non-blocking architecture allows for easy scalability◦ Small learning curve◦ All code written in JavaScript

Communicates with system using TCP socket connections ◦ Send data on port 7

37

Database TablesPlants

PK ID Number

Youth_EC_MinimumYouth_EC_MaximumAdult_EC_MinimumAdult_EC_MaximumPH_MaximumPH_MinimumName

User

PK ID Number

Device_IDEmailPasswordFirst_NameLast_NamePhone_NumberPhone_CarrierPlant_Name

Sensor

PK ID Number

TimestampDevice_IDIP_AddressPH_AddressPH_LevelEC_LevelTemperaturePhototransistor_LevelWater_Level

38

Database Design Using non-relational MongoDB

◦ Fast access time◦ Easy to implement API with Node.js server

3 Database Documents created◦ Plants◦ Users◦ Sensor Entry

39

Client Activity Diagram

40

Client Website

41

Client Website Features Login/Logout Authentication User Registration User can choose type of plant to be grown

◦ Plant pH and EC threshold values sent to system after user selects/modifies plant type

Data Log◦ Table view of all sensor test data entries stored in the database

Demo Demo 2

42

Demo 1

43

Demo 1 Tasks1. Choose tests to be performed on command2. TCP socket connection established to system with test information3. System runs selected tests and returns results to server4. Server saves results in the database and displays all entries in the

database

44

Demo 2

45

Demo 2 Tasks1. Mimics actual system functionality2. User specifies:

◦ time interval between sensor tests◦ the number of tests to be run

3. Server sends values to system using TCP socket connection on port 74. System runs tests according to parameters5. System replies to server using HTTP GET request6. The server then stores the sensor entries in the database

46

Software Problems and SolutionsPROBLEM

Client server not receiving all data sent from system during TCP socket data transfer

Arduino strings not easily compatible with HTTP GET requests functions

SOLUTION

Add 10 ms delay after transfer of each character to allow time for server to receive all transmissions

Converted strings to character arrays

47

Component CostPart CostSR10/30 Liquid Pump x2 $113.88EC Probe $70.24pH Probe $55.0012VDC Air Pump $7.95CC3000 WiFi Breakout $34.95Fibox PC 16/16 L3 Enclosure $30.46Polycarbonate Sheet $15.28Epoxy/Sealing Compounds $15.00Charge Controller $24.95PCB Manufacturing $150.00PCB Components $622.90Final Production Cost $1140.60

Questions?