HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old May 27, 2013, 01:31 PM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Discussion
KK2 zmod - A modification with HoTT support

Hi guys,

I made some modifications to the great KK2 firmware (1.6).

Latest Mod. version: 0.4

Please use this thread to discuss, provide feedback, request features and report bugs. Thank you!

Hint:
When your receiver is powered from the KK2, you're using HoTT telemetry and you don't have good BECs, it might happen that your power supply has some voltage drops. The KK2 might perform a reset caused by the brown-out detection (by default ~4.3V). Thus make sure you have a stable power supply or supply the receiver and KK2 independently.


Additional Features:
  • Camera Pitch and Roll with RC (CPPM / SUMD mode only)
  • HoTT Telemetry data transmission (Voltage and Flight-Time - CPPM / SUMD mode only)
  • HoTT SUMD signal from receiver (digital signal with 10ms cycle instead of 20ms)

Abandoned Features:
  • Motor Layout Loader

Other changes:
  • When the board is armed, servos are controlled even if throttle is zero (helpful when configuring your camera gimbal)
  • Failsafe values in SUMD mode are used as long as a more or less harsh landing is detected. Then it will disarm automatically. However, use failsafe values in your receiver at your own risk and always make sure the values will cause the copter to descend

Q&A:

Are my settings of Version 1.5 or 1.6 compatible with this firmware?
No!
However, with the help of the tools avrdude and srecord it is possible to convert everything to be compatible with this mod. You can find both tools with Google.
  1. Extract the file patch_1v6_zmod.dat, which is found in the zip.
  2. Open a command window and cd to the directory where the patch_1v6_zmod.dat is stored
  3. Read EEPROM (assuming USBasp programmer)
    avrdude -c usbasp -p m324pa -U eeprom:r:kk2_1v6.eep:i
  4. Convert to zmod compatible data
    srec_cat @patch_1v6_zmod.dat
  5. Write EEPROM (assuming USBasp programmer)
    avrdude -c usbasp -p m324pa -U eeprom:w:kk2_1v6_zmod.eep:i

My CPPM does not work with this modification, why?
This firmware requires you to connect the CPPM signal to the THR connector. It also supports the HoTT SUMD signal on this connector, if configured in the settings.

Why are all this new features only available with CPPM / SUMD signal?
With CPPM / SUMD more channels than the five connectors are available, which are needed for the Camera Pitch and Roll functions. Since the HoTT Telemtry data needs the AIL and ELE connector, HoTT Telemetry can only be used with a configured SUM signal.

How to connect the KK2 to the HoTT receiver for telemetry data?
You need a Y-cable to connect the telemetry port of the HoTT receiver to the AIL and ELE connectors.

How to load another motor layout?
If you switched from the original KK2 firmware, your layout is kept and will not change with a Factory Reset.
If you need to change the motor layout, it can be loaded by writing an .eep file into the EEPROM. It is planned to provide these files for all the selectable layouts soon. Alternatively the Mixer Editor is still available for manual configuration.


History:

Changes in Mod. version 0.4
  • Improved SUMD signal interpretation.
  • The Cam Pitch Offset was not used correctly in Safe state. Now it is.
  • Low Servo Rate is 50Hz instead of 80Hz (better compatibility to analog servos)
  • PWM signal generation now relies on a timer which generates a more accurate signal. This is important if SUMD mode and/or HoTT telemetry is used, which makes use of interrupts. This also fixes an issue with shaking servos.

Changes in Mod. version 0.3
  • Fixed issue in case of failsafe on SUMD signal. Now the failsafe signal is correctly used.
zerush is offline Find More Posts by zerush
Last edited by zerush; Aug 01, 2013 at 03:17 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old May 27, 2013, 03:16 PM
Lead Zeppelin
Germany
Joined Apr 2013
91 Posts
A lot of exciting stuff happening with HoTT. I'm very glad I bought an MX16.
Now I need to buy a KK2 board and do a lot of reading.
Danke sehr!
flugratz is offline Find More Posts by flugratz
Reply With Quote
Old Jun 06, 2013, 03:52 PM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Just uploaded the new version 0.3.
In 0.2 there was a problem with the SUMD signal in case of failsafe of the receiver.

Before all settings were handled like mode "Off", which caused the KK2 to cut motor power.
Now the modes "Hold" or "Failsafe" (e.g. pre-defined failsafe values) are recognized correctly.

Somewhen in future I will use the failsafe bit to try to land the copter independently from the failsafe values, but no schedule on this yet...
zerush is offline Find More Posts by zerush
Reply With Quote
Old Jun 13, 2013, 01:37 AM
Master of Flash
LazyZero's Avatar
Alsdorf/Eifel, Germany
Joined Jun 2005
1,552 Posts
Hi drop me a PM when you think the firmware is ready for the "masses" and I will add it to the flashtool. Also there is then the possibility to include the EEprom files.

Best Christian
LazyZero is offline Find More Posts by LazyZero
Reply With Quote
Old Jun 17, 2013, 01:41 PM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
A few days ago my Quadcopter crashed, because all motors stopped during flight.

After analyzing log files for a very long time, I came to the conclusion that the KK2 ran into brown-out (low voltage reset).
My HoTT receiver had 100% signal quality, but the signal strength went down. So it had to increase the transmitting power for the telemetry data. Since the BECs in the ESCs are not the best, the voltage was around 4.6~4.8V and short before the time of the crash below 4.4V.
The KK2 has by default a brown-out detection of ~4.3V. Even a very short time of undevoltage and it performs a reset, causing the Quadcopter to crash.

Thus I recommend to set the brown-out detection to 2.7V.
Another way is to remove the red cables from the Receiver<->KK2 connection and power the receiver by another BEC, independently from the KK2
zerush is offline Find More Posts by zerush
Last edited by zerush; Jun 23, 2013 at 01:39 AM.
Reply With Quote
Old Jun 18, 2013, 08:25 AM
Master of Flash
LazyZero's Avatar
Alsdorf/Eifel, Germany
Joined Jun 2005
1,552 Posts
Firmware v03 is now in the repository of the flashtool. A new release of the flashtool will follow to reprogram the brown-out.

Best Christian
LazyZero is offline Find More Posts by LazyZero
Reply With Quote
Old Jun 19, 2013, 03:04 AM
Master of Flash
LazyZero's Avatar
Alsdorf/Eifel, Germany
Joined Jun 2005
1,552 Posts
Just uploaded a new beta with support to set the brownout to 2.7V. Select the kk2.0 board with brownout setting to 2.7V
LazyZero is offline Find More Posts by LazyZero
Reply With Quote
Old Jun 19, 2013, 07:29 AM
Master of Flash
LazyZero's Avatar
Alsdorf/Eifel, Germany
Joined Jun 2005
1,552 Posts
KapteinKuk just replyed to my announce of the new feature in the kk2 thread:

Quote:
Originally Posted by kapteinkuk View Post
According to the datasheet for the Atmega324PA, minimum VCC for 20MHz operation (as in KK2) is 4.5V
Setting BOD to 2.7V because of brown-outs on 4.3V may be stretching it a bit.
I would rather fix the power supply problem.
I think he is right with his position that the chip only works reliable @20MHz down to 4.5V
Now the question is to remove the mode again or to point the user on better power supply?

Christian
LazyZero is offline Find More Posts by LazyZero
Reply With Quote
Old Jun 19, 2013, 02:23 PM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Yeah that is true. The datasheet says for 20 MHz the safe area is 4.5V and above.
Now the question is, would it be better to "risk" a wrong behaviour by going below this or just reset the board (which causes a uncontrolled crash for sure).

In my opinion it makes sense to "risk" this. Also we are talking about a few microseconds below 4.4V.

Of course the genreal best concept is to get a stable power supply!
zerush is offline Find More Posts by zerush
Reply With Quote
Old Jun 20, 2013, 02:32 AM
Enjoying the sunshine
HappySundays's Avatar
Australia, NSW, Sydney
Joined Feb 2011
2,906 Posts
It doesn't matter how many microseconds it is below 4.5V, it is not guaranteed to function at all.
It might potentially lock up and NOT reset, which is the entire reason for a brown-out detector.
Mr. KK very specifically set the BOD to 4.5.
A much better solution is to use an entirely different power source for M1 and the RX side, one that produces 5V or better, 5.5V - no more, no less.
Then, use M2 to M5 instead of M1 to M4 as motor outputs, reprogram the mixer to suit.
Done - no more brownouts.
HappySundays is offline Find More Posts by HappySundays
Reply With Quote
Old Jun 23, 2013, 01:49 AM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Quote:
Originally Posted by HappySundays View Post
It doesn't matter how many microseconds it is below 4.5V, it is not guaranteed to function at all.
It is not guaranteed, but there is a chance that it will work.

If it performs a reset during the flight, it will crash pretty sure.
First it will boot up not armed and the pilot has to arm again (after realizing that the board performed a reset).
If after this time (2 seconds maybe) your copter is still in the air, it might do weird things because the gyros have calibrated wrong during uncontrolled movement.

At the end I agree with you: The only real solution is to get a stable power supply. Maybe independent for receiver and KK2.
zerush is offline Find More Posts by zerush
Reply With Quote
Old Aug 01, 2013, 10:08 AM
Registered User
Joined Aug 2013
1 Posts
Telemetry: Why AIL and ELE connectors?

Hi,
can someone explain why two output pins from the KK 2.0 are used to output the telemetry data?
I just wondering because one should be enough! From my feeling it could maybe damage the KK board if two output pins are connected...

Thanks in advance!

cu
neumo
neumo is offline Find More Posts by neumo
Reply With Quote
Old Aug 01, 2013, 02:53 PM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Quote:
Originally Posted by neumo View Post
Hi,
can someone explain why two output pins from the KK 2.0 are used to output the telemetry data?
I just wondering because one should be enough! From my feeling it could maybe damage the KK board if two output pins are connected...

Thanks in advance!

cu
neumo
The both Pins are the RX and TX pins of the microcontroller. Since the telemetry protocol is a simple UART protocol, it is the easiest way to use this unit of the microcontroller.

The software handles which pin has to be activated for Reading/Writing, so no worries to connect them.

To understand the telemetry:
The reciever first sends some bytes. He "asks" for fresh telemetry data. Then the KK2 has to answer with the data.
This is why reading and sending is needed.


By the way I will upload Version 0.4 later this evening.
It has some bug fixes regarding camera stabilization in combination with the SUMD signal.
zerush is offline Find More Posts by zerush
Reply With Quote
Old Dec 29, 2013, 09:27 AM
Registered User
Slovenia, Ljubljana
Joined Oct 2012
11 Posts
Hello,

Great stuff for Hott users!

One question. Has this FW option of differential mixing for SSG (http://www.rcgroups.com/forums/showthread.php?t=1793759)

I have a kk2.0 Quadro with SSG and Mx12HOTT .... with traditional wiring, but will go on one wire SUMD signal.
Opelpower is offline Find More Posts by Opelpower
Reply With Quote
Old Jan 04, 2014, 10:55 AM
Registered User
zerush's Avatar
Germany, HE, Frankfurt
Joined Apr 2013
35 Posts
Quote:
Originally Posted by Opelpower View Post
Hello,

Great stuff for Hott users!

One question. Has this FW option of differential mixing for SSG (http://www.rcgroups.com/forums/showthread.php?t=1793759)

I have a kk2.0 Quadro with SSG and Mx12HOTT .... with traditional wiring, but will go on one wire SUMD signal.
Hi Opelpower,

at the moment it does not support the SSG.

Currently I don't know, wheter or not I will support it in future, sorry.

I will keep it on my list, and when I get some time I will check how much effort is needed to implement this.
zerush is offline Find More Posts by zerush
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! Need Help With Wingtip Modifications TalkToMeGoose Electric Plane Talk 11 May 11, 2013 10:58 AM
Sold Graupner Hott MX-20 with telemetry sensors Steph280 Aircraft - General - Radio Equipment (FS/W) 5 May 04, 2013 12:48 PM
Sold NIB-Graupner HOTT 2.4 mx-12 with receiver $199 + S&H unclegeorge Aircraft - General - Radio Equipment (FS/W) 2 Mar 30, 2013 11:41 AM
Discussion DJI 450 Board Support the Hobbyking KK2.0 Controller? Fidy$Trainer Multirotor Talk 6 Oct 25, 2012 01:03 PM