I am working on many sensors simultaneously and I want to activate motor connected to the sensor when particular sensor is activated. I want independent control of each motor hence. I have 8 pins less as all pins are already occupied. How to extend the pins of motor. It has to be digital pins. Is there any easy and cheap method which is easier to apply? I searched on internet and there are few like multiplexer and shift register but I have no idea which gives me the needed independent control over the pins. Kindly guide me!
Welcome to the forum
Which Arduino board are you using ?
Which sensors are you using ?
How are the motors powered ?
I am using Arduino Mega 2560 for your information. Already all pins are occupied
Does that include the analogue pins ?
Motor is powered by separate 12V input. But each motor occupies 5 pins (easy driver) on arduino board. So i am short of 8 pins after connecting all sensors (infrared sensors; 5V) Each sensor use just one necessary pin for analog input.
some analog pins will be left but even if I count those, I am still short of pins
What are the 5 pins for each motor used for and how many sensor/motor pairs do you have ?
5 pins are MS1, MS2, enable, step, direction.
I have 10 pairs. 1 analog pin for each sensor. 5 pins for each motor. 2RX and 2TX pins for serial devices
Do you really need to control MS1 and MS2 with the Arduino rather than wiring them permanently to 5V or GND to set the required step size ?
not really.. it might work. I'll have to see.. I might need it or might not!! So that will save me 20 pins!! wow
Thank you by the way!! ![]()
It sounds like you’re making assumptions.
Draw out a circuit / schematic - then we can all see what you’re imagining.
If you are never going to change the microstep setting within the sketch then it will work
assumptions about what?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.