Hobby King OrangeRX RX3S Manuale utente

FlightStab Guide
WIP WIP WIP manual being revamped WIP WIP WIP
Open Flight Stabilizer (FlightStab)
updated 07/072013
rcgroups thread http://www.rcgroups.com/forums/showthread.php?t=1794 72
source code https://github.com/noobee/FlightStab
build images https://github.com/noobee/FlightStab/tree/master/Builds
ey Features
3-axis gyro-based stabilization.
WING mode mixing (single aileron and flaperons).
DELTA mode mixing.
VTAIL mode mixing.
CPPM mode.
throttle and flap channels pass through in CPPM.
gyro-based attitude hold.
configurable mixer limits to prevent servo binding.
stick-based configuration for options.
EEPROM storage for configurations (can be reset through jumpers on bootup)
LED flashes for status and errors.
RX calibration during startup to determine neutral stick positions.
IMU calibration during startup to remove sensor offsets.
AUX channel controls master gain linearly from 0% to 100%
AUX channel also controls RATE and HOLD modes
VRs on RX3S control axis gain and direction.
DIP switches on RX3S control the mix mode.
HOLD mode for attitude hold
stick-controlled rotation rate in HOLD mode, optional in RATE mode
inflight RX calibration to reset RX neutral values
PID parameters adjustable through program box
stick position controls gain, which prevents overcorrection or "fighting" commanded stick movement during
manoeuvres.
allows side mounting on flat fuselage foamies (by rolling 90° left or 90° right and then mounting to the
fuselage side)
optional AVRootloader to allow firmware update without usbasp ISP.
use pre-built firmware or build your own from the source code.
support the AQUASTAR or DLUX programming box
note that some features are currently only in the dev/beta image.
Supported Devices
RX3S V1 http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=25448
RX3S V2 or V3 (they use the same firmware) http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?
idproduct=2845
http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=3158
NanoWii
ITG-320x, MPU- 050 sensors
Aquastar Programming Box
http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=25492
Page
1
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

DLUX Programming Box
http://www.hobbyking.com/hobbyking/store/uh_viewitem.asp?idproduct=17 19
Flashing the Firmware (for non Arduino-based boards)
use an USBasp programmer capable of operating at 3.3v (highly recommended)
search ebay for “usbasp 3.3v”. ensure that it supports both 5v or 3.3v to the target.
RX3S require setting to 3.3v (via jumper setting on the USBasp). it is possible to use a 5v USBasp, but you
need to power it differently.
btw, i highly recommend this tool, especially if you have the RX3S V2 or V3
http://www.hobbyking.com/hobbyking/store/__27195__Atmel_Atmega_Socket_Firmware_Flashing_Tool.html
Flash using eXtreme Burner
Setting up eXtremeBurner (first time)
install eXtreme Burner - AVR (http://extremeelectronics.co.in/category/software/)
edit the properties of `C:\Program Files\eXtreme Burner - AVR\Data` to allow the user full control over the
directory. otherwise, the contents are read-only.
edit the file `C:\Program Files\eXtreme Burner - AVR\Data\chips.xml` to add support for the new
ATmega168PA chip type.
add the following XML section just after the ATmega1 8 section
save the file. if there is an error saving, then check the directory access properties in the second step above
again.
Checking and erasing the device before flashing for the first time
run eXtreme Burner and select Chip type as ATmega1 8PA
connect the ISP connector to the RX3S
select Read All. the program should recognize the chip and proceed to read the flash, EEPROM and
fuse/lock bits
the flash and EEPROM will be read back as 0xff (since the lock bits LB1/2 are set). that is correct.
the fuse/lock bits should read the following (the calibration value does not have to match):
DO NOT PROCEED IF THE VALUES DO NOT MATCH OR IF EXTREME BURNER CANNOT RECOGNIZE
THE CHIP (AFTER 2-3 TRIES)
FROM THIS POINT ONWARDS, YOU WILL ERASE THE CHIP AND REFLASH WITH NEW FIRMWARE.
THERE IS NO WAY TO RESTORE THE ORIGINAL FIRMWARE.
select Chip Erase. the program will erase the chip and reset the lock bits.
select Read All again, this time the lock fuse should read lock=0xff.
Flashing the device (each time you want to upgrade the firmware)
open the firmware hex file
either select the appropriate one from .\FlightStab\Builds\*.hex, or
select the generated FlightStab.cpp.hex (if you built the firmware from sources, which is described
<CHIP>
<NAME>ATmega168PA</NAME>
<FLASH>16384</FLASH>
<EEPROM>512</EEPROM>
<SIG>0x000B941E</SIG>
<PAGE>128</PAGE>
<LFUSE layout="2">YES</LFUSE>
<HFUSE layout="3">YES</HFUSE>
<EFUSE layout="2">YES</EFUSE>
<LOCK>YES</LOCK>
<CALIB>YES</CALIB>
<PLACEMENT>.\Images\Placements\ZIF_DIP_40.bmp</PLACEMENT>
</CHIP>
lo=0xf7
hi=0xdf
ext=0xf9
lock=0xfc
Page
2
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

later)
select Write from the menu bar then Flash. the program will write the updated firmware to the flash.
sometimes it will fail to recognize the chip ID. try again 2-3 times and it would usually succeed.
disconnect the ISP connector from the RX3S.
Flash using avrdude
avrdude recognizes the ATmega1 8PA with -p m1 8p
please check the docs on how to read and verify the fuse bits, and how to erase the chip.
apply the same caution in the previous section to verify the fuse/lock bits before erasing the chip.
to flash the device, i used the following command (in a single line):
Flash using avrdude on NanoWii (which has the arduino/leonardo bootloader)
Save above code to a Text file and rename something handy for you, example NanoFlash.bat. Open Explorer and
type into address bar '%APPDATA%\Microsoft\Windows\SendTo' and put NanoFlash.bat in that folder.
You'll need to swap details in Blue/Red to suit your FC.
How to find Trigger and Active Comports:
Open device manager. Plugin NanoWii that port number will be Trigger Port. Replace Blue with this number.
You'll manually reset the board while watching device manager. Will change to the Active Port number for few
sec's. Change Red with this number.
How to use
Right click on *_NanoWii.hex file and go to option 'Send to' chose NanoFlash and your done.
Optional: Flashing the AVRootloader
It is possible to flash a bootloader via usbasp on the RX3S. If the bootloader is installed, then flashing the main
stabilizer firmware does not require the usbasp. Instead, an FTDI USB-serial adapter with a small circuit mod
connects to the AILR_OUT channel, which is more convenient than opening up the device to upgrade the firmware
via the usbasp ISP connector. The circuit mod follows:
https://docs.google.com/drawings/d/1WhYAdw_9QpfYJWmOuu2IhCJNw rNNagTw_OZEqriTo8/pub?w=8 7&h=439
avrdude -C "C:\Program Files\arduino-1.0.3
\hardware\tools\avr\etc\avrdude.conf" -c usbasp -p m168p -U
flash:w:<filename>.hex
avrdude -p m32u4 -P COM7 -c avr109 -b 1200
TIMEOUT 3
avrdude -p m32u4 -P COM5 -c avr109 -D -Uflash:w:%1:i
TIMEOUT 3
Page
3
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Steps to flash the bootloader (note: for RX3S only):
if flashing for the first time, follow earlier instructions to erase the chip and clear the lock bits.
flash the hex file at .\FlightStab\AVRootloader\AVR\default\AVRootloader_AILR_OUT.hex
update the EXTENDED FUSE setting from 0xF9 to 0xFC. This enables the atmega1 8pa to boot a 512-byte
bootloader on reset.
Steps to flash the stabilizer image with a bootloader-enabled device:
connect the servo connector from the FTDI + circuit mod to AIL_OUT channel
run .\FlightStab\AVRootloader\Windows\AVRootloader.exe
verify that baud rate is 115200 (optional, bootloader auto detects), “erase device during programming” is
checked, “verify device after programming” is checked.
click “connect to device”, which should establish a session with the device. If you have trouble connecting,
try pressing “connect to device” then turn on the switch to power up and boot the device.
select the flightstab hex file as the flash image file.
click “program” to flash the stabilizer firmware. it should flash and verify the image, which completes in about
4 seconds at 115200 baud rate.
OPTIONAL: Building the firmware image from source code
Building firmware from sources is optional, you can also use prebuilt firmware in .\FlightStab\Builds\*.hex
Building the firmware via arduino IDE
install arduino v1.0x (http://arduino.cc/en/Main/Software)
installing the i2cdevlib is optional unless you want to enable this library with #define USE_I2CDEVLIB. the
default is USE_I2CLIGHT
download i2cdevlib (http://www.i2cdevlib.com/usage)
place i2cdev directories in C:\users\<user>\My Documents\Arduino\Libraries
C:\users\<user>\My Documents\Arduino\Libraries\_Stub
Page
4
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

run Arduino.exe and select Board as `Arduino Pro or Pro Mini (5V, 1 MHz) w/ ATmega 1 8`
load `FlightStab.ino`
uncomment `#define RX3S_V1` for RX3S V1 and check all other devices are commented out.
verify/compile the program.
locate the generated hex file at `C:\users\<user>\AppData\Temp\build<numbers>.tmp\FlightStab.cpp.hex`.
sort the directory by modified-date to help find the most recent `build<numbers>.tmp` entry.
verify the timestamp of `FlightStab.cpp.hex` matches current time.
Building the Firmware via cmake (recommended)
install C:\Program Files (x8 )\CMake 2.8
ensure PATH includes C:\Program Files (x8 )\CMake 2.8\bin
install C:\Program Files\arduino-1.0.3 (this exact path is important!)
ensure PATH includes C:\Program Files\arduino-1.0.3\hardware\tools\avr\utils\bin
run the following commands:
a list of .hex files will be created in the current directory for all the different devices and with different compile-
time options.
Connecting the RX3S V1
https://docs.google.com/drawings/d/1UIpZlqXQydiNrwG9xPUMn7-c8fgz9dmPhzMvmBZxM3g/pub?w=103 &h=1138
C:\users\<user>\My Documents\Arduino\Libraries\I2Cdev
C:\users\<user>\My Documents\Arduino\Libraries\ITG3200
...
cd ./Builds
rd /s . (this optional step wipes out all intermediate files)
cmake [-DTODAY=yyyymmdd] -G"MSYS Makefiles" .. (-DTODAY is optional
to override the system date)
make [VERBOSE=1]
Page
5
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Connecting the RX3S V1 with CPPM
https://docs.google.com/drawings/d/1OSFdJhFkyxzuxppBQuRJt8MLZkH4
-
uPX9_TsbjsJbFA/pub?w=103 &h=1138
Page
6
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Connecting the RX3S V2
Page
7
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Connecting the RX3S V2 with CPPM
https://docs.google.com/drawings/d/17n4bOpNZL
-
B_cwbcNCIPpM4CLkEAdrxoobJhFI5
-
300/pub?w=108 &h=1272
Page
8
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Connecting the NanoWii
https://docs.google.com/drawings/d/10f_17nVnECrE8oCDNfB_Dw8DAffwjvNOaXWew73Y3qs/pub?w=739&h= 37
Page
9
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...

Basic Instructions
connect the device based on the connection diagrams. for RX3S, the DIP switches set the WING mode
(single aileron, dual ailerons or flapperons, delta or vtail). for NanoWii, the stick configs will set WING mode.
if you change any DIP switch settings, power cycle the device to enable the new setting to take effect.
the VR gain POTs on the RX3S control the correction gain and direction for each of the pitch (ELE), roll (AIL)
and yaw (RUD) axis.
7 o'clock = max gain in one direction
12 o'clock = zero gain
5 o'clock = max gain in opposite direction
the AUX channel controls the master gain linearly. It can be set with a knob/slider (ideally) or a 2/3-position
switch. It can also be left unconnected, which defaults to MAX gain in RATE mode.
the AUX channel also controls RATE mode vs HOLD mode. The following diagram shows the AUX1 pulse
width determining RATE and HOLD master gain values. To calibrate the TX AUX1 for 1500us, apply subtrim
to AUX1 (with 3P switch in middle position for example) until you are at the point between 4 flashes and no
flashes, that is effectively zero stabilization.
the stick position also controls the gain to reduce the stabilizer from over correcting your controls during
manoeuvres.
neutral position = max gain
extreme position = zero gain
in between = linear between max and zero.
LED Status
there are 4 LED message slots. each slot is a series of flashes to indicate a condition. LONG flashes are
00ms pulses ( 00ms on and 00ms off), SHORT flashes are 200ms pulses and VERY_SHORT pulses are
30ms pulses. the number of pulses and duration of each pulse determines the message.
LED pulses Message
1 LONG WING mode = single aileron
2 LONG WING mode = delta
3 LONG WING mode = vtail
4 LONG WING mode = dual ailerons (flapperons)
1 SHORT RX calibrating
2 SHORT IMU calibrating
3 SHORT both RX and IMU calibrating
4 SHORT HOLD stabilization mode (otherwise RATE stabilization mode)
Page
10
of
16
FlightStab Guide
10/07/2013
https://docs.google.com/document/d/1 u7kNyU2rjOpttHuphGEAHgbkrqj7dtaAC7H
...
Questo manuale è adatto per i seguenti modelli
1
Indice
Altri manuali Hobby King Controllori























