Shop our Airplanes Products Drone Products Sales
Thread Tools
Jul 05, 2018, 12:20 PM
Registered User
Atx_Heli's Avatar
Thread OP
Discussion

Most Integrated Ardupilot Flight Controller (ChiBios)


This thread is a continuation of the original thread on using Arduplane on the Omnibus F4 Pro flight controller. (https://www.rcgroups.com/forums/show...ne-FC-solution)
Initially, Night-Ghost had created a HAL (hardware abstraction layer) for Ardupilot that allowed Revolution and Omnbis F4 flight controllers to be used. While it was still developmental and had many issues, it was possible with a certain firmware revision, to get an single board Arduplane solution which included FC, OSD, and power module functions.
The original thread focused on the Omnibus F4 Pro flight controller, and presented a mini HowTo for setting up this flight controller, with that firmware snapshot that worked well, with a few limitations.
Since then the Ardupilot development team has worked extensively on another HAL variant (ChiBios) which now supports many additional boards (Matek,etc.), has fewer limitations, bugs, etc., and supports Arducopter as well as Arduplane...ie mainstream Ardupilot.


Since many more boards actually work and are supported, and since development work is still in progress and is making rapid progress, this threads focus is not a mini HowTo, but rather a discussion forum of issues, help, etc. for the
ChiBios Ardupilot on the many FC+ OSD +PM boards it supports.
BE SURE TO STUDY THE APPROPRIATE DOCS ON THE ARDUPILOT SITE, INCLUDING EACH BOARDS INFO PAGE THERE!

However, I will provide some information on how to get started and will try to keep this post updated with links to documentation, etc. as it develops

As an example, I will take the Omnibus F4 Pro flight controller and walk thru how to set it up with the current firmware. Some of this is a direct copy from the original thread.
Materials:
Omnibus F4 Pro V3 (be aware, that some F4 boards call themselves “pro” but do not have the current sense...get the current sense one! )
A Ublox M8N style gps...no compass is required (planes dont need one)

Connections:
-An Sbus,PPM, or DSM RX can be used (and is auto detected) and the PPM jumper on the board should be used. (if you are using a V2 board, see https://www.rcgroups.com/forums/show...4&postcount=71 for modification)
-GPS is attached to UART6
-Telem is available at UART 1
-If you want to power the servos from the ESC BEC via the boards center rail for the servo outputs, then you should remove the diode as per here: https://www.rcgroups.com/forums/show...sc%20isolation.


Loading the firmware:
- Download the firmware for the vehicle type and board from here: http://firmware.ardupilot.org.
First select the vehicle type, then chose "latest" directory. There you will see the boards supported.
Select the board directory desired. In this case, OmnibusF4pro. Download the hex file that includes the bootloader.
In this case, arduplane_with_bl.hex .
- Power up the board with the boot button pressed to place it into DFU mode.
- Start the BF or CF configurator. You will see DFU as the port automatically.
- Go to the firmware flasher and load the .hex file as a local firmware file and flash it.
- Reboot the board and start Mission Planner...connect to the board.
- At this point the board can be setup and configured as normal with Arudpilot. The OSD display is configured with OSD parameters. Documentation is shown here: http://ardupilot.org/plane/docs/comm...-overview.html


ChiBios Ardupilot on Omnibus F4 Pro (4 min 26 sec)


Updates to the firmware:
Also, as new versions of the firmware are posted in http://firmware.ardupilot.org you can now load them using Mission Planner (although some have reported issues occasionally...in which case you just use the preceding procedure for the new firmware file)
-Instead of the xxx_with_bl.hex file you need to download the xxxx .apj file in the board directory.
-Then using the custom firmware option in the MP flash page, select the xxxx.apj file and the new firmware will be loaded. This should not overwrite your parms, but it would be wise to back them up before flashing anyway.
Last edited by Atx_Heli; Jan 19, 2019 at 03:37 PM.
Sign up now
to remove ads between posts
Jul 05, 2018, 12:56 PM
Registered User
vierfuffzig's Avatar
thanks henry, great you‘re keeping this up!

OSD documentation can be found in respective ardupilot vehicle homepages under optional hardware -> on-screen display (OSD) - > onboard osd

http://ardupilot.org/plane/docs/comm...-overview.html
Jul 05, 2018, 01:28 PM
Registered User
sykick's Avatar
Thanks for the the new thread and updates.

Okay, so I got my board loaded and flying the latest code. How do I get the voltage and current sensor to work? I'm using an Omnibus F4 pro V3 with built in current sensor.
I've tried a few pin settings but cant seem to get it to work.

thanks,
Marcus
Jul 05, 2018, 02:00 PM
'FPV'er...not a "LOS'er
Vantasstic's Avatar
Thanks for the new Chibios how-to thread. The NG HAL was worked fine for me. It sounds like the ChiBios version can/is able to provide same functionality and more.

I'm going to assume the GPS conection I have on my current OmnibusF4 Pro and NG HAL will stay the same with this firmware version. What about the built in current sensor? With the NG HAL it had to be set and calibrated manually, not via the MP 'Optional Hardware' tab. Does the NG HAL procedures also apply to the ChiBios version? Hmmm, wait, thinking it through. THe NG HAL always used MP. The ChiBios version only uses BF/CF configuration for the initial load, then MP after that... correct?

edit: edited my post some. I had to read/reread/and reread again the info above. It's starting to sink in now. Looking forward to giving this a try.
Last edited by Vantasstic; Jul 05, 2018 at 02:44 PM.
Jul 05, 2018, 02:50 PM
'FPV'er...not a "LOS'er
Vantasstic's Avatar
Quote:
Originally Posted by sykick
Thanks for the the new thread and updates.

Okay, so I got my board loaded and flying the latest code. How do I get the voltage and current sensor to work? I'm using an Omnibus F4 pro V3 with built in current sensor.
I've tried a few pin settings but cant seem to get it to work.

thanks,
Marcus
I'm wondering if the volt/current sensor has to be set up the same way as in the NG HAL. The steps are here from Atx_heli's thread on the NG HAL:
To setup the current and voltage monitoring you need to change BAT_MONITOR=4 first, then reboot to allow you to set the values below manually. You do NOT want to ever go to the Power module setup tab in MP, it will mess up the values below, that you had manually set:
BAT_VOLT_PIN 8
BAT_CURR_PIN 7
BAT_VOLT_MULT 11.0 (may need tweaking...my bd is 10.7)
BAT_AMP_PERVOLT 38.0 (may need tweaking..my bd is 25 and offset is 0.05v)
(note if you use a V2 board, you will need to do a modification to overcome and issue with using VBAT for the video which causes bad current readings....see https://www.rcgroups.com/forums/show...&postcount=640)
Jul 05, 2018, 03:22 PM
RC fanatic
From old thread (sh83): Athertop. You probably should tune compass orientation settings.

I have taken the BN880 from my test quad and used this to replace the BN880 on my z84 wing (subject of previous compass conversation), and have been going through some testing this evening. I think I've figured the issue - I now have the compass orientation set to Roll 180 and did a further calibration and the compass is working almost perfectly now. So it looks like there is a difference in compass orientation between the BN800 and BN880 GPS modules (- I have by BN800 on fx61 set to normal orientation and very accurate results).

I was also checking my EKF settings and noticed that EKF2 (as well as EKF3) was enabled. I have now disabled EKF2. Hoping the next flight results in less AHRS and other sensor warnings. Will report back once this happens. Also I have put a SD card in now so some log captures which should help any future debugging. Thanks again for your continued support and best wishes, Paul
Jul 05, 2018, 04:45 PM
Registered User
Atx_Heli's Avatar
Thread OP
Quote:
Originally Posted by Vantasstic
Thanks for the new Chibios how-to thread. The NG HAL was worked fine for me. It sounds like the ChiBios version can/is able to provide same functionality and more.

I'm going to assume the GPS conection I have on my current OmnibusF4 Pro and NG HAL will stay the same with this firmware version. What about the built in current sensor? With the NG HAL it had to be set and calibrated manually, not via the MP 'Optional Hardware' tab. Does the NG HAL procedures also apply to the ChiBios version? Hmmm, wait, thinking it through. THe NG HAL always used MP. The ChiBios version only uses BF/CF configuration for the initial load, then MP after that... correct?

edit: edited my post some. I had to read/reread/and reread again the info above. It's starting to sink in now. Looking forward to giving this a try.

correct.... not the only way, but easy for most....CF/BF to flash the firmware with bootloader....ie xxx_with_bl.hex....then updates using .apj and .hex files in MP..
as to battery stuff, still have to set batt monitor and then refresh to see params....pin numbers for current sense and voltage sense have changed to 11/12, but its all setup in the defaults once you enable battery monitoring...same thing for OSD screens....have default stuff already setup...once enabled in MP
Jul 05, 2018, 04:46 PM
Registered User
Atx_Heli's Avatar
Thread OP
Quote:
Originally Posted by Vantasstic
I'm wondering if the volt/current sensor has to be set up the same way as in the NG HAL. The steps are here from Atx_heli's thread on the NG HAL:
To setup the current and voltage monitoring you need to change BAT_MONITOR=4 first, then reboot to allow you to set the values below manually. You do NOT want to ever go to the Power module setup tab in MP, it will mess up the values below, that you had manually set:
BAT_VOLT_PIN 8
BAT_CURR_PIN 7
BAT_VOLT_MULT 11.0 (may need tweaking...my bd is 10.7)
BAT_AMP_PERVOLT 38.0 (may need tweaking..my bd is 25 and offset is 0.05v)
(note if you use a V2 board, you will need to do a modification to overcome and issue with using VBAT for the video which causes bad current readings....see https://www.rcgroups.com/forums/show...&postcount=640)
instead of 8/7 its 12/11 in this HAL...scales should be the same though
Jul 05, 2018, 04:55 PM
Registered User
Atx_Heli's Avatar
Thread OP
I hope to test fly tomorrow AM....
Am getting bad AHRS warnings with EKF....DCM arms fines...will play with it at the field

Even with logging disabled, I cant arm unless I have an SD card inserted...

The OSD is useable (if you like metric)....my personal minimal "needs" list in the OSD before I switch my fleet of planes from F4light is:

1. Imperial option
2. Battery warning of some kind (voltage, mah, or % used)

and would like to have:
3. Total trip distance
4. Total time
5. Efficiency
6. % battery remaining


but the team is making great progress!

EDIT: 1&2 now in place....% remaining is shown iconically next to battery voltage....all should be included eventually...
Last edited by Atx_Heli; Jul 10, 2018 at 09:48 PM.
Jul 05, 2018, 05:17 PM
Registered User
wkf94025's Avatar
The team should have most/all those OSD features in soon.

Kelly
Jul 05, 2018, 05:29 PM
'FPV'er...not a "LOS'er
Vantasstic's Avatar
Quote:
Originally Posted by Atx_Heli
instead of 8/7 its 12/11 in this HAL...scales should be the same though
Thanks. I cheated and saved my NG HAL parameter settings. Then loaded the ChiBios f/w, loaded the old saved parameters and rebooted the FC. I then reloaded the old saved parameters to get the volt/amp offsets. Of course, it also set the volt/amp pins to 7 and 8. I just changed it to 11 and 12...thanks for the heads up on that.

I enabled the OSD type. It appears there's no GUI to configure the OSD info to display and where to display it. I haven't tested the OSD display yet, but will do shortly. I guess I'll stick with the default OSD for now, but certainly would like to figure out how to modify it as well as get multiple screen displays (edit: figured out how to enable additional OSD screens...not tested yet though), and HOPEFULLY convert metric to Imperical measurements. I'm going to guess the OSD isn't to that point yet...or at least the Ardupilot WIKI on the OSD doesn't mention it.

Oops, I see ATX_heli mentioned some of the OSD stuff while I was loading the firmware. I've also got some info now in case I have AHRS and 'won't arm' issues.

another edit: I disabled the AHRS-EKF setting for now...as well as the SD card logging. Anyone know if this version supports Terrain Following? That's one feature I'd love to have.
Last edited by Vantasstic; Jul 05, 2018 at 05:39 PM.
Jul 05, 2018, 06:21 PM
Registered User
Atx_Heli's Avatar
Thread OP
Quote:
Originally Posted by Vantasstic
Thanks. I cheated and saved my NG HAL parameter settings. Then loaded the ChiBios f/w, loaded the old saved parameters and rebooted the FC. I then reloaded the old saved parameters to get the volt/amp offsets. Of course, it also set the volt/amp pins to 7 and 8. I just changed it to 11 and 12...thanks for the heads up on that.

I enabled the OSD type. It appears there's no GUI to configure the OSD info to display and where to display it. I haven't tested the OSD display yet, but will do shortly. I guess I'll stick with the default OSD for now, but certainly would like to figure out how to modify it as well as get multiple screen displays (edit: figured out how to enable additional OSD screens...not tested yet though), and HOPEFULLY convert metric to Imperical measurements. I'm going to guess the OSD isn't to that point yet...or at least the Ardupilot WIKI on the OSD doesn't mention it.

Oops, I see ATX_heli mentioned some of the OSD stuff while I was loading the firmware. I've also got some info now in case I have AHRS and 'won't arm' issues.

another edit: I disabled the AHRS-EKF setting for now...as well as the SD card logging. Anyone know if this version supports Terrain Following? That's one feature I'd love to have.
It should be fully functional Arduplane.
Jul 05, 2018, 06:54 PM
'FPV'er...not a "LOS'er
Vantasstic's Avatar
Quote:
Originally Posted by Atx_Heli
It should be fully functional Arduplane.
Cool, thank you. So (hopefully) no issues with SD card logging...unlike what you reported in NG HAL? I know, to early to tell.
Jul 05, 2018, 07:01 PM
'FPV'er...not a "LOS'er
Vantasstic's Avatar
I configured my OSD. It was easiest to just do it while looking at the OSD display and adjust as desired.

A couple of things I'd like to have (in addition to Atx_heli's wish list above:
Flying Time display
HDPO display
An 'ARMED' icon that always displays when armed (vs just a short message)
Call Sign display (not always on, but on for ~30 seconds every 5 minutes)
I understand OSD functionality is still in progress

I tried setting up multiple OSD screens with no luck. I just tried a simple 2-screen setup. I set my OSD SW Channel to 6. Set the OSD1 and OSD2 min/max to a range where my switch position should enable each screen to become active. I could not get it to switch screens...always stayed on the OSD1 screen. Ideas?

Oh, lastly, the OSD font is HUGE....much bigger than my MinimOSD/NG HAL fonts. Any work towards a selectable font size? Something like OSD_Font 0=small, 1=medium, 3=large.

TIA for the work the devs are putting into this. I'll probably flight test mine this weekend.
Last edited by Vantasstic; Jul 05, 2018 at 07:23 PM.
Jul 05, 2018, 07:54 PM
Registered User
Atx_Heli's Avatar
Thread OP
Be absolutely sure that the min and max channel values for each OSD screen is really where the channel sits....and enable the switching and mode in the OSD parameters section


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Ardupilot flight controller status xmarkx Multirotor Drone Talk 9 Sep 11, 2018 02:43 PM
New Product Scisky-Mul-A integrated FPV flight control board 12g! YXmotor FPV Talk 22 Mar 01, 2017 05:42 PM
Discussion Integrated power distribution board and flight controller. tele1974 FPV Equipment 0 Nov 09, 2015 10:36 PM