3.3V to 5.0V PWM conversion question

I am running an ARM STM32 at 3.3V, and need to use the PWM to talk with some industrial motor controllers that use 5.0V PWM logic. Specifically, my motor controllers say that the PWM inputs are 74HC14 Schmitt triggers, 100ns RC-filter, Vin-LO < 1.35Vdc, Vin-HI > 3.65Vdc, Vmax=12.0V.

The PWM frequency range that the motor controller can handle is 1kHz minimum to 100kHz maximum.

These inputs on the motor controllers also have pull-up/pull-down control – they can be configured to be internally pulled up to 5.0V or pulled down to ground. The data sheet says:

  • - Grounded inputs with HI active levels interface to PLC's that have PNP outputs that source current from +24Vdc sources.
  • - Inputs pulled up to +5 Vdc work with open-collector, or NPN drivers that sink current to ground.
  • I can’t seem to find in the STM32 documentation whether the I/O’s are open collector or NPN. Does anybody know about this?

    Can anybody recommend a simple way to step up the voltage of a digital output pin from 3.3V to 5.0V (or anything >3.65 and < 12.0V)? Or, if I configure the motor controller inputs to be pulled up to 5.0V internally, will an STM32 be able to sink enough current to ground the pin and allow for the PWM to work properly?

    ~Luke

    Hi,

    GPIO pins are described in the STM32 reference, docid 13902 (for the 1xxx series) starting on page 154.

    They can be configured as 5V tolerant outputs, either push/pull or open drain.

    So with open drain and a pull-up to 5V on the receiving side you should be fine.

    E

    As elevator4 says, most of the GPIO pins are 5V tolerant. However there are a few pins with special functions such as ADC input that are not 5V tolerant, so watch out for those. The pin-out table in the data sheet has a column indicating whether each pin is 5V tolerant.

    The data sheet also lists drive levels that you can consult to be thorough. But if the motor controller says it is 74HC compatible, you should be fine.

    Great, thanks for this information, it makes sense now.

    I’ll post back here if I have any issues with it.