1 of 36

Phonergy

Senior Design Project - Group 20

“The smart-smart energy meter”

2 of 36

Phonergy �The Smart Meter

To create a safe, secure, smart meter that is easy to install and use. Putting an emphasis on data security, long-range communication, and real-time accurate readings that allows consumers to easily trim wasteful energy consumption.

Alexander Kusy 

Estefania Aguilar

Electrical Engineer

(Power Track)

Electrical Engineer

(Comprehensive Track)

Electrical Engineer

(Power Track)

Electrical Engineer

(Power Track)

Kenneth Thompson

Nabeel Khan

Our Team

Design Goal

3 of 36

Project Motivation 

  

  • Wasteful Energy Consumption
    • Hard to have cost understanding of what devices use real-time
    • People take energy for granted these days, often leaving appliances like a desktop powered while not using it
  • Rising Energy Cost
    • Due to high inflation, the price of energy is on the rise
    • Continuous increase in population and movement from non-traditional generation, can propagate into higher energy prices.
  • Remote Monitoring/Security
    • Most smart meters require a Wi-Fi connection, this can be a problem in areas that lack internet
    • Energy data consumption is sensitive using Wi-Fi may not be the safest way to send data
  • Space In The Market
    • Our group recognized the potential security vulnerabilities of existing devices on the market
    • Currently no smart meter on the market supports license free long-distance communication

4 of 36

Project Features

Real-time

Accurate Measurements

Measurement Storage

Long-Distance

Communication &

Data Security

Notifications

Mobile/Web Application

5 of 36

Goals and Objectives�

  • Real Time Accurate data:
    • Users will be able to track their real consumption and appliance usage.
    • Users will be provided with reports and data that allow them to be informed about their home energy consumption.
    • Users will be able to save money by saving energy.
    • Users will have a real-time dollar understanding of their usage.

  • Construction, Cost, and Installation:
    • The cost will be kept minimal and competitive with the market.
    • Installation of the current sensors used on this project is safer since the CT's design is clipping around the breaker conductor.  So non-invasive changes were made to the panel board connections.

  • Communication and Transmission:
    • Low power and low data transmissions. 
    • Ability to service a radius of up to 10 miles of devices.
    • IoT technology implementation. Communication with a large variety of devices with varying data demands.

  • Web-app Interfacing:
    • Smart Analytics that offers intelligent solutions and info-graphics to the data gathered from every user.
    • Trustable data storage and data backup system. Users' data will be sent with a high level of security.

6 of 36

Requirements �& Specifications

Engineering Requirements Description

Value

Units

1. Accuracy�(a) The current transformer used to measure�the current from each circuit breaker in the central circuit breaker panel must be able�to measure current up to:�(b) The current measured by the current trans-�former sensor must be measured at a frequency of:�(c) The current transformer must measure cur-�rent with an accuracy of

100�

60�

≤ 2

Amps�

Hz�

%

2. Power-Backup�(a) The implementation of a back-up power�supply shall be included with a capacity of:

W-Hr

3. Data Relay�(a) Data collected shall be transmitted over LoRaWAN�(b) In between packet transmission, the device�should enter sleep mode for:

30�

5

seconds�

seconds

4. Data Display Configuration�(a) The organized custom display webapp for�data analysis (Grafana), should be updated�to every:

60

seconds

5. Protection Circuitry�(a) The voltage sensor circuitry shall implement a voltage divider to reduce voltage to�ADC range:�(b) The voltage divider circuit must include a�voltage-dependent resistor for spike protection.

220/110

VAC

5. Microcontroller�(a) The microcontroller shall support multiple�I/O ports for up to 10 compact CT sensors.�(b) The microcontroller shall not consume�power greater than:

500

mA

9. Environmental Specifications�(a) Working temperature:�(b) Storage temperature:�(c) Relative humidity (non-condensing):

40 to�125

�-40 to�150

C�

◦C�

7 of 36

Overall Block Diagram

8 of 36

Hardware Design- Block Diagram ��

9 of 36

PCB Schematic -Subsystems

10 of 36

PCB Layout

11 of 36

  • Allows the mains voltages to be sensed and measured accurately by the MCU. 

  • Detects voltage value to perform calculations on real and reactive power. 

  • AC-to-AC power adapter is used to lower the voltage to 9V(RMS).

  • To meet ESP-32 requirements the, adapter’s output needs to be conditioned

  • The following formula was used to provide a positive peak of less than 3.3V. 

  • Higher value resistance is used as it lowers energy consumption.

First Subsystem-Voltage Sensor

12 of 36

Second Subsystem – Current Sensing

  • Three of the most common sensor technologies used today are the low resistance current shunt, hall effect sensor and the current transformer (CT)

Pros 

Cons 

Low Resistance Current Shunt 

  • Very cheap
  • Great accuracy
  • Typically, reliable 
  • Can generate huge amount of heat for large current applications

Hall Effect sensor

  • Great frequency response
  • Used for energy metering applications
  • Large temperature drifts
  • Incorrect current measurement due to magnetic field interference

Current Transformer

  • Ability to measure large currents
  • Low power consumption
  • Ideal for distributed measurement systems

  • Ferrite material in the core can saturate at very high currents

13 of 36

Current Sensor Schematic

  • The current from the output of the CT sensor needs to be converted into a usable voltage
  • Input requirement of the ESP-32 MCU is a positive voltage between 0 and 3.3V
  • A DC bias voltage is required to provide a DC offset to the AC waveform
  • A bypass capacitor is implemented to reduce noise and any AC impedance

14 of 36

Testing  

15 of 36

Third Subsystem – Power Supply

Original system:

  • The design methodology that was implemented was an AC to DC switching converter, which implemented a flyback transformer.
  • The power supply board was providing an output voltage of 3.3V but was not regulating that voltage under desired load conditions.
  • After troubleshooting the board on numerous occasions which was not successful, a different approach was taken to power the MCU under the consent of the group’s assigned advisor.

16 of 36

Third Subsystem – Power Supply

  • Powers the MCU and other systems for the overall operation of the device.
  • The 120VAC coming from the utility must be regulated by a voltage regulator/voltage step-down.
  • Frequency range: 47-63Hz.
  • Output voltage: 3.3V ±1%. Output current: 1A.
  • Isolated Precision Buck Power Supply Module
  • Wide voltage range input with overload
  • Over temperature protection
  • Ultra-small size and high efficiency.
  • Ripple: less than 60mVp-p
  • Output accuracy: ±1%
  • Voltage regulation rate: ±1%.

17 of 36

Fourth System Back-up Battery Switch-Over System 

  • Battery selection: 4 alkaline AA batteries with a voltage range of 3.6-6V with a battery capacity rating of 860-1200 mA-hr. 

  • Acts as a secondary power supply to keep the ESP-32 PICO running for an extra 2-4 hours if there is a failure of power coming from the mains

  • A low dropout linear regulator is implemented to produce an output voltage of 3.25V

  • A Schottky diode is attached to each voltage source, prioritizing the main power supply to power the device for the majority of the device’s operation

18 of 36

Microcontroller

ESP32-PICO-D4

ESP32-WROOM-32D

MSP430FR6989

Cost

$4.95

$4.09

$11.88

ADC pins

18

18

16

ADC Resolution

12-bit

12-bit

12-bit

Operating Voltage

3.0V ~ 6.0V

3.0V ~ 6.0V

1.8 V ~ 3.6 V

UART

Yes

Yes

Yes

Architecture

32-bit

32-bit

16-bit

IDE

ESP/Arduino

ESP/Arduino

CCS

Package

SIP

SIP

LWFP-80

Availability

Available

Available

Unavailable

  • Specs: # of ADC Pins, Size, UART
  • The MCU must support 16+ ADC pins
  • The size of the MCU should be relatively small
  • UART communication must be present

  • Selection: ESP32-PICO-D4

19 of 36

Transmitter

RYLR896

NUCLEO-WL55JC

RYLR896

Specs

NUCLEO-WL55JC

$19.50

Cost

$42.00

No

Device-EUI

Yes

862 MHz ~ 1020 MHz

RF Transceiver

150 MHz ~ 960 MHz

-4 dBm ~ 15 dBm

RF Output Power

-80 ~ 24 dBm

15.0 km

Communication Range

8.0 km

Transceiver

Classification

MCU + Transceiver

Yes

UART

Yes

AT Commands

Programming

AT / STM / MBEDOS

2.0 V ~ 3.6 V

Operating Voltage

4.75 V ~ 12.0 V

65mm

70mm

17mm

30mm

20 of 36

Raspberry Pi Gateway

Rak2245

LoRa Transceiver (SPI) 

Raspberry Pi 8GB

LoRaWAN Antenna

  • The LoRa Gateway acts as an extension of the cloud allowing us to retrieve data locally, this is better than Wi-Fi because we can have a whole bunch of voltage sensors transmitting data to a singular point, making transmission much easier.

  • LoRaWAN or (Low Power Wide Area Network) is a new and growing alternative to Wi-Fi in IoT applications. The big advantages being the low power consumption and long-range capabilities.

Selection of components: 

  • Microcontroller/Processor: Raspberry Pi 8GB -> This is most definitely overkill but we already had this on hand, if we were to buy this again 4GB model would work.

  • LoRaWAN Transceiver: The RAK2245 is based on the Semtech 1301 and dual SX1257/58 frontend chips. This multichannel concentrator is capable of handling up to 150 devices. -> This device is capable of handling much more than our intended use; however, it was one of the only still available for our PI.

  • LoRaWAN Antenna: Compatible antenna for correct operating frequency (915MHz). In the US this is the designated frequency for LoRaWAN communication.

21 of 36

Inside The RAK2245

Raspberry PI 40 Pin connection

UART and I2C Pin connections for GPS, IPEX antenna output

RAK2245 uses the Semtech Concentrator SX1301 chip. Dual Sx125's can receive/transmit up to 8 uplink/1 downlink channel.

The 1PPS line routes the signal to the GPS module SPI is used to route the signal to the raspberry PI.

Note: not pictured here is the PI connection and operation, the raspberry pi processes the RF messages, while preforming protocol related tasks. It then forwards the processed data to a LoRaWAN server.

Formatting of packets 

22 of 36

Enclosure

  • Fully 3-D printed custom enclosure

  • Design Choices:
          • Compact Design
          • Standoff PCB mounts
          • Flush mount connectors
          • Hidden PSU & Battery Compartments
          • Engraved Logo
          • Removeable covers
          • Custom Painted

210mm

90mm

23 of 36

LoRaWAN Network Protocol

Why we chose to use LoRaWAN:

  • Long distance communication without any licensing
  • TLS encryption 
  • Large scale capabilities
  • Power efficiency
  • Low hardware wear and tear

Cons:

  • Hardware can be a bit expensive
  • Low bandwidth limits how often we can send data, large data payloads often use long airtime.

24 of 36

On-Board Software

The software implemented on the ESP32 is responsible for sampling the various current and voltage sensors, filtering those signals, and performing the necesarry calculations to determine various key data points, before packaging this information to be sent to the LoRaWAN Transciever over a UART connection.

25 of 36

Mobile Application �

Logs Account to Product Code and Phone Number

Store Login information

Login/Signup Page:

  • One time process
  • User inputs password, phone number, and product code.

Landing Page:

  • Smart meter power check
  • Location and Amount register
  • Graphical Display and networking buttons (registered to product number)

Graphic display:

  • Buttons direct you to the third and fourth page of the app.
  • One leads to graphics display and the other to network API hardware connector

26 of 36

Notification System 

    • Measures Energy from each breaker at the Electric Panel board

Phonergy

    • Pick the signal from ESP-32
    • Communication Interface

Edge Gateway

    • Data processing
    • IC2 instance
    • Memory, storage, and networking capacity

AWS

    • Open-source database
    • Fast, serverless, elastic scalability

Influx dB

    • Programing visually
    • Browser-based flow editor

Node Red

    • Programmable communication tool.
    • Communication functions using its web service APIs

Twilio

    • User notifications with kwh usage of the main rooms at home and appliances and the implied cost.

SMS notification

27 of 36

Grafana

 Main Page Grafana Dashboard 

  • Within the Grafana dashboard, users will be able to cover all captured analytical data points and can even view old data up to 5 years.

      

    • Alerts can be set up by the user interface. These alerts can be used to notify the end-user whenever their daily power consumption has exceeded a certain level, if the power factor of their home deviates too far from unity, or if their estimated monthly bill has exceeded the budget currently in place.

    • Each Room of the home will be assigned a sub-dashboard, with the main dashboard mostly displaying a summary of the complete home system for power analytics

    • The power consumption component will display the total power consumed for that day, while the estimated cost of that consumption will also be displayed nearby.

28 of 36

Full Stack Development

Node-Red:

  • Backend API uses Node-Red runtime environment
  • Routes all API request

InfluxDB:

  • NoSQL database
  • Cloud database on ec2

Android Studio is a framework that allows users to test flutter applications

  • Applications can be modified and test on the fly in emulator
  • Android mirroring allows easy deployment of app on smartphone
  • Essential for testing changes

Application Development Framework

We used flutter to build mobile application:

  • JavaScript based application
  • Good documentation and easier than of frameworks
  • Easy integration with firebase

29 of 36

Phonergy Webapp 

Phonergy webapp features:

Home page has the following options:

  1.  Grafana for telematics & data display
  2.  Product information
  3.  About page
  4. Featured technologies, offers, and news
  5. Contact information
  6. Demo video
  7. Shop and cart
  8. Customer services chat 
  9. Story, our vision and technology 

30 of 36

�Design Constraints�

  • Economic
        • $1000 budged provided by our sponsor Contec Americas Inc.
  • Time constraint
        • Testing hardware and software in short time
        • The length of two semesters
        • Shipment time from some components
        • Redesign
    • Environmental
      • There is no Environmental constraint

    • Social
      • Privacy and security
        • Health & Safety
        • Equipment should be installed by an electrical technician
        • Manufacturability
        • Phonergy’s dimension limitations
        • Sustainability
        • Longevity

31 of 36

Identification and review of related standards

  • Based on Article 312 from NFPA 70 “Power Monitoring or Energy management equipment. The wiring space of enclosure for switches or overcurrent devices shall be permitted to contain power monitoring or energy management equipment in accordance with article 312.8.

  • Area. The total area of all conductors, splices, taps, and equipment at any cross section of the wiring space shall not exceed 75 % of the cross-section area of that space. 

  • Conductors. Article 408 Panel boards. Unless a panel board is a market to indicate the characteristic for wiring sizes. The standard ampacity is 60 °C for wire sizes 14 AWG through 1 AWG.” [4.1] 

  • From the IEEE guide for evaluating and testing the Electrical performance of Energy saving devices Std 1889™-2018 [4.1.4]

32 of 36

Bill of Materials

Website

Cost

Shipping

Tax

Total

Notes

JLCPCB

$15.80

$22.97

$0.00

$38.77

Final Board

Mouser

$36.54

$7.99

$2.38

$46.91

Final Board Components

Digi-Key

$1.58

$4.99

$0.10

$6.67

Final Board Antenna

Mouser 

$11.90

$7.99

$0.00

$19.89

Initial parts order in November (order history 0)

Miscellaneous

$195.55

$84.82

$4.53

$283.36

Testing First Round SD1

Miscellaneous

$106.13

$27.01

$3.84

$136.98

Testing Second Round SD2

Aliexpress (CT sensor x9)

$73.74

$8.32

$1.37

$70.62

CT Sensors

Edge Device

$217.05

$0.00

$0.00

$217.05

Edge Device

Twilio

$20.00

$0.00

$0.00

$20.00

SMS server

Total:

$840.25

BUDGET:

$1000.00

33 of 36

Project Management Tools

Text Messaging

GitHub

Overleaf

Google Drive

Discord

34 of 36

Work Distribution

Kenneth Thompson

  • Mobile App
  • LNS
  • Edge device
  • Voltage Sensor
  • Node Red
  • Grafana
  • Instance

Alex Kusy

  • Enclosure
  • LNS
  • Transmitter
  • Power Supply
  • Node Red
  • UART
  • Edge Device

Nabeel Khan

                  • Team Leader
                  • Switching Circuit
                  • Power Supply
                  • ESP Smart Meter
                  • LNS
                  • Ct Sensor

Estefania Aguilar

  • Back-up Battery
  • Web App
  • Notifications
  • UCF Web Page
  • Node Red
  • Grafana

35 of 36

Future Milestones

  • Mobile App Upgrades:

Turn on & turn off the device from the cellphone.

Suggestions bot regarding energy saving.

  • Buy more gateways and send data in parallel to different gateways to improve data throughput.

  • More compact size

36 of 36

Thank you!

Are there any questions?