1
\$\begingroup\$

I have built a circuit containing a 2N3904 NPN transistor. I am using this to amplify a signal to send it longer distances and then drop it back down to 5V.

schematic

simulate this circuit – Schematic created using CircuitLab

While debugging the circuit, I noticed the resulting square wave has a longer fall time than expected. Below are screenshots of the resulting waveform: red is the original and blue is the result (measured at TX_DATA_5V_AMP).

Resulting waveforms

enter image description here

enter image description here

My questions are:

  • Why is the fall time so much longer than the rise time on this waveform?
  • How can I shorten the fall time on this circuit? Can I shorten it by changing the resistor values or the transistor?
\$\endgroup\$
1
\$\begingroup\$

It looks like whatever's providing TX_DATA_5V is an open-drain/open-collector output. You'll want to add a pullup resistor, like so:

schematic

simulate this circuit – Schematic created using CircuitLab

This resistor will pull the line high when the signal is high, and is necessary because open-drain/open-collector outputs can only drive the signal low. If you want a faster fall time, you can reduce the value of R4. Be careful you don't end up sinking too much current into your microcontroller's output though.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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