If you don’t want to miss my updates, remember to check the public account in the upper right corner and mark it as a star, take a star and give it to me.


Power is an important parameter of power supply characteristics, and a power meter is an instrument for measuring active power. This is often encountered in hardware design work and in power supply questions in electrical competitions.

Long press to identify or scan to fill out
Back to this project, the project uses the INA219 current sensor to measure current, power, and energy, and displays it on an OLED display. It is transmitted over the network and displayed in the Blynk application. In the Blynk application, you can visually see the readings of voltage, current, power, and energy on a graphical display interface.
-
Arduino Pro Mini 328 – 5V/16MHz
-
EPS8266 development board
-
INA219 current sensor, a zero-drift bidirectional current/power monitor with I2C interface from TI
-
450mAh battery

#include <SoftwareSerial.h>#include <Wire.h>SoftwareSerial nodemcu(2,3);#include <Adafruit_INA219.h>#include <Adafruit_SSD1306.h>#include <SPI.h>long int data;
#define OLED_RESET 4Adafruit_SSD1306 display(OLED_RESET);Adafruit_INA219 ina219;
unsigned long previousMillis = 0;unsigned long interval = 100;float shuntvoltage = 0;float busvoltage = 0;float current_mA = 0;float loadvoltage = 0;float energy = 0;
float sdata1 = 0; float sdata2 = 0; float sdata3 = 0;float sdata4 = 0;
String cdata;
void setup(){Serial.begin(9600); nodemcu.begin(9600); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); ina219.begin();}
void loop(){ unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= interval) { previousMillis = currentMillis; ina219values(); displaydata(); } if(nodemcu.available() == 0 ) { sdata1 = loadvoltage; sdata2 = current_mA; sdata3 = loadvoltage * current_mA; sdata4 = energy;
cdata = cdata + sdata1+","+sdata2+","+sdata3+","+sdata4; Serial.println(cdata); nodemcu.println(cdata); delay(1000); cdata = ""; }}
void displaydata() { display.clearDisplay(); display.setTextColor(WHITE); display.setTextSize(1); display.setCursor(0, 0); display.println(loadvoltage); display.setCursor(31, 0); display.println("V"); display.setCursor(62, 0); display.setCursor(75, 0); display.println(current_mA); display.setCursor(110, 0); display.println("mA"); display.setCursor(0, 6); display.println("--------------------");
display.setCursor(101, 14); display.println("A"); display.setCursor(108, 17); display.println("b"); display.setCursor(114, 20); display.println("i"); display.setCursor(120, 23); display.println("d"); display.setCursor(0, 13); display.println(loadvoltage * current_mA); display.setCursor(57, 13); display.println("mW"); display.setCursor(0, 23); display.println(energy); display.setCursor(57, 23); display.println("mWh"); display.display();}
void ina219values() { shuntvoltage = ina219.getShuntVoltage_mV(); busvoltage = ina219.getBusVoltage_V(); current_mA = ina219.getCurrent_mA(); loadvoltage = busvoltage + (shuntvoltage / 1000); energy = energy + loadvoltage * current_mA / 3600;}
To use Blynk, you need to register for an account, and then you can set it up.
The project principle is simple, and the implementation difficulty is low, making it easy to measure parameters such as current, voltage, and power.
Measuring power supply characteristic parameters sounds complex, but with a current sensor, everything becomes easy. Similarly, many power supply design challenges can be solved by choosing the right chip and design method. Regarding power supply courses, Darwin collaborates with TI to launch the [Power EMI Special Series Trilogy]
Part 1: EMI Basics: How much do you know about power supply EMI (already online, click here to watch the video >>>)
Part 2: Full record of the evaluation experiment of the power board LM25149-Q1 (coming soon)
Part 3: Step-by-step guide to creating a controllable digital power supply project (coming soon)

Make a smart relay without an arc using STM32
Make a practical new type necklace with just 5 components
The simplest method for heart rate measurement (suitable for secondary development)
Crack the magnetic levitation globe
The magical light can transmit video? Reveal the production process
STM32 homemade smart watch 60FPS animation
Salute to classic radios, watch the production process
DIY third eye: “special” glasses with Bluetooth/OLED/lens functions
Homemade solar charger that tracks the maximum power point
No MCU night vision goggles, just need to connect wires
The correct way to DIY a flow meter, an interest transformer
Homemade high-difficulty racing timer (lap/thermal printing)
DIY phone WIFI control LED dice
Gas burning power bank
Homemade simple Raspberry Pi security system
Using microcontroller + ESP8266 to build a small weather station
Ultra-mini & highly extensible palm machine car
Dream linkage, use Raspberry Pi to remotely develop microcontrollers
Automatic tracking + identifying pests and diseases plant protection robot
uECG realizes heartbeat LED light ring
Wireless smart high-power switch
Make an ESP8266 smart health watch from scratch
Gathering waste MCUs, turning waste into treasure
Pi Pico + Edge Impulse deployment of intruder detection system
DIY wifi signal strength detector
Complete real-time face recognition with Raspberry Pi in seven steps
Ultrasonic ranging disguised as radar
