SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Jan 05, 2013, 01:38 AM
Registered User
Canada, BC, Coquitlam
Joined Dec 2009
442 Posts
Hey noobee,

Just coming here to say hello and let you know I have a V2 with all the apropriate cables and USB adapter for flashing fw when you have something ready for testing.

Cheers
Minimog is offline Find More Posts by Minimog
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 05, 2013, 08:57 AM
Registered User
United States, NC, Raleigh
Joined Oct 2011
788 Posts
Frame Rates

Today I tried a DX8 and AR8000 receiver setup with an 11ms frame rate. We know that the RX3S takes about 18ms to construct and emit the 4 serial outputs so I had concern about this working.

I only tried one channel, aileron. What I found was that the RX3S appears to ignore inputs that occur while it is still working on constructing and emitting an output frame, half of the input pulses are just discarded. Thus the 11ms frame rate is back to 22ms for all servos connected to the RX3S.

11ms input does not seem to hurt anything, but why bother.

John
JohnRB is offline Find More Posts by JohnRB
Reply With Quote
Old Jan 05, 2013, 09:09 AM
Registered User
United States, NC, Raleigh
Joined Oct 2011
788 Posts
Reversing

I have not spent any time on this, just an observation and I could be wrong.

The RX3S seems to always apply the error correction the same way. Reversing a channel on the RX3S to get the error correction applied in the proper direction also requires you to reverse the direction in the transmitter (assuming everything was working properly without the RX3S connected).

It seems to me the reversing switches should alter the method of applying the correction (such as change from adding to subtracting pulse time) without requiring a matching change in the transmitter. There must be some reason it was done this way.
JohnRB is offline Find More Posts by JohnRB
Reply With Quote
Old Jan 05, 2013, 12:28 PM
Registered User
florida
Joined Nov 2002
178 Posts
How do you open "open the generated hex file FlightStab.cpp.hex" in extreme burn?
flightdeck is online now Find More Posts by flightdeck
Reply With Quote
Old Jan 05, 2013, 02:28 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
788 Posts
Quote:
Originally Posted by flightdeck View Post
How do you open "open the generated hex file FlightStab.cpp.hex" in extreme burn?
File->Open Flash and select proper file.

Do you plan on programming a V1 device?
JohnRB is offline Find More Posts by JohnRB
Reply With Quote
Old Jan 05, 2013, 03:49 PM
wjs
William
United States, MI, Brighton
Joined Oct 2012
1,957 Posts
Quote:
Originally Posted by JohnRB View Post
Today I tried a DX8 and AR8000 receiver setup with an 11ms frame rate. We know that the RX3S takes about 18ms to construct and emit the 4 serial outputs so I had concern about this working.

I only tried one channel, aileron. What I found was that the RX3S appears to ignore inputs that occur while it is still working on constructing and emitting an output frame, half of the input pulses are just discarded. Thus the 11ms frame rate is back to 22ms for all servos connected to the RX3S.

11ms input does not seem to hurt anything, but why bother.

John
I am curious on how it is doing the pwm input reads. Is it using a seperate PIC or using interrupts on pulse edges. If using interrupts, it would seem to take a fair amount of the mpu cycles especially at 11ms. Even if using interrupts, I would guess inside the handler it is setting a Var for that channel in ms. The main loop is sleeping after writes until wait stops and it loops to read the input vars/calc/write again. Could explain the 18ms wait time. It is sort of a half async half sync pattern.
wjs is offline Find More Posts by wjs
Reply With Quote
Old Jan 05, 2013, 04:00 PM
wjs
William
United States, MI, Brighton
Joined Oct 2012
1,957 Posts
Quote:
Originally Posted by JohnRB View Post
I have not spent any time on this, just an observation and I could be wrong.

The RX3S seems to always apply the error correction the same way. Reversing a channel on the RX3S to get the error correction applied in the proper direction also requires you to reverse the direction in the transmitter (assuming everything was working properly without the RX3S connected).
ahh. This would seem to hint at a logic error (i.e. bug). It is doing the error correction on input first, then applies the rev function before output to channel. It should be reversing first, then applying correction. Maybe not. Seeing some code will tell the tail.
wjs is offline Find More Posts by wjs
Reply With Quote
Old Jan 05, 2013, 04:21 PM
Registered User
Joined Dec 2006
1,437 Posts
just returned from vacation and will look into the v2 setup.

johnrb provided useful info for me to get started. i'll also need to build a programming adapter to connect the 6 edge connectors.



Quote:
Originally Posted by Minimog View Post
Hey noobee,

Just coming here to say hello and let you know I have a V2 with all the apropriate cables and USB adapter for flashing fw when you have something ready for testing.

Cheers
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 04:24 PM
Registered User
Canada, BC, Coquitlam
Joined Dec 2009
442 Posts
Quote:
Originally Posted by noobee View Post
just returned from vacation and will look into the v2 setup.

johnrb provided useful info for me to get started. i'll also need to build a programming adapter to connect the 6 edge connectors.
I bought this adapter. I came with my order of 2 ORX V2.
http://www.hobbyking.com/hobbyking/s...dProduct=27195
Minimog is offline Find More Posts by Minimog
Reply With Quote
Old Jan 05, 2013, 04:33 PM
Registered User
Joined Dec 2006
1,437 Posts
i think it should be applying the rev on the correction only and leave the input unaffected in terms of direction.

my v1 code (has changed somewhat since then) does this:

output[] is the correction factor (which may be reversed)
final servo output ail_out2 is dependent on input ail_in + correction factor.
so ail_out2 is always in the same direction as ail_in.

Code:
    for (i=0; i<3; i++) {
      output[i] = ((((int32_t)output[i] * vr_gain[i] >> 7) * stick_gain[i]) >> 8) * master_gain >> 9;
    }

    // mixer
    int16_t tmp0, tmp1, tmp2;
    switch (mix_mode) {
    case MIX_NORMAL:
      ail_out2 = ail_in + output[0];
      ele_out2 = ele_in + output[1];
      rud_out2 = rud_in + output[2];
      break;
Quote:
Originally Posted by wjs View Post
ahh. This would seem to hint at a logic error (i.e. bug). It is doing the error correction on input first, then applies the rev function before output to channel. It should be reversing first, then applying correction. Maybe not. Seeing some code will tell the tail.
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 04:38 PM
Registered User
Joined Dec 2006
1,437 Posts
Quote:
Originally Posted by Minimog View Post
I bought this adapter. I came with my order of 2 ORX V2.
http://www.hobbyking.com/hobbyking/s...dProduct=27195
ooh, i've not tried this one. i think ckleanth has one too.

what is your usbasp programmer? since you are connecting directly to the chip, i think you need either

1. a usbasp programmer that is capable of operating at 3.3v. the reason is that the vcc (3.3v) line of the atmel chip is also connected to the gyro (itg3205), which can only operate at 3.3v.

2. disconnect the vcc line from the chip adapter and power the rx3s board through the rx. the reason is that you'll use the onboard 3.3v regulator to supply the right voltages.
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 04:43 PM
Registered User
Canada, BC, Coquitlam
Joined Dec 2009
442 Posts
Quote:
Originally Posted by noobee View Post
ooh, i've not tried this one. i think ckleanth has one too.

what is your usbasp programmer? since you are connecting directly to the chip, i think you need either

1. a usbasp programmer that is capable of operating at 3.3v. the reason is that the vcc (3.3v) line of the atmel chip is also connected to the gyro (itg3205), which can only operate at 3.3v.

2. disconnect the vcc line from the chip adapter and power the rx3s board through the rx. the reason is that you'll use the onboard 3.3v regulator to supply the right voltages.
I have this one.
http://www.hobbyking.com/hobbyking/s...dProduct=21321
Minimog is offline Find More Posts by Minimog
Reply With Quote
Old Jan 05, 2013, 04:47 PM
Registered User
Canada, BC, Coquitlam
Joined Dec 2009
442 Posts
Quote:
Originally Posted by noobee View Post
i think it should be applying the rev on the correction only and leave the input unaffected in terms of direction.
[/CODE]
That would be ideal and the way it should work.
Minimog is offline Find More Posts by Minimog
Reply With Quote
Old Jan 05, 2013, 05:03 PM
Registered User
Joined Dec 2006
1,437 Posts
seeking opinions

looking for opinions on device dip switch config for single/dual ailerons. i still plan to support v1 and v2 (since i now have both). my current plan is:

for v1:

single aileron mode = ele_sw norm, rud_sw norm
use AILR_OUT pin for AUX_IN (master gain)

dual aileron mode = ele_sw rev, rud_sw rev
use MOSI for AUX_IN
use MISO for AILR_IN
AILR_OUT remains as AILR_OUT (= AILR_IN + roll correction)

delta mode = ele_sw norm, rud_sw rev
vtail mode = ele_sw rev, rud_sw norm

for v2:

single aileron mode = all sw off (default)
AILR_OUT is a mirror of AILL_OUT

dual aileron mode A = (what sw to detect?)
use AUX_IN for AILR_IN (no remote gain possible)

dual aileron mode B = (what sw to detect?)
use one of the sw (detail_sw?) for AILR_IN (remote gain remains on AUX_IN)

delta mode = delta sw on (this precludes the single/dual aileron modes)
vtail mode = vtail sw on (this can still include single/dual aileron modes)

any suggestions on what is the simplest way to configure via dip switches? the alternate is using the stick to configure.

the current WIP code is at

https://github.com/noobee/FlightStab...FlightStab.ino

if anyone is interested..
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 05:30 PM
wjs
William
United States, MI, Brighton
Joined Oct 2012
1,957 Posts
Quote:
Originally Posted by noobee View Post
i think it should be applying the rev on the correction only and leave the input unaffected in terms of direction.
Over here switch reverses both servo direction and correction direction. I am confused on John's observation that error correction was always going the same way regardless of switch. Visually inspecting mine reverses the correction by flipping the switch and reverses servo. I am back to being confused as to why additional tx rev would be needed. Wouldn't a double rev bring us back to same place?
wjs is offline Find More Posts by wjs
Last edited by wjs; Jan 05, 2013 at 07:10 PM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold Flight Stabilization System with Programing Card Woody_99 Aircraft - Electric - Helis (FS/W) 1 Mar 23, 2012 12:50 PM
Sold Flymentor Flight Stabilization with Field Programmer Woody_99 Aircraft - General - Radio Equipment (FS/W) 0 Mar 17, 2012 07:43 AM
Sold Totally Tricked out 400 size with flight stabilization installed, BNF Woody_99 Aircraft - Electric - Helis (FS/W) 2 Mar 12, 2012 06:56 AM
Wanted FY-30A Flight Stabilization System Casey_S FPV Equipment (FS/W) 0 Mar 05, 2012 02:40 PM