HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Apr 11, 2012, 12:50 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Mini-HowTo
core9x: building a turnigy 9x clone from SCRATCH!

yesterday s_mac, in the course of a discussion on download times, mentioned he was not flashing a radio but a mega64 breakout board. this got the gears turning and made me wonder just what could be done with junk box parts. im now convinced its possible to build a functional 9x transmitter for a fraction what they cost from china (and thats saying something). maybe not as pretty but it should be possible to duplicate all the functionality. something only possible with the use of thus or er9x firmware upgrade. stock firmware dont work because you cant get past error messages without hooking up the full 9x circuit, something im not inclined to do atm.

a preliminary prototype thrown together and flashed with one of the er9x hex files is shown in the attached photos. it obviously dont have all the bells and whistles of the real thing yet but i think it is possible to at least fly a plane with it. next iteration will involve installing in one of those hobbypartz $15 simulators i bought couple years ago. or possibly one of the micro heli remotes that are hanging around gathering dust.

there is no display now and im wondering if there will ever be a need. i do have 2 spare 128x64 lcds so will take a look at that later. currently i just hold down one of the buttons on power up and a model is selected. ppm comes out the 5 position connector and has been tested with a stock 9x module and also a dht from frsky. ultimately i plan to use one of those $3 a7105 rf transceiver modules which are compatible with flysky protocols.

the motor throttles up and control surfaces work as expected. it remains to be seen if i can actually do a figure 8 or even just circle back using a screwdriver instead of joysticks. shouldnt be too hard though with a properly trimmed plane. im going to give it a try when wind dies down.

as requested i attached a schematic of the turnigy 9x (from gruvin i think?) and heres a list of the actual signals used in my protoype:

Code:
;b0 10 ppm o
;b1 11 menu sck
;b2 12 exit
;e0  2 tcut mosi
;e1  3 aildr miso
;f0 61 rh_stk
;f1 60 lv_stk
;f2 59 rv_stk
;f3 58 lh_stk
;g  63
;r  20
;v  64
;bat+
so far there are only 13 wires needed for this minimum configuration. most other pins are left unconnected but a few are simply tied high or low as required.

jarzaz reminds us you dont need eepe or an eeprom image to get going:

Quote:
Originally Posted by Jarzas View Post
I don't have 9x transmitter either, but you don't need eeprom file to get ppm out.
Flash firmware, disconnect programmer and push "exit" (momentarily ground pin12 from m64), program will auto format the eeprom and ppm should be there. Measured ppm out with dvm I get 4.3V (m64 running at 5V) I don't have anything else connected, just Vcc, Gnd, crystal and what needed for programming.
as usual ill mention if you are upset by off topic posts or technical issues then go no further than page one. everything you need for this project should be here. if anythings missing let me know.




4/18/2012 update:

added photo of the prototype with handles on the trimpots. this solved some ergonomic issues trying to fly with a screwdriver. also photos of a core9x "deadbug" module which is little more than an avr chip with crystal and header. currently im only using the original signals described above but there are extra pins available in case i decide to implement the full menu button complement later.




4/20/2012 update:

added battery input pin and lm2931 ldo regulator. this is needed because while the prototype and heli shell have 5v, the sim does not. also with addition of 2 resistors the m64 can monitor battery voltage. this last part is not implemented yet but will probably do it when everything else is up and running.

some pins still free for future enhancements such as full keypad, control switches, buzzer, led, etc..




4/21/2012 update:

new photos of finished sim case version.

i mounted a full set of six kepad switches on the sim in the holes formerly occupied by servo reverse switches. currently only two are wired up (menu & exit) for choosing models on power up.




4/26/2012 update:

now that everything seems to be working ok i wired up the rest of the menu buttons. this allows access to the full set of features of the original 9x including all 16 models. im only using 2 now, elevon and regular, but you never know. i also wired up a buzzer and mounted it on the inside of the case. its way too loud, about 10x the turnigy radio. so im probably going to have to cover that opening on the front with a piece of tape. surprising because these are 10 cent "unrated" ebay bargain beepers and dont draw much current. even so avr outputs arent strong enough to drive one direct so you may be able to make out the transistor glued to the back of it.

photos of all this have been added below.




4/30/2012 update:

added pic of the 9x model memory expander used to transfer files from the real 9x to the core9x. after theyve been tested out on the real thing of course. the eepe program or avrdude by itself can also be used to do this.




5/2/2012 update:

since my red/wht rtf v911 showed up friday i felt comfortable hacking the first remote and finally took some pics today. i start by putting connectors on the battery and charger cables so itll be easy to work on. some dabs of epoxy as strain relief.

then pulled the led board which is just annoying and a waste of power. the a7105 rf module is isp and short range so decided to use a ppm pigtail instead. i also chewed away some plastic there to make room for an internal t6/9x rf pcb should i so choose. for now it allows me to use my hk supermicro, esky fm 72mhz, frsky dht, or turnigy 9x modules. its a much better case than the s107 i was using with those and thanks to the er9x chip the mod was a cinch by comparison.

im using the same core9x module from the simulator version but this time only using 5 signals. im skipping the menu buttons and decided to leave out trims for now. i prefer mechanical trimming anyway. my v911 needed none out of the box except for some yaw drift when the battery wears down. with hyperion or nano cells even this is minimal. anyway if it starts to yaw i know the lipo is near depletion so time to swap it.

heres the pinout:

Code:
                 oo
                 oo
                 oo
brn    b0 ppm 10 oo           view from pin/conn end
                 oo
wht f0 rh_stk 61 oo
org f1 lv_stk 60 oo
blu f2 rv_stk 59 oo
                 oo 64 v 4.7mfd red
grn f3 lh_stk 58 oo 63 g        blk
as you can see an even smaller subset of the pins are used for this version. even though the a7105 module was pulled the lcd still works like in the original. it continues to function as a battery monitor and if i do hook up trims some day the display will work for those too. no coding required. cool! i noticed theres a buzzer already built in and may take another look at that later. post #22 has more pics and i added one here of the original for those who arent familiar with this helis remote.




5/31/2012 update:

added labels to v911 photo in post #22 and moved it here. notice i cut away plastic at the top so a turnigy, dsm2, or any other rf board will fit. for now im just plugging in any rf module with standard ppm connector. atm this is my favorite radio. small but powerful.




6/1/2012 update:

attached eagle schematic. this was an early version and does not include the regulator that was added later. one is not needed for the v911 upgrade but is required for the simulator which dont have a vcc supply. the lm2931 spec sheet does contain all the info youd need to add one though. ill put one in later.




6/4/21/012 update:

as promised ive added photos of the mega128 version showing the new pc board based modules. easier than "dead bug" but not as compact and does cost more. i did replace the mega64 with a meag128 on a real turnigy radio for a friend who bricked his but theres no real advantage right now. it was all i had. you can see the mega64 there too. not all 9x signals are wired up because i wanted to leave some spare pins free. but most, like trim buttons and upper channel controls, are there. as mentioned several times i dont use many of these anyway.




8/13/2012 update:

as mentioned in post #115 midelic noticed that with er9x recommended fuse settings h=89 l=0e e=ff the chip dont work at 3v. h=c1 l=ff e=ff is what my stock 9x had and works at both voltages. another issue with the er9x recommendation is it causes models and settings to be erased every time you write flash. i prefer to preserve the eeprom when flashing. i mention this because there may be others that want to use the v911 or some other 3v tx.




8/15/2012 update:
thanks to midelic an error has been found. the 9x schematic and the original text pinout above are correct but in my more recent pdf the sticks should go to port f not port b. sorry about that. ive made corrections. the only other two people locally that built one used the 9x schematic and i used the text pinout which was derived from that so it went unnoticed. heres the full text pinout with signal names, port bits, and m64 pin numbers:

Code:
;rh_stk f0 61 oo 63 g            
;bat     .1uf oo 64 v lm2931 10uf
;lv_stk f1 60 oo 11 b1 s/menu    
;rv_stk f2 59 oo 3  e1 o/aildr   
;lh_stk f3 58 oo 2  e0 i/tcut    
;buz    e3 5  oo 20    r         
;ppmo   b0 10 oo 12 b2 exit      
;up     b2 14 oo 13 b3 dn        
;rt     b5 15 oo 16 b6 lft       
;rht_dn d1 26 oo 25 d0 rht_up    
;lvt_dn d3 28 oo 27 d2 lvt_up    
;rvt_dn d5 30 oo 29 d4 rvt_up    
;lht_dn d6 31 oo 32 d7 lht_up    
;         tba oo tba
personally i only use a subset of these. if anyone notices any differences between the various pinouts please let me know. they should all agree. thanks.




8/20/2013 update:

ive attached a zip file with hex used in my 9x and various core9x radios. its the frsky version and iirc w/o templates because there was no room at the time. its quite old but worked perfectly, specially the telemetry function which was the main reason for getting involved with er9x in the first place. when theres time i may try a more recent version and put that up if it checks out. ive also included a batch file for flashing the hex file using a usbasp dongle which seems to be the most popular programmer. if these are copied to the same folder as avrdude then just clicking on the batch file it should do the trick. you could even drag it onto the desktop as an icon to make things super easy.




11/2/2013 update:

at first i didnt plan on adding a display but seeing how easy it was for some of the guys later in this thread i changed my mind. so far 3 versions have been built: flat cable type display with .5mm socket for breakout board core9x, flat cable type plugged directly into my 9xr replacement board, and "zolen" display (.1" conn w/onboard caps) for 9xr board. the first is a bit tricky for beginners, the second too easy because basically its plug-n-play, so ill describe the zolen/9xr version here. check out new photos to see how i did it:

first step is to move the 0 ohm resistor on lcd pcb from position r4 (8080 mpu) to r6 (6800 mpu) and tack on connector pins. next glue female connector to back of the 9xr board and wire it to the row of resistors right above m128. at this point, to be safe, i chose to ring out each of the 16 display signals against cpu pins using sewing needle probe. finally apply power (i used 5v into the isp plug) and you should see the sign-on screen. initially this is a warning to flip some switches but can be disabled in menus. i needed to change channel order from spektrum to more common AETR too. the whole thing took me less than 20 minutes including the label and adding custom wiring to the isp plug.

heres a quick summary of display and isp/pwr plug wiring:

Code:
    avr      zolen
51-44 a0-7  1-8 d0-7
21,64 vcc   9 5v---,
22,63 gnd   10 g  10ohm to 1k depending on brightness
            11 bl--'
36    c1    12 cs
37    c2    13 rst
38    c3    14 d/i(a0)
39    c4    15 wr
40    c5    16 rd

  isp (pcb view)
,--r 20 oo 22 g-------o g blk
|,-s 11 oo 2  i-, ,---o 5v red
|| o 3  oo 21 v-|-',--o sck brn
|| '------------|--|--o miso org
||              '--|--o mosi wht
|'-----------------',-o rst red
'-------------------'
as you can see with my approach the .5mm flex cable connector is still exposed should i decide to plug in that type of lcd. also note ive used a .2" socket for backlight resistor. it can accept 10ohm (bright), 1k (dim), or none (off). 1k is best for me because its more visible in all lighting than the other two options. i built mine from the original 9x schematic attached to this post and made the above diagrams after the fact so double check signals and let me know if you see any errors.




7/21/2014 update:

inspired by some of the amazing conversions here and excited by the newly released wlt v911 and v272 radios i decided to give this another go. the case has a much bigger display opening which is perfect for the jumbo "zolen" type display. and many extra buttons turns out will handle all the 9x menu ones with a couple to spare. currently it supports 4 protocols: flysky, openlrs, frsky, and v272. that last one uses original pcb inside the case, openlrs uses fytron code by melih, and the other 2 from midelics multiprotocol project. a couple friends are working on spektrum/dsm protocol so that should be added soon. no rush because i do have an orange hk module.

the bigger antenna supports 433mhz for openlrs but with a little "combo" trick also does 2.4ghz. but since it dont fit in my flight bag as easy as the small one i generally only install it for the lower frequency.

as you can see ive cut an opening for a standard 9x/jr type rf module. it clicks into place quite securely just like in the original radios. a 5 pin header is mounted on the original v272 pcb but signals actually connect to the mega128 core9x board which is tucked neatly to the side. only two aa size lithium cells power it which makes the case seem half as heavy compared with nimh. those who use both big radios like 9x and little ones like v911 know what im talking about when i say its truly marvelous to carry around and fly with. all for a fraction what a devo would cost yet the power and control of er9x.

a few photos attached below.




photos:
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Jul 21, 2014 at 04:54 PM. Reason: schematic
Reply With Quote
Sign up now
to remove ads between posts
Old Apr 12, 2012, 05:54 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
hmmm... that didnt go too well. it was a perfect morning, no wind and not too wet, but it looks like you need 3 hands to fly with a screwdriver. with grass and no landing gear anyway i can only hand launch. holding the tx in one hand and the plane in the other leaves no way to goose the throttle pot on takeoff. and getting the scredriver into the trimpot in time was problematic. i managed but it was not pretty. or fun.

im going to have to either put knobs on those trim pots or move on to a conventional radio shell sooner than expected. so far ive spent less than an hour on the construction part this project but it will take much longer to wire up the final version. heres pics of that cheapo simulator from hobbypartz:
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 12, 2012, 04:16 PM
TH9X Firmware: Thus NG
Joined Mar 2010
159 Posts
Great, that`s the same idea I have. My intention was to have a very tiny travel transmitter together with a small foamy glider. All to carry in a SMALL bag
The 9x radio is way to big, but I will never miss the powerful custom FW. So I ended up with these tiny trashy heli IR transmitters to build in the 9x hardware, sure not everything but the needed basics. I know there is no rudder control but I don`t need it anyway because I can mix rudder to aileron.
Also I want to build an external connector for a separate display with control buttons to plug in anytime if setup needs to be done.

Your nice Atmega64 board looks to be very small, do you have a printout ?
Promix is offline Find More Posts by Promix
Reply With Quote
Old Apr 13, 2012, 10:13 AM
Registered User
Zen09's Avatar
Germany, HB, Bremen
Joined Jun 2010
923 Posts
Quote:
Originally Posted by dave1993 View Post
im now convinced its possible to build a functional 9x transmitter for a fraction what they cost from china
I highly doubt...
Zen09 is offline Find More Posts by Zen09
Reply With Quote
Old Apr 13, 2012, 06:12 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by Promix View Post
Great, that`s the same idea I have. My intention was to have a very tiny travel transmitter together with a small foamy glider. All to carry in a SMALL bag
The 9x radio is way to big, but I will never miss the powerful custom FW. So I ended up with these tiny trashy heli IR transmitters to build in the 9x hardware, sure not everything but the needed basics. I know there is no rudder control but I don`t need it anyway because I can mix rudder to aileron. Also I want to build an external connector for a separate display with control buttons to plug in anytime if setup needs to be done.

Your nice Atmega64 board looks to be very small, do you have a printout ?
hah! great minds think alike:

http://www.rcgroups.com/forums/showt...5#post20327722



like you i think regular transmitters are too big when portability is paramount. i often carry both planes and radio gear in a backpack when biking to the field in early morning hours. a regular transmitter takes up too much space and its heavy and unwieldy when youre trying to launch a plane with one hand and control throttle with the other. i found the 9x to be particularly clumsy which is why i switched to the flysky t6 and then to that toy heli case.

as you can see in that thread it is difficult to find a ppm encoder chip for custom projects these days. then i realized an atmel mega64 with 9x code fits the bill perfectly. very easy with thus9x or er9x type firmware because you can override alarm and switch errors. this allows for very few external components which is impossible with stock firmware. in fact it is quite possible to get high level functionality with as few as a dozen connections. display, keypad, pots, and switches are optional but can be added later for a full blown setup. or not.

as mentioned im considering using the s107 remote like in our photos for ultimate portability and ergonomics or the simulator shell for more conventional radio. to answer your question about pinout the 9x schematic along with list of signals actually used in the prototype were added to post #1.
dave1993 is offline Find More Posts by dave1993
Last edited by dave1993; Apr 20, 2012 at 01:13 PM. Reason: photo
Reply With Quote
Old Apr 13, 2012, 11:30 PM
Registered User
Romania, Dolj, Craiova
Joined Sep 2007
15,438 Posts
Relieved, at first reading I thought you stolen my dream to do this in a 70s Kraft single stick
renatoa is online now Find More Posts by renatoa
Reply With Quote
Old Apr 14, 2012, 07:51 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
Quote:
Originally Posted by RENATOA View Post
Relieved, at first reading I thought you stolen my dream to do this in a 70s Kraft single stick
lol! i think you meant to say 1960s. anyway id NEVER consider that because even though it was the worlds most popular transmitter it is limited and very ugly. its a ridiculous idea.

my plan is to use the kraft two stick. no vacuum tubes or relays here. we got REEDS!
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 14, 2012, 10:33 AM
TH9X Firmware: Thus NG
Joined Mar 2010
159 Posts
I will give this one a try. Removing all connectors to keep it flat and then hard wire everything. With a little trim it will fit in place.
Promix is offline Find More Posts by Promix
Reply With Quote
Old Apr 16, 2012, 07:53 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
that is a very nice board. it is made by the same company that makes my jtagice. costly but high quality. i thought there was a different processor on there though and you definitely need to change the crystal to 16mhz. other than that it looks like an excellent choice for a "core9x" module.

i finally put handles on the prototype board trimpots. flying my little ret foamie went exceptionally well. in fact id have to say it responded as good as the real 9x and imo felt much better due to its tiny size. i cant wait to get this in a real shell.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 18, 2012, 06:53 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
added new photos of the prototype with "handles" to post #1. i also built another, much smaller, version to be inserted into whatever radio shell i choose. its nothing more than a mega chip with crystal and header so will fit the smallest enclosure. theres a photo of that too.

i took the prototype out again this morning and i must say it is a whole new experience having the power of a turnigy 9x in a radio that fits in the palm of your hand. the trimpot handles made all the difference in the world. initially i thought this kluge version would only be used as proof of concept and then discarded. but now it seems that a "mini9x" is a really cool idea all by itself. maybe worthy of a thread all by iteself. i will continue with plans to use a larger, more conventional, shell. either one from a heli or the similator.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 20, 2012, 10:54 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
a couple changes to my core9x module design:

1. added battery input pin and ldo regulator. this is needed because while the heli shell had 5v the sim does not. also with addition of 2 resistors the m64 can monitor battery voltage. this last part is not implemented yet but will probably do it when everything else is up and running.

2. removed miso, mosi, and reset because there are no plans to program in situ. this means there are only 10 wires needed atm. this leaves 10 pins free for future enhancements such as full keypad, control switches, buzzer, led, etc.. i mounted a full set of six kepad switches on the sim in the holes formerly occupied by servo reverse switches. currently only two are wired up (menu & exit) for choosing models on power up.

post #1 has been updated to reflect these changes. i can put together a bona fide schematic and more photos if theres interest.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 20, 2012, 12:12 PM
Rotozuk's Avatar
United States, CA, Novato
Joined Sep 2003
5,856 Posts
I like it. Keep up the info.
Rotozuk is offline Find More Posts by Rotozuk
Site Sponsor
Old Apr 21, 2012, 07:10 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
hi wayne. your wish is my command. lol!

i put up more photos in post #1. closeups of the new ldo regulator and the finished sim case version. i shuffled a few signals around and a buddy complained about removing those two isp pins so i put them back in. if things work as expected ill cook up a proper wiring diagram when i get access to my main pc tomorrow.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 24, 2012, 01:01 PM
RC beginner
New York
Joined Oct 2008
6,054 Posts
the sim version is now working too. there was a problem with settings changing which i traced to the menu scroll pot zipping through setup screens by iteself. this was caused by the fact that there was no physical pot wired into this version. not noticed right away because you really dont notice it until getting into a menu that has options. it was behaving as long as youre in the main screen. solution was to turn off pot scroll. ive spent a couple hours flying with the prototype and the sim version now and everything seems to be working as expected so ill finalize the design with a schematic when i get a chance.

i now notice one huge advantage the sim case has over the original 9x: SMOOTH TRIM TABS!. those darn clicky trims on the oiginal were one of the reasons i put it on the shelf early on. the sims sticks are nowhere near as high quality as those on the 9x but for me smooth trims take precedent over just about anything else. ergonomic nirvana.

another thing is the sim throttle stick has clicks which are highly desirable for a plane radio. not a big problem because it was fairly easy to put a kink in the 9x tension spring:
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Old Apr 26, 2012, 10:14 AM
RC beginner
New York
Joined Oct 2008
6,054 Posts
now that everything seems to be working ok i wired up the rest of the menu buttons. this allows access to the full set of features of the original 9x including all 16 models. im only using 2 now, elevon and regular, but you never know. i also wired up a buzzer and mounted it on the inside of the case. its way too loud, about 10x the turnigy radio, so im probably going to have to cover that opening on the front with a piece of tape. surprising because these are 10 cent "unrated" ebay bargain beepers and dont draw much current. even so avr outputs arent strong enough to drive one direct so you may be able to make out the transistor glued to the back of it.

photos of all this have been added to post #1.
dave1993 is offline Find More Posts by dave1993
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log P-40E EPS design and build from scratch gregnapola Foamies (Scratchbuilt) 48 Sep 23, 2012 12:01 PM
Help! Build A Traxxas Slash 4x4 from Scratch Timewarp Off-road Cars 6 Oct 13, 2011 09:20 AM
Build Log Electric sailplane build (almost) from scratch - warning LOTS of pics Dimson Electric Sailplanes 5 Sep 28, 2011 07:07 AM
Discussion New Member, looking to build from scratch. GreenHell Fuel Plane Talk 7 Sep 21, 2011 03:34 AM