Shop OBEX P1 Docs P2 Docs Learn Events
Open Propeller Project #9: Program BLHeli ESCs with the ELEV-8 Flight Controller — Parallax Forums

Open Propeller Project #9: Program BLHeli ESCs with the ELEV-8 Flight Controller

Kyle M.Kyle M. Posts: 112
edited 2016-04-27 16:04 in Propeller 1
After over a year of R&D, Parallax has taken a tremendous leap in the sUAV industry by releasing the first ever completely open-source flight controller to feature a multi-core microprocessor; the ELEV-8 Flight Controller. To mark the occasion and showcase some the ELEV-8 Flight Controller's, we thought this would be a great opportunity to bring back the Open Propeller Project series.

We invite you to join this project and explore one of the ELEV-8 Flight Controller's most innovative features: support for two-way communication with ESCs (allowing for ESC programming, closed loop control, and more!) We're even giving away an ELEV-8 v3 Quadcopter Kit and four ELEV-8 Flight Controllers along the way! Read on for the details...

OBJECTIVE
Use SimpleIDE and the ELEV-8 Flight Controller (#80204) to load and configure firmware for the Parallax xRotor 20A ESCs (#752-90015), with error checking and the ability to program ESCs in batches.

An ELEV-8 v3 Quadcopter Kit will be awarded to the individual who has the most beneficial impact on this project as judged by Parallax staff (we will be looking for frequent contributions that are positive and constructive, not just a final product)!*

MILESTONES
We have broken the overall end objective into a series of milestones, or “sub-objectives”. These do not necessarily have to be met, or in this order, but may be useful steps towards the ultimate objective.
  • Demonstrate two-way communication between an ELEV-8 Flight Controller and a Parallax xRotor ESC via SimpleIDE terminal.
  • Demonstrate the ability to modify the configuration settings of a Parallax xRotor ESC with an ELEV-8 Flight Controller via SimpleIDE, with error checking.
  • Demonstrate the ability to flash BLHeli firmware onto a Parallax xRotor ESC with an ELEV-8 Flight Controller via SimpleIDE, with error checking.
  • Final objective, as described above.
The first individual to share functioning source code for any individual milestone will receive a complimentary ELEV-8 Flight Controller (or refund for a previously purchased flight controller).*

DETAIL & BACKGROUND
The ELEV-8 Flight Controller is the first open-source flight controller (to our knowledge) has been engineered to allow for two-way communication with Electronic Speed Controllers (ESC)s. The goal of this challenge is to explore one the possibilities created by this feature; seamless programming of ESC firmware.

The Parallax xRotor 20A ESCs are manufactured for Parallax by HobbyWing, and are based on their xRotor 20A ESC, but differ in that the Parallax model runs BLHeli Firmware (BLHeli bootloader & firmware factory-loaded) and has bullet connectors factory-installed. We chose these ESCs because of their solid reputation and performance, high quality in design and production, and omission of a BEC. The xRotor ESC runs on a F396 MCU with six TPCA8087 MOSFETs, but is not open-source.

As just mentioned, we have chosen to run BLHeli firmware on our ESCs. We ultimately decided on BLHeli (over SimonK and HobbyWing) because it’s open source, performed very well in our tests, works on both AVR and SiLabs based ESCS, and a GUI interface is available for configuration.

ESCs with SiLabs ICs (such as ours) can be flashed with BLHeli a number of ways. For ESCs that do not already have a SimonK or BLHeli bootloader, initial flashing of the firmware must be done via a C2 interface, requiring contact to three pads on the PCB. For ESCs with SiLabs ICs that already have the BLHeli bootloader (as the Parallax xRotor ESC does), programming (including flashing w/ new firmware) can be done solely through the 2-wire signal cable. This is normally done with a programming adapter and BLHeliSuite. Our objective is to utilize a propeller-based microcontroller as the programming adapter (eventually) independent of BLHeli Suite.

Although it might be possible to coordinate with the creator of BLHeliSuite to get that software to support propeller-based flashing interfaces, there are a number of reasons why we think developing an independent solution would be superior. First, we have had numerous challenges with “bugs” associated with BLHeliSuite (won’t detail them now, but can provide details if anyone is interested). Second, it’s overkill for this application - if any settings ever need to be changed, is very few and very rarely, and therefore could easily edited in a terminal. Finally, not only will developing Propeller-based BLHeli programming allow for a more seamless experience for Propeller users, but it will also lay the foundation for further development of 2-way ESC communication.

COLLABORATION
This will be the key to the success of this project. We will establish both a forum post and folder in the GitHub repository for this project. We expect any and all code to be managed through GitHub. Links to those resources will be added here as they become available. Parallax welcomes any other suggestions on how we may support this project.

RESOURCES *As this project evolves, Parallax reserves the right to modify the scope or other constraints. In order to be eligible any awards/gifts/complimentary products, a participant must release all of their work under a GNU General Public License and upload all source code (well-documented and commented, including instructions for use/operation) to the Project’s GitHub repository. Limit of one award/gift/complimentary product per person per type of gift. We will not provide complimentary hardware up front.

Comments

  • Kyle,
    ESC's have always been a black box with unhelpful documentation and poor configuration procedures.
    This initiative is great - it should make them more user friendly and controllable.
    Some of us are interested in configuring ESC's to be bi-directional. I looked at the BLHeli documentation and found some unclear references.
    Is it possible that a bi-directional configuration option will come out of this work?
  • macrobeak wrote: »
    Kyle,
    Some of us are interested in configuring ESC's to be bi-directional. I looked at the BLHeli documentation and found some unclear references.
    Is it possible that a bi-directional configuration option will come out of this work?
    BLHeli includes a "Motor Direction" parameter that, as currently implemented, is written to the firmware with BLHeliSuite. I suppose it's theoretically possible that that parameter could be changed "on the fly", but I can't say for certain without a better understanding of the firmware and circuit - neither of which are my specialty as a robotics engineer. Sorry I couldn't give a more definitive answer :/
  • If you mean making the ESC able to reverse direction mid-flight, my guess is that would be a fairly significant ESC firmware change, not merely a settings change.
  • PublisonPublison Posts: 12,366
    edited 2016-02-20 16:19
    Kyle,
    I am curious about the steps in the Programming process step 7-11. Are you verifying that the ECS's can be programed with the with the standard Xrotor20A firmware first, then program them all after with the Parallax teaks? I guess I'm con fused at programming them one at a time in one step, then doing a bulk program in a later step.

  • JasonDorie wrote: »
    If you mean making the ESC able to reverse direction mid-flight, my guess is that would be a fairly significant ESC firmware change, not merely a settings change.
    Yeah, I would agree with that. I doubt the firmware architecture is designed to support something like that - hence the "theoretically possible", as it might not be very practical (to implement). Here's a implementation that I would guess would be more feasible (especially with this project): when the ELEV-8 is disarmed, a auxiliary Tx/Rx channel could swtich direction of the motor- when the switch is flipped the flight controller re-configure the direction of the ESC. One thing that could be a problem in this example is if the ESCs have to be power cycled when programming.
    Publison wrote: »
    Kyle, I am curious about the steps in the Programming process step 7-11. Are you verifying that the ECS's can be programmed with the with the standard Xrotor20A firmware first, then program them all after with the Parallax teaks? I guess I'm con fused at programming them one at a time in one step, then doing a bulk program in a later step.
    A keen observation of one of my complaints with BLHeliSuite. Steps 7-11 are to update the firmware - which BLHeliSutie does not support doing in "Batches". When the firmware is updated, all of the settings are reset to default, so there is no point in writing them to the ESC at step 10. Once all the ESCs in the batch have been individually updated, then Parallax's "custom" settings are applied in steps 13 through 16 as a "batch" because BLHeliSuite does allow ESC settings to be written as a batch. It's worth noting that procedure and my current knowledge is for BLHeliSuite version 14.2.
  • I'm surprised nobody took a crack at this. Any PM's directly to the Parallax staff?
  • Publison wrote: »
    I'm surprised nobody took a crack at this. Any PM's directly to the Parallax staff?

    Nope :(
  • JasonDorieJasonDorie Posts: 1,930
    edited 2016-04-11 17:36
    I looked around a bit, but the source for the programmer isn't public, just the ESC firmware, and it's all assembly for a foreign chip, so it's not simple to read. (Maybe that's changed - it was quite a while ago when I looked)
Sign In or Register to comment.