SD02B:hw to convert the 255value of speed into true velocity

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

SD02B:hw to convert the 255value of speed into true velocity

Postby tst » Wed Jan 12, 2011 11:05 pm

Hi,

I brought cytron product Motor Driver SB02B and Linux stepper motor model 42BYGHD-444.
SB02B had set the speed can be varied from 1~255( i duno how to calculate the actual speed of it) I want the speed of motor in unit m/s or cm/s. Or on the other word, I want to know the relationship between Speed(1~255) and actual velocity(in unit cm/sec). How to represent the actual velocity inside the 255 values?

The datasheet state that:
1. Maximum speed up to 1000 steps per second or 1KHz pulses
2. If SD02B receives ‘0’, the speed is assumed as 1.However, the speed for each stepper motor is different. It is depend on the resolution (°/step) of stepper motor. In this case, I had fixed my resolution into 0.18°/step (10micro-step size=2000 steps for 1 full 360° rotation.)
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: SD02B:hw to convert the 255value of speed into true velocity

Postby sich » Thu Jan 13, 2011 8:57 pm

Sorry for your inconvenience!

We didn't include the Speed (1-255) to stepping frequency relationship because the interrupt loop which determines the stepping frequency (actual speed) also has other program related to UART commands running at the same. The calculation to get the speed using a formula is inaccurate because it depends on the code running in the same loop too.

Although UART command is not a common feature in stepper motor driver in the market,
we wanted to add this feature so that our customer has another choice which can optimize the processing resources of the host controller. But here comes the issue. Basically, we need to dump this UART command's code into the program but it will affect the stepping accuracy, either in UART command method or Pulse Input method. Since most of the industry applications are using Pulse Input method for stepper motor driver, we decided to shift the inaccuracy to the UART command method so that when the industry guys are using this stepper motor driver, they will get the correct stepping frequency. We hope that you understand the complications we encountered in this design.

As you can see in the graph below, the Speed to Stepping Frequency graph is not linear.
SD02B test speed.jpg

So we are unable to provide a formula for the relationship between Speed and Stepping Frequency. Sorry about that! If the linearity of speed is vital in your project, we highly advice you to use the Pulse Input.

tst WROTE:1. Maximum speed up to 1000 steps per second or 1KHz pulses

This max frequency applies to normal small size stepper motor (eg: 42BYGHD-444). The max frequency can be up to 20kHz (tested using Pulse Input method).

tst WROTE:2. If SD02B receives ‘0’, the speed is assumed as 1.However, the speed for each stepper motor is different. It is depend on the resolution (°/step) of stepper motor. In this case, I had fixed my resolution into 0.18°/step (10micro-step size=2000 steps for 1 full 360° rotation.)

You can get the velocity if you know the stepping frequency, which you will know if you are using Pulse Input method because you need to give pulses to SD02B to drive it. However, by using UART command, the frequency is unknown (you may observe the graph above for estimation). You can measure the angular velocity of the stepper motor with external tools, such as tachometer or oscilloscope if you really wish to use UART command method and knowing the actual speed at the same time.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 604
Joined: Tue Apr 21, 2009 2:15 pm

Re: SD02B:hw to convert the 255value of speed into true velocity

Postby tst » Fri Jan 14, 2011 5:09 pm

Thanks. Your information is helpful. I already did the experiment to plot the relationship between speed(1~255) and true velocity. The result is quite ok and I get my desired data. For your information, I have two same stepper motor in two different system. The graph that I get respectively from two system are so much different although is the same model of stepper motors. So, I understand your difficulty. I can accept it. Now I think I solve my problem already. Thanks again.
tst
Apprentice
 
Posts: 33
Joined: Sat Sep 18, 2010 9:41 pm

Re: SD02B:hw to convert the 255value of speed into true velocity

Postby sich » Sat Jan 15, 2011 1:02 am

Thanks tst! We're glad to hear that you've got your problem solved! :D

Once again, we would like to emphasize that if the slope linearity is vital in your project, we recommend the Pulse Input method.
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 604
Joined: Tue Apr 21, 2009 2:15 pm


Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 6 guests

cron