Arduino-FOC
Arduino-FOC copied to clipboard
Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
When building SimpleFOC (with `-Wall`), I get the following compiler warnings – which unfortunately prevent a build with `-Werror`: ``` .pio/libdeps/nanoatmega328/Simple FOC/src/common/foc_utils.cpp: In function 'float _sqrtApprox(float)': .pio/libdeps/nanoatmega328/Simple FOC/src/common/foc_utils.cpp:68:21: warning: dereferencing...
I'd like to use some existing ATmega32u4 based driver boards. Theses are wired up to the 6-channel PWM output that is unique to the [ATmega32u4](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf)'s `10-bit High Speed Timer/Counter4`. |...
**Describe the bug** After instantiating the InlineCurrentSense object, and calling init() based on the object, it is found that the program will stay in the init function and not return...
Looks like LEDC actually allows setting a centre-aligned PWM. See the ledc_timer_config_t field hpoint field, which defines the point at which the PWM switches on. By setting both duty cycle...
From SimpleFoc I use only the encodor software. I run with Esp32 wroom. The software i wrote is for a cnc using dc motor. Whe I use the arduino espressif...
Unless I'm mistaken I've noticed a potential for a memory leak when instantiating current sense parameters for example looking at stm32g4_mcu.cpp I see: ``` void* _configureADCLowSide(const void* driver_params, const int...
**Describe the bug** There is a bug in the 'alignment and cogging test' example. The motor fails to initialize properly in the start of the test function. The function `void...
voltage limiting is missing (for both velocity motion control and angle motion control) for the case if no phase_resistance is given: https://github.com/simplefoc/Arduino-FOC/blob/e9ac395cb9d698c0aa6d779206a6c413fbedcbb3/src/BLDCMotor.cpp#L416 The corrected (and tested code) looks like this:...
Incredible library. Thanks! I can't find any docs describing the required pins (if any) for the ATMega2560. Are the complementary pin pairs for the ATmega2560 4&13, 11&12, and 9&10? I...