Hello, I've got a problem with APM and Raptor 50 heli

I trying to set up APM on Raptor 50 with Glow engine. I connect my JR RC control to APM next variant:

 RC                             APM

 rx                           in      out 

1 trotle(pitch) ---->     3        3      

2  ailer          ---->     1        1

3 elevator      ---->     2        2

4 rudder        ---->     4        4

my transmitter sets up in "airoplane mode"

 The essence of the problem: I don't understand how set up the swash plate. On helicopter installed 90 degrees swash plate  I tried different variants of degrees setup. For example:

servo1  90      (aileron??)

servo2  0       (elevator??)

servo3  180    (pitch??) 

ailerons works normal, but elevator and pitch mix some strange.  

 please help me....

p.s. Sorry for bad English

Views: 3427

Reply to This

Replies to This Discussion

Yeah, I've been looking at the code for a while and have a general understanding of it.

I'd be prepared to put out an attempt at a fix today, but I have to answer that question about scaling.  I know how the numbers come into the function.  Pitch_out and Roll-out are -4500 to 4500.  Coll_out is 0-1000.  Coll_out_scaled is say, 200-800, depending on where you set your limits of swash travel.  But I just need to be sure what the numbers have to look like before they go out to the servos.  Is it 0-1000, -4500 to 4500, or 1000-2000?

Much of this is done in RC_Channel library, but that file is really hard to understand and not commented well so it's difficult to figure out.

I would imagine that scaling needs to be done to line those values up with the min-max ranges for the servos. Heli.pde has got to be doing that already. We just have to figure out where.

Also, where are the pitch and roll angles for the blades set for maneuvering? If theyre set on the radio like a traditional RC, there should be no issue, but if Ardupilot keeps those values, we'll have to make sure we're incorporating those.

Im not the best at coding from scratch, but I do pretty well with analyzing code, especially alongside someone like yourself who has some basic understanding. I'll go through based on our chat and see if I can't find out where everything's hiding. I have Visual Studio with the Arduino plugin now, so maybe I'll have an easy enough time figuring it out with all of VS's sexy tools.

What you want to send out depends upon the range set-up for the individual servo.  Check out the init_rc_in in radio.pde.  So for the roll and pitch servos you'll want to send out values between -4500 ~ 4500.  For channel 3 (collective pitch) you'll want to send out values between 0~1000 i think.  As you've said, you need to remove all the mixing on it's way out to the servos.


Yes, the RC_Channel library is pretty hard to understand.  I think I spent a day looking at it the first time and writing down what it did to try and figure out what it was doing.  I'd like to rewrite that thing some day.

"Yes, the RC_Channel library is pretty hard to understand" ... agree

Day 2 on it for me, was thinking of cleaning it up myself :)


      This is open source so if you do clean it up that would be greatly appreciated.

     I believe the libraries purpose in life is to transform between various possible ways to specify a servo position (i.e. pwm which is 0~1000, an RC style number which is 1000~2000 or a user defined range like -45deg ~ +45deg).  what i found confusing is that at least in the arducopter code, sometimes we put a number into "control_in" (which seems logical) but more often we put a number into servo_out which seems strange to me.  It seems like any "out" should be an output of the conversion function.

     Although it's slightly laborious normally we ask people to put dev changes into a clone and then someone on the dev team (like me or tridge) can more easily look at the change/patch and merge it into trunk.

     We have some notes on how to contribute on this wiki page although it's a bit out of date as it talks about subversion but we moved to GIT months ago.

     Anyway, no pressure, it's open source so you can do what  you like!

Actually, without fully rewriting it, just having it commented properly would be a huge help.  Explaining what each function does.

PWM = 0-1000

RC = 1000-2000

Angle = -4500 - +4500

I wasn't sure about the PWM one, so that's a big help.

Control_in and Servo_out, would love to know exactly how those work.

No problem Randy, I'll pass along code after I've done all the changes. I'm in the process of adding a new frame type, dual motor frame with pitch / yaw via servo, roll / climb via motors, AKA Ospery in heli mode.


BTW if anyone is interested, I have lastest version of Arducopter compiling fine in Visual Studio via Visual Micro.... sure makes discovering the code easy :)



Dan, that Osprey sounds really neat.  I've had a pipe dream to buy two Hobby King 450s and turn them into a tandem rotor.  It would work quite similarly.  Maybe one day.  That's one nice thing about this system is that it allows us to do things like that.

I tried using VS for a while, but I found it way too powerful which made it too complicated for me, and I was having licensing issues.  I was supposed to have gotten it free with the Website Spark thing, but it ended up the license expired after 2 months, so I gave up on it.  Using Notepad++ and like it a lot.  I have to compile in Arduino still but, oh well.

Robert, I'm using 2, 480 size motors, on 12" props, connected to a 450 size heli frame via carbon fiber tubes. It flys very nice, without any gyro or APM, just using my radio mix.


Even carrys 2, 2200 3s lipo's with no problem :)


I will video when I find our camera (damn wife), but there is simular heli on u-tube

Here you go, but mine has longer arms and bigger motors, otherwise same :)




Wow, that flies really well!

Thanks for your answers, i'm very busy in university but i  1 or 2 weeks and i will solve the problem in heli.pde   


DIY Drones Monthly


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2016   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service