SHC Tea Maker

Tea Maker

(In early implementation phase!)

Purpose

The tea maker consists of a control unit, a heating plate to heat water in a tea pot, a winch to put a tea bag or other tea container into the water, a sensor measuring the water temperature, a display and some navigation buttons for user input.

The device doesn't depend very much on smarthomatic. It could be used without a smarthomatic network at all. But it will receive the current time to be used by a timer function and it sends the curent device status, so it can be monitored by your home automation system.

Requirements & Development Process

After writing down things I wanted to implement for the tea maker, I thought about it and started writing a thorough and complete list of requirements which I'm now very happy about. After thinking about what to implement first, I created a small feature list. Then I thought about the development approach in general and decided to write down a system development process now used for the development of the tea maker. Please read it to better understand the lists below.

Functions, Behavior

Here's the WBS of the tea maker to track development progress. Only bugs are entered in GitHub and visible at the Kanban board.

Status Model

  • Not Started: Todo, open, initial state, implementation wasn't started yet.
  • Implementing: Implementation was started, but tesing of the feature is not possible yet.
  • Testing: Implemented / built up (in SW / HW / ME), feature can be tested.
  • Done: Testing done (for now), feature available to end user, but may contain bugs.
  • Verified: Feature covers all requirements, no known bugs, 100% ready for productive use.
Feature IDFeature GroupFeature NameStatus
F-1HardwareSystem Overview with partsDone
F-3HardwareSchematicsDone
F-4HardwarePCB DesignDone
F-5SoftwareFirst firmware compilesDone
F-7SoftwareDisplay shows textDone
F-8SoftwareMenu navigation with cursor buttonsDone
F-9I/Otemperature sensor supportTesting
F-10I/Oservo winch basic controlTesting
F-6SoftwareE2P layout definedTesting
F-14SoftwarePreset supportTesting
F-12I/Oheating plate relais supportImplementing
F-13I/Opower relais supportImplementing
F-17Softwareheating phase incl. cool-offNot Started
F-18Softwarebrewing phase incl. tea bag in/outNot Started
F-19Softwarewarming phaseNot Started
F-26SoftwareEstimate times based on previous brewing timesNot Started
F-11I/Owinch end switch supportNot Started
F-20Softwarecountdown modeNot Started
F-22Softwaresending SHC statusNot Started
F-21SoftwareSHC RFM12 time receptionNot Started
F-23Softwaretimer modeNot Started
F-24SoftwareSafety functions: auto power off (heating + machine)Not Started
F-25SoftwareTea Kettle removal detectionNot Started
F-27HardwareWiki Assembly InstructionsNot Started

Tea Maker Menu Flow

IDRequirementTypeDomainFeatureE2P affected
TM-1GeneralHeadingN/A
TM-2The tea maker can make tea by heating up water, putting tea into the water and removing it after a certain amount of time.RequirementHardwareall
TM-3A control unit containing an ATMega microcontroller is used to control the brewing procedure, any mechanical and electrical parts and implements the user interface.RequirementHardwareF-3 F-8
TM-4The water is heated up with a standard 230V heating plate (<= 2500 W), which heats up as soon as it has power.RequirementHardwareF-12
TM-5The heating plate is switched on and off as needed by the tea maker control unit.RequirementHardwareF-17
TM-6A normal tea kettle or pot is used on the heating plate to heat up the water.RequirementHardwareF-1
TM-7The tea is brewed in the tea kettle / pot and no second container is used.RequirementHardwareF-1
TM-8The machine supports loose tea put into a tea bag or tea egg and also prefabricated tea bags.RequirementHardwareF-1 F-27
TM-9The tea container is put into the water only for a given amount of brewing time.RequirementHardwareF-18
TM-10The water temperature is measured using a sensor which is placed in the water, without touching the kettle, pot or heating plate.RequirementHardwareF-1 F-9
TM-11The machine is compatible to the smarthomatic system when sending and receiving wireless messages.RequirementSoftwareF-21 F-22
TM-12Updating the firmware can be done using the standard Atmel ISP connector.RequirementHardwareF-3
TM-13Brewing ProcedureHeadingN/A
TM-14The brewing procedure consists of five phases.RequirementSoftwareF-17 F-18 F-19
TM-15The first phase, the "heating phase", is to heat up the water until a predefined heating temperature is reached.RequirementSoftwareF-17x
TM-16In the second phase, the "peak temperature phase", the machine waits for the water having its maximum temperature and getting down at least x degrees (e.g. 0,5). This is necessary because of the inertia of the heating plate. If the heating is stopped at e.g. 90 degrees and the water gets as high as 97 degrees after that and brewing would start immediately after the heating phase is finished, brewing would effectively be done in water which is 97 degrees hot. This might not be intended.RequirementSoftwareF-17
TM-17The amount of degrees that the water temperature has to cool off in the peak temperature phase can be set in the EEPROM at least in the range of 0 to 5 degrees in 0.1 degree steps.RequirementSoftwareF-6 F-17x
TM-18The third phase, the "cool off phase" is to cool off the water until a predefined brewing temperature is reached.RequirementSoftwareF-17x
TM-19If the brewing temperature is set as high as the heating temperature (or higher), there might be no cool off phase effectively.RequirementSoftwareF-17
TM-20In the fourth phase, the "brewing phase", the tea is put into the water to brew it.RequirementSoftwareF-18
TM-21The brewing time starts when the tea is completely moved into the water.RequirementSoftwareF-18
TM-22The temperature is held at the brewing temperature throughout the brewing phase (+/- some degrees).RequirementSoftwareF-18
TM-23The temperature thresholds below and above the target temperature where the heating plate is switched on/off to hold a temperature in the brewing phase can be configured in the EEPROM.RequirementSoftwareF-6 F-18x
TM-24In the fifth and last phase, the "warming phase", which starts after the given brewing time is over, the tea is pulled out of the water and the water is held at a given warming temperature (+/- some degrees) for a given time.RequirementSoftwareF-19x
TM-25The temperature thresholds below and above the target temperature where the heating plate is switched on/off to hold a temperature in the warming phase can be configured in the EEPROM.RequirementSoftwareF-6 F-19x
TM-26The warming time starts as soon as the tea container is completely moved out of the water.RequirementSoftwareF-19
TM-27The machine shuts off after the warming time has passed.RequirementSoftwareF-13 F-19
TM-28In the warming phase, it must be possible to remove the tea kettle for some minutes (e.g. 5) from the heating plate to pour tea into a tea cup without the machine cancelling the warming phase.RequirementSoftwareF-19
TM-29When a tea kettle is detected as being removed, the heating plate is never on.RequirementSoftwareF-24
TM-30The timeout before which the tea kettle has to be placed on the heating plate again and the temperature sensor has to be placed into the water again can be configured in the EEPROM in a range from at least 1-15 minutes.RequirementSoftwareF-6 F-24x
TM-31If the temperature doesn't rise again considerably within the timeout time after the tea kettle was detected as removed, the machine cancels the warming phase and shuts off without showing an error. This situation is a normal way to finish using the tea maker without using the buttons.RequirementSoftwareF-24
TM-32The brewing procedure can be cancelled any time by the user after a confirmation, thus shutting down the machine.RequirementSoftwareF-8
TM-33PresetsHeadingN/A
TM-34The machine supports up to 9 presets (programs) for 9 varieties of tea.RequirementSoftwareF-6 F-14x
TM-35To make tea, one of the presets must be chosen. There's no other way to start making tea than choosing a preset.RequirementSoftwareF-6 F-8
TM-36For each preset, a name, the heating temperature, the brewing temperature, the brewing time, the warming temperature and the warming time can be configured in the EEPROM.RequirementSoftwareF-6 F-14x
TM-37There can be special presets with a brewing time of 0, in which case no tea is put into the water at all and the brewing phase is skipped.RequirementSoftwareF-14 F-18x
TM-38There can be special presets without warming phase. In this case, the machine is immediately switched off after the previous phase is over.RequirementSoftwareF-19x
TM-39User InterfaceHeadingN/A
TM-40The machines human interface consists of some buttons and a display.RequirementHardwareF-3 F-7 F-8
TM-41The display is backlit to make it easily readable.RequirementHardwareF-1 F-3 F-27
TM-42The display backlight is turned on whenever the machine is on and therefore serves also as a power indicator.RequirementHardwareF-1 F-3 F-27
TM-43Switching the machine on is only possibile by pressing a dedicated "on" button manually.RequirementHardwareF-14 F-18
TM-44After startup, the user has to select a brewing preset.RequirementSoftwareF-8 F-14
TM-45Basic values of the preset (especially its name) are shown on the display when the user has to choose the preset.RequirementSoftwareF-8 F-14
TM-46After a preset was chosen, the user can select to start the brewing procedure immediately, by using a countdown or by using a timer.RequirementSoftwareF-8 F-20 F-23
TM-47When the user wants to return to a previous dialog screen / step, he can do so by pressing a "back" button.RequirementSoftwareF-8
TM-48The machine shuts off some minutes after the last user interaction when the user does not finish the dialog and selects what the machine should do.RequirementSoftwareF-24
TM-49The timeout after which the machine in shut down in case of no user interaction can be configured in the EEPROM in the range of at least 1-15 minutes.RequirementSoftwareF-24x
TM-50Before the brewing procedure / waiting time is started, the user has to confirm that tea and the tea kettle with water was properly put into the machine.RequirementSoftwareF-8
TM-51The machine shows what it's currently doing throughout the brewing procedure.RequirementSoftwareF-7 F-17 F-18 F-19
TM-52The machine shows the current and the target temperature (of the current phase) of the water all the time.RequirementSoftwareF-9 F-17 F-18 F-19
TM-53After a tea kettle was detected as removed, the machine counts down the timeout to resume warming on the display.RequirementSoftwareF-25
TM-54A red "heating" LED is on whenever the heating plate is switched on.RequirementHardwareF-3 F-27
TM-55A green "finish" LED is on after the brewing phase is finished, the tea is pulled out of the water and the machine is in the warming phase. RequirementHardwareF-3 F-19 F-27
TM-56Countdown modeHeadingN/A
TM-57In countdown mode, the user enters the time after which the brewing phase shall be finished.RequirementSoftwareF-20
TM-58In countdown mode, the brewing procedure is started at a calculated (estimated) time to finish the brewing phase after the entered countdown time.RequirementSoftwareF-20
TM-59The countdown time can be set in 5 minute steps.RequirementSoftwareF-20x
TM-60The minimum countdown time is 15 minutes.RequirementSoftwareF-20x
TM-61The maximum countdown time is 23 hours 55 minutes.RequirementSoftwareF-20x
TM-62Up to 9 countdown times are supported.RequirementSoftwareF-20x
TM-63The user can either select one of the previously used countdown times or enter a new one (as long as the maximum number of countdown times is not reached yet).RequirementSoftwareF-8 F-20
TM-64When the user has to choose a countdown time, the machine presents the previously defined countdown times sorted in an ascending order.RequirementSoftwareF-8 F-20
TM-65To clean up the countdown times list, the user can also delete a countdown time.RequirementSoftwareF-8 F-20
TM-66Timer modeHeadingN/A
TM-67In timer mode, the user enters a (clock) time at which the brewing phase shall be finished.RequirementSoftwareF-23
TM-68In timer mode, the brewing procedure is started at a calculated (estimated) time to finish the brewing phase after an entered finish time.RequirementSoftwareF-23
TM-69The timer time can be set in 5 minute steps.RequirementSoftwareF-23x
TM-70The time entered is the local time in the format hh:mm, without using weekdays or dates.RequirementSoftwareF-23x
TM-71Up to 9 timers (times) are supported.RequirementSoftwareF-23x
TM-72The user can either select one of the previously used timer times or enter a new one (as long as the maximum number of timer times is not reached yet).RequirementSoftwareF-8 F-23
TM-73When the user has to choose a timer time, the machine presents the previously defined timer times sorted in an ascending order.RequirementSoftwareF-8 F-23
TM-74To clean up the timer times list, the user can also delete a timer time.RequirementSoftwareF-8 F-23
TM-75Timer & Countdown mode in generalHeadingN/A
TM-76The machine learns and remembers the time needed for brewing the tea per preset to estimate when to start to match the entered finish time.RequirementSoftwareF-26x
TM-77After some learning, the real finish time is not more than 5 minutes earlier as the desired finish time, and never too late.RequirementSoftwareF-26
TM-78If necessary, the machine asks the user for a rough amount of used water (e.g. 0,5l, 1l, 1,5l) to make the estimation of the brewing time precise enough.RequirementSoftwareF-8 F-26x
TM-79The machine shows the remaining time in hh:mm and the target finish time in hh:mm throughout the brewing procedure in the same way for all modes.RequirementSoftwareF-8 F-17 F-18 F-19 F-20 F-23
TM-80The current local time is received using the smarthomatic time message.RequirementSoftwareF-21
TM-81If the local time is needed to start a brewing procedure (this is the case in timer mode), the machine waits for reception of the time message until it starts the brewing procedure.RequirementSoftwareF-21 F-23
TM-82The user can use any functionality of the machine even if the machine doesn't know the current local time yet.RequirementSoftwareF-8 F-21 F-23
TM-83The user can especially start the machine in timer mode even if the local time is not known yet.RequirementSoftwareF-8 F-21 F-23
TM-84The machine shows "??:??" as time and remaining time (in timer mode) when the local time is not known yet.RequirementSoftwareF-8 F-21 F-23
TM-85If the timer mode was started and the local time is not received within 30 minutes after starting the timer mode, the machine cancels waiting for the time message and shuts down with an error.RequirementSoftwareF-23 F-24
TM-86Safety functionsHeadingN/A
TM-87When the tea maker is "off", the control unit, the heating plate and any electronics are completely shut down to make sure that the control unit does not power the heating plate accidentally in case of a software or hardware bug. The circuit is built in a way that it can't switch on itself.RequirementHardwareF-3 F-27
TM-88The heating plate is switched by one relais independently from a main relais which switches the whole machine (incl. the heating plate). This is to make sure the machine incl. heating plate can be switched off even if the (far more used) heating plate relais hangs in the "on" state because of a relais fault.RequirementHardwareF-3 F-27
TM-89If the heating plate has a control lamp, a brightness sensor placed at the lamp can be used to detect if the heating plate is currently on even the relais is set to off (because of a hanging relais).RequirementSoftwareF-3 F-27
TM-90The brightness threshold for the heating plate power lamp detection can be set in the EEPROM or set to "off" to not use the function.RequirementSoftwareF-3 F-24x
TM-91If the heating plate LED is detected as being on and the heating plate should be off, the tea maker sends an error and shuts down the complete electronics by switching the main relais off within 5s.RequirementSoftwareF-3 F-22 F-24
TM-92It must be possible to place a non-resetting temperature fuse at the heating plate housing to detect an overheating heating plate. If the fuse triggers, the complete machine has to be switched off within 5s.RequirementSoftwareF-3 F-27
TM-93The circuit has to be designed in a way that a triggered temperature fuse has to be replaced before the tea maker can switch on the heating plate again.RequirementSoftwareF-3 F-27
TM-94When the water temperature doesn't rise by a typical amount of degrees after 2 minutes in the heating phase, the machine cancels the brewing procedure, shuts off the heating plate and goes into an error state. This is to detect a misplaced temperature sensor.RequirementSoftwareF-24x
TM-95The number of degrees the temperature has to rise per minute in the heating phase can be configured in the EEPROM in the range from 1-100.RequirementSoftwareF-24x
TM-96When the heating temperature is not reached after x times the usual time, the machine goes into an error state.RequirementSoftwareF-24
TM-97The maximum factor of heating time can be configured in the EEPROM in the range at least 1-5 in steps of 0.1.RequirementSoftwareF-24x
TM-98When a fall off in temperature is detected in the heating phase, the machine goes into an error state. This is to detect that all water was evaporated.RequirementSoftwareF-24
TM-99When the water temperature doesn't cool down in a typical amount of time, the machine goes into an error state.RequirementSoftwareF-17 F-24
TM-100The degrees per minute the water has to cool down can be set in the EEPROM at least in the range from 0-25 in 0.1 degrees steps.RequirementSoftwareF-17 F-24x
TM-101When the machine detects a mechanical problem putting the tea into the water or out of the water, it goes into an error state.RequirementSoftwareF-18 F-24
TM-102In the warming phase, the percentage over some minutes the heating plate is on is not more than a percentage that can be configured in the EEPROM.RequirementSoftwareF-19x
TM-103When the warming temperature can not be reached after x minutes even if the heating plate is switched on for the maximum percentage, the machine goes into an error state.RequirementSoftwareF-19
TM-104The value after which the target temperature has to be reached in the warming phase can be set in the EEPROM.RequirementSoftwareF-19x
TM-105After detection of any error situation, the machine shuts off the heating plate, sends an error message using the smarthomatic protocol and shows the error on the display.RequirementSoftwareF-22 F-24
TM-106If not otherwise mentioned for specific error cases, after any error, the machine shows an error message for 30 minutes or until the user confirms the error manually. After that, the machine shuts off.RequirementSoftwareF-22 F-24
TM-107At the next startup after an error, the machine shows the last error message immediately on the display, which has to be confirmed by the user.RequirementSoftwareF-8 F-24x
TM-108Smarthomatic integrationHeadingN/A
TM-109If the machine is on, it sends a cyclic status to indicate it is on.RequirementSoftwareF-22
TM-110It must be detectable in the status if brewing the tea is complete.RequirementSoftwareF-22
TM-111Some seconds before shutting down, the machine sends a status to indicate it will be off.RequirementSoftwareF-22
TM-112In case of an error, an error message is sent.RequirementSoftwareF-22
TM-113Preferrably already defined generic messages are used to indicate the status.RequirementSoftwareF-22
TM-114The local time is remembered as soon as the time message was received.RequirementSoftwareF-21
TM-115After the local time was received, the time is counted internally. No additional time messages are taken into account in the current life cycle.RequirementSoftwareF-21

E2P Device Configuration

OffsetBlockContentTypeSizeDescription
0Hardware
Values for hardware setup, which have no special meaning to SHC device concepts + the DeviceType, which decides about the existence of further blocks.
DeviceTypeEnumValue1 BytesThe device can check with this value if the EEPROM data is meant for the actual type of device. If not, the device goes into an error mode.
Values: 0 = BaseStation, 20 = EnvSensor, 40 = PowerSwitch, 50 = RGBDimmer, 60 = Dimmer, 70 = SoilMoistureMeter, 80 = Thermostat, 90 = TeaMaker
8OsccalModeIntValue1 BytesThis value is used to change the speed of the internal oscillator. 0 = don't use OSCCAL calibration (e.g. external crystal oszillator is used). -128 = OSCCAL measure mode: the LED blinks every 60s, so the user can measure the original speed. -127..+127 = The speed is adjusted by the given amount in per mill (e.g. 10 means to speed up the device by +1%).
MinVal: -128, MaxVal: 127, Default: 0
16Reserved6 Bytesn/a
64Generic
This block contains SHC configuration data which every device has.
DeviceIDUIntValue12 BitsThe DeviceID identifies the specific unit in the SHC network. It is used to address the device and in messages the device sends. Every device has to have a different DeviceID.
MinVal: 0, MaxVal: 4095
76Reserved4 Bitsn/a
80PacketCounterUIntValue3 BytesThe PacketCounter is counted up throughout the whole lifetime of the device and is used to make the encrypted packets differently from each other every time.
MinVal: 0, MaxVal: 16777215
104Reserved19 Bytesn/a
256AesKeyByteArray32 BytesThis key is used to encrypt packets before sending and also used as primary key to decrypt packets. Special devices may have additional keys in their device specific block.
512TeaMaker
This block contains the specific configuration data that only tea maker needs.
BaseStationPacketCounterUIntValue3 BytesThis is the last remembered packet counter of a command from the base station. Packets with the same or lower number are ignored.
MinVal: 0, MaxVal: 16777215
536StartupConfirmationMessageByteArray32 BytesText shown on LCD at startup until a button is pressed.
792Reserved160 Bytesn/a
2072PresetCountUIntValue1 BytesThe number of presets to use.
MinVal: 1, MaxVal: 9
2080PresetNameByteArray[9]16 Bytes x 9The name of the brewing preset (most times the type of tea used), shown on the LCD.
3232HeatingTemperatureUIntValue[9]2 Bytes x 9Temperature to which the water is heated up in 1/10 degrees celsius (range is 0 to 100 degree celsius).
MinVal: 0, MaxVal: 1000, Default: 900
3376HeatingTemperatureDropUIntValue[9]1 Bytes x 9The number of degrees that the temperature has to drop after the maximum temperature was reached after powering off the heating plate when HeatingTemperature was reached (in 1/10 degree celsius).
MinVal: 0, MaxVal: 50, Default: 10
3448LastHeatingTimeSecUIntValue[9]2 Bytes x 9This is the time it took the last time to heat up the water. The value is used to show and calculate a countdown. Range is from 0 to 30 minutes, in seconds.
MinVal: 0, MaxVal: 1800
3592BrewingTemperatureUIntValue[9]2 Bytes x 9Temperature (in 1/10 degree celsius) to which the water is cooled off until brewing is started, in 1/10 degree celsius. The water is held at this temperature during the brewing phase.
MinVal: 0, MaxVal: 1000, Default: 900
3736BrewingTimeSecUIntValue[9]2 Bytes x 9This is how long the tea bag is placed inside the water at brewing temperature. Range is from 0 to 30 minutes, in seconds.
MinVal: 0, MaxVal: 1800, Default: 240
3880WarmingTemperatureUIntValue[9]2 Bytes x 9Temperature at which the water is held after brewing is finished.
MinVal: 0, MaxVal: 1000, Default: 500
4024WarmingTimeSecUIntValue[9]2 Bytes x 9This is how long the water is held at the warming temperature after brewing is finished. Range is from 0 to 12 hours, in seconds.
MinVal: 0, MaxVal: 43200, Default: 7200
4168Reserved72 Bytesn/a
4744BrewingRegulationRangeAboveUIntValue1 BytesThis defines at which temperature the heating plate is turned off when heating up in the brewing phase, in 1/10 degree celsius.
MinVal: 0, MaxVal: 50, Default: 20
4752BrewingRegulationRangeBelowUIntValue1 BytesThis defines at which temperature the heating plate is turned on again when the water is cooling off currently in the brewing phase, in 1/10 degree celsius.
MinVal: 0, MaxVal: 50, Default: 20
4760WarmingRegulationRangeAboveUIntValue1 BytesThis defines at which temperature the heating plate is turned off when heating up in the warming phase, in 1/10 degree celsius.
MinVal: 0, MaxVal: 50, Default: 20
4768WarmingRegulationRangeBelowUIntValue1 BytesThis defines at which temperature the heating plate is turned on again when the water is cooling off currently in the warming phase, in 1/10 degree celsius.
MinVal: 0, MaxVal: 50, Default: 20
4776BrewingPWMPercentageUIntValue1 BytesThe percentage of time the heating plate is one in one cycle of several seconds to minutes. The value has to be high enough to actually heat up the water also at the maximum brewing temperature and the maximum amount of water in the kettle.
MinVal: 0, MaxVal: 100, Default: 30
4784BrewingPWMCycleSecUIntValue1 BytesThe length of one heating PWM cycle in seconds in the brewing phase.
MinVal: 0, MaxVal: 255, Default: 30
4792WarmingPWMPercentageUIntValue1 BytesThe percentage of time the heating plate is one in one cycle of several seconds to minutes. The value has to be high enough to actually heat up the water also at the maximum warming temperature and the maximum amount of water in the kettle. The PWM cycle in general should be slower in the warming phase compared to the brewing phase, because usually the temperature to regulate to is not so important.
MinVal: 0, MaxVal: 100, Default: 30
4800WarmingPWMCycleSecUIntValue1 BytesThe length of one heating PWM cycle in seconds in the warming phase.
MinVal: 0, MaxVal: 255, Default: 180

Hardware Overview

PCBTea Maker PCB (THTThrough hole technology This is the conventional technique to stick pins of components through the PCB and solder them. This is easy to build up, unlinke using SMD components.)
100 x 50 mm
MicrocontrollerATMega 324PA (40-pin TQFP)
Clock Source10,24 MHz external quartz
RFM Transceiver ModeRX + TX
UARTonly debug TX
Power5V power supply