DSM2 work

Like DSM2/DSMX? Want to mod your radio to support it? Post your messages here!
Stevie69
Posts: 1
Joined: Fri Dec 30, 2011 11:58 pm
Country: -

Re: DSM2 work

Post by Stevie69 »

MikeB wrote:
cr8tive_leo wrote: B) - With a ar9000 the bind light above throttle flashes constantly, the other two (one on satellite and the other one on the module are solid for most of the time, they randomly flicker, but the frequency is greater than 1 min)

Pat's incarnation had solid bind lights all around. Both still have the twitch on the throttle when hitting right rudder, in both mode 1 and mode 2. (this happens with th9x too btw) all my other rx worked flawlessly. (as far as I could tell)
Here is a standard version of er9x with the changes I described above where I posted the source. Pat pointed out there should be 2 stop bits between bytes, this might make things better.

Mike.
Hi,

I can confirm that this version solves the glitch problems with my MCPX. I had about 5 flights without glitches. Before I had about 2 glitches per flight.

Are there any plans when the changes will be applied to the trunk? (I need the Jeti-Version...)

Greetings and thanks to all of you for your work on this problem.

Stefan.

pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

The one issue getting DSMX to work is that the firmware now puts out 0x00 0x00 as the header, which puts the DX4e module in "France" mode.
According to the DX4e manual France mode does not allow for DSMx.

I think we will need to change the header to 0x18 0x00 to put the module in DSMx/DSM2 mode, but the LP modules might not like that header.
The other problem with France mode is that it is lower power.

Working on this a bit now, but I don't have a DSMx receiver to test with. Also trying to figure out how to implement range check mode.
I was thinking of using one of the custom switches, so that the user could decide how to engage it. Perhaps it should beep and/or say something on the screen to indicate that it is in reduced power mode.?

Pat MacKenzie
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: DSM2 work

Post by ccpetersen »

Would a DX4e DSMX transmitter work?
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

ccpetersen wrote:Would a DX4e DSMX transmitter work?
Yes, that is the module I am using for testing DSMX.

Since it supports DSMX it should work.

Pat MacKenzie
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: DSM2 work

Post by ccpetersen »

pmackenzie wrote:
ccpetersen wrote:Would a DX4e DSMX transmitter work?
Yes, that is the module I am using for testing DSMX.

Since it supports DSMX it should work.

Pat MacKenzie
Thanks Pat, just picked one up on ebay for $15 + shipping. Not a bad deal.

pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

You did better than I did. I paid $45 shipped on RCG (from USA to Canada)

One thing you might want to do when you get it is check the PID number against the recall list.

Mine was on it so I sent it in to be checked out.

http://publications.horizonhobby.com/re ... x=c3f6f1f1
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

Here's da spiel. *for anyone interested*

The dsm protocol works nicely with all flavours of dsm2 rx's, except for my ar9000's.

When I do TAER setup (for spektrums sake) when I do right rudder (channel 4) it does all sorts of nice spill over to the throttle (channel 1).
So I thought, okay, lets just use the default RTEA to see what happens, and voila, it did the exact same thing, Channel 4 corrupting channel 1. Note: this ONLY happens with ar9000's I've tested. My ar8000's are not anywhere close to me to play with.
I've done a work around by assigning channel 6 as throttle. and everything is fine. Only because I have nothing in the channel one port (throttle) on the ar9000. That is now channel 6, or Aux1 on the ar9000. (gear I use for a multi remote switch) Maybe it's just the tx moduel I have and the ar9000... *shrugs* I dont' have another one yet to confirm. (it's on it's way)

Who wants to borrow my ar9000 to play with? :)
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

Try this version with the AR9000. 2 stop bits and 20.6 msec dead time.
Pat MacKenzie
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

pmackenzie wrote:Try this version with the AR9000...
:?
:roll:

*grins* I'd love to... sure it only has 2 stop bits... it's not here... *I'm so bored at work right now, the jokes just get better*
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: DSM2 work

Post by MikeB »

cr8tive_leo wrote:*grins* I'd love to... sure it only has 2 stop bits... it's not here... *I'm so bored at work right now, the jokes just get better*
I think Pat may be referring to the last .hex file I posted on this topic. That has 2 stop bits and about 20.6 mS between frames.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

MikeB wrote:...
I think Pat may be referring to ...
Mike.
That is the version I am running on the Transmitter. (even tried other varients from earlier to see if there was any joy, but.. nada)

trunk-r650
v1.5203-Mike
30.12.2011

All your patience and work is greatly appreciated.
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

I did adjust the dead time a bit in the one I just posted.
I am using 41200 , your earlier one was 39536. The small increase was enough to stop the stuttering in my 6100. Increase it much more and the MCPx stutters.

I see now the attachment did not attach. Give me a minute and I will try again.
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

Here it is , zipped this time.
Attachments
er9x DSM2.zip
(55.57 KiB) Downloaded 662 times
User avatar
Mechcondrid
Posts: 222
Joined: Fri Dec 30, 2011 3:53 am
Country: -
Location: ledyard, connecticut, United States
Contact:

Re: DSM2 work

Post by Mechcondrid »

hey found this over on rcgroups would this work suitable for dsm2 module use?
also if anyone has one of these do you know how much power these put out?
link: http://www.deltang.co.uk
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

DSM2 work

Post by Rob Thomson »

Mechcondrid wrote:hey found this over on rcgroups would this work suitable for dsm2 module use?
also if anyone has one of these do you know how much power these put out?
link: http://www.deltang.co.uk
The £15 dsm2 transmitter modules look interesting.


Sent from my iPhone using Tapatalk
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

pmackenzie wrote:Here it is , zipped this time.

Haven't tried the ar9000 yet... I'm having seizures when led back light turns off... it flickers like the dickens. it's actually cool.. but scary at the same time.
Will let you know how it fairs with the ar9000 in the new year.

Cheers, HAPPY NEW YEAR!
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

cr8tive_leo wrote:
pmackenzie wrote:Here it is , zipped this time.

Haven't tried the ar9000 yet... I'm having seizures when led back light turns off... it flickers like the dickens. it's actually cool.. but scary at the same time.
Will let you know how it fairs with the ar9000 in the new year.

Cheers, HAPPY NEW YEAR!
My bad :oops:
The version I posted had some of my timing/debugging code in it that uses the backlight line to spy on the code.
The backlight driver on my SmartieParts board died very early, so I don't see any light show on mine.

I will post a "clean" version tomorrow, with some enhancements:

-The ability to select LP/France DSM2only and DSM2/DSMX mode for the DX4e module.
The operating mode is stored in the model data in the "number of PPM channels" area, so no change to the eeprom structure, but eePe is a bit confused.
-Range check mode selected with Custom switch "C" so the user can decide how to activate it.

Pat MacKenzie
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

Here is my latest version, with the "spy" code turned off and the backlight code enabled.
Also in the zip is pulses.cpp,menus.cpp ,er9x.h and my latest mcpx eepm file.
I have toned down the cyclic a bit in the latter, adjusted the pitch curves for more negative,throttle hold is back on THR
SW6 to enable range check mode is set to require rudder low rate and the trainer switch to be pulled.

Most of the changes are in pulses.cpp. menus.cpp has been changed to add the selection of DSM type, and er9X has some defines that menus.cpp needs.

There are three modes, selected in the protocol menu:

LPxDSM uses the 0x00 0x00 header. With the AMTX11 module it puts it in "France" mode. Lower power and no DSMX support.

DSM2only mode uses 0x10 x00. According to the DX4e manual this is to support 11msec 2048 bit receivers. Perhaps the AR9000 will work better in this mode?

DSMX mode uses 0x18 0x00 as the header. DSMX capable receivers will bind in DSMX mode, non DSMX will bind in DSM2 mode.
Once it has bound in one mode it will not work with receivers that were previously bound in the other mode until you rebind them.
In other words binding sets the mode of the transmitter

When you change modes you have to reboot for the change to take effect, since the header is set on initial power up.

Pat MacKenzie
Attachments
dsm2 er9x.zip
(97.01 KiB) Downloaded 720 times
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

DSM2 work

Post by Rob Thomson »

My mod to enable the tx module to be switched on and off may be usefull here?

Power cycle the dsm module to save the reboot :)


Sent from my iPhone using Tapatalk
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

It is not just the module, the way the firmware works right now it sets the mode on the first pass through the routine after initial power up.
This is done in part so you don't enter bind mode other than on power up, same as normal Spektrum practice.
It also stops it from being in range check mode during bind as well.

The first byte is set to FF by the compiler/boot section where all initial values are set.
setupPulsesDSM2 checks for any of the bits that should be zero are ones, and if they are then it assigns the correct value for the selected mode. (This also guards against the data being corrupted, however unlikely that is)
Then it looks for the trainer switch, and if it is not pulled clears that bit.
Finally the bind bit is checked, and only if it is cleared does it set the range check mode bit based on the value of custom switch "C"
(I chose C assuming most would use the lower numbers first so it would be less likely to interfere with previous setups)

All of this is done with a static variable internal to the routine, so no way to access it from outside to reset the mode.
You could do something like check for the mode to change, but then you would have to set up the module for power cycling.
Seems simple enough to require a power cycle.

Default mode is DSM2/DSMx, and it seemed like the low power modules worked fine with that header instead of the correct 0x00 0x00 one anyway :?


Pat MacKenzie
Clivew
Posts: 338
Joined: Tue Dec 27, 2011 8:08 pm
Country: -
Location: Stroud, Glos, England

Re: DSM2 work

Post by Clivew »

Pat, MCPx binds fine in both DSMx and DSM2, but I don't seem to have a throttle
control anymore, pitch is ok. Using FRSKY version originally, so get "switch error"
on switch on of course.

P.S. scrapped the throttle hold and all is well!
It's a detail I'm sure..with the first version T/H worked.
Looks like it's reversed somewhere on this one?
Anyway, given the FRSKY version I think all will be 100%
Thanks for your efforts again!
Clive
Last edited by Clivew on Mon Jan 02, 2012 12:42 am, edited 4 times in total.
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

Well, everything works still, with all the 'modes' for dsm2. (is the dx4e a hp module?) All the rx's still function, all but the ar9000's ... and they work with a cheapo 4ch spectrum radio. Still need to install the other tx module, to see if that makes a difference. I made videos of the funky dance. Maybe it's just 3 defective ar9000's? who knows.

Range test, haven't tested that, what is rudder low? (just curious... I'm thinking rudder at -100... )

cheers.
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

AFAIK, DX4e is a full range module.

From the manual:
The Spektrum DX4e 4-channel transmitter incorporates 2.4GHz DSM technology
offering full beyond-the-limits-of-sight range and is ideal for sport-sized electric
and glow-powered 4-channel or fewer airplanes.
SWC on is the trigger for range check.
In the MCPx file I used
SWC AND RUD TRN
so you have to flip the rudder D/R switch toward you and pull the trainer switch.

Change it to
SWC AND RUD ON

and all you have to do is put the rudder D/R switch toward you. Easier to do for testing, not as safe for flying.
Safest would be to change it to something that never comes on, like

SWC AND RUD OFF

when you are done testing.

Bummer about the AR9000 :(



Pat MacKenzie
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

The thing that gets me with the ar9000 , it's a 'bleed' between the 4th channel and the 1st channel. I can throw throttle on channel 6 and it will work (mind you I loose channel 1.... or I can just stick an led on it and it will flash and look cool, and look like it was meant to do that... ). *shrugs* Or I just buy a dx7s... :lol: NOT.

Ar6200's work fine too, with satellite. Everything binds fine.

Everything else is wonderful for now. (my throttles work fine) Thanks again for all the coding.
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

All these I test every time there is a new er9x firmware... plus a ar6200 not in the picture.

Image

This is one of the three ar9000's that doesn't like to play with the others.. dumb ar9000... :twisted:

Image

Next to play with range check...

Could the channel 'flutter' be caused by the rx expecting a full 9 channels of data string varible thingy? And since the tx modules we use only have 6channels (so the data length isn't correct for the ar9000 to demux, decode, de whatever), that would be causing it? I'm just thinking out loud... no real experience in programming this type of thing, lots of other programming experience.. just not relevant for this stuff. (Give me Avid and I can do magic)
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

You said it works fine with the "cheap 4 channel". I assume you mean the LP4DSM which also only puts out 6 channels, 4 working 2 just static data. The data rate is a bit different on the LP4 though.

Do they work with the DX4e?

Pat MacKenzie
Clivew
Posts: 338
Joined: Tue Dec 27, 2011 8:08 pm
Country: -
Location: Stroud, Glos, England

Re: DSM2 work

Post by Clivew »

Pat,
I didn't explain the throttle problem very well, in fact I don't think it will be a problem when the frsy
version is done. It is only that with the same eeprom, (with throttle hold) the first fix allowed the motor
on my MCPx to run, the last update "held" the throttle closed. Removing "R-100% MAX THR" from the throttle
mix allows me to fly it. I appreciate the switch itself won't do anything yet.
Everything is working well, NO glitches with both lp4 and DX4e modules, DSMx seems fine as well.
Brilliant work, thankyou! :D

Clive
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: DSM2 work

Post by cre8tiveleo »

pmackenzie wrote:You said it works fine with the "cheap 4 channel". I assume you mean the LP4DSM ...
With the actual Parkzone spektrum radio (cheap 4 channel radio, came with some um planes). I haven't dissasembled it to rip the lp4dsm out and then try it with er9x. ;) When I get some time to do it, I will and see how it works with it. (which would be tomorrow, my day off.. yeah.. finally)
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: DSM2 work

Post by MikeB »

Are we at a point where Pat's latest code update should be put on as the latest revision of er9x? It seems like it is quite reliable. It can always be tweaked further later.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
pmackenzie
Posts: 236
Joined: Tue Dec 27, 2011 11:19 pm
Country: -
Location: Don Mills, Ontario

Re: DSM2 work

Post by pmackenzie »

I think eePe would have to also be updated to get the correct functioning of the protocol menu item.
I have no idea how to do that :oops:

The final item I still want to look at is latency. It is likely not that good right now (or at least not as good as it could be), since the outputs for the next frame are locked in ~20 msec before it is sent.
The call to setupPulsesDsm2() would ideally be done just before the beginning of the frame, however the timing is important since it seems like the modules are quite sensitive to the frame width.
Moving it to ~2 msec before the start of the next frame would be a big improvement, and probably safe enough that it will always get completed in time even if a different interrupt comes along and disturbs it.


Pat MacKenzie

Post Reply

Return to “DSM2/DSMX Mods”