Skip to main content
Killstreet30
Associate III
February 8, 2023
Solved

Doubt on how to interface a 5V circuit to a 3V microcontroller (STM32)

  • February 8, 2023
  • 1 reply
  • 1608 views

0693W00000YAEyLQAX.png 

As you can see in the above image, I'm trying to design a motor controller. But pin 16 of L293D requires a 5v input as VCC1 but the maximum output a STM gives is 3V. I wanted to know how to convert and map the 3V to 5V using a passive component?

    This topic has been closed for replies.
    Best answer by RomainR.

    Hello @Killstreet30 (Community Member)

    The best is to use voltage level translator to interface STM32 with L293D driver.

    A 8 I/O's level voltage translator IC:

    https://www.st.com/en/interfaces-and-transceivers/st2378e.html

    Or here using transistor:

    https://maker.pro/custom/tutorial/how-to-use-a-logic-level-shifter-circuit-for-components-with-different-voltages

    Best regards,

    Romain

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    1 reply

    RomainR.
    RomainR.Best answer
    ST Employee
    February 8, 2023

    Hello @Killstreet30 (Community Member)

    The best is to use voltage level translator to interface STM32 with L293D driver.

    A 8 I/O's level voltage translator IC:

    https://www.st.com/en/interfaces-and-transceivers/st2378e.html

    Or here using transistor:

    https://maker.pro/custom/tutorial/how-to-use-a-logic-level-shifter-circuit-for-components-with-different-voltages

    Best regards,

    Romain

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    LCE
    Principal II
    February 8, 2023

    That 2nd link, the npn + MOSFET level shifter should have a resistor in series with the npn's gate.