cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
348 Views
Registered: ‎03-10-2020

Control Stepper motor

Hey!

We are two students that are working on a Project where we are going to Control a stepper motor. We are using the Zedboard Zynq 7000 Board. Until now we have only used Simulink to Control the motor. The following Block diagrams shows how we desided to Control the motor:

 

b.png

Simulink model

We have an Counter where we deside the number of bits to deside the frequancy, and we can also deside the direction in this Counter. Then we have to Slice-Blocks after the Counter who picks out the Msb and Msb-1 bit. After that we have an black Box who contains the SOP-Equations to deside the secuancy.

 

c.png

Vivado Block Design

 

d.png

SDK

 

d.png

 

VHDL-kode in Black Box


But we want to extand this by controlling the motor by using SDK/C. We have managed to turn the motor on/off by making the Interface between the FPGA-part and the microprosessor, but we also want to Control the speed and direction on the motor in SDK, but still keep the other Logic in Simulink. We have searched on the internet to find a way to do this, but it was diffecult to find other examples on this.

Our questions would be if we should substitude the Counter With an Counter in SDK or if we should send a signal by using SDK in to the Counter to overwrite the number of bits that we choose in the Counter? we want to find a way where we can use both Simulink and SDK to Control this motor, where we seperate the main task of the motor in the FPGA-part of the Board, and Control the speed and direction in the microcontroller.

0 Kudos
0 Replies