ESP32 3 CHANNEL POWER LOGGER WITH NEW FEATURES.
**Project Description:**
The ESP32 3-Channel Power Logger is a project designed to monitor and log power-related data from up to three channels. It utilizes an ESP32 microcontroller, an INA3221 power monitor chip, an OLED display, and the capability to log data to an SD card. This project is suitable for applications where you need to monitor and record power consumption or voltage/current data over time.
**Components Used:**
1. **ESP32:** The ESP32 microcontroller serves as the brain of the project. It handles data processing, OLED display control, and data logging to an SD card.
2. **INA3221:** The INA3221 is a high-side current and voltage monitor with three channels. It measures the voltage drop across a shunt resistor to calculate current and voltage on each channel.
3. **OLED Display:** An OLED display, driven by the Adafruit_SSD1306 library, is used to show real-time data, settings, and information about the project.
4. **SD Card Module:** An SD card module is used to log data to an SD card. It allows for the storage of historical power data.
5. **Buttons:** Two buttons are used to navigate through the menu and control the project settings.
**Project Working:**
1. **Initialization:** At startup, the project initializes all the necessary components, including the ESP32, INA3221, OLED display, buttons, and SD card module. It performs a boot sequence, checking for the presence of an SD card, connecting to a Wi-Fi network, and synchronizing time using NTP.
2. **User Setup:** After initialization, the project enters a setup menu. Here, the user can configure which channels to monitor (CH1, CH2, CH3), choose the averaging mode for measurements, and start the data logging process. The user interacts with the setup menu using the buttons.
3. **Data Measurement:** Once the setup is complete, the project continuously measures data from the selected channels. It calculates values such as load voltage, current, power, energy, and capacity. These measurements are performed using the INA3221 chip.
4. **Display:** The OLED display shows real-time data for the selected channel. It displays voltage, current, power, energy, capacity, channel number, and battery voltage. The display brightness can be adjusted based on the ambient light.
5. **Data Logging:** If enabled in the setup, the project logs data to an SD card. It creates a log file with a timestamp and records date, time, and the measured data for the selected channels. This data can later be retrieved for analysis.
6. **User Interaction:** The two buttons allow the user to switch between channels, stop data logging, or wake up/sleep the display. The project handles button presses and updates the display accordingly.
7. **Power Management:** To conserve power, the project can put the display to sleep after a certain period of inactivity. The display brightness can also be adjusted.
**Code Working:**
The code for the ESP32 3-Channel Power Logger is written in the Arduino IDE and is divided into several functions:
- **setup():** Initializes all the components, performs the boot sequence, and enters the setup menu.
- **loop():** Handles continuous data measurement, button presses, display control, and data logging.
The key components of the code include:
- **INA3221 Library:** The INA3221 library is used to interact with the INA3221 chip. It provides functions for reading voltage, current, and configuring the chip.
- **Adafruit_SSD1306 Library:** This library drives the OLED display and allows for drawing text and graphics.
- **SPI and SD Libraries:** These libraries enable communication with the SD card module for data logging.
- **WiFi and NTP Libraries:** WiFi and NTPClient libraries are used to connect to Wi-Fi and synchronize time with an NTP server.
**Formulas and Equations:**
The project uses the INA3221 chip to measure voltage and current on each channel. Some key calculations involve:
- **Load Voltage (VLoad):** Calculated as VLoad = Bus Voltage (VBus) + Shunt Voltage (VShunt).
- **Current (I):** Current is calculated using Ohm's Law: I = VShunt / Shunt Resistor Value.
- **Power (P):** Power is calculated as P = VLoad * I.
- **Energy (E):** Energy is the integral of power over time and is calculated by summing up the power values over intervals.
- **Capacity (C):** Capacity is the integral of current over time and is calculated by summing up the current values over intervals.
The code also includes logic for adjusting display brightness and handling user input to navigate the setup menu and control the project.
Overall, the project provides a flexible platform for monitoring and logging power-related data from multiple channels, making it suitable for various applications, including energy efficiency analysis, battery monitoring, and more. Users can customize the configuration and retrieve historical data for analysis.
ESP32 3 CHANNEL POWER LOGGER WITH NEW FEATURES.
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(4)
- Likes(4)
- Engineer Aug 09,2024
- Nightmares Jan 23,2024
- DIY TECHOS MR AHSAN BILAL Sep 04,2023
- AHSAN BILAL IQ Sep 02,2023
- 3 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
8design
-
7usability
-
8creativity
-
5content
-
8design
-
7usability
-
8creativity
-
6content
-
10design
-
10usability
-
10creativity
-
10content
More by DIY TECHOS MR AHSAN BILAL
- XRC PRO: Open-Source RC Transmitter and Receiver System OverviewThe XRC PRO is an advanced, open-source RC transmitter and receiver system designed to offer...
- LED strip PWM/RGB cascadable controller OverviewThis project presents a versatile LED strip controller, which is based on the STC8G1K08A mic...
- STM32F722 flight control Project Overview:This flight controller board is designed with innovation and user-friendliness in m...
- USB3.0 Gigabit LAN-RTL8153B OverviewThis project is a high-performance Gigabit USB 3.0 network card designed around the RTL8153B...
- STM32F103C8T6 minimum system board OverviewThis project is a minimalistic system board designed around the STM32F103C8T6 microcontrolle...
- WCH-LinkE-R0-1v3 Debugger Overview The WCH-LinkE-R0-1v3 Debugger is a versatile and powerful tool designed for online debuggin...
- MAKE 8CH RC TRANSMITTER AND RECEIVER WITH STM32&NRF24L01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- MAKE 8CH RC TRANSMITTER AND RECEIVER WITH STM32&NRF24L01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- AMAZING DIY DIGITAL OSCILLOSCOPE Working PrincipleThis mini oscilloscope project aims to create a compact and user-friendly device fo...
- AMAZING DIY DESKTOP CHARGING STATION Four-way Desktop Smart Charging StationThis is a practical intelligent multi-channel desktop charger...
- AMAZING DIY DESKTOP CHARGING STATION Four-way Desktop Smart Charging StationThis is a practical intelligent multi-channel desktop charger...
- Advanced 8-CH RC Transmitter and Receiver using stm32f103 and Nrf24l01 OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- Testing SBUS & PPM Signals on DIY STM32 RC Transmitter & Receiver! 🎮📡 | Advanced Control Verification | DIY TECH DEEPLY IntroductionWelcome to DIY TECH DEEPLY! In this comprehensive guide, we'll delve into the intricacie...
- DIY RC Transmitter & Receiver with stm32 🎮🚁 | 8 channels pwm,ppm,sbus | DIY TECH DEEPLY OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- UNLOCKING THE SECRET OF UNI-T 203+ TO MAKE RECHARGEABLE. OverviewEmbark on a thrilling DIY journey as we delve into the Uni-T 203+ from Cell to Battery Conve...
- Advanced 8-Channel RC Transmitter and Receiver using stm32f103c8t6,nrf2l01.(Totally Diy) OverviewThe 8-channel RC transmitter and receiver system crafted for the PCBWay 6th Contest is a hig...
- 2-Axis Servo-Based CNC Pen Plotter (Fully Hand Crafted). IntroductionHey there! I'm excited to share my cool project with you - it's a 2-axis servo-based CNC...
- Advanced 8-Channel RC Transmitter and Receiver with STM32F103C8T6 Project OverviewThe "Advanced 8-Channel RC Transmitter and Receiver with STM32F103C8T6" is a versati...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-