Search results

  1. B

    FOC Help Needed

    Mouser finally authorized me to return the defective board and I shipped it last Saturday. Since Mouser said they'd send the board back to ST for evaluation, I expect at least another month of delay until I get a replacement board, probably more. :(
  2. B

    True FOC: definition and examples

    V/F is an abbreviation for Voltage/Frequency. It's a scaler (as opposed to vector) control method for AC motors, particularly induction motors. Also known as V/Hz. Its goal is to maintain a constant magnetic flux in the motor.
  3. B

    FOC Help Needed

    No joy with the EVSPIN32G4 board. I’ll eventually send it back, as soon as Mouser gets around to talking with ST and figuring out what to do about it. I suspect this will take weeks before I have a working board. I guess the days of “Your brand new board doesn’t work? No problem! We’ll send a...
  4. B

    FOC Help Needed

    This is definitely a hardware problem. There’s a leakage path on the board that’s pulling Hall #1 towards ground strongly enough to overcome the pull-up or even connecting Hall #1 directly to 5v. I’d try replacing the pull-ups with lower resistance resistors, but the parts on the board are 0201...
  5. B

    FOC Help Needed

    I haven't had a chance to post recently as I've been busy working on the TI board and have recently received a new board. The TI board requires a lot of point-to-point wiring to the Nucleo board, and it looks like this: I got an ST STSPIN32G4 board yesterday. This board has a chip that...
  6. B

    FOC Help Needed

    That’s what I thought. Thanks for the confirmation. I was rummaging around in the closet in my lab when I came across a TI BOOSTXL-DRV8301 board, which I think I used a few years ago to test a DC motor. It’s a 240 watt board, so that should help running the motor on my dyno, which is about 3x...
  7. B

    Controller Advice

    Thanks, mxlemming. I’ll take a look at the flipsky 75100. Do you know if there’s a schematic available for it? Your point about reading current on these is noted. I have a similar problem with one of my boards. It has 0.01 ohm resistors in the shunts, and with my little motor chugging along at...
  8. B

    FOC Help Needed

    Here’s another question: With the current sensing arrangement shown in the first image in the first post in this thread, what’s the polarity of the current? Is there a convention? For example, when I read the ADCs and calculate the currents, should I use them as-is or negate them?
  9. B

    Controller Advice

    Thanks amberwolf, that’s a lot of useful information that I’ll follow up on. My preference would be to design and build my own, but every time I think I’ve found the perfect components I go look on DigiKey and Mouser and they’re out of stock with a lead time of something like 63 weeks. :evil:
  10. B

    Controller Advice

    I’ve been developing my own FOC firmware, but my current hardware (ST Nucleo+IHM07 and XMC4400 drive board+250 w power board) are too underpowered and I’m starting to run into their limitations. I eventually want to design and build my own board, but current component shortages and lack of time...
  11. B

    FOC Help Needed

    So what is wL? Let’s see: L = kg m^2 / s^2 A^2 and w = s^-1 so wL = kg m^2 / s^3 A^2 and that’s voltage, so it looks like that would work. Ditto for R/L. My motor has a spec sheet that includes values of “line-to-line resistance” and “line-to-line inductance”. Can I use those directly for R...
  12. B

    FOC Help Needed

    Ah, the lightbulb in my head is finally lit. Thanks, stancecoke, that’s exactly the missing piece I needed. :thumb: :thumb:
  13. B

    FOC Help Needed

    I understand that, but where does the voltage that gets increased or decreased come from originally? Does it come directly from current via a calculation such as V = IR + LdI/dt + BEMF, or from somewhere else? A PID will vary the voltage so the actual current matches the setpoint current, but...
  14. B

    FOC Help Needed

    So how does a PID generate voltages from currents input into it? What is the relationship?
  15. B

    FOC Help Needed

    That's one of the things that no one seems to explain in all of the papers on FOC I've read. They'll have a diagram like this: Where currents are measured, transformed, and then go into PID controllers where voltages magically pop out. In these papers the PID controllers are black boxes and...
  16. B

    FOC Help Needed

    @mxlemming The value of theta that I'm passing into the SVPWM function is the electrical rotor angle as measured by the encoder. When I calculate an angle via atan2(Iβ, Iα), I get an angle that always trails theta by 90 degrees (ex: theta = 169 degrees, angle calculated from atan2 is 79...
  17. B

    FOC Help Needed

    I just figured out why I can't get the motor to spin both ways. It's obvious and it was staring me in the face, but I just couldn't see it despite looking at it many times. So, to get the motor to spin in the opposite direction should just require a negative Iq. That's obvious. But after...
  18. B

    FOC Help Needed

    The Infineon XMC definitely has more complex timers than the STM32, but once you get used to them, and how they interact with other peripherals like the VADC, they’re not so bad. In some ways I find the Infineon implementation more logical and flexible than ST’s. You can do things with them like...
  19. B

    Dyno Load

    I’ve acquired a small dyno to help test the controller firmware I’m developing. I need a way to put a load on the motor opposite the one I’m driving. The first thing that came to mind was a string of lightbulbs wired across the motor phases. That’s not going to fly because my state’s government...
  20. B

    FOC Help Needed

    Some additional progress… When I started this project, I wanted to use the X-NUCLEO-IHM08M1 daughter board with the Nucleo, but it was out of stock everywhere and I had to settle for the X-NUCLEO-IHM07M1, which is 2A board versus the 08, which is 15A. Earlier this week I found a distributor that...
  21. B

    FOC Help Needed

    @stancecoke Yes, I know that most motors usable on an eBike are either Hall sensored or sensorless, but I figured implementing FOC on a motor with a high-res sensor would be easier than working out the details of a flux observer or another way to synthesize rotor position and would avoid...
  22. B

    FOC Help Needed

    I just checked the operation of the quadrature encoder on my motor and it behaves as follows: With the encoder count zeroed, turning the motor shaft CW results in it counting 0,1,2,3,4,5,6...358,359,0,1,2... With the encoder zeroed again, turning the motor shaft CCW results in it counting...
  23. B

    True FOC: definition and examples

    I don’t recall seeing it mentioned on this thread, so I’ll offer it up here. One of the best resources I found when first researching FOC was a master’s thesis written by James Mevey at Kansas State University. You can find it here...
  24. B

    FOC Help Needed

    @stancecoke Yes, that’s how I like to work too. I don’t use the ST HAL libraries. I write every line of code myself from the first instruction the MCU executes after reset to everything that initializes and manages the peripherals—it’s all mine. I understand every bit of it and have only myself...
  25. B

    FOC Help Needed

    @mxlemming Ah, you’ve got the timer that generates PWM set up in what ST calls PWM mode 1. In that mode, the output is high while CNT is less than CCR while counting up and low while CNT is greater than CCR when counting down. I’ve got mine set up in mode 2. With mode 2, the output is low while...
Back
Top