Where to connect 4 individual switches for 4 DC motors on a L293D motor shield?

Hi everyone,

I'm new to Arduino. After watching several videos and using Chat GPT I'm stuck with a problem.

I want to use a 9V 1A adapter to run an Arduino UNO R3 with a L293D motor drive expansion shield. Each of the 4 motors is a 6V DC motor with 100RPM. This part is clear.
I want to add a switch for each motor, so I can turn them ON and OFF separately. Where do I have to connect the wires from the switch? Do I have to melt them on the L293D motor shield? One end to the digital pin and the other to the GND?

I haven't bought the materials yet, I wanted to reach out for proposals.
It is essential for me to be able to turn ON and OFF the 4 motors separately.

Thank you

What exact switch?

For the popular 6mm tactile push button switches, wire one pin of each switch to ground. Wire a diagonal termian of each switch to an input with its pinMode set to INPUT_PULLUP.

It would be a comutator Dip switch, DP-4P.

You could, of course, stop any or all of the motors using software. Why do you need physical switches ?

If you do need physical switches then the conventional way to do it would be to connect/disconnect the power to each motor by putting a switch one or both wires providing power to the motor

I want to use it's EEPROM memory, so I don't have to connect it to my computer everytime.

In that case if I just put a switch between the motor and the L293D motor shield, won't it overheat?

What has using EEPROM got to do with connecting to the computer and why the need to connect/disconnect each motor separately ?

Why would the motor or the shield overheat if you stop providing power to it ?

Are you controlling the speed and rotation direction of the motors with the Arduino through the L29x driver shield?

Yes. It will be set to a constant speed, 100RPM. I don't want to modify it.

That will not work! Dip switches handle signals and a few mA, not motor currents. They will burn. up.
Read the switches in software and let the code operate the motors desired.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.