- PCB design using KiCAD or Cadence SPB.
- MCU program and port system using C language.
- Programs for data visualization via Qt.
- FPGA program using Verilog HDL.
You might want to check my personal website at https://zhuyanzhen1.github.io/ZhuYanzhen1/
你还在为有刷电机的高噪声、低响应速度和低寿命而烦恼吗?这个项目是一个20块钱就能搞定的FOC无刷电机控制方案!This project is a FOC (Field Oriented Control) BLDC Motor control scheme that can be done for 3$!
Home Page: https://zhuyanzhen1.github.io/miniFOC/
License: GNU Affero General Public License v3.0
You might want to check my personal website at https://zhuyanzhen1.github.io/ZhuYanzhen1/
有没有可能支持无感? sensorless FOC
No response
期待大佬更新!另外有几个问题:1.驱动电流是不是可以通过更换mos管获得更大的电流?2.Simplefoc好像支持了foc电流模式?
步进电机支持吗,有方案吗
No response
v1.1.2
No response
/**************************************************************************//**
\file config.h
\brief used to place important parameter configurations for users
\author Lao·Zhu
\version V1.0.3
\date 1. August 2023
******************************************************************************/
#ifndef MINIFOC__CONFIG_H_
#define MINIFOC__CONFIG_H_
/*! \brief bus voltage is 8.0V */
#define VBUS 8.0f
/*! \brief set BLDC polar pairs to 7 */
#define POLAR_PAIRS 7
/*! \brief SC60228 resolution is 2^8 = 4096 */
#define ENCODER_RESO 4096
/*! \brief set calibrate torque to 0.5 */
#define CALI_TORQUE 0.5f
/*! \brief Not using space vector pulse width modulator */
#define USE_SVPWM 1
/*! \brief set UART baud rate to 512000 */
#define UART_BAUDRATE 115200
/*! \brief set PWM frequency to 20kHz */
#define PWM_FREQUENCY 20
/*! \brief set FOC loop frequency to 8kHz */
#define TIM2_FREQUENCY 8
/*! \brief set speed/angle PID loop frequency to 100Hz */
#define TIM13_FREQUENCY 100
/*! \brief set speed update frequency to 200Hz */
#define SPEED_UP_FREQ 200
/*! \brief set SPI frequency to 72 / 16 = 4.5MHz */
#define SPI_PRESCALE SPI_PSC_16
/*! \brief UART preemption priority set to 1 */
#define UART_PRIORITY 1
/*! \brief TIMER2 preemption priority set to 2 */
#define TIM2_PRIORITY 2
/*! \brief TIMER13 preemption priority set to 3 */
#define TIM13_PRIORITY 3
/*! \brief User flash space start address, 1KB user flash */
#define FMC_WRITE_START_ADDR 0x08007C00UL
#endif //MINIFOC__CONFIG_H_
正常
首先感谢大佬,提供了一个这么完善的项目,收获颇多
下面是我根据您的资料复刻的minifoc,我自己修改了芯片为GD32f130C6T6(QFN的涨价了些):
主要遇到下面这些问题,因为本人无法解决,所以来麻烦大佬看看,十分感谢!
手动在main函数中加入foc计算以及输出控制,电机可以旋转,但是使用原代码烧录后,打开上位机,设定好波特率后,可以看到图表内有编码器数据,但是手动旋转电机360度会出现数据突然间跳很大的情况:
使用上位机中三种控制模式,点击Start后,调整下方滑块电机均无反应:
再次感谢大佬!
能放出开源代码,已经很了不起了!非常感谢!
如果可以支持ESP32的Arduino平台开发,相信更容易推荐开源软件的传播。
而且ESP32似乎在性能和功能上比GD32更有优势,更容易拓展。单价也很低。
催更Wiki😁
No response
这么便宜的方案,不知道有没有成品? 另外,能扩展到多大功率?
这么便宜的方案,不知道有没有成品? 另外,能扩展到多大功率?
这个项目目前只是有感FOC的实现吧,有计划做无感的吗
No response
[Feature] 有可能把odrive的固件移植到这个板子上吗(如果增加电流采样电路)?国产的单片机是否能胜任这个计算量呢?
No response
foc_calculate_dutycycle()
这个函数计算的是FOC三相电压的输出,但是计算方法看着并非是SVPWM而是SinePWM。
在SimpleFOC给的描述中SinePWM的计算方法包括Inverse Park transformation和Inverse Clarke transformation,计算方式如下:
$$U_{\alpha}=U_dcos(\theta)-U_qsin(\theta)$$
$$U_{\beta}=U_dsin(\theta)+U_qsin(\theta)$$
一般只需要切向的$U_q$而不需要径向的$U_d$,故而$U_d=0$是期望值。
在作者的设计代码中是这样处理的:
void foc_calculate_dutycycle(float elect_angle, float d, float q, float *u, float *v, float *w) {
float alpha, beta;
/* fast calculation of cosine and sine value of electric angle */
float cf = fast_cos(elect_angle);
float sf = fast_sin(elect_angle);
/* firstly, the inverse Park transform is calculated */
alpha = d * cf - q * sf;
beta = q * cf + d * sf;
/* secondly, the inverse Clarke transform is calculated */
*u = 0.5f - alpha / VBUS;
*v = 0.5f + (alpha * 0.5f - beta * 0.866025404f) / VBUS;
*w = 1.5f - *u - *v;
}
0.5
以及0.15
这样奇怪的常量设置能否解释一下具体原因,以及整体计算方式应当归为SinePWM调制而不是SVPWM,与您的工程描述相悖。
@
No response
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.