Hubsan H122D Devo 10 Model ini

More
18 Apr 2018 18:30 - 18 Apr 2018 18:40 #68726 by FireAngel
Hubsan H122D Devo 10 Model ini was created by FireAngel
I have made a 10 channel simple switch model ini for the Devo 10 Hubsan H122D quad from the channel mapping info below that SeByDocKy gave me.

CHANNEL1 = 0, // Aileron
CHANNEL2, // Elevator
CHANNEL3, // Throttle
CHANNEL4, // Rudder
ChANNEL5, // Leds
CHANNEL6, // Flip (or Altitude Hold on H501S, Stabilized mode on/off on H301)
CHANNEL7, // Still camera
CHANNEL8, // Video camera
CHANNEL9, // Headless
CHANNEL10, // RTH
CHANNEL11, // GPS HOLD

I have assigned to the following switches,

CHANNEL1 = 0, // Aileron
CHANNEL2, // Elevator
CHANNEL3, // Throttle
CHANNEL4, // Rudder
RUD DR CHANNEL5, // Leds -100 OFF +100 ON
ELE DR CHANNEL6, // Flip (or Altitude Hold on H501S, Stabilized mode on/off on H301)
GEAR CHANNEL7, // Still camera
MIX CHANNEL8, // Video camera
AIL DR CHANNEL9, // Headless
FMODE CHANNEL10, // RTH

Channels 1,2,3,4,5,7,8 work ok and it flys good, But i cant get channels 6,9,10 to work these should be,

OSD on/off (dont think this works when not using original controller)
SPORT Mode on/off
Flip Direction on/off

They are working on the devo 10 channel monitor as -100 OFF +100 ON but does not do anything on the quad.
Sport and flip on the original controller work by pressing(clicking) the sticks down if that makes a difference?

How do i get these working as this quad does not use betaflight to see whats happening?

Thanks

File Attachment:

File Name: MODEL7.INI
File Size:4 KB



name=H122D ORIG 501
mixermode=Advanced
type=plane
[radio]
protocol=Hubsan4
num_channels=11
fixed_id=123456
tx_power=10mW

[protocol_opts]
Format=H501
vTX MHz=5830
Telemetry=On
Freq Tune=0

[channel1]
template=simple
[mixer]
src=AIL
dest=Ch1

[channel2]
template=simple
[mixer]
src=ELE
dest=Ch2

[channel3]
template=simple
[mixer]
src=THR
dest=Ch3

[channel4]
template=simple
[mixer]
src=RUD
dest=Ch4

[channel5]
reverse=1
template=simple
[mixer]
src=RUD DR0
dest=Ch5
curvetype=expo
points=0,0

[channel6]
reverse=1
template=simple
[mixer]
src=ELE DR0
dest=Ch6
curvetype=expo
points=0,0

[channel7]
reverse=1
template=simple
[mixer]
src=GEAR0
dest=Ch7
curvetype=expo
points=0,0

[channel8]
reverse=1
template=simple
[mixer]
src=MIX0
dest=Ch8
curvetype=expo
points=0,0

[channel9]
reverse=1
template=simple
[mixer]
src=AIL DR0
dest=Ch9
curvetype=expo
points=0,0

[channel10]
reverse=1
template=simple
[mixer]
src=FMODE0
dest=Ch10
curvetype=expo
points=0,0

[trim1]
src=LEFT_V
pos=TRIMLV+
neg=TRIMLV-
[trim2]
src=RIGHT_V
pos=TRIMRV+
neg=TRIMRV-
[trim3]
src=LEFT_H
pos=TRIMLH+
neg=TRIMLH-
[trim4]
src=RIGHT_H
pos=TRIMRH+
neg=TRIMRH-
[timer2]
type=countdown
time=10
[datalog]
switch=None
rate=1 sec
[safety]
Auto=min
[gui-128x64]
V-trim=59,10,1
H-trim=5,59,3
V-trim=65,10,2
H-trim=74,59,4
Small-box=2,22,Ch3
Small-box=2,31,Timer1
Small-box=2,40,Timer2
Model=75,20
Battery=102,1
Toggle=4,10,0,3,0,RUD DR
Toggle=13,10,0,5,0,ELE DR
Toggle=22,10,0,4,0,AIL DR
Toggle=31,10,0,0,0,None
Toggle=40,10,0,0,0,None
TxPower=102,7
quickpage1=Telemetry monitor
[voice]
Attachments:
Last edit: 18 Apr 2018 18:40 by FireAngel.

Please Log in or Create an account to join the conversation.

More
14 May 2018 12:57 #69215 by fynn00
Replied by fynn00 on topic Hubsan H122D Devo 10 Model ini
Same thing with my H122D, Deviation on Jumper T8SG plus.
With your model.ini the little race copter did not even release the rotor lock.
I had to delete the last channels and now it works like a charm. However still not able to use flip mode or headless but I don't need any of it.

Here is my model.ini

By the way: I have also used telemetry of the H122D which is just the copter's voltage. Very helpful. It start at 8.4 V and if it goes below 6.8 the copter starts to use it's speaker. On the transmitter display it is very helpful to see the actual voltage.

I have also created an icon. You can find it in the icon section of this forum.

Cheers
Flow
Attachments:

Please Log in or Create an account to join the conversation.

More
14 May 2018 13:07 #69216 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini

FireAngel wrote: i cant get channels 6,9,10 to work these should be,

OSD on/off (dont think this works when not using original controller)
SPORT Mode on/off
Flip Direction on/off


Those functions have never been implemented into the Hubsan X4 / H501 protocol, can you dump the SPI bus inside your stock transmitter so we can add them ?
www.deviationtx.com/forum/protocol-devel...95-spi-capture-guide

Please Log in or Create an account to join the conversation.

More
30 Jun 2018 21:31 #69743 by AggieRC
Replied by AggieRC on topic Hubsan H122D Devo 10 Model ini
Sport mode is purely controller side iirc, it's just a change in rates from the transmitter.

Please Log in or Create an account to join the conversation.

More
18 Aug 2018 13:00 #70322 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Hi!

Just got my logic analyzer in the mail.

I opened the H122D TX and found that the pins of the chip are actually labled:

G
SCS
SCK
O
O1 (or OI, it's just so small I cant read it properly)
T
R
+

So G is ground, SCK the clock. Now I have to find out MOSI, MISO and Enable. I think that this will be O, O1 and SCS, but I'm not completely sure. Anyone can help with this?

Please Log in or Create an account to join the conversation.

More
18 Aug 2018 13:17 - 18 Aug 2018 13:23 #70323 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
A7105 in Hubsan TXs is usually used in 3-wire spi mode, we need scs, sck and dat (perhaps that's OI). In doubt just connect ground to ground then connect all the other probes to the remaining pads (except +).
Last edit: 18 Aug 2018 13:23 by goebish.

Please Log in or Create an account to join the conversation.

More
18 Aug 2018 14:01 - 03 Sep 2018 06:45 #70325 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Thanks for the quick reply!
Last edit: 03 Sep 2018 06:45 by GermanDroneGuy.

Please Log in or Create an account to join the conversation.

More
18 Aug 2018 16:53 - 03 Sep 2018 06:45 #70330 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Oh and if this works, here are the captures from the H123D (from flight mode 1, to 2, to acro)
Last edit: 03 Sep 2018 06:45 by GermanDroneGuy.

Please Log in or Create an account to join the conversation.

More
18 Aug 2018 19:42 #70332 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
That's not good, OI isn't dat.
Capture again with O, T and R connected as well.

Please Log in or Create an account to join the conversation.

More
20 Aug 2018 15:45 - 03 Sep 2018 06:45 #70356 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Did just that:

I named the channels respectively.

First capture is the OSD-Button (H122D)
Second capture are the flips (flip button then left, flip button then right, flip button then forward, flip button then backward) (H122D)
Third capture are flight modes (Sport mode 1, Sport mode 2, Acro) (H123D)

I assumed that the pins would from the H123D controller would be the same as the H122D's.
Last edit: 03 Sep 2018 06:45 by GermanDroneGuy.

Please Log in or Create an account to join the conversation.

More
20 Aug 2018 17:26 #70361 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
Seems fine (O = data), I can't look in detail right now, but stay tuned ;)

Please Log in or Create an account to join the conversation.

More
24 Aug 2018 17:17 #70433 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Awesome, can't wait :)

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 15:53 - 29 Aug 2018 20:46 #70529 by planger
Replied by planger on topic Hubsan H122D Devo 10 Model ini
@Goebish
I've looked at the dumps and I've done the following modifications in Multi here:https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Multiprotocol/Hubsan_a7105.ino
Basically I've added the H122D_FLIP, H122D_OSD, H123D_FMODES flags in the H501 sub protocol.
enum{
	// flags going to packet[9] (H501S)
	FLAG_H501_VIDEO     = 0x01,
	FLAG_H501_LED       = 0x04,
	FLAG_H122D_FLIP     = 0x08,	//H122D
	FLAG_H501_RTH       = 0x20,
	FLAG_H501_HEADLESS1 = 0x40,
	FLAG_H501_GPS_HOLD  = 0x80,
	};

enum{
	// flags going to packet[11] (H122D & H123D)
	FLAG_H123D_FMODES   = 0x03,	//H123D 3 FMODES: Sport mode 1, Sport mode 2, Acro
	FLAG_H122D_OSD	    = 0x20,	//H122D OSD
};
...
			packet[9] = 0x02
					   | GET_FLAG(CH6_SW, FLAG_H501_LED)
					   | GET_FLAG(CH8_SW, FLAG_H501_VIDEO)
					   | GET_FLAG(CH13_SW, FLAG_H122D_FLIP)
					   | GET_FLAG(CH5_SW, FLAG_H501_RTH)
					   | GET_FLAG(CH11_SW, FLAG_H501_GPS_HOLD)
					   | GET_FLAG(CH9_SW, FLAG_H501_HEADLESS1);
			//packet[10]= 0x1A;

			//packet[11]= 0x00;	// default
			//H123D specific -> Flight modes => Does this needs to be a sub_protocol to work?
			packet[11] = 0x41;	// Sport mode 1
			if(Channel_data[CH14]>CHANNEL_MIN_COMMAND)
				packet[11]++;	// 0x42  Sport mode 2
			if(Channel_data[CH14]>CHANNEL_MAX_COMMAND)
				packet[11]++;	// 0x43 Acro
			//H122D specifics -> OSD => Does this needs to be a sub_protocol to work?
			packet[11]|= 0x80
					   | GET_FLAG(CH15_SW,FLAG_H122D_OSD);

As I've written in the code I don't know if adding the flags will not cause troubles between the different models. The good thing is that the flags do not overlap so it looks to be working from my perspective.

Pascal
Last edit: 29 Aug 2018 20:46 by planger.

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 19:49 #70534 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
Thanks Pascal !
I'll take a look at that and make a test build for GermanDroneGuy.

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 20:24 #70535 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
You guys are awesome! Are there instructions on how to compile this for the Jumper T8SG / T8SG V2?

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 20:38 #70536 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
I've to merge it into deviation then I'll make a test build, which transmitter do you have ?

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 21:50 - 29 Aug 2018 22:04 #70542 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
Here are some test builds:
www.dropbox.com/sh/corsvt4dgi6x3ng/AAAEf...6_VdbG9HIaLQura?dl=0

Mode = Channel 12 -> 3 way: Sport 1 (-100) / Sport 2 (0) / Acro (100)
OSD = Channel 13
Flip = Channel 14

Setup your model accordingly then report :)
Last edit: 29 Aug 2018 22:04 by goebish.

Please Log in or Create an account to join the conversation.

More
29 Aug 2018 22:54 #70543 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini

planger wrote: As I've written in the code I don't know if adding the flags will not cause troubles between the different models. The good thing is that the flags do not overlap so it looks to be working from my perspective.


If any H501 user complains we'll know what's wrong, but I suppose this option byte is just ignored by the H501.

Please Log in or Create an account to join the conversation.

More
30 Aug 2018 14:41 #70555 by GermanDroneGuy
Replied by GermanDroneGuy on topic Hubsan H122D Devo 10 Model ini
Hi everyone!

Just came back from testing the build.

For short: Flips work on the H122D! There is one thing I noticed: The quad performs a flip as soon as you arm it, throttle up and push the right joystick in any direction. Otherwise it's working gread (give channel 14 100% for a short period of time and then press the right stick in any direction). I could not test the OSD button yet but will do this asap.

Flight modes on the H123D work great! This works better than the TX that came with the quad! Flying in the "Acro" mode is now super smooth!

Great work guys!

Please Log in or Create an account to join the conversation.

More
30 Aug 2018 15:46 #70556 by goebish
Replied by goebish on topic Hubsan H122D Devo 10 Model ini
You mean the H122D flip function is enabled after arming whatever the position of channel 14 is ?
I had a look at the code and there's no reason why, this flags (0x08 in packet[9]) is only enabled if channel 14 > 0.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum