From c4646d7a77b939dce1fa48c80d1ba36b489220a3 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sat, 29 Nov 2014 01:16:36 +0100 Subject: [PATCH 01/17] AlienWii32 alternative defaults for NAZE target Activate via OPTIONS="ALIENWII32" during make --- src/main/config/config.c | 14 ++++++++++++++ src/main/target/NAZE/target.h | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/main/config/config.c b/src/main/config/config.c index bc96cdc18..058975add 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -435,6 +435,20 @@ static void resetConf(void) applyDefaultLedStripConfig(masterConfig.ledConfigs); #endif + // alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) +#ifdef ALIENWII32 + featureSet(FEATURE_RX_MSP); + featureSet(FEATURE_MOTOR_STOP); + masterConfig.serialConfig.serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_SERIAL_RX_ONLY); + masterConfig.rxConfig.serialrx_provider = 1; + masterConfig.escAndServoConfig.minthrottle = 1000; + masterConfig.escAndServoConfig.maxthrottle = 2000; + currentControlRateProfile->rcRate8 = 130; + currentControlRateProfile->rollPitchRate = 20; + currentControlRateProfile->yawRate = 60; + parseRcChannels("TAER1234", &masterConfig.rxConfig); +#endif + // copy first profile into remaining profile for (i = 1; i < MAX_PROFILE_COUNT; i++) { memcpy(&masterConfig.profile[i], currentProfile, sizeof(profile_t)); diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index 3e69fde49..c32259e26 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -111,3 +111,8 @@ #define TELEMETRY #define SERIAL_RX #define AUTOTUNE + + // alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) +#ifdef ALIENWII32 +#define BRUSHED_MOTORS +#endif From 910753121ed85d6d291225f99223cd0dc9d61bf4 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sat, 29 Nov 2014 14:45:11 +0100 Subject: [PATCH 02/17] Updates and fixes fix FEATURE_RX_SERIAL --- src/main/config/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/config/config.c b/src/main/config/config.c index 058975add..752407be0 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -437,7 +437,7 @@ static void resetConf(void) // alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) #ifdef ALIENWII32 - featureSet(FEATURE_RX_MSP); + featureSet(FEATURE_RX_SERIAL); featureSet(FEATURE_MOTOR_STOP); masterConfig.serialConfig.serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_SERIAL_RX_ONLY); masterConfig.rxConfig.serialrx_provider = 1; From a58353692ef1cd9956744bc4180a6cb80e2006b5 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sat, 29 Nov 2014 16:21:03 +0100 Subject: [PATCH 03/17] AlienWii32 Spektrum bind integation --- src/main/config/config.c | 1 + src/main/target/NAZE/target.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/config/config.c b/src/main/config/config.c index 752407be0..bf60ced1e 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -441,6 +441,7 @@ static void resetConf(void) featureSet(FEATURE_MOTOR_STOP); masterConfig.serialConfig.serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_SERIAL_RX_ONLY); masterConfig.rxConfig.serialrx_provider = 1; + masterConfig.rxConfig.spektrum_sat_bind = 5; masterConfig.escAndServoConfig.minthrottle = 1000; masterConfig.escAndServoConfig.maxthrottle = 2000; currentControlRateProfile->rcRate8 = 130; diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index c32259e26..f5fe08102 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -115,4 +115,5 @@ // alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) #ifdef ALIENWII32 #define BRUSHED_MOTORS +#define HARDWARE_BIND_PLUG #endif From e33513b6c81407c24dd7814af478ed1bb6b854b9 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sat, 29 Nov 2014 16:51:17 +0100 Subject: [PATCH 04/17] Update motor_pwm_rate to 32000 --- src/main/config/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/config/config.c b/src/main/config/config.c index bf60ced1e..6cd0723c0 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -444,6 +444,7 @@ static void resetConf(void) masterConfig.rxConfig.spektrum_sat_bind = 5; masterConfig.escAndServoConfig.minthrottle = 1000; masterConfig.escAndServoConfig.maxthrottle = 2000; + masterConfig.motor_pwm_rate = 32000; currentControlRateProfile->rcRate8 = 130; currentControlRateProfile->rollPitchRate = 20; currentControlRateProfile->yawRate = 60; From 17d1c6e610be1d3341b082b3b1e2abdc2d21597e Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sun, 30 Nov 2014 11:07:41 +0100 Subject: [PATCH 05/17] Adding documentaion and fix Board - AlienWii32.md Spectrum bind.md Adding Feature failsave --- docs/Board - AlienWii32.md | 24 ++++++++++++++++++++++++ docs/Spektrum bind.md | 35 +++++++++++++++++++++++++++++++++++ src/main/config/config.c | 1 + 3 files changed, 60 insertions(+) create mode 100644 docs/Board - AlienWii32.md create mode 100644 docs/Spektrum bind.md diff --git a/docs/Board - AlienWii32.md b/docs/Board - AlienWii32.md new file mode 100644 index 000000000..7c2866622 --- /dev/null +++ b/docs/Board - AlienWii32.md @@ -0,0 +1,24 @@ +# Board - AlienWii32 + +The AlienWii32 is actually in prototype stage only a few sample exist. There is some more field testing ongoing. The information below is preliminary an will be updated as needed. + +Here are the Hardware specifications: + +- STM32F103CBT6 MCU +- MPU6050 accelerometer/gyro sensor unit +- 8x 4.2A brushed ESCs, integrated, to run the strongest micro motors +- extra-wide traces on the PCB, for maximum power throughput +- USB port, integrated (subject to change) +- * serial connection for external DSM2/DSMX sat receiver (e.g. Spektrum SAT, OrangeRx R100 or Lemon RX) +- alternatively PPM receiver connection (i.e. Deltag Rx31) +- ground and 3.3V for the receiver +- hardware bind plug for easy binding +- motor connections are at the corners for a clean look with reduced wiring +- dimensions: 30x32mm +- direct operation from an single cell lipoly battery + +* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol wit default settings. Changes can be done as usual via CLI or the Cleanflight configurator. + +The pin layout is similar as the NAZE32 or the related clones. The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OTIONS="AlienWii32". +The firmware image will come with alternative default settings which will give a plug and play experience. There is no computer need to get this into the air with an smAL quadcopter. +anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md new file mode 100644 index 000000000..f5b8a8342 --- /dev/null +++ b/docs/Spektrum bind.md @@ -0,0 +1,35 @@ +# Spektrum bind support + +Spektrum bind with hardware bind plug support. + +## Hardware + +The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. +This is done automatically if the AlienWii32 firmware is build. The bind plug is expected between pin 41 +(PB5 STM32F103CBT6) and ground. The bind code will actually work for USART2 (PA3 STM32F103CBT6). + +## Function + +If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The +spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. +If there is no hardware bind plug present the bind code will be executed ones after the next start (hardware +reset or power on) of the firmware and the spektrum_sat_bind parameter will be reset to 0 when done. The bind +code will not be executed during an soft rest of the MCU. Please refer to your receiver documentation for more +details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. +The Bind plug should be always removed for normal flying. + +## Table with spektrum_sat_bind parameter Value + +| Value | Receiver mode | +| ----- | ---------------| +| 3 | DSM2 1024/22ms | +| 5 | DSM2 2048/11ms | +| 7 | DSMX 22ms | +| 9 | DSMX 11ms | + +More detailed information regarding the sattelite binding process can be found here: +http://wiki.openpilot.org/display/Doc/Spektrum+Satellite + +### Supported Hardware + +all NAZE Targets (NAZE32, Flip32, AlienWii32 with hardware bind pin) diff --git a/src/main/config/config.c b/src/main/config/config.c index 6cd0723c0..292c6dad7 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -439,6 +439,7 @@ static void resetConf(void) #ifdef ALIENWII32 featureSet(FEATURE_RX_SERIAL); featureSet(FEATURE_MOTOR_STOP); + featureSet(FEATURE_FAILSAVE); masterConfig.serialConfig.serial_port_scenario[1] = lookupScenarioIndex(SCENARIO_SERIAL_RX_ONLY); masterConfig.rxConfig.serialrx_provider = 1; masterConfig.rxConfig.spektrum_sat_bind = 5; From 4b2f35ccefa7a79c85b8a82bf802e7ccda823774 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sun, 30 Nov 2014 12:03:49 +0100 Subject: [PATCH 06/17] Documentation updates and spelling fixes --- docs/Board - AlienWii32.md | 10 ++++------ docs/Spektrum bind.md | 26 +++++++++----------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/docs/Board - AlienWii32.md b/docs/Board - AlienWii32.md index 7c2866622..51dcddb81 100644 --- a/docs/Board - AlienWii32.md +++ b/docs/Board - AlienWii32.md @@ -1,8 +1,8 @@ # Board - AlienWii32 -The AlienWii32 is actually in prototype stage only a few sample exist. There is some more field testing ongoing. The information below is preliminary an will be updated as needed. +The AlienWii32 is actually in prototype stage only a few samples exist. There is some more field testing ongoing. The information below is preliminary an will be updated as needed. -Here are the Hardware specifications: +Here are the hardware specifications: - STM32F103CBT6 MCU - MPU6050 accelerometer/gyro sensor unit @@ -17,8 +17,6 @@ Here are the Hardware specifications: - dimensions: 30x32mm - direct operation from an single cell lipoly battery -* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol wit default settings. Changes can be done as usual via CLI or the Cleanflight configurator. +* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings. Changes can be done as usual via CLI or the Cleanflight configurator. -The pin layout is similar as the NAZE32 or the related clones. The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OTIONS="AlienWii32". -The firmware image will come with alternative default settings which will give a plug and play experience. There is no computer need to get this into the air with an smAL quadcopter. -anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file +The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32 etc). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user an plug and play experience. There is no computer need to get this into the air with an smal quadcopter. Anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index f5b8a8342..4c014c78f 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -4,32 +4,24 @@ Spektrum bind with hardware bind plug support. ## Hardware -The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. -This is done automatically if the AlienWii32 firmware is build. The bind plug is expected between pin 41 -(PB5 STM32F103CBT6) and ground. The bind code will actually work for USART2 (PA3 STM32F103CBT6). +The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. This is done automatically if the AlienWii32 firmware is build. The bind plug is expected between pin 41 (PB5 STM32F103CBT6) and ground. The bind code will actually work for USART2 (PA3 STM32F103CBT6). ## Function -If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The -spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. -If there is no hardware bind plug present the bind code will be executed ones after the next start (hardware -reset or power on) of the firmware and the spektrum_sat_bind parameter will be reset to 0 when done. The bind -code will not be executed during an soft rest of the MCU. Please refer to your receiver documentation for more -details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. -The Bind plug should be always removed for normal flying. +If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Please refer to the table below. If there is no hardware bind plug present and the spektrum_sat_bind paremeter is set the bind code will be executed one time only after the next start of the firmware (hardware reset or power on). The spektrum_sat_bind parameter will be reset to 0 when done. The bind code will not be executed during an soft rest of the MCU. Please refer to the sattelite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. The Bind plug should be always removed for normal flying. ## Table with spektrum_sat_bind parameter Value -| Value | Receiver mode | -| ----- | ---------------| -| 3 | DSM2 1024/22ms | -| 5 | DSM2 2048/11ms | -| 7 | DSMX 22ms | -| 9 | DSMX 11ms | +| Value | Receiver mode | Notes | +| ----- | ---------------| --------| +| 3 | DSM2 1024/22ms | | +| 5 | DSM2 2048/11ms | default | +| 7 | DSMX 22ms | | +| 9 | DSMX 11ms | | More detailed information regarding the sattelite binding process can be found here: http://wiki.openpilot.org/display/Doc/Spektrum+Satellite ### Supported Hardware -all NAZE Targets (NAZE32, Flip32, AlienWii32 with hardware bind pin) +all NAZE targets (NAZE32, MW32, Flip32, AlienWii32 with hardware bind pin) From a6296460900172ea932ab9af8d8db5bb61fb9c97 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Mon, 1 Dec 2014 14:39:32 +0100 Subject: [PATCH 07/17] Update documentation, Update Spektrum_bind.md additional defines for hardware bind plug (AlienWii32) --- docs/Spektrum bind.md | 20 ++++++++++++++++---- src/main/target/NAZE/target.h | 4 +++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index 4c014c78f..9fc19cff8 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -2,15 +2,27 @@ Spektrum bind with hardware bind plug support. +## The Spektrum bind code is actually only enabled for the NAZE target. The following parameters can be used to enable and configure this for other targets after more testing: + + #define SPEKTRUM_BIND Enables the Spektrum bind code + #define BIND_PORT GPIOA Defines the port for the bind pin + #define BIND_PIN Pin_3 Defines the bind pin (the satellite receiver is connected to) + +This is to activate the Hardware bind pug feature + + #define HARDWARE_BIND_PLUG Enables the hardware bind plug feature + #define BINDPLUG_PORT GPIOB Defines the port for the hardware bind plug + #define BINDPLUG_PIN Pin_5 Defines the hardware bind plug pin + ## Hardware The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. This is done automatically if the AlienWii32 firmware is build. The bind plug is expected between pin 41 (PB5 STM32F103CBT6) and ground. The bind code will actually work for USART2 (PA3 STM32F103CBT6). ## Function -If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Please refer to the table below. If there is no hardware bind plug present and the spektrum_sat_bind paremeter is set the bind code will be executed one time only after the next start of the firmware (hardware reset or power on). The spektrum_sat_bind parameter will be reset to 0 when done. The bind code will not be executed during an soft rest of the MCU. Please refer to the sattelite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. The Bind plug should be always removed for normal flying. +If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Please refer to the table below. If there is no hardware bind plug present and the spektrum_sat_bind parameter is set the bind code will be executed one time only after the next start of the firmware (hardware reset or power on). The spektrum_sat_bind parameter will be reset to 0 when done. The bind code will not be executed during an soft rest of the MCU. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. The Bind plug should be always removed for normal flying. -## Table with spektrum_sat_bind parameter Value +## Table with spektrum_sat_bind parameter value | Value | Receiver mode | Notes | | ----- | ---------------| --------| @@ -19,9 +31,9 @@ If the bind plug is set the bind mode will be permanently activated during the f | 7 | DSMX 22ms | | | 9 | DSMX 11ms | | -More detailed information regarding the sattelite binding process can be found here: +More detailed information regarding the satellite binding process can be found here: http://wiki.openpilot.org/display/Doc/Spektrum+Satellite ### Supported Hardware -all NAZE targets (NAZE32, MW32, Flip32, AlienWii32 with hardware bind pin) +all NAZE targets (NAZE32, MW32, Flip32, AlienWii32 with hardware bind plug) \ No newline at end of file diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index f5fe08102..54e2ba295 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -112,8 +112,10 @@ #define SERIAL_RX #define AUTOTUNE - // alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) +// alternative defaults AlienWii32 (activate via OPTIONS="ALIENWII32" during make for NAZE target) #ifdef ALIENWII32 #define BRUSHED_MOTORS #define HARDWARE_BIND_PLUG +#define BINDPLUG_PORT GPIOB +#define BINDPLUG_PIN Pin_5 #endif From ece3859f9d4a7f0a49c03181321246b48a735fdd Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Mon, 1 Dec 2014 17:30:05 +0100 Subject: [PATCH 08/17] Add comment regarding bind plug --- src/main/target/NAZE/target.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/target/NAZE/target.h b/src/main/target/NAZE/target.h index 54e2ba295..8e4b3f814 100644 --- a/src/main/target/NAZE/target.h +++ b/src/main/target/NAZE/target.h @@ -116,6 +116,7 @@ #ifdef ALIENWII32 #define BRUSHED_MOTORS #define HARDWARE_BIND_PLUG +// Hardware bind plug at PB5 (Pin 41) #define BINDPLUG_PORT GPIOB #define BINDPLUG_PIN Pin_5 #endif From 74ba59b6b6f23078938ebceb4707ed5f86462fa2 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Tue, 2 Dec 2014 08:48:04 +0100 Subject: [PATCH 09/17] Documentation update --- docs/Spektrum bind.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index 9fc19cff8..26d1068ba 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -2,17 +2,17 @@ Spektrum bind with hardware bind plug support. -## The Spektrum bind code is actually only enabled for the NAZE target. The following parameters can be used to enable and configure this for other targets after more testing: +### The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. The following parameters can be used to enable and configure this for other targets after more testing: - #define SPEKTRUM_BIND Enables the Spektrum bind code - #define BIND_PORT GPIOA Defines the port for the bind pin - #define BIND_PIN Pin_3 Defines the bind pin (the satellite receiver is connected to) + SPEKTRUM_BIND Enables the Spektrum bind code + BIND_PORT GPIOA Defines the port for the bind pin + BIND_PIN Pin_3 Defines the bind pin (the satellite receiver is connected to) This is to activate the Hardware bind pug feature - #define HARDWARE_BIND_PLUG Enables the hardware bind plug feature - #define BINDPLUG_PORT GPIOB Defines the port for the hardware bind plug - #define BINDPLUG_PIN Pin_5 Defines the hardware bind plug pin + HARDWARE_BIND_PLUG Enables the hardware bind plug feature + BINDPLUG_PORT GPIOB Defines the port for the hardware bind plug + BINDPLUG_PIN Pin_5 Defines the hardware bind plug pin ## Hardware @@ -36,4 +36,4 @@ http://wiki.openpilot.org/display/Doc/Spektrum+Satellite ### Supported Hardware -all NAZE targets (NAZE32, MW32, Flip32, AlienWii32 with hardware bind plug) \ No newline at end of file +NAZE, NAZE32PRO, CJMCU, CC3D targets (AlienWii32 with hardware bind plug) \ No newline at end of file From 63ace537927ef4a7e4f9723409ba28dabf9ff1bc Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Tue, 2 Dec 2014 09:37:41 +0100 Subject: [PATCH 10/17] Documentation formatting fix --- docs/Spektrum bind.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index 26d1068ba..f64689c5c 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -2,7 +2,9 @@ Spektrum bind with hardware bind plug support. -### The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. The following parameters can be used to enable and configure this for other targets after more testing: +### The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. + +The following parameters can be used to enable and configure this for other targets after more testing: SPEKTRUM_BIND Enables the Spektrum bind code BIND_PORT GPIOA Defines the port for the bind pin From e03fc9e62291f307fede8717af383abdd04d4a5d Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Wed, 3 Dec 2014 08:55:30 +0100 Subject: [PATCH 11/17] Update documentation to reflect te softreset removal --- docs/Spektrum bind.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index f64689c5c..9d815663c 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -4,7 +4,9 @@ Spektrum bind with hardware bind plug support. ### The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. -The following parameters can be used to enable and configure this for other targets after more testing: +## Configure the bind code + +The following parameters can be used to enable and configure this in the related target.h file: SPEKTRUM_BIND Enables the Spektrum bind code BIND_PORT GPIOA Defines the port for the bind pin @@ -18,11 +20,11 @@ This is to activate the Hardware bind pug feature ## Hardware -The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. This is done automatically if the AlienWii32 firmware is build. The bind plug is expected between pin 41 (PB5 STM32F103CBT6) and ground. The bind code will actually work for USART2 (PA3 STM32F103CBT6). +The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. BINDPLUG_PORT and BINDPLUG_PIN also need to be defined (please see above). This is done automatically if the AlienWii32 firmware is build. The hardware bind plug is expected between the bind pin and ground. ## Function -If the bind plug is set the bind mode will be permanently activated during the firmware start-up. The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Please refer to the table below. If there is no hardware bind plug present and the spektrum_sat_bind parameter is set the bind code will be executed one time only after the next start of the firmware (hardware reset or power on). The spektrum_sat_bind parameter will be reset to 0 when done. The bind code will not be executed during an soft rest of the MCU. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. The Bind plug should be always removed for normal flying. +The bind code will actually work for NAZE, NAZE32PRO, CJMCU targets (USART2) and CC3D target (USART3, flex port). The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. If it will set to 0 bind will be disabled in any case. Please refer to the table below. If the hardware bind plug is configured the bind mode will only be activated if spektrum_sat_bind is set to a value between 1 and 10 and the plug is set during the firmware start-up. The bind plug should be always removed for normal flying. If no hardware bind plug is used the spektrum_sat_bind parameter should be reset to 0 manually after the bind is succefuly done. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. ## Table with spektrum_sat_bind parameter value @@ -38,4 +40,4 @@ http://wiki.openpilot.org/display/Doc/Spektrum+Satellite ### Supported Hardware -NAZE, NAZE32PRO, CJMCU, CC3D targets (AlienWii32 with hardware bind plug) \ No newline at end of file +NAZE, NAZE32PRO, CJMCU, CC3D targets (AlienWii32 with hardware bind plug) From b1b49c7260c283e38f64e3d3f05587cd4c97589e Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Wed, 3 Dec 2014 09:28:00 +0100 Subject: [PATCH 12/17] Formatting and spelling fixes --- docs/Spektrum bind.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index 9d815663c..1fbb0b83d 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -2,7 +2,7 @@ Spektrum bind with hardware bind plug support. -### The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. +The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. ## Configure the bind code @@ -12,7 +12,7 @@ The following parameters can be used to enable and configure this in the related BIND_PORT GPIOA Defines the port for the bind pin BIND_PIN Pin_3 Defines the bind pin (the satellite receiver is connected to) -This is to activate the Hardware bind pug feature +This is to activate the hardware bind plug feature HARDWARE_BIND_PLUG Enables the hardware bind plug feature BINDPLUG_PORT GPIOB Defines the port for the hardware bind plug From 7e24a050b497c9277f48d686a174a9619bfc3036 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Fri, 5 Dec 2014 07:58:49 +0100 Subject: [PATCH 13/17] Update information regarding Deltang receivers. --- docs/Board - AlienWii32.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Board - AlienWii32.md b/docs/Board - AlienWii32.md index 51dcddb81..ca79f20f2 100644 --- a/docs/Board - AlienWii32.md +++ b/docs/Board - AlienWii32.md @@ -17,6 +17,6 @@ Here are the hardware specifications: - dimensions: 30x32mm - direct operation from an single cell lipoly battery -* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings. Changes can be done as usual via CLI or the Cleanflight configurator. +* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings. Changes can be done as usual via CLI or the Cleanflight configurator. Deltang receivers in serial mode will work like any other Spektrum satellite receiver (10bit, 22ms) only the bind process will be different. -The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32 etc). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user an plug and play experience. There is no computer need to get this into the air with an smal quadcopter. Anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file +The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32, etc.). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user an plug and play experience. There is no computer need to get this into the air with an smal quadcopter. For the bind mode DSM2, 11bit, 22ms is preset. Anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file From 0061ce1c2260e0edd06061286678b64afa26cad6 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Fri, 5 Dec 2014 08:25:04 +0100 Subject: [PATCH 14/17] Some more documentation updates and spelling fixes --- docs/Board - AlienWii32.md | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/Board - AlienWii32.md b/docs/Board - AlienWii32.md index ca79f20f2..d48919b81 100644 --- a/docs/Board - AlienWii32.md +++ b/docs/Board - AlienWii32.md @@ -1,22 +1,22 @@ -# Board - AlienWii32 - -The AlienWii32 is actually in prototype stage only a few samples exist. There is some more field testing ongoing. The information below is preliminary an will be updated as needed. - -Here are the hardware specifications: - -- STM32F103CBT6 MCU -- MPU6050 accelerometer/gyro sensor unit -- 8x 4.2A brushed ESCs, integrated, to run the strongest micro motors -- extra-wide traces on the PCB, for maximum power throughput -- USB port, integrated (subject to change) -- * serial connection for external DSM2/DSMX sat receiver (e.g. Spektrum SAT, OrangeRx R100 or Lemon RX) -- alternatively PPM receiver connection (i.e. Deltag Rx31) -- ground and 3.3V for the receiver -- hardware bind plug for easy binding -- motor connections are at the corners for a clean look with reduced wiring -- dimensions: 30x32mm -- direct operation from an single cell lipoly battery - -* Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings. Changes can be done as usual via CLI or the Cleanflight configurator. Deltang receivers in serial mode will work like any other Spektrum satellite receiver (10bit, 22ms) only the bind process will be different. - -The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32, etc.). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be build with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user an plug and play experience. There is no computer need to get this into the air with an smal quadcopter. For the bind mode DSM2, 11bit, 22ms is preset. Anyhow to use this in an Hexa- or Octocopter or to do some more tuning additional CLI changes are required as usual. \ No newline at end of file +# Board - AlienWii32 + +The AlienWii32 is actually in prototype stage only a few samples exist. There is some more field testing ongoing. The information below is preliminary and will be updated as needed. + +Here are the hardware specifications: + +- STM32F103CBT6 MCU +- MPU6050 accelerometer/gyro sensor unit +- 8x 4.2A brushed ESCs, integrated, to run the strongest micro motors +- extra-wide traces on the PCB, for maximum power throughput +- USB port, integrated (subject to change) +- (*) serial connection for external DSM2/DSMX sat receiver (e.g. Spektrum SAT, OrangeRx R100 or Lemon RX) +- alternatively PPM receiver connection (i.e. Deltang Rx31) +- ground and 3.3V for the receiver +- hardware bind plug for easy binding +- motor connections are at the corners for a clean look with reduced wiring +- dimensions: 30x32mm +- direct operation from an single cell lipoly battery + +(*) Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings (DSM2, 11bit, 22ms is preset). Changes can be done as usual via CLI or the Cleanflight configurator. Deltang receivers in serial mode will work like any other Spektrum satellite receiver (10bit, 22ms) only the bind process will be different. + +The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32, etc.). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be built with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user a plug and play experience. There is no computer needed to get this into the air with an small Quadcopter. Anyhow to use the AlienWii32 in an Hexa- or Octocopter or to do some more tuning additional configuration changes can be done as usual. From 7369aac4d7b138f85c0088a61154d2bc3e24cb4f Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sun, 7 Dec 2014 12:32:36 +0100 Subject: [PATCH 15/17] Update documentation to reflect soft reset detection --- docs/Spektrum bind.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index 1fbb0b83d..f74968624 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -20,11 +20,11 @@ This is to activate the hardware bind plug feature ## Hardware -The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. BINDPLUG_PORT and BINDPLUG_PIN also need to be defined (please see above). This is done automatically if the AlienWii32 firmware is build. The hardware bind plug is expected between the bind pin and ground. +The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during building of the firmware. BINDPLUG_PORT and BINDPLUG_PIN also need to be defined (please see above). This is done automatically if the AlienWii32 firmware is build. The hardware bind plug is expected between the defined bind pin and ground. ## Function -The bind code will actually work for NAZE, NAZE32PRO, CJMCU targets (USART2) and CC3D target (USART3, flex port). The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. If it will set to 0 bind will be disabled in any case. Please refer to the table below. If the hardware bind plug is configured the bind mode will only be activated if spektrum_sat_bind is set to a value between 1 and 10 and the plug is set during the firmware start-up. The bind plug should be always removed for normal flying. If no hardware bind plug is used the spektrum_sat_bind parameter should be reset to 0 manually after the bind is succefuly done. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LED’s. +The bind code will actually work for NAZE, NAZE32PRO, CJMCU targets (USART2) and CC3D target (USART3, flex port). The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Setting spektrum_sat_bind to zero will disable the bind mode in any case. The bind mode will not be activated after an software reset. Please refer to the table below for the different possible values. If the hardware bind plug is configured the bind mode will only be activated if the plug is set during the firmware start-up. The bind plug should be always removed for normal flying. If no hardware bind plug is used the spektrum_sat_bind parameter will trigger the bind process during the next hardware reset and will be automatically disabled after this. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LEDs. ## Table with spektrum_sat_bind parameter value From 2499e39e5aa62fe8f18deca0a069490d895e5629 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Sun, 14 Dec 2014 22:11:12 +0100 Subject: [PATCH 16/17] Add custom mixer configuration for AllienWii32 The preconfigured custom mixer allows clean cabling for Octocopter builds with the AlienWii32 board --- src/main/config/config.c | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/main/config/config.c b/src/main/config/config.c index 292c6dad7..2ef5da7b6 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -450,6 +450,54 @@ static void resetConf(void) currentControlRateProfile->rollPitchRate = 20; currentControlRateProfile->yawRate = 60; parseRcChannels("TAER1234", &masterConfig.rxConfig); + + // { 1.0f, -0.5f, 1.0f, -1.0f }, // REAR_R + masterConfig.customMixer[0].throttle = 1.0f; + masterConfig.customMixer[0].roll = -0.5f; + masterConfig.customMixer[0].pitch = 1.0f; + masterConfig.customMixer[0].yaw = -1.0f; + + // { 1.0f, -0.5f, -1.0f, 1.0f }, // FRONT_R + masterConfig.customMixer[1].throttle = 1.0f; + masterConfig.customMixer[1].roll = -0.5f; + masterConfig.customMixer[1].pitch = -1.0f; + masterConfig.customMixer[1].yaw = 1.0f; + + // { 1.0f, 0.5f, 1.0f, 1.0f }, // REAR_L + masterConfig.customMixer[2].throttle = 1.0f; + masterConfig.customMixer[2].roll = 0.5f; + masterConfig.customMixer[2].pitch = 1.0f; + masterConfig.customMixer[2].yaw = 1.0f; + + // { 1.0f, 0.5f, -1.0f, -1.0f }, // FRONT_L + masterConfig.customMixer[3].throttle = 1.0f; + masterConfig.customMixer[3].roll = 0.5f; + masterConfig.customMixer[3].pitch = -1.0f; + masterConfig.customMixer[3].yaw = -1.0f; + + // { 1.0f, -1.0f, -0.5f, -1.0f }, // MIDFRONT_R + masterConfig.customMixer[4].throttle = 1.0f; + masterConfig.customMixer[4].roll = -1.0f; + masterConfig.customMixer[4].pitch = -0.5f; + masterConfig.customMixer[4].yaw = -1.0f; + + // { 1.0f, 1.0f, -0.5f, 1.0f }, // MIDFRONT_L + masterConfig.customMixer[5].throttle = 1.0f; + masterConfig.customMixer[5].roll = 1.0f; + masterConfig.customMixer[5].pitch = -0.5f; + masterConfig.customMixer[5].yaw = 1.0f; + + // { 1.0f, -1.0f, 0.5f, 1.0f }, // MIDREAR_R + masterConfig.customMixer[6].throttle = 1.0f; + masterConfig.customMixer[6].roll = -1.0f; + masterConfig.customMixer[6].pitch = 0.5f; + masterConfig.customMixer[6].yaw = 1.0f; + + // { 1.0f, 1.0f, 0.5f, -1.0f }, // MIDREAR_L + masterConfig.customMixer[7].throttle = 1.0f; + masterConfig.customMixer[7].roll = 1.0f; + masterConfig.customMixer[7].pitch = 0.5f; + masterConfig.customMixer[7].yaw = -1.0f; #endif // copy first profile into remaining profile From 73869a75e3ea552d7111974e75087273a8cc5d45 Mon Sep 17 00:00:00 2001 From: Michael Jakob Date: Tue, 23 Dec 2014 18:04:51 +0100 Subject: [PATCH 17/17] Some final documentation updates --- docs/Board - AlienWii32.md | 10 ++++++---- docs/Spektrum bind.md | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/Board - AlienWii32.md b/docs/Board - AlienWii32.md index d48919b81..b0bb08e3d 100644 --- a/docs/Board - AlienWii32.md +++ b/docs/Board - AlienWii32.md @@ -8,15 +8,17 @@ Here are the hardware specifications: - MPU6050 accelerometer/gyro sensor unit - 8x 4.2A brushed ESCs, integrated, to run the strongest micro motors - extra-wide traces on the PCB, for maximum power throughput -- USB port, integrated (subject to change) +- USB port, integrated - (*) serial connection for external DSM2/DSMX sat receiver (e.g. Spektrum SAT, OrangeRx R100 or Lemon RX) - alternatively PPM receiver connection (i.e. Deltang Rx31) - ground and 3.3V for the receiver - hardware bind plug for easy binding - motor connections are at the corners for a clean look with reduced wiring -- dimensions: 30x32mm +- dimensions: 29x33mm - direct operation from an single cell lipoly battery -(*) Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings (DSM2, 11bit, 22ms is preset). Changes can be done as usual via CLI or the Cleanflight configurator. Deltang receivers in serial mode will work like any other Spektrum satellite receiver (10bit, 22ms) only the bind process will be different. +(*) Spektrum Compatible DSM2 satellites are supported out of the box. DSMX sat will work with DSM2 protocol with default settings (DSM2, 11bit, 11ms is preset). -The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32, etc.). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be built with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user a plug and play experience. There is no computer needed to get this into the air with an small Quadcopter. Anyhow to use the AlienWii32 in an Hexa- or Octocopter or to do some more tuning additional configuration changes can be done as usual. +Deltang receivers in serial mode will work like any other Spektrum satellite receiver (10bit, 22ms) only the bind process will be different. + +The pin layout is very similar as the NAZE32 or the related clones (MW32, Flip32, etc.). The hardware bind pin is connected to pin 41 (PB5). The AlienWii32 firmware will be built with TARGET=NAZE and OPTIONS="AlienWii32". The firmware image will come with alternative default settings which will give the user a plug and play experience. There is no computer needed to get this into the air with an small Quadcopter. An preconfigured custom mixer for an Octocopter is part of the default settings to allow clean straight wiring with the AlienWii32. The mixer can be activated with "mixer custom" in the CLI. To use the AlienWii32 in an Hexa- or Octocopter or to do some more tuning additional configuration changes can be done as usual in the CLI or the Cleanflight configurator. \ No newline at end of file diff --git a/docs/Spektrum bind.md b/docs/Spektrum bind.md index f74968624..d81ebbcba 100644 --- a/docs/Spektrum bind.md +++ b/docs/Spektrum bind.md @@ -2,7 +2,7 @@ Spektrum bind with hardware bind plug support. -The Spektrum bind code is actually only enabled for the NAZE, NAZE32PRO, CJMCU, CC3D targets. +The Spektrum bind code is actually enabled for the NAZE, NAZE32PRO, CJMCU, EUSTM32F103RC, SPARKY, CC3D targets. ## Configure the bind code @@ -24,20 +24,26 @@ The hardware bind plug will be enabled via defining HARDWARE_BIND_PLUG during bu ## Function -The bind code will actually work for NAZE, NAZE32PRO, CJMCU targets (USART2) and CC3D target (USART3, flex port). The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Setting spektrum_sat_bind to zero will disable the bind mode in any case. The bind mode will not be activated after an software reset. Please refer to the table below for the different possible values. If the hardware bind plug is configured the bind mode will only be activated if the plug is set during the firmware start-up. The bind plug should be always removed for normal flying. If no hardware bind plug is used the spektrum_sat_bind parameter will trigger the bind process during the next hardware reset and will be automatically disabled after this. Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LEDs. +The bind code will actually work for NAZE, NAZE32PRO, CJMCU, EUSTM32F103RC, SPARKY targets (USART2) and CC3D target (USART3, flex port). The spektrum_sat_bind CLI parameter is defining the number of bind impulses (1-10) send to the satellite receiver. Setting spektrum_sat_bind to zero will disable the bind mode in any case. The bind mode will only be activated after an power on or hard reset. Please refer to the table below for the different possible values. + +If the hardware bind plug is configured the bind mode will only be activated if the plug is set during the firmware start-up. The value of the spektrum_sat_bind parameter will be permanently preserved. The bind plug should be always removed for normal flying. + +If no hardware bind plug is used the spektrum_sat_bind parameter will trigger the bind process during the next hardware reset and will be automatically reset to "0" after this. + +Please refer to the satellite receiver documentation for more details of the specific receiver in bind mode. Usually the bind mode will be indicated with some flashing LEDs. ## Table with spektrum_sat_bind parameter value -| Value | Receiver mode | Notes | -| ----- | ---------------| --------| -| 3 | DSM2 1024/22ms | | -| 5 | DSM2 2048/11ms | default | -| 7 | DSMX 22ms | | -| 9 | DSMX 11ms | | +| Value | Receiver mode | Notes | +| ----- | ---------------| -------------------| +| 3 | DSM2 1024/22ms | | +| 5 | DSM2 2048/11ms | default AlienWii32 | +| 7 | DSMX 22ms | | +| 9 | DSMX 11ms | | More detailed information regarding the satellite binding process can be found here: http://wiki.openpilot.org/display/Doc/Spektrum+Satellite ### Supported Hardware -NAZE, NAZE32PRO, CJMCU, CC3D targets (AlienWii32 with hardware bind plug) +NAZE, NAZE32PRO, CJMCU, SPARKY, EUSTM32F103RC, CC3D targets (AlienWii32 with hardware bind plug)