Upload
tyler-belle
View
275
Download
0
Embed Size (px)
Citation preview
Introducing the Digiplant
For those with
GREEN THUMBS• Farmers•Agriculturists
BLACK THUMBS
•Domestic and amateur gardeners
Medicine FoodAir
Sense Surroundings
Display emoticonbased on conditions
Take picture of plant
StorageTransfer to phone
Via Bluetooth
Store picturesand sensor data
The Final Product Functionality Layout
Separation of Duties
Tyler Belle• Microcontroller
Programming• Printed Circuit
Board(PCB) interfacing of components
Connor Murray• Design and creation of
Bluetooth compatible mobile application
• Interfacing mobile application to PCB
Technical Contribution(Tyler)
• Creation and fabrication of PCB• Soldering Components• Programming mbed microcontroller board to
interface with components
Components
Chosen based on:Cost
Ability to be interfaced with microcontrollerDegree of accuracy
Microcontroller Choice
•Online community with ready made programming libraries•Port type variance•Allows simple implementation of timed interrupts(*More on this later)
•Not as many pins as compared to mbed•Less number of ports of required communication type
Software Implementation approach
Code Snippet : Attaching of timed interrupts to their respective functions
Code Snippet: Example of function attached to an interrupt
Thresholding and ScoringStart
Sensor value between the range set for
good conditions?
Increment happiness()
variable
Sensor value
between the range
set for bad conditions?
IncrementSadness ()
variable
Increment average()
variableStop
True
True
True
False
False
Main CodeStart
Has a flag been set
for a component
?
Carry out function(Take picture, read sensors
etc)
Set Flag to false
True
False
SD Storage Output
Extra Features
• Indication LEDs (red, blue and green)• Ability to safely remove SD card via a switch• OLED error display• Extra light sensor and use of averaging for
accuracy• Text file containing sensor info will be created
upon first execution and appended once program continuously runs
• Weather-proof container
Technical Contribution (Conor)
• Testing Bluetooth module with Mbed microcontroller
• Creating the mobile application to connect with the Bluetooth module to send and receive data
• Testing the application with the device
Android Why?
The app was designed for an android platform• Open Source• Easy access to tools
needed • Apple products doesn’t
support SSP(Serial Port Profile)
My First App: Design
• First time creating an app
• Started by creating simple apps
• Original design was to have a update button
Bluetooth module JY-MCY HC-06
• 4 Pins to transmit data(VCC, GND, TXD, RXD)
• Only in slave mode• Runs SPP protocol• Operates at a maximum
distance of 10 metres.• Tested hardware
My First App: Creation
For Creating the App the program Eclipse IDE was used.
For the Bluetooth to connect, a UUID (universally unique identifier) and mac address is needed to be known.
This method is called to check the state of the Bluetooth on the phone. Checks that the BluetoothAdapter is not null
My First App: Creation
Method runs so that is constantly listening to the input stream until an exception.
This is the data stream. It creates an input stream for data that is sent to the app and an output stream which sends out data.
Assigning the button on the app to write to output stream when the button is clicked
This method writes message to the output stream. converts the message to bytes and sends it out the output stream.
My First App: Creation
ChangesThe current device repeatedly sends out the information to be displayed on screen rather than updating it through a button press
if(blue.readable()) //If the phone requests it, start transmitting data to the phone { bluetoothLED = 1; //Information has begun transmitting char c = blue.getc(); if(c==0x31) { blue.printf("Light : %f Temperature : %f Soil Humidity: %f Humidity : %f", lightValue, temp, soil, humid); } bluetoothLED = 0; //Information transmission ended }A method that handles an incoming message. So
that when a message is received it creates a string from a bytes array. The string is appended and the end of the line is determined which should be when \r\n is found.
Mbed code that shows that when the app sends out information, code is performed. The app sends out a one so this code checks to see if the received data is a one(0x31 in UTF-8 format).
My First App: Implementation
Changes from what the original idea:Originally going to have two screen Display image of the plant
b) screen shot of the finished appa) From the original idea
Progress
• All specifications implemented with the exception of:
• Cloud computing• Microphone• Image sending over Bluetooth• Portability of Device
Conclusion : What next?
• Added Mechanics• More sensors• Development of Application complexity and
sophistication• Automated Gardening
Conclusion: Summary
• Successful project• Profitable• Scalable• Room to grow and develop
Thank you !!
[email protected] – Tyler [email protected] – Conor Murray
Feel Free to contact Group 15 for further information at anytime.
Questions?