ButterFlight / butterflight

GNU General Public License v3.0
106 stars 26 forks source link

Wrong Cell count reading and voltage reading Matek F405 #49

Closed mawais15 closed 6 years ago

mawais15 commented 6 years ago

I flashed latest Butterflight 3.4.2 Matek F405 target upgrading from betaflight 3.3 and found out that the cell count in the ADC voltage sensor is wrong. It is showing 7 cells when connected 4S battery and 5 cells when connected with 3S. Voltage readings are wrong and current scaling provided by Matek also yields wrong current readings. https://ibb.co/g72cYS

halfcab1981 commented 6 years ago

I am getting the same thing on my DYS F4. Getting 5s showing as a low voltage 4s. I had to increase my max voltage to rectify.

kidBrazil commented 6 years ago

@mawais15 @halfcab1981 have you tried adjusting voltage scaling?

halfcab1981 commented 6 years ago

Not yet but I will now. Is it possible for this to have changed across various versions of betaflight and now butterflight? Because it worked normally without any changes to defaults in the past

kidBrazil commented 6 years ago

@halfcab1981 it is possible that something got changed on the defaults. Please try adjusting your voltage scaling and see if that resolves it. Report back your value and we can go from there.

frakkan commented 6 years ago

I am using Matek F405 on 6 of my quads, none of them has any issue with voltage.

2018-03-23 20:10 GMT+01:00 Lucas Moreira notifications@github.com:

@halfcab1981 http:///halfcab1981 it is possible that something got changed on the defaults. Please try adjusting your voltage scaling and see if that resolves it. Report back your value and we can go from there.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ButterFlight/butterflight/issues/49#issuecomment-375770346, or mute the thread https://github.com/notifications/unsubscribe-auth/AOLCyTkbnem3pWdtOix8Qy45f9DphS1Gks5thUjBgaJpZM4SlMgT .

11Frontier commented 6 years ago

I'm getting the same issue as the two posts above. 4s occasionally showing up on BF as 5S and giving low voltage alarms. Matek F405-ctr BF ver 3.3.0 Voltage scaling is @ 112. 110 shows 0.2 volts below actual measured by fluke meter and IBat battery checker.

11Frontier commented 6 years ago

Any chance of just adding in the option to put in your cell count?

wt29 commented 6 years ago

Same issue F405 AIO shows 5 cells on a 4S Battery. Have disabled the low battery beep ATM.

Ryano12 commented 6 years ago

This is not a bug? Just adjust your scaling so that your voltage is correct. There is no need for an option to manually select battery cell count. As the voltage ranges don't intersect for different cell counts (eg. A fully charged 4s still has lower voltage than a dead 5s)

Sm1thson commented 6 years ago

I currently have Betaflight on my F405 rig and I had this issue, to resolve I (props off) plugged in a freshly charged battery whilst connected to the configurator then adjusted the voltage scaling so it read 4.2V.

so not a biggie, but yeah Ive never had to mess with the voltage scaling before.

kreidler commented 6 years ago

It is not a Butterflight issue. Same is on Betaflight. Most use the standard setting of 110. If you increase to 112 (as measured) you will get with (good) batteries one cell more detected. For me it helps to double the accuracy and then go one step back from 224 to 223:

set vbat_scale = 223
set vbat_divider = 20
11Frontier commented 6 years ago

Betaflight return invalid name when using

set vbat_divider = 20

On Sat, May 19, 2018 at 3:04 AM, Matthias notifications@github.com wrote:

It is not a Butterflight issue. Same is on Betaflight. Most use the standard setting of 110. If you increase to 112 you will get with (good) batteries one cell more detected. For me it helps to double the accuracy and then go one step back from 224 to 223:

set vbat_scale = 223 set vbat_divider = 20

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ButterFlight/butterflight/issues/49#issuecomment-390385168, or mute the thread https://github.com/notifications/unsubscribe-auth/AhXhdosCts1-yAUH8ncjDbd1BKHdNLrvks5tz8PjgaJpZM4SlMgT .

kreidler commented 6 years ago

@11Frontier : You are right. CLI does not support vbat_divider in Butterflight. Butterflight configurator supports vbat_divider. So, please use the configurator yet.

@kidBrazil : As I am not a programmer - Could you please add vbat_divider to CLI.

orneryd commented 6 years ago

this is coming after we finalize the release 3.5.1. I have already merged it up into the imuf_107_odin_bef_rebase branch from BeF.