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

  Рет қаралды 47,736

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 3 жыл бұрын
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 жыл бұрын
Glad you liked it! Thanks for the kind words.
@kennethvdb
@kennethvdb 3 жыл бұрын
+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 жыл бұрын
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 жыл бұрын
Simply Explained videos are excellent
@mrafayshams3089
@mrafayshams3089 2 жыл бұрын
Please add more videos to this series. AWS IoT and Esp32 and Javascript control would be ideal.
@stark9397
@stark9397 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 жыл бұрын
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.
@sposhalgamer2283
@sposhalgamer2283 2 жыл бұрын
Can i use this to 12v car battery or solar battery? Thanks, nice video Sir
@nelsontechnologiesconsulti6552
@nelsontechnologiesconsulti6552 2 жыл бұрын
Great tutorial. How would you initialize on Wire1 instead of Wire?
@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 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 жыл бұрын
Can this library work with MAX17048? You have used MAX17043 in the video.
@jplataquin3599
@jplataquin3599 2 жыл бұрын
Is there a similar chip that can handle 12 volts?
@raymondmichael4987
@raymondmichael4987 2 жыл бұрын
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 жыл бұрын
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
@thaolyinh90
@thaolyinh90 2 жыл бұрын
i hope you will make a video about Defi Warrior
@piconano
@piconano 3 жыл бұрын
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 жыл бұрын
I'll definitely add it to the list!
@piconano
@piconano 3 жыл бұрын
@@simplyexplained You're a good man.
@iamfyrus
@iamfyrus 2 жыл бұрын
Connect batt+ to A0 and use batterysense library.
@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.
@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 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
What IDE do you use?
@simplyexplained
@simplyexplained Жыл бұрын
Visual Studio Code
@baroudabdelghani5572
@baroudabdelghani5572 2 жыл бұрын
Which sensor you are using please?
@simplyexplained
@simplyexplained 2 жыл бұрын
It’s in the title of the video.
@user-rp8mt1hs9m
@user-rp8mt1hs9m 2 жыл бұрын
Business promotion
How to Multitask with FreeRTOS (ESP32 + Arduino series)
6:25
Simply Explained
Рет қаралды 79 М.
КАКОЙ ВАШ ЛЮБИМЫЙ ЦВЕТ?😍 #game #shorts
00:17
Poopigirl
Рет қаралды 10 МЛН
WHY DOES SHE HAVE A REWARD? #youtubecreatorawards
00:41
Levsob
Рет қаралды 42 МЛН
Control Devices Anywhere 🌍 with Google Firebase & ESP32 ✅
10:39
Enjoy Mechatronics
Рет қаралды 4,9 М.
ESP32 Li-ion Battery Charger
8:24
Volos Projects
Рет қаралды 25 М.
DIY Battery Indicator (Arduino Project)
18:35
upir
Рет қаралды 81 М.
#171 External Battery Monitor from your Arduino
29:32
Ralph S Bacon
Рет қаралды 18 М.
Apple watch hidden camera
0:34
_vector_
Рет қаралды 56 МЛН
keren sih #iphone #apple
0:16
Muhammad Arsyad
Рет қаралды 529 М.
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 19 МЛН
гений починил ноутбук
0:29
Dear Daria
Рет қаралды 1,9 МЛН
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 10 МЛН
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 11 МЛН