Thread Tools
This thread is privately moderated by Steveis, who may elect to delete unwanted replies.
Dec 30, 2013, 12:05 PM
AVR Dude
Discussion

KK2.1 V1.11S2 Firmware


HW Version 2.1
SW Version 1.11S2 With Spektrum (R) Satellite Support
Steveis

Self level now working but you really need to run with a gyro setting of 250 or 500 if you want to use it. Any higher and it works but will probably let you flip and roll. I couldn't get it working as I wanted at 1000 and 2000 degrees per second as the numbers got too small for the 8.24 maths.

Changes since HK V1.6 for KK2.1

Default MPU6050 settings now 500 deg/sec and 4g which are close to KK2.0 so P&I and Stick Scale values should be close to those used on KK2.0

If you fly aggressive acro, you will need to increase the gyro rate to 2000 deg/sec and multiply up the P&I settings by a factor of 4.

Warnings:

i) Firmware will reset all settings
ii) P&I gains need to be changed if you change the MPU6050 setting (See Note 2 below)

Critical bug(s) corrected:

i) Corrected pin assignment for Output 5 and Output 6
ii) Initialisation settings didn't get written to the MPU6050 so it was stuck on 250 deg/sec and 2g

Minor bug(s) corrected:

i) Updated KK1_6_MPU6050 to remove unused code for menu button press (thanks RC911)
ii) Updated KK1_6_MPU6050 to correct Meny code to disable OCR1A and B interrupt (thanks RC911)
iii)Changed/Corrected I2C routines so they actually work now
iV) Tidied up I2C routine for burst reading of sensor data
v) More accurate battery voltage - adjusted to read the same as my KK2.0 (thanks HappySundays)
vi) Corrected low voltage alarm calculation
vii)Correct constants are now used in imu.asm and trigonometry.asm depending on acc and gyro setting so no problems with self level
viii)Stick Scaling does not need to be modified (except for fine tuning) when changing gyro rate
ix) RC911 bug fix in the Number Editor (original firmware) that allowed setting a value to zero (CLR) when the lower limit was higher.
x) RC911 bug fix in the original firmware that kept the "Link Roll Pitch" flag from being updated until the user returned to the SAFE screen.

Addition(s):

i) Debug Menu (added back) plus some extra values displayed
ii) Version Menu
iii)Sensor Max Min Menu (records max and min gyro and acc values when armed and SL is off)
iv) MPU6050 Settings Menu (view and change gyro deg/sec, acc g and digital low pass filter - see Note 3 below)
v) MPU6050 Temperature shown on SAFE screen
vi) Receiver Sliders Menu that shows you the msec value and sliders for the receiver inputs - for info, not calibrated
vii)Output Sliders Menu that shows you the msec value and sliders for the motor/servo outputs - for info, not calibrated
v) Acc Bubble Level Menu for accelerometers
vi) Gyro Bubble Level Menu for gyros (could be good for dynamic balancing)
vii)Added support for Spektrum (R) Satellite and clones (See Note 1 below)
viii)Configurable accelerometer software filter in Misc Settings (See Note 4 below)

Changes in operation:

i) Defaults to AUX for Self Level On/Off
ii) All mixing resets to zero when you do a factory reset so you have to select a motor layout
iii)Changed default stick scaling and default P&I gains for default MPU6050 settings
iv) See note 5 below for self level settings

Note 1 (Many thanks to David Thompson of OpenAero(2) fame for this feature)

Supports Spektrum(R) satellite with Tarot cable
Tested with Spektrum AR7/8000 DSM2 satellite and Orange R100 Satellite
Only supports 10 bit with all data in 1 frame
Only supports 7 channels
Uses Throttle input for Tarot cable
Hold buttons 2&3 on power up to enter binding mode
If you switch between CPPM, Sat or normal receivers, power cycle the KK2.1
Debug lists 16 frame bytes from satellite - you'll know if there are 2 frames of data (so bind again).
KK2.1 Settings: -
You will need to set "Sat or CPPM" to "Yes" in Mode Settings
You will need to assign the channels correctly in Sat-CPPM Channels as A=2,E=3,T=1,R=4,Aux=5

Note 2

The default PI settings are for a gyro setting of 500 dps. If you change to: -
2000 dps, multiply P&I values by 4
1000 dps, multiply P&I values by 2
250 dps, divide P&I values by 2
I have left it like this as it allows better resolution for tuning at 2000 dps.
However, I have now set the defaults to better reflect the KK2.0 settings for beginners.
Be very careful with the Self Level P gain value. Start at default and make very small changes.
Do not change P&I limits. They should remain the same.

Note 3 (MPU Settings)

Set gyro rate and acc rate high if you like acro and low if you like sedate/fpv flying
If you exceed the gyro rate when flying, it will spin/flip/roll really fast.
Set the filter to a lower value to filter out vibrations in your frame - try to leave on default if you can as too low slows the control loop down and results in oscillations.

Note 4 (Acc Software Filter)

Default is 8. Best to leave this as it is.

Note 5 (Self level)

Self level works best at 250 deg per second and reasonably well for 500 deg per second. At 2000 deg per second, it sort of works but you could loop and roll.
The gyros are used for calculating changes in angles in the SL algorithm however, the higher rate gyro settings result in very small numbers that are too small for the accuracy of the 8.24 and 16.8 maths registers.
Last edited by Steveis; Jan 28, 2014 at 01:40 PM.
Sign up now
to remove ads between posts
Dec 30, 2013, 04:14 PM
Registered User
Many thanks for the update my quad is flying much much better now. I am new to the multirotors and have yet to fly my home built quad outdoors as the weather is poor, however the new firmware has improved the handling indoors!

Cant wait to get it outside and fly in some open space
Last edited by Guncopter; Dec 30, 2013 at 05:50 PM.
Dec 31, 2013, 04:38 AM
Firmware Fiend
The Quasar's Avatar
Hey Steveis,

Thanks again!! I'm gonna be flashing the new FW shortly. Is there a significant difference in SL performance between 500dps and 250dps? Should I adjust to 250dps and 4g to extract the best performance from the SL? Thanks.
Last edited by The Quasar; Dec 31, 2013 at 03:17 PM.
Dec 31, 2013, 08:56 AM
I'm going flying..........
rpmrpm's Avatar
Subscribed.
Jan 01, 2014, 08:33 AM
Long Island, NY
First off, Happy New Year to all, and a huge thanks to all those whose monumental efforts have contributed so much to the safety and utility of the KK2 flight controller. Props to you all!

I've run into a problem I hope has an easy solution...probably staring me right in the face, but, as a first-time firmware flasher, I'm stumped. I've downloaded and unpacked the latest hex file for the KK2.1 board, KK2V1_1V11S2. I run the flashtool with my USBasp dongle (green light, driver installed), and have properly selected the hex file. When I attempt to perform the firmware upgrade I get the following message in red:

"Device Signature 0x1e960a
Expected Signature for Atmega 324PA is 1E 95 11"

Then it suggests I double check and run it with an -F option (as if I knew how!) to over ride the check. I'm obviously not going to do that because some VERY smart people put that warning there for a reason.

Would someone kindly tell me where I've gone wrong?

Thanks in advance.
Jan 01, 2014, 08:38 AM
AVR Dude
Download the latest LazyZero programmer and select KK2.1. You have selected KK2.0. Your version may not have the KK2.1 as an option.
Jan 01, 2014, 08:43 AM
Long Island, NY
You are right, it doesn't...but I didn't think that mattered. (DUH!). The only "later" version is a beta...which I was loath to utilize. Guess I'll have to put my trust in you brilliant folks.

BTW...just not saying that lightly. You fellas are stunningly, and amazingly talented. I'm 60 years old (and reasonably clever) but what you guys can accomplish with this code is astounding. My sincerest gratitude.

EDIT: It worked!!!!!! Thank you once again!!!!

Frank
Last edited by LawyerFrank; Jan 01, 2014 at 08:59 AM.
Jan 01, 2014, 09:06 PM
Firmware Fiend
The Quasar's Avatar
V1.11S2 is sweet!! Did hardly any adjustments, and my quad hovers very still. Great work, Steveis!! Loving the new MPU settings; fits my style of flying well. Was hesitant to upgrade at first because v1.10 was so dialed in on my quad, but v1.11S2 is even better. SL feels butter-smooth and locked in. Thanks!!
Jan 02, 2014, 08:15 AM
Rick
hammer833's Avatar
Thanks Steveis for all your hard work, it's a great Christmas present for all of us multirotor guys. It's guys like you that make the KK2.1 board the super $ value that it is. I have one question. Dose V1.11S2 firmware have camera gimbal support?
Thanks again Steveis
Jan 02, 2014, 08:22 AM
AVR Dude
Quote:
Originally Posted by hammer833
Dose V1.11S2 firmware have camera gimbal support?
It should work but I've not tested it.
Jan 02, 2014, 08:39 AM
Rick
hammer833's Avatar
Quote:
Originally Posted by Steveis
It should work but I've not tested it.
OK thanks Steveis, I'll give it a try this weekend and let you know.
Jan 02, 2014, 09:25 AM
Registered User

Confused


Hello. I am trying to download the 1.11 FW and it keeps saving as a .php file. I am not seeing a .zip file for it anywhere. Could somebody please let me know what I should be saving and how to add it to the flash program? Thanks in advance.

Also, I should have said, the repository has V1.9 and V1.10 but not V1.11. That is where my problem is. Thanks again.
Last edited by jamiehainey; Jan 02, 2014 at 10:19 AM. Reason: addition to question
Jan 02, 2014, 11:25 AM
Firmware Fiend
The Quasar's Avatar
Quote:
Originally Posted by jamiehainey
Hello. I am trying to download the 1.11 FW and it keeps saving as a .php file. I am not seeing a .zip file for it anywhere. Could somebody please let me know what I should be saving and how to add it to the flash program? Thanks in advance.

Also, I should have said, the repository has V1.9 and V1.10 but not V1.11. That is where my problem is. Thanks again.
Hey Jaime,

Just click on the link for the v1.11S2 zip file in the signature line of any of Steveis' posts. When prompted, save the .zip file, and extract it to somewhere you'll remember. Make sure you have the V0.76 Beta of the KKFlashTool. Open the KKFT and select the proper programmer and FC. Now, click the File tab next to the Repository tab in the firmware selection section. Browse for the hex file that you extracted, select it, then click the green running man button. Assuming you have everything plugged in properly, it should take around one minute to flash, so don't touch anything until it's done (it has to read, write, then read again). Don't forget to run the ACC calibration before you try to arm your KK2.1. Also, do the ESC calibration if you hadn't done so previously.
Jan 02, 2014, 11:35 AM
Registered User
Thank you Quasar, but that is where the problem lies. When I click on the link and try to save-as, it saves a file named "showatt.php". So I don't understand why it is not saving it as the .zip file????
Jan 02, 2014, 11:38 AM
Registered User
I got it Quasar. For some reason I just had to rename the file, then it allowed me to unzip it. Thank you for your help!