Fork from bluejay at github and modified for my custom ESC. I need to modify it because some mistake design on my ESC hardware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
5.8 KiB

  1. <img align="right" src="bluejay.svg" alt="Bluejay" width="250">
  2. # Bluejay
  3. [![GitHub release (latest by date)](https://img.shields.io/github/downloads/mathiasvr/bluejay/latest/total?style=for-the-badge)](https://github.com/mathiasvr/bluejay/releases/latest)
  4. [![Discord](https://img.shields.io/discord/811989862299336744?color=7289da&label=Discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/phAmtxnMMN)
  5. Digital ESC firmware for controlling brushless motors in multirotors.
  6. > Based on [BLHeli_S](https://github.com/bitdump/BLHeli) revision 16.7
  7. Bluejay aims to be an open source successor to BLHeli_S adding several improvements to ESCs with Busy Bee MCUs.
  8. ## Current Features
  9. - Digital signal protocol: DShot 150, 300 and 600
  10. - Bidirectional DShot: RPM telemetry
  11. - Selectable PWM frequency: 24, 48 and 96 kHz
  12. - PWM dithering: 11-bit effective throttle resolution
  13. - Power configuration: Startup power and RPM protection
  14. - Numerous optimizations and bug fixes
  15. See the project [changelog](CHANGELOG.md) for a list of changes.
  16. ## Flashing ESCs
  17. Bluejay firmware can be flashed to BLHeli_S compatible ESCs and configured using any of the following:
  18. - [ESC Configurator](https://esc-configurator.com/) (PWA)
  19. - [Bluejay Configurator](https://github.com/mathiasvr/bluejay-configurator/releases) (Standalone)
  20. ### Release binaries
  21. All releases can be found in the [releases](https://github.com/mathiasvr/bluejay/releases) section.
  22. Release files use a naming convention similar to BLHeli: `{T}_{M}_{D}_{P}_{V}.hex`.
  23. | | | |
  24. |---|--------------------|---------------------------------------------------------|
  25. | T | `A` - `W` | Target ESC layout |
  26. | M | `L` or `H` | MCU type: `L` (BB1 24MHz), `H` (BB2 48MHz) |
  27. | D | `0` - `90` | Dead time (`0` *only* for ESCs with built-in dead time) |
  28. | P | `24`, `48` or `96` | PWM frequency [kHz] |
  29. | V | E.g. `0.7` | Bluejay version |
  30. ## Comparison of BLHeli_S and Bluejay settings
  31. The following table shows a correspondence between BLHeli_S and Bluejay's startup power settings.
  32. | BLHeli_S | Bluejay | | |
  33. |---------------|--------------------|--------------------|--------------------|
  34. | Startup Power | Min. Startup Power | Max. Startup Power | RPM Power (Rampup) |
  35. | 0.031 | 2 (1001) | 1 (1004) | 2x |
  36. | 0.047 | 4 (1002) | 2 (1008) | 2x |
  37. | 0.063 | 6 (1003) | 3 (1012) | 3x |
  38. | 0.094 | 8 (1004) | 4 (1016) | 4x |
  39. | 0.125 | 12 (1006) | 6 (1024) | 5x |
  40. | 0.188 | 18 (1009) | 9 (1035) | 6x |
  41. | 0.25 | 24 (1012) | 12 (1047) | 7x |
  42. | 0.38 | 36 (1018) | 18 (1071) | 8x |
  43. | 0.50 | 50 (1024) | 25 (1098) | 9x |
  44. | 0.75 | 74 (1036) | 37 (1145) | 10x |
  45. | 1.00 | 100 (1049) | 50 (1196) | 11x |
  46. | 1.25 | 124 (1061) | 62 (1243) | 12x |
  47. | 1.50 | 150 (1073) | 75 (1294) | 13x |
  48. - **Minimum startup power:** Minimum power when starting motors. Increase if motors are not able to start with low throttle input.
  49. - **Maximum startup power:** Limits power when starting motors or reversing direction.
  50. - **RPM Power Protection (Rampup):** Limits how fast power can be increased. Lower values will avoid power spikes but can also decrease acceleration.
  51. ## Contribute
  52. Any help you can provide is greatly appreciated!
  53. If you have problems, suggestions or other feedback you can open an [issue](https://github.com/mathiasvr/bluejay/issues).
  54. You can also join our [Discord server](https://discord.gg/phAmtxnMMN) to ask questions and discuss Bluejay!
  55. ### Obtaining the toolchain
  56. To obtain the toolchain, [download the C51 package from Keil](https://www.keil.com/demo/eval/c51.htm). Run it with wine:
  57. wine c51v960a.exe
  58. This will install toolchain and uVision. To obtain a license key (which you will need in order to link files above a certain size) you will have to run uVision in order to get your Computer ID.
  59. wine ~/.wine/drive_c/Keil_v5/UV4/UV4.exe
  60. Go to "File" -> "License Management" note your "Computer ID".
  61. With this information, you can request a licence key on the [Keil license installation page](https://www.keil.com/license/install.htm?P=X9F3Y-I8FIW-TWSZ0). In the CID field you need to enter the Computer ID which uVision showed you in the previous step.
  62. The license ID will be sent to you via E-Mail, once received you paste it into the LIC field, press "Add LIC" and you are done.
  63. ### Building
  64. For your convenience a Docker Image is provided that will set up the toolchain. For this to work you need to have completed the step [Registering via Wine](#registering-via-wine) and your ```.wine``` directory has to be copied to the tools directory.
  65. > The .wine directory can be deleted from the tools directory after the docker image has been created.
  66. To build the docker image [install docker](https://docs.docker.com/engine/install) and from the tools directory run:
  67. docker build -t bluejay-build .
  68. A build script is provided, it will build all targets if no further parameters are provided:
  69. ./build.sh
  70. or a specific target if you chose to:
  71. ./build.sh -l A -m H -d 0 -p 96
  72. If a specific target is chosen, all parameters need to be provided: layout, mcu, deadtime and pwm
  73. The source from the projects root is used to build the firmware.