HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jan 05, 2013, 05:51 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
757 Posts
Quote:
Originally Posted by noobee View Post
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.
The HK programmer has a jumper (J1) that can be remove so that programmer does not supply any power to the target. I also have another programmer I purchased in the US that has 0 Ohm resistor you can move to select 5V or 3.3V for VCC.

John
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 05, 2013, 07:10 PM
Life begins at transition
Australia, VIC, Sale
Joined May 2007
3,593 Posts
Noobee,
Have you had a look at OlliW's gyro code by chance? He's written some code for a heli gyro. Single axis only, but shouldn't be hard to adapt that to three-axis?
Odysis is offline Find More Posts by Odysis
Reply With Quote
Old Jan 05, 2013, 07:22 PM
If it has wings it will fly...
ckleanth's Avatar
United Kingdom, England, Birmingham
Joined Mar 2011
1,118 Posts
Quote:
Originally Posted by noobee View Post
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..
not really bothered about what the switches (as long as we have a reference what they do ... unlile HK practice )
btw are we stuck with the receiver frame rate every 22ms?
ckleanth is online now Find More Posts by ckleanth
Reply With Quote
Old Jan 05, 2013, 08:29 PM
Registered User
Joined Dec 2006
1,435 Posts
Quote:
Originally Posted by Odysis View Post
Noobee,
Have you had a look at OlliW's gyro code by chance? He's written some code for a heli gyro. Single axis only, but shouldn't be hard to adapt that to three-axis?
i already have a working 3-axis implementation for the itg3205 in the rx3s v1/v2 and my mpu6050. is there a feature in that code that would be useful to apply here?

thanks.
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 08:36 PM
Registered User
Joined Dec 2006
1,435 Posts
Quote:
Originally Posted by ckleanth View Post
not really bothered about what the switches (as long as we have a reference what they do ... unlile HK practice )
btw are we stuck with the receiver frame rate every 22ms?
the current code emits the servo pulses serially with a frame period of around 20ms (and it's configurable). 20ms is a safe period for analog servos. digital servos can accept a faster rate, but not all analog servos can do that.

the current code also measures the leading and trailing edges of the rx pulses independently, so the rx does not have to emit pulses serially or 22ms.

furthermore, the pid controller in the middle works at a fixed rate of 10ms and hence all three stages are decoupled (input, pid, output)
noobee is offline Find More Posts by noobee
Reply With Quote
Old Jan 05, 2013, 10:24 PM
Registered User
florida
Joined Nov 2002
176 Posts
Yes ,I have the V1. I also Have the HK programmer. I tried the open file flash but unable to find the file.Is there a specific location ?
flightdeck is offline Find More Posts by flightdeck
Last edited by flightdeck; Jan 05, 2013 at 10:32 PM.
Reply With Quote
Old Jan 05, 2013, 11:08 PM
Registered User
Joined Dec 2006
1,435 Posts
hey

the .hex file is the firmware image file that programmers such as avrdude or extreme burner should recognize..

i made quite alot of changes during my vacation and have not had a chance to test out the latest code yet (currently in the dev branch). perhaps it would be better to wait a couple of days for me to resync and merge in the latest changes (this will include both v1 and v2 support). i just returned and need a break from my vacation

thanks


Quote:
Originally Posted by flightdeck View Post
Yes ,I have the V1. I also Have the HK programmer. I tried the open file flash but unable to find the file.Is there a specific location ?
noobee is offline Find More Posts by noobee
Last edited by noobee; Jan 05, 2013 at 11:31 PM.
Reply With Quote
Old Jan 06, 2013, 06:12 AM
Registered User
florida
Joined Nov 2002
176 Posts
Thanks for your hard work.I check back.
flightdeck is offline Find More Posts by flightdeck
Reply With Quote
Old Jan 06, 2013, 09:30 AM
Registered User
United States, NC, Raleigh
Joined Oct 2011
757 Posts
Reply to wjs

Quote:
Originally Posted by JohnRB View Post
I have not spent any time on this, just an observation and I could be wrong.
wjs,

As I originally mentioned I could be wrong about this as I did not spend much time on it. What I did was setup everything to work normally with the RX3S disabled. I plugged a servo into the elevator channel and watched the way the servo moved with an up elevator command from the TX. I then enabled the RX3S and lowered the front edge of the RX3S board (opposite side from connectors) and watch the correction. It was in the proper direction, when front of board was lowered (nose going down) the RX3S added up elevator - working as expected.

I then set the RX3S reverse switch for the elevator to on (reversed). What I expected to happen was that pulling the stick back on the transmitter would still be up elevator but the error correction applied by the RX3S when the front of the board was lowered would be reversed. What I found was the the RX3S still applied the same correction, but pulling the stick on the transmitter was now down elevator. This can be corrected by also reversing the elevator channel on the transmitter.

It seems to me that the RX3S should never reverse the pulse coming from the transmitter, only alter the direction of the correction signal.

This might explain why people are having problems when the RX3S reverse switch must be on.
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Jan 06, 2013, 09:43 AM
CURIOSITY Has Landed!
Fugitive_Bill's Avatar
Sydney, Australia
Joined Jul 2005
1,155 Posts
Interesting. I never looked into that, as when I hooked my gyro up to the plane I'm using one of them on everything was working in the correct directions 'out-of-the-box'.
Never the less, I agree with your conclusion.
-B!
Fugitive_Bill is offline Find More Posts by Fugitive_Bill
Reply With Quote
Old Jan 06, 2013, 10:47 AM
If it has wings it will fly...
ckleanth's Avatar
United Kingdom, England, Birmingham
Joined Mar 2011
1,118 Posts
Quote:
Originally Posted by noobee View Post
the current code emits the servo pulses serially with a frame period of around 20ms (and it's configurable). 20ms is a safe period for analog servos. digital servos can accept a faster rate, but not all analog servos can do that.

the current code also measures the leading and trailing edges of the rx pulses independently, so the rx does not have to emit pulses serially or 22ms.

furthermore, the pid controller in the middle works at a fixed rate of 10ms and hence all three stages are decoupled (input, pid, output)
I think I mentioned it before but for the v2 since there are so many available switches perhaps we can dedicate a switch for analog/digital servo ?

re flashing the stabiliser and although its already mentioned numerus times I think you need to put something in the first post (or link to a guide) for novice ppl not to try flashing the stabiliser with a 5v usbasp due to the gyro voltage tolerance. if they bought the HK usbasp then that's the default setting.
ckleanth is online now Find More Posts by ckleanth
Reply With Quote
Old Jan 06, 2013, 12:12 PM
wjs
William
United States, MI, Brighton
Joined Oct 2012
1,957 Posts
Quote:
Originally Posted by JohnRB View Post
wjs,

As I originally mentioned I could be wrong about this as I did not spend much time on it. What I did was setup everything to work normally with the RX3S disabled. I plugged a servo into the elevator channel and watched the way the servo moved with an up elevator command from the TX. I then enabled the RX3S and lowered the front edge of the RX3S board (opposite side from connectors) and watch the correction. It was in the proper direction, when front of board was lowered (nose going down) the RX3S added up elevator - working as expected.

I then set the RX3S reverse switch for the elevator to on (reversed). What I expected to happen was that pulling the stick back on the transmitter would still be up elevator but the error correction applied by the RX3S when the front of the board was lowered would be reversed. What I found was the the RX3S still applied the same correction, but pulling the stick on the transmitter was now down elevator. This can be corrected by also reversing the elevator channel on the transmitter.

It seems to me that the RX3S should never reverse the pulse coming from the transmitter, only alter the direction of the correction signal.

This might explain why people are having problems when the RX3S reverse switch must be on.
No worries. I was trying to rectify in my head what everyone was seeing to reduce to some simple truths. For example, one person said they reversed the switch, plus reversed the tx to get it to work. That still puzzles me as a double rev would seem to just null itself out. Some of the issues have got me wondering if even to use this thing. The spek unit is interesting. Seems they would have some great advantage with gyro combined with rx. For example, they could remove a layer of pwm out and pwm in and tons of interrupt time and combined error. They have the raw channel data in hand and can just apply calcs to it and send. Not sure if they take advantage of that or just combine another board doing same thing as 3x.
wjs is offline Find More Posts by wjs
Reply With Quote
Old Jan 07, 2013, 03:02 AM
Registered User
Joined Dec 2007
541 Posts
Somebody got a schematic or pin configuration of the V2 already?

Internally there are soldering pads for the programmer connector. There is a DTR, RX, TX, GND connector place, which reminds me of a arduino type serial programming interface.

Edit:
My pin config estimate:

OUT
Ail-L - PD4
Elev - PD5
Rud - PD6
Ail-R - PD7

IN
Ail - PB0
Ele - PB1
Rud - PB2
Aux - PB3

POT
Pitch - ADC6
Yaw - ADC3
Roll - ADC1

Processor runs from 3.3V onboard regulator.
Cesco is offline Find More Posts by Cesco
Last edited by Cesco; Jan 07, 2013 at 03:22 AM.
Reply With Quote
Old Jan 07, 2013, 12:49 PM
Registered User
florida
Joined Nov 2002
176 Posts
Thanks for working so hard on this.If possible can you link the hex file for download much like what was done in the Turnigy 9X forum when your satisfied with the outcome ?
flightdeck is offline Find More Posts by flightdeck
Reply With Quote
Old Jan 07, 2013, 01:52 PM
Registered User
Joined Dec 2006
1,435 Posts
Quote:
Originally Posted by ckleanth View Post
I think I mentioned it before but for the v2 since there are so many available switches perhaps we can dedicate a switch for analog/digital servo ?

re flashing the stabiliser and although its already mentioned numerus times I think you need to put something in the first post (or link to a guide) for novice ppl not to try flashing the stabiliser with a 5v usbasp due to the gyro voltage tolerance. if they bought the HK usbasp then that's the default setting.
ok, that sounds interesting, to add a switch to set the servo frame period time (right now it is 20ms). in the code, since the servo output channels are serialized, the minimum would be around 4 * 2ms about 8-10 ish ms or so. the pid compute is now at 10ms, so setting the frame period below 10ms won't be useful.

thanks for the heads up about flashing. yea. it is important not to subject the gyro to 5v vcc. the picture i drew a few posts back would describe the alternate way to power the device for flashing, but that assumes that the processor chip running at 3.3v is 5v tolerant/compatible on the programming lines. i should add more warning.
noobee is offline Find More Posts by noobee
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