HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jun 03, 2011, 01:38 AM
Registered User
Joined Oct 2005
1,659 Posts
Great work Manu.

Mike's code is getting strong by day!

Maybe I should push to get the price to the as HK but with all those enhancement? will the factory able to take it?

let me try.. if the request is strong enough.

Quote:
Originally Posted by alll View Post
Hi Tan,

How will you beat HK regarding the price?
HK has only a "simple" murata's KK-board, I agree. So newcomers will be tempted by the HK boards...? (I think they went out of stock in 1 day...)
Yours has really nice add-on's, and LVA is one!
Now that the Mike's XX software can take additional enhancements..., you should be "different"!
Please think of adding other gyro's
(I flew (same frame, same software + same settings), murata's (300/sec) and wmp (x4.5 gain, 440/sec)
Big difference!
)
PS: I am preparing a video of the KKPlus with the XX adapted firmware to use the buzzer and some additional stuff.
I had lots of weird problems with the quad / ESC bad solerings again!

manuLRK

PS: managed to get the jitter reduced on XX!

http://www.youtube.com/watch?v=ayHpD1KiCvI
dt8666 is offline Find More Posts by dt8666
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 03, 2011, 02:16 AM
Suspended Account
Joined Dec 2010
11,764 Posts
Quote:
Originally Posted by alll View Post
PS: managed to get the jitter reduced on XX!
I really like that servo-based motor testing bench.
But if you really want jitter-free output, just stop using atmega, problem solved
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Jun 03, 2011, 03:40 AM
manuLRK
Belgium
Joined Sep 2004
1,517 Posts
Damn, now i that i get my first steps into micro controllers...

Can you explain more in detail the cons?

Thanks,
manuLRK

Quote:
Originally Posted by timecop View Post
I really like that servo-based motor testing bench.
But if you really want jitter-free output, just stop using atmega, problem solved
alll is online now Find More Posts by alll
Reply With Quote
Old Jun 03, 2011, 04:07 AM
Suspended Account
Joined Dec 2010
11,764 Posts
Well, just about every modern chip these days has hardware PWM on 16bit timers...
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Jun 03, 2011, 04:10 AM
manuLRK
Belgium
Joined Sep 2004
1,517 Posts
"fast" PWM

Here an example snapshot of the PWM output.
300 and 350 Hz PWM.

manuLRK



alll is online now Find More Posts by alll
Last edited by alll; Jun 03, 2011 at 05:20 AM.
Reply With Quote
Old Jun 03, 2011, 07:47 AM
OlliW
Joined Sep 2009
1,208 Posts
Code Questions

EDIT: deleted here since i posted it in the wrong thread, sorry
OlliW is offline Find More Posts by OlliW
Last edited by OlliW; Jun 03, 2011 at 08:35 AM.
Reply With Quote
Old Jun 03, 2011, 07:54 AM
Suspended Account
Joined Dec 2010
11,764 Posts
I'll cover what I can guess:

> In ReadGyros the value of the adc is read via the two lines
gyroADC[ROLL]= ADCL;
gyroADC[ROLL]+= ((uint16_t) ADCH <<8);

It's probably leftover of the asm port, you're supposed to read low byte of adc first then high byte. ADCW is not a real register anyway, gcc will correctly assemble the code as reading ADCL, ADCH in sequence. So yes, fix it.

> In RxGetChannels, why does RxChannel need to be declared as static?
Probably because its value needs to be kept between calls to that function.

> What had been the reason for not using the hardware?
I'd guess no technical reason.
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Jun 03, 2011, 08:24 AM
manuLRK
Belgium
Joined Sep 2004
1,517 Posts
Hi,

Most of your questions will be answered searching the XX thread!

Missing an Rx pulse (on my Assan Rx see picture) you will have to wait another 20mSec ...

Regarding hardware PWM, Mike's 1.4 version is doing this already (see XX thread also)!

http://www.rcgroups.com/forums/showthread.php?t=1324621

manuLRK



Quote:
Originally Posted by OlliW View Post
Dear Mike (and the other code developers),

because of reasons which are probably not worth to be mentioned here I looked into the code, but some questions emerged which I'd like to ask, if you allow (they are not meant to criticize your excellent work, I'd just like to understand).

I refer to XXcopter software version 1.1a (from a quick check it seems that my questions would apply also to the other versions)

1) In the ISRs you are using a flag RxChannelsUpdatingFlag, which is used later on in RxGetChannels. The purpose of this flag is not clear to me.

I could guess that it has been introduced to avoid that in RxGetChannels a value is read while it is modified in a ISR. However, if this was the intention it IMHO does not work as intended (while the program is an ISR the while-loop is not executed, and it can't avoid that the program jumps into the ISR). IMHO the usual way to handle that is to enclose the critical part by a cli(); sei();. For instance
cli(); rxChannel = RxChannel1; sei();
in RxGetChannels.

What is the purpose of this flag?

2) In ReadGyros the value of the adc is read via the two lines
gyroADC[ROLL]= ADCL;
gyroADC[ROLL]+= ((uint16_t) ADCH <<8);

Is this for compatibility issues?

I mean, at least with AVR Studio one could simply write
gyroADC[ROLL]= ADCW;
(which depending on how clever the optimization works will even lead to shorter code).

3) In RxGetChannels, why does RxChannel need to be declared as static?

4) In output_motor_ppm the timer0 is started two times before the for-loop which handles setting the motor outputs to zero. Is this just a historical remainder, or if not why does timer0 has to be restarted before MotorAdjust?

5) I understand that your approach to generate the ppm motor signals is quite flexible and allows handling all sorts of multicopters easily and consistently. However, if a maximum of four ppm outputs are sufficient (bi, tri, quad), one also could use the hardware pwm ports to generate the ppm signals (to be specific OC1B on M1, OC1A on M2, OC0A on M5, OC0B on M6). This I believe would simplify the code significantly, and maybe more importantly, would allow one to generate the ppm signals without any jitter. Also, since everything is done by the hardware, you would gain another full 1 ms to do all sorts of things (such as e.g. the LVA). What had been the reason for not using the hardware?

I'd like to mention again that I, as I guess all the others here, am very thankful for your excellent work you provide here, and that my questions are not meant to take away anything from that.

Thanks a lot,
Olli
alll is online now Find More Posts by alll
Reply With Quote
Old Jun 03, 2011, 08:34 AM
OlliW
Joined Sep 2009
1,208 Posts
dear manuLRK,

sorry, yes I also just noticed that I posted that in the wrong thread, stupid me (I should not have that many windows open...)


Quote:
Missing an Rx pulse (on my Assan Rx see picture) you will have to wait another 20mSec ...
not sure I understand that

Quote:
Regarding hardware PWM, Mike's 1.4 version is doing this already (see XX thread also)!
ah, OK, thanks for the info.

I was looking at the KKMulticopter site and couldn't find the c source code of the 1.4 version there, so I guess I have to scan more carefully through XX thread.

Thx so far and sorry again,
Olli
OlliW is offline Find More Posts by OlliW
Last edited by OlliW; Jun 03, 2011 at 08:40 AM.
Reply With Quote
Old Jun 03, 2011, 09:00 AM
manuLRK
Belgium
Joined Sep 2004
1,517 Posts
The Rx pulses are following each other by a few micro seconds. If you temporarily stop the external interrupts, you are likely miss a pulse, no?

The XX thread is Mike's "The brain", port of the KK assembler to avr C.

manuLRK

Quote:
Originally Posted by OlliW View Post
dear manuLRK,

sorry, yes I also just noticed that I posted that in the wrong thread, stupid me (I should not have that many windows open...)



not sure I understand that

ah, OK, thanks for the info.

I was looking at the KKMulticopter site and couldn't find the c source code of the 1.4 version there, so I guess I have to scan more carefully through XX thread.

Thx so far and sorry again,
Olli
alll is online now Find More Posts by alll
Reply With Quote
Old Jun 03, 2011, 09:12 AM
OlliW
Joined Sep 2009
1,208 Posts
Quote:
The Rx pulses are following each other by a few micro seconds. If you temporarily stop the external interrupts, you are likely miss a pulse, no?
no, certainly not. You will only miss an interrupt if it occurs TWICE (or more often) while cli.

PS: I move to the XX thread. Thx

(and sorry again for the confusion created by my miss-posting)
OlliW is offline Find More Posts by OlliW
Reply With Quote
Old Jun 04, 2011, 07:54 AM
Suspended Account
Joined Dec 2010
11,764 Posts
dan, how about somethin like this?



50x50mm with power distro or 30x33 without, can break it off to save weight/whatever. 3D gyro, 3D accel
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Jun 04, 2011, 10:13 AM
Registered User
Joined Oct 2005
1,659 Posts
TC.. still sells at 24.95???
dt8666 is offline Find More Posts by dt8666
Reply With Quote
Old Jun 04, 2011, 10:14 AM
Suspended Account
Joined Dec 2010
11,764 Posts
Maybe if its made in China
timecop is offline Find More Posts by timecop
Reply With Quote  (Disabled)
Old Jun 04, 2011, 10:19 AM
Registered User
Joined Oct 2005
1,659 Posts
okok... lets see if i can make some miracle!! fastern your seat belt.. maybe you can consider cancel your HK order... lol...

who know... you may get what you ask for ???
dt8666 is offline Find More Posts by dt8666
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold KK Multicopter Core Board V5.5 Quadcopter and firmware loader $95 Shipped terriwang Aircraft - Electric - Multirotor (FS/W) 20 Jun 05, 2011 11:34 PM
Discussion NEW KK Multicopter Core Board V5.5 Quadcopter and firmware loader terriwang Multirotor Talk 0 May 22, 2011 09:14 PM
Gallery KK Multicopter multicontroller v5.5,330 and MK sean520 Multirotor Talk 3 Apr 03, 2011 09:47 PM
Discussion Wanted -- KK Multicopter controller // XX Controller Chris Moon Multirotor Talk 0 Feb 07, 2011 10:21 AM