Coder Social home page Coder Social logo

am32-multirotor-esc-firmware's Introduction

All mcu's have been combined to one project. Please use the new repository here.

AM32-MultiRotor-ESC-firmware

Firmware for ARM based speed controllers

GitHub license

The AM32 firmware is designed for STM32 ARM processors to control a brushless motor (BLDC). The firmware is intended to be safe and fast with smooth fast startups and linear throttle. It is meant for use with multiple vehicle types and a flight controller. The firmware can also be built with support for crawlers. For crawler usage please read this wiki page Crawler Hardware

Features

AM32 has the following features:

  • Firmware upgradable via betaflight passthrough, single wire serial or arduino
  • Servo PWM, Dshot(300, 600) motor protocol support
  • Bi-directional Dshot
  • KISS standard ESC telemetry
  • Variable PWM frequency
  • Sinusoidal startup mode, which is designed to get larger motors up to speed

Build instructions

-"make" - builds all targets -"make AM32_XXX_F051 builds" a speciic target -Github actions -Fork project and run the build action within github itself.

Firmware Release & Configuration Tool

The latest release of the firmware can be found here.

To configure AM32 and upload firmware you can use the Multi_ESC config tool using Betaflight passthrough. They can be downloaded from here:

WINDOWS, LINUX

Alternately you can use the Online-ESC Configurator to flash or change settings with any web browser that supports web serial.

Hardware

AM32 currently has support for STSPIN32F0, STM32F051, STM32G071, GD32E230, AT32F415 and AT32F421. The CKS32F051 is not recommended due to too many random issues. Target compatibility List can be found here (APR 2021)

Installation & Bootloader

To use AM32 firmware on a blank ESC, a bootloader must first be installed using an ST-LINK, GD-LINK , CMIS-DAP or AT-LINK. THe bootloader will be dependant on the MCU used ont he esc . Choose the bootloader that matches the MCU type and signal input pin of the ESC. The compatibility chart has the bootloader pinouts listed. Current bootloaders can be found here.

After the bootloader has been installed the main firmware from can be installed either with the configuration tools and a Betaflight flight controller or a direct connection with a usb serial adapter modified for one wire.

To update an existing AM32 bootloader an update tool can be found here.

Support and Developers Channel

There are two ways you can get support or participate in improving am32. We have a discord server here:

https://discord.gg/h7ddYMmEVV

There's a dedicated Slack chat channel here:

https://am32-invite.herokuapp.com/

Etiquette: Please wait around long enough for a reply - sometimes people are out flying, asleep or at work and can't answer immediately.

If you wish to support the project please join the Patreon.

https://www.patreon.com/user?u=44228479

Sponsors

The AM32 project would not have made this far without help from the following sponsors:

Holmes Hobbies - https://holmeshobbies.com/ - The project would not be where it is today without the support of HH. Check out the Crawlmaster V2 for the best am32 experience!

Quaternium - https://www.quaternium.com/ - Firmware development support and hardware donations

Airbot - Many hardware donations

NeutronRC - For hardware, am32 promotion and schematics

Aikon - Hardware donations and schematics
Skystars - For hardware and taking a chance on the first commercial am32 esc's
Diatone - Hardware donations
T-motor - Motor and Hardware donations
HLGRC - Hardaware donations

Contributors

A big thanks to all those who contributed time, advice and code to the AM32 project.
Hugo Chiang (Dusking)
Micheal Keller (Mikeller)
ColinNiu
Jacob Walser

And for feedback from pilots and drivers:
Jye Smith
Markus Gritsch
Voodoobrew

(and many more)

am32-multirotor-esc-firmware's People

Contributors

alkamotors avatar colinniu avatar crteensy avatar cruwaller avatar dusking1 avatar giacomo892 avatar mikeller avatar voodoobrew101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

am32-multirotor-esc-firmware's Issues

iFlight ESC flashing

Hello there, thank you for this great alternative to BLHeli! I hope it will replace BLHeli soon :)

I wanna flash my iFlight 4in1 ESCs with AM32. I already bought a STLinkv2 and tried to connect with CubeProgrammer but when i press "Connect" nothing happens. I assume wrong wiring. I powered the ESC via its main DC input. There are 4 pads next to each ESC on the board, i hope it's 3.3V, GND, SWD and SWC. I definitly know one pad is 3.3V and one GND. However connecting the SWD and SWC to the last 2 pins doesnt work in either direction..

Did anyone flash a iFlight 4in1 before? Are these pads SWD and SWC?

Thanks in advice!

Extend DSHOT telemetry

At the current time DSHOT telemetry is very limited. It can send back to FC eRPM value and nothing else. There are cases where it would be very advisable to send other telemetry values back to FC.

Proposal: Use eRPM 0x0FFF telemetry value as a escape frame.

When one escape frame is sent back to FC, ESC is signaling the FC that the next telemetry frame (extended telemetry frame) will contain extended telemetry data than eRPM data. If two escape frames, one after the other are sent back to FC, it means that 0 eRPM is being sent back to the FC. After receiving extended telemetry frame the FC will expect normal or escape telemetry frame next.

As a telemetry frame can be corrupted, if FC is not expecting an extended telemetry frame, but the corrupted frame could have been an escape one, the next frame shall be discarded. If FC is expecting an extended telemetry frame, and the new frame is corrupted the FC simply discards the frame and will expect a normal or escape telemetry frame next.

Extended telemetry frame format

The extended telemetry frame will be just like the normal telemetry frame as regards the crc. The first 4 bit contains extended telemetry data type, and the next 8 bit with contain the value.

Extended telemetry frame examples

Type 0 ---->>>> data will be temperature in format [0 = -53ºC ---- 254 = 200ºC]
....
....
....
Type 14 ---->>>> data will be debug value high
Type 15 ---->>>> data will be debug value low

Extended telemetry data scheduling

As DSHOT cannot trigger extended telemetry data, the proposal is to schedule it on the firmware side.

Extended telemetry data scheduling examples

1: Type 0, 800ms
2: Type 14, 100ms
3: Type 15, 100ms
So Type 0 will be sent 800ms after starting, type 14 100ms after type 0, type 15 100ms after type 14, and then the scheduling starts over again.

Compatibility with Skystars KM55?

Is AM32 compatible with existing Skystars KM55 4in1 ESCs?

If so please can you update the docs with pinout for flashing?

Want to buy KM55A with AM32 pre-flashed but no news since December.

Does the AM32 ESC support (bi-direction) Dshot600 now?

I saw in WIKI that it only supports (bi-direction Dshot300),but it is described on the home page that(bi-direction)Dshot600 can be supported。
So, do AM32 electronic governors support (bi-direction)Dshot600 now?

I think the update time of WIKI is October 2021. Maybe it should be updated~

中文或许能更好的描述我这个问题,在首页中我看到AM32支持Dshot300 Dshot600 PWM,但是在WIKI 中介绍说是使用双向Dshot仅仅支持Dshot300,因为使用双向Dshot600 会不可避免的出现错误。
WIKI是2021年10月更新的,首页更新时间是2022年11月,所以想问下现在得AM32固件支持(双向)Dshot600了吗?

No power motor

Hi! I installed AM32_FLYCOLOR_1.88 On ESC FLYCOLOR Francy 50A. After switching on, the motor emits a signal, but does not respond to pressing the gas trigger. HolmesHobbies revolver s40 1800kv motor. All I did was unlock the MCU. And then I flashed only the hex file. SerialPortConnector connects to esc, the settings are visible. Can you tell me what could be the matter?

At 1733 throttle, the motor stalls

Hello!
During debugging, the following two problems occurred:

  1. When the throttle is pushed to about 1730, click to stop;
  2. With the acceleration of the motor speed, the voltage value at the input end also rises: 48V rises to 53V (at this moment, the throttle: 1730, the speed r / min: 3212) and stops;
    The test conditions are:
    12s battery
    Install the blades
    Motor: 110KV, 42 poles
    Supplement:
    When the blade is not installed, the above two problems do not occur.

Add new Dshot commands to configure ESC settings.

The usefulness of changing ESC settings is becoming more and more common knowledge. The ability to change esc settings using the FC configurator or OSD will make testing setting changes far easier. Working towards new Dshot commands that will work for AM32, Bl32, KISS, blheli_s (through bluejay), and APD setup of various settings will improve the user experience for many.

Linux build instructions

Hi, and thanks for sharing this project!

I notice you have build instructions for windows - do you plan to document building on linux?

I was able to build on arch linux by installing arm-none-eabi-gcc/arm-non-eabi-newlib and deleting the line in tools.mk that checks the gcc version (because my version was newer than the specified version). From there you can run make $TARGET where $TARGET comes from target.h (the makefile defines whichever target you pass to make). The build output will be in the obj directory.

Flycolor Francy firmware and pins

Hey can anyone help me with the correct firmware for a flycolor Francy firmware flashing and where i must solder my st link wires?

I would really appreciate it

[Feature Request] louder beeper

Any chance of making the beeper louder? I use it as my only way of finding the quad, or quickly confirming an rc link after plugging in.

Feature request: eprom define the names and parameters for the configurator

Because the crawler and quad parameters are drasticaly different. This way you donvt need to update the configurator as often also. Then configure the eprom with some #define yada ya, so it contains the name of the value, the possible values, the default and/or current value, and what type of input box (type or slider).
Just an idea not sure if the eprom has room for it.

Contact administrator

Hello, please tell me how to contact the AM32 administrator and where to find your contact.

Feature request: confimation beep on power-up

Currently Am32 beeps motors only after it detects valid input from FC. This is confusing.
Generate short series of beeps right after power is connected and MCUs booted to inform the user that power is delivered

bl esc on slot car

Gd day from Italy,
we are a group of slot car modeller that are trying to fit brushless motor on slot car.
We'll like to know if it is possible turn off the radio pwm signal setting it always at max speed
enabling us to controll the motor speed directly with the voltage supplied by our slot controller
on the track braid

Tnks for your kind replay

Max

0-Low RPM Startup Torque for Battlebots Applications

I would like to add that in the Battlebots Scene, particularily in the smaller weight classes (150g, 1 lb, 3lb) This startup torque issue has plagued all speed controllers that aren't Simonk, which to this day has the best low rpm-high torque scheme at the 0-500 rpm range, which is the most critical for this application, notably because either people want to direct-drive a 30mm wheel with a 2205 1500kv motor on 3s, or for a majority of cases, spinning an 1806 or 1000kv 3035 or similar propdrive with a 3-10 oz 'flywheel' (Weapon) with 1000+ kg*mm^2 Inertia (My 1lb bot uses an emax rsII 2207 1600kv to drive a shell with 1400kgmm2 of inertia)

The problem being these are all sensorless motors and VESC is just too big to be viable, so we are forced to use what the quadrotor scene uses.

To some extent, setting startup torque to 150% and turning off stall protection helps, but it's still a big issue and most of the solutions seem to still be very inefficient, not to mention most of the smallest speed controllers are still BL-Heli_S

I would love to see an example of AM32 running on an emax bullet 30A.

BF 4.3 (10.8) Motor Rotation dialog does not fully work with AM32

Motor Rotation dialogue (From Betaflight configurator 10.8) does work with BLHeli_32, BLHeli_S and JESC, both versions Vizard and Individual buttons.

However, with AM32 the behaviour is not so nice.
Every time when FC sends a command to change motor rotation the AM32 restarts (can hear tones) and sometimes does not start spinning again.
I guess this is happening because when AM32 saves settings it also restarts the whole ESC.
Wondering if there is a way to do things similar to Blheli_S here?

Thanks!

No TEKKO32 target

hi,
The Tekko32_4in1 is listed in the supported harware wiki page, but the target "TEKKO32" is not referenced in the code and there is no binary generated with this name.

ST-LINK error (DEV_TARGET_CMD_ERR)

I keep receiving this error when I try and connect to an Aikon AK32 35A ESC. I am using the latest firmware on the ST-link V2, and the newest STM32CubeProgrammer. I have tried all the options available in the st link options and nothing changes. I have googled the error and can't seam to find anything related to what we are doing here. I am very new to this and any help would be greatly appreciated.

Pin mapping.

I have to ESC with fried MCU. Pyrodrone and Airbot. I know that Pyrodrone use F350 MCU but it is pin compatible with F051. I can prepare pinout for it but i have to know what exactly you need to know for being able to build FW for it. Can i help you somehow?

EEPROM defaults

The default EEPROM settings are saved in the firmware right?
Can you group all of them in one location or void or put them in EEPROM_Defaults.C or something so they are easier for Manufactures to find and set.

Changing sine power

You chose to change the denominator instead of the numerator so this number seems kinda backwards.
I tried setting the denominator to 10 for many of my builds and didn't have any problems.
This lets the power range be sat as 1-10.
1-100 would be preferable but I dont know if that would make the numbers too high.

RC Car mode

Hi bro, I am interested in developing ESC hardware for RC car and want to use your code for initial prototypes but I am not good in coding. I want to assign pinout on my choice for better layout and functionality. I already designed layout and tested some other open source codes like blheli and simonK on AVR 8bit microcontrollers and learned Assembly to make Some basic modifications but I am still not good to make some more modifications to add brake function before reverse throttle. How you can help me? Or what you will suggest. Can anyone help me to make some modifications in above mentioned Assembly code? Because it will be more easy for me to implement those codes for my existing layout design. Any type of help will be highly appreciated.

[Feature Request] frsky f.port support

It has been discussed here and in the blheli_32 channels that the new F4 based escs have their "telem" pad tied to a pin on the mcu that is not bidirectional. Frsky s.port telemetry is a bidirectional protocol so while enabling s.port on the older style _32 escs was a cool feature, it's physically not possible on the F4 hardware.

Given that the PWM pin can still speak bidirectional d-shot I'm assuming that pad must be on a hardware pin that supports bidirectional communication. Is there any chance we could implement frsky f.port (their newer faster protocol that's basically sbus and s.port combined onto a single wire) on the PWM pin? This would bring back the direct to frsky telemetry feature for airplane and combat robotics folks on the new F4 escs. I'd be happy to help develop this but wanted someone more AM32 and hardware knowledgeable to give it the gut check in case I'm missing something obvious here?

How to use hall sensor on AM32?

There is options “Use Hall Sensors”,but how to connect the hall sensor to ESC? Is there any guide about hall sensor?

Quadcopter UAV,How to configure it?

Hello, used on the ESC of a quadcopter drone, the motor is 110KV, 21 pairs of poles。
the "AM32 MultiRotor ESC firmware" program. What configurations would you recommend?

Info on brushed mode setup?

I've seen references to brushed mode, if this is supported could we please get a short page explaining how it works and which ESC connections to use.

pwm control

When I use pwm control, the motor can make a beeping sound, but when the pwm is in the 1051-2001 range, the motor does not work and the sound disappears.

Telemetry on pin PA14

I have a set of Razor32 V2 35A ESC's which I have converted to AM32 firmware, however the telemetry pad on these ESC's is connected to PA14 (usart2) and not PB6.

Is there some option for changing the telemetry TX pin to PA14?

Edit: PA14 is only Uart2tx as an alternate function.

Feature request: Pwm input parameters

I am using MP6531 for my crawler on a wraith32 35A with Spektrum surface tx/rx

I am having some strange arming issues. I have to play with the throttle to get it to arm. Maybe I have constrained the deadband to much and its just noise resetting the input to 0. But almost always I have to set my throttle trim to -2 to -6 or to arm. Being OCD I would like to set it to zero.

So I am asking if can pwmDeadband, pwmHigh, pwmNeutral, and pwmLow can be added and placed near the top of main.c

I use a spektrum remote which has a neutral of 1500, a high of 1900 and a low of 1100 (aproximatly). I do know know where all the relavent values are, I have played with settings in main.c here

  		  if (bi_direction == 1 && proshot == 0 && dshot == 0){
  			  if (newinput > 1050) {							//Voodoo- go forwards
  				  if (forward == dir_reversed) {
  					  adjusted_input = 0;
  					  forward = 1 - dir_reversed;
  					  old_routine = 1;
  					  zero_crosses = 0;
  				  }
  				  else{
  					  adjusted_input = map(newinput, 1050, 2000, 0, 2000);		//Voodoo-
   													//	tempbrake = 0;
  				  }
  			  }
  			  if (newinput < 950) {								//Voodoo- go backwards
  				  if (forward == (1 - dir_reversed)) {
  					  old_routine = 1;
  					  zero_crosses = 0;
  					  adjusted_input = 0;
  					  forward = dir_reversed;
  				  }
  				  else{
  					  adjusted_input = map(newinput, 0, 950, 2000, 0);		//Voodoo-
  				  }
  			  }
  			  if (newinput >= 950 && newinput < 1050) {					//Voodoo- Set to neutral
  				  adjusted_input = 0;
  			  }
  		  }

But there are setting in IO.c that are possibly relavent.

void computeServoInput() {

	int lastnumber = dma_buffer[0];
	for (int j = 1; j < 3; j++) {

		if (((dma_buffer[j] - lastnumber) > 1000)
				&& ((dma_buffer[j] - lastnumber) < 2010)) { // blank space

			servorawinput = map((dma_buffer[j] - lastnumber), 1030, 2000, 0,
					2000);

In the past I have also constrained values like this (this code is from an arduino project)

        pwmOutput = map(pedalInput, pedalMin, pedalMax, forwardMin, reducedForwardMax);
        pwmOutput = constrain (pwmOutput, forwardMin, reducedForwardMax);

just incase the minimum and max are off, I can set my TX/RX to have a pwm of 1000-2000 but what happens when the firmware then gets 1015 from my remote? since the min in the pwm is 1030.

Dalrc rocket 50A esc restart

dear friend,
dalrc rocket 50a esc flash firmware fd6288-1.93 bootloder pa2 V11.bin all stm32 mcu restart music cycle can't control motor.

T-Motor F45 single ESC

So I am trying to get this working on a T-Motor F45a single ESC, Before flashing I did test blheli and all was working with the motor. I was able to flash PA2 version 10 bootloader and the latest firmware as well as set the settings, It powers up beeps and arms, but when trying to move the motor it cogs terribly and gets hot very quickly. I have tried every combination of the 3 wires to the motor with no success, I can tell which combo is correct by the clear tone when starting up. Any Ideas?

Single MCU support for 4-in-1 ESC

With the prices skyrocketing in MCUs, would it be possible to support having 1 MCU for a 4-in-1 ESC? Maybe a more powerful MCU like an f3 or f4

flash error

trying to flash IFLIGHT1_58 and it gets to 77% then hangs, giving the error "BAD OIR NO ACK FROM IF".

Cannot change Running Brake Level in Multi ESC Config Tool 1.82

Hi! I'm using Rhinoesc 80A and I wanted to change Running Brake Level from default 10 to some lower value. Changing this option to whatever else than 10 just disables sinusoidal startup. ESC just ignores sinusoidal startup option in such case. Am I doing something wrong or I do not understand something?

Rhinoesc and version 1.94

Hi! When flashing Rhinoesc 80A with version 1.94 (AM32_RHINO80A_F051_1.94.hex) it just produces constant beeps when started and just does not work at all. Flashing was done by Multi ESC Config Tool 1.82. I've tried so far:

  1. setting default values in tool,
  2. trying to calibrate throttle range (this is not possible at all).

Everyting seems to work when flashing back to 1.93. Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.