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) - Наука
Watched all 26 videos in this play list.
This series is the best ESP32 tutorial on YT.
Thanks for all your hard work. Cheers.
Glad you liked it! Thanks for the kind words.
+1
Was looking all over the internet for something like this, thanks the video was of great help.
Great content! I'd love to see more videos about bateries!
The best series for arduino programers starting on esp32
Simply Explained videos are excellent
Please add more videos to this series. AWS IoT and Esp32 and Javascript control would be ideal.
Wonderful. Please come more videos about ESP32.
Great content. Subbed. Want to know though how you coded an ESPHome module for this?
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.
No plans right now. I have been using ESP-IDF myself, but can’t promise to make a video series about it.
Can i use this to 12v car battery or solar battery? Thanks, nice video Sir
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.
Great tutorial. How would you initialize on Wire1 instead of Wire?
Great video man thank you. How much does this chip consume?
Great Tutorial! I have a question, is it possible to measure a package li-ion battery of 36v? Meaning for example a 10s4p stack.
hey.. Thanks for your many videos... I will love if you did a video > What is DEFI
hope you will do that..
thank you
Can this library work with MAX17048? You have used MAX17043 in the video.
Is there a similar chip that can handle 12 volts?
One question, can the module be used in a 12-24v system too? if not what changes do we have to make?
Hi, did you got your answers? Iam also interested in that.
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.
+1
i hope you will make a video about Defi Warrior
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.
I'll definitely add it to the list!
@@simplyexplained You're a good man.
Connect batt+ to A0 and use batterysense library.
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"
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.
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
Dear Mr, please, how using this code with MAX17044 to battery of 2 cells in serial (7,4 V x 4200 mAh) Thanks.
How does it save power?
For 48V DC battery can use sir?
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.
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.
cool channel
Default pins for i2c on ESP32 are GPIO 22 (SCL) and GPIO (SDA). Not sure why you changed from the default pins.
You can choose many different pins for I2C on the ESP32. The pins that Espressif recommend depends on the exact chip you are using.
Great Video!
But i have a Problem. The percentage Shows always 0.00. any idea?
Please help me.. :)
How can we monitor battery percentage for a 48v battery?
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.
What IDE do you use?
Visual Studio Code
Which sensor you are using please?
It’s in the title of the video.
Business promotion