LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

new steppermotor.vi and Pololu A4988

Hello,

after solving the problems with the digital read I recognized a new problem. I try to control a stepper motor with my arduino and the stepper motor driver A4988 from pololu http://www.pololu.com/catalog/product/1182 . When I use the new stepper.vis my motor sounds terribly and looses many steps. Before using the new vis I used the tone function to generate my step signal and another pin for direction, with this configuration the motor works fine, but I don't find a reliable way to count the steps for position.

I think the problem is that the new vis only generate a frequence signal with very small peaks (I measured the step signals with an oscilloscope), while the tone function generates a 50% duty cycle square frequence.

Do you have any solution for my problem?

Best regards

Torsten

0 Kudos
Message 1 of 10
(8,821 Views)

Hey Torsten,

I have been testing the stepper motor example out on some other drivers this week and have noticed similar behavior. I will post back here when I have a solution.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 10
(4,653 Views)

Did you current limit those drivers using the onboard pot?   How much power are you suppling in regards to your stepper's specs?

I have not been able to get the new stepper example working yet just sending 1/0 in a loop after initializations.  Works but slow.

0 Kudos
Message 3 of 10
(4,653 Views)

I have made some fixes to the stepper motor examples and added a new control method for the EasyStepper which should work better for motor drivers than the current options. We will be releasing it in a patch soon.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 10
(4,653 Views)

Thank you. I hope the patch will come soon.

0 Kudos
Message 5 of 10
(4,653 Views)

I limit the current to round about 1/3 . My Motor characteristics: 2V/1.8A. My motor supply voltage is 12V.

0 Kudos
Message 6 of 10
(4,653 Views)

The new mode should be very similar to the current 2 wire (pulse and direction) mode.  Is this the mode you are currently using for your motor controller? 

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 7 of 10
(4,653 Views)

I am asuming you meant 12V not 2.  @ that current make sure you have a heatsink (sparkfun).  Also most of the readily available pulse/dir microstepper controllers act differently in full step mode so now you know too.  Good luck.

@Kevin this is the mode I favor by far & the mode used by pololu & sparkfun dedicated stepper drivers.  Thanks!

0 Kudos
Message 8 of 10
(4,653 Views)

Yes I used the 2 wire pulse and direction mode. Do you know how long are the pulses (in microseconds)? From the datasheet minimum pulse width for my stepper driver is 1 microsecond. Is it possible to generate a 50% dutycycle step frequence signal. Because with steps generated by the tone function the stepper runs perfect.

@allthingz

Yes I use an aluminium heatsink. The stepper motor data is 2V/1.8A (data printed on the motor) but I don't know how they get these values. Seems to me that they define maximum voltage and current with DC-current. This is the stepper motor I am controlling

ST4118M1804 from nanotec http://de.nanotec.com/schrittmotor_st4118.html. They offer a stepper driver http://de.nanotec.com/schrittmotor_steuerungen_smc11.html which is similar to Pololus for this kind of motor.

0 Kudos
Message 9 of 10
(4,653 Views)

I am not sure how long the pulses are in microseconds but I can't imagine its less than 1uS. Our driver makes calls into the AccelStepper motor driver which handles tha actual pulse generation:http://www.open.com.au/mikem/arduino/AccelStepper/

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 10 of 10
(4,653 Views)