Make your own Power Meter/Logger

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 พ.ค. 2024
  • Project file on the free design tool: easyeda.com/GreatScott/PowerM...
    easyeda.com/GreatScott/Portab...
    Previous video: • How Does Wireless Char...
    Facebook: / greatscottlab
    Twitter: / greatscottlab
    Support me for more videos: www.patreon.com/GreatScott?ty=h
    Project information (schematic, code, ....) on Instructables: www.instructables.com/id/Make-...
    Improvements to my Code: github.com/gilleshenrard/data...
    Thanks to EasyEDA for sponsoring this video.
    Check out their free circuit design tool here: easyeda.com
    Parts list (affiliate links):
    Aliexpress:
    1x LiPo Battery: s.click.aliexpress.com/e/_dZh...
    1x TP4056 Board: s.click.aliexpress.com/e/_dX8...
    1x Arduino Pro Mini: s.click.aliexpress.com/e/_d62...
    1x INA219 Board: s.click.aliexpress.com/e/_dUZ...
    1x OLED LCD: s.click.aliexpress.com/e/_dWf...
    1x SD Card PCB: s.click.aliexpress.com/e/_dUy...
    1x Switch: s.click.aliexpress.com/e/_dVn...
    Ebay:
    1x TP4056 Board:rover.ebay.com/rover/1/711-532...
    1x Arduino Pro Mini:rover.ebay.com/rover/1/711-532...
    1x INA219 Board:rover.ebay.com/rover/1/711-532...
    1x OLED LCD:rover.ebay.com/rover/1/711-532...
    1x SD Card PCB:rover.ebay.com/rover/1/711-532...
    1x Switch:rover.ebay.com/rover/1/711-532...
    In this project I will show you how I combined an Arduino, an INA219 power monitor IC, an OLED LCD and a Micro SD Card PCB in order to create a power meter/logger that has more functions than the popular USB Power Meter.
    Music:
    2011 Lookalike by Bartlebeats
    Killing Time, Kevin MacLeod (incompetech.com)
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 793

  • @UsePINpadtoCompleteTransaction
    @UsePINpadtoCompleteTransaction 7 ปีที่แล้ว +172

    I sometimes struggle to find the proper words to express how much respect I have for projects you so openly provide. Thank you!!

  • @iamwood4950
    @iamwood4950 7 ปีที่แล้ว +2

    I'm really glad you took your time to properly design the board and have it compact and neat

  • @ufohunter3688
    @ufohunter3688 6 ปีที่แล้ว +1

    ​GS, This is one fantastic project. Made one and even added a few mods to the code.
    I didn't have to buy anything new or substitute. I had everything already and was going to design and code this exact design from scratch, but you did all the hard work for me, and I thank you for it. Also, thank goodness for these cheap modules.
    This and many other projects would not have even been possible only 5-10 years ago, without these cheap and wonderful modules from China.

  • @yavniksharma
    @yavniksharma 7 ปีที่แล้ว

    A smart engineer with a German accent makes his own power meter/logger but when not satisfied with just an oled screen, adds a data logger too, Great Job!!!

  • @BoomBrush
    @BoomBrush 7 ปีที่แล้ว +64

    Wow, I just realized how much time and effort it must take to make these videos.
    And this is only 6-7 minutes long. Damn.

  • @shedactivist
    @shedactivist 3 ปีที่แล้ว +2

    Perfect. This is exactly what I am looking for to experiment with small garden wind generators and other projects. Thanks for showing me the way.

  • @___aaron.m7930
    @___aaron.m7930 7 ปีที่แล้ว +1

    learned more from your channel in the past month than an entire year in school love your channel!

  • @BlondieSL
    @BlondieSL 3 หลายเดือนก่อน +1

    I know that this is very old, but one suggestion I have, for future use, is instead of having all those raw numbers flickering due to rapid, minor changes, is to create averaging routines for each number.
    That is, you grab a bunch of numbers as they change, for a field, and create a new variable that represents the "average" of a bunch of raw numbers. Then only output, to the LCD, that averaged number.
    This makes things a lot more stable.
    I started doing that long ago for any project that has number fields that could have minor changes. Things look much more professional without all that flickering.
    Hope that helps.

  • @ElbadriEgyption
    @ElbadriEgyption 7 ปีที่แล้ว +11

    for the logging you can use an CSV file and open it with format and it's pretty easy to create for example per each line you can have:
    TIME,VOLTAGE,CURRENT
    just use comma (, ) as separator between you values and excel should be able to put them in column for you

  • @chrisd1828
    @chrisd1828 7 ปีที่แล้ว +2

    Awesome video, I really like how you created the data logger for power consumption, this will prove really useful for evaluating and diagnosing battery life.

  • @dj5quar3
    @dj5quar3 7 ปีที่แล้ว +2

    Your channel is amazing!!!! Thank you so much for being around!!

  • @entropic7768
    @entropic7768 7 ปีที่แล้ว

    I needed this last year and just abandoned the project, (cause I'm a beginner and couldn't find how to do it) will resume it in a few weeks when I have time. Thank you!

  • @TheJimtanker
    @TheJimtanker 4 ปีที่แล้ว +1

    Just got all my parts in the mail today. I'm going to rig one of these up.

  • @francoisgirault2545
    @francoisgirault2545 5 ปีที่แล้ว

    Thank you so much for this video and saying to use SdFat library. I have lost a lot of time, not knowing why I could not open a file on a SD card with a Chinese SD module and the SD library. I found nothing about it on many forums. Now it works ! GREAT !!

  • @DanMcCreary
    @DanMcCreary 4 ปีที่แล้ว +1

    Thanks! This is exactly the type of system I need for monitoring battery charge and discharge times. I plan to use the larger 2.42" OLEDs.

  • @waynebutane1338
    @waynebutane1338 6 ปีที่แล้ว

    The best part about this video for me was the project file on easyeda. Not because I want to build this myself, but because I kept searching for a website like that and it is really useful for me. Thanks.

  • @johannchx3589
    @johannchx3589 5 ปีที่แล้ว

    Thanks for keeping me creative and sure you will see me next time !

  • @mk_annan22
    @mk_annan22 7 ปีที่แล้ว

    Wonderful approach to build a custom power meter

  • @andremendes5116
    @andremendes5116 7 ปีที่แล้ว +4

    GreatScott! Nice explanation and a beautiful simple integration project.
    I Like!

  • @abdulazeez.98
    @abdulazeez.98 7 ปีที่แล้ว

    I really liked the way he skimmed over the code, It's nice to see the code without downloading the file :D.

  • @sivaprakash6068
    @sivaprakash6068 5 ปีที่แล้ว +1

    That's awesome DIY project for your video list.
    I will try this one. Thanks to uploaded it.

  • @RacinJsn
    @RacinJsn 7 ปีที่แล้ว

    I like that little character/dot display you're using

  • @genericgreensquid6669
    @genericgreensquid6669 7 ปีที่แล้ว +1

    TH-camrs like you make me want to get a degree in electronics engineering!

  • @sayantanmaiti2513
    @sayantanmaiti2513 6 ปีที่แล้ว

    Your SdFat really solved the same problem...Lot of thanks Great Scott!!

  • @raihanadhipratama5982
    @raihanadhipratama5982 7 ปีที่แล้ว

    Your Videos Are Amazing!!
    The Camera movement is professional

  • @BingBuzz
    @BingBuzz 7 ปีที่แล้ว

    Man... I am happy to find your channel. Great videos!

  • @RumblePirate
    @RumblePirate 7 ปีที่แล้ว

    exactly what I've been looking for mate... awesome, will keep you posted

  • @digitART30
    @digitART30 7 ปีที่แล้ว

    What can I say , simply clever , thank you again Scott

  • @flingmonkey5494
    @flingmonkey5494 3 ปีที่แล้ว

    I love the INA219 module. I once used one to replace an expensive stepper motor with a far-cheaper and more powerful 12VDC gear motor. I had a n arm on the shaft of the motor, and I just blocked it so that it could not turn past the points where I wanted it to stop. Then I would start the motor turning and monitor the current. When the arm hit the block, the motor would start taking more current, and I would know it was time to shut it off. It was self-calibrating! It worked perfectly once I thought to drop a little super glue on the flange and motor shaft, because the motor was so powerful the flange set screws were not enough.
    Hint for your data logging: Have your Arduino log all data to a .csv file. Each line is a row of data, separated by commas, and you can even have the Arduino do some of your calculations for you and include them on the line. Stick the SD card into your computer, double-click the .csv file, and it opens up in Excel, each data point in it's own cell, nice neat rows and columns. Select a column, select "Insert", and insert a graph of the data, easy-peazy.
    Lastly, I know this video was created four years ago, but we now have some data logger modules. I got two of the ones you just plug an Arduino Nano into, and I got one of them working yesterday. The module gives you everything pre-wired, including a real time clock module. So you can time-stamp your data in the .csv file, you just need two more commas and columns, and you can see when that spike occurred. I like this data logger. I intend to program it to accept a string from another Arduino and log it, with a time stamp, to a .csv file. The string will be a pre-formatted string sent via SoftwareSerial.h. That way I have the complexity and memory requirements of the RTC and SD card set aside from the Arduino doing the real work, leaving precious memory for other things.

  • @gulertayfun
    @gulertayfun 7 ปีที่แล้ว

    I think this is one of your best Scott. Thank you

  • @garethwoodall577
    @garethwoodall577 4 ปีที่แล้ว

    This is yet another class project.

  • @7head7metal7
    @7head7metal7 7 ปีที่แล้ว

    Currently I'm working on a similar project, but with a different approach. I try to use an ESP8266 and a Raspberry Pi, to build some kind of distributed power measurement system, for festivals, camps, larger installations an so on.
    Your video really helped with suggestions regarding the use of an SD-card and a LiPo-Battery, thanks a lot!
    Greetings from the "Lipperland" in Germany :)

  • @norm1124
    @norm1124 7 ปีที่แล้ว +1

    Danke für die Screenvideos beim Programmieren und PCB Layout, sehr angenehm

  • @tommyriffe9115
    @tommyriffe9115 7 ปีที่แล้ว +1

    Happy holidays, always quality content here, nice project

  • @madhusudhan2224
    @madhusudhan2224 7 ปีที่แล้ว

    great project sir! very much innovative and out of the box

  • @pauliuspile
    @pauliuspile 7 ปีที่แล้ว

    You are so creative :o all of your projects are hightest quality, and I learned more about electronics watching your videos! Thank you for inspiring me be better electrican! ;)

  • @rodneydelapena3752
    @rodneydelapena3752 2 ปีที่แล้ว

    I really like this one, I managed to buy all the modules for less than 5 bucks. I already have an UNO lent to us by our teacher.

  • @edwardfletcher7790
    @edwardfletcher7790 2 ปีที่แล้ว

    This is a really great little project !

  • @sreeprakashneelakantan5051
    @sreeprakashneelakantan5051 7 ปีที่แล้ว

    Wow, impressive 👌thanks, loved the display unit

  • @johnteran8889
    @johnteran8889 7 ปีที่แล้ว

    Nice work. You build beautiful diagrams

  • @yewchewed
    @yewchewed 7 ปีที่แล้ว

    Think your videos are great and I'd love to see your take on homemade automated blinds. Stay chill

  • @PBWillyWonka
    @PBWillyWonka 7 ปีที่แล้ว

    Awesome project!! You're a genius!

  • @RossPotts
    @RossPotts 7 ปีที่แล้ว +1

    I always love the ideas you bring up on TH-cam and instructables!
    Rather than buy a power meter, I think I will build based on your design. I can assume you will be publishing another 'ible for this?

  • @binbin6525
    @binbin6525 2 ปีที่แล้ว

    this is awesome, thanks for the sharing. especially the sdfat library.

  • @heinztroll5526
    @heinztroll5526 7 ปีที่แล้ว

    Love Your videos!
    Pls make more of them!

  • @victorchorques4893
    @victorchorques4893 7 ปีที่แล้ว

    Great again Scott, thanks for sharing

  • @scraphead5479
    @scraphead5479 7 ปีที่แล้ว +1

    Wow, very amazing project

  • @machine2747
    @machine2747 6 ปีที่แล้ว

    Really enjoyed this one. Thank you for sharing.

  • @DIYTechRepairs
    @DIYTechRepairs 7 ปีที่แล้ว +2

    Nice video! Tips: Output it into a csv formatted file instead and you can directly open it into any program suitable. Then you dont have to copy paste the rows :)

  • @paparoysworkshop
    @paparoysworkshop 7 ปีที่แล้ว

    GREAT SCOTT! ( I love that expression ) Another fantastic video.

  • @hrmny_
    @hrmny_ 7 ปีที่แล้ว +8

    congrats on 420k subs

  • @Educ8s
    @Educ8s 7 ปีที่แล้ว +91

    Great video. The resolution of the OLED display is not set correctly though. It is not set to the maximum resolution. Edit the library file in order to set the correct resolution 128x64 pixels .

    • @BnMroGaming
      @BnMroGaming 5 ปีที่แล้ว +1

      @@ChoudryArif it's not hardware. I thought the same, and after 5 hours of troubleshooting I finally found the solution. You need to change a line of code from the library itself. Either way the display will work at half resolution, even if you change it from de IDE

    • @brentmorris262
      @brentmorris262 5 ปีที่แล้ว

      @@BnMroGaming I don't know if the memory has been upgraded on the current models of the arduino, but from what I saw on the instructables site, they ran in on the 128X32 because of memory limitations. The 128X64 used too much.

    • @samuelkctweneboah-kodua5660
      @samuelkctweneboah-kodua5660 4 ปีที่แล้ว

      @@BnMroGaming hey lets talk i need your fb

  • @Donatusification
    @Donatusification 7 ปีที่แล้ว +8

    You should modify the sketch to create a single CSV file (current, voltage and time separated by comma or semicolon), so you wouldn't have to copy the 3 txt files to Excel, but you could easily open with it, and create diagrams out-of-the-box. :)

  • @01k
    @01k 7 ปีที่แล้ว

    Awesome video Scott!

  • @variogenesis
    @variogenesis 7 ปีที่แล้ว

    I was looking for something like this...thanks

  • @szekelyferenczzoltan2274
    @szekelyferenczzoltan2274 7 ปีที่แล้ว

    I apreciate all your work! Nice job! (And please make a walkie talkie or an intercom if you can. That is what i need around the house :). )

  • @thexpto51
    @thexpto51 7 ปีที่แล้ว

    Very Nice Work! Congratulations!

  • @WildLifeBackyardCamera
    @WildLifeBackyardCamera 5 ปีที่แล้ว

    instead of writing it to a file and graphing via excel, i would rather send all data via UDP to influxdb and have real time graph using grafana, apart of this part, awesome video, thanks a ton !!!! Helped me so much

  • @msjaxp
    @msjaxp 7 ปีที่แล้ว

    I am always waiting for your videos
    Keep going :)

  • @deangreenhough3479
    @deangreenhough3479 7 ปีที่แล้ว

    I'm building this many thanks for sharing

  • @adlerweb
    @adlerweb 7 ปีที่แล้ว +7

    I just started a similar build some days ago using a Pro Mini, ACS712 current sensor and the same OLED. Since I mostly record to my PC anyway my unit is powered using a USB port (thats not the input-port but a dedicated one) which also sends current values to the connected PC for display and recording. I opted to use the internal 1.1V reference instead on VCC, so changes in the PCs supply voltage don't offset the ADC that much. You might want to check this on your build if you connected the battery directly to VCC - afair VCC is used as the default reference for the ADC so your measurements might get skewed with falling battery voltage. Using the 1.1V also allowed me to dynamically scale for

    • @fschatz12
      @fschatz12 7 ปีที่แล้ว +1

      BitBastelei Hey
      Gar nicht erwartet dich hier zu sehen👋

  • @jollyreal1
    @jollyreal1 7 ปีที่แล้ว +2

    Hello, this is a great project, if I use the shunt resistor with a OpAmp, Can I measure the current in micro ampere?

  • @bigonprivacy2708
    @bigonprivacy2708 9 วันที่ผ่านมา

    Dude, you are legend. One question from someone who has just seen this 7 years later.................IF you were to build this today but make it a self-powered version that logs data on any power generation projects (wind energy, harvesting vibrational energy, and other alt-energy projects) that can generate up to 50V, then how would do it? Would LOVE to see a remake of this one to be brought current.

  • @isaacleal2
    @isaacleal2 7 ปีที่แล้ว

    Great Project.
    I just bought some of this parts to build a automatic charger, discharger and wattmeter for 18650 cells.
    My only doubt is if i can use 10 INA219 modules in a single Arduino with I2C.

  • @MCsCreations
    @MCsCreations 7 ปีที่แล้ว +1

    Great video! BTW, I saw a few videos of people creating an 18650 battery capacity tester, much like what you did here. Looks something you should definitely make! :)

  • @capiberra4118
    @capiberra4118 5 ปีที่แล้ว +1

    Thanks for this excellent video

  • @andljoy
    @andljoy 7 ปีที่แล้ว

    This one looks interesting , when i finally get off my arse and get some new batteries for my UPS i am so installing this into it :),

  • @akhurash
    @akhurash 7 ปีที่แล้ว +3

    Awesome project!

  • @HimanshuYadav-kj9eb
    @HimanshuYadav-kj9eb 6 ปีที่แล้ว

    This has been a great gelp for the project i have been working on, thanx a lot.
    Can you make an AC Power Meter/Logger?

  • @joacimwennerberg8310
    @joacimwennerberg8310 7 ปีที่แล้ว

    Thanks!
    Awesome project. :)

  • @kaumohlamonyane272
    @kaumohlamonyane272 7 ปีที่แล้ว

    impresses everytime👌

  • @PabloSanJuanOk
    @PabloSanJuanOk 4 ปีที่แล้ว

    Hi !! Great video!!, do you have any idea on how to measure electricity supplied to the grid by a solar Inverter?

  • @ajithsb1853
    @ajithsb1853 6 ปีที่แล้ว

    Very impressed with your video.
    I would like to know if you can make or discuss about a project to battery monitoring for charging and discharging of lipo batteries and also discus about the best ways of using them with out over discharging them

  • @ariellevy7009
    @ariellevy7009 7 ปีที่แล้ว

    Very Nice , Thanks GreatScott!

  • @TubeNagen
    @TubeNagen 6 ปีที่แล้ว +6

    There is an issue with the energy calculation in the sketch.
    The value being added to the total energy consumed has to consider the interval at which measurements are made. The interval is set in milliseconds, so a variable or constant for "measurementsPerHour = 3,600,000 / interval" has to be used as the divider when adding to the energy displayed in mWh.
    To provide an example using the 100ms interval used in the sketch: measurementsPerHour = 36,000
    Now given 650mW for example, each interval adds 0.0186mWh to the energy total.

    • @Evgen-Evgen-Evgen
      @Evgen-Evgen-Evgen 10 หลายเดือนก่อน

      It's strange that it's only comment like that, a lot of people made this project and no one noticed wrong calculations. I had 6 wh instead 1.5 when i dig in i found that it's doesn't correspond to the time

    • @olivertanner5924
      @olivertanner5924 6 หลายเดือนก่อน

      I appreciate this comment was a long time ago, but my code is based off this video and I found the same problem, although i've found even though the interval is set to 100ms I only get an accurate wh reading if I divide by ~410ms intervals: (energy = energy + (power / 8780.4878);) is there a limit to the sample rate of the INA219? I thought it was supposed to be capable of ~14 samples a second (~every 71ms)

  • @jeffscritchfield7111
    @jeffscritchfield7111 7 ปีที่แล้ว

    As always that you for you projects.

  • @sayantanmaiti2513
    @sayantanmaiti2513 7 ปีที่แล้ว

    this one was really nice sir!!!

  • @rodignacio
    @rodignacio 7 ปีที่แล้ว

    Great Video as usual. I have been wondering if you could put a logging function in one of those power meter you can buy off ebay or amazon for the mains power outlet. Maybe you can do a video on that?

  • @letsmakearduinoprojects5818
    @letsmakearduinoprojects5818 7 ปีที่แล้ว +1

    super and simple project

  • @Curiouslyable
    @Curiouslyable 7 ปีที่แล้ว

    dude, i love your video. it help a lot of people :)

  • @muellerhans
    @muellerhans ปีที่แล้ว +4

    A newer version that would support maybe 50V and 10A would be cool. That would cover not only the current USB standard but also those weird fast charging phones that use 10A.

  • @adrianglessner5979
    @adrianglessner5979 7 ปีที่แล้ว

    great work man.. thanks alot.

  • @sairoop3183
    @sairoop3183 5 ปีที่แล้ว

    @GreatScott! Thanks for the detailed video. Which IC would you suggest for making an AC power meter that is compatible with Arduino?

  • @lukasschworer840
    @lukasschworer840 6 ปีที่แล้ว

    Great Scott!

  • @bradniemand6919
    @bradniemand6919 6 ปีที่แล้ว

    Great video, both the presentation and the quality.
    I would like to know if you have done something similar to this project but for 115 Volts and/or also for 220 Volts?. If not, any consideration in doing so.
    With the high cost of electricity in Canada, an easy way of seeing and logging your own usage, and having the ability to see when and what is using a high power draw, this is a way of making changes on the fly, so much easier.
    Anyway, keep up the good work. greatly appreciated.

  • @HaukeSpekker
    @HaukeSpekker 7 ปีที่แล้ว +3

    A protection for the whole circuit would be a fuse (3A/25V) in series to the screw terminal, wouldn't it?

  • @santiagoestevez623
    @santiagoestevez623 7 ปีที่แล้ว

    great viodeo mate just what i wanted
    can u please make a video about how to create your owm i2c libraries??

  • @mealstorytime4797
    @mealstorytime4797 7 ปีที่แล้ว

    I love his hand writing

  • @strangedaysarethese
    @strangedaysarethese 7 ปีที่แล้ว

    Congrats on 434,571 Subs haha
    Great stuff Great Scott!

  • @bratwizard
    @bratwizard 3 ปีที่แล้ว

    Nice project !!

  • @PatTrainor
    @PatTrainor 7 ปีที่แล้ว +1

    @GreatScott, I'm really enjoying your Arduino tutorials. When I am just a little better, I will start my own channel to share with everyone like you have.
    In this video, when you are using Easy,EDA ...how are you able to move a component and have the wires follow? When I make wires, the component moves, nut the wires stay! :)
    Thanks again!

  • @BIBIwood
    @BIBIwood 7 ปีที่แล้ว +1

    For those kind of small oled screens, I would strongly suggest to use the Libgdx library rather than the adafruit one.

  • @dzengineeringsolutions3660
    @dzengineeringsolutions3660 3 ปีที่แล้ว +1

    Amazing video !

  • @urgencepc4563
    @urgencepc4563 6 ปีที่แล้ว

    I LOVE your channel.

  • @lukaszabulis9144
    @lukaszabulis9144 7 ปีที่แล้ว

    Thank you for another useful and geat video!

  • @jamest.5001
    @jamest.5001 7 ปีที่แล้ว

    that is so cool!!! but I am wondering if a larger display is available? and if it can be adapted for much higher current? and use something like a toroidal current sensor ? ( I have seen them. but not sure what they are called) I have seen them used with 0gauge cable through them. to read current. I would like to use a setup like this for a off grid solar power system. so I guess it would need to be capable of reading up to 30 volts also. I was thinking of just buying meters. but this is way cooler. I guess it would need to read like 300-400 amps. thanks . this was a great video..

  • @robviolin1
    @robviolin1 7 ปีที่แล้ว

    Very helpful, thanks.

  • @tlchuan100
    @tlchuan100 7 ปีที่แล้ว

    nice work bro

  • @DRI1966
    @DRI1966 6 ปีที่แล้ว

    Thank You for this great video :)