Servers by jDrones

New OS free F4Light HAL

ardupilot

(Andrea Belloni) #1

Thanks to the work of @night_ghost on his own fork with help from @tridge to have it merged in master, we now have a new HAL in Ardupilot master. This new HAL is, as the name suggests, really light because @night_ghost has implemented the functions of a light-weight RTOS in the Scheduler module of the HAL.

This HAL’s small size allows loading it on low cost STM32F405 based flight controllers, such as the OpenPilot Revolution (and Revolution Mini), Airbot F4, Omnibus F4 and many others with similar hardware. I built and flew with success three quadcopters, one for each of the aforementioned boards. @vierfuffzig built and flew a plane with Revolution Mini, and he provided additional details.

I am excited that the F4Light HAL has been merged in ardupilot master because this will lead to an increased size of the user base, due to the lowering of the price necessary to build DIY copter and plane (and maybe also rover and sub, not supported for now).

Now I will add some technical details relative to the compatible boards and connections, extracted from the wiki in @night_ghost fork. This information is not complete at this time, but will be expanded in the future.

Keep in mind that the same target is more stable and usable, and some others have had problems that have to be fixed. In any case it is not possible at this time to flash these boards from Mission Planner or APM Planner 2. The more usable boards are Revolution and RevoMini.

The F4Light HAL supports the following boards:

  • OpenPilot Revolution / RevoMini (target revomini_Revolution)
  • Airbot F4 (target revomini_Airbot)
  • Omnibus F4 V2 Pro (target revomini_AirbotV2)

How to flash: https://github.com/night-ghost/ardupilot/wiki/Flash-firmware

Once the firmware is flashed the various parameters can be configured using a GCS from the Ardupilot project:

  • Mission Planner
  • APM Planner 2
  • MAVProxy

Other than the Ardupilot parameters there are HAL parameters specific for this HAL.


OpenPilot Revolution / RevoMini

Main port -> Serial1 (common use: telemetry)
Flexi port -> Serial2 (common use: OSD)
pin 7,8 (on Revolution) 5,6 (on RevoMini) of RC input port -> Serial3 (common use: GPS)
pin 9,10 (on Revolution) 7,8 (on RevoMini) of RC input port -> SCL, SDA (I2C)

The main differences between Revolution and RevoMini are:

  • Lack of radio link in the RevoMini (anyway this HAL don’t use it)
  • Flexi-IO aka RC Input has 10 pin on Revolution and 8 pin on RevoMini

RC Input on Revolution

  1. Ground
    
  2. +5V
    
  3. NA (PB12, pin 2. Can be used as relay pin)
    
  4. NA (PB13, pin 3. Can be used as relay pin)
    
  5. PPM/SBUS/DSM Input 1
    
  6. PPM/SBUS/DSM Input 2 or Servo7 - see HAL_SERVO_MASK parameter
    
  7. UART6 TX (SERIAL3 as Ardupilot Parameter) or Servo8
    
  8. UART6 RX or Servo9
    
  9. SCL external I2C, Tx SoftSerial if I2C moved to FlexiPort or Servo10
    
  10. SDA external I2C, Rx SoftSerial if I2C moved to FlexiPort or Servo11
    

RC Input on RevoMini

  1. Ground
    
  2. +5V
    
  3. PPM/SBUS/DSM Input 1
    
  4. PPM/SBUS/DSM Input 2
    
  5. UART6 TX (SERIAL3 as Ardupilot Parameter)
    
  6. UART6 RX
    
  7. SCL external I2C, Tx SoftSerial if I2C moved to FlexiPort
    
  8. SDA external I2C, Rx SoftSerial if I2C moved to FlexiPort
    

Additional information for this board can be found in the Readme file.


Airbot F4

Information for this board is available in the Readme file.


Omnibus F4 V2 Pro

Information for this board is in the Readme file.


(Luís Vale Gonçalves) #2

Thanks to the great work here Andrea.

:sunglasses:


(basti) #3

thanks for this great sum up, andrea, and a big thank you to everyone involved, especially @night_ghost and @tridge for making this happen.

i have been using a revomini board running arduplane on a scratch-built 120 cm wing for more than half a year now, and it has been somewhat rewarding! to run ardupilot on this kind of small, light and affordable boards does add some great opportunities imho.

revomini comes with a very small footprint, convenient connectivity and is most easy to place in whatever airframe with its plastic case and a strip of double sided tape. this does come at the cost of not having an onboard sd slot. for my kind of proximity style fpv applications that‘s a small price to pay though…

cheers, basti.


(Andrea Belloni) #4

I would like to show some video of my DIY quadcopters that use this HAL

450 frame with AirbotF4:

250 frame with AirbotF4:

140 frame with Omnibus V2 Pro:


(rmackay9) #5

Really great stuff! Congrats to @night_ghost! obviously a very talented guy.


(ChiangKaishek) #6

I used a pixmini for 150Copter and the flight control was totally unadaptable.

but F4 flight control is fine.

If i use this firmware, there will be no similar problems.


(Marc Dornan) #7

It is not well suited to that size of copter. Betaflight or Cleanflight would be the way to go.


(Andrea Belloni) #8

@ChiangKaishek did you try to tune the PID?
@Marc_Dornan why did you say that is not well suited to small copter? Did you see my video with 140 frame quad with Arducopter?


(Marc Dornan) #9

I may stand corrected then.

Many people (myself included) have not had great results with Arducopter
and small quads. Rate controllers just tend to work better. It has always
been my experience. Even with iNav people tend to notice their little quads
are not as tight as when using Betaflight. That, to me, is just a trade-off
for GPS stabilization. My information may be outdated though.


(rmackay9) #10

Marc,

Re ArduCopter vs Beta flight, what you say may be true although I suspect for many people it’s just a matter of tuning - the default tuning of Copter is for a mid sized copter while beta flight’s default is probably for a much smaller quad. I’m guessing of course.

The other more significant difference may be the update rate and latency between IMU updates and the outputs to the motors. Copter-3.5 has much lower latency than previous releases and Copter-3.6 will likely be even better.

So I think ArduPilot will fly as well as BetaFlight even on small quads at some point if it doesn’t already. On the other hand, i think people should just use whatever works best for them. BetaFlight is great, it’s GPLv3 licensed like ArduPilot and I have nothing but respect for the great work they’ve done.


(Andrea Belloni) #11

Maybe my answer above was a bit hasty, @rmackay9 has always wise words.
For the sake of truth I have to say that before using Ardupilot on my little 140 quad I was using iNav and it works really good. When I moved to Ardupilot it took more time to get a stable setup but in the end I received more satisfaction and all the extra features that Ardupilot has compared to iNav.


(Marc Dornan) #12

Unlike you Randy, I am no authority. Sounds like it is high time I revisited small quads and Arducopter.


(Tomasz) #13

I have a guestion
Is main port (on revo) coressponding to serial 3
I want to connect naze gps+compass What I have to configure in MP ?
Regards


(Andrea Belloni) #14

main port on revo is serial1
naza gps+compass module is only on latest commit from @night_ghost and till now not tested

other modules with gps on serial and compass on i2c works without problems


(Fnoop) #15

I think one big problem is that the tuning values for small (<=250) copters are really tiny tiny numbers, and you need to get round the safety thresholds in some of the GCS. Also the defaults absolutely won’t fly the smaller copters so you have to half or quarter or even more the initial PID values to get them to fly, and the tuning window is much smaller the smaller the copter.
So I suspect Ardupilot will fly these copters really well (it flies my 300 brilliantly), just the GCS, documentation and settings need to be adapted a bit. Suspect very few people using Ardupilot fly things this small.


(Tomasz) #16

THx Andrea.

So if I want to connect gps with i2c mag I have to connect gps to main port on revolution and mag to Flexi port ? Is it correct ? Flexi port is serial 2? What I have to change in serial2 ?
regards


(Andrea Belloni) #17

For Revolution / RevoMini:
Main port -> Serial1 (common use: telemetry)
Flexi port -> Serial2 (common use: OSD)
pin 7,8 (on Revolution) 5,6 (on RevoMini) of RC input port -> Serial3 (common use: GPS)
pin 9,10 (on Revolution) 7,8 (on RevoMini) of RC input port -> SCL, SDA (I2C)

Ciao
Andrea

[Edit]
added to first post


(Amilcar Lucas) #18

Can this info please be added to the wiki ?


(Luís Vale Gonçalves) #19

I might have missed some boards, but could any of these boards be used for a TradHeli ? Which ? I didn’t find any that would allow the number of required output channels for it. @anbello @night_ghost ?


(Andrea Belloni) #20

I added both to the first post and to the wiki