# DIY Power Meter Project by Using Arduino Pro Mini

48

1

## Introduction: DIY Power Meter Project by Using Arduino Pro Mini

Introduction

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: OLED Display

The next component which I will be using is a display. This way we can actually display the values we’re measuring. I have been working with the “96 inch OLED display for a while now, and it works beautifully. We can use the already made Adafruit library once again in order to send data we want to show on the display | Click Here To Download Adafruit library | you will also need the Adafruit GFX library.

## Step 2: ​SD Card Reader

Now, to make this project complete, we will add a final component. A micro SD card reader, in order to store the measured data as text files, from where you can copy them into a program like Excel to make nice looking plots, and calculate the power and energy used, by multiplying the current and voltage with the time respectively.

This module communicates via an SPI interface, which also uses commands to write/read data. This module is not 5V compatible, so we cannot just wire it up to the Arduino interface since the 5V will destroy the 3.3V chip. For that, I made voltage dividers out of resistors to drop the 5V signals to appropriate 3.3V signals for the chip (MOSI, CS and CLK lines respectively and to drop down the 5V to 3.3V to power the module).

## Step 3: Schematic Diagram:

Finally, we program the Arduino using the Adafruit library for the INA219 module, to read the voltage and current values. Furthermore, we multiply current with the voltage in order to obtain the power used. Then, we can use the milis() function to store the time passed, and multiply it with the power, in order to calculate the energy that has been used. For the SD card reader, I used the “SdFat” library, because the standard SD libraries from Arduino didn’t work that well | Click Here To Download Sdfat Library

You can power the board using the DC jack and by applying a voltage between 7 and 12V to the Arduino, which powers the other components via the 5V VCC.

## Step 4: PCB Arrived:

The sponsor of this project is PCBGOGO which delivered us 10 PCB’s for this project. PCBGOGO produce high-quality PCBs in a very short time and delivers them very quick too. So, if you are thinking of making your project professional, don’t hesitate to upload your Gerber files to PCBGOGO to receive 10 PCBs for a very low price.

## Recommendations

236
97 20K
33 9.4K
Table Saw Class

294 Enrolled