Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correct current scale in INAV not possible
#1
I am very confused about voltage and current scale in INAV.


Board: Mamba F405 MK2 (HW Rev. 3)
ESC: Mamba F40 MK2
Target: FURYF4OSD
INAV Version: 2.6.1


According to diatone website "Voltage Scale" is 110 and "Current Scale" is 115.

Voltage scale:

If I set it to 110 the voltage in INAV shows 2,41 V instead of 24,14 V measured with voltmeter. This is why i set voltage scale to 1100 which gives me correct values. I am fine with this.

Current Scale:

I tried calibration with "general method" (read charged mAh) described in INAV wiki for >6 times now and i failed to get plausible values. This lead me to start from scratch again: If I measure current draw in idle state I get ~ 170 mA out of my current meter. With Current Scale set to 115 (exact 113) I got current draw of 170 A in INAV. In theory I need to set the current scale to 115000 (exact 113000). But it is not possible to set values above 10000 (Need 113000) for current scale in INAV.


Is this a bug? How to set correct scale?
Reply
Login to remove this ad | Register Here
#2
1100 doesn't sound correct. You you sure INAV is not reporting average single cell voltage and not total voltage?
Reply
#3
I made screenshot with 110 Voltage Scale and 1100 Voltage Scale. Seems right to me, its not reporting single cell voltage ... .


Attached Files Thumbnail(s)
               
Reply
#4
iNav current/voltage scales are a factor of 10 higher than BF. 1100 sounds correct.

Try 1150 for the current scale. Fully charge a pack, fly, then recharge the pack and compare the amount recharged with the mAh used from iNav.
Reply
#5
I did the current calibration method with ~10 packs. Now I am @ 1876 current scale. The strange thing is: When i measure current flow with battery & disarmed my circuit analyzer showed 170 mAh, while INAV showed 9 A (screenshots attached) ... . This means while disarmed "capacity drawn" is running very very fast ... . Something is horribly wrong and i cant figure out what.


Attached Files Thumbnail(s)
       
Reply
#6
Does the current draw in flight look reasonable? You might need to adjust the offset. See here:


Have you verified the current sensor is connected to the ADC? You could alternately try setting the current sensor type to "ESC" if the ESC telemetry is connected properly.
Reply
#7
(09-Apr-2021, 07:47 PM)V-22 Wrote: Does the current draw in flight look reasonable? 
Have you verified the current sensor is connected to the ADC?
You could alternately try setting the current sensor type to "ESC" if the ESC telemetry is connected properly.

Looks like you are pointing into the right direction, thanks!

I reviewed the DVR of my last flight, it turned out that the current is around 7 A during the complete flight ... . I didnt notice till today ... . So i tried to calibrate to a "random" value ... .   Whistling

Sensor type "ESC" is not working at all (Reporting 0 A). Which is according to diatone.us website correct (No ESC telemetry).

I am not really sure how to figure out that the current sensor is connected to ADC ... . Maybe through "resource" and "status" command?

CLI resource:

Code:
# resource
IO:
----------------------
A00: FREE
A01: FREE
A02: MOTOR4 OUT
A03: MOTOR1 OUT
A04: MPU CS
A05: SPI1 SCK
A06: SPI1 MISO
A07: SPI1 MOSI
A08: BEEPER OUT
A09: SERIAL1 UART TX/RX
A10: FREE
A11: USB IN
A12: USB OUT
A13: FREE
A14: FREE
A15: FREE
B00: MOTOR2 OUT
B01: MOTOR3 OUT
B02: FREE
B03: FLASH CS
B04: LED2 OUT
B05: LED1 OUT
B06: I2C1 SCL
B07: I2C1 SDA
B08: FREE
B09: FREE
B10: SERIAL3 UART TX
B11: SERIAL3 UART RX
B12: OSD CS
B13: SPI2 SCK
B14: SPI2 MISO
B15: SPI2 MOSI
C00: FREE
C01: ADC CH1
C02: ADC CH2
C03: FREE
C04: MPU EXTI
C05: FREE
C06: FREE
C07: FREE
C08: FREE
C09: SOFTSERIAL1 UART TX/RX
C10: SPI3 SCK
C11: SPI3 MISO
C12: SPI3 MOSI
C13: FREE
C14: FREE
C15: FREE
D02: FREE

CLI status
Code:
# status
System Uptime: 1519 seconds
Current Time: 2041-06-28T01:04:00.000+00:00
Voltage: 1.01V (1S battery - CRITICAL)
CPU Clock=168MHz, GYRO=MPU6000, ACC=MPU6000
STM32 system clocks:
 SYSCLK = 168 MHz
 HCLK   = 168 MHz
 PCLK1  = 42 MHz
 PCLK2  = 84 MHz
Sensor status: GYRO=OK, ACC=OK, MAG=UNAVAILABLE, BARO=UNAVAILABLE, RANGEFINDER=NONE, OPFLOW=NONE, GPS=UNAVAILABLE
Stack size: 6144, Stack address: 0x10010000, Heap available: 1728
I2C Errors: 60, config size: 6480, max available config: 131072
ADC channel usage:
  BATTERY : configured = ADC 1, used = ADC 1
     RSSI : configured = ADC 3, used = none
  CURRENT : configured = ADC 2, used = ADC 2
 AIRSPEED : configured = none, used = none
System load: 6, cycle time: 252, PID rate: 3968, RX rate: 49, System rate: 9
Arming disabled flags: NAV HWFAIL RX CLI
VTX: band: A, chan: -, power: /
Reply
#8
Trying to find the correct wiring diagram or specifications for all of the different revisions of the Diatone stuff is a nightmare. One diagram I found showed the F40 with ESC telemetry on RX6, which is why I suggested to give it a shot.

Based on your output, it looks like ADC 2 is used for the current sensor and mapped properly. The only other thing I can think of is you need to adjust your offset for some reason. Try following that procedure in the video I linked above and see if that helps.

Have you tried Betaflight on this board? Does the current sensor work properly there?
Reply
#9
Sadly I have no clamp meter or watt meter ... . So I cant do the method in the video.

I have a spare FC here (exactly the same Mamba F405 MK2 & F40 MK2 ESC Target FURYF4OSD). I flashed latest BF and calibrated current scale to 3100 having same value on my circuit tester and on BF configurator (0,06 A with 6s battery in idle). I am not able to do this on INAV since scale needs to be >10000 with battery in idle mode which is not possible (Max value is 10000). Setting scale to 10000 shows 1,7 A in INAV and 61 mA on circuit tester.

I am clueless .... ?!

Maybe this have nothing to say, but on BF current meter is assigned to C03 and RSSI to C02. In INAV it is current meter to C02 and RSSI to C03.
Reply
#10
(09-Apr-2021, 09:30 PM)Julez Wrote: Maybe this have nothing to say, but on BF current meter is assigned to C03 and RSSI to C02. In INAV it is current meter to C02 and RSSI to C03.
That could certainly be an issue...

iNav has a target for MAMBAF405US with the current sensor mapped properly. Have you tried that?
[-] The following 1 user Likes V-22's post:
  • Julez
Reply
#11
I am so confused. Target "MAMBAF405US" works perfectly. Scale of ~345 gives very nice result with my circuit tester .... . Now i need to test if other stuff is working with new target.

Please answer me one last question, just to be sure. Did I miss something "basic" and BF target is not the same target in INAV ?! Or is this kind of a bug?!

Thank you very much!
Reply
#12
I think the FURYF4OSD target was just used for an older revision, as there is also a MAMBAF405US Betaflight target. It is kind of a mess with all of the different hardware revisions released with the same name and no documentation.

Glad you got it working! Happy flying.
[-] The following 1 user Likes V-22's post:
  • Julez
Reply
#13
(09-Apr-2021, 06:14 PM)V-22 Wrote: iNav current/voltage scales are a factor of 10 higher than BF. 1100 sounds correct.

Try 1150 for the current scale. Fully charge a pack, fly, then recharge the pack and compare the amount recharged with the mAh used from iNav.

Haha. I am going to stop answering INav questions.
Reply
#14
Just to have this complete:

The MAMBAF4US target does not work with my Mamba F405 MK2 (HW Rev. 3) FC. Resource mapping is f**** up completely. At least we could figure out that the current sensor is not working with FURYF405OSD target since resource mapping for C02 and C03 is wrong (needs to be the other way round).

I try to open a INAV bug report and try to clarify if the resource mapping for FURYF405OSD ist just "wrong" or belongs to another FC/HW-Revision. If this fails i try to build my own target ... .

Thank you!
Reply
#15
Not that this helps you but I recently installed a new HGLRC Zeus F722 stack and the manual shows the settings for the voltage and current perimeters.  The previous stack is had (Lumenier LUX7) also showed the settings in the manual.  I don’t understand why more manufacturers don’t do this as it would sure make life easier.....  Huh
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  12v LED PWM Switch INAV - Matek F722-WPX Simpo20 6 1,723 20-Jun-2024, 03:56 AM
Last Post: koklimabc
  Inav won't arm Boat Mack52$ 0 82 17-Jun-2024, 03:13 PM
Last Post: Mack52$
  iNav & LiIon Cyfly 6 1,413 15-Jun-2024, 05:13 AM
Last Post: thetangledmind
  iNav on NeutronRC AT32F435 mini AIO necbot 17 2,430 20-May-2024, 09:47 AM
Last Post: jirisvabik
  Recently flashed INAV to speedybee f405 and already had issues on quad crash. grozaalex 0 562 03-May-2024, 09:25 PM
Last Post: grozaalex


Login to remove this ad | Register Here