0
\$\begingroup\$

this is my first electronics project which requires controlling 2 different stepper motors with two motor drivers (L293D). I have found that the number of GPIO pins on my microcontroller (ESP8266) is 9. However, i require 10. I have found on the arduino website a method of using a transistors as switches as shown below which would reduce the amount of pins needed on the microcontroller.

enter image description here

My question is what do the wires control 1 and 2 lead to? is it just back to the GPIO pins of the microcontroller and i code for when the transistors turn on and off, or is there another piece of equipment in between? Also, where do I start from when choose what resistors and transistors to use? Thanks

\$\endgroup\$
1
\$\begingroup\$

In the data sheet you can see the following extract: -

enter image description here

It shows inverters (highlighted in green by me) doing exactly the same as the transistors in your circuit. There are extra inverters also shown but these can be presumed to indicate that the control A and control B signal sources are from a logic device.

My question is what do the wires control 1 and 2 lead to? is it just back to the GPIO pins of the microcontroller and i code for when the transistors turn on and off, or is there another piece of equipment in between?

They are fed from your GPIO pins and you code appropriately. Although the extract shows extra inverters, these are not needed and you can directly drive from your GPIO pins if they produce a logic 1 level in excess of 2.3 volts.

what resistors and transistors to use?

I'd use inverters (74HCT types) and not transistors but if you are keen to use transistors virtually any common transistor will do. In fact I can't think of one that wouldn't work OK. The resistor values shown in your picture are appropriate.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.