cancel
Showing results for 
Search instead for 
Did you mean: 

Problem converting 3.3 Volt to 5 volt from STM32F4Discovery Board

testid360
Associate II
Posted on October 29, 2013 at 10:45

Hello everyone !! 

i am having some problem interfacing my 3.3 volt gpio pins to a 5 volt device. i am basically a software developer but trying to understand the cause of the problem at electronic level.

here are the details, if anyone can help i will really appreciate it --

Purpose of my program : To generate a PWM on the GPIO with maximum frequency of 200 KiloHertz .

My Setup : I have a STM32F4Discovery board, being powered by the USB from my PC. Whose GPIO pin ( specifically PE15) is connected to the external 5volt device.

The external device is a Stepper Motor Drive i am using for motor control.

Pin configuration : output type = Push Pull

   speed = 50 Mhz       

GPIO_PuPd = GPIO_PuPd_NOPULL

Observations : I am getting around 4.5 Volt from the USB Port on my PC(should be 5 though..)

The board is converting this down to 2.7 - 2.8 volt (which should be 3.3 volt !!) , and providing it to the STM32F407VGT6  microcontroller on the board.

This same voltage is being reflected in the GPIO pins .

Now the PWM voltage levels are -

Low State - 0 volt

High State - 2.7 volt

The problem - The external 5 volt device does not pick up the GPIO voltage level in the high state.

now i do understand that its my mistake to interface a 3.3 volt micro-controller with a 5 volt device but still i wish to connect it as i don't have any other option.

I am trying to change the drive to 3.3 Volt one , but meanwhile i want to look at any other option which can help me use this same microcontroller.

i think if the GPIO high state becomes at around 3.3 volt it will work even with a 5 volt device, but the current 2.7 is not reliable at all.

or otherwise

a mechanism to convert the 3.3 volt signal to 5 volt at high frequency (200KHz) would solve the problem.

#gpio-3.3-5-volt-stm32f4discovery
3 REPLIES 3
Posted on October 29, 2013 at 13:20

You're not going to be able to drive motors directly, but you should be able to get 5V outputs by using OD mode and pulling to 5V externally with a pull-up resistor. This will work for light loads.

USB may also not be able to supply enough current to drive motors either.

For motors you'll need some drivers, and a better supply.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dthedens23
Associate II
Posted on October 29, 2013 at 21:02

i think if the GPIO high state becomes at around 3.3 volt it will work even with a 5 volt device, but the current 2.7 is not reliable at all.

Really depends on the device.  Read up on TTL vs CMOS.

Simple solution is a signal level converter.  Can be done with simple FET/transistor or if you need multiple signals converted, then 74AVCH8T245

testid360
Associate II
Posted on October 30, 2013 at 04:37

Thanks ''clive1'' ... i did mention that i am using a drive for this specific purpose... the signal are not going into stepper, but the stepper drive...still i got your point :)

i'll try to use the pull up with OD trick... and get back to you.

@rocketdawg - yes i am going to  connect multiple pins in near future... probably control more motors... the device is TTL compatible... i'll try to connect the signal level converter...looks promising.thanks !