How can I connect the shield to the arduino but not connect it directly because I need the other free pins on the arduino to connect microswitches and buttons.
I will connect the stepper motor to the shield (M3 and M4), which will be used to open the door of the elevator I am working on.
The "other free pins" might also be available on the shield. Find the datasheet, or use a multimeter to discover which pins are available.
Posting links to technical information on parts you are questioning gets you a more accurate answer. @xfpd gave you good advice. There are a lot of motor shields available which one do you have we cannot see that far?
There are lots of shields. Which shield are we talking about?
Dk electronics l293d shield
I already have an arduino that controls the cabin, up and down. On that arduino, I have connected buttons, micro switches and a driver for the motor that starts the cabin. I have another arduino to control the second stepper motor that should open the cabin door. I was thinking of bringing signals from buttons and microswitches to that arduino in order to synchronize them. The problem is that my Dk electronics l293d shield takes up the whole arduino, and when I try only some pins, it doesn't work. I don't know how to connect it all I have a l293d ic and a 74HC595N to expand the pins if that helps.
Read this thread. Complete with schematic.
Your other 2 topics on the same subject deleted.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
Thank you.
Can i connect my stepper to L293D IC on protoboard. Will it work?
Depends on your stepper. Please post a datasheet or a link to technical data. Most steppers cannot be driven by the l293.
M42SP-6NK_MITSUMI.pdf (105.9 KB)
I'm interested in which pins the shield uses on the arduino (specifically M3 and M4 from the shield, which pins does it need on the arduino). The stepper motor works when the shield is placed directly on the arduino, but when I try via certain pins it does not work
OK, this motor should work with a L293 - even if the L293 is a very inefficient ancient H-bridge.
@MicroBahner, can you help me with this?
Which 'certain pins' did you try? I think you must connect all pins that are marked as 'used pins' on the PCB (pins 3-12) and 5V/Gnd. If you only use M3/M4 and no servos you may omit M1,M2,S1,S2
M4 - pins 6 and 7
M3 - pins 11 and 8
When I put the shield directly on the arduino, the stepper motor works, but I can't because then there are no free pins for buttons and micro switches. I even tried connecting the motor to the l293d IC on the protoboard and it didn't work, it just locked it in place.
The picture of the shield shows "USED PINS -->"... Looks like you have DIO 13 and 2 available, and all the analog pins A0 through A5 (14, 15, 16, 17, 18, 19) for buttons.
The dots on 12, 8, 7 and 4 probably mean something.
Where did you see these connections?
These are the connections to the HC595 serial-parallel converter. The H-bridge inputs are controlled by the HC595. Without connecting these pins it will not work.
I found them on some forum
I have 3 more motor drivers that I can use: L298D, L9110 and ULN2003
Which one is best for my stepper?

The ULN2003 is not suitable for your driver. If you don't exceed 12V for your stepper, the L9110 board seems better than the shield, because it lets more pins free for other purposes. But it definitely needs another software to drive the stepper than your L293-shield.