class: title-slide count: false .logo-title[] # Smart Energy Monitor ### Team 01 .TitleAuthor[James Bao, Dylan Chamberlain, Ammaar Marzook, and Rishi Shukla] --- layout: true name: template_slide .logo-slide[] .footer[[James Bao](https://www.linkedin.com/in/jamesnzl), [Dylan Chamberlain](https://www.linkedin.com/in/dylanchambo), [Ammaar Marzook](https://www.linkedin.com/in/ammaar-marzook-1b455b234), and [Rishi Shukla](https://www.linkedin.com/in/rishi-shukla-3896721b2), Department of Electrical, Computer, and Software Engineering (2022)] --- name: S1 # Project Goal 🎯 To design and develop an energy monitor that may be used in a smart house to measure and display the amount of energy consumed by appliances.
.center[
] --- name: S2 # Implementation Overview .left-column[ - 🔌 Monitoring of real power consumption - 📏 Precise measurements of voltage and current - 🔁 Firmware state machine to manage complexity - 🔊 Output over UART and Bluetooth
®
Low Energy - 📺 Built-in 7-segment display - 💻 Feature-rich and fully-responsive web application - 🧑💼 Industry-inspired project management - ✅ GitHub Issues & Pull Requests - 💬 Slack - 📝 Notion ] .right-column[
] --- name: S3 # Project Management (PI) .left-column[ - **Git & GitHub** - Version control, issue tracking, feature branches, and pull requests - Collaborative development and review
] .right-column[
] --- name: S4 # Project Management (PII) - **Git & GitHub** - Version control, issue tracking, feature branches, and pull requests - Collaborative development and review .center[
] --- name: S5 # Project Management (PIII) - **Slack** - Medium to discuss problems or schedule meetings, and consulting lecturers & TAs for support .center[
] --- name: S6 # Project Management (PIV) - **Notion** - Consolidation of project documentation and meeting notes .center[
] --- name: S7 # Hardware Implementation (PI) .left-column[ - **MATLAB Validation Script** - Implemented a script to validate hardware values - Performs a Monte Carlo-esque analysis across the entire project specification range using vectors and matrices .center[
] ] .right-column[
] --- name: S8 # Hardware Implementation (PII) - **Precision Current Shunt Resistor** - Procured a precision $100\,\text{m}\Omega \pm 1\%$ shunt resistor from Digi-Key
®
- Simplifies our board layout and reduces part count .center[
] --- name: S9 # Hardware Implementation (PIII) .left-column[ - **Second Order Filter** - Second-order low-pass differential filters - Increased attenuation of high-frequency noise - Ensures a clean signal is provided to the ADC - **Phase-Preserved Filters** - Deliberately selected $RC$ filter values to apply same phase offset to both signals - Maximises accuracy as there is no net phase shift between voltage and current waveforms ] .right-column[
] --- name: S10 # Hardware Implementation (PIV) .left-column[ - **Surface Mount Design** - An extra challenge to learn and experience - Mimic industry standards of PCB design - More compact and portable - **PCB Design Features** - Large copper pours to maximise power carrying capability - Separation of power ground and signal ground - Designed to fit in the palm of a hand ($62\,\text{mm}\times72\,\text{mm}$) - Logical layout - Separated functional blocks - Minimised trace lengths for noise resilience - Integrated 7-segment display ] .right-column[
] --- name: S11 # Hardware Implementation (PV) .center[
] --- name: S12 # Hardware Implementation (PVI) .left-column[ - **On-Board Microcontroller** - Match industry practice - Design for manufacture (DFM) - More resilient to noise from shortest possible traces - Avoid costly development board - **BLE Module** - Communicate via serial terminal - Mobile phone - Smart Energy Challenge web application - Transmit UART output wirelessly - Receive calibrated gains ] .right-column[
] --- name: S13 # Firmware Implementation (PI) - We wanted to ensure that our firmware was **elegant**, **efficient**, and **modular** .center[
] --- name: S14 # Firmware Implementation (PII) - **State Machine** - Manage timings and simplify complexity .center[
] --- name: S15 # Firmware Implementation (PIII) - **Free-Running ADC** - Maximise our sampling frequency - Non-integer multiple of signal frequency to capture more information - **Rolling Buffer** - Ergonomically take rolling averages of processed voltage, current, and power - Implemented as a circular/ring buffer to reuse same contiguous memory space - **ADC & Display Synchronisation** - Selected display refresh rate to roughly align with ADC sampling period --- name: S16 # Software Implementation (PI) .left-column[ - **Technology Stack** - Next.js with React, and deployed on Vercel - Firebase with Firestore as a database - Browser's `WebBluetooth` API - **Application Features** - Fully-tested light & dark mode - Fully responsive, with a mobile-first design - [Open Graph](https://ogp.me/) protocol for SEO and social media link previews
🌐 Check it out at [**cs209.jamesnzl.xyz**](https://cs209.jamesnzl.xyz) ] .right-column[
] --- name: S17 # Software Implementation (PII) - **Light and Dark Modes** - Defaults to browser/system preference .center[
] --- name: S18 # Software Implementation (PIII) - **Open Graph Metadata** - Search engine optimisation and social media link previews .center[
] --- name: S19 # Software Implementation (PIV) - **Monitor Page** - Plots historical data from Firestore and new data in real-time - [`em6`](http://em6live.co.nz/) API to retrieve Auckland's current energy price and carbon emissions - Zoom on $x$-axis .center[
] --- name: S20 # Software Implementation (PV) - **Calibration Page** - Quickly view sampled ADC waveforms and calibrate digital signal processing gains - Switch between `Samples` and `Gains` mode .center[
] --- name: S21 # Software Implementation (PVI) - **Samples Mode** - Plot sampled waveforms from serial data - Display received data in a serial terminal .center[
] --- name: S22 # Software Implementation (PVII) - **Gains Mode** - Input fields to re-calibrate voltage and current gains - Received with UART and persisted in EEPROM .center[
] --- name: S23 # Hardware Enclosure - 3D printed enclosure for our Smart Energy Monitor - Protects both the board and the user - Gives a more polished aesthetic to blend into the environment .center[
] --- name: S24 # Future Improvements .left-column[ - **Hardware** - Crystal on top of the board - DFM (design for manufacture) - Better BLE Module - BOM consolidation - **Firmware** - Implement gain calibration - UART Rx - EEPROM - **Software** - Monitor fingerprinting/UUIDs - Graph usability - Filters and aggregate reporting ] .right-column[
] --- class: title-slide layout: false count: false .logo-title[] # Ngā mihi nui! #### 🙏 Thank you to Duleepa and all other COMPSYS 209 staff for their valuable time, advice, and feedback.
### Want more? #### Check out our full project documentation at [**cs209.jamesnzl.xyz/documentation**](https://cs209.jamesnzl.xyz/documentation)!