top of page

Week 3 & 4: May 22nd - June 1st

  • zcarlier
  • Jun 2
  • 3 min read

Individual Log - Zach


With Memorial day passing our scheduled meeting days have changed, and weeks 3 and 4 have intersected some.


Following our weekly meeting with Prof. Ejaz, I was tasked with finalizing backlight control and overall code development for the thermostat. I began the week by finalizing the structure behind the warning system, which includes: a leak detection warning, low battery warning, overtemperature (scald) warning, and an insufficient hot water warning. Currently each warning is triggered by either the potentiometer or a button for testing purposes, but this will be changed to depend on values received from the valve control's MCU once group assembly and testing meetings are held. Each warning function is activated via conditional (if-then) statements in the loop function, where the value of the corresponding parameter (real_temp, set_temp, batt_rem, leak_detect) is then passed to its respective function. When a warning function is called, values are assigned to "noteval" and "dur" and passed to a seperate function that plays a unique beeping tone on a buzzer, and the LCD screen displays a message indicating what the warning is.


A bootup routine, which includes a short melody and message showing "The Smart Water Faucet" was created for the device. At the moment, this startup routine only occurs when the device is plugged in after power has been removed.



The first video below shows the boot up routine, and warnings for low battery and overtemp. (Please note that the variable set_temp is being used for initial testing of these warnings, final functions will be dependent on values received from the valve control MCU. Code for all warnings is prepared and only requires minor editing.)

Thermostat boot up, and preliminary warning tests using a potentiometer.

The video below shows the displayed message and chime sound for an insufficient hot water warning using the potentiometer.

Basic testing of the code responsible for warning a user if the temperature is unable to meet the desired temperature.

A button was wired temporarily to pin 7 and configured as a boolean to activate a leak detection warning. The code for this particular warning overrides the entire program and can only be exited after maintenance has occurred.

Leak detection code testing using a button and boolean logic.

Currently, backlight control is dependent on when the potentiometer was last used to set a temperature. A timer is activated using millis() and compared to a set length. Once the value of the timer is greater than or equal to the timer set length, the backlight and display are turned off using lcd.noBacklight() and lcd.noDisplay(). A similar workflow will be added to activate or deactivate both the display and backlight whenever the faucet is used.


The video below shows the current of the thermostat circuit, first with the display and backlight on and then with both off. When active, the thermostat uses ~43 mA (0.38 W), and when not activate around ~12.7 mA (0.11 W).

Measuring the thermostat's total current draw with the display and backlight on and off.

With the thermostats code nearing completion, it was time to prepare the circuit for final assembly. Each section was carefully assembled, soldered, and wired onto a soldered breadboard, and tested to ensure no components would be damaged upon power up. Dupont jumpers are currently in place, but will be replaced with a more permanent solution in the coming weeks.

Soldered breadboard assembly for the thermostat.
Soldered breadboard assembly for the thermostat.

After finalizing the installation and wiring of components on the breadboard, the circuit was powered up and its functionality verified.

 
 
 

Recent Posts

See All
Week #10: July 14th - July 20th

Individual Log - Prem The majority of this week was spent testing and publishing all results for final testing of thermostat and valve...

 
 
 
Week #10: July 14th - July 20th

Group Log The group met many times this week to finalize the project, finish the report, and prepare for the presentation. Many planning...

 
 
 
Week #10: July 14th - July 20th

Individual Log - Conner Started the week by updating the valve code to fix any issues that needed to be addressed before testing could...

 
 
 

Comments


© 2035 by Site Name. Powered and secured by Wix

bottom of page