0
\$\begingroup\$

This is kind of a follow-up question to my last question (CMOS inverter configuration). I have succesfully used an Arduino digital output pin. The output pin drives IN1 and IN3 inputs of an L298N engine driver (with max 100 microA input current), as well as a CD4049 hex inverter input. The hex inverter output drives the other 2 inputs of the driver (IN2, IN4). This has worked without a problem. When I try to drive another load from the inverted output is when I get a problem.

schematic

simulate this circuit – Schematic created using CircuitLab

I tried to drive at the same time the 2 inputs (IN2 and IN4) of the L298N and the base of a NPN BJT transistor 2N2222. When the inverter input was high everything worked well, and when the inverter input was low, neither the L298N driver worked or the 2 LED's through the transistor. I then though that maybe the base current was too high, so I thought I would switch with an N-channel MOSFET BS170. I replaced it Gate-Base, Drain-Collector and Source-Emitter. If the input went low, the output would go high on the CD4049. But when the input went high again, the output stayed high as well.

What am I doing wrong here? How do I correctly drive a NPN BJT or N-channel MOSFET from the output of a CMOS inverter like the CD4049?

\$\endgroup\$
  • 2
    \$\begingroup\$ YOu need a base resistor in there. The output of that CMOS is shorted to ground through a diode. \$\endgroup\$ – Trevor_G Jan 21 '18 at 16:05
  • 1
    \$\begingroup\$ Try putting a 10K resistor in there, as @Trevor_g correctly says. \$\endgroup\$ – TonyM Jan 21 '18 at 16:08
  • 1
    \$\begingroup\$ @Trevor_G My mistake, I correct it now. It is the CD4049. Still, in which configuration should I add the resistors and what diode is shorting the output to ground? \$\endgroup\$ – andreas.vitikan Jan 21 '18 at 16:22
  • 1
    \$\begingroup\$ @andreas.vitikan, can't do step-by-step one-comment-at-a-time guidance, this is Google-level stuff and the 'need for a base resistor' question is answered in a thousand places there. Just connect the 10K resistor between the CMOS gate output and the BJT base and let's be done with it, please. \$\endgroup\$ – TonyM Jan 21 '18 at 17:41
  • 2
    \$\begingroup\$ @TonyM Nice, come to the dark side, lord Vader. Honestly we need more Olins, no joke. \$\endgroup\$ – Harry Svensson Jan 21 '18 at 18:42