The following table represents the translation between IO pins
as defined on the Arduino lingo and their numeric equivalent on the Ardufocus configuration files, it also list the pin
type and if it defined on the Ardufocus’s Hardware Abstraction Layer (HAL), pins not defined on the HAL are not usable.
Type | Arduino | PIN | HAL |
---|---|---|---|
Digital | D0 | 0 | Yes |
Digital | D1 | 1 | Yes |
Digital | D2 | 2 | Yes |
Digital | D3 | 3 | Yes |
Digital | D4 | 4 | Yes |
Digital | D5 | 5 | Yes |
Digital | D6 | 6 | Yes |
Digital | D7 | 7 | Yes |
Digital | D8 | 8 | Yes |
Digital | D9 | 9 | Yes |
Digital | D10 | 10 | Yes |
Digital | D11 | 11 | Yes |
Digital | D12 | 12 | Yes |
Digital | D13 | 13 | Yes |
Analog | A0 | 14 | Yes |
Analog | A1 | 15 | Yes |
Analog | A2 | 16 | Yes |
Analog | A3 | 17 | Yes |
Analog | A4 | 18 | Yes |
Analog | A5 | 19 | No |
Analog | A6 | 20 | No |
Analog | A7 | 21 | No |
Driver | Current | Microsteps | VCC |
---|---|---|---|
A4988 | 2A | 16 | 8-35V |
DRV8825 | 2.5A | 32 | 8-45V |
ULN2003 | 0.5A | 1 | 5-50V |
ULN2003 Actually the ULN2003 isn't a stepper motor driver but instead a Darlington Transistor Array on a single IC package thus all the pulse-train's timming and any additional microstepping needs to be generated by the microcontroller.
Due to the wide usage of “step sticks” on 3D printers, the price difference between them and simpler ULN2003 are virtually negligible when sourcing from generic manufacturers.
The A4988 or the DRV8825 stepper motor driver have a lot of advantages when compared with the ULN2003 darlington transistor array:
Ardufocus supports two types of stepper motors depending on the selected stepper driver. Bipolar stepper motors are commonly known as NEMA17 and have four leads. Unipolar stepper motors are more uncommon and have five leads, the best known example is the 28BYJ-48.
Step stick drivers such as the A4988 or DRV8825 will drive Bipolar Stepper Motors like most NEMA17 motors. The ULN2003 can drive either motor type but Ardufocus only supports Unipolar Stepper motors when using the ULN2003 driver.
Unipolar stepper motors such as the 28BYJ-48 can be physically converted into a Bipolar type. For more information have a look at the following guide.
The table bellow represents typical values for both stepper motor types, you should always confirm the specs for your specific motor by reading the manufacturer data sheet. Only for reference I provide links for very common models of the NEMA17 and 28BYJ-48 stepper motors.
Type | I | Angle | Torque | Gear | Steps/Rev |
---|---|---|---|---|---|
Bipolar | 0.9A | 0.9 | 0.34N.M | 1:1 | 200 |
Unipolar | 0.2A | 5.625 | 0.08N.M | 64:1 | 2038 |
Stepper motor voltage If you intend to use an Unipolar motor with the ULN2003 driver please pay special attention to the motor's nominal voltage because this driver does not allow the user to set a current limit. 28BYJ-48 stepper motors are commonly available at 5V and 12V ratings, we recommend the 12V version.
In terms of pricing, NEMA17 motors are much more expensive than the 28BYJ-48. You can buy a NEMA17 in the $15 range while a 28BYJ-48 motor will cost you only $2.
The main advantage of using a NEMA17 is the 5% accuracy range per step and the higher torque which allows heavier payloads. As it is recommended to use backlash compensation on the focusing software, the step accuracy between the two motor types is not that relevant.
TODO This section needs further improvement.