The cheap ULN2003 Motor driver board often supplied with the 28BYJ-48 cheap ($1) 5v stepper motor has a 'mystery jumper' on it.
By removing the jumper and adding a resistor, one can nearly double the torque while the motor is turning, while also keeping both the motor and controller cooler.
Heres how:
The board has pins in this order:
Unmarked [jumper]
Unmarked [jumper]
Connect it as follows:
Pin 1 to arduino GND as usual.
Pin 2 connect to pin 4 with a 100 Ohm Resistor
Leave pin 3 disconnected
Pin 4 connect to 5v power (and the other end of the resistor from pin 2
With the default arduino stepper library, I am able to move at 700 rpm, whereas with default wiring, I am limited to 450 rpm. You should get even more speed with libraries which smoothly accelerate the stepper.
Stepper myStepper(64, 10, 8, 9, 11);
// In setup()
myStepper.setSpeed(700);
Explanation:
The jumper is used to connect the freewheel diodes on the driver chip. These diodes allow current to continue flowing for a moment in a coil of the motor after that coil has been switched off (hence the name 'freewheel'). Thats bad for speed, because for the motor to turn fast, it's vital that the current stop as quick as possible. By putting a 100 ohm resistor in, the current gets 'slowed' down by the resistor, so stops much quicker.
The resistor will get warm - thats heat which would otherwise have ended up in the controller chip and the motor. Cooler motor means you can drive it harder without overheat.
Beware: The 100 Ohm resistor is vital - if you use a bigger value, connect it with a loose connection, or leave it out entirely, you could destroy your driver board, since the 'freewheeling' energy from the coils will break down the driver transistors in the chip on the board!
To add to this, for other power supplies and motors, you might need a different resistor value.
You can always use a smaller resistor, but bigger could cause damage.
The maximum resistor can be calculated:
Rcoil = Measure the coil resistance of the motor between the red wire and any other wire.
V = power supply voltage
Icoil = V/Rcoil * 2
Rfreewhel_max = (50 - V - 2) / Icoil
Rearranging:
Rfreewhel_max = (48 - V) * Rcoil / V / 2
Rfreewhel_max = (24 * Rcoil / V) - Rcoil / 2
So for the default setup of a 5v arduino and the cheapo motor with 50 ohm coils, 200 ohms is probably a safe maximum. There are fancier things you can do with zener diodes and better software if you need to go even faster.
Also check out the datasheet for the ULN2003A and the typical wiring of unipolar stepper motors:
The way the two coils are on the same core means freewheeling current can be reflected to the opposite polarity on the other coil on the same core, which in turn lets you avoid using the freewheeling diode entirely, since one can instead use the diode of the darlington pair (between collector and emitter, shown dotted in the datasheet).
Thats bad for speed, because for the motor to turn fast, it's vital that the current stop as quick as possible. By putting a 100 ohm resistor in, the current gets 'slowed' down by the resistor, so stops much quicker.
This is not the correct explanation. The resistor INCREASES the decay time for the flyback current, and reduces the average flyback current. The decay time is shortest and the flyback current highest, when the jumper is in place.
In fact, the flyback motor current acts as a brake, and the resistor reduces the braking effect.
To demonstrate this, take a stepper motor and turn the shaft by hand, once with the leads not connected to anything (or each other), and again with the leads twisted together. The motor shaft will be much more difficult to turn with the leads shorted.
which in turn lets you avoid using the freewheeling diode entirely, since one can instead use the diode of the darlington pair (between collector and emitter, shown dotted in the datasheet)
Bad idea. The diode across the E-C connection will not protect the output transistor from destruction by high flyback voltages. It is pointing in the wrong direction.
You are correct, the added resistor decreases the decay time tau=L/R. But that also decreases the average flyback current, which reduces the braking effect.
outsider:
The jumper is for running the 12V version of the 28BYJ-48, remove jumper, put 12V+ on pin 4, 12V GND on pin1 with Arduino GND.
While that world work, you could also hook 12v straight to the 5v input. In both cases, you will overdrive the LED's, but do no other damage, since the chip is rated for 50v outputs and 30v inputs.
And do you mean that there are 2 different types of 28BYJ motor - one for 5v and another for 12v?
Yes and yes, but i think that design is faulty, the line going from COM to pin 3 should go to pin4 (X) and there should be a second GND pin for the PS ground. That way the jumper between pins 3 and 4, when removed would separate power from logic. I'll try to draw my thoughts.
The jumper is for running the 12V version of the 28BYJ-48
Came from an inquiry to a seller, don't remember which and don't have a 12V motor to try but @larryd is correct, now, why would you want to disconnect motor power from COM?
jremington:
This is not the correct explanation. The resistor INCREASES the decay time for the flyback current, and reduces the average flyback current. The decay time is shortest and the flyback current highest, when the jumper is in place.
In fact, the flyback motor current acts as a brake, and the resistor reduces the braking effect.
Sorry, but it is exactly the right explanation. You want the current to drop quickly in the coil you've
just de-energized so it isn't still holding the rotor to the previous position.
The resistor increases the back EMF as its in series with the diode's 0.7V drop, which causes the
current (and thus magnetic field) to drop faster. dI/dt = V/L.
The freewheel current is equal to the current in the coil at the moment of commutation, and then falls
according to the diff. eqn above (both dI/dt and V are negative at this point). In the real world the value of
L is not constant due to the moving rotor, which complicates matters, but the general trend is the same -
more resistance in series with diode, faster current decay.
The same principle is used in high speed solenoids, where higher initial voltage is provided by capacitive
discharge and higher back-EMF due to zener/VDR or resistor snubbing.