0

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?

andreas.vitikan
  • 227
  • 3
  • 12
  • 2
    YOu need a base resistor in there. The output of that CMOS is shorted to ground through a diode. – Trevor_G Jan 21 '18 at 16:05
  • 1
    Try putting a 10K resistor in there, as @Trevor_g correctly says. – TonyM Jan 21 '18 at 16:08
  • With the BJT or the MOSFET? Also how is it shorting to ground? The p-n junction diode? – andreas.vitikan Jan 21 '18 at 16:09
  • **BTW** a [CD4047](http://www.ti.com/product/CD4047B) is a 555 type circuit, not a hex invertor. Perhaps you mean a [CD4069](http://www.ti.com/lit/ds/symlink/cd4069ub.pdf) – Trevor_G Jan 21 '18 at 16:17
  • 1
    @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? – andreas.vitikan Jan 21 '18 at 16:22
  • The base-emitter junction is effectively a diode. When you hooked that up that way, the current would be high enough to let the smoke out of something. – Trevor_G Jan 21 '18 at 16:25
  • 1
    @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. – TonyM Jan 21 '18 at 17:41
  • @TonyM I like where this is going, you're turning into an Olin 2.0 – Harry Svensson Jan 21 '18 at 18:02
  • 1
    @HarrySvensson, you're dead right - I had a childish moment of daft petulance...at least it was a last resort, not a first :-D I feel a little chilled down the spine, like you're scratching in the mud with a stick, saying "That tree is strong with the dark side of SE..." :-) – TonyM Jan 21 '18 at 18:23
  • 2
    @TonyM Nice, come to the dark side, lord Vader. Honestly we need more Olins, no joke. – Harry Svensson Jan 21 '18 at 18:42

0 Answers0