Thread Tools
This thread is privately moderated by RC911, who may elect to delete unwanted replies.
Feb 04, 2015, 01:09 PM
8 bit is more fun
RC911's Avatar
Discussion

KK2 firmware by RC911


My firmware is based on the original code from Rolf Bakke (KK2_1V6) and therefore have most of the features from his firmware intact. I have however added quite a few features of my own and some on request from others.

Key features:
  • Three flight modes: Acro, SL Mix and Normal SL.
  • Simplified ESC calibration (performed without transmitter).
  • Reduced servo jitter on M7 and M8.
  • Increased PWM output resolution on M1 - M8.
  • Configurable AUX switch functions. Supports 5 positions.
  • Multiple user profiles. Not available in all firmware versions.
  • Support for SSG (Super Simple Gimbal). This feature is based on Brontide's code.
  • Remote gimbal offset control. This featured is based on Steveis' code.
  • Remote tuning of PI gains and other parameters.
  • Lost model alarm.
  • Lowest battery voltage logged and displayed on the LCD screen.
  • Quiet ESCs while browsing the KK2 menus.
  • Advanced channel mapping.
  • Flight timer.
  • Adjustable LCD contrast.
  • ...and more. See the included Readme.txt and Whatsnew.txt files for more information.

KK2.1

KK2.1++ AiO R8
This is an All-in-One (AiO) version that supports standard receivers, CPPM, S.Bus and Satellite (DSM2/DSMX) input. See the release notes here.
It will work with all KK2.1 boards from HobbyKing as well as various clones and a few "improved" boards (like the KK2.1 EVO controller). It even supports the unofficial KK Mini board that has the button order reversed.

KK2.1++ DShot
This firmware was designed to be used with DShot compatible ESCs and to run the main loop as fast as possible (1kHz) for better flight performance. It will therefore NOT work with standard (PWM) ESCs, nor servos. With only four motor outputs this limits the supported frame types to Quads, V-tails and Y4. Number of RX input channels has also been reduced to a minimum (5) and only serial input methods (S.Bus and Satellite) are supported in this version. See the release notes here.

KK2.0

For the old KK2.0 board I have made four different firmware versions aimed at specific receiver systems:Use of S.Bus and Satellite will require special signal converter cables. You can get these from HobbyKing.

Bonus firmware

Credits
  • Rolf Runar Bakke (KK) for designing the KK2 controller and for making the firmware open source.
  • Steveis for fixing HK's messed up code and for letting me borrow some of his coolest FW features.
  • Brontide for the SSG support and for optimizing the LCD routines.
Last edited by RC911; May 09, 2017 at 01:15 PM. Reason: KK2.1++ DShot firmware released.
Sign up now
to remove ads between posts
Feb 05, 2015, 05:20 PM
Registered User
radavs's Avatar
Great to see you back!
Feb 05, 2015, 05:26 PM
numnutchris
subscribed!
Feb 06, 2015, 01:05 AM
Registered User
Awesome, thanks I look forward to this!!
Feb 06, 2015, 11:01 AM
8 bit is more fun
RC911's Avatar
KK2.0 v1.6++ R4

Changes since revision 3:
  • Channel mapping with support for AUX2, AUX3 and AUX4 features.
  • Flight timer (displayed on the SAFE screen) runs while armed and throttle is above idle.
  • A setup menu is displayed after a factory reset and whenever user profile #1 is reset. This menu is also accessible from the KK2 main menu (select "Initial Setup").
  • New motor layout: V-Tail Hunter.
  • LVA beep length is now limited to 1/4 second.
  • RX signal handling improved. For slow booting receivers status texts like "No aileron input" will be displayed until valid RX signals are detected.
  • The LVA setting is now checked upon arming from the Quick Tuning screen. This makes the KK2 LED flash if the LVA value is set too low.
  • Added a second Receiver Test screen for displaying AUX2, AUX3 and AUX4 input values.
  • On the Receiver Test screen, the throttle text now says "Idle" when the throttle actually IS idle. This makes the lower throttle endpoint adjustment easier.
  • On the Receiver Test screen, the aileron, elevator, rudder, aux2 and aux3 texts now say "Center" when these channels are centered precisely.
  • The status text on the SAFE screen will now be highlighted (and flashing) when attention is needed. This also applies to the Quick Tuning screen.
  • New status message: "Check throttle level" will be displayed when the throttle stick is above idle position (preventing arming).
  • New status message: "RX signal was lost" will be displayed on the SAFE screen if an RX output failure occurred during flight. This will also trigger the Lost Model Alarm.
  • Added a second screen to Gimbal Settings. The gimbal home position parameters are set from this new screen and they can be utilized by mapping the KK2 AUX input to AUX4.
  • ESC calibration now has more on-screen (usage) information.
  • When roll and pitch are linked only one set of PI parameters are displayed for "Ail+Ele".
  • SL Mixed mode is now activated when the (Lost Model) Alarm function is selected. Acro mode was used earlier.
  • Alarm status is now shown on the SAFE screen.
  • Sanity error screen improved/optimized.
  • The beep that was produced every time the AUX switch changed position will now be skipped if the flight mode stays unchanged.
  • Removed code for "hidden" button (PREV) on the Show Motor Layout screen.
  • Miscellaneous GUI changes and code optimizations.
  • Bug fixed: Button(s) held down during start-up will no longer trigger the menu or change user profile.
  • Bug fixed: Setting the Minimum Throttle value to 20 (maximum) will no longer produce a "One or more settings are out of limits" warning.
  • Bug fixed: AUX switch settings appeared to be unaffected by a profile reset (when visiting the AUX Switch Setup screen before the SAFE screen).
  • Bug fixed: The User Profile screen had a problem with selection highlighting after importing profile data.
See the first post of this thread for the latest firmware versions.

Remember to write down your settings before flashing. This update will clear all settings from older versions.
Please observe that this firmware is for the old KK2.0 board and will not work on any of the KK2.1 boards.

Everybody have fun and fly safe!

All feedback is welcome.
Feb 06, 2015, 11:13 AM
8 bit is more fun
RC911's Avatar
KK2.0 v1.6++ S.Bus R3

Changes since revision 2:
  • RX channel 6 will now control gimbal pitch offset while channel 7 will control roll offset.
  • RX channel 6 now controls pitch and channel 7 controls roll when remotely tuning ACC trims and gimbal gains.
  • LVA beeps are now limited to 1/4 second.
  • New motor layout: V-Tail Hunter.
  • The status text on the SAFE screen will now be highlighted (and flashing) when attention is needed.
  • New status message: "Check throttle level" will be displayed when the throttle stick is above idle position (preventing arming).
  • On the Receiver Test screen, the throttle text now says "Idle" when the throttle actually IS idle. This makes the lower throttle endpoint adjustment easier.
  • The main menu was rearranged a bit so that the Remote Tuning item now is on top.
  • A few minor GUI changes.
  • Bug fixed: Negative gimbal gain values couldn't be tuned remotely (i.e. they were forced to zero).
  • Improved the Lost Model Alarm feature. The delay is now reset every time the switch (channel 17/DG1) changes state.
  • The Lost Model Alarm will now sound (instead of the "Arming beeps") if the throttle level is set to idle during a failsafe condition.
See the first post of this thread for the latest firmware versions.

Upgrading from revision 2 won't clear your settings, but I still recommend writing them down before flashing.
Please observe that this firmware is for the old KK2.0 board and will not work on any of the KK2.1 boards.

Everybody have fun and fly safe!

All feedback is welcome.
Feb 06, 2015, 11:37 AM
Gunslinger
Gunslinger68's Avatar
That is awesome - I have to ask for an USBasb and flash my 2.0 and at least one of my 2.1 on my test tube baby with the newest release!
Can hardly wait for the weekend to end, actually something I hate to occur!
gunslinger
Feb 06, 2015, 12:38 PM
Quadaholic
--Oz--'s Avatar
Excellent, the mix-mode master is back!
Feb 06, 2015, 02:27 PM
8 bit is more fun
RC911's Avatar
Thanks guys,

Remember to check the first post once in a while as it will be updated over the next few days.
I'm currently re-publishing the firmware versions that were released over at multikopter.co.uk so for some of you these will be old news, but will appear as brand new for those of you that never followed me over there.

The reason for my return is that multikopter.co.uk is shutting down. That's all.

RC911
Feb 06, 2015, 05:04 PM
8 bit is more fun
RC911's Avatar
KK2.1 CPPM Analyzer v1.2
This firmware can be flashed onto your KK2.1.x controller to test the output from your CPPM receiver. It will provide information like channel count, frame length and remaining frame space as well as live channel data.
It even has a "Test" mode where it will log the lowest and highest value for all input channels. If you let the logger run for a few minutes it can help you detect receiver problems (e.g. instability). This mode can also be used to check channel endpoints.

This firmware won't disturb your KK2 settings so it is no problem flashing this tool just for a quick test and then re-flash your favourite FC firmware afterwards.

RC911
Last edited by RC911; Feb 14, 2015 at 09:31 AM.
Feb 06, 2015, 06:45 PM
Quadaholic
--Oz--'s Avatar
Quote:
Originally Posted by RC911
KK2.1 CPPM Analyzer v1.1
This firmware can be flashed onto your KK2.1.x controller to test the output from your CPPM receiver. It will provide information like channel count, frame length and sync pulse width as well as live channel data.
It even has a "Test" mode where it will log the lowest and highest value for all input channels. If you let the logger run for a few minutes it can help you detect receiver problems (e.g. drop-outs).

This firmware won't disturb your KK2 settings so it is no problem flashing this tool just for a quick test and then re-flash your favourite FC firmware afterwards.

RC911
That is pretty cool! I have a few KK2 spares. Will test it out and compare with my Tektronix scope. There probably will be some variance do to the KK2 does not use a crystal, I will report back next week.

I can't wait for your KK2 gimbal. When we shoot videos with slight zoom (so the quad is not so small), the video is too shaky. Will you have a couple modes (auto level, steady shot, etc)? Is it 2 or 3 axis?
Feb 06, 2015, 08:29 PM
8 bit is more fun
RC911's Avatar
Quote:
Originally Posted by --Oz--
That is pretty cool! I have a few KK2 spares. Will test it out and compare with my Tektronix scope. There probably will be some variance do to the KK2 does not use a crystal, I will report back next week.

I can't wait for your KK2 gimbal. When we shoot videos with slight zoom (so the quad is not so small), the video is too shaky. Will you have a couple modes (auto level, steady shot, etc)? Is it 2 or 3 axis?
Looking forward to your CPPM results. They shouldn't be too far off. All KK2 boards do have crystals, but I believe the early KK2.1 boards were missing the crystal loading capacitors which could give some drifting and inaccuracy.

You will probably find that the frame length and sync pulse are varying a bit. This depends on how the frame length is defined in the CPPM receiver. The PPM frame description I found online (http://www.mftech.de/ppm_en.htm) states that the CPPM frame starts with a sync pulse, while some (maybe all) receivers add the sync behind the final channel. Which definition is correct - I simply don't know. If anybody knows, please share the information here in this thread.

The standalone gimbal firmware for KK2.0 will only work with 2-axis servo gimbals. It will of course be self-levelling, but nothing fancy like a "steady shot" feature. It does have a low voltage alarm though.
Feb 07, 2015, 05:31 AM
Quadaholic
--Oz--'s Avatar
Quote:
Originally Posted by RC911
Looking forward to your CPPM results. They shouldn't be too far off. All KK2 boards do have crystals, but I believe the early KK2.1 boards were missing the crystal loading capacitors which could give some drifting and inaccuracy.

You will probably find that the frame length and sync pulse are varying a bit. This depends on how the frame length is defined in the CPPM receiver. The PPM frame description I found online (http://www.mftech.de/ppm_en.htm) states that the CPPM frame starts with a sync pulse, while some (maybe all) receivers add the sync behind the final channel. Which definition is correct - I simply don't know. If anybody knows, please share the information here in this thread.

The standalone gimbal firmware for KK2.0 will only work with 2-axis servo gimbals. It will of course be self-levelling, but nothing fancy like a "steady shot" feature. It does have a low voltage alarm though.
Thanks RC911 for your reply.

Your correct, I got home have seen the crystal on the KK2 (just above the LCD on the top left).

I only use FrSky, so I will be testing with Taranis and D4R-II in ccpm 27ms FW.

I would like a gimbal that used 2 servos to stabilize a camera on a stick, one that would be able to point and follow an object (of course a quad) but make it smooth (aka Sony's stead shot mode) with some adjustable parameters (how quick it would follow my pointing non-smooth pointing maneuvers). Is this something your thinking about in the future? TIA!
Feb 07, 2015, 07:18 PM
8 bit is more fun
RC911's Avatar
Quote:
Originally Posted by --Oz--
Thanks RC911 for your reply.

Your correct, I got home have seen the crystal on the KK2 (just above the LCD on the top left).

I only use FrSky, so I will be testing with Taranis and D4R-II in ccpm 27ms FW.

I would like a gimbal that used 2 servos to stabilize a camera on a stick, one that would be able to point and follow an object (of course a quad) but make it smooth (aka Sony's stead shot mode) with some adjustable parameters (how quick it would follow my pointing non-smooth pointing maneuvers). Is this something your thinking about in the future? TIA!
What improvements will be done to the KK2.0 gimbal firmware depends on the feedback I receive. I haven't tried it on a gimbal myself, but the servos seem to respond correctly as I move the board around. Please give it a try and let me know what you think.
Feb 08, 2015, 01:53 AM
Registered User
Hy there a manual fir this firmware?

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question Video guide for setting up a Tricopter w/KK2.1.5 running RC911's firmware? Blacky's Boy Tricopter Drones 3 Sep 28, 2016 01:04 PM
Sold KK2 Pre-LOADED WITH AWSOME FIRMWARE KK2.0 V 1.6++ REV3 By KK modified by RC911 beachflyer Aircraft - Electric - Multirotor (FS/W) 1 Dec 19, 2014 04:46 PM