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

  Переглядів 46,593

Simply Explained

Simply Explained

3 роки тому

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 2 роки тому
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 2 роки тому
Glad you liked it! Thanks for the kind words.
@kennethvdb
@kennethvdb 2 роки тому
+1
@dhruv_195
@dhruv_195 11 місяців тому
Was looking all over the internet for something like this, thanks the video was of great help.
@souerico
@souerico 2 роки тому
Great content! I'd love to see more videos about bateries!
@tritile
@tritile Рік тому
The best series for arduino programers starting on esp32
@mrafayshams3089
@mrafayshams3089 2 роки тому
Please add more videos to this series. AWS IoT and Esp32 and Javascript control would be ideal.
@stark9397
@stark9397 2 роки тому
Wonderful. Please come more videos about ESP32.
@peterdlynes
@peterdlynes 2 роки тому
Simply Explained videos are excellent
@nelsontechnologiesconsulti6552
@nelsontechnologiesconsulti6552 2 роки тому
Great tutorial. How would you initialize on Wire1 instead of Wire?
@shanebekker
@shanebekker 2 роки тому
Great content. Subbed. Want to know though how you coded an ESPHome module for this?
@tassoskallianiotis6044
@tassoskallianiotis6044 11 місяців тому
Great Tutorial! I have a question, is it possible to measure a package li-ion battery of 36v? Meaning for example a 10s4p stack.
@sposhalgamer2283
@sposhalgamer2283 2 роки тому
Can i use this to 12v car battery or solar battery? Thanks, nice video Sir
@atharvaupadhye8161
@atharvaupadhye8161 Рік тому
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.
@hudsonreynolds4349
@hudsonreynolds4349 5 місяців тому
Great video man thank you. How much does this chip consume?
@Venaber
@Venaber 11 місяців тому
thank you
@michaelpetersenbowl
@michaelpetersenbowl 2 роки тому
hey.. Thanks for your many videos... I will love if you did a video > What is DEFI hope you will do that..
@tcl78
@tcl78 2 роки тому
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 роки тому
No plans right now. I have been using ESP-IDF myself, but can’t promise to make a video series about it.
@jplataquin3599
@jplataquin3599 2 роки тому
Is there a similar chip that can handle 12 volts?
@swapniilkanwar8598
@swapniilkanwar8598 2 роки тому
Can this library work with MAX17048? You have used MAX17043 in the video.
@thaolyinh90
@thaolyinh90 2 роки тому
i hope you will make a video about Defi Warrior
@piconano
@piconano 2 роки тому
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 2 роки тому
I'll definitely add it to the list!
@piconano
@piconano 2 роки тому
@@simplyexplained You're a good man.
@very_nice_777
@very_nice_777 2 роки тому
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.
@goldstick3D
@goldstick3D 2 роки тому
+1
@muhammadadib6632
@muhammadadib6632 Рік тому
For 48V DC battery can use sir?
@neilomalley9887
@neilomalley9887 5 місяців тому
How does it save power?
@iamfyrus
@iamfyrus 2 роки тому
Connect batt+ to A0 and use batterysense library.
@raymondmichael4987
@raymondmichael4987 Рік тому
One question, can the module be used in a 12-24v system too? if not what changes do we have to make?
@InfanteBoy
@InfanteBoy 11 місяців тому
Hi, did you got your answers? Iam also interested in that.
@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
@stage666
@stage666 Рік тому
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.
@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 Місяць тому
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 2 роки тому
cool channel
@Hiwinders
@Hiwinders 3 місяці тому
Default pins for i2c on ESP32 are GPIO 22 (SCL) and GPIO (SDA). Not sure why you changed from the default pins.
@aspuzling
@aspuzling Місяць тому
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 6 місяців тому
Great Video! But i have a Problem. The percentage Shows always 0.00. any idea? Please help me.. :)
@edsonferraz1
@edsonferraz1 7 днів тому
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 Рік тому
What IDE do you use?
@simplyexplained
@simplyexplained Рік тому
Visual Studio Code
@420ZEO
@420ZEO Рік тому
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.
@baroudabdelghani5572
@baroudabdelghani5572 2 роки тому
Which sensor you are using please?
@simplyexplained
@simplyexplained 2 роки тому
It’s in the title of the video.
@user-rp8mt1hs9m
@user-rp8mt1hs9m Рік тому
Business promotion
Power Your Projects With Batteries! (LiPo/Li-ion)
9:27
Sine Lab
Переглядів 22 тис.
How to get a FREE HYPERCHARGE SKIN!
02:07
Brawl Stars
Переглядів 15 млн
Bro smelt it & passed out 😂 #comedy
00:10
MrTalalaa
Переглядів 7 млн
Projekt Pegelmessstation - Wasserpegel überwachen mit LoRaWAN
17:09
#171 External Battery Monitor from your Arduino
29:32
Ralph S Bacon
Переглядів 18 тис.
How to Multitask with FreeRTOS (ESP32 + Arduino series)
6:25
Simply Explained
Переглядів 76 тис.
DIY Battery Indicator (Arduino Project)
18:35
upir
Переглядів 78 тис.
ESP32TTGO - Battery Indicator 🔋⚡
9:50
That Project
Переглядів 44 тис.
ESP32 Guide 2024 | Choosing and Using an ESP32 Board
41:06
DroneBot Workshop
Переглядів 202 тис.
12 Useful & Interesting ESP32 Projects for Beginners!
9:41
ToP Projects Compilation
Переглядів 566 тис.
Какой у тебя процессор?
0:44
CompShop Shorts
Переглядів 207 тис.
Broken Flex Repair #technology #mobilerepair
0:50
ideal institute aligarh
Переглядів 685 тис.
СМАРТФОНЫ HTC ВЕРНУЛИСЬ В 2024! Шок для Apple, Samsung и Xiaomi...
11:51
Thebox - о технике и гаджетах
Переглядів 38 тис.