Skip to content

need help for developing OSF for TSDZ8 #2

@mstrens

Description

@mstrens

Hello,

I try to let OSF (mbrusa version for TSDZ2) run on TSDZ8 motor.
I have an issue.
Ebikestuff says you could perhaps help me.
I put this message also on Endlesssphere forum (for mbrusa, mspider65, ...) but you are not part of it.
Here what I explain.

TSDZ8 motor is different from TSDZ2 on several points e.g.:

  • it uses a different microprocessor (XMC1302); more powerfull and 32 bits.
  • it has 4 pole pairs instead of 8
  • timer e.g. to generate PWM can run 4X faster

The motor runs with the code that I wrote but there are quite big current fluctuations I can't explain.
E.g. I adapted OSF in order to drive the motor with a fixed duty cycle, without a max current and with no load.
In those conditions, I would expect that the current delivered by the battery should be (nearly) constant
Still when I insert a small resistor between the battery and the motor and that I put an oscilloscope on this resistor to measure the current, I see:

  • the average current is stable
  • there are big (nice) sinusoidal fluctuations at a frequency that is 6 X the frequency of the electrical rotations. So there is on sinusoid for each pattern change.
  • if average level is 1, the lower level of the sinusoid is about 0.5 and the upper level is about 1.5. It means that total amplitude is about the same as the avg.

In the attached picture, you can see the signal. Ground voltage level is at the lower line on the scope.

Any idea/suggestion how to solve this.

Here is a simplified version of the code.
OSF.zip
drive.google.com drive.google.com
In fact the only part of code that is used to generate the PWM signals is in the file motor.c
I removed in this simplified version of motor.c most of code that is not needed to let the motor run.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions