Final Project

Stay hydrated, Be reminded!!

presentation.png

Final Project presentation video

With Kerala's sweltering summers hitting hard, the newspapers buzz with warnings about the brutal heat and keeping hydrated during this time is a must.

Paintings
Paintings
Paintings
Paintings
Paintings
Paintings
Paintings
I dont have a habit of drinking water regularly and found most of my friends are in the same boat. Staying hydrated is vital for maintaining overall health and well-being, supporting bodily functions, and optimizing physical and cognitive performance. Adequate hydration regulates body temperature, supports organ function, and improves digestion, metabolism, and skin health. Chronic dehydration can lead to a range of health issues, emphasizing the importance of drinking water regularly throughout the day.
So, I decided to buy a bottle which indicates time and the amount of water that needs to be consumed within that time.


But that didn't help either!! I would still forget to drink water and that is when I thought of an AquaBuddy for my final project. The Aquabuddy is a band which can be put on your favourite bottle, to remind you to stay refreshed. The reminder band would work to encourage hydration by detecting periods of inactivity and reminding the user to drink water at regular intervals.The band not only reminds you to sip but also helps you locate your bottle when it's time to drink and you dont remember where you kept your bottle. Sporting a cute fish indicator, symbolizing water's importance, and featuring everyone's favorite forgetful fish, Dory, from "Finding Nemo," the band adds a fun twist to hydration. My final project plan is to make a reminder band which can be used on your favourite bottle..



Features of the Aqua Buddy

Marching towards the Final Project

Marching week by week.....

Schedule for the project


Production methods


Electronic Circuit and PCB Production:
  • Design: Draw the schematic and design the PCB in KiCad.
  • Manufacture: Mill the PCB board and solder the components.
  • Program: Test the board and program it to blink the LED and sound alarm in time intervals.

  • 3D Printing for Housing:
  • Design housing unit:
  • Print:
    Silicone Band Production with 3D-Printed Mold:
    This method involves creating a mold using a 3D printer and then casting silicone into the mold.
    Steps:
  • Design and Print the Mold: Create a 3D model of the mold and print it.
  • Prepare the Silicone: Mix and pour the silicone into the mold.
  • Cure the Silicone: Allow the silicone to cure in the mold.
  • Demold the Band: Remove the cured band from the mold.

  • Interface:
  • Design the User Interface in Kodular.
  • B.O.M. - old one...revised one coming later

    COMPONENT PACKAGE NAME QUANTITY COST
    Microcontroller XIAO ESP32 1 699
    3-axis accelerometer ADXL 345 1 99
    Reminder Component-a Neopixel LED 1 359
    Reminder Component-b Speaker 1 42
    Capacitive sensors Copper tape 1 177
    Resistors 1kohm,499ohm,10kohm TBA --
    Capacitors 100nF,10mF,10nF TBA --
    Header Pins 1X08,1x04,1x03 1 each --
    Battery Li rechargeable battery 1 125
    PCB Copper 1 --
    Connectors Jumper wires 4 --

    Project Schedule -old one, revised one coming later

    TASK TITLE START DATE DUE DATE DURATION
    1
    1.1 Research and finalize the PCB design (schematic and routing and collect components) 20-May 21-May 2
    1.2 Solder the components and check for blink 21-May 21-May 1
    1.3 Program for alarm and blink Neopixel 22-May 24-May 3
    2
    2.1 Design the 3D model for the mold for the silicon band 19-May 19-May 1
    2.2 Design the housing unit and how to put the halves together 19-May 19-May 1
    3
    3.1 Make prototypes for the housing unit and cast the band - 3D print and test 22-May 24-May 3
    3.2 3D print housing unit 24-May 27-May 4
    4
    4.1 Make a user interface 28-May 30-May 3
    4.2 Test the UI and the interaction with the band's features 30-May 1-Jun 2
    5
    5.1 Complete documentation 20-May 3-Jun 14
    5.2 Video editing 4-Jun 5-Jun 2


    Project Schedule Timeline

    Block Diagram



  • Xiao ESP32: This is the central microcontroller unit (MCU) that includes built-in WiFi and Bluetooth capabilities and provides the necessary GPIO pins for interfacing with other components.

  • ADXL345 Accelerometer: Connected via I2C to the Xiao ESP32 to detect motion and orientation of the water bottle.

  • Capacitive Sensors: Three individual sensors connected to specific GPIO pins on the Xiao ESP32 to measure water level in the bottle.

  • NeoPixel LED Strip (WS2812): Controlled by the Xiao ESP32 to provide visual feedback.

  • Speaker with Amplifier circuit: Controlled by the Xiao ESP32 to provide audio reminders or alerts.

  • Power Supply: This includes both 3.3V and 5V supplies. The Xiao ESP32 and capacitive sensors typically use 3.3V, while the NeoPixel LED strip and speaker amplifier use 5V.

  • Phone User Interface:The Xiao ESP32 communicates wirelessly with the phone UI using either WiFi or Bluetooth. This connection allows the phone to send commands to and receive data from the Xiao ESP32, such as adjusting reminder settings or monitoring water consumption data.


  • Project Schedule Timeline


    Project Schedule Timeline

    Schematic

    Components:
  • ESP32: The microcontroller that will control everything.
  • Accelerometer (e.g., ADXL345): This sensor will detect movement and acceleration.
  • NeoPixel LEDs: These addressable LEDs will provide visual feedback or indicators based on the accelerometer data.
  • Speaker: This will play sounds or alerts based on the accelerometer input.
  • Amplifier:For the speaker.
  • Resistors: These are used to limit current and protect components.
  • Capacitors: Used for filtering and stability.
  • Connections

  • ADXL345 Accelerometer:
  • Capacitive Sensors:
  • NeoPixel LED Strip:
  • Speaker with Amplifier circuit(using Mosfet) :

  • Points to remember:
  • Ensure the power supply can handle the current requirements of all components, especially the NeoPixel LED strip which can draw significant current when all LEDs are on.
  • Properly decouple the power supply lines to minimize noise and ensure stable operation of the Xiao ESP32 and other sensitive components.
  • Change of plans!!

    The idea was to use an accelerometer and detect any tilt in the bottle as an activity and to trigger reminders when there is inactivity. But my instructors, Jogin and Saheen suggested to test step response on the bottle with two copper strips. It worked! So, I changed my initial design concept to this:

    second concept >
    second conceptb
    Now this means a new schedule, since there is no silicon band anymore.

    second conceptb
    second conceptb

    Revised B.O.M.

    S.No. COMPONENT SOURCE QUANTITY COST
    1 Microcontroller-Xiao ESP32C3 Fablab 1 699
    2 LED RGB Clear Fablab 1 40
    3 Mobile Speaker Local shop 1 10
    4 Copper Tape Fablab 18cm x 3cm strip -
    5 Resistors Fablab 5 5
    7 Battery-LiPo LP251 320 40mAh Local shop 1 120
    Total(INR) 874
    Total(USD) 10.52

    Testing step response


    From Neil's input class Water has a high dielectric constant (about 80), compared to air (about 1). This means the presence of water between the plates significantly increases the capacitance.
  • The copper strips placed on the bottle act as the conductive plates of a capacitor.
  • As the water level changes, the amount of water (dielectric) between the copper strips changes, affecting the capacitance. When the water level rises, more water (with a high dielectric constant) is between the strips, increasing the capacitance. When the water level falls, less water is present, decreasing the capacitance.
  • The code I used for testing this from Neil's notes for input week is here. This is the code used from Neil's notes that i wanted to use :
          //
    // hello.txrx.t1624.ino
    //
    // ATtiny1624 step response
    //
    // Neil Gershenfeld 11/14/21
    //
    // This work may be reproduced, modified, distributed,
    // performed, and displayed for any purpose, but must
    // acknowledge this project. Copyright is retained and
    // must be preserved. The work is provided as is; no
    // warranty is provided, and users accept all liability.
    //
    
    #define rxpin PIN_PA4 // receive pin
    #define txpin PIN_PA5 // transmit pin
    #define settle 100 // settle time
    #define samples 100 // number of samples to accumulate
    
    void setup() {
       Serial.begin(115200); // start serial
       pinMode(txpin,OUTPUT); // set transmit pin to output
       analogSampleDuration(5); // speed up ADC sampling
       analogReadResolution(12); // increase ADC resolution
       }
    
    void loop() {
       int32_t up,down;
       up = down = 0;
       noInterrupts(); // disable interrupts while measuring
       for (int i = 0; i < samples; ++i) {
          digitalWriteFast(txpin,HIGH); // charge up
          up += analogRead(rxpin); // read
          delayMicroseconds(settle); //settle
          digitalWriteFast(txpin,LOW); // charge down
          down += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          }
       interrupts(); // enable interrupts after measuring
       Serial.println(up-down); // send difference
       Serial.flush(); // finish communicating before measuring
       }
        

    However, this is for an ATtiny1624 and I had a board with ATtiny1614 done in the Input week where I had given a pinout for doing this test with a 1Mohm resistor between the pins. Chatgpt modified the code for ATtiny1614 as below:
          //
    // hello.txrx.t1614.ino
    //
    // ATtiny1614 step response
    //
    // Adapted by ChatGPT 05/23/24
    //
    // This work may be reproduced, modified, distributed,
    // performed, and displayed for any purpose, but must
    // acknowledge this project. Copyright is retained and
    // must be preserved. The work is provided as is; no
    // warranty is provided, and users accept all liability.
    //
    
    #define rxpin PIN_PA4 // receive pin (PA4 on ATtiny1614)
    #define txpin PIN_PA5 // transmit pin (PA5 on ATtiny1614)
    #define settle 100 // settle time
    #define samples 100 // number of samples to accumulate
    
    void setup() {
       Serial.begin(115200); // start serial
       pinMode(txpin, OUTPUT); // set transmit pin to output
       analogReadResolution(12); // increase ADC resolution
       }
    
    void loop() {
       int32_t up, down;
       up = down = 0;
       noInterrupts(); // disable interrupts while measuring
       for (int i = 0; i < samples; ++i) {
          digitalWrite(txpin, HIGH); // charge up
          up += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          digitalWrite(txpin, LOW); // charge down
          down += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          }
       interrupts(); // enable interrupts after measuring
       Serial.println(up - down); // send difference
       Serial.flush(); // finish communicating before measuring
       }
    
        
    From Chatgpt:
    Explanation of Changes:
    Pin Definitions: The pin definitions for rxpin and txpin are set to PIN_PA4 and PIN_PA5 respectively, as they are suitable for the ATtiny1614.
    analogSampleDuration: The analogSampleDuration function is not directly supported in standard Arduino for ATtiny1614. Instead, ensuring proper ADC resolution is sufficient.
    digitalWriteFast: Changed to digitalWrite since digitalWriteFast is not a standard function in all environments. You may need to use digitalWriteFast if you have the appropriate library; otherwise, digitalWrite should be adequate. Make sure you have the correct core and libraries for the ATtiny1614 when programming your board. You may need to use the MegaTinyCore for this purpose.

    This is the error I got in Arduino:

    In function 'check_valid_resolution', inlined from 'analogReadResolution.constprop' at C:\Users\DELL\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.1\cores\megatinycore\wiring_analog.c:137:3, inlined from 'setup' at C:\Users\DELL\AppData\Local\Temp\.arduinoIDE-unsaved2024423-23584-1kq8zdi.11id\sketch_may23a\sketch_may23a.ino:23:24, inlined from 'main' at C:\Users\DELL\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.1\cores\megatinycore\main.cpp:51:8: C:\Users\DELL\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.1\cores\megatinycore\wiring_analog.c:124:7: error: call to 'badArg' declared with attribute error: badArg("analogReadResolution called with invalid argument - valid options are 8 or 10."); ^ lto-wrapper.exe: fatal error: C:\Users\DELL\AppData\Local\Arduino15\packages\DxCore\tools\avr-gcc\7.3.0-atmel3.6.1-azduino4b/bin/avr-gcc returned 1 exit status compilation terminated. c:/users/dell/appdata/local/arduino15/packages/dxcore/tools/avr-gcc/7.3.0-atmel3.6.1-azduino4b/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed collect2.exe: error: ld returned 1 exit status exit status 1 Compilation error: exit status 1

    And finally, the corrected code:
      //
    // hello.txrx.t1614.ino
    //
    // ATtiny1614 step response
    //
    // Adapted by ChatGPT 05/23/24
    //
    // This work may be reproduced, modified, distributed,
    // performed, and displayed for any purpose, but must
    // acknowledge this project. Copyright is retained and
    // must be preserved. The work is provided as is; no
    // warranty is provided, and users accept all liability.
    //
    
    #define rxpin PIN_PA4 // receive pin (PA4 on ATtiny1614)
    #define txpin PIN_PA5 // transmit pin (PA5 on ATtiny1614)
    #define settle 100 // settle time
    #define samples 100 // number of samples to accumulate
    
    void setup() {
       Serial.begin(115200); // start serial
       pinMode(txpin, OUTPUT); // set transmit pin to output
       // Ensure ADC is configured correctly
       analogReadResolution(10); // set ADC resolution to 10 bits
       }
    
    void loop() {
       int32_t up, down;
       up = down = 0;
       noInterrupts(); // disable interrupts while measuring
       for (int i = 0; i < samples; ++i) {
          digitalWrite(txpin, HIGH); // charge up
          up += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          digitalWrite(txpin, LOW); // charge down
          down += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          }
       interrupts(); // enable interrupts after measuring
       Serial.println(up - down); // send difference
       Serial.flush(); // finish communicating before measuring
       }
    
    
    My instructor , Saheen changed the code as below to monitor the change in water level.
    
    #define rxpin PIN_PA4 // receive pin (PA4 on ATtiny1614)
    #define txpin PIN_PA6 // transmit pin (PA5 on ATtiny1614)
    #define settle 100 // settle time
    #define samples 100 // number of samples to accumulate
    int32_t waterLevel =0;
    void setup() {
       Serial.begin(115200); // start serial
       pinMode(txpin, OUTPUT); // set transmit pin to output
       // Ensure ADC is configured correctly
       analogReadResolution(10); // set ADC resolution to 10 bits
       }
    
    void loop() {
       int32_t up, down;
       up = down = 0;
       noInterrupts(); // disable interrupts while measuring
       for (int i = 0; i < samples; ++i) {
          digitalWrite(txpin, HIGH); // charge up
          up += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          digitalWrite(txpin, LOW); // charge down
          down += analogRead(rxpin); // read
          delayMicroseconds(settle); // settle
          }
       interrupts(); // enable interrupts after measuring
      //  Serial.println(up - down); // send difference
       int32_t diffrence = up-down;
       Serial.print(diffrence);
       waterLevel = map(diffrence,40500,72000,0,100);
       Serial.print("\t");
       Serial.print(waterLevel);
       Serial.println("%");
       Serial.flush(); // finish communicating before measuring
       }
    
    Now, that this is done. getting back to schedule.

    Project Schedule Timeline

    Testing the battery and speaker


    Testing

    Testing

    PCB design

    esp32c3
    esp32c3
    esp32c3
    esp32c3
  • Wi-Fi and Bluetooth 5.0 Connectivity: Enables robust and energy-efficient communication with the accompanying app, facilitating real-time tracking and updates of water consumption.
  • Low Power Consumption: Designed for low power applications, which is essential for wearable devices to ensure long battery life.
  • RISC-V Architecture: Offers efficient performance with modern processing capabilities, ensuring smooth handling of tasks like light and sound alerts, and sensor data processing.
  • Compact and Integrated Design: Its small size and integrated peripherals fit well into the band, making it sleek and comfortable to wear.
  • Cost-Effective: The ESP32-C3 is budget-friendly, particularly when purchased in bulk, helping to keep the total production cost under $10.
  • Security Features: Includes enhanced security features such as hardware encryption, ensuring the safety and privacy of user data.
  • Customizability and Flexibility: Supports a wide range of sensors and modules, allowing customization for different bottle types and user needs.

  • Schematic

    The schematic was done in kiCad.

    PCB Design

    Initially, I wanted to use a neopixel. The voltage from my battery is showing as 3.98V, which is insufficient for powering a Neopixel that requires around 4.5V, rendering it unsuitable for use with my board. So, I used a RGB instead.
    In Neil's notes, he has given two circuits for RP2040 and t1624. I tested using Attiny1614 using RP2040's circuit. I will have to find out which works for ESP32. I have given options for both in my board.
    PCB design
    PCB design
    For the routing, the switch and battery was given at the back since the slide switch should be on the side. The 'blue' colour in the routing indicates that it is on the back side of the PCB. A hole needs to be milled so that the battery can access the underside of the microcontroller's battery pads.
    PCB design

    3D representation

    To see it in 3D,
    PCB design
    PCB design
    PCB design

    Designing the housing unit

    The housing unit seems like a very small part of the project but I realised that it was a very vital part. There was lots of attention to detail required at this required for this.
    When designing the housing unit,these points had to be remembered:
  • Speaker Chamber: Ensure the speaker is placed in a dedicated chamber to allow clear sound output.
  • Sound Slots: Provide slots on the side for sound to pass through effectively.
  • Switch Slot: Include a slot for the switch to enable easy on/off operation.
  • Type-C Interface: Provide an option for a Type-C interface for connectivity.
  • Copper Stickers Slot: Design slots for copper stickers to enter the box without interfering with the circuit.
  • RGB Light Hole: Include a hole for the RGB light to be visible.
  • Curved Design: Design the housing to follow the profile of the bottle.
  • Microcontroller Jutting: The edge cut I made was a little too close to the footprint of the microcontroller. A provision had to be made for this.
  • Taking sections along the length and the width of the housing unit.
    PCB design
    PCB design

    Try 1

    This was the first trial. However, here the speaker didn't have a closed chamber. The chamber has to be closed so that the sound can come clearly outside.
    PCB design
    PCB design

    Try 2 and Try 3

    In the second trial, the speaker still wasn't fitting perfectly and the provision for the copper tape was on the side which wasn't practical either. Also, the ESP32 was jutting out and not fitting well. In the third trial, the location for the copper wires to come into the PCB was provided correctly and the speaker chamber was correct.
    PCB design
    PCB design

    Try 4 and the final!

    In the fourth trial, I used PETG and it failed. Finally, trial 4 fit well for the components of the PCB.
    PCB design
    PCB design
    The final box being 3d printed in the Bambu Lab A1 3D Printer (Combo version)


    Milling the board

    This was the first time I was doing a two-sided PCB. Using, https://gerber2png.fablabkerala.in/ it was easier. The traces and the outline on the topside are shown below:
    PCB design
    PCB design
    The traces and outline for the bottom layer are shown below:
    PCB design
     alt=
    The board was milled with a Roland Modela. For details on how to mill using Fab modes can be reffered from Week 04-Electronics Production.

    Soldered PCB

    I collected the remaining components from the Fab inventory. PCB design A stop motion video of the PCB being soldered. I find it difficult to solder small components. Saheen helped me do the soldering.


    Here is the front side and back side of the soldered PCB.
    PCB design
    PCB design

    Copper strips

    The copper strips were designed in fusion and exported in dxf to be cut in the Zund. For more details about Zund, refer Computer controlled Cutting

    Here is how the copper strips were cut out in Zund.






    Here, a sticker is placed behind the copper strips so that the strip used can be cut, the sticker peeled and stuck on any bottle.




    Arranging the box

    PCB design
    PCB design

    Assembly

    This video shows the soldered PCB and the assembly of the Aqua Buddy.


    Programming

          #include < WiFi.h>
            #include < FirebaseESP32.h>
            #include "time.h"
            
            #define DATA_PATH "/live/data/waterLevel"
            
            bool taken = false;
            #define NOTE_C4  261    // Define the frequency for note C4 (Do)
            #define NOTE_D4  294    // Define the frequency for note D4 (Re)
            #define NOTE_E4  330    // Define the frequency for note E4 (Mi)
            
            #define SPEAKER_PIN  D2   // Define the pin to which the speaker is connected
            
            #define rxpin D0 // receive pin (D0 on XIAO ESP32-C3)
            #define txpin D8 // transmit pin (D8 on XIAO ESP32-C3)
            #define settle 100 // settle time
            #define samples 100 // number of samples to accumulate
            int32_t waterLevel = 0;
            int32_t difference = 0;
            
            
            //Wifi Confifg
            #define WIFI_SSID "FabGuest"       // your wifi SSID
            #define WIFI_PASSWORD "4fabGUEST"  // your Wiif Password
            
            //Firebase config
            #define FIREBASE_HOST "https://aqua-buddy-3d5cb-default-rtdb.firebaseio.com/"  // firebase realtimeDB api url https://project-name.firebaseio.com/
            #define FIREBASE_AUTH "AIzaSyCoLwSZiBMunNANLwR6ctUlQLtbasnj9OM"                        // API key
            
            
            FirebaseData fbdo;
            FirebaseJson json;
            FirebaseJson json2;
            
            
            // NTP Server config
            // const char *ntpServer = "pool.ntp.org";
            // const long gmtOffset_sec = 5 * 3600 + 30 * 60;  // UTC+5:30
            // const int daylightOffset_sec = 0;               // India does not observe daylight saving time
            
            // int timestamp;
            
            
            
            void setup() {
            
                Serial.begin(115200);
            
              WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
              while (WiFi.status() != WL_CONNECTED) {
                delay(1000);
                Serial.println("Connecting to WiFi...");
              }
              Serial.println("Connected to WiFi");
              
                // Initialize Firebase
              Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
            
            
              // configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
              // timestamp = printLocalTime(1);
                 pinMode(txpin, OUTPUT); // set transmit pin to output
               analogReadResolution(12); // set ADC resolution to 12 bits (ESP32)
                 pinMode(SPEAKER_PIN, OUTPUT);  // Set the speaker pin as an output
                pinMode(D4, OUTPUT);
            
              
              }
            
            void loop() {
            
              int senserData = waterData();
            
             if (senserData>=100){senserData = 100;}
            
              if (Firebase.setInt(fbdo, DATA_PATH, senserData)) {
            
              } else {
                Serial.println("Failed to set data");
                Serial.println("Reason: " + fbdo.errorReason());
              }
            
               if (Firebase.setInt(fbdo, "/live/data/value", difference)) {
            
              } else {
                Serial.println("Failed to set data");
                Serial.println("Reason: " + fbdo.errorReason());
              }
            
              
              delay(500);
             digitalWrite(D4, HIGH);  // turn the LED on (HIGH is the voltage level)
             delay(100);
            digitalWrite(D4, LOW);  // turn the LED on (HIGH is the voltage level)
            
            
            }
            
            
            int waterData(){
                 int32_t up, down;
               up = down = 0;
               noInterrupts(); // disable interrupts while measuring
               for (int i = 0; i < samples; ++i) {
                  digitalWrite(txpin, HIGH); // charge up
                  up += analogRead(rxpin); // read
                  delayMicroseconds(settle); // settle
                  digitalWrite(txpin, LOW); // charge down
                  down += analogRead(rxpin); // read
                  delayMicroseconds(settle); // settle
               }
               interrupts(); // enable interrupts after measuring
               difference = up - down;
              //  Serial.print(difference);
            // waterLevel = map(difference, 60840, 239645, 0, 100);
            waterLevel = map(difference, 63083, 147481, 0, 100);
            
            
            
            
              //  Serial.print("\t");
               Serial.print(waterLevel);
              //  Serial.println("%");
              //  Serial.flush(); // finish communicating before measuring
            
             return waterLevel;
            }
            
        
    In the above program,
  • Add necessary libraries for WiFi and Firebase functionalities.
  • Setup WiFi and Firebase:Configure WiFi credentials (SSID and password) and Firebase credentials (host and authentication key).
  • Initialize in Setup Function:Begin serial communication for debugging.
  • Connect to the specified WiFi network and wait until connected.
  • Initialize Firebase with the given host and authentication key.
  • Configure the pin modes and set the ADC resolution.
  • Measure Water Level in Loop Function: Call the waterData() function to get the current water level using a step response method.
  • Send Data to Firebase:Send the water level and difference values to specific paths in Firebase.
  • Calculate Step Response in WaterData Function:
  • Disable interrupts during measurement for accuracy.Map the measured step response to a percentage scale (0-100) representing the water level.
  • Return Water Level:Return the calculated water level percentage.
  • User Interface

    The app for the AquaBuddy Band is designed to help you stay hydrated effortlessly. You can customize your hydration goals by inputting the number of glasses of water you intend to drink each day and set the desired intervals for reminders. Based on your settings, the app sends timely light and sound alerts to the AquaBuddy stuck on your bottle, ensuring you never miss a reminder. Additionally, the app displays the percentage of water you have consumed throughout the day and helps you locate your bottle when needed. With its user-friendly interface and seamless integration, staying hydrated has never been simpler or more engaging.
    Midlaj helped me to make the webserial app. A web serial app that communicates between the board and a Firebase database typically involves three main components:
  • Microcontroller (Board): Sends and receives data through a serial connection.
  • Web Application: Interfaces with the microcontroller using the Web Serial API and interacts with Firebase.
  • Firebase Database: Stores and retrieves data to facilitate communication between the web app and the microcontroller.
  • The steps involved for this : The downloadable zip folder for the webserial app is here.. Also given under 'Design Files'.

    Running the last mile!!

    This is the screen on the laptop and the phone while calibrating the bottle.

    Here, is the screen recording of the app.

    Once, the alerts are received, it's time to hydrate!

    A message to remember....


    Be reminded, Stay hydrated!


    Design Files

    PCB Files
    PCB design -Schematic, gerber
    PNG files
    Housing Unit
    Fusion (.f3z) design
    Copper strips
    Template used in zund
    Program -Arduino IDE
    Water level
    Step response
    User Interface
    Aqua Buddy- App

    Acknowledgment

    I am deeply grateful for the invaluable guidance and support of my instructors throughout this project.
    I would like to express my heartfelt thanks to Jogin for his expert guidance in the design of the housing unit. His insights and suggestions were crucial in shaping the final design.
    A special thanks to Saheen for his assistance with soldering and programming. His technical expertise and patience greatly contributed to the successful completion of the project.
    I am also thankful to Midlaj for his help in developing the app. His proficiency and dedication were instrumental in bringing the app to life.
    I would like to acknowledge Mufeed for his creative help in designing the fish to be placed over the housing unit. His artistic skills added a unique touch to the project.
    Lastly, I am immensely proud of and grateful to my son, Jaiden, for learning Blender to assist me with the design. His enthusiasm and willingness to help made this journey even more special.
    I also want to extend my heartfelt gratitude to my fabmates for the times we spent learning together, their company, the jokes we shared, the friendly teasing, and the enjoyable moments we shared over meals. The camaraderie, laughter, and support from each of you made this experience memorable and enriching.

    License

    Fab Academy by Ansu Thomas is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International

    Source code hosted at fabcloud/fabacademy/2024/ansu-thomas