Upgrade firmware in a safe way

some background info:

we have successfully built and flew a dodeka-hexa uav (12 rotors) that can lift up tot 80kg. The uav flies ok. Further tuning would make the flight smoother however. Specifically, tuning the altitude estimation within the EKF to use BARO and GPS. I attempted this using EK3_SRC1_POSZ= 1 and EK3_OGN_HGT_MASK=5. However there seems to be a bug in the behavior according to this. The fix has been included in ArduCopter 4.5.5 and above.

We are currently running:
CubeOrange
ArduCopter4.4.4

The current params in 4.4.4 are saved to file. We would like to upgrade the firmware to latest 4.6.2, but keep the parameters of 4.4.4. Is there a safe way to do this and verify?

I tried to do that in SITL but one can not upgrade firmware when on SITL.

I also did a param compare between the default 4.6.2 params and our own params. There are around 30+ different params added to the latest version.

What I have in mind is to do the upgrade on the reall uav via Mission Planner, and MP will take care of the params and copy/carry over the params from 4.4.4 to 4.6.2.
Is there another way to consider? especially that a crash is really costly. Something using SITL maybe?

I attach a diff file as a patch between our params and the default 4.6.2 params in SITL.

diff.txt (11.6 KB)

The safe way is:

  1. Save the 4.4.4 parameters to a file called dodeka-hexa_ac4.4.4.param
  2. Update to ArduCopter 4.6.2

That is it! the update will keep all your parameters intact, and the file you saved is just for backup in case you need to downgrade to 4.4.4 later.
All your parameters will be automatically kept or updated if required.

Do not manually load that old 4.4.4 backup into 4.6.2. That file is only to be used if you downgrade to 4.4.4.

1 Like

@amilcarlucas,

there seems to be a bunch of new params for the PID (Derivative Feed-Forward, P+D Term Limit, PID Notch Filter Config) introduced at 4.5.0.
From the changelog:

PID controllers get DFF/D_FF (derivative feed-forward), NTF (target notch filter index) and NEF (error notch filter index)
PID controllers get PDMX param to limit P+D output (useful for large vehicles and/or slow actuators)
PID notch filter configured via new filter library using FILT parameters

Wouldn’t these be an issue when I upgrade to 4.6.2? If not, could you please point me to documentation or code that explains how the upgrade can automatically handle these changes? Thanks.

No.

Sure, here it is:

Note
Updating the firmware to a newer version does not alter existing parameters unless the firmware is for a different vehicle, in which case parameters are reset to their default values for that vehicle. However, it is always a good idea to save your parameters to a file using the ā€œSave to Fileā€ button on the Mission Planner’s CONFIG/Full Parameter Tree tab before any firmware updates, just in case of any issues while updating. Do not apply all parameters after upgrading to a new version as some parameters might have a different meaning.

From Loading Firmware — Copter documentation

Those new parameters will have their default value, and the default value is OK. The new 4.5.x filters will be disabled.

If you want to make sure that all parameters have their best possible values I can recommend a software to do that :slight_smile:

1 Like

Thanks for the info! I feel much validated to do the upgrade now.

I assume you are referring to the methodic configurator?

You guessed it. That’s the one.

Will run the configurator after upgrade and confirm all is well. Thanks for the (super fast) help, Amilcar.

Edit: just realized you are the author of the configurator! its great and comprehensive! Danke!!

1 Like

IIRC doing AUTOTUNE again after upgrading to version with new PIDs is recommend as it can improve tune over the conversion one.

Yes, autotune has improved in version 4.6.x
But the improvements where mostly in the safety of the autotune process itself.
It now refuses to execute and/or complete if your vehicle is badly built.

2 Likes

I can agree that I have been hesitance to change any firmware past 4.4.4.

The drones I have are not made by me and would not want to adjust any settings.

Can you provide more details about the parameter changes from 4.4.4 to 4.6.x

I guess I should ask the manufacture how to deal with this situation.

Tristan

The code is built exactly for this usecase. Automated parameter conversion when the FW is updated.
So that users do not need to know any details and can easily and safely do the upgrade without having to look at the 1300 parameters.

Does that answer your question?

You should read the release notes of all the versions between 4.4.4 and 4.6.3

How much detail do you want?

Arducopter Changelog

for a one to one comparison of the 1300+ params between 4.4.4 and 4.6.2 see the attached diff.txt in the first post.
I plan to perform the upgrade tomorrow. Can report back to you if all goes well. Perhaps that validates/re-ensures your willingness to upgrade

Much appreciated.

I am looking for uses that have done the upgrade from 4.4.4 to 4.6.x to see what the real world experience is.

Thanks.

Did the upgrade today. All went smooth. The upgrade procedure copied over the parameters from 4.4.4 to 4.6.2 as I had them set. I did get one warning/error message 'GPS1 unable to configure band 0x10310020' (see attached screenshot). I couldn’t find any related issue online. Anyone has an idea what this is or what is causing it?

Took the drone outside and the GPS was showing our correct position on the map, however the warning/error messages kept appearing.

I did not arm the drone, nor did I do a test flight as the local flight authority forbids us from doing so in this region. The flight test will be conducted in the field around mid December.

I saved the params from the FC to file, loaded them into the simulator (SITL + our params + Gazebo) and it flew ok. There were no reported issues.

I tried the methodic_configurator, but for some reason when I chose the option of ā€˜edit local params’ as opposed to uploading to the drone, it kept showing n/a as current values.

Anyone seen the GPS warning/error before?
Hardware:
OrangeCube
drotek Sirus F9P (link)

@Tristan_Redish hope this helps you in making a decision.

Edit: attached image

The reason it kept showing N/A ( not available) as current values is because you choose ā€˜edit local params’ without connecting to the drone. And if there is no connection to the drone, no drone current parameter values are available, hence N/A (not available).

Does that make sense?

Yes, that makes sense.

I operated under the assumption: I connected the drone, the configurator got the params. I chose a template, input/edited the first page (e.g. battery capacity, min and max TOW etc.) and saved it as a new vehicle.
I continued with the configurator but the only option to proceed to the next step was to upload to the FC.
I didnt want that. So I disconnected the drone, re-opened the configurator and chose the vehicle I saved from file and did a ā€˜edit local params’. I thought when I first connected the drone that it had the params downloaded and saved.

Did I miss-read the documentation on how to check/edit the params locally rather than upload to FC directly?

You choose the ā€œsimpleā€ GUI complexity on the top of the Component editor window where you entered your vehicle components.

ā€œsimpleā€ GUI complexity is for beginners. Beginners favorite mistake is to skip mandatory stuff, rendering their drone dis-functional. So, beginners, for their own good are not allowed to skip steps and are forced to upload their changes to the FC.
This effectively forces them to correctly configure the vehicle.

You are not a beginner, so select ā€œnormalā€ GUI complexity, and the software will allow you to skip to the next step without uploading to the FC.

You understood the documentation correctly, but you missed the point that in that operation mode all FC current parameter values are N/A (not available) because there is no FC connection.

I recommend editing them with a FC connected and pressing the ā€œskipā€ button to save them to file, but not upload them to FC.

1 Like

ahhh! I missed the simple/normal GUI option.
Will check and report back. wie immer, danke!

How does the GPS Module get its power? Why is the Bat1 showing 0.07v, is it you haven’t configured the battery 1 monitoring?