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

Поделиться
HTML-код
  • Опубликовано: 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)
  • НаукаНаука

Комментарии • 49

  • @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.

  • @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

  • @peterdlynes
    @peterdlynes 3 года назад +1

    Simply Explained videos are excellent

  • @mrafayshams3089
    @mrafayshams3089 2 года назад +1

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

  • @stark9397
    @stark9397 3 года назад +3

    Wonderful. Please come more videos about ESP32.

  • @shanebekker
    @shanebekker 2 года назад

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

  • @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.

  • @sposhalgamer2283
    @sposhalgamer2283 2 года назад +5

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

  • @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.

  • @nelsontechnologiesconsulti6552
    @nelsontechnologiesconsulti6552 2 года назад

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

  • @hudsonreynolds4349
    @hudsonreynolds4349 6 месяцев назад

    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.

  • @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..

  • @Venaber
    @Venaber Год назад

    thank you

  • @swapniilkanwar8598
    @swapniilkanwar8598 2 года назад +1

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

  • @jplataquin3599
    @jplataquin3599 2 года назад +2

    Is there a similar chip that can handle 12 volts?

  • @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.

  • @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.

  • @thaolyinh90
    @thaolyinh90 2 года назад

    i hope you will make a video about Defi Warrior

  • @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.

  • @iamfyrus
    @iamfyrus 2 года назад

    Connect batt+ to A0 and use batterysense library.

  • @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

  • @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.

  • @neilomalley9887
    @neilomalley9887 6 месяцев назад

    How does it save power?

  • @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

  • @Hiwinders
    @Hiwinders 4 месяца назад

    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.

  • @Schick3r
    @Schick3r 7 месяцев назад

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

  • @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.

  • @Cornflakes691
    @Cornflakes691 Год назад +1

    What IDE do you use?

  • @baroudabdelghani5572
    @baroudabdelghani5572 2 года назад

    Which sensor you are using please?

  • @user-rp8mt1hs9m
    @user-rp8mt1hs9m 2 года назад

    Business promotion