Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Helicopter Support > Blade Helicopters (eFlite) > mCP X Brushless Mods


mCP X Brushless Mods Blade Micro CPx Brushless Mods and Conversions


Reply
 
LinkBack Thread Tools Display Modes
Old 07-07-2012, 07:51 AM   #1 (permalink)
Registered Users
 

Join Date: Feb 2010
Default owSilProg: AVR-alternative to Silabs toolstick, BLHeliTool, BLHeliBox

.
owSilProg project home page: http://www.olliw.eu/2012/owsilprog
latest firmwares/softwares available here: http://www.olliw.eu/2012/owsilprog/#firmware

flashing/using owSilProg:
- Using Arduino Mini with USB-TTL adapter, great and detailed description, somewhat outdated, by copperclad post #35
- Detailed description at rcgroups, somewhat outdated, by sirbow2 http://www.rcgroups.com/forums/showt...0#post22147978
- Using Arduino Uno, flashing owSilProg into it as-is using avrdude, by copperclad post #76
- Using Arduino Uno, solving Arduino autoreset issue by cutting a wire, by SadSack, post #104, post #107
- Brief description of the commands understood by owSilProg post #105
- Easiest & cheapest route towards BLHeli!? post #139

BLHeliBox
- BLHeliBox: first fully dual-functional box for BLHeli post #164
- My DIY BLHeliBox post #168
- Video Tutorial BLHeliBox post #175

----------------------------------------------------------------------------------------------------------------

Hey folks,

flashing BESCs with a new firmware is a cool thing to enhance their performance, and thankfully good firmwares are available through the work of guys such as Quax (Bernard Konze) and his several successors, e.g. well known in the mcpx world, sskaug (Steffen Skaug) and his BLHeli: https://www.helifreak.com/showthread.php?t=390517.

Many of the useful BESCs use ATmels AVR microcontrollers, which is good because these can be flashed using programmers which are very cheap. Furthermore, a lot of info is found on the web on AVRs. Unfortunately, many of the useful BESCs use Silabs microcontrollers, which is good because of their admittedly better performance for this task, but also bad for hobbiests since the programmers, the now infamous toolstick, is not among the cheapest. This is of course a matter of perspective LOL . Anyhow, for guys like me who have the AVR programmer and toolchain already available this might be a pitty, at least I didn't wanted to spend the money and install the toolchain just for flashing one or two BESCs...

Fortunately, Silabs provided all details on how to flash the Silabs chips via the C2 interface (AN127 & C2 interface specifications), and the whole procedure is in fact fairly simple. So, I thought I could develop my own "toolstick" using AVRs, and that's what I did. I decided to call the whole thing "OlliW's SilProg"... you can decide yourself whether the Sil stands for Silabs or silly... LOL.

Yesterday night I got finally BLHeli flashed into a XP-3A (with replaced FETs)(with some help by DoubleCH and Dylan, who sorted out a point of confusion as regards F330 vs F334, https://www.helifreak.com/showthread...37#post4083137). Hence I thought I could start sharing this now.

Currently I am using an Arduino MiniPro 3.3V which is connected via an USB-TTL Adapter to the PC. The firmware, SilProg v0.02, does the main job, i.e., provides the main functions for operating the C2 interface via a serial connection. On the other end, the PC, is a Windows GUI, which I called "SilProgTool", which provides the interface to the user. As said, it's working fine - but I know it's not yet perfect... I need to do better with capturing possible error states. I need also to think better about "electric potentials", i.e., what happens in a real "in-system" flashing situation. So, the project is certainly more a gama version than a release version yet.

The next steps will be to provide an analog to the nice BLHeliSetup Windows GUI of Achim/4712. I will call it "BLHeliTool". A first working version will hopefully be ready this night or tomorrow.

The concept IMHo provides some nice features, since it allows the flashing via simple commands on a standard serial connection (I in fact used at first a standard terminal program, before SilProgTool was existing). What comes to mind immediately is the possibility of a programming box for BLHeli-driven BESCs. This in fact shouldn't be really difficult from where I am now, and it could e a "price-burner", since it's possible to have this "box" operate as both a toolstick and a programming box... i.e., only one hardware item is needed for everything. I must admit that it actually was this perspective which pushed me to enter this project. Also, programming via bluetooth should be possible (I might try this the next days LOL), and since the serial protocol is simple smart-phone guys should be able to program respective aps. OK, these are dreams at the moment...

Below some figures showing my test rigs, and a "demonstrating the claims" photo (you will note that I haven't installed the BLHeli-XP-3A yet... I have just one single mcpX and I need it to fly... so the transition will happen once I've tested everthing in any little detail)

Happy flying, Olli
Attached Thumbnails
Click image for larger version

Name:	silprog-v002-test01-4hf.jpg
Views:	3816
Size:	100.9 KB
ID:	329936   Click image for larger version

Name:	silprogtool-v002-01-4hf.jpg
Views:	3307
Size:	71.3 KB
ID:	329937   Click image for larger version

Name:	silprog-v002-test03-4hf.jpg
Views:	3438
Size:	88.7 KB
ID:	329938   Click image for larger version

Name:	silprog-v002-test04-4hf.jpg
Views:	2808
Size:	81.9 KB
ID:	329939  
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu

Last edited by TowPilot; 08-05-2012 at 07:36 PM.. Reason: Edits per request by OP
OlliW is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 07-07-2012, 09:39 AM   #2 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Great project , thanks for posting , subscribed

I have a Mini Pro and a FTDI basic , When you post a hookup schematic and the code , I will try it

Last edited by copperclad; 07-07-2012 at 11:17 AM..
copperclad is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 09:42 AM   #3 (permalink)
Registered Users
 

Join Date: Aug 2010
Default

Wow! Amazing work!
__________________
NanoCPx - Astroid Designs "mild" BL-kit
mCPx "lightweight"-BL - BLHeli 4.0, XP3a dbl-fet/C05m 8T
mCPx "super"-DualBL - BLHeli 4.1, XP7a(3xFET)/HP06v2/8T, XP3a/HP03t,3xSPMSA2030L 2.3g servos
200QX - Bone Stock
Naito is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 11:12 AM   #4 (permalink)
Registered Users
 
Posts: 196
 

Join Date: Jan 2012
Default

Awww man! I just bought a Toolstick! I was in the market for an Arduino too! Nice work man.
__________________
mCPxBL // HP05s 9t // XP12a (BLheli 5.0) // HP03t 8800/XP3a 5.0 - Plantraco // Hyperion 550's
Frankenstein 450 (align/exi/hk)
decompyler is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 12:28 PM   #5 (permalink)
Registered Users
 

Join Date: Jan 2008
Default

Great work! Will be interesting to follow
sskaug is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 03:54 PM   #6 (permalink)
Registered Users
 

Join Date: Sep 2011
Default

Nice idea! If it is fairly simple... wouldn't it be possible to simply use the FTDI/serial lines to communicate with the F330 C2 interface?
__________________
For the most recent Revision of BlHeli Setup see my blog.
4712 is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 04:50 PM   #7 (permalink)
Registered Users
 
Posts: 12,361
 

Join Date: Jul 2010
Default

Ollie? You are over here also now? OMG! This is fantastic. Just for an fyi for you guys who do not know his work. OlliW has ground up created a whole new catagory in programming work in the coaxial and also cp heli worlds with his innovative programming expertise. I myself had Olli step by step with me through an entire multilayered memms gyromixer boardless brushless conversion just about half a year ago. His work transformed the entire coaxial empire! I am even running his gyromixer on my new 360mm 6 bladed dual swash flybarless 450 brushless boardless coaxial prototype! In a word, the guy is brilliant.

Olli, I am subscribed! I have a collection of V1 and V2 boards that I am modding to go brushless with on my new mcpx raised tail stretch (soon maybe 2s) projects. And the ability to simply program our own parameters to fit our own unique flying styles is awesome!
Randy

Also, I didn't even know the Steve converter was ripped off until now? Again, what is wrong with people?
__________________
If it can be done wrong, I will find a way to excel at it.

Last edited by Luvmyhelis; 07-07-2012 at 06:03 PM.. Reason: add info
Luvmyhelis is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 05:08 PM   #8 (permalink)
Registered Users
 
Posts: 1,447
 

Join Date: Jul 2010
Default

All I can say is WOW. Man you guys are rocket scientists.!!!!
__________________
Atom500(FBL)., Gaui x4II (FBL) ;Trex450 sport (FBL). All with Ikon fbl gyro. AMA#1019423.

Tony .
tony521 is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 05:16 PM   #9 (permalink)
Registered Users
 
Posts: 1,153
 

Join Date: Apr 2009
Default

Great job! I have look at the spec but did not have a chance to work on it yet.
Olliw, is it possible to port the code to the USBASP programmer?

Those programmer sell at ebay for $4 shipped. That would be cheaper than
the serial converter itself. You just need two and one of them to program the
other one. I have done some hacking on the usbasp programmer. I think
it should be possible. If you can make it work, then it will truely lower the
bar for downloading program to the ESC. The USBASP can use to program
the AVR family as well. So one bird two stone...
__________________
MCPX HP05s/HP03T Xtreme Frame (Beater)
MCPX HP06v2/HP03T MH X Frame (Precious)
MCPX HP08/HP03T MH X Frame (Grounded)
MCPX stock DIY firmware (Experimental)
coredump is offline        Reply With Quote Quick reply to this message
Old 07-07-2012, 08:08 PM   #10 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2010
Default

@copperclad
Quote:
When you post a hookup schematic and the code , I will try it
I will do, of course, just give me a bit time

@4712
Quote:
wouldn't it be possible to simply use the FTDI/serial lines to communicate with the F330 C2 interface?
this idea crossed my mind... I am not sure, but if possible I think it's not that easy... the C2 needs that the C2D line can be put into high-Z, I think the FTDI can't do that but I of course have not checked the datasheet, so a driver might be needed, also the C2CK is time sensitive within 5us, so the original USB I guess would be to slow, maybe the bit banging mode would work... but even if it would work, it wouldn't help for a programming box and/or BT connection.

@coredump
Quote:
is it possible to port the code to the USBASP programmer?
I would think so
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu
OlliW is offline        Reply With Quote Quick reply to this message
Old 07-08-2012, 03:47 PM   #11 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2010
Default

OK, here we go with version gamma1... LOL... for those who want to try

I had to put the six files into two zip folders because of the stupid 2M barrier... they include
- silprog_v005_promini8mhz.hex: the SilProg firmware to be flashed into an ATmega328P at 8MHz (and ideally 3.3V)
- SilProgTool_v002.exe: the Windows Flash tool
- SilProgTool.ini: the corresponding ini file
- BLHeliTool_v001.exe: the Windows BLHeliTool
- BLHeliTool.ini: the corresponding ini file
- BLHeliTool.dev: a file containin the various info on the revisons

At the ATmega the Pins are as follows
- Tx -> Rx of the serial
- Rx -> Tx of the serial
- PD2 -> C2CK line of the C2 interface
- PD3 -> C2D line of the C2 interface

As said, this is gama. This means:
- SilProg: it can hang up under certain fault conditions (the C2 lines are polled, and if the connection fails during a poll the firmware stalls)(this so far hasn't been a problem though)
- SilProgTool: by some reasons I do not yet understand it hangs up sometimes while flashing... (I guess it is a COM port thing)
- BLHeliTool: functional but very crude, does only support Rev5.0 MAIN at the moment DEPRECATED
- lots of undetected bugs and features LOL

EDIT: BLHeliTool_beta.zip version available in post #44

Have fun, Olli
Attached Files
File Type: zip SilProg_gamma1_20120708.zip (1.25 MB, 1589 views)
File Type: zip BLHeliTool_gamma1_20120708.zip (1.37 MB, 849 views)
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu

Last edited by OlliW; 07-12-2012 at 06:40 AM..
OlliW is offline        Reply With Quote Quick reply to this message
Old 07-08-2012, 04:14 PM   #12 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Hi OlliW

Good work ! , thanks again for posting this work .

I think I follow everything , But , to figure out where to connect for C2CK and C2D , I am guessing i need to download the data sheets for the Silabs F334 .

Thanks again and Best regards
copperclad is offline        Reply With Quote Quick reply to this message
Old 07-08-2012, 04:24 PM   #13 (permalink)
Registered Users
 
Posts: 1,153
 

Join Date: Apr 2009
Default

You don't need the datasheet of F330. The C2CK and C2D are the red and white line
the BLHeli page.
__________________
MCPX HP05s/HP03T Xtreme Frame (Beater)
MCPX HP06v2/HP03T MH X Frame (Precious)
MCPX HP08/HP03T MH X Frame (Grounded)
MCPX stock DIY firmware (Experimental)
coredump is offline        Reply With Quote Quick reply to this message
Old 07-08-2012, 04:44 PM   #14 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Hi
Thanks Coredump , I just finished downloading the PDF on the F33x and see the C2CK and C2D pins are listed , so I have that figured out .

I also see that in his photo in post #1 he has four lines connected to the ESC , and these would have to be C2CK , C2D , 3.3V , and ground

So I guess where I am still confused is with - Tx -> Rx of the serial and - Rx -> Tx of the serial ( as listed in post #11 )

I am guessing he means the connection between the mini Pro and the FTDI .

sorry for all the lame questions , I am just trying to come up to speed on this .

Also I see my mini pro is a 5 volt model , so I am thinking it would be a good idea to order in a 3.3 volt Mini Pro .

thanks again

EDIT:
I see the code for the mini pro comes as a HEX file ( silprog_v005_promini8mhz.HEX ) , so it will need to be loaded into the mini pro with an AVRISP mkII or a parallel loader . Here is a link to a tutorial for bootloading the mini ( not the pro ) .
http://arduino.cc/en/Hacking/MiniBootloader

I figure posting some of this info might help others that want to try this .

thanks again

Last edited by copperclad; 07-08-2012 at 08:57 PM..
copperclad is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 02:23 AM   #15 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2010
Default

according to the datasheet the Silabs pins are 5V tolerant, so the 5V version could/should also work... (WARNING: but the FF33X should still be run by <4.2V, so it needs ist own power source, e.g. a 1s battery). The only thing I am not yet sure is what happens if the F33X is not powered but a 5V signal is at one of its pins... that's a thing I wanted to sor out the next days, but maybe you want to do these experiments (maybe one should start with putting a 1k in the C2 lines). Anyhow, attached the 16MHz version (not tested though).

The Tx,Rx statement just means to say that you need connect them to a TTL serial connection.

BTW: the baudrate is 38400
Attached Files
File Type: zip silprog_v005_promini16mhz.zip (3.5 KB, 324 views)
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu
OlliW is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 05:20 AM   #16 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2010
Default

I was asked to post a scheme.. here we go...

please note, the concept is not limited/fixed to Arduino and USB-FTDI-TTL adapters...
any Atmega or Attiny with >4k flash, UART, running at 8MHz/16MHz quarz or ceramic should work (tell me your hardware and you'll get a hex)
also any method to connection between PC-COM port and AVR UART shoudl work
Attached Thumbnails
Click image for larger version

Name:	SilProg-scheme02hf.jpg
Views:	1938
Size:	39.7 KB
ID:	330561  
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu
OlliW is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 05:41 AM   #17 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Quote:
The only thing I am not yet sure is what happens if the F33X is not powered but a 5V signal is at one of its pins... that's a thing I wanted to sor out the next days, but maybe you want to do these experiments
Hi OlliW

I am just a weekend warrior when it comes to this stuff , so I downloaded all the data sheets and PDFs on these chips last night , and am starting too think I follow the whole thing .

Thanks for the updated 16mhz HEX file , I will try my 5V mini pro .

And thanks for the schematic , it confirms I have sorted out the details , and am following you correctly .

I have all the hardware here I need to try it , so I will see if I can get it to work today .

thanks again
copperclad is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 11:08 AM   #18 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Hi
I have AVR Studio 4 and ran into the problem that the 328P is not supported . I have been looking around on the web for either the AVR Studio version that does support the 328P , or the 328P file I can use , and I am not coming up with anything .

Best regards

Here I am , all ready to flash some HEX and no device file

Attached Thumbnails
Click image for larger version

Name:	DSC00001.JPG
Views:	20472
Size:	144.2 KB
ID:	330603  
copperclad is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 12:29 PM   #19 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2010
Default

hey copperclad,
I am not sure I understand what you're saying. I'm using AVR studio 4 myself for compiling c into hex, and it provides atmega328p. Another potential issue is if your ISP programmer supports 328p and/or if it is supported by AVR studio... you seem to use AVR mksII. I don't have that, so I can't say for sure, but I would be surprised if it wouldn't be handled by AVR studio 4 and if it would not allow 328p. So, I am somewhat confused. Anyhow, if everything fails I would think that avrdude should do the job... at least it does it for me with siprog for atmega328p. You mention "dev file", is this is the dev file of avrdude? I can't recall, but it may indeed be that the m328p and/or m328pa is not in there, but you can easily include it by opening the avrdude.dev with an ASCII text editor, copying the part for, let's say atmega8, and edit the few relevant points such as name, signature. If that's indeed the problem I can also post "my" avrdude.dev file.
cheers

EDIT: since this Arduino, if you're Mini has still the bootloader on it you also could flash via the bootloader instead of the ISP. Requires also avrdude as much as I know, but also a slim Windows GUI toll is available if I am not mistaken.

EDITII: just looked it up, (at least) the latest version of avrdude supports m328p, version 5.11.1, you may get it here http://download.savannah.gnu.org/releases/avrdude/
EDIT III: this link does NOT provide the Windows executables... you may get them form e.g. here

avrdude 5.11.1 executable: http://www.mikrocontroller.net/topic/163675#2383773
__________________
TRex450 Sport with GA250+Olliw firmware, mCPx brushless, owSilProg, BLHeliTool, BLHeliBox
all projects @ www.olliw.eu

Last edited by OlliW; 07-12-2012 at 08:08 AM..
OlliW is offline        Reply With Quote Quick reply to this message
Old 07-09-2012, 01:45 PM   #20 (permalink)
Registered Users
 

Join Date: Apr 2006
Default

Hi OlliW

I run AVR studio 4 and it recognizes that I have the AVRISP mkII plugged in , This should let me load the HEX file into the mini pro .

Studio 4 brings up a dialog box to ask the file name and device number , but under the device list it skips from 325 to 329 , there is no 328 or 328P .

How are you getting the HEX file into the mini .

On my system i have :
C:\PROGRAM FILES\ATMEL\AVR TOOLS\PartDescriptionFiles\
and in that folder i should have a file called " ATmega328P.xml"

I am still scratching my head that AVR Studio doesn't support the 328

I also have AVRDUDE 5.6 , with avrdude.GUI , but it doesn't the 328P in the parts list either

best regards
copperclad is offline        Reply With Quote Quick reply to this message
Reply




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1