Kit 8 - Smart Systems Capstone
Project 43: Appliance Usage Tracker (Advanced)

The relay switches the appliance (the blue LED load measured by the INA219). Each use is logged with RTC times, duration and energy; after 20 s the relay cuts the power. The button switches it on again.

Parts:
  Push Button tactile 6x6 x1
  Resistor 220 ohm 1/4W x1
  LED 5mm Blue x1
  INA219 Current Sensor x1
  RTC DS3231 x1
  Relay Module 1 Channel 5V x1
  16x2 LCD I2C x1

Circuit notes:
  INA219: VCC 5V, GND, SDA -> A4, SCL -> A5; the load (D8 -> VIN+ -> VIN- -> 220 ohm -> blue LED -> GND) runs THROUGH the shunt. With the relay (project 43) D8 -> relay COM, relay NO -> VIN+
  DS3231 RTC (I2C 0x68): VCC 5V, GND, SDA -> A4, SCL -> A5
  Relay module: DC+ 5V, DC- GND, IN <- D6 (active LOW)
  16x2 LCD (I2C 0x27): VCC 5V, GND, SDA -> A4, SCL -> A5
  Push button between D4 and GND (INPUT_PULLUP, pressed = LOW)

Try it first in the simulator: https://jrlearners.com/arduinoforge/?example=k8-43-appliance-tracker
