Correctly Measure Battery Level - MAX17048 (ESP32 + Arduino series)

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2021
  • Battery-powered IoT projects require you to monitor your battery's percentage. Measuring battery voltage is not ideal, because the voltage doesn't drop linearly.
    Fuel gauges are a better alternative. They work straight away, don't consume power while in standby, and they're accurate without any calibration!
    Buy a Battery Fuel Gauge from DFRobot:
    www.dfrobot.com/product-1734....
    (They kindly provided me with this sensor)
    ⚡️Other videos in this series:
    • ESP32 + Arduino
    (Everything you need to know about programming the ESP32 by using the Arduino Framework)
    🌍 Social
    Twitter: / savjee
    Facebook: / savjee
    Blog: savjee.be
    ❤️ Become a Simply Explained member: / @simplyexplained
    💌 Newsletter: newsletter.savjee.be
    (no more than once a month)
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @piconano
    @piconano 3 ปีที่แล้ว +22

    Watched all 26 videos in this play list.
    This series is the best ESP32 tutorial on YT.
    Thanks for all your hard work. Cheers.

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

      Glad you liked it! Thanks for the kind words.

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

      +1

  • @dhruv_195
    @dhruv_195 ปีที่แล้ว

    Was looking all over the internet for something like this, thanks the video was of great help.

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

    Great content! I'd love to see more videos about bateries!

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

    The best series for arduino programers starting on esp32

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

    Wonderful. Please come more videos about ESP32.

  • @mrafayshams3089
    @mrafayshams3089 2 ปีที่แล้ว +1

    Please add more videos to this series. AWS IoT and Esp32 and Javascript control would be ideal.

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

    Simply Explained videos are excellent

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

    Thanks for the video. I believe the statement that ' it works accurately without feeding characteristics of battery is actually not correct '. Correct me if i am wrong though. Every battery fuel guage has to be fed with battery characteristics you are using.

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

    Great content. Subbed. Want to know though how you coded an ESPHome module for this?

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

    Great tutorial. How would you initialize on Wire1 instead of Wire?

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

    hey.. Thanks for your many videos... I will love if you did a video > What is DEFI
    hope you will do that..

  • @amrtcpp6203
    @amrtcpp6203 14 วันที่ผ่านมา

    Thanks a lot.

  • @hudsonreynolds4349
    @hudsonreynolds4349 7 หลายเดือนก่อน

    Great video man thank you. How much does this chip consume?

  • @tassoskallianiotis6044
    @tassoskallianiotis6044 ปีที่แล้ว

    Great Tutorial! I have a question, is it possible to measure a package li-ion battery of 36v? Meaning for example a 10s4p stack.

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

    It is now several months that there are no new videos published in this playlist, do you think you will publish more videos? They are very useful and it would be greatly appreciated. One topic (or whole playlist) you could cover is how to develop for ESP32 without using the Arduino Framework but using whatever native library ESP32 uses.

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

      No plans right now. I have been using ESP-IDF myself, but can’t promise to make a video series about it.

  • @Venaber
    @Venaber ปีที่แล้ว

    thank you

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

    Connect batt+ to A0 and use batterysense library.

  • @sposhalgamer2283
    @sposhalgamer2283 2 ปีที่แล้ว +5

    Can i use this to 12v car battery or solar battery? Thanks, nice video Sir

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

    i hope you will make a video about Defi Warrior

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

    Can you make a video about connect a 16x2 liquid crystal video that is given with the Arduino Starter pack? Thanks man. Love your videos.

  • @swapniilkanwar8598
    @swapniilkanwar8598 2 ปีที่แล้ว +1

    Can this library work with MAX17048? You have used MAX17043 in the video.

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

    One question, can the module be used in a 12-24v system too? if not what changes do we have to make?

    • @InfanteBoy
      @InfanteBoy ปีที่แล้ว

      Hi, did you got your answers? Iam also interested in that.

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

    Please consider doing a video on ESP32's ULP programming using PlatformIO.
    I find Espressif documentation hard to follow. They don't write their manuals like say Atmel/Microchip docs that I'm used to.

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

      I'll definitely add it to the list!

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

      @@simplyexplained You're a good man.

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

    This so called fuel guage chip is also just doing a voltage based estimate of the battery percentage. Why is it accurate and better than just using voltage divider and adc? You didn't explain. Here is a review comment I fount online:
    "It's a simple ADC. It measures the voltage relatively accurately, but the SOC does not show a real value. It gives a linearly changing value between 4.2 - 3.0 volts. For example: 3.4v = 40%. This does not show the actual state of charge"

    • @JustinShaedo
      @JustinShaedo ปีที่แล้ว

      TLDR accuracy is the same if you are prepared to spend 2-3 hours calibrating adjustments for every battery and ADC on your MCU. These will also tell you the charge/discharge rate, and threshold interrupts. There's nothing here you can't do (theoretically) with just an esp32/arduino.
      You're right, they are not more accurate IF you are prepared to play around measuring the discrepancies with your voltmeter and adjusting the offsets in the code.
      The benefits are their ADC (12 bit like ESP32 and Arduino) is (should be) consistent across units, so they can simply apply the same formula. They also use a polynomial (not a linear relationship) to adjust for the non-linear relationship between voltage and charge of the battery. There are polynomial formulas for this around, most are 'non-commercial use only'. Most examples of battery monitors use a linear relationship between voltage and charge remaining, which is super inaccurate, but only at high and low charges, so in most cases doesn't matter. Given it determines the charge/discharge rate, it must also be looking at amps; I haven't seen a project (using a voltage divider) that can do that, yet.

  • @zyghom
    @zyghom ปีที่แล้ว

    I am using MAX17048 in ALL my projects. Unfortunately it still consumes 20uA but ok, that is not that much. I meant: sensor only - I don't use the board with it - there are unnecessary elements there

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

    Is there a similar chip that can handle 12 volts?

  • @muhammadadib6632
    @muhammadadib6632 ปีที่แล้ว

    For 48V DC battery can use sir?

  • @ajciccone88
    @ajciccone88 ปีที่แล้ว

    Great stuff. Do they (or anyone) not make a 7.4v one? I can't seem to find one, and I bought a 18650 battery holder with 2 batteries I assumed would be 3.7V because that's what it was advertised as but it's 7.4.. my multimeter actually measures over 8. I'm surprised my esp32 didn't have issues with the 7.4. anyways, thanks for posting this. Will have to get new battery clips with single batteries and give this a shot.

    • @aspuzling
      @aspuzling 2 หลายเดือนก่อน +1

      Yes, Maxim also make the 17044 and 17049 chips for 2 lipo batteries in series. The latter chip is just a lower power version of the former.

  • @AG-uw9yw
    @AG-uw9yw 3 ปีที่แล้ว

    cool channel

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

    How does it save power?

  • @Hiwinders
    @Hiwinders 5 หลายเดือนก่อน

    Default pins for i2c on ESP32 are GPIO 22 (SCL) and GPIO (SDA). Not sure why you changed from the default pins.

    • @aspuzling
      @aspuzling 2 หลายเดือนก่อน

      You can choose many different pins for I2C on the ESP32. The pins that Espressif recommend depends on the exact chip you are using.

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

    Dear Mr, please, how using this code with MAX17044 to battery of 2 cells in serial (7,4 V x 4200 mAh) Thanks.

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

    What IDE do you use?

  • @Schick3r
    @Schick3r 8 หลายเดือนก่อน

    Great Video!
    But i have a Problem. The percentage Shows always 0.00. any idea?
    Please help me.. :)

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

    Which sensor you are using please?

  • @420ZEO
    @420ZEO ปีที่แล้ว +1

    How can we monitor battery percentage for a 48v battery?

    • @franksebastianelli2467
      @franksebastianelli2467 ปีที่แล้ว

      You can connect the board to a single cell. You will drain that one cell maybe slightly faster, but negligible. If your battery has a bms you should be fine.

  • @user-rp8mt1hs9m
    @user-rp8mt1hs9m 2 ปีที่แล้ว

    Business promotion