# How to amplify 3.3 volts PWM to 5 volts PWM

im working on a project to drive a motor using a motor driver that accepts 5 volts PWM (for 100% duty cycle) but im using raspberry pi 3 that has a PWM of 3.3 volts (for 100% duty cycle) as a result, i cant really reach the maximum speed that i want. how should i resolve this? is there a way to amplify PWM signal without messing up with the frequency? thanks!

• Look elsewhere on this site for 3.3 V to 5.0 V conversion. It's the same with PWM signals. Commented Dec 16, 2019 at 1:55
• @BrianCarlton can you suggest me which one? the one that i found was just conversion for digital signal that probably doesnt really care about the frequency/speed of the signal. Commented Dec 16, 2019 at 2:01
• @FazrinAdinugraha And why do you think that wouldn't work for this case? Commented Dec 16, 2019 at 2:08
• @Hearth since the value of PWM signal is affected by the logic voltage and the frequency (duty cycle) of the signal. i was worrying if i use a wrong component to amplify the 3.3V signal, the slew rate of some amplifier component cant kee pup with the PWM frequency. Commented Dec 16, 2019 at 2:25
• Is the driver a Gate or CMOS logic input. If just a FET Gate, then use a common base emitter drive to collector pullup Commented Dec 16, 2019 at 2:27

You should specifiy your maximum PWM frequency.
The switching speed of the circuit below is likely to be fast enough for most Arduino or Pi PWM applications.

Here is a simple and slightly unusual circuit that will do what you want in most cases.
The transistor base is connected to the low voltage supply (here 3V3) by a resistor, and the emitter is driven directly by the low voltage (here 3V3) PWM.

Almost any small signal NPN "jellybean" transistor can be used.
A small capacitor across R1 (maybe 1 nF - experiment) will somewhat improve frequency response - but is unlikely to be needed.

This arrangement means that when the PWM input is low the transistor is on, it's collector is low and so the output PWM is low - so their is no "phase inversion".

simulate this circuit – Schematic created using CircuitLab

• I chose 1k for base for faster turn ON with Ib=2.6mA in full saturation if driving Ciss. Commented Dec 16, 2019 at 2:58
• @TonyStewartSunnyskyguyEE75 Yes. I decided a Beta of 30ish should be OK. R1 speedup cap if needs must. || lonnnnnng ago I wanted a high side switch to turn on a resistor divider for measuring a battery voltage. Low Rdson fets were not then an option. I used (I think) a BC327-40 (Beta 250-600 I think) with a forced beta of about 0.1 :-) !. Vsat dropped to a few mV - well under anything ever seen in data sheets. The only other use I recall of bipolars with forced beta of <1 was EHTish drivers (1 kV+?) with beta of 10 in spec sheet and driven such that Ib >> Ic. Made sense. Commented Dec 16, 2019 at 3:16

This is a non-inverting high speed level shifter.

simulate this circuit – Schematic created using CircuitLab

• Agh! :-) - beat me by 4 minutes - I was editing my answer when you posted yours (unseen(). Commented Dec 16, 2019 at 2:40