Вы находитесь на странице: 1из 25

Ohm’s Law

Engineering Sdn Bhd


Software Engineer
Presentation
Energy Meter with IoT
Objectives:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam aliquet eu mi quis
lacinia. Ut fermentum a magna ut.

• Analysis mod-bus communication


protocol (RS485)
• Understanding Arduino with WIFI
module feature (ESP32)
• To create digital display features
(I2C OLED)
• Programming energy meter
(DDS238-2 ZN/S) with IoT feature
(Blynk App)
Software Engineering Flow Chart

Research
Understanding Functionality
Similar Final Testing
Equipment Testing
Product

• Understand simply • Mod-bus • Add each feature one


mod-bus master communication by one to ensure they
8.1.2 APP. protocol. works fine together
• Study datasheet for • I2C OLED display • Develop final
energy meter. • WIFI module programming code.
• Research pinout for • TNB billing
OLED, RS485 &
ESP32
• Research library for
WIFI Arduino IDE

Analytic
Datasheet for Energy Meter (DDS238-2 ZN/S)

Feature Display

Testing Display
Pinout for I2C OLED
Pinout for RS485

Energy Meter

Arduino
Pinout for ESP32

TTL to RS485
• GPIO1 - TX
• GPIO3 - RX

I2C OLED
• GPIO21 - SDA
• GPIO22 – SCL/SCK
Mod-bus communication protocol using USB-to-
RS485

• 9600 baud rate


• 8 data bits
• 1 stop bits
• None parity
• Slave ID : 1
• Function code : 3
(holding registers)
USB to RS485
• 16 bits integer Converter
• Register code start with
x04

Transmit
Receive
Mod-bus communication protocol using
Arduino IDE

The readings display in serial monitor :


• Voltage
• Current
• Frequency

https://github.com/4-20ma/ModbusMaster
I2C OLED display connectivity testing

https://www.instructables.com/id/Monochrom
e-096-i2c-OLED-display-with-arduino-SSD13/
I2C OLED display connectivity testing

If OLED is detected, serial monitor display :


• I2C device found at address 0x3C!

If OLED is not detected, serial monitor


display :
• No I2C device found!
I2C OLED display

https://randomnerdtutorials.com/guide-
for-oled-display-with-arduino/
WIFI Module with Blynk APP

In Blynk app:

• Create a New Project (new Auth


Token will be sent to your email) ;
• Add Button Widget ;
• Go to Widget Settings ;
• Set PIN to Digital Pin 2 ;
• Start to control LED ;

https://www.youtube.com/watch?v=-PNY8owjY20
WIFI Module with Blynk APP

In Blynk app:

1.Create a New Project (new Auth


Token will be sent to your email);
2.Add Value Display Widget;
3.Go to Widget Settings ;
4.Set PIN to Virtual Pin V5, V4, V3,
V2, V1;
5.Start to see the display ;

https://docs.blynk.cc/
TNB billing calculator

https://www.tnb.com.my/residential/billing
TNB billing comparison
Software Engineering Flow Chart

Research
Understanding Functionality
Similar Final Testing
Equipment Testing
Product

• Understand simply • Mod-bus • Add each feature one


mod-bus master communication by one to ensure they
8.1.2 APP. protocol. works fine together
• Study datasheet for • 12C OLED display • Develop final
energy meter. • WIFI module programming code.
• Research pinout for • TNB billing
OLED, RS485 &
ESP32
• Research library for
WIFI Arduino IDE

Analytic
Final Testing – Arduino IDE Library
Final Testing – WIFI module (Blynk)
Final Testing – Mod-bus communication
Final Testing – TNB Billing
Final Testing – OLED display
Final Testing – Results
Final Testing – Video
Ohm’s Law Engineering Sdn Bhd

THANK YOU
FLORA@CONTOSO.COM

HTTP://WWW.CONTOSO.COM/

Special thanks to : https://github.com/

Вам также может понравиться