Register | Help | Store Account | FliteTest Dashboard
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Posted a thousand or more times jhitesma's Avatar
    Join Date
    Mar 2012
    Location
    Yuma, AZ
    Posts
    4,710

    Exclamation 1-wire interface for reprogramming/flashing BLHeli ESC's

    I've mentioned this in a few of my build threads and a couple people have asked for more details. So I figured rather than bury it in one of my existing threads I should just go ahead and start a new one.

    I've been experimenting with BLheli instead of Simonk for my ESC's since it supports regenerative braking (well, simonk does as well...but it's easier to setup on BL and seems more supported) and because I was curious what BL was like now that it supports atmel processors as well as silabs. I'm pretty impressed by it so far and one of the big things I like is the BLHeli Suite for programming/flashing. It supports tons of different interface options and makes it really easy to change settings on your ESC's.

    You still have to do the initial flash the traditional way - either with a socket tool, or somehow attaching 6 wires from a usbasp ISP programmer to the 6 programming pads. But if you choose to use the blheli bootloader when you do that initial flash you get a lot of flexibility in how to flash and change settings afterwards. You can use a USB Linker like the afro tool, you can use an arduino as a linker, there's code that can be loaded into MW to let a MW board act as a linker (which is a very cool idea I'm shocked hasn't been used more) and you can use a 1-wire interface which is what I'm going to detail here today.

    The 1-wire interface uses a standard "FTDI" serial to usb adapter. It just requires one resistor and one diode wired up - the BLheli suite comes with instructions on how to do this and I covered how I made mine in this post from my Twitchity quad.

    The way this works is when the ESC first powers up it initially goes into a bootloader mode for a second or so which allows a programmer to attach to it. If no programmer attaches then the ESC continues booting as normal, but if a programmer attaches the ESC stays in bootloader mode and you can reflash it and modify it's settings through the 1-wire interface.


    Here's my programmer setup. It's just an FTDI adapter with the 1-wire interface I made attached (see the link above for details on how I built it.) The interface is just a resistor and diode and the resistor is actually optional - but it allows for faster connection speeds having it so it's worth doing right.
    Click image for larger version. 

Name:	10756830_10152381327536805_47244207_o.jpg 
Views:	744 
Size:	318.1 KB 
ID:	33995

    My interface terminates in female headers because on the Twitchity quad I built and first used this on I added 2 pins on each ESC for reflashing. Normally you'll have it the other way around with female connections on the ESC's and male on the programming interface...and such is the case on my Knuckle/Tau build I'm updating tonight. So I grabbed some spare wire and pins and wired up an adapter for my adapter. Due to the setup on my Tau I also added another adapter for my adapter for my adapter to convert it back to female for the ground connection. Yeah, it's ugly but it's not like anyone but me has to look at it The white wire is the ground and the one with the red heat shrink is the signal. These can just connect straight to the ESC if you're using normal ESC wiring...my wiring isn't quite "normal"
    Click image for larger version. 

Name:	10578343_10152381328626805_1682569586_o.jpg 
Views:	261 
Size:	397.6 KB 
ID:	33996

    Here's the inside view of my setup. The orange wires are the ESC signal wires and I put them all on one header so I can connect/disconnect them all at once and not worry about which one goes where. The header has a small triangular mark indicating pin 1 so it's quick and easy to hook up correctly. Since I have all of these on one header connecting to ground for me is a bit trickier than if you're just using normal servo connectors. I figured the one four position connector is lighter than 4 - 3 position headers which are really only needed for 1 position each and I like the ease of one connection for all of my motors instead of 4 individual connections.
    Click image for larger version. 

Name:	10585233_10152381317221805_1757828236_o.jpg 
Views:	190 
Size:	366.4 KB 
ID:	33994

    And here it is setup ready to flash! The signal wire from the 1-wire interface goes to the socket for the ESC I want to update or flash, and the ground I just connected to a convenient pin on my FC. Since I'm using a DiscoveryF4 developers board there are tons of ground pins to choose from, but just about any flight controller will have a number of ground pins you can use and most people will probably just use the normal servo connector from their ESC with signal/power/ground all right there.
    Click image for larger version. 

Name:	10752344_10152381329576805_715064446_o.jpg 
Views:	270 
Size:	353.1 KB 
ID:	33997

    And that's it really! To change settings on my ESC's I just loosen 4 nuts to remove the top plate of my quad, pull off the motor connector and hook up to the socket for the ESC I want to work with. Since I was just making configuration changes today I used a normal flight pack to power things, but normally it would be best to power the ESC's off a current limited source like you do when flashing. Since my ESC power wires are soldered right to my power buss and I didn't feel like making up a pigtail to power my main connector from a better source I choose to just live dangerously and use my normal flight pack tonight.

    Common mistakes (for me at least) when doing this are forgetting to select 1-wire as the interface in the BLheli suite since I sometimes use my usbasp for full ISP style flashing, and forgetting that the connection can only occur when the ESC is first powered up. So you have to first hit the "read ESC" button in BLheli suite BEFORE powering the ESC. The suite will sit there with a waiting prompt once you hit read and instruct you to power up the ESC. As soon as power hits that ESC the suite should connect and alert you if it was successful or unsuccessful. If it was successful then you can make your changes and hit write, or reflash. Boom, all done!

    When you flash with blheli you can choose to have 1-wire on an alternative pin. If I was planning on messing with my ESC's a lot I'd have done that and run them to a separate header exposed on the outside of the quad. But I don't plan on changing these settings very often so I don't mind opening up the quad and disconnecting the motor wires. Still, it's nice that BL is so flexible since there are so many ways to do this!

    I have a video uploading of me changing a setting on all four ESC's and giving a bit of a tour of the guts of this quad...but it's after 1AM, I have a strenuous hike up a mountain first thing in the morning, and there's still over 70 minutes to go on the upload. So I'll come back and add it later. It's set to publish as soon as it uploads so you can always just check my youtube channel if you don't want to wait for me to update this post

    As always any questions fire away and I'll do my best to answer!

  2. #2
    Posted a thousand or more times jhitesma's Avatar
    Join Date
    Mar 2012
    Location
    Yuma, AZ
    Posts
    4,710
    And here's the video of me changing the startup power on all four ESC's:



    Sorry the video isn't better, mobius cameras aren't ideal for this kind of filming - makes it kind of hard to frame your shots

  3. #3
    Senior Member Twitchity's Avatar
    Join Date
    Mar 2013
    Location
    Orlando, Florida
    Posts
    722
    Great information, jhitesma. Thank you for going through the trouble to post this thread. I've been considering trying to flash the EMAX ESCs with BLHeli and mess around with some settings while I'm at it. I know you've looked at them before, and they had some weird form of BLHeli flashed to them. Are these able to be reflashed too?

  4. #4
    Posted a thousand or more times jhitesma's Avatar
    Join Date
    Mar 2012
    Location
    Yuma, AZ
    Posts
    4,710
    The emax can be reflashed...but since their SiLabs chips it's considerably different than flashing avr based ESC's. I haven't done mine yet since I'm happy enough with their performance as is (especially for the price) and I don't have the SiLabs toolstick for flashing them. I think it can also be done with an arduino...but since I've had no luck getting an arduino setup to flash AVR's which I'm experienced with I haven't looked into flashing SiLabs chips with one just yet.

    But, I do plan on getting a set of the emax ESC's for my twitchity quad in the next few weeks (I know I've been saying that for a month or two but now that AC season is over I'm pretty sure it's finally really going to happen ....if FT hadn't released the mini's it would be happening this week but I had to pick up some 5g servos and more small batteries ) and I hope to get one spare ESC so I'll have one to experiment with before trying to flash a full set. So I should know more about flashing SiLabs chips before the end of the year.

    The big issue with SiLabs based ESC's is that they don't have enough memory for a full bootloader so the simple 1-wire interface and USB linker interfaces won't work with them even if you reflash them. So even once flashed it's a bit more complex to set them up for reflashing and changing settings. There are some tricks that can be done and it looks like there's even a way to modify all four in parallel due to how the SiLabs interface works...but since I haven't tried it yet I can't say for sure. I do have a full set of those ESC's on hand but since they're working just fine for me I'm not in any big hurry to go experimenting with them quite yet But sooner or later my natural instincts will get the best of me and I'll start experimenting. Just not until I either get a spare set of ESC's to play with or until I'm done with the GPS experiments and am ready to start a new round of experiments with the emax.

    Today would have been great for flying but unfortunately I ran out of time The hike this morning took longer than expected and the friend who went with me lost his father this week so I had to spend some time with him afterwards to let him talk some stuff out. By the time I got home there just wasn't enough time left to load things up and make it to the flying field before dark.

  5. #5
    Junior Member
    Join Date
    May 2015
    Posts
    1
    Quote Originally Posted by jhitesma View Post
    The emax can be reflashed...but since their SiLabs chips it's considerably different than flashing avr based ESC's. I haven't done mine yet since I'm happy enough with their performance as is (especially for the price) and I don't have the SiLabs toolstick for flashing them. I think it can also be done with an arduino...but since I've had no luck getting an arduino setup to flash AVR's which I'm experienced with I haven't looked into flashing SiLabs chips with one just yet.

    But, I do plan on getting a set of the emax ESC's for my twitchity quad in the next few weeks (I know I've been saying that for a month or two but now that AC season is over I'm pretty sure it's finally really going to happen ....if FT hadn't released the mini's it would be happening this week but I had to pick up some 5g servos and more small batteries ) and I hope to get one spare ESC so I'll have one to experiment with before trying to flash a full set. So I should know more about flashing SiLabs chips before the end of the year.

    The big issue with SiLabs based ESC's is that they don't have enough memory for a full bootloader so the simple 1-wire interface and USB linker interfaces won't work with them even if you reflash them. So even once flashed it's a bit more complex to set them up for reflashing and changing settings. There are some tricks that can be done and it looks like there's even a way to modify all four in parallel due to how the SiLabs interface works...but since I haven't tried it yet I can't say for sure. I do have a full set of those ESC's on hand but since they're working just fine for me I'm not in any big hurry to go experimenting with them quite yet But sooner or later my natural instincts will get the best of me and I'll start experimenting. Just not until I either get a spare set of ESC's to play with or until I'm done with the GPS experiments and am ready to start a new round of experiments with the emax.

    Today would have been great for flying but unfortunately I ran out of time The hike this morning took longer than expected and the friend who went with me lost his father this week so I had to spend some time with him afterwards to let him talk some stuff out. By the time I got home there just wasn't enough time left to load things up and make it to the flying field before dark.
    Just registered to say thanks for putting this write up together.

    Just to add to the discussion, I'm running emax12amp blhelis escs on my quad minis and other 300 or under class multis. I did in fact reflash them with rev12.2 XP-12A (from the ESC selection box) and the combination of this firmware on this hardware has made a considerable difference in the performance of my rigs.

    Anyway, I added permanent headers to the boards using 3 wire pigtails I cut down to size.
    Click image for larger version. 

Name:	SAM_9625.JPG 
Views:	584 
Size:	320.5 KB 
ID:	46661

    Note the 4 pads - and 3 connections - these all conform to the blheli serial pinout.

    On your UNO, connect up the GND (BLACK), D12 (WHITE), and D11(RED)...In this photo D12 is green because I didn't have a white wire.

    Click image for larger version. 

Name:	SAM_9627.JPG 
Views:	715 
Size:	454.8 KB 
ID:	46662

    In the BLHeli Suite - make sure Silabs Serial Interface is checked.

    Flash your UNO with either of the LCD UNO hex's available and that will set up your UNO as an ISP.

    At that point - it's business as usual. When you connect to the ESC the very first time, it will say that it's not recognized and would you like to flash the chip with a new firmware. That's the part where you select XP-12A v12.2. I don't know if 13.2 works, and v12.2 is known to work so I stuck with that. The lowest Emax setting otherwise is a 20amp version so waiting to see if they come out with a firmware update for it.

    The reason I soldered in the headers is because I do all my wiring to size and typically one of the early steps is to confirm motor direction. By soldering in the programming headers. I can solder the wires in however I want, then simply go and reverse the motor direction at a later time. It's also handy to set the calibration end points to match my transmitter end points without having to go through all that calibration nonsense.

    FYI - one more note about the UNO - you get two programmer firmware/hex options, one that is Multi and one that is PNB. The multi hex is is if you're flashing all 4 escs at the same time. I opted to go for the one at at time hex.

  6. #6

    Smile This hopefully saved my new build...

    after hours of research regarding ESC and AfroNaze Rev6 with EMAX Nano 12A OneShot125 and no working/calibrating ESC, I finally found some hints. Newest BLHeli 14.405Beta and using my Adurnio (3 Cables) finally worked. there was no BLHeli on the ESC's so no bootloader and one-wire connection didn't work....

    Now, I'm back in the game

    Thx!
    G.
    Stefan
    Quote Originally Posted by Mochaboy View Post
    Just registered to say thanks for putting this write up together.

    Just to add to the discussion, I'm running emax12amp blhelis escs on my quad minis and other 300 or under class multis. I did in fact reflash them with rev12.2 XP-12A (from the ESC selection box) and the combination of this firmware on this hardware has made a considerable difference in the performance of my rigs.

    Anyway, I added permanent headers to the boards using 3 wire pigtails I cut down to size.
    Click image for larger version. 

Name:	SAM_9625.JPG 
Views:	584 
Size:	320.5 KB 
ID:	46661

    Note the 4 pads - and 3 connections - these all conform to the blheli serial pinout.

    On your UNO, connect up the GND (BLACK), D12 (WHITE), and D11(RED)...In this photo D12 is green because I didn't have a white wire.

    Click image for larger version. 

Name:	SAM_9627.JPG 
Views:	715 
Size:	454.8 KB 
ID:	46662

    In the BLHeli Suite - make sure Silabs Serial Interface is checked.

    Flash your UNO with either of the LCD UNO hex's available and that will set up your UNO as an ISP.

    At that point - it's business as usual. When you connect to the ESC the very first time, it will say that it's not recognized and would you like to flash the chip with a new firmware. That's the part where you select XP-12A v12.2. I don't know if 13.2 works, and v12.2 is known to work so I stuck with that. The lowest Emax setting otherwise is a 20amp version so waiting to see if they come out with a firmware update for it.

    The reason I soldered in the headers is because I do all my wiring to size and typically one of the early steps is to confirm motor direction. By soldering in the programming headers. I can solder the wires in however I want, then simply go and reverse the motor direction at a later time. It's also handy to set the calibration end points to match my transmitter end points without having to go through all that calibration nonsense.

    FYI - one more note about the UNO - you get two programmer firmware/hex options, one that is Multi and one that is PNB. The multi hex is is if you're flashing all 4 escs at the same time. I opted to go for the one at at time hex.

  7. #7

    Where is the link to build one of these?

    Where is the link to build one of these?

  8. #8
    Posted a thousand or more times jhitesma's Avatar
    Join Date
    Mar 2012
    Location
    Yuma, AZ
    Posts
    4,710
    Photos of my build are in the thread linked in the first post: http://forum.flitetest.com/showthrea...l=1#post129338

    The schematic I followed is included with blhelisuite in one of the PDF's that ships with it. The PDF is named "How to Build a BLHeli bootloader interface with USB-UART board" and is in the Manuals folder.

    I actually just used this adapter again a week or two ago updating some old 20a blue series ESC's on my first quad
    Stop in and say hi in the unofficial FT IRC channel!

  9. #9

    BlHeli_S Features in BlHeliSuite

    Hi, I have purchased some BlHeli_S ESCs and I am trying to invert the INPUT POLARITY, wich was previously an option back in the original BlHeli firmware. With the new BlHeli_S firmware, this feature seems to have disappeared. Where can I find it (if it is in fact there)? Otherwise, PLEASE can the developers put it in the BlHeli_S version of BlHeliSuite?

    Thanks so much,

    Jonno

  10. #10
    Fly Angry PsyBorg's Avatar
    Join Date
    Jan 2016
    Location
    Upstate New York
    Posts
    5,040
    Thanks for the info. I will use this to redo my ESC's on my Vesa this spring when I get that back in the air.. I read thru the thread but did not however come across where you gave the resistor value nor the direction you biased the diode although I have a good idea but for those not versed in electronics it may help.
    BILLS LAW: Bills Law specifically states that it covers ANYTHING that Murphy may have forgot, omitted, or plain didn't know in the first place. There fore if it can happen it WILL happen to ME.

    Psyborg FPV You Tube channel.. https://www.youtube.com/channel/UC88...L6-KC9qTa2LgVA

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •