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. 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. 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.
A4988 Stepper Motor Driver Carrier The A4988 stepper motor driver carrier is a breakout board for Allegro's easy-to-use A4988 microstepping bipolar s. This product is a carrier board or breakout board for Allegro's A4988 DMOS Microstepping Driver with Translator and Overcurrent Protection; Pololu.
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.
Pololu Stepper Driver Board
This is the stepper motor I am controlling ST4118M1804 from nanotec. They offer a stepper driver which is similar to Pololus for this kind of motor.