3
\$\begingroup\$

I've built a level converter for a digital PWM signal that runs at 800KHz. The circuit goes like this:

Bidirectional level shifter

*I'm using a BS170 transistor instead

The problem is the signal gets distorted at around 10KHz, I think the transistor is supposed to handle the bandwidth. How can I raise the frequency limit?

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Have you tried using stronger pull-up resistors? 1 or 2K might make much faster transitions.. \$\endgroup\$
    – KyranF
    Commented Nov 9, 2014 at 20:43
  • \$\begingroup\$ You're right, I don't need it to be bidirectional. The reason I'm using that circuit is that it experimentally gave a better frequency response than simple inverter I tested. \$\endgroup\$
    – privera
    Commented Nov 9, 2014 at 20:43
  • \$\begingroup\$ @KyranF haven't tried but it makes sense. I'll add that to the list. \$\endgroup\$
    – privera
    Commented Nov 9, 2014 at 20:45
  • \$\begingroup\$ also a simple non-inverting buffer supplied with 5V and with a gain of 2 (for good measure), will amplify the 3.3V and attempt to make it 6.6V but will just reach 5V (supply input) instead. You would need an IC with rail-to-rail outputs though. The op-amp will be able to source and sink current into the target pretty good too, so you might get even better performance \$\endgroup\$
    – KyranF
    Commented Nov 9, 2014 at 20:48
  • \$\begingroup\$ A mosfet-gate-driver chip might be a better match. \$\endgroup\$ Commented Nov 9, 2014 at 21:09

2 Answers 2

3
\$\begingroup\$

Is the distortion on the rising edge? Pull-up of Q1 \$V_{\text{ds}}\$ through R2 is a limiter for bandwidth. At close to \$V_{\text{ds}}\$=0V, BS170 has \$C_{\text{ds}}\$~40pF and \$C_{\text{gd}}\$~20pF. So, time constant for R2(\$C_{\text{ds}}\$+\$C_{\text{gd}}\$) ~ 4usec. After the rise of GPIO has played out, the last 2V to 2.5V of rise will follow that 4usec time constant, which makes the large signal bandwidth less than 100kHz. Other capacitance in the circuit will make things worse. Lowering R2 to 1kOhm would help get the bandwidth close to 800kHz.

Should also point out that \$V_{\text{th}}\$ of the BS170 can be as high as 3V, so there could be units that won't properly turn on. A lower voltage part with lower \$V_{\text{th}}\$ and smaller die size, to reduce part capacitance would be a better choice.

\$\endgroup\$
2
  • \$\begingroup\$ Exactly, the distortion is on the rising edge. I hadn't noticed the 3V Vth, thanks for that. I'll also try lowering R2 and get back with results. Thank you \$\endgroup\$
    – privera
    Commented Nov 10, 2014 at 0:41
  • \$\begingroup\$ I can confirm that with R2=1kOm the BS170-based circuit works for ESP8266 (WeMos D1 mini) and WS2812B LED (about 100 LEDs). Linking also similar answer. \$\endgroup\$
    – dma_k
    Commented Oct 8, 2019 at 8:13
1
\$\begingroup\$

Put a capacitor from source to drain. Start small (say, 22pF) and observe the effect. Try different values. Smaller is better as long as it works.

This provides some AC coupling to boost bandwidth, but still allows isolation at DC.

I did not look up the specs on the BS170, and am not familiar with it. I have done this in the past with a BSS138 (if I remember correctly), which is a good choice. It is a "jelly bean" which is available from many vendors and at low price. The 2N7000 has a higher Vgs(th) than the BSS138.

\$\endgroup\$
1
  • \$\begingroup\$ I'll try with the s-d capacitor tomorrow at the lab, I'll let you know. \$\endgroup\$
    – privera
    Commented Nov 10, 2014 at 0:38

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.