The Wonder Washer: Overview

SF Enterprises would like to create a new model of dishwasher using their newly developed ultraviolet sanitizer. Their marketing department is calling it the “Wonder Washer” (we wonder why). Like most dishwashers, a user will put dishes in and start a wash cycle. SF has identified five different wash cycles they’d like to support based on extensive market research. SF has already had a team of mechanical engineers create all the mechanical hardware, now they need an experienced Computer/Electrical Engineer to design the controller, and that’s where you come in…

Caution!

The description below uses the term “wash cycle” to refer to a complete sequence of things that happen for washing dishes. The individual steps of a wash cycle are referred to as “phases”. The timing of each individual phase of a wash cycle is controlled by the clock.

The new machine will be connected to hot and cold water. It will have a start button and a knob to select one of five different washing cycles. In addition, users will need to add soap and, optionally, may also add a liquid that ensures no water spots will be left on dishes.

Artists Rendition

An artists rendition of the final machine (generated by Adobe’s Firefly) is shown below:

Wonder Washer

User Story

A user would typically use the machine like:

  1. They’d put dirty dishes in the machine.
  2. They’d select the type of wash cycle they’d like to run:
    • Regular Wash, Dry, & Extra Sanitize,
    • Regular Wash & Power Dry,
    • Power Wash & Sanitize,
    • Power Wash Warm & Sanitize, or
    • Fast Wash & Anti Spot
  3. They’d add soap to the soap dispenser. They may also add anti-spotting liquid to the anti-spotting dispenser if they are using the “Fast Wash & Anti Spot” wash cycle.
  4. They’d hit the start button.
  5. Depending on the wash cycle they chose, they’ll wait about 30-50 minutes for the dishwasher to move through the different phases needed to do that wash cycle.

Outputs

The mechanical engineers have installed a variety of electrical and electromechanical devices that can be used for all the needed functionality. Here is a list of the various connections (output pins) and how they work:

  • Soap: When a 1 the machine releases the contents of the soap dispenser
  • Hot: When a 1 the machine opens the hot water valve to be used in washing/rinsing
  • Cold: When a 1 the machine opens the cold water valve to be used in washing/rinsing
  • HighPressure: When a 1 the hot and/or cold water pressures are significantly increased, which is good for cleaning food that’s really stuck to dishes. This is used in the two “Power Wash” cycles.
  • AirDry: When a 1 hot air is circulated to dry dishes
    • ExtraHotAir: When a 1 the temperature of air used for air drying is significantly increased (should only be used when AirDry is also used)
  • UVSanitize: When a 1 the ultraviolet lights are on and dishes will be sanitized
    • ExtraSanitize: When a 1 the intensity fo the UV Sanitizer lights is doubled (should only be used when UVSanitize is also used)
  • AntiSpot: When a 1 the machine releases the contents of the anti-spotting dispenser

Inputs

There are three inputs (a total of 5 bits):

  • Start: When the machine is idle and Start is a 1, the user would like the machine to start a wash cycle. The machine will start washing at the next clock cycle. Start should be ignored while the machine is busy washing dishes.
  • Mode: Mode is a knob that provides a 3-bit value. The value helps identify the cycle:

    Mode Value Mode Name
    000 Regular Wash, Dry, & Extra Sanitize
    010 Regular Wash & Power Dry
    011 Power Wash & Sanitize
    001 Power Wash Warm & Sanitize
    110 Fast Wash & Anti Spot

    SF’s mechanical engineering team indicates that other values of Mode will never occur, so you can ignore them.

  • Clock: The clock. The full clock cycle takes “400 units of JLS time”. An actual machine will adjust it to be ~10 minutes for each phase of a wash cycle.

Wash Cycles

Below the phases of each wash cycle are described.

All the wash cycles start with a phase that releases soap and hot water. Next they all go through a phase that rinses the soap off the dishes, but the details of how they rinse differ based on the specific wash cycle chosen. Most wash cycles also proceed to finishing phases that dry and/or sanitize the dishes.

Regular Wash, Dry, & Sanitize

  1. Soap is released and hot water is used to wash the dishes
  2. Warm water (a mix of both hot and cold) is used to rinse the dishes
  3. They air dryer is used to dry the dishes
  4. Extra power is given to the UV Sanitizer to sanitize the dishes

Regular Wash & Power Dry

  1. Soap is released and hot water is used to wash the dishes
  2. Warm water (a mix of both hot and cold) is used to rinse the dishes
  3. Extra hot air is used with the air dryer to dry the dishes

Power Wash & Sanitize

  1. Soap is released and hot water is used to wash the dishes
  2. High pressure cold water is used to rinse the dishes
  3. UV Sanitizer is used to sanitize the dishes

Power Wash Warm & Sanitize

  1. Soap is released and hot water is used to wash the dishes
  2. High pressure warm water (a mix of both hot and cold) is used to rinse the dishes
  3. UV Sanitizer is used to sanitize the dishes

Fast Wash & Anti Spot

  1. Soap is released and hot water is used to wash the dishes
  2. Cold water is used to rinse the dishes AND the anti-spotting agent is dispensed

Requirements / Review

  1. Download and work in this JLS starter: hw4.jls
    • DO NOT change the names of either input or output pins. The Autograder depends on them being named as-is.
  2. You may NOT use the JLS Memory elements, truth tables, or state machines.
  3. You may use all other elements and gates, budlers/unbundlers, named wires, and multi-bit variations of things, like multibit registers.
  4. The CEOs of SF Enterprises for some reason think “Moore is More” and are demanding that a Moore machine be used. (They may not know much about engineering, but they are funding the project so you should follow their request).
  5. They also ask that you minimize the number of states. There should not be two states with the exact same active outputs.
  6. Users may want to change between “Regular Wash, Dry, & Sanitize” and “Regular Wash & Power Dry” while the machine is in the first or second cycle of the “Regular Wash” options. You can assume that they will select one of the two and not another mode. (This will probably work naturally if you follow the suggested workflow below)
  7. SF prizes well-thought-out and clear designs. Part of the grade will be based on having a design that’s easy to read and modify.
  8. Part of the grade will be based on correct behavior of the machine (unit tests).
  9. The machine should start in an idle state, where it is waiting for Start.
  10. The machine should return to the idle state when done.

Suggested workflow

  1. Based on the machine description, identify states that you’ll need and what outputs are active in those states.
  2. Sketch out the state diagram (perhaps using the Finite State Machine Designer).
  3. Check your work: If you have any states with the exact same outputs, combine them.
  4. Based on your work, think about the number of states and a state encoding to use.
  5. Develop the equations for outputs and next state bits.
  6. Check your work! Double check the machine description and your state diagram. Confirm that your equations match the diagram.
  7. Think carefully about your circuit design. You may leverage any of the allowed circuit elements in JLS.
  8. Create your circuit.
  9. Think carefully about using named wires and clear, descriptive names.
  10. Use JLS’s “Watches” and “Signal Generator” to test your work.
    • It may help to add watches to the flip-flops storing the state and observe how the state changes over time to confirm that it matches your state machine diagram.

Submission

Submit the completed JLS file via Gradescope. Gradescope’s unit testing will provide a large portion of the grade. Additional credit will be based on the quality of your work.

Submission Link: Gradescope