2
\$\begingroup\$

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!

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Look elsewhere on this site for 3.3 V to 5.0 V conversion. It's the same with PWM signals. \$\endgroup\$ Commented Dec 16, 2019 at 1:55
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Dec 16, 2019 at 2:01
  • \$\begingroup\$ @FazrinAdinugraha And why do you think that wouldn't work for this case? \$\endgroup\$
    – Hearth
    Commented Dec 16, 2019 at 2:08
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Dec 16, 2019 at 2:25
  • \$\begingroup\$ Is the driver a Gate or CMOS logic input. If just a FET Gate, then use a common base emitter drive to collector pullup \$\endgroup\$ Commented Dec 16, 2019 at 2:27

2 Answers 2

3
\$\begingroup\$

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".

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ I chose 1k for base for faster turn ON with Ib=2.6mA in full saturation if driving Ciss. \$\endgroup\$ Commented Dec 16, 2019 at 2:58
  • 1
    \$\begingroup\$ @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. \$\endgroup\$
    – Russell McMahon
    Commented Dec 16, 2019 at 3:16
2
\$\begingroup\$

This is a non-inverting high speed level shifter.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Agh! :-) - beat me by 4 minutes - I was editing my answer when you posted yours (unseen(). \$\endgroup\$
    – Russell McMahon
    Commented Dec 16, 2019 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.