16340リチウムバッテリー残量の取得
-
「M5StampS3 Grove Breakout」 で16340リチウムバッテリーで動かしているのですが、16340リチウムバッテリー電池のバッテリー残量を取得するには、どうすればよいでしょうか?
たぶん、全然間違ってると思いますが、M5.Power.getBatteryLevel() だと -2 が返ってきてダメでした。
よろしくお願いいたします。
-
GPIOの8から、ADCを通した電圧がとれるようです。
analogRead(8);当方では取れた値と計算値で以下のような値が取れてます。
実測値
4.16 V ADC 2440 満充電
3.80 V ADC 2325
3.71 V ADC 2222
3.50 V ADC 2100
3.00 V ADC 1800
計算値
3.4 V(警告) ≒ ADC 2036
3.2 V(機能制限) ≒ ADC 1916
3.0 V(強制停止) ≒ ADC 1796ざっくり実装でよければ
100% 4.150V
90& 4.035V
80% 3.920V
70% 3.805V
60% 3.690V
50% 3.575V
40% 3.460V
30% 3.345V
20% 3.230V
10% 3.115Vくらいを見積もればよいのでは、と思われます。
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login