Use the STM32F4 Discovery board to send PWM signals to the industrial AC servo motor driver.

Hello everyone,

I’m trying to interface a STM32F4 Discovery board with an AC servo driver (Hiwin D2 driver + Mige 130ST-M10010 AC servo motor).
This is the link to the servo drive manual https://www.hiwin.com/pdf/d2_drive_user_manual.pdf

So basically, I have a hex file of closed source firmware, the function of which is on one hand to connect with PC via USB port and on the other hand to send PWM+DIR signals to control the servo motor driver, in torque control mode. The PC communicates with the STM32F4 at the required torque level. The STM32F4 sends the PWM+DIR signal to the driver as a reference signal, and the servo driver drives the motor to generate the corresponding torque.

The entire system is shown in the figure below. Note that I am not using a driver called Argon, but a Hiwin D2.
View attachment 188010

The following chart is all I got from the author of this firmware.

STM32F4 can output different control modes, I decided to use PWM + DIR (lower left)

Therefore, the output signal pin of PWM is PE9 and the DIR is PE11.

Now that I have read through the servo drive manual, here is the closest wiring I can find from the manual

My concern is that, as you can see here, the manual mentions a 5V TTL type controller as an example. However, if I remember correctly, PE9 and PE11 output 3.3V CMOS signals, so I don’t know if I can follow this wiring instruction to connect the STM32F4 to the servo driver.

So my question is

What are the logic signals output by PE9 and PE11 pins? (What logic level type)

Is there any difference in the wiring of 5V TTL PWM signal and 3.3V CMOS PWM signal?

Can someone also explain to me the above wiring configuration (why do I need 5VDC power connected to the + terminal? STM output connected to the – terminal?) and what is the purpose of the wiring inside the servo drive (before the optocoupler)?
I ask the question above because the last time I played with an Arduino board, the connections usually looked like this:

PWN pin to + terminal
GND pin to – terminal
No additional 5VDC is required.

Thanks in advance and if there’s anything I haven’t made clear, please feel free to clarify it with me.

Source link


Your email address will not be published. Required fields are marked *