Hi. At the moment i’m still experiment with simplefoc with stm32 setup and ir2104.
But according to my oscilloscop the stm32 outputs the same waveform on different pins.
So this waveform looks fine - PWM at 50% duty cycle and 10kHz frequency, which is the frequency you chose.
You’ll have to zoom out a bit on the oscilloscope and then you should see that PWM duty cycle varies over time.
And if you show more than one phase at the same time you should see that there is a difference between the phase signals if you zoom out so that you can many PWM periods at the same time.
Please zoom out more and display more than one phase at the same time. You’ll see that the waveforms are not actually the same, even though all the phases carry a PWM signal that looks similar when they are viewed individually…
One of the most common mistakes is to use the wrong number of pole pairs. In the code above you set 11PP, are you sure it’s correct? Although for open loop mode it should not matter.
Have you fixed the voltage limits as I noted above? It’s unlikely to work well with the motor limit set to 2x the driver limit.
Can you share your driver circuit schematics? Is it a self made driver based on IR2104?
Also, which motor are you using, what’s the winding resistance?
I don’t know where you got the IR2104 drivers, but I came across drivers that worked only when I connected the PWM output of the microcontroller to the Input and SD pins at the same time. I.e. I used esp32 and outputs 25, 26, 27 in 3 pwm mode. I connected 25 pins to the input and sd pins of the first halfbridge driver, 26 pins to the second driver, and 27 to the third.
got them from aliexpress.
this is the waveform zoom out
i dont have a second probe to display the second waveform.
At the moment the SD input is connected to the stm32 but i did not input it in the program yet.
Looking at your vertical video I would say you still have clipping in this signal. Given your motor is 0.6Ω, perhaps you should set the motor.voltage_limit to something low, like 1V, and see if this helps things. You’ll have to watch the currents on a lower resistance motor, especially in open loop mode.