SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Feb 03, 2013, 09:25 PM
Registered User
Joined Dec 2006
1,441 Posts
a minor update.

mostly housekeeping work with the repository:

- finally got arduino-cmake working. so i'm building 4 hex files via the command line: rx3s_v[1 and 2] at [16 and 8] mhz. for anyone interested, the "meta-makefile" is at https://github.com/noobee/FlightStab...CMakeLists.txt

- rearranged the code a little to perform a few more compile-time checks and also to emit various configurations at build time.

- starting today, i'll be using cmake to build those hex files in the form of "<date><device><attrs>.hex". for example 20130203_RX3S_V1_8MHZ.hex

https://github.com/noobee/FlightStab/tree/master/Builds
noobee is offline Find More Posts by noobee
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 04, 2013, 09:43 AM
If it has wings it will fly...
ckleanth's Avatar
United Kingdom, England, Birmingham
Joined Mar 2011
1,535 Posts
guys could we have a brief explanation where we are with the code?
I have a few blanks that I don't know the answer for.
-what happened with analog/digital servo and signal refresh rates? I thought it would be feasible to have a switch for selecting the type of servo but not sure what happened with that. there's a reference in the first page that its done for the v2-only using the RUD dip switch but I dunno if its implemented.
-I thought the hardware of the srabilizer should work at 8MHz why we have a 16MHz build- different boards?
-can we add in the first page which boards the flightstab code can work on, how to make a build for different board?
- a soldering question, in the case of the v2 and flaperons with master gain, if you take the signal from a switch which is the best place to pick up + & - for the servo?
thanks
ckleanth is online now Find More Posts by ckleanth
Reply With Quote
Old Feb 04, 2013, 11:32 AM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
Quote:
Originally Posted by ckleanth View Post
guys could we have a brief explanation where we are with the code?
-I thought the hardware of the srabilizer should work at 8MHz why we have a 16MHz build- different boards?
I can answer this one, noobee can respond to the remainder of the questions.

The V2 (and I "think" the V1 - I don't have one) have a 16MHz crystal and the HK firmware runs at 16MHz. The datasheet for the ATmega168PA has a "Safe Operating Area" (SOA) chart that indicates 16MHz operation between 3.0V to 3.6V is slightly outside of the SOA region (see post 167). Thus, it is possible that some 168PA parts can fail in this area. The code that noobee has released has the ability to run at either 16MHz or 8MHz.

If you have an issues with your RX3S while running at 16MHz, then you can try the 8MHz version to see if your issue is resolved. Keep in mind that jitter may be a little worse at 8MHz because processing speed is halved and interrupt latency is doubled.

If you wish to be completely save, use the 8MHz version. I have not measured the jitter at 8MHz, but I will when I have some free time.

John
JohnRB is online now Find More Posts by JohnRB
Last edited by JohnRB; Feb 04, 2013 at 12:02 PM. Reason: Add clarification
Reply With Quote
Old Feb 04, 2013, 01:06 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
Quote:
Originally Posted by ckleanth View Post
- a soldering question, in the case of the v2 and flaperons with master gain, if you take the signal from a switch which is the best place to pick up + & - for the servo?
thanks
Look at the lower left corner of the attached photo. There are two pads surrounded by a white rectangle. The square pin is +5V and the pin to it's left is ground. Make sure the switch is turned off (toward servo connectors), if it is on the servo output will be shorted to ground.

John

UPDATE - It just occurred to me that this is an input. Provided at least one of your other inputs from your receiver includes 5V and ground there is no reason to connect anything to these pins.
JohnRB is online now Find More Posts by JohnRB
Last edited by JohnRB; Feb 04, 2013 at 03:48 PM. Reason: Add additional info
Reply With Quote
Old Feb 04, 2013, 01:43 PM
If it has wings it will fly...
ckleanth's Avatar
United Kingdom, England, Birmingham
Joined Mar 2011
1,535 Posts
Quote:
Originally Posted by JohnRB View Post
... Make sure the switch is turned off (toward servo connectors), if it is on the servo output will be shorted to ground.

John
Hi john, could you please expand a little more what this means? i.e if I have a servo conected threre and the switch is on the on position it there wont be any signal pulse, so it wont move essentialy but there is no chance of damaging it?

if its off and the apropriate switches are selected for flaperons it will work as intended...
ckleanth is online now Find More Posts by ckleanth
Reply With Quote
Old Feb 04, 2013, 03:44 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
Quote:
Originally Posted by ckleanth View Post
Hi john, could you please expand a little more what this means? i.e if I have a servo conected threre and the switch is on the on position it there wont be any signal pulse, so it wont move essentialy but there is no chance of damaging it?

if its off and the apropriate switches are selected for flaperons it will work as intended...
This is an input from the receiver and not a servo output. There is a series resistor, R11 I believe, between the port pin and the switch so you will not do any damage to the RX3S if the switch is on. However, if the switch is on, you might damage your receiver if it does not have a series resistor for protection.

John
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Feb 04, 2013, 04:13 PM
Registered User
Joined Dec 2006
1,441 Posts
hey

JohnRB gave excellent answers for your questions 2 and 4. for 4, that wire is AILR input, which should be connected to the RX (and not servo). you also want the ELE switch to the right, which means normal or open, as shown in the connection diagram.

for 1, now that we are synchronizing servo out with rx in (at the frame level), the code will emit at whatever frequency it detects from the rx (start sending servo frame after receiving the rx ELE pulse). so the switch to 10ms frame interval is not really relevant now, just make sure the rx is set up appropriately.

for 3, right now, the list is
- rx3s v1
- rx3s v2
- my arduino nano board with mpu6050
- i believe idonasch is working on hk kk v3

only the first two are available at this time:
- if building by arduino ide, i think the readme file describes the process.
- if building by cmake, you need to install cmake (2.8) and it's just 2 commands to build all permutations. i'll write up something.


Quote:
Originally Posted by ckleanth View Post
guys could we have a brief explanation where we are with the code?
I have a few blanks that I don't know the answer for.
-what happened with analog/digital servo and signal refresh rates? I thought it would be feasible to have a switch for selecting the type of servo but not sure what happened with that. there's a reference in the first page that its done for the v2-only using the RUD dip switch but I dunno if its implemented.
-I thought the hardware of the srabilizer should work at 8MHz why we have a 16MHz build- different boards?
-can we add in the first page which boards the flightstab code can work on, how to make a build for different board?
- a soldering question, in the case of the v2 and flaperons with master gain, if you take the signal from a switch which is the best place to pick up + & - for the servo?
thanks
noobee is offline Find More Posts by noobee
Reply With Quote
Old Feb 04, 2013, 06:01 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
HK RX3S V2 jitter - Firmware 2013-02-03

I had some time today to measure the jitter out of the RX3S with the 2013-02-03 firmware at both 8MHz and 16MHz processor operation. No significant difference so 8MHz may be the safest way to go for now.

PNG file is attached with results.
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Feb 04, 2013, 07:47 PM
If it has wings it will fly...
ckleanth's Avatar
United Kingdom, England, Birmingham
Joined Mar 2011
1,535 Posts
cheers guys.. should had seen the connection diagram before asking...
ckleanth is online now Find More Posts by ckleanth
Reply With Quote
Old Feb 06, 2013, 07:59 AM
Registered User
Joined Dec 2006
1,441 Posts
another update:

- integrated JohnRB's changes for a modified PCINT0 ISR that is faster and uses less stack space, at the cost of more flash space. uncomment #define MOD_PCINT0 to enable this ISR version. it only applies to the RX3S V2 device.

https://github.com/noobee/FlightStab...4ac4dc41709bba

- fixed an issue with CMakeLists that was generating the dates in the wrong order (YYYYDDMM instead of YYYYMMDD).

https://github.com/noobee/FlightStab...112dac5795d422

there is no change in the hex files (but they are still based on the wrong date format, though. 20130302_* instead of 20130203_*)

thanks.
noobee is offline Find More Posts by noobee
Reply With Quote
Old Feb 06, 2013, 01:14 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 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
I purchased 2 of these a while ago and did not use one until today (I have wires with a connector soldered to the board that I use for development and testing).

Now that the firmware is more stable I decided to program one of my other original firmware RX3S devices using this tool.

The cable has a red mark on the white heat shrink tubing indicating the corner were pin 1 should be on the module. The RX3S board must be placed on something higher than the height of the servo connector pins as the processor is on the bottom of the board.

The tool must be pressed firmly against the processor to make contact and held there during programming. I was able to do the programming alone, an extra pair of hands would make things easier.

I had no problems programming with this tool and I now have an RX3S ready to install in a test airplane. Hope to be able to do some test flights within the next few weeks. Weather is getting warmer here in the afternoon, but the winds are still quite strong that time of day.

If you need a way to program the processor on the RX3S give this tool a try. It is the best thing I have found to date.

John
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Feb 06, 2013, 03:46 PM
Registered User
Portugal
Joined Jan 2013
9 Posts
Does anyone know if the stock firmware (v2) outputs gyro info on the serial port ?
0x0539 is offline Find More Posts by 0x0539
Reply With Quote
Old Feb 06, 2013, 04:50 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
RX3S V2 Current Consumption - Open Firmware

I made current measurements today on one RX3S without any servos connected to the outputs.

Orange 6CH RX was powered by ESC and jumpers were used to connect the RX servo outputs and grounds to the RX3S without connection of any of the voltage lines.

RX3S was powered by a lab power supply with the output set at 5.00V.

Firmware was built from the source code posted by noobee on 2/5/2013 running at 16MHz.

The current consumed was between 13.2mA to 17.2mA depending on the amount and speed of stabilization correction. This is from a sample of 1, however, most RX3S's should be around this range. This is the current for just the RX3S.

Running at 8MHz might reduce the current slightly.

John
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Feb 06, 2013, 06:16 PM
Registered User
United States, NC, Raleigh
Joined Oct 2011
842 Posts
Quote:
Originally Posted by 0x0539 View Post
Does anyone know if the stock firmware (v2) outputs gyro info on the serial port ?
The serial port is disabled on the stock firmware. It is only used for debug and in some cases can interfere with normal operation (depending upon what you turn on).

John
JohnRB is online now Find More Posts by JohnRB
Reply With Quote
Old Feb 06, 2013, 06:23 PM
Registered User
Portugal
Joined Jan 2013
9 Posts
I was planning to output gyro data to the OpenLRS so I could have virtual horizon on a laptop.. I could hack this open firmware but I can't tell if it is noob safe, meaning that I'm not an expert flyer and if the gyro goes nuts it will be a confirmed crash. :-)
0x0539 is offline Find More Posts by 0x0539
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 01:50 PM
Sold Flymentor Flight Stabilization with Field Programmer Woody_99 Aircraft - General - Radio Equipment (FS/W) 0 Mar 17, 2012 08:43 AM
Sold Totally Tricked out 400 size with flight stabilization installed, BNF Woody_99 Aircraft - Electric - Helis (FS/W) 2 Mar 12, 2012 07:56 AM
Wanted FY-30A Flight Stabilization System Casey_S FPV Equipment (FS/W) 0 Mar 05, 2012 03:40 PM