- Posts: 521
Devo 8s Modifications - Adding AUX4 and AUX5
- RandMental
- Topic Author
- Offline
After being tempted by the Devo12 for a while, I decided why not upgrade my Devo8s hardware as we did to the Devo7e?
Thus the 2nd Devo8s arrived yesterday and first on the list is adding AUX4 and AUX5. Comparing the Devo 8 and Dev10 hardware there are only minimal differences and two analogue ports seems to be available:
GPIOA:
1: Buzzer
2: output to 0 to shut off Tx???
3: power-switch in 'off' position (goes high on 'off')
4: (ADC_IN_4) Not Used in Devo 8 (DEVO10 - AUX5)
5: (SPI1_SCK): SPI Flash, TSC2008
6: (SPI1_MISO): SPI Flash, TSC2008
7: (SPI1_MOSI): SPI Flash, TSC2008
GPIOC:
0: (ADC_IN_10): Elevator Stick
1: (ADC_IN_11): Rudder Stick
2: (ADC_IN_12): Aileron Stick
3: (ADC_IN_13): Throttle Stick
4: (ADC_IN_14): Battery Voltage
5: (ADC_IN_15): Not Used in Devo 8s (Devo10 - Left Vertical Stick, AUX4 is on GPIOC-0
I don't have Devo10, anyone willing to measure the resistance of the AUX4 and AUX5 potentiometers used in the Devo10? I guess it would be a linear type between 10k and 100kohm.
Any reason why I cannot uses these two inputs to add AUX4 and AUX5 to the Devo 8s or any other ideas for a Devo 8s "upgrade"?
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
Soldering is a challenge.
Please Log in or Create an account to join the conversation.
- -=Hubi-Dirk=-
- Offline
- Posts: 209
can you please give me more informations about build in a vibration motor at the 8s?
Thanks in advance,
Dirk
Please Log in or Create an account to join the conversation.
- Felixrising
- Offline
- Posts: 5
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
you can see pictures and some background infos for the vibrating motor here: devo-8-adding-a-vibration-motor .
The build for deviation 3.0.0 is here: updated-for-deviation-3-0 .
I do not know if RandMental has realized the AUX4/5. From the technical point of view it should be possible to use these ports (transferring the signal without interference could be a little challenge) and the programming seems mostly similar to the vibration mod.
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
rbe2012 wrote: I do not know if RandMental has realized the AUX4/5. From the technical point of view it should be possible to use these ports
Hi guys, not yet, but it is on the list. I have done the module and power mods on the 7e. Over the next week or so it is the 8s due for surgery. How do they say: "real soon now"
When I do get to it, I'll do a photo instruction for the forum at the same time.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
EDIT: If necessary I could assist you in adapting the code.
Please Log in or Create an account to join the conversation.
- Gall
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
I hope to finalise the hardware Aux4/5 mod this weekend with the XL7105 installation - I shall confirm the final hardware definition as soon as finished, but it should be as indicated earlier in this topic.
Regarding the actual analogue input devices - I prefer normal rotary potentiometers, they are easy to adjust without looking, and hope for the Devo10 locations. I also need to trace the existing analogue design to ensure we use similar voltage/current levels, but also to ensure we do not increase the noise levels inside the TX. So twisted pair screened wired with the screen solder to ground on the PCB will be used.
(For interest my RF Module wiring are also shielded and not lose single wires as most photo's on the forum shows. I hate to think what those square wave SPI pulses trains do to the Devo analogue and stick values)
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
The existing potentiometers for the sticks are 1.2k ohm linear types.
They are fed with 3.3Volt, sliders go to the CPU pins via 100ohm resistor with a 100nF capacitor to ground as protections and a 16kHz RC lowpass filter.
To fit into the Devo8s enclosure in the same place where Aux4 and Aux5 are located on the Devo10, panelmount versions with maximum diameter of 18mm are required.
Aux4: Connect to CPU pin 34
Aux5: Connect to CPU pin 29
For the Devo8S hardware definition and upgrades on one document, see pdf attached.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
We would have a deeper look into the gui to see where changes for the number of inputs should be made.
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
diff --git a/src/target/common_emu/fltk.cpp b/src/target/common_emu/fltk.cpp
--- a/src/target/common_emu/fltk.cpp
+++ b/src/target/common_emu/fltk.cpp
@@ -248,6 +248,8 @@
gui.elevator = 5;
gui.aileron = 5;
gui.rudder = 5;
+ gui.aux4 = 5;
+ gui.aux5 = 5;
switch(Transmitter.mode) {
case MODE_1:
case MODE_3:
diff --git a/src/target/devo8/capabilities.h b/src/target/devo8/capabilities.h
--- a/src/target/devo8/capabilities.h
+++ b/src/target/devo8/capabilities.h
@@ -3,6 +3,8 @@
CHANDEF(ELEVATOR)
CHANDEF(THROTTLE)
CHANDEF(RUDDER)
+ CHANDEF(AUX4)
+ CHANDEF(AUX5)
CHANDEF(RUD_DR0)
CHANDEF(RUD_DR1)
CHANDEF(ELE_DR0)
diff --git a/src/target/devo8/channels.c b/src/target/devo8/channels.c
--- a/src/target/devo8/channels.c
+++ b/src/target/devo8/channels.c
@@ -19,7 +19,7 @@
#include "config/tx.h"
#include "../common_devo/devo.h"
-const u8 adc_chan_sel[NUM_ADC_CHANNELS] = {13, 11, 10, 12, 16, 14};
+const u8 adc_chan_sel[NUM_ADC_CHANNELS] = {13, 11, 10, 12, 4, 15, 16, 14};
void CHAN_Init()
{
@@ -31,6 +31,8 @@
gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO1);
gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO2);
gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO3);
+ gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO5); // AUX4 = C5
+ gpio_set_mode(GPIOA, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO4); // AUX5 = A4
/* Enable Voltage measurement */
gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO4);
@@ -53,6 +55,9 @@
case INP_ELEVATOR: value = adc_array_raw[2]; break;
case INP_AILERON: value = adc_array_raw[3]; break;
+ case INP_AUX4: value = adc_array_raw[4]; break;
+ case INP_AUX5: value = adc_array_raw[5]; break;
+
case INP_RUD_DR0: value = gpio_get(GPIOC, GPIO8); break;
case INP_RUD_DR1: value = ! gpio_get(GPIOC, GPIO8); break;
diff --git a/src/target/devo8/target_defs.h b/src/target/devo8/target_defs.h
--- a/src/target/devo8/target_defs.h
+++ b/src/target/devo8/target_defs.h
@@ -22,7 +22,7 @@
#define MAX_POINTS 13
#define NUM_MIXERS ((NUM_OUT_CHANNELS + NUM_VIRT_CHANNELS) * 4)
-#define INP_HAS_CALIBRATION 4
+#define INP_HAS_CALIBRATION 6
/* Compute voltage from y = 0.0021x + 0.3026 */
#define VOLTAGE_NUMERATOR 210
diff --git a/src/target/emu_devo8/channels.c b/src/target/emu_devo8/channels.c
--- a/src/target/emu_devo8/channels.c
+++ b/src/target/emu_devo8/channels.c
@@ -25,6 +25,9 @@
case INP_ELEVATOR: return CHAN_MIN_VALUE + step * gui.elevator;
case INP_AILERON: return CHAN_MIN_VALUE + step * gui.aileron;
+ case INP_AUX4: return CHAN_MIN_VALUE + step * gui.aux4;
+ case INP_AUX5: return CHAN_MIN_VALUE + step * gui.aux5;
+
case INP_RUD_DR0: return gui.rud_dr ? CHAN_MIN_VALUE : CHAN_MAX_VALUE;
case INP_RUD_DR1: return gui.rud_dr ? CHAN_MAX_VALUE : CHAN_MIN_VALUE;
For modifying the values in the emulator some changes are necessary in fltk.cpp. You can use 't' and 'g' for AUX4 and 'y' and 'h' for aux5.
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
RandMental wrote: ...figure out why there is an analogue channel 16 at the end of the channel sequence array...
Forgot to mention: ADC channel 16 is the internal channel for measuring chip temperature. It has no pin for input.
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
rbe2012 wrote: Forgot to mention: ADC channel 16 is the internal channel for measuring chip temperature. It has no pin for input.
Thanks, one more thing I learned...
I applied the patch, but you are a bit quick for me, I still need to do the fine soldering to actually test on the Devo8. The Emulator however seems to work correct as far as I could see.
If you agree, I think we should make (and maintain) a single Dev08s patch file for both the Vibration motor and the AUX4/AUX5 mods. We would need two versions: one for the latest PB code and one for the latest official release. In tx.ini users they can then enable the mods they made.
What do you think?
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
For the vibration motor I see no problem. I have still some hope that PB will integrate this in the main code because it doesn't cost much.
AUX4/5 can take more effort to integrate. I am not ready looking through the code. I am afraid I will have to do the mod by myself to make sure my programming will be correct... will search for the necessary hardware...
If it is done, maintaining and offering patches will be quite similar to the vibrating thing (but getting it into the main code is doubtful).
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
Please Log in or Create an account to join the conversation.
- PatrickN
- Offline
- Posts: 14
is there any progress in adding AUX4/5?
I got a Devo8s and would like to add an analog Channel.
Soldering is no Problem, but how about the Code?
Greetings
Please Log in or Create an account to join the conversation.
- RandMental
- Topic Author
- Offline
- Posts: 521
Edit - I see the PDF file did not load - renaming it
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
For me it could be an interesting thing to add a video game joystick like this one:
at the back of the tx to control a camera gimbal without taking my fingers off the sticks.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- Devo 8s Modifications - Adding AUX4 and AUX5