I am making a watch winder, I am hoping to have 8 ports for watches. Each port requires a stepper motors (which requires 4 pins) and a rotary encoder to control the port (which requires 3 pins). I am using an arduino mega and i am worried that i wont have enough pins to have all 8 ports
Use stepper drivers. They require 3pins, dir, step & enable. It's possible to use 8 enable and 2 dir/step pins if they only move one at the time.
I am using drivers, but they are requiring 4, or do i not have to use them all?
Attache a link to those drivers and a picture of Your wiring diagram.
cthulhu445:
I am using drivers, but they are requiring 4,
What stepper motors are you using?
The small unipolar 28BYJ-48 motors use the ULN2003 as a driver and it does need 4 pins to control it.
The larger (usually) and more expensive bipolar motors use specialist stepper drivers that just need 2 pins for step and direction.
It's not at all clear why you need a rotary encoder as well as a stepper motor. Why not just keep count of the motor steps? Keeping track of the position of an encoder can be hard work for a 16MHz Arduino. What is the purpose of the encoder and how many pulses per second will it be producing?
The Mega has plenty of I/O pins for 8 times (4 + 3) = 56. You can use the analog pins as digital pins.
...R