11. Electrical Substation Configuration
A: Primary power lines' side
B: Secondary power lines' side
1. Primary power lines
2. Ground wire
3.Overhead lines
4. Transformer for measurement of electric voltage
5. Disconnect switch
6. Circuit breaker
7. Current transformer
8. Lightning arrester
9. Main transformer
10. Control building
11. Security fence
12. Secondary power lines
12. CA Wildfire
● Camp Fire 2018
- Deadliest and most destructive wildfire in CA
Civilian
Deaths
Firefighters
Injured
Structures
Destroyed
Structures
Damaged
Civilians
Injured
Civilians
Missing
585 11218,804 564
13. Cause of Camp Fire
● Badly worn c-hook on transmission line led to fire
15. Causes of Electrical Fire
● High winds and temperature
- Blow nearby trees and their branches into power lines
- Snap wooden distribution line poles
- Dust build up
● Living organisms that feed on organic matter
- Me and You
- Rodents
16. MicroPython
Lean and efficient Python implementation
optimised to run on microcontrollers and
in constrained environments
18. MicroPython vs C++
● Easy of use and convenience
● C++ may be faster but Micropython is very fast
for most purposes
19. MicroPython vs C++
● Easy of use and convenience
● C++ may be faster but Micropython is fast for most
purposes
● C++ or Inline Assemblers can be called from
micropython
20. Micropython Features
● REPL, arbitrary precision integers, closures, list
comprehension, generators, exception
handling and more
21. Micropython Features
● REPL, arbitrary precision integers, closures, list comprehension, generators,
exception handling and more
● Supports x86, x86-64, ARM, ARM Thumb,
Xtensa architectures
22. ● Accessing Micropython environment serially:
- screen /dev/ttyUSB0 115200n8
● Running your python code - Business logic
Setting up Micropython
23. Running your Python Code
● Setup wifi client on “boot.py” file:
import network
ntwk = network.WLAN(network.STA_IF)
ntwk.active(True)
ntwk.connect("hybriData", "SoCalPython")
● Upload “boot.py” to board:
- sudo pip3 install adafruit-ampy
- ampy --port /dev/ttyUSB0 put boot.py
24. ● To support electrical fire and explosion in Transformers
- BME 280 sensors
● Code to retrieve temperature and humidity data - “main.py”:
import machine
from machine import Pin, I2C
import bme280
pin_i2c_scl = 22
pin_i2c_sda = 21
bme280_address = 0x77
sensor_i2c = I2C( scl=Pin(pin_i2c_scl), sda=Pin(pin_i2c_sda) )
bme = bme280.BME280( i2c=sensor_i2c, address=bme280_address )
temp = (float(bme.values[0][:-1])* 1.8) + 32
humidity = bme.values[2]
● Upload “main.py” to board:
ampy --port /dev/ttyUSB0 put main.py
Running your Python Code
25. Setting up Micropython
● ESP 32 microcontroller
● Download Micropython binary here:
- http://micropython.org/download#esp32
● Use esptool to upload it to ESP 32
- pip install esptool
- esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
- esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000
esp32-20190125-v1.10.bin
27. Grid Situational Awareness
● Swiftly alert utility operations & maintenance staffs to fire
- Real time monitoring of Substation Transformers
● Predict the likelihood of fire ahead of time
- Deploying Advanced Analytics - AI / ML
29. Conclusion
● Environmental and human factors play a major role in electrical wildfires
● Python can guide and support a safer,
resilient and environmentally
responsible integrated grid