Assignment title: Information
Introduction:
Electronic watering systems deliver timed bursts of water to sections of a garden in a preprogrammed sequence. You have been commissioned to implement a timing system that
manages the distribution of water across a garden with up to eight zones. For each zone,
your system will initiate the delivery of water for a pre-set duration of time, to each zone in
sequential order (obviously you won't actually make water flow – a simple display will be
used to indicate which zone is being watered).
The user will be able to enter durations of time (in minutes) to water each zone, up to a
maximum of 60 minutes per zone. Once set, the user will then be able to switch on
watering, at which point the sequence of watering will begin.
During watering, a user may choose to abort the cycle, pause watering, and/or skip to the
next zone. A user may also enable/disable zones for a particular watering cycle. For
example, Zone 2 may have been hand watered earlier, and so on this particular day is
disabled and skipped in the subsequent cycle.
This assignment requires a knowledge of logic gates, flip-flops, counters, controlled gates
and input / output. Optional tasks require knowledge of registers and shift-registers.
Detailed Requirements
The system will provide two major modes of operation: Cycle Mode and Settings Mode.
These are described in detail below. These are selected using a toggle switch, which bydefault, selects Cycle mode. The system can be turned ON and OFF. When turned on, it
always boots up into Cycle Mode, in the Paused state.
Settings mode
In Settings mode, the user is able to set durations of time to water each zone. The time
for each zone is set in minutes (no seconds). The value is set by incrementing or
decrementing a counter. If the user attempts to increment beyond 60 minutes, the counter
will wrap around to 0 and continue to increment. If the user decrements past 0 the counter
will wrap around to 60 and continue to decrement.
Cycle mode
In Cycle mode, a watering cycle can be initiated, paused, continued or aborted. The time
durations for each zone will be determined by settings made in Settings mode (or 60
minutes per zone by default). When a cycle begins, the timer starts continuously counting
seconds, and increments the minute counter each time 60 seconds is reached. The timer
is deemed to have reached its limit as soon as the maximum is reached, at which point the
next zone is initiated until all are complete.
By pressing an on/pause toggle switch, the user can initiate, pause or continue the
watering cycle. Upon completion of a cycle, Watering is turned OFF and the system
returns to its initialised state prior to the cycle commencing.
Additional user operations
During an active watering cycle, the user may choose to abort. By holding the button for
more than 5 seconds (for bonus points), the entire cycle is aborted, and Watering is set to
OFF.
In this case the timing system resets back to Zone 1, in the Paused state. Preprogrammed time durations for each zone remain as they were last set. A user may also
abort the cycle after first pausing it, but this is not a necessary step.
During an active watering cycle, the user may choose to prematurely stop watering the
current zone, and move onto the next zone (or back to the previous zone). Note,
however, that if the user selects to move below Zone 1 or above Zone 8, this is equivalent
to aborting the cycle.
Sometimes a user may wish to pre-set the system to skip a particular zone just for that
day (e.g., they have just hand-watered an area and wish not to waste water). In Cycle
mode, the user may sequentially move between zones (using up/down buttons with wraparound) and enable/disable a zone (using a single toggle button). If a zone is disabled
then that zone is automatically omitted from the watering cycle. At the completion of a
cycle, all zones are returned to an enabled state (and by default, all zones are enabled
when the full system is turned on). This functionality is unavailable during an active cycle
and so enabling and disabling changes cannot be made while a cycle is active.
DisplayDisplay space is limited, with only enough space to display 8 LEDS, each representing
one of the 8 zones, and a time duration, showing minutes between 0 and 60. When the
system is executing a watering cycle, the current zone should flash and all completed
zones should be on, and the time for the current zone should be displayed in minutes.
Three LED lights will be used to display the system state. One indicates whether the full
system is ON or OFF. A second indicates whether the system is in Settings mode (LED
"on" means it is in Settings mode). A third LED indicates that an active watering cycle is
taking place (i.e., LED OFF means it is in Paused state; LED ON means an active
watering cycle is taking place – you can think of this as being an indication that watering is
occurring).
A single LED will be used to indicate whether a selected zone is disabled. That is, as the
user navigates up or down the zones (either in Settings or Cycle mode) , the LED turns
ON when the current selected zone is disabled.
All LEDs and user controls must be labeled.
Phases of Delivery:
Following the outline above, here is a breakdown of implementation phases which map to
the distribution of marks available for this assessment (see below). It is recommended
that you save each phase on a separate worksheet of the file before moving to the next
phase. Ensure your full solution is in the first worksheet, and label everything you
want us to understand!
Phase 1 – Basic timer (for Cycle mode, single zone system)
- Implement a seconds counter, that counts from 0 to 60 seconds and keeps
repeating.
- Implement a minutes counter that increments by 1 every time the seconds counter
reaches 60 (up to the default maximum of 60). Use two 7 segment displays to
show the time in seconds. The timer should stop as soon as it reaches 60 (i.e., it is
non-inclusive).
- Limit the minutes counter to only count up to a stored value between 0 and 60s.
Once reached it should stop and display 0 (again, non-inclusive, so the stored
value should not be displayed when timer is on (except if 0).
- Implement "Water" button which begins/pauses/resumes timer
- Implement an "Abort" button (separate to pause unless attempting bonus task)
which aborts the cycle completely, and sets Watering to OFF
- Add an LED that is ON while counter is counting, and is OFF when paused or
complete.
Phase 2 - Time setting, display and storage (for Settings mode, single zone
system)
- Add a toggle switch to choose between Settings Mode (what you're about to
implement) and Cycle Mode (Phase 1).
- Add a time setter. This requires an Increment and Decrement button (single clock
pulse inputs for both work well) to set the timer in seconds. You should show thecurrent value using the two 7-segment displays you added in Phase 1 (ie., in
Settings mode we display the time set, in Cycle mode we show the timer).
- Add wrap-around functionality when setting timer (from 59 back to 0, or from 0 to
59).
- Store the current value of the display in the register you added in Phase 1 to store
the maximum timer value, such that when in Cycle mode, this becomes the
maximum time of the timer.
- Implement ON/OFF toggle switch for the whole system. When OFF, nothing can
be changed or enabled.
Phase 3 – Multi-zone settings and cycling
• Implement multi-zone selection functionality to select one of the 8 watering zones.
• Add an 8 LED display, where each LED represents the current zone being either
set, or watered. It should be ON when the zone is selected, and otherwise should
be OFF (i.e., in Settings mode, the current zone would that one being set, in Cycle
mode this would be the current zone being watered (for bonus, make the current
zone being watered flash).
• In Settings Mode:
o Use multi-zone selection functionality above to select a zone and enter a
preset watering time for each zone (using the functionality implemented in
Phase 2).
o Implement storage of preset times for each of the 8 zones
• In Cycle Mode:
o Implement multi-zone watering cycle: when Water Button is selected, cycle
through each zone, initiating the timer implemented in Phase 1 to count up to
the preset limit for that zone (the zone is complete as soon as the timer
reaches the preset maximum (i.e., non-inclusive).
Phase 4 – User controls and display
• In Settings Mode:
o Use multi-zone selection functionality to enable/disable each zone
o Implement storage of state for each
o Include a single zone disabled LED which lights up when a zone is disabled,
otherwise is OFF.
• In Cycle Mode:
o Alter multi-zone watering cycle functionality to skip zones that are disabled
(in which case the cycle moves to the next zone).
o Implement zone skip forward and zone skip backwards functionality using
zone selection functionality. This allows user to skip forward or backwards
during a cycle.
o Use 8 LED zone display to show a progress bar. All completed zones
should be ON, current zone should be flashing, and other zones OFF.
Bonus (for extra credit)
• Implement the cycle abort functionality using the continue/pause switch. If held ON
for more than 5 seconds, the whole cycle aborts. If less than 5 seconds, cycle
starts/pauses/continues depending on the state it was previously in.• In Cycle mode, re-implement the timers so that they count down from the preset
time, rather than count up.
o Before a watering cycle begins, the timer should show the preset time of the
first zone to be watered.
o Once the clock reaches 0, the timer should load up the next cycle preset
time and continue.
o Once all zones are complete (or cycle is aborted), the timer should show the
preset time for Zone 1.
• Add other features such as incorporating settings for different days of the week.Description:
[Glcr n dhbgr sebz gur qbphzrag be gur fhzznel bs na vagrerfgvat cbvag. Lbh pna cbfvgvba gur grkg obk naljurer va
gur qbphzrag. Hfr gur Qenjvat Gbbyf gno gb punatr gur sbeznggvat bs gur chyy dhbgr grkg obk.]
Gur frpbaq uvtuyvtugrq va oyhr fubjf gur crevbq bs inevnovyvgl. Vs gur frafbe vachg vf npgvingrq jvguva gur
obhaqnevrf bs guvf ertvba, gur nynez jvyy npgvingr ng gur gvzr fubja. Juvyfg fngvfslvat gur "zber guna sbhe frpbaqf"
erdhverzrag, guvf erfhygf va gur sbyybjvat gvzr inevngvba: 4 < g < 5 frpbaqf.
Design outline:
My design uses 5 ½ bit adders, 23 registers, half a right-shift register, and a binary counter, blah blah, blah. If you try to
construct this circuit, it will never work because this doesn't make sense. Try reading the notes, doing the labs and
experimenting with CEDAR. Blah blah blah.
Assumptions:
Bapr gur nynez syvc-sybc vf npgvingrq, vgf bhgchg srrqf onpx vagb vgf vachg (gubhtu na BE tngr) fb nf gb znvagnva
vgf fgnghf. Gur erfrg vachg zhfg or npgvingrq va beqre sbe gur nynez gb fgbc, juvpu unccraf ng gur evfvat rqtr bs gur
arkg pybpx chyfr. Orybj vf n gehgu gnoyr bs ubj gur nynez erfrg ybtvp jbexf:
Vs gur erfrg vachg vf npgvir, gur ybj fvtany tbvat gb gur NAQ tngr nggnpurq gb gur vachg bs rnpu syvc-sybc erfhygf
va gurz vtabevat gur vachg, naq pyrnevat gurzfryirf.
Unresolved Problems:
My circuit cannot fly no matter how hard I try. Maybe increasing the clock frequency into the MHz (micro seconds)
range will help, but CEDAR does not support this. [Glcr n dhbgr sebz gur qbphzrag be gur fhzznel bs na vagrerfgvat
cbvag. Lbh pna cbfvgvba gur grkg obk naljurer va gur qbphzrag. Hfr gur Qenjvat Gbbyf gno gb punatr gur sbeznggvat
bs gur chyy dhbgr grkg obk.]
Vs gur erfrg vachg vf npgvir, gur ybj fvtany tbvat gb gur NAQ tngr nggnpurq gb gur vachg bs rnpu syvc-sybc erfhygf
va gurz vtabevat gur vachg, naq pyrnevat gurzfryirf.
Conclusion:
Do not tell me how much you loved doing this assignment. Or how much you have learned. In fact, you don't need a
conclusion at all.
Gur frpbaq uvtuyvtugrq va oyhr fubjf gur crevbq bs inevnovyvgl. Vs gur frafbe vachg vf npgvingrq jvguva gur
obhaqnevrf bs guvf ertvba, gur nynez jvyy npgvingr ng gur gvzr fubja. Juvyfg fngvfslvat gur "zber guna sbhe frpbaqf"
erdhverzrag, guvf erfhygf va gur sbyybjvat gvzr inevngvba: 4 < g < 5 frpbaqf.
Bapr gur nynez syvc-sybc vf npgvingrq, vgf bhgchg srrqf onpx vagb vgf vachg (gubhtu na BE tngr) fb nf gb znvagnva
vgf fgnghf. Gur erfrg vachg zhfg or npgvingrq va beqre sbe gur nynez gb fgbc, juvpu unccraf ng gur evfvat rqtr bs gur
arkg pybpx chyfr. Orybj vf n gehgu gnoyr bs ubj gur nynez erfrg ybtvp jbexf:
A couple of pages is all you need.