Almost always the working current of a stepper motor is set by a simple voltage (Vref) applied on a pin of the driver/controller i.c. This voltage, usually, is taken from the +5V necessary to the logic of the same i.c. and it is set by a voltage partitioner built using a couple of resistors. We'll try now to calculate the values of such resistors:
![]() |
In the simplest form of a partitioner we'll find only a couple of resistors R1-R2 that will set the Vref according to the following formula:
Vout = Vin * (R2 / (R1+R2))
Such solution could be perfect if we were going to create a controller for a specific motor (and with a specific current/phase). We could set, therefore, the Vref to a fixed voltage. |
|
Unfortunately, usually we must consider that a controller/driver could be connected to different motors with different currents/phases. In this case, therefore, we must be able to vary the Vref according to the motor connected to the driver. The solution consists interposing in the middle of the two resistors a trimmer, a variable resistor: |
||
![]() |
Using the above mentioned formula we 'll know that the voltage on R1-R3 will be:
Vr1 = Vin * ((R3+R2)/(R1+R2+R3) while the voltage on R3-R2 will be: Vr2 = Vin * R2 / (R1+R2+R3)
example: Vin=5V, R1 e R2 = 1K, R3 = 5K quindi
Vr1 = 5*(6k/7k) = 4.28V Vr2 = 5*1k /(7k)= 0.714V
The Vref therefore can vary between 0.71 and 4.28V
|