SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Sep 07, 2012, 10:23 AM
M Griffith
Ecuador, Tungurahua
Joined Jun 2012
57 Posts
Quote:
Originally Posted by dart50 View Post
I'm writing my own software for HK kk 3.0 for last 2 months. Never saw any problems with oscillator frequency or stability (can anyone explain me how oscillator instability can harm flight characteristics?).
I have been running an i86 (internal oscillator) with F20A ESCs (external oscillator) On cold days I don't quite get full throttle and sometimes I have to re-calibrate in order to re-arm.

From what I have read out of the factory the internal oscillator is %10 accurate. and it varies with voltage and temperature. It is possible to calibrate it so it is 1% accurate but I don't think anyone bothers as it is easier to slap on a crystal.
pprioverde is offline Find More Posts by pprioverde
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 07, 2012, 03:51 PM
DART
Ukraine, L'vivs'ka, L'viv
Joined Aug 2012
28 Posts
Quote:
Originally Posted by pprioverde View Post
I have been running an i86 (internal oscillator) with F20A ESCs (external oscillator) On cold days I don't quite get full throttle and sometimes I have to re-calibrate in order to re-arm.

From what I have read out of the factory the internal oscillator is %10 accurate. and it varies with voltage and temperature. It is possible to calibrate it so it is 1% accurate but I don't think anyone bothers as it is easier to slap on a crystal.
you are right - 10%
I was never flying outdoor so never saw problems.
anyways quick in filed reciever/ESC recalibration should fix all problems.
dart50 is offline Find More Posts by dart50
Reply With Quote
Old Oct 17, 2012, 01:14 PM
Registered User
Joined Oct 2012
1 Posts
can we use at atmega 168

i'm using hobbyking multi-rotor control board v2.1..i also want to use arduino software to program control board v2.1 but the board are using atmega 168pa.. can we hack the board v2.1 like you hack the board v3.0..
izzykiller89 is offline Find More Posts by izzykiller89
Reply With Quote
Old Oct 19, 2012, 10:56 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
Quote:
Originally Posted by dart50 View Post
I'm writing my own software for HK kk 3.0 for last 2 months. Never saw any problems with oscillator frequency or stability (can anyone explain me how oscillator instability can harm flight characteristics?).
I think it will be able to fly even with Arduino. However that software will never be a best performer (maybe there will be not enough CPU speed to handle accelerometer/Bluetooth/GPS/etc.) but it is not needed if you just want to learn programming.
And you can always rewrite your SW without Arduino libraries if you want to make it run faster.
Nah...The stability Is not such a great problem..but when It comes to making the HK board compatible with all kinds of servo's (Digital and analog alike)..the designer faces timer stability issues causing servo jitter.....this can be reduced by applying a certain amount of software filtering....like what has been done with the kk2..but even that requires some tuning depending on what kind of servo's you use..which is not possible with the simple KK board ...also using an internal OSC often leads the MCU's timer's to experience a slight amount of drift in their operational frequencies with temp changes...It may not essentially create any problem for the operation of the MCU but an external OSC is more preferred ....
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 11:22 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
Quote:
Originally Posted by pprioverde View Post
Absolutely, ardupilot and ardupilot-mega run on the Atmega328 and 2650 respectively. They both use Arduino and do far more than just multirotor control.

As long as you avoid floats and divides your Arduino code should perform plenty fast enough. Use hardware PWM, not software PWM for the esc's and use interrupts to capture your rc data.
Ardupilot has good libraries for this, there is even a PID library with examples.
Yeah that's what I was saying all along...I Want to learn to create multicopter stabilization code...so the HK KK board Proves to be a very cheap solution with everything already on the board to help me fly..I dont want to use the ready made ...kk code...I want to do It Myself using C and arduino..as I dont know how to use assembly...my only choice would be to use the easy to use arduino IDE..now as this board is compatible to use with this IDE ...I can fool around and create some code to atleast drive the motors and the servo's..as demonstrated in the first post..then moving on I would like to visualize the sensor output using the aduino IDE...after that I would like to use kinematical algorithms like DCM and PID to processs the sensor Input and then give the output to motors or servo's to stabilize my craft...everyone is familiar with these steps... but when it comes to actually creating a piece of stabilization code..there are very less people who can do that...Now to take baby steps into this domain..I know how to use Embedded C and Arduino also most of us know that Arduino uses the same atmega 8,48,16,328 MCU's..also the multiwii codes are made using this hardware..even though they use an external osc....we can still use the 8MHz internal Osc and write a basic arduino or C code to use basic piezo gyros to stabilize a multirotor craft....If there is anyone out there who has made progress in this domain....either using Custom C or arduino code..or using the APM libraries...to stabilize a multirotor then this would be truly promising for new entrants who want to actively contribute as coders rather than being passive user's of ready made firmware....I hope that hits the point home about what I hope to expect from this thread...
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 11:24 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
Quote:
Originally Posted by izzykiller89 View Post
i'm using hobbyking multi-rotor control board v2.1..i also want to use arduino software to program control board v2.1 but the board are using atmega 168pa.. can we hack the board v2.1 like you hack the board v3.0..
I dont think that would be a problem as the only difference between the 2 MCU's is the available onboard EEPROM..
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 11:37 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
Quote:
Originally Posted by pprioverde View Post
Absolutely, ardupilot and ardupilot-mega run on the Atmega328 and 2650 respectively. They both use Arduino and do far more than just multirotor control.

As long as you avoid floats and divides your Arduino code should perform plenty fast enough. Use hardware PWM, not software PWM for the esc's and use interrupts to capture your rc data.
Ardupilot has good libraries for this, there is even a PID library with examples.
What is Hardware PWM???
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 11:59 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
hey pprioverde..Sorry to go off topic but how the hell did you do that PS 2 thingy with the turnigy 9X....I am really interested...where's the build log
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 12:04 PM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
http://code.google.com/p/simplo/
this link is something easy to understand for those wanting to create their own multirotor firmware ...i hope this will help..
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Oct 19, 2012, 11:25 PM
M Griffith
Ecuador, Tungurahua
Joined Jun 2012
57 Posts
Quote:
Originally Posted by Akcopter View Post
hey pprioverde..Sorry to go off topic but how the hell did you do that PS 2 thingy with the turnigy 9X....I am really interested...where's the build log
Chance for a plug . Its all here on my website,

http://www.rchacker.com/projects/tur...h-ps2-joystick
pprioverde is offline Find More Posts by pprioverde
Reply With Quote
Old Oct 19, 2012, 11:34 PM
M Griffith
Ecuador, Tungurahua
Joined Jun 2012
57 Posts
Quote:
Originally Posted by izzykiller89 View Post
i'm using hobbyking multi-rotor control board v2.1..i also want to use arduino software to program control board v2.1 but the board are using atmega 168pa.. can we hack the board v2.1 like you hack the board v3.0..
Hey Izzy, I don't have the board so I cannot test it, but try this.

Make the same variant as above and use the following boards.txt file.
It is the same as the nano with the bootloader stuff taken out and the names changed.

hobbyking_2v1.name=Hobbyking v2.1 ATmega168
hobbyking_2v1.upload.protocol=arduino
hobbyking_2v1.upload.maximum_size=14336
hobbyking_2v1.upload.speed=19200

hobbyking_2v1.build.mcu=atmega168
hobbyking_2v1.build.f_cpu=16000000L
hobbyking_2v1.build.core=arduino
hobbyking_2v1.build.variant=hobbyking_v3

If it works for you ill add it to the howto.
pprioverde is offline Find More Posts by pprioverde
Reply With Quote
Old Oct 19, 2012, 11:49 PM
M Griffith
Ecuador, Tungurahua
Joined Jun 2012
57 Posts
Quote:
Originally Posted by Akcopter View Post
What is Hardware PWM???
The Atmega datasheets explains all but its hard going, even if you are coding with Arduino it is worth a read.

Basically you set up the timer(s) to put out a PWM signal and it leaves the MCU free to do other stuff. Software is writing code that the MCU handles to turn a digital pin on and off.

You might just be able to use AnalogWrite in arduino to spit out your PWM signals. Although the resolution might not be enough. http://arduino.cc/en/Reference/AnalogWrite

Did I mention the APM libraries? If I were doing it that is what I would use. They go a little deeper than the standard arduino code.
pprioverde is offline Find More Posts by pprioverde
Last edited by pprioverde; Oct 19, 2012 at 11:54 PM.
Reply With Quote
Old Nov 19, 2012, 05:53 PM
Registered User
Joined Mar 2004
175 Posts
Quote:
Originally Posted by pprioverde View Post
Hey Izzy, I don't have the board so I cannot test it, but try this.

Make the same variant as above and use the following boards.txt file.
It is the same as the nano with the bootloader stuff taken out and the names changed.

hobbyking_2v1.name=Hobbyking v2.1 ATmega168
hobbyking_2v1.upload.protocol=arduino
hobbyking_2v1.upload.maximum_size=14336
hobbyking_2v1.upload.speed=19200

hobbyking_2v1.build.mcu=atmega168
hobbyking_2v1.build.f_cpu=16000000L
hobbyking_2v1.build.core=arduino
hobbyking_2v1.build.variant=hobbyking_v3

If it works for you ill add it to the howto.
I tried this one and it works, need to change to atmega168p instead :
hobbyking_2v1.name=Hobbyking v2.1 ATmega168
hobbyking_2v1.upload.protocol=arduino
hobbyking_2v1.upload.maximum_size=14336
hobbyking_2v1.upload.speed=19200

hobbyking_2v1.build.mcu=atmega168p
hobbyking_2v1.build.f_cpu=16000000L
hobbyking_2v1.build.core=arduino
hobbyking_2v1.build.variant=hobbyking_v2
shadowless is offline Find More Posts by shadowless
Last edited by shadowless; Nov 19, 2012 at 06:55 PM.
Reply With Quote
Old Nov 20, 2012, 07:27 AM
Registered User
Akcopter's Avatar
Joined Apr 2012
535 Posts
anybody made some progress here????
Akcopter is offline Find More Posts by Akcopter
Reply With Quote
Old Nov 21, 2012, 10:58 PM
M Griffith
Ecuador, Tungurahua
Joined Jun 2012
57 Posts
I'm not going any further with this board for now.
pprioverde is offline Find More Posts by pprioverde
Last edited by pprioverde; Nov 21, 2012 at 10:59 PM. Reason: because I can
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Help with HobbyKing Multi-Rotor Control Board V2.1 (Atmega168PA) rpscarlets2294 Multirotor Talk 3 Nov 04, 2013 02:29 AM
Discussion !!NEW!! HobbyKing Multi-Rotor Control Board V3.0 ishaan65 Multirotor Talk 8 Jul 25, 2012 05:36 AM
Question Quad Build Using HobbyKing Multi-Rotor Control Board V3.0 (Atmega328 PA) SJackson Multirotor Talk 27 Apr 30, 2012 09:51 PM
Discussion Direction of flight on quadrocopter with KKMulticontroller V5.5 Controller Board Darn Servo ! Multirotor Talk 4 Apr 17, 2012 10:31 PM