Arduino-FOC
Arduino-FOC copied to clipboard
Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
This repo would benefit from keeping the code formatting more strict. Especially spaces around operators are all over the place. What about adding https://github.com/marketplace/actions/clang-format-check github action?
Hello @askuric, When I use _micros(), I get 75us for the loop of FOC: t0=_micros(); motor.loopFOC(); motor.move(); t2=_micros(); Serial.print("..."); Serial.println(t2-t0); The result is t2-t0 = 94 with a time distribution...
motor running at open_loop_velocity_example.ino,motor can spin like normal,but when I connect to the oscilloscope, it is not a standard svpwm waveform I tried to change several atmega328p s,but the same....
I'm wondering why it's possible to do FOC without sampling phase current.
I am using a stepper motor in open loop mode with a KV value. When the shaft velocity is negative, the voltage.q is dropping with velocity while is should be...
**Describe the bug** lib\Arduino-FOC\src\current_sense\hardware_specific\stm32\stm32f4\stm32f4_mcu.cpp: In function 'void* _configureADCLowSide(const void*, int, int, int)': lib\Arduino-FOC\src\current_sense\hardware_specific\stm32\stm32f4\stm32f4_mcu.cpp:42:75: error: 'SIMPLEFOC_CURRENT_SENSE_INIT_FAILED' was not declared in this scope 42 | if(_adc_init(cs_params, (STM32DriverParams*)driver_params) != 0) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED; |...
Arduino IDE Adafruit ItsyBitsy M4 Load SimpleFOC example full_control_serial Click Verify Get loads of errors like this… C:\Users\Richard\Documents\Arduino\libraries\Simple_FOC\src\drivers\hardware_specific\samd51_mcu.cpp:32:17: error: ‘TC4_CH1’ was not declared in this scope; did you mean ‘TC3_CH1’?...
Although `FOCModulationType::Trapezoid_150` is capable of spinning a motor, I'm not sure if it generates the promised waveform. See the following code in `BLDCMotor::setPhaseVoltage()`: ```C++ case FOCModulationType::Trapezoid_150 : // see https://www.youtube.com/watch?v=InzXA7mWBWE...
I need this functionality for backemf sensing, since it's a nice isolated change I'm putting it up for review now. Tested on the B-G431B, this is the only board I...
Only tested on B-G431B with inline current sense.