Author Topic: Slow LED with 2N7000 and demux  (Read 1656 times)

0 Members and 1 Guest are viewing this topic.

Offline analogoTopic starter

  • Regular Contributor
  • *
  • Posts: 85
  • Country: at
Slow LED with 2N7000 and demux
« on: June 06, 2017, 07:52:19 pm »
Dear forum, why do my LEDs light up so slowly (about 2 seconds to full brightness) when I use a demux to drive a N-channel MOSFET?

I have several LEDs that I would like to light up in a complicated order (matrix, charlieplexing and similar stuff). To drive my LEDs I use an MCU to command a 3-to-8 demux that, in turn, switch on and off a set of N-ch MOSFETs. My circuit and my MCU program work fine with one exception: the LEDs take about two seconds to light up completely. I have attached the schematic of the most reduced circuit that exhibits this problem. I also made a simulated version online.

I cannot understand why the LEDs are so "slow". They require between 1 and 2 seconds to start up. They respond much more quickly (but still slowly: 0.5 seconds) if the circuit has been going on for a minute or so. I suppose there is some (huge) capacitance somewhere, but where? In the demux?

If I remove the demux and I connect the gate of the 2N7000 MOSFET directly to the +5v rail, the LEDs will switch on and off instantly. So I am led to think that, somehow, the demux output is responsible for this slowdown. However, the datasheet of my TI CD4051 says that the output channels have only 30pF of capacitance and a typical 30 ns of propagation delay.

What else could cause this slowdown?
 

Offline BradC

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: Slow LED with 2N7000 and demux
« Reply #1 on: June 06, 2017, 08:00:03 pm »
Where is the inhibit pin and what are you doing with it. What are you doing with the other 2 multiplex select inputs?
 

Offline analogoTopic starter

  • Regular Contributor
  • *
  • Posts: 85
  • Country: at
Re: Slow LED with 2N7000 and demux
« Reply #2 on: June 06, 2017, 08:13:50 pm »
Where is the inhibit pin and what are you doing with it. What are you doing with the other 2 multiplex select inputs?

The inhibit pin is always grounded (= demux is always on).

Normally all the inputs are wired to a MCU pin, but I can replicate this problem by grounding all of them and adding a button connected to +5 on the A select input, taking the MCU out of the equation.

Vcc is connected to +5; Vee and Vss are both grounded. COM is connected to +5v.
 

Offline analogoTopic starter

  • Regular Contributor
  • *
  • Posts: 85
  • Country: at
Re: Slow LED with 2N7000 and demux
« Reply #3 on: June 06, 2017, 08:31:20 pm »
Where is the inhibit pin and what are you doing with it. What are you doing with the other 2 multiplex select inputs?

The inhibit pin is always grounded (= demux is always on).

Ah ah, not so fast. Properly grounding INH was, indeed, the fix to the problem. Same with the MCU code, I removed all the calls to enable/disable the demux.

Thank you BradC for putting me on the right track. But where does this strange behaviour come from? The datasheet says that the inhibit-to-signal delay is only 400 ns. Basically nothing for this kind of application. How do we get from 400 ns to 2 seconds?
 

Offline BradC

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: Slow LED with 2N7000 and demux
« Reply #4 on: June 06, 2017, 08:36:56 pm »
Thank you BradC for putting me on the right track. But where does this strange behaviour come from? The datasheet says that the inhibit-to-signal delay is only 400 ns. Basically nothing for this kind of application. How do we get from 400 ns to 2 seconds?

It's not a delay as such, more leakage. Having said that if your gate on the fet is really pulled down with 100K then I don't quite get it, but stranger things have happened.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf