|Dec 31, 2012, 11:46 AM|
Joined Oct 2008
build a diy flysky/turnigy rx from SCRATCH!
inspired by phracturedblues reverse engineering of the flysky/turnigy protocol and his devo tx add-on i decided to give homebrew rx a try. although it wasnt quite as easy as predicted, bright eyed and bushy tailed, i set sail. since there were no spi traces or code for a rx available my 1st step was to bring out spi signals on a stock rx (see pic below). i captured the scan sequence and already had pbs init list so it was time to build the prototype shown in next photo. it used mega8 (most popular avr for rc and also arduino compatible) along with a7105 module transplanted from one of my v911 radios. after many hours of pecking away in assembly i finally had something up and running.
encouraged by that success but not quite ready for pcb i threw together a deadbug version. amazingly it weighed less than 150mg and actually worked. range was somewhat less than the prototype with a7105 module but still more than adequate for lrf/indoor which is of course the main application for a rx that size. since then i built several more using modified pc board method and, while not as small and light as the deadbug version, still managed to keep them down to few hundred milligrams. and range was significantly better so now we are talking micro and parkflyer not just lrf. these worked great with both v911 and 9x radios.
in real world tests last week a few buddies and i managed to get 4 planes in the air at once. no sign of interference or dropout (knock on wood). since there are no lightweight flysky compatible rx available they were an instant hit and ive been asked to build a few more. i even got requests to make a few of the deadbug version for REAL micro heads. one fellow has built planes <3gram and is quite anxious to try this instead of ir. i must admit to being very curious to see how that works out.
ive added a photo of the pcb version. unfortunately i canabalized the 1st deadbug so no photos of that. i guess if i give the deadbug method another try should take pics this time. if anybody has questions or wants more info let me know. and suggestions are welcome.
3. actuator & motor pwm for micros
4. rtl routines so plane returns to launch area on lost signal
5. add in multiwii code for multicopter
ill start keeping track here. cant promise to implement them all or in order but next time i fire up software tools we will see what can be done. a lot depends on whether this project takes off and if anybody else builds anything or not. for now its doing what i need.
link to a7105 datasheet: http://www.avantcom.com.tw/AVANTCOM/...SOLVE/18_3.pdf
word to the wise. if you are confused by technical discussions or upset by off topic posts then better to go no further than page one. everything you need to complete the project should be here. let me know if theres anything missing.
seeing thierys success i decided to give my 2nd deadbug, which was a little too dead, another look. it was a mystery why the first one worked but my second didnt (new years resolution: dont take apart the orginal until the copy is up and running). finally figured out what was wrong. good thing too because it was one of the reasons neither of my prototypes worked with certain radios. turns out this particular implementation is very sensitive to adjacent channel crosstalk and the rx must be initialized some distance from the tx. specially ones with powerful output like the 9x or t6. i noticed all the prototypes worked with a low power aliexpress module plugged into the tx but failed with higher power stock modules. sure enough putting a few meters between them gave 100% success.
so heres some photos added of the latest deadbug unit. 150 MILLIGRAMS! this has to be a world record for lightest rx. certainly a flysky compatible. about half the weight of popular deltang spektrum compatible units. now those with turnigy, syma, wlt, etc radios can get in on the lrf or parkflyer fun!
i also improved the half gram 8ch modified pcb version. now has failsafe and simpler link procedure. playing around with antenna configurations i was able to almost double the range. it was already adequate for any model that size to be seen but now your buddy in the next county can watch the plane and give you control instructions over cell phone. lol!
now that this is "warm and fuzzy" (at least warmER and fuzziER) if anybody is interested in giving it a try ill put up a diagram and code. let me know.
as requested this is now a how-to thread so ive uploaded a hex file for the 8chan mega8 version of diy flysky rx. fuses are fuseh=c0 fusel=a4 (8mhz clock). wiring is same as in the prototype photo. only difference using XL7105-SY module instead of the one from v911 radio:
pc4=led 1k to gnd
1. turn on tx.
2. gnd ch8 and apply 3.0-3.6v power.
3. wait 5 sec then release ch8, led goes on (high) to indicate link.
ill add a diagram and more photos when i get a chance. i think this should be enough to get one running now assuming i havent made a mistake somewhere or left anything out.
photos of the most recent prototype have been added. xl7105 instead of v911 module and diode added. the diode on the module allows running the mega8 from 4.2v lipo or 3.3v dc supply yet keeps the module happy with <3.5v. this setup not only used for software development but, even though not in the milligram range, is small enough to be tested and flown in my micro planes.
the tiny avr ppm multiwii rx spinoff project has been moved to post #3.
added cad and gerber files from plc77 excellent design for the mega8 8ch rx. he sent me one and it works great. longest range of any tried so far. thanks plc.
blackmoon sent me a few boards from sadsacks layout. a photo of the unit i assembled was attached here. as mentioned by ss theres a small issue with connector spacing. i think the output pins could benefit from moving further apart and the rows closer together to accomodate 1.27mm header. other than that it almost assembled itself it was so easy and it works great.
i plan to throw this into one of my brushless aero aces. this is really the first time we really have a rx small enough to match the model.
ImagesView all Images in thread
|Jan 01, 2013, 11:55 AM|
Joined Oct 2008
tiny avr ppm rx for multicopter
in addition to the free 8ch version posted above, starting in post #436 i mention i will make available a $5 ic that, when used with 7105 transceiver discussed here, will implement a flysky/turnigy compatible rx w/ppm output. perfect for a diy nano-quad or nano-tri based on multiwii or other open source firmware. by far the smallest and lowest cost flysky compatible rx available.
combined with my diy quad (http://www.rcgroups.com/forums/showthread.php?t=1710948) has to be worlds smallest and cheapest multicopter.
-1pc xl7105 module
-1pc avr flysky ppm chip (soic8 or ssoic8)
-1pc 1n914 diode to drop lipo voltage
-1pc .1mfd cap
-1pc 10k resistor
final final pinout as follows (actually same as the original preliminary pinout):
so far the following have expressed interest:
-blackmoon 5pcs invoice #11 paid
-gilcd85 4pc invoice #10 paid
-dave 8pcs invoice #6 paid
-KoekieMonster 2pcs invoice #3 paid
-midelic 2pcs invoice #4 paid
-shypaul 4pcs invoice #9
-SadSack 3pcs invoice #14
-Andres987 4pcs invoice #1 paid
-shywipper 2pcs invoice #5 paid
-miroba 2pcs invoice #13 paid
-Felixrising 4pcs invoice #7 paid
-kitemaker 4pcs invoice #12 paid
-chanyote66 1pc invoice #15 paid
-mpatzig 2pcs invoice #16 paid
s&h $1 usa, $2 eu. "per order" so this is one reason to go for at least 2 but also in case you brick one soldering or reverse power its nice to have a spare.
atm probably enough assuming everybody follows through. ill continue to keep track and anyone else pm or post by the end of week which is the deadline. they may or may not be available after and if so might not be same price. this first run is really more of a group buy.
photos for the tiny ppm version of diy flysky rx have been added below. construction steps:
1. collect parts and bend pins of the soic around onto the belly to form a plcc. be careful because you only get one chance. pins will break off if bent up instead of down or bent more than one time. since the original part number and pin 1 mark side ends up glued to the module and no longer visible i like to scratch a new pin 1 mark on the bottom to minimize losing track during wiring.
2. glue avr tiny chip face down to back of xl7105 module. ca works good. the pin 1 edge of the chip should be away from the pin 1 edge of the module where most wires will go. this is also a good time to tin the pins which facilitates soldering.
3. form and tack on the 1n914 diode with cathode (band) going to pin 2 of module (3.6v vcc) and anode to pin 8 (4.1v b+) of the chip.
4. add .1mfd cap between anode side of diode to pin 4 (gnd) of the tiny.
5. solder a ground wire from the vias under the a7105 ic on the module to pin 4 of the chip. since none of the wires cross over i prefer using single strands from ribbon cable instead of insulated for this. convenient because its already tinned. then the other 4 wires to the edge of the module.
DONE! one thing i should mention is use super thin wire (42 gauge or smaller) else theres danger of pins breaking off. VERY hard to repair.
1. turn on tx. to avoid overload with cheap modules or deadbug a7105 best to place high output radios few meters away.
2. gnd ppm and apply 3.3-4.1v power.
3. release ppm. led flickers then within 10 sec or so stays on(low) to indicate bind.
4. cylce power. led goes on(low) to indicate link.
for hardware interface all thats needed is run ppm, power, and gnd to your multiwii or other custom fc and ready to go. software is a little more involved. the mw firmware needs to be recompiled for brushed motors and ppm input. also more involved is mw configuration stage. it took me 3 days to get things like motors, gyros, and accelerometer working. a little experience with mw would have helped a lot but this was my first go. might have gone a lot easier using the gui or littlemos cl utility but i didnt have those options at the time either. anyway let me know if you see any typos or have questions and keep us tuned in to your progress.
all chips have been sent out and even overseas should arrive in a week or so. let me know if you dont receive them in a reasonable time.
heres preliminary wiring for a mega328 multiwii compatible circuit to be used in conjunction with the tiny ppm rx. this is what i used to build the quad that has flown twice now. ppm input is pd2/thr3i.
; ,-- g---,--------------------------------------g 6050/5883/5611 ;g-',- 3v- | ,-------------------------------, -3v------, ;3v-' r---|---|--P14 RESL/C6 1 28 C5/AD5 P13-|--scl-2k2-| ;gps-- rx--|---|---P16 RXD/D0 2 27 C4/AD4 P12-|--sda-2k2-' ; tx--|---|---P17 TXD/D1 3 26 C3/AD3 P11 | csl ; | ,-|----P18 I0/D2 4 25 C2/AD2 P10 | do alt spi ;7105 | | P19/OC2B I1/D3 5 24 C1/AD1 P9 | di ;(final) | | P20 XCK/T0/D4 6 23 C0/AD0 P8 | sck ,-.1-3v ;g---- g---'-|-, | 4v-VCC 7 22 GND----, | |--,-,-------b- ;3v--- 3v- | '-|--------GND 8 21 REF-.1-'---|-g-----' .1 10uf ;csl-- thr3/ppm | P6 XI/B6 9 20 AVCC-4v | 3v-|<-4v-'-'-39uh,-b+ ;sck-- rol1------' P7 XO/B7 10 19 B5/S P5----|-ledbutt | ard ;dio-- pit2----P21/OC0B T1/D5 11 18 B4/O P4 '-fet-mot1frontlft-| 3 ;io1-- yaw4----P22/OC0A A+/D6 12 17 B3/I/OC2 P3--fet-mot4rearlft--| 11 ; mod5---------P23 A-/D7 13 16 B2/OC1B P2---fet-mot3frontrt--| 10 ; P0/CLKO ICP/B0 14 15 B1/OC1A P1---fet-mot2rearrt---' 9
there were a couple minor errors in the schematic. in the process of adding led code i used defines from the original wiring which had csl and dio swapped compared to the later version. i hadnt noticed until gill asked if led should be in parallel with dio. this raised an alarm because this 7105 output may not be strong enough for some led pullups. so the led actually should be in parallel with csl which is not a problem because its an input and the avr has more than enough drive.
another issue cropped up when a local fellow mentioned the circuit always worked when connected to his fc board but when powered up alone sometimes goes into bind mode. even w/o grounding ppm pin. my test jig was also pulling this pin high so i didnt notice until hooking a scope up unconnected. problem is this pin does not have internal pullup enabled. looks like a software bug that crept in when i added led code. fix is to use an external 10k-100k. this is not really needed if connected to a fc. another photo is attached shows one tacked on in addition to the optional led and ppm connector. sorry for any inconvenience.
as mentioned i incorporated led bind and blink indicator to the code so the diagram now reflects that change too. i also wired up a ppm/serial connector to facillitate prototyping and reflashing. all these including the pull-up are optional in a final installation. new schematic and pics posted.
the m328 multiwii fc boards gil layed out and sent to me for debugging finally arrived. couple typos crept into his layout: bat+ moves to other end of inductor and 6050 ad0 pin needs grounding. the schematic was correct. details in post #1125. modified schematic and photos of the new board added below. after a few fixes to make the board comply with schematic it works great.
photo of diy quad with mw fc installed. i edited gils bottom layer with motor location and numbering info to assist assembly. also updated the ascii wiring diagram above to show the motor locations.
somebody offline was asking about layout and tiny85 vs tiny13 chips. first of all its true that t85 soic is about 2x bigger than t13 ssoic and weighs more. i do wish t85 was available in the smaller package but unless you are trying to build absolutely smallest rx the difference is not that significant. as far as layout the current pin arrangement was designed for easiest routing when hand assembliing onto an 7105cl type module. this is currently the smallest 7105 pcb and range is not that much different than the more common but bigger 7105sy. another advantage as you can see in the pics added below is most t13 pins solder direct to this particular type module.
since this thread was started ive swapped the old type glass diode with an smd version. smaller and lighter but same 1n4148 part number. so small almost invisible in the pics. another weight saving trick is to use 1mm connector instead of the old .1" ones. about 10:1 difference in size and weight. bottom line: smaller than a penny and not much more than half gram.
ive also attached a new simplified easier to read pictorial type schematic. both chips are mirror image because they are being wired belly up. since led and resistors are optional they have been eliminated from this version for weight reduction and quick build.
inverted a couple of the photos to match the diagram. makes it even easier for beginners.
ImagesView all Images in thread
|Jan 01, 2013, 12:09 PM|
How this one is different from V911 heli PCB rx?With heli PCB you can control 2 servos and 2 motors.To save weight you can remove the servo from the PCB and solder wires instead.With an er9x tx you can do "surgery".
|Jan 01, 2013, 05:12 PM|
Joined Oct 2008
2. my rx has 8 pwm channels. v911 board has zero. you cant cut the wires and connect other servos or escs.
3. these proprietary signals on v911 are not available for 2 motors and 2 servos. due to gyro mixing not all are available for plane use
4. most important of all you cant build a v911 rx from scratch.
i have used the v911 in a plane but really... couldnt be more different. we are not comparing oranges to oranges here.
|Jan 03, 2013, 05:56 AM|
Does the pcb version already outputs PPM-sum signal ? (I know I'm impatient...)
0.49gr is a hell of a lot less than the spektrum sat I'm thinking to use on a nano project.
Well done Dave.
|Jan 03, 2013, 02:25 PM|
Joined Oct 2008
thanks. its funny you mention ppm. due to low pin count on the t13 version at one point i did consider it. but that would pretty much restrict it to multicopter use so that didnt go very far. i do have ppm routines and they are just as easy as the servo/esc pwm so it might be something to consider for avr with spare pins left over like the m8.
|Jan 18, 2013, 12:37 PM|
United Kingdom, Bristol
Joined Aug 2008
|Jan 18, 2013, 03:22 PM|
Joined Oct 2008
ok. so ill see what i can put together when i get back home this weekend. im sure anything i do wont be as good as thierys excellent project in the other thread. however avr and tools are a little more accessable and friendly so there may be some benefit there. ppm might be a ways off yet because im not active in the software end atm. what i got is doing the trick for me. failsafe was the last thing on my todo list. ive got 8ch mega8 code ready to go which will be a good start. i was basically working from amicom reference design so will need to hack together a schematic. you might not even need one yet because you can make out wiring in my proto photo. thanks for showing interest guys.
|Jan 18, 2013, 04:14 PM|
United Kingdom, Bristol
Joined Aug 2008
Excellent look forward to it sure it will take a month for all kit to be in one spot.
Atmega 8 be great, turns out qfn 85/2313/8 all the same foot print.
|Jan 21, 2013, 12:56 PM|
Joined Oct 2008
great minds think alike. as mentioned a while back:
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Mini-HowTo||TH9X Turnigy FlySky IMax modify module to SMA and 1W booster DIY FPV||rotaryboots||Radios||3||Jun 08, 2013 02:32 PM|
|Sold||iMAX/Turnigy/FlySky TX module & RX||John Kim||Aircraft - General - Radio Equipment (FS/W)||0||Jan 12, 2011 12:33 PM|
|For Sale||iMAX/Turnigy/FlySky TX module & RX||John Kim||Aircraft - General - Radio Equipment (FS/W)||2||Dec 09, 2010 11:15 AM|
|For Sale||Turnigy/iMAX/FlySky TX module & RX||John Kim||Aircraft - General - Radio Equipment (FS/W)||0||Oct 27, 2010 11:03 AM|