MinorProject EECS 1011 Minor Project Info Document (v1) Nov 2021 Copyright James Andrew Smith; you do not have permission to upload or transmit or share this document outside of York University. Minor...

1 answer below »
I have the kit i need the codes in matlab and aurduino


MinorProject EECS 1011 Minor Project Info Document (v1) Nov 2021 Copyright James Andrew Smith; you do not have permission to upload or transmit or share this document outside of York University. Minor Project: Auto Plant Watering with Arduino and Matlab James Andrew Smith Assoc. Prof., York University [this document will be updated] This document begins with a discussion of an important software concept for your project: state machines. It then goes on to describe the components in the project. This is a major revision of an earlier document and so some elements that describe the project, the reporting and the goals will be added at a later date. [this document will be updated] Introduction to State Machines State machines are a fundamental concept in developing programs and control systems. They’re not really “machines” like a car engine, elevator or amusement ride. Instead, think of them as the core of a program that takes actions based on things that are sensed or measured. Hunger example It’s almost lunch time and you’re in a state of hunger. What do you do? You go eat. Once you’re done eating, you’re in a state of satiation (you’re not hungry). So, you no longer eat. What I’ve just described is you as a “state machine”: a machine with states (e.g. conditions, feelings, sensed things). What is sensed drives the state of you or an object. In response to the sensing and the state it results in, an action is taken. In other words, a state machine produces an action in response to what it senses or perceives. Figure 1 A state machine to describe what to do when you're hungry or not. Reference: Finite State Machines on Wikipedia: https://en.wikipedia.org/wiki/Finite-state_machine EECS 1011 Minor Project Info Document (v1) Nov 2021 Copyright James Andrew Smith; you do not have permission to upload or transmit or share this document outside of York University. Watering example Something similar to the hunger example on the previous page happens in an automated plant watering system like the one you’ll work on for your minor project. To control the plant watering in your project you’ll need to organize your Matlab program so that it is reactive: 1. if the soil is dry, then water it; 2. if the soil is wet, but not too wet, then also water it; 3. if the soil is wet enough, then don’t water it. In the list above the soil being dry is the first state of your system. The second state is described by the soil being “wet, but not too wet”. The third state is “wet enough”. Each of these states has an action associated with it: 1. State: dry à Action: Water 2. State: wet, but not too wet à Action: Water 3. State: wet enough à Action: Don’t Water What does this maybe look like in a program?1 1. if(readVoltage(myBoard,soilSensor) < reallydryvalue)="" then="" writedigitalpin(myboard,pumppin,onsignal)="" 2.="" if(readvoltage(myboard,soilsensor)="">< moisturethreshold)="" then="" writedigitalpin(myboard,pumppin,onsignal)="" 3.="" if(readvoltage(myboard,soilsensor)=""><= saturatedvalue)="" then="" writedigitalpin(myboard,pumppin,offsignal)="" of="" course,="" the="" code="" written="" isn’t="" strictly="" correct…="" it’s="" close.="" you’ll="" have="" to="" adapt="" it="" to="" matlab="" by:="" 1.="" writing="" the="" if-else="" structure="" correctly="" 2.="" defining="" the="" myboard,="" soilsensor,="" reallydryvalue,="" etc.="" values.="" 1="" this="" is="" pseudo-code.="" it="" won’t="" run="" without="" modification.="" eecs="" 1011="" minor="" project="" info="" document="" (v1)="" nov="" 2021="" copyright="" james="" andrew="" smith;="" you="" do="" not="" have="" permission="" to="" upload="" or="" transmit="" or="" share="" this="" document="" outside="" of="" york="" university.="" a="" traffic="" light="" state="" machine="" function="" in="" matlab="" here’s="" a="" classic="" state="" machine:="" traffic="" lights.="" we="" use="" time="" as="" the="" measured="" input="" and="" return="" two="" outputs:="" a="" displayed="" value="" and="" a="" function="" output.="" in="" the="" table="" below,="" you="" can="" see="" how="" i="" call="" the="" matlab="" function="" from="" the="" command="" line,="" providing="" the="" starting="" time="" as="" 0="" as="" the="" first="" input="" parameter="" and="" the="" current="" time="" as="" the="" second="" input="" parameter.="" example:="" green="" light="" state="" example:="" yellow="" light="" state="" example:="" red="" light="" state="" you="" can="" see="" that="" the="" function="" responds="" by="" displaying="" a="" message="" and="" also="" by="" returning="" a="" string="" (“green”,="" “yellow”="" or="" “red”).="" function="" trafficlightstate="..." whatlightcolourisit(starttime,="" currenttime)="" %="" define="" boundary="" times="" for="" light="" signals="" (0="" -="" 12="" seconds)="" redstart="0;" %="" red="" starts="" at="" 0="" sec="" redend="5;" %="" red="" ends="" at="" 5="" sec="" yellowstart="redEnd;" %="" yellow="" starts="" @="" red="" end="" yellowend="7;" %="" yellow="" ends="" at="" 7="" sec="" greenstart="yellowEnd;" %="" green="" strt="" @="" yellow="" end="" greenend="12;" %="" green="" ends="" at="" 12="" seconds="" %="" what="" part="" of="" the="" timed="" light="" cycle="" are="" we="" on?="" %="" use="" the="" "modulo"="" operation="" to="" synchronize="" on="" 12="" %="" seconds="" limit="" (greenend)="" cyclepart="mod(currentTime,greenEnd);" %="" if="" cyclepart="" is="" 0="" we="" have="" restarted.="" %="" begin="" the="" "if",="" linking="" cyclepart's="" time="" to="" the="" light's="" state.="" if(cyclepart="">< redend)="" %="" red="" light="" "state"="" disp("state:="" red="" light.");="" trafficlightstate="Red" ;="" elseif(cyclepart="">< yellowend)="" %yellow="" "state"="" disp("state:="" yellow="" light.");="" trafficlightstate="Yellow" ;="" elseif(cyclepart=""><= greenend) % green "state" disp("state: green light."); trafficlightstate = "green"; else % error "state" disp("error: big time error!"); trafficlightstate = "error"; end % end of the if statement end % end of the function source code state machine diagram eecs 1011 minor project info document (v1) nov 2021 copyright james andrew smith; you do not have permission to upload or transmit or share this document outside of york university. the details for creating the function are below, along with a visualization of the flow of the program. the complete traffic cycle is expected to last 12 seconds in this example. we use the modulo function to deal with time above 12 seconds as simply a multiple of the same process, so that 12 to 24 seconds behaves the same as 0 to 12. eecs 1011 minor project info document (v1) nov 2021 copyright james andrew smith; you do not have permission to upload or transmit or share this document outside of york university. the minor project tbd. objective tbd. submission for final report and video tbd. this document will be updated. eecs 1011 minor project info document (v1) nov 2021 copyright james andrew smith; you do not have permission to upload or transmit or share this document outside of york university. the project setup summary set up your plant watering and monitoring system for the first time. take important measurements with the soil moisture sensor and the pump to characterize behaviour of the system. background • view this watering plant video: https://youtu.be/cwtihe9zs58 • • read these resources: o seeedstudio grove beginner kit wiki page: § https://wiki.seeedstudio.com/grove-beginner-kit- for-arduino/ o reading analogue voltages on arduino: § https://www.mathworks.com/help/supportpkg/arduinoio/ref/readvoltage.html o writing digital output voltage on arduinos § https://www.mathworks.com/help/supportpkg/arduinoio/ref/writedigitalpin.html o mosfet grove board: § https://www.seeedstudio.com/grove-mosfet.html o plant moisture grove board: § https://www.seeedstudio.com/grove-capacitive-moisture-sensor-corrosion- resistant.html intro the agri-food industry is one of canada’s biggest industries and employs all manner of engineers in a variety of tasks. automated monitoring and watering of plants is an important element of this industry and is a fantastic example of mechatronics in action: sensors and actuators connected together to do useful work. here, you will try out two key components in an automated monitoring and watering system: moisture sensing and water pumping. the moisture sensor returns a voltage that is inversely proportional to the presence of water, allowing you to determine in the soil is in need of watering. the immersible pump is placed in a water reservoir and you use a mosfet amplifier to driver the electric motor within it to deliver water to your plants. eecs 1011 minor project info document (v1) nov 2021 copyright james andrew smith; you do not have permission to upload or transmit or share this document outside of york university. material needed • 9v battery & cables • grove beginner kit • container for water • water pump • mosfet grove board • potted plant • moisture sensor • container for spills as part of your project you will need to connect a pump and a moisture sensor to your grove board. you’ll use matlab to send signals to the pump in response to dry soil conditions measured by the sensor. the connections will look something like the following greenend)="" %="" green="" "state"="" disp("state:="" green="" light.");="" trafficlightstate="Green" ;="" else="" %="" error="" "state"="" disp("error:="" big="" time="" error!");="" trafficlightstate="ERROR" ;="" end="" %="" end="" of="" the="" if="" statement="" end="" %="" end="" of="" the="" function="" source="" code="" state="" machine="" diagram="" eecs="" 1011="" minor="" project="" info="" document="" (v1)="" nov="" 2021="" copyright="" james="" andrew="" smith;="" you="" do="" not="" have="" permission="" to="" upload="" or="" transmit="" or="" share="" this="" document="" outside="" of="" york="" university.="" the="" details="" for="" creating="" the="" function="" are="" below,="" along="" with="" a="" visualization="" of="" the="" flow="" of="" the="" program.="" the="" complete="" traffic="" cycle="" is="" expected="" to="" last="" 12="" seconds="" in="" this="" example.="" we="" use="" the="" modulo="" function="" to="" deal="" with="" time="" above="" 12="" seconds="" as="" simply="" a="" multiple="" of="" the="" same="" process,="" so="" that="" 12="" to="" 24="" seconds="" behaves="" the="" same="" as="" 0="" to="" 12.="" eecs="" 1011="" minor="" project="" info="" document="" (v1)="" nov="" 2021="" copyright="" james="" andrew="" smith;="" you="" do="" not="" have="" permission="" to="" upload="" or="" transmit="" or="" share="" this="" document="" outside="" of="" york="" university.="" the="" minor="" project="" tbd.="" objective="" tbd.="" submission="" for="" final="" report="" and="" video="" tbd.="" this="" document="" will="" be="" updated.="" eecs="" 1011="" minor="" project="" info="" document="" (v1)="" nov="" 2021="" copyright="" james="" andrew="" smith;="" you="" do="" not="" have="" permission="" to="" upload="" or="" transmit="" or="" share="" this="" document="" outside="" of="" york="" university.="" the="" project="" setup="" summary="" set="" up="" your="" plant="" watering="" and="" monitoring="" system="" for="" the="" first="" time.="" take="" important="" measurements="" with="" the="" soil="" moisture="" sensor="" and="" the="" pump="" to="" characterize="" behaviour="" of="" the="" system.="" background="" •="" view="" this="" watering="" plant="" video:="" https://youtu.be/cwtihe9zs58="" •="" •="" read="" these="" resources:="" o="" seeedstudio="" grove="" beginner="" kit="" wiki="" page:="" §="" https://wiki.seeedstudio.com/grove-beginner-kit-="" for-arduino/="" o="" reading="" analogue="" voltages="" on="" arduino:="" §="" https://www.mathworks.com/help/supportpkg/arduinoio/ref/readvoltage.html="" o="" writing="" digital="" output="" voltage="" on="" arduinos="" §="" https://www.mathworks.com/help/supportpkg/arduinoio/ref/writedigitalpin.html="" o="" mosfet="" grove="" board:="" §="" https://www.seeedstudio.com/grove-mosfet.html="" o="" plant="" moisture="" grove="" board:="" §="" https://www.seeedstudio.com/grove-capacitive-moisture-sensor-corrosion-="" resistant.html="" intro="" the="" agri-food="" industry="" is="" one="" of="" canada’s="" biggest="" industries="" and="" employs="" all="" manner="" of="" engineers="" in="" a="" variety="" of="" tasks.="" automated="" monitoring="" and="" watering="" of="" plants="" is="" an="" important="" element="" of="" this="" industry="" and="" is="" a="" fantastic="" example="" of="" mechatronics="" in="" action:="" sensors="" and="" actuators="" connected="" together="" to="" do="" useful="" work.="" here,="" you="" will="" try="" out="" two="" key="" components="" in="" an="" automated="" monitoring="" and="" watering="" system:="" moisture="" sensing="" and="" water="" pumping.="" the="" moisture="" sensor="" returns="" a="" voltage="" that="" is="" inversely="" proportional="" to="" the="" presence="" of="" water,="" allowing="" you="" to="" determine="" in="" the="" soil="" is="" in="" need="" of="" watering.="" the="" immersible="" pump="" is="" placed="" in="" a="" water="" reservoir="" and="" you="" use="" a="" mosfet="" amplifier="" to="" driver="" the="" electric="" motor="" within="" it="" to="" deliver="" water="" to="" your="" plants.="" eecs="" 1011="" minor="" project="" info="" document="" (v1)="" nov="" 2021="" copyright="" james="" andrew="" smith;="" you="" do="" not="" have="" permission="" to="" upload="" or="" transmit="" or="" share="" this="" document="" outside="" of="" york="" university.="" material="" needed="" •="" 9v="" battery="" &="" cables="" •="" grove="" beginner="" kit="" •="" container="" for="" water="" •="" water="" pump="" •="" mosfet="" grove="" board="" •="" potted="" plant="" •="" moisture="" sensor="" •="" container="" for="" spills="" as="" part="" of="" your="" project="" you="" will="" need="" to="" connect="" a="" pump="" and="" a="" moisture="" sensor="" to="" your="" grove="" board.="" you’ll="" use="" matlab="" to="" send="" signals="" to="" the="" pump="" in="" response="" to="" dry="" soil="" conditions="" measured="" by="" the="" sensor.="" the="" connections="" will="" look="" something="" like="" the="">
Answered Same DayNov 23, 2021

Answer To: MinorProject EECS 1011 Minor Project Info Document (v1) Nov 2021 Copyright James Andrew Smith; you...

Sathishkumar answered on Nov 24 2021
105 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here