-
Notifications
You must be signed in to change notification settings - Fork 597
Add two linear halls sensor module. #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
powershield examples + hall_sensor examples rename
添加线性霍尔传感器模块。 两个线性霍尔90度安装检测一对极的径向磁铁来获取转子角度。 一个线性霍尔产生sin线性波形 另一个线性霍尔产生cos线性波形 滤波后用反正切函数(atan2)计算出转子角度。
Hey @XieMaster, Also, I am not sure that I'll have enough time to document the new sensor for the release v2.2.3 so we might wait for the v2.2.4 to add it to the library. |
I have tested this, and in its current form it doesn't appear to work with anything but 1 pole pair. But if you paste in the electrical revolution tracking from nanoparticle's version, then it does work with my 12N14P motor. The range scaling can be useful to correct for unequal amplitude of sensor signals if they're not placed perfectly, but I think for speed and code size I prefer nanoparticle's version simplefoc/Arduino-FOC-drivers#12 which only subtracts the center value. Better to correct any amplitude difference by physical placement of the sensors. |
Ok, as there is a well tested implementation in the drivers repo, I think its better to prioritize that one. |
Hello!
I implemented adding two Linear Halls to run the motor.
Get raw analog value A&B --> filter --> map -->
float angle = atan2(hall_filtered_a, hall_filtered_b) * 180 / PI;
Thank you!