AC mains (230V) power enters the system through a fuse and terminal block into an energy meter, which passes power to the household while a clamped current transformer (CT1) monitors live current draw and sends filtered signals to an Arduino Nano (pin A1) for overcurrent detection. Simultaneously, an MCT2E optocoupler optically senses the meter’s consumption LED blinks, which are cleaned into sharp digital pulses by an LM358 comparator to trigger hardware interrupts on the Nano (pin D2). The Nano translates these pulses into real-time energy usage (kWh), calculates costs, deducts them from the user’s prepaid balance, and updates a local I2C LCD. Operating on autonomous logic, the Nano will immediately trip the RL MAIN relay if the balance hits zero or if a persistent overcurrent is detected, whereas receiving a peak-demand cloud signal trips the RL LOAD relay to cut only non-essential branches unless an authority exemption is active. Every few seconds, the Nano transmits these metrics over a serial link to a NodeMCU, which uploads the data via Wi-Fi to a Firebase/Node.js backend while polling for utility commands. This infrastructure populates the User Panel with consumption and recharge tools, and feeds the Authority Panel for utility monitoring, tariff adjustments, and manual load-shedding control. Ultimately, this continuous loop ensures that crucial safety and switching decisions remain completely functional locally during Wi-Fi outages, syncing seamlessly with the cloud once connectivity is restored.
by ahmedhussain18ahmedhussain18
by TemplatesTemplates
by ahmedhussain18ahmedhussain18
by TemplatesTemplates
asudheer created this project
26 days ago
AC mains (230V) power enters the system through a fuse and terminal block into an energy meter, which passes power to the household while a clamped current transformer (CT1) monitors live current draw and sends filtered signals to an Arduino Nano (pin A1) for overcurrent detection. Simultaneously, an MCT2E optocoupler optically senses the meter’s consumption LED blinks, which are cleaned into sharp digital pulses by an LM358 comparator to trigger hardware interrupts on the Nano (pin D2). The Nano translates these pulses into real-time energy usage (kWh), calculates costs, deducts them from the user’s prepaid balance, and updates a local I2C LCD. Operating on autonomous logic, the Nano will immediately trip the RL MAIN relay if the balance hits zero or if a persistent overcurrent is detected, whereas receiving a peak-demand cloud signal trips the RL LOAD relay to cut only non-essential branches unless an authority exemption is active. Every few seconds, the Nano transmits these metrics over a serial link to a NodeMCU, which uploads the data via Wi-Fi to a Firebase/Node.js backend while polling for utility commands. This infrastructure populates the User Panel with consumption and recharge tools, and feeds the Authority Panel for utility monitoring, tariff adjustments, and manual load-shedding control. Ultimately, this continuous loop ensures that crucial safety and switching decisions remain completely functional locally during Wi-Fi outages, syncing seamlessly with the cloud once connectivity is restored.