Espritmodel.com Heli Air
Reply
Thread Tools
Old Dec 23, 2012, 03:37 PM
Registered User
Joined Dec 2012
20 Posts
Hi,

I got my A7105 board. As I mentionned before, I would like to do a small RX which can provide PPm output rather than have 8 ch PWM output.

I'm analysing the protocole in the RX and I have not finished yet but I think to be able to reproduce it. It will be compatible to TX 9x turnigy.

It seams they are about 3 of us to work on it and we mind go faster if we work together. It will be a pleasure to share my result with all of you.

ThierryRC : It seam that Turnigy Rx use a Philips µC, but if you know the RX protocole, you can use almost all brand you like.
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 24, 2012, 09:44 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
72 Posts
Hi,
All information about protocol I have comes from PhracturedBlue (this thread) who did a great work. I think it is sufficient to do a small RX.
I'll take a pic18F14k22 (or 18F13K22) just because I am used to it.
I just have to change value of a config register (A7105) to work in 4 wire mode, because 18F14K22 does not support 3 wire mode (strange microchip did not implement it...).
I have also just received A7105 boards. Mine is "XL7105-SY-B" from "electrodragon" but I know there are several different boards however very similar.
What is yours ?
I start to design pcb (I currently use proteus/isis/ares software).
Of course I'll share all the design if it works but for the moment I can't be more help.
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Dec 24, 2012, 03:51 PM
RC beginner
New York
Joined Oct 2008
4,355 Posts
hi Surfbreizh and ThierryRC,

welcome to the fun. glad to see phracturedblue was able to lure you out into the open with this great thread. its also good to see somebody else interested in the rx side of things. and it looks like everybody has those a7105 boards to experiment with which is a good start. ive got all 4 types and they seem to be interchangeable in that they work in my socketed v911 radios and rx prototypes.

im using the atmel tiny24 family of chips for my design. i also used assembler insread of c to get my initial design working so that code wouldnt be of much use to a pic fan. another drawback is theres no binding involved so not really on a par with commercial units yet. but out at the park with a few buddies saturday we did manage to get 4 planes in the air simultaneously w/o problems so i must be getting some of it right. lets bang our heads together and report on progress and see what happens.

thanks again to the phracomaniac for getting me started on this. i never would have gotten to step one w/o his hard work. if you saw the other threads you know hes definitely king of the protocol breakers.

btw you really dont need a resistor for 3 wire as long as you remember to change TRIS register when its time to receive. also note that these boards work fine in 4 wire mode too. ive sucessfully tried all four ways of doing spi: hardware/bitbang 3wire/4wire. i finally settled on 3 wire because less soldering and bitbang because avr has relatively crummy spi. at least compared to pic. even so i used to be pic guy but im definitely avr fanboy now.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Dec 24, 2012 at 04:09 PM. Reason: 4 vs 3 wire
Reply With Quote
Old Dec 26, 2012, 08:48 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
72 Posts
hi,

RX pcb is drawn!

You can find all drawings (schématic, top copper, botom copper, gerber files, proteus files) at this adress:
http://thierry.pebayle.free.fr/RX_A7105/

The trouble with these A7105 boards is that "clock out"(A7105 16Mhz clock out to microcontroller) is not available ! So I needed an other crystal for microcontroller. On A7105 regular receivers there is only one 16Mhz crystal..

My goal was to design a 6 channels RX that could be done easily "at home" with a printer, uv lamp, a bowl of perchloride, a "dremel", a small iron and good eyes! That means:
* minimum width traces are 25/1000" (0.65mm)
* minimum width via are 70/1000" (1.8mm)
* no via under A7105 board
* SOIC body for pic18F14k22 with 1.27mm pitch (instead of smaller QFP body)
* standard smd crystal (HC-49S body)

Well, result is a 31x26.5mm board. It is difficult to have something smaller with these components and this goal (see the drawings).
Without crystal (using pic internal oscillateur) if you can stand +/-1% ppm timing error then I have another pcb 27x26.5mm (you save 4mm = the width of HC-49S crystal body).

Of course doing this RX is not cheaper than buying a regular RX, but the aim of the game is to learn and to be able to modify it to do special things like ppm output (Surfbreizh), very small receiver (dave1993), for me to do a "all in one" multicopter board, ...

OK, now I have to do it and to program it !!!
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Dec 26, 2012, 11:33 AM
RC beginner
New York
Joined Oct 2008
4,355 Posts
looking very nice!

i can tell you its possible to use one crystal for both parts because its the way i did it and it worked fine. my first few attempts were dead bug style and total weight was less than 200mg. it proved too hard to build in quantity so im using a modified pcb technique and still manage around 1/2 gram with the tiny and 2503 xtl.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Dec 26, 2012 at 11:38 AM.
Reply With Quote
Old Dec 26, 2012, 12:53 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
72 Posts
half a gram ! waouh that's really nice !
Have you got a picture of the "beast" ?
2503 xtl ? you mean a voltage regulator 3v ?
One way to recover A7501 clock out, should be to solder a "piggy" wire directly on A7501 chip "clock out" pin. I thought about it, but without a binocular it seems very difficult. Another way should be to solder a wire on the crystal pin (much easier to do) and go to clock input of microcontroler. That's something you'll never find in books but it might works...
Witch solution did you choose ?
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Dec 26, 2012, 01:53 PM
Registered User
Joined Dec 2012
20 Posts
Hi Thierry and Dave,

It's seams your work is going well. I haven't look at the PCB drawing yet. I'm looking to the protocole in the RX, did you do as well?

I would say that information about protocol from PhracturedBlue is not sufficient to do a small RX, mostly for the setup stage. As far as I went to the SPI, I noticed somes diffirences between TX and RX protocole.

Thierry: Solder a wire on the crystal to the clock input microntroler might not work if you input microntroler is not dedicated to crystal oscillator input.
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Old Dec 26, 2012, 03:32 PM
RC beginner
New York
Joined Oct 2008
4,355 Posts
Quote:
Originally Posted by ThierryRC View Post
half a gram ! waouh that's really nice !
Have you got a picture of the "beast" ?
unfortunately i dismantled the dead bug units to reuse the a7105 chips before taking photos. i do have some pics of the cc2500 frsky compatible rx i built last year which looks almost exactly the same. and i can take some of the new 1/2gram a7105 pcb version when i get home this weekend. it would probably be a good idea to start a new thread devoted to flysky rx and put hardware photos and details there so we dont clutter up this one.

Quote:
Originally Posted by ThierryRC View Post
2503 xtl ? you mean a voltage regulator 3v ?
no. i mean xtl. these itty-bitty gems:

http://www.ebay.com/itm/370697728885...84.m1439.l2649

they are similar to the ones i used on my frsky rx project except in that case 26mhz was required. it was even lighter at 150mg.

Quote:
Originally Posted by ThierryRC View Post
One way to recover A7501 clock out, should be to solder a "piggy" wire directly on A7501 chip "clock out" pin. I thought about it, but without a binocular it seems very difficult. Another way should be to solder a wire on the crystal pin (much easier to do) and go to clock input of microcontroler. That's something you'll never find in books but it might works...
Witch solution did you choose ?
i tried putting the xtl on the avr and running a wire to the a7105 and also putting it on the a7105 which then drives the avr. they both have a clk out option for this purpose and both methods work fine. however currently ive settled on using the avr with no xtl (internal osc).
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Dec 26, 2012 at 04:10 PM. Reason: xtl link
Reply With Quote
Old Dec 26, 2012, 03:50 PM
RC beginner
New York
Joined Oct 2008
4,355 Posts
Quote:
Originally Posted by Surfbreizh View Post
I would say that information about protocol from PhracturedBlue is not sufficient to do a small RX, mostly for the setup stage.

As far as I went to the SPI, I noticed somes diffirences between TX and RX protocole.
actually the initialization values were ok. a few typos in post #1 did slow me down but it was lack of procedure specific to rx which really caused trouble. finally usng the amicom reference program which IS for rx saved the day. i couldnt have finished it w/o both.

i do have to chuckle at phractured blues comment about how easy it would be to write rx code. apparently one manes "easy" is another mans (my) nightmare. lol! but im glad he said that otherwise i never would have started.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Dec 26, 2012, 06:31 PM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
72 Posts
Quote:
Originally Posted by Surfbreizh
I'm looking to the protocole in the RX, did you do as well?
Well, no...

Quote:
Originally Posted by Surfbreizh
I noticed somes diffirences between TX and RX protocole.
bad news. I thought that registers initialisation would be very close because, after init, A7105 enter automaticaly in TX or RX mode when you issue a TX or RX command. Could you possibly list the differences ? I would like to avoid to go into the process of looking the protocol with a logic analyser (by the way not available at my work at the moment) if someone has done it yet...

Quote:
Originally Posted by dave1993
would probably be a good idea to start a new thread devoted to flysky rx and put hardware photos and details there so we dont clutter up this one
Yes that's a good idea.

Quote:
Originally Posted by dave1993
finally using the amicom reference program which IS for rx saved the day.
I missed this "amicom reference". Could you give me this "reference" again ?
By the way, I can read avr assembler, if it can help...

Quote:
Originally Posted by dave1993
I mean xtl
xtl = crystal, ok I understand; english is not my native language (I live in france) ...

So I'll remove pic crystal (replaced by a wire connected to A7105 crystal) and pcb is reduced to about 27x27mm.
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Dec 26, 2012, 06:47 PM
RC beginner
New York
Joined Oct 2008
4,355 Posts
actually same initialization is used for tx and rx. and it is not a good idea to connect another chip directly to the crystal. the a7105 and in my case the avr have special output pins for that purpose. iirc pic does not but it dont matter because they do have clk input option for connection to that special output pin on the a7105.

heres the amicom rx code:
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Dec 27, 2012, 03:23 AM
Registered User
Joined Dec 2012
20 Posts
Quote:
Originally Posted by ThierryRC View Post

I thought that registers initialisation would be very close because, after init, A7105 enter automaticaly in TX or RX mode when you issue a TX or RX command. Could you possibly list the differences ?
I meant that they are pretty close but not exacly the same. At this stage, I analysed the initialisation process which gave me :

Code:
00 00
06 5475C52A
01 42
02 00
03 14
04 00
07 00
08 00
09 00
0A 00


0B 01
0C 21
0D 05
0E 00
0F 50
10 9E
11 4B
12 00
13 02
14 16
15 2B
16 12


17 00
18 62
19 80
1A 80
1B 00
1C 0A
1D 32
1E C3
1F 0F
20 13
21 C3
22 00


24 00
25 00
26 3B
27 00
28 17
29 47
2A 80
2B 03
2C 01
2D 45
2E 18
2F 00


30 01
31 0F
A
02 01
42 01 // 42 is register 02 with read flag. It's waitting return of 0
42 01
42 01
42 01
42 01
42 01
42 01
42 01
42 01
42 01

.....    // other 42 01

42 01
42 01
42 01
42 01
42 01
42 01
42 00
62 07     // From there, RX code are shorter than TX
24 13
25 09
F
0F 05
C
             // Standby of communication until a new trame of SPI
I'm still sampling SPI communication and commenting the previous code. When I got more experiments, I let you both know.
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Old Dec 27, 2012, 08:19 AM
Registered User
France, Alsace, Strasbourg
Joined Dec 2012
72 Posts
thanks Surfbreizh ! I'll look at it this evening...

[QUOTE = dave1993] a7105 and in my case the avr have special output pins [/QUOTE]
I totaly agree with you but if you use "A7501 module" (not a A7501 chip!) then you don't have access to this pin unless you use a thin wire and binocular and I want to avoid this... Of course I have all these tools at work (binocular, hot air hoven...) but I want to design something that can be done with basic electronic tools at home.

Perhaps old pics lack "clock out" pin, but 18F14K22 has it...
ThierryRC is offline Find More Posts by ThierryRC
Reply With Quote
Old Dec 27, 2012, 01:01 PM
RC beginner
New York
Joined Oct 2008
4,355 Posts
good work surfbreizh. as i expected that rx init is exactly the same as the tx. i didnt trace like you but put faith in phracturedblues work because he was operational and it paid off.

btw what rx did you use?
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Dec 27, 2012, 03:10 PM
Registered User
Joined Dec 2012
20 Posts
Your welcome !

I used Eurgle RX (clone of Turnigy/Flysky). I havn't work on Rx today. I played with a STM32F4 discovery.

I will use this previous µC to set my A7105 device (which is almost the same than the NRF24L01 btw).
Surfbreizh is offline Find More Posts by Surfbreizh
Reply With Quote
Reply

Castle Creations      DRIVE / FLY / SUPPORT  

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question 9X - FlySky/iMax/Turnigy/Eurgle FOR DUMMIES aeajr Radios 568 May 10, 2013 06:24 PM
Discussion Benefits of buying FlySky TH9x (v2) over Turnigy 9x (v2) wwfisher Radios 29 Apr 25, 2013 11:00 AM
Found turnigy 9x/flysky 9x wanted!!! kremecheze Aircraft - General - Radio Equipment (FS/W) 2 Mar 25, 2012 04:04 PM
Wanted ER9x or Turnigy/Flysky 9x daign FPV/RPV - Equipment and Vehicles (FS/W) 0 Mar 22, 2012 06:21 PM
Found Turnigy/FlySky/Eurkle/etc 9X Shell flyandi Aircraft - General - Radio Equipment (FS/W) 0 Mar 11, 2012 06:12 PM