An example schematic to control DRV8834 in indexer mode with Arduino (using ATMEGA328P-MM) is shown below.
Motor supply pin, VM, is recommended to connect with at least 10 μF capacitor. Charge pump pin, VCP is to connect with VM through 0.01 μF capacitor. VREFO is a referenc voltage pin that provides 2V reference. It can be normally used with a potentiometer to provide control voltage to AVREF and BVREF to limit current. In this example, current limit for coil A and coil B is set by connecting AVREF and BVREF pin to 2V VREFO directly. The relationship of voltage Vr at AVREF and BVREF pin, resistance value at AISEN and BISEN pin called Rs, and current limit, Ilim is described below. Ilim=Vr5.Rs
The current Ilim flowing through Rs is large and as a consequence, the power of resistor must be large enough to allow it.
Another thing to note is that the percentage of fast decay of PWM cycle is determined by resistance values at ADECAY and BDECAY pins. In this example, for 25% fast decay, 20 kΩ is used. In indexer mode, only ADECAY pin is used.
The motor will step according to the number of pulses given to step pin. DIR pin controls direction of stepping.
No comments:
Post a Comment
Comments are moderated and don't be surprised if your comment does not appear promptly.