HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Feb 05, 2013, 09:14 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
Thank you!You clarified a lot of things for me.Maybe that is the root cause of your problem, .......the A7105 ID.
One more.How about Tx ID code, if it can be randomly generated?
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 05, 2013, 10:12 AM
Registered User
Joined Jul 2012
5 Posts
http://pelikandaniel.com/?sec=product&id=55735&lng=en

This is the link to the rtf heli that I would like to adapt it for the Turnigy 9X. I opened it and in the transmitter is only an MCU that it is sending directly signals to A7501 -> amplifier -> antenna. From here it is catched by antenna again -> A7501 -> amplifier... or no MCU... and directly to servos and motors.

Is it possible to send directly PPM signal to A7501 module?

I will bring some pics with the module maybe you can figure out what is it. I hope this evening.

And another question if I will need to program A7501 module, how to do it? Do I need a serial adapter or something like this?

Thank you for your answer!
archaeon is offline Find More Posts by archaeon
Last edited by archaeon; Feb 05, 2013 at 10:18 AM.
Reply With Quote
Old Feb 05, 2013, 10:36 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
No, is not possible to sent directly PPM signal to A7105.PPM signal need decoded first by an MCU and after sent data to the A7105 by SPI interface.
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 05, 2013, 11:21 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by ThierryRC View Post
so it looks like A7105 ID (register x06, not TX ID) is also important...
perhaps that's why my homemade TX is not binding with my quadcopter...
chip id is critical and cannot be omitted.

but i think there are more problems than that. it looks like the flysky protocol has not been correctly defined yet. only about 1/3 of the dozens of radios i tried bind properly using pb (and your) hopping code. another 1/3 will bind but skip many channels. in some cases only one channel is received. this is not obvious because even with one channel it appears to be working fine (ie dsm, my first m8 demo, and other non-hopping radios). only a few of the radios i tested actually function correctly according to the current model. using different methods ive managed to get all but one working and that may be a hardware issue.

imo the flysky protocol has not been completely reverse engineered yet.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 05, 2013, 11:48 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
dave,
Please feel free to give me a hand understand the coding and protocol.I know you have extensive knowledge on avr assembler.I still don't undesrtand what is with TX ID and channels table.
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 05, 2013, 12:03 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
yes, they call me "dave the atmel whisperer". thats why i answer all your questions in the other threads. the first thing you need to do is decide if assembler is the right language. i was forced into it because of limited netbook resources (ssd). maybe thierry does it because he is a masochist. i hated asm at first because its so tedious but now see big advantages over basic and c for small chips and programs.

no matter what language first step is getting tools up. did you blink the led? print "hello world"? next step imo would be to examine and understand pb and/or thierries code. certainly easier than the undocumented spaghetti i have been cooking up. another reason why i dont publish source. getting stuck in endless discussion about why that was done or why this way. mostly i want to show how to make something. you do need to roll up your sleeves and go to work. im always glad to help answer specific questions. ("how do i make a flysky tx?" is not a good one. lol!)
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 05, 2013, 12:24 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
I'm a newbie but not ........quite at the beginning,........ with blink the LED and hello world.it is not the first time I wrote code but I was not interested in and I abandoned programming many years ago.My interest came back when coming in contact with RC stuff. I already red thierry code and i understand 70% of it not so complicated to read .I choose Avr assembler because it seems to me atm simpler and straight forward than high level language as C or C+.I need to step further to understand arrays of data and coding them in avr.I already wrote 70% of the code in avr assembler.
Also I don't understand how TX ID is generated and how is linked to the array data table.I don't need you write code for me.
I'm like a pitbull......lol!
midelic is offline Find More Posts by midelic
RCG Plus Member
Last edited by midelic; Feb 05, 2013 at 01:03 PM.
Reply With Quote
Old Feb 05, 2013, 12:37 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
hi archaeon, welcome to the monkey house rcgroups. this place is a ton of fun and lots to learn.

Quote:
Originally Posted by archaeon View Post
This is the link to the rtf heli that I would like to adapt it for the Turnigy 9X.
if it is not already compatible (a7105 is a hint it might be but not certain) then by far the easiest solution is to put a v911 board in it. they are cheap. building a custom rx will probably cost 10x more and take 2-3yrs if you are not experienced.

Quote:
Originally Posted by archaeon View Post
And another question if I will need to program A7501 module, how to do it? Do I need a serial adapter or something like this?
you need to attach a micro as midelic explains. some that have a bootloader (arduino, arm, stm) can be programmed with a cheap ebay serial dongle. raw avr and pic chips need to be programmed with a programming dongle. the avr ones are $2-$3 on ebay and the pic ones are $10-$20. google is your friend.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 05, 2013, 12:44 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by midelic View Post
I don't understand how TX ID is generated and how is linked to the array data table.
to get a start on this id stuff read this thread from the start. i had to go through it several times before the light bulb went on. and pay careful attention to the answers thierry gave you. they were informed and complete.

but, like i said, there are issues with the binding and hopping so take what you read here with a grain of salt. i wasted many hours due to the misprints and typos mentioned here so far and a few that havent come up yet. but ill say there is no way i would have succeeded w/o this thread. 99% of the info is gold. its that dam 1% that can drag you down into the depths of hell.

i know you are a pitbull. remember, they are the ones that get the bone!
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 05, 2013, 06:02 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
77 Posts
ok, TX and RX are binding !

I have read this thread again from the beginning and everything was there !
and on certain points I was wrong.

first, as said zeza and pb (=phracturedblue) TX send on channel + 1 than RX.
As example for binding TX sends on channel 1 and RX listen on channel 0.
Don't ask me why I don't know, but if someone knows the answer...

second, modelic was hooked on A7105 ID meaning and he was right !
A7105 TX and A7105 RX must have the same ID code (the ID automatically added before payload = register 0x06) otherwise rx packet is eliminated by RX!!! btw the good ID is 0x2AC57554 and not 0x5475C52A as I wrote in program comments... I think every flysky compatible RX/TX have the same A7105 ID.

third, in pic program I wrote, I have not implemented all 256 possible hopping sequence, only the 16 first ones... It worked because TX ID of my radio (quadcopter) is 0x30 00 00 06. (0x06 < 0x10=16)
If TX ID0 byte (less significant byte) is > 0x0F then you have to follow procedure explained by pb in post #43 of this thread.
I'll implement it soon.

but now I work on PPM reading code (I have only a TX bind program at the moment) and I'll post the full program when TX works...
ThierryRC is offline Find More Posts by ThierryRC
Last edited by ThierryRC; Feb 05, 2013 at 06:17 PM.
Reply With Quote
Old Feb 05, 2013, 09:37 PM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
Wonderful!
I just wait your final full program.
I know you are very well organized so please comment it as usual.
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 06, 2013, 10:58 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
thierry, your program looked to me like an excellent implementation of the protocol described here. however, as i said, im convinced the description in this thread is not a complete analysis of the flysky hopping method.

Quote:
Originally Posted by ThierryRC View Post
As example for binding TX sends on channel 1 and RX listen on channel 0. Don't ask me why I don't know, but if someone knows the answer...
my radios and rx all use ch0 (lowest) during bind phase. i cant imagine how this could work otherwise. some of my tx use ch0 after bind too.

Quote:
Originally Posted by ThierryRC View Post
btw the good ID is 0x2AC57554 and not 0x5475C52A as I wrote in program comments... I think every flysky compatible RX/TX have the same A7105 ID.
this dont seem like a real issue. imo your original comment is best because thats the order the tx sends the id and its how i do it. all data is sent little endian including servo timing so it seems ok to use that in documentation and commenting. makes debugging easier too.

Quote:
Originally Posted by ThierryRC View Post
third, in pic program I wrote, I have not implemented all 256 possible hopping sequence, only the 16 first ones...
you maybe mean to say "not implemented all 16 hopping sequences, only the first one". or "only the first row". a sequence (row) contains 16 bytes (columns). there are 16 repeating sequences. so instead of:

andlw 0xF0 ;row=tableOffset <- (id0 & 0x0F)*1

your code should be:

andlw 0x0F ;row=tableOffset <- (id0 & 0x0F)*1
then shift left 4 ???

or:

shift rt 4 then
andlw 0xF0 ;row=tableOffset <- (id0 & 0x0F)*1

i dont see why the issue was confused with all that modulus baloney. we are just talking digits here because "mod 16" is same as "and 0xf".

btw how are you checking your algorithm?

as i mentioned if you hit only one channel and missing all the others the radio still seems to be working ok even if its not. servos are refreshed at same rate as if all 16 channels are hit. theres just no real hopping. i flash an led on missed channels and was surprised to find the protocol described here failed on most of my radios. in fact some didnt work at all. now with different methods those same tx hit 100%.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Feb 06, 2013 at 11:22 AM. Reason: shift left not rt
Reply With Quote
Old Feb 06, 2013, 11:27 AM
Registered User
midelic's Avatar
Joined Apr 2012
3,873 Posts
Actually for his ID 30 00 00 06.......... the 7 th line(row).

Quote:
Originally Posted by ThierryRC View Post
The 4 least significant bit of TX id gives line number of "sequence table".
As example TX id of my mini quadcopter (H36 vitality) is 30 00 00 06 so channel sequence is the 7th line of sequence table (first line number is 00).
TX sends a new packet (contains TX id, and servos position) every 1,46ms.
midelic is offline Find More Posts by midelic
RCG Plus Member
Latest blog entry: DIY Multiprotocol TX Module
Reply With Quote
Old Feb 06, 2013, 11:37 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
correct-a-mundo. (so you ARE getting the hang of this!) although i do prefer to call it 06 00 00 30 like the radio itself does.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Feb 06, 2013, 11:41 AM
Registered User
Joined Jan 2012
682 Posts
The hopping scheme was determined using a V911 receiver. So the protocol is only as good as the V911 implementation. I believe it is robust for that Rx, and it works fine for my Turnigy 8ch Rx, but there well may be other factors as well. Also it was one of the 1st, and the documentation is not as thorough as some of the more recent protocols I've worked on.

These days, it is much easier to do automated analysis like was done for DSMX. Using a RPi as the Tx, and using a Logic analyzer on the Rx also attached to the RPI, plus using one of the GPIO to power on/off the Rx, it is possible to capture thousands of sequences in quick order.

But I don't think you'll get much from a V911. It would be better to repeat the process with one of the Rx that doesn't work so well.
PhracturedBlue is offline Find More Posts by PhracturedBlue
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question 9X - FlySky/iMax/Turnigy/Eurgle FOR DUMMIES aeajr Radios 1016 Nov 18, 2014 06:53 PM
Discussion Benefits of buying FlySky TH9x (v2) over Turnigy 9x (v2) wwfisher Radios 71 Nov 06, 2014 09:02 PM
Found turnigy 9x/flysky 9x wanted!!! kremecheze Aircraft - General - Radio Equipment (FS/W) 2 Mar 25, 2012 05:04 PM
Wanted ER9x or Turnigy/Flysky 9x daign FPV Equipment (FS/W) 0 Mar 22, 2012 07:21 PM
Found Turnigy/FlySky/Eurkle/etc 9X Shell flyandi Aircraft - General - Radio Equipment (FS/W) 0 Mar 11, 2012 07:12 PM