cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RB and Totem Pole drive problem

christiaan2
Associate II
Posted on August 20, 2015 at 12:06

Hi

I am trying to drive the output from pin PA8 (needed because I use it for TIM1 PWM) from 3.3V to 5V using an external totem pole drive circuit. Problem is no matter what I do the voltage of the output signal after the drive stage stays 3.3V.

Is this possibly internal pull up or pull down resistors causing this issue?

Thank you
4 REPLIES 4
John F.
Senior
Posted on August 20, 2015 at 14:25

You imply that you're using an external 3V to 5V level translator but don't provide a component or circuit reference. If you just Google ''3V to 5V'' you'll find lots of helpful information on ways to do it and off the shelf components. To get a chance of help with your particular design please provide more details. It sounds like you don't understand the electronics.

christiaan2
Associate II
Posted on August 20, 2015 at 16:12

Thanks for the reply but I solved the problem. The external totem pole drive circuit was faulty.

I am using two complimentary transistors together with a third NPN transistor. I'll try to attach the circuit diagram.

The problem I'm having now is that the output logic is inverted.

________________

Attachments :

Totem_Pole.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Y2&d=%2Fa%2F0X0000000bes%2F44KZGcyeOGTMvOL7IsOHz4buMlQgr0lyzTlD7AfchyU&asPdf=false
John F.
Senior
Posted on August 20, 2015 at 17:42

The output

will

be inverted. When the microcontroller pin is high (+3.3V) the first transistor Q3 is turned on and its collector voltage falls to 0V. Transistors Q1 and Q2 are voltage followers and just provide a lower output impedance (greater current drive) so the output at their junction (common emitters) is an inverted signal.

The simplest solution would be to use an integrated circuit level shifter. There are lots to choose from. You need to decide what suits your application ... for example what speed you need and how much current drive etc. If speed is not an issue and you want a discrete component solution just add another transistor (and resistors) configured like Q3 (R2, R3, R4) between Q3 collector and the common bases of Q1 and Q2 to invert the signal again.

christiaan2
Associate II
Posted on August 21, 2015 at 11:41

Thank you John, you have been a great help. Adding another transistor stage will work perfectly.