neoxic / escape32 Goto Github PK
View Code? Open in Web Editor NEWBLDC motor control firmware for 32-bit ESCs
Home Page: http://wiki.escape32.org
License: GNU General Public License v3.0
BLDC motor control firmware for 32-bit ESCs
Home Page: http://wiki.escape32.org
License: GNU General Public License v3.0
Over CRSF the ESC could generate a config menu,. Then it could be fully configured via the transmitter/handset via ELRS.
It would also be helpful to use CRSF then as half-duplex, so only one wire (TX on the stm32 side) would be sufficient.
With this, the ESC could be connected via the CRSF serial of the receiver, whereas the servos could be connected via pwm.
If CRSF half-duplex is used, the full/half-duplex converter should be used on the receiver-serial.
Hey. I have built a powerboard to drive 300v+ dc brushless motor.
We used PID code from a guy and it has no torque.
We tried ESP code from someone, it has no safety and blows the powerboard IGBTs.
Can you help with code to drive 3-phase motor, prob using esp or stm, to create torque without blowing igbt. Probably some safety.
Regards. Jakes
From the documentation it's not clear what the supported build environments are, but when I tried to use CMake on cygwin it generates paths that the windows based arm cross compiler (from GNU Arm Tools) doesn't understand.
cygwin:
$ cmake --version
cmake version 3.25.3
Snippet from a build.make file
/cygdrive/d/Programs/GNUArmTools/active/bin/arm-none-eabi-gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj -MF CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj.d -o CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj -c /cygdrive/d/Users/Hydra/Documents/dev/projects/escape32/ESCape32/mcu/STM32G071/config.c
As you can see, the paths are absolute and have a /cygdrive
prefix, which is normal for cygwin tools which understand such paths. However the c compiler is a windows tool which usually expects paths in the form <drive>:\...
, however the gcc c compiler on windows also accepts paths like /<drive>/...
.
arm-none-eabi-gcc --version
arm-none-eabi-gcc.exe (Arm GNU Toolchain 12.2.MPACBTI-Rel1 (Build arm-12-mpacbti.34)) 12.2.1 20230214
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If I run the same CMake commands on msys2 (ucrt64) the path is generated as follows:
msys2:
$ cmake --version
cmake version 3.26.4
/d/Programs/GNUArmTools/active/bin/arm-none-eabi-gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj -MF CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj.d -o CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj -c /d/Users/Hydra/Documents/dev/projects/escape32/ESCape32/mcu/STM32G071/config.c
Note the /d/
prefix, which the compiler seems to understand.
I had a quick look to see if it would be possible to tell cmake
to use relative paths, which would avoid the issue, but I was unable to find out how to do this.
To summarize:
Now we can control the motor through the serial port, can we set up a protocol to adjust the motor parameters? Not use the cli command. @neoxic
I build source code but i get this message,
[ 0%] Building C object CMakeFiles/AART1-rev11.elf.dir/src/main.c.obj
/home/allen/ESCape32/src/main.c:68:11: error: initializer element is not constant
Cfg cfg = cfgdata;
^~~~~~~
CMakeFiles/AART1-rev11.elf.dir/build.make:145: recipe for target 'CMakeFiles/AART1-rev11.elf.dir/src/main.c.obj' failed
make[2]: *** [CMakeFiles/AART1-rev11.elf.dir/src/main.c.obj] Error 1
CMakeFiles/Makefile2:315: recipe for target 'CMakeFiles/AART1-rev11.elf.dir/all' failed
make[1]: *** [CMakeFiles/AART1-rev11.elf.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2
how can i fix the problem?
thank you.
Hi there, awesome work!
This is a feature request or more even a feature possibility request.
I'm looking for a way to align VTOL Quadplane Motors in flight when they are stopped. (like this: https://youtu.be/rsTkrPtcVTk?t=34) From my understanding this should be possible with a simple hall sensor+magnet (on/off input) and some software tweaks to have a slow turning movement until the hall sensor is reached?
There are very few ESCs that have this capability and none of them fit my criterias, bringing this feature to ESCape32 would be a huge win for the VTOL community, as there so much more Hardware available.
What do you think? Would such a feature be at all be possible and/or of your interest?
Thanks!
Hardware:
ESC: T-MOTOR F35A 3-6S
Motor: F20Ⅱ KV2800
Firmware: TMOTOR2-rev10.bin
Description:
4S battery, HJ Servo Tester for PWM input. No propeller. HJ Servo Tester‘s PWM start from 800, end to 2200. The motor start to spin at PWM 1050. Motor increase spinning speed with PWM value increase, but after PWM reach to 2200, motor stop spinning. It will only start spinning after PWM input fall back to 800.
This happens almost every time, with a very small probability, maybe one in ten, that the motor will continue to spin with PWM input reach to 2200.
I have tried PWM calibration, but it seems not works. With the original BliHeli firmware, the motor can spin with PWM value at 2200.
I am very appreciate any clues or replies.
It would be interesting to have the brake feature, which is very useful on plane.
Obviously it will consume power but in many contexts it is a necessity to be able to keep the propeller stationary at zero throttle while the plane is in flight.
Attempting to build results in compilation errors due to missing nvic.h files.
Commands used:
$ cmake -B build -D LIBOPENCM3_DIR=../libopencm3 -G "Ninja" -G "Unix Makefiles"
-- The C compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (0.9s)
-- Generating done (0.6s)
-- Build files have been written to: /d/Users/Hydra/Documents/dev/projects/escape32/ESCape32/build
Hydra@DESKTOP-H1JUK44 ~/.../projects/escape32/ESCape32 (master ?3)
$ cd build
Hydra@DESKTOP-H1JUK44 ~/.../escape32/ESCape32/build (master ?3)
$ make IFLIGHT2
[ 25%] Building C object CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj
In file included from d:\users\hydra\documents\dev\projects\escape32\libopencm3\include\libopencm3\cm3\nvic.h:147,
from d:\users\hydra\documents\dev\projects\escape32\libopencm3\include\libopencmsis\core_cm3.h:17,
from D:/Users/Hydra/Documents/dev/projects/escape32/ESCape32/src/common.h:22,
from D:/Users/Hydra/Documents/dev/projects/escape32/ESCape32/mcu/STM32G071/config.c:20:
d:\users\hydra\documents\dev\projects\escape32\libopencm3\include\libopencm3\dispatch\nvic.h:24:17: fatal error: libopencm3/stm32/g0/nvic.h: No such file or directory
24 | # include <libopencm3/stm32/g0/nvic.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/IFLIGHT2-rev5.elf.dir/build.make:76: CMakeFiles/IFLIGHT2-rev5.elf.dir/mcu/STM32G071/config.c.obj] Error 1
make[2]: *** [CMakeFiles/Makefile2:1089: CMakeFiles/IFLIGHT2-rev5.elf.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1122: CMakeFiles/IFLIGHT2.dir/rule] Error 2
make: *** [Makefile:566: IFLIGHT2] Error 2
See screenshots below:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.