infineon / tle9879-bldc-shield Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi Guys,
I have read decently on the documentation of TLE9879QXA40 and decided to write some code to control the motor. Happily, I can run the motor in FOC & BEMF mode. However, It does not move in HALL mode. The motor just gives an initial jerk when we send 'startMotor' command. Following is the code for HALL mode.
// Include the Shield library to your Arduino project
#include "TLE9879_Group.h"
#define BOARD1 1
// Declare Shield group object
TLE9879_Group *shields;
void setup()
{
// Initialize the Shield group object with the
// number of Shields in the stack
shields = new TLE9879_Group(1);
// Set the desired mode (FOC, HALL, BEMF)
// shields->setMode(BEMF);
/*
shields->setMode(FOC);
shields->setParameter(FOC_START_ACCEL, 1);
*/
// /*
shields->setMode(HALL, BOARD1);
shields->setParameter(HALL_INIT_DUTY, 30, BOARD1);
shields->setParameter(HALL_POLE_PAIRS, 4, BOARD1);
shields->setParameter(HALL_SPEED_KP,500, BOARD1);
shields->setParameter(HALL_SPEED_KI,100, BOARD1);
// shields->setParameter(HALL_INPUT_A,0, BOARD1);
// shields->setParameter(HALL_INPUT_B,1, BOARD1);
// shields->setParameter(HALL_INPUT_C,2, BOARD1);
// */
// Set the desired motor speed (RPM)
shields->setMotorSpeed(2000, BOARD1);
/*
You might have to adjust the motor parameters,
in case the motor does not run properly.
*/
// Start the motor and let it run for 5 seconds,
// then stop the motor
shields->setMotorMode(START_MOTOR, BOARD1);
delay(10000);
shields->setMotorMode(STOP_MOTOR, BOARD1);
}
void loop()
{
}
My motor is 4 pole and is an BLDC. Already checked the hall sensor connections many times with the shield pins. I would be happy to answer more questions, if any.
Hi there,
for a first bginning the support code is to less. Can you update the repository with more examples on how to use the board with the arduino IDE, please ?!
It would be fine to get some impressions of:
Please note, my knowledge of assembly programming is rusty, but I know, there could be more information of each registers and address. Never the less, I would guess, the most people don't know how to handle this in C. Proper functions and method descriptions woud be fine: What goes in? What goes out? What is the method doing?
All in all, commented arduino code (as you can see for olimex modules) would be nice, and make the shields more useable than a static help file.
There is a lack of actual motor RPM readings.
Utilizing the board capability of FOC control, I assume there is access to an approximate RPM that the motor attached is spinning at. This would allow the user to see any differences in the set RPM and the actual RPM. Enabling additional safety features, loop-control etc.
I noticed a getMotorspeed function within the code, however this seems to simply return the RPM set by the user and not the actual RPM of the motor. Furthermore, accessing this function for Arduino should be added to the public class.
Proposed Solution: adding a function that communicates with the infineon chip that should have the information needed to calculate an approximate rpm.
Alternative solution: adding an rpm reader to the board.
Hello,
I hope you are doing well, I am running a hub brushless motor at 12V and I need to move at very low speeds. Obviously Hall Mode is the only way to achieve that. But I am running into a major problem, the lower I set the speed the speed the more time it takes for the motor to start. At the lowest speed (any lower the motors don't start at all) it took the motor a full 53 second to start turning. I tried adjusting the following parameters: HALL_PWM_FREQ, HALL_INIT_DUTY, HALL_DELAY_MINSPEED but it did not help at all. It feels like a current issue where there is a large current ramp until the amount needed to overcome the torque load is reached.
please help its a little urgent
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.