Long description, so I'm summarizing the questions from the bottom here: (See below for details)
I'd like to build a custom sensorless Brushless Gimbal assembly.
The way these work is:
In my application there are three additional concerns:
I will build my own PCB for the motor driver chips and MOSFETs needed. I've built power-driver PCBs before.
What I would like help with is understanding exactly how much support there is for something like this in the Teensy infrastructure.
Specifically:
Does the Teensy 3.2, 3.5 or 3.6 have enough timer hardware to run three channels of this?
If so, are there software libraries that make configuring such timers easy?
If hardware but no software is available, where should I be looking to start driving the hardware peripherals myself, and what other Teensy functions might that hardware interfere with?
- Does the Teensy 3.2, 3.5 or 3.6 have enough timer hardware to run three channels of current-control BLDC?
- If so, are there software libraries that make configuring such timers easy?
- If hardware but no software is available, where should I be looking to start driving the hardware peripherals myself, and what other Teensy functions might that hardware interfere with?
I'd like to build a custom sensorless Brushless Gimbal assembly.
The way these work is:
- There are 2 or 3 axes of freedom in a Gimbal mechanical assembly (I've built custom mechanical assemblies before)
- Each axis of freedom is driven by a high-pole-count brushless DC motor
- The BLDC is used as a multi-phase stepper motor (in fact, there really isn't a difference between these configurations) in open loop configuration (sensorless)
- There exists one three-phase driver per BLDC output
- Each driver has at least three PWM inputs (for UVW phases) and possibly also a global enable/disable input
- The center of the Gimbal (the stabilized mass) has an IMU attached (at least a 3D gyro; typically also accelerometer and perhaps magnetometer)
- A controller board reads the IMVU at high rate and runs a Kalman filter to calculate pose and acceleration of the stabilized mass
- A PID controller outputs position-delta information to the motor driver software
- The motor driver software modulates the PWM to move the BLDC motor to the appropriate position for the stabilized mass to stay at the desired attitude
In my application there are three additional concerns:
- I'd like to micro-step the poles of the BLDC motor -- let's say I want a 25/75 duty cycle ratio between phases U and V (with W being idle in this case)
- I want current control, because maintaining level altitude needs less force (and thus less current/power draw and heat) than compensating for actual movement. The motors I use can draw > 20A but typically I need 1A for maintaining.
- This is open-loop driving the motor (closing the loop only with the IMU) so I don't need to detect EMF zero crossing, as I hold position, not velocity
I will build my own PCB for the motor driver chips and MOSFETs needed. I've built power-driver PCBs before.
What I would like help with is understanding exactly how much support there is for something like this in the Teensy infrastructure.
Specifically:
- I need three separate PWM generating output timers, for the 3D control.
- Each timer needs a separate "active range" -- I want U and V to be complementary, not be active-high at the same time, while W may be low. After commutation, I may get U low, V and W complementary, and so forth.
- For current control, I may want the complementary control to not sum to 100% duty cycle. I e, if the timer runs from 0 to 255, I'd like the U output to be active in the range (0,20) and the V output to be active in the range (128, 148) for a 50% micro-step between U and V, and a 15.6% duty cycle.
- An alternative is to use a fourth PWM channel that modulates ("chops") the control signals to a given duty cycle. However, because I want UVW control to be ultrasonic (in the best of worlds,) to get reasonable resolution in chopping, it would have to run at 200 kHz or more, putting more stress on the gate drivers.
Does the Teensy 3.2, 3.5 or 3.6 have enough timer hardware to run three channels of this?
If so, are there software libraries that make configuring such timers easy?
If hardware but no software is available, where should I be looking to start driving the hardware peripherals myself, and what other Teensy functions might that hardware interfere with?