Author Topic: Constant current source for LED driver with MOSFET control  (Read 2554 times)

0 Members and 1 Guest are viewing this topic.

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Constant current source for LED driver with MOSFET control
« on: April 26, 2018, 05:25:39 pm »
Hello all,

I'm working on a little circuit where I need to drive an LED from a variable voltage source.  I also need to turn the LED off with a MOSFET.  The input voltage can range between 18V and 36V.  I want to drive the LED with 7mA.  Then I will have a 5 volt signal driving the MOSFET to turn the source on or off. 

I came up with the attached circuit but I'm not great with analog circuits so I might be missing something.  The MOSFET is DMN5L06K-7 and can't be changed.  The zener diode(4.7v) and NPN transistor are generic and can be changed.  Is there anything inherently wrong with this?  I've simulated it and it seems to work but I'm worried I'm overlooking something.

Thank you!
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Constant current source for LED driver with MOSFET control
« Reply #1 on: April 27, 2018, 09:20:54 am »
I would have thought that the 5V signal on the FET will not work. The FET is up at 4.7V so you don't have any headroom to turn it on unless your reference is with respect to the 4.7V zener.

I would look at a small 3 terminal regulator that could be configured as a constant current source and use the FET to connect it to 0V when you want it turned on.
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Constant current source for LED driver with MOSFET control
« Reply #2 on: April 27, 2018, 09:33:40 am »
If precise current isn't important, consider using two ordinary diodes in series place of the zener, and replacing the 480 resistor with one around 70 ohms.

It will also lower the votage required to turn the MOSFET fully on my about 3.4 V or so.

Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline 0xfede

  • Regular Contributor
  • *
  • Posts: 201
  • Country: it
Re: Constant current source for LED driver with MOSFET control
« Reply #3 on: April 27, 2018, 09:35:51 am »
I would have thought that the 5V signal on the FET will not work. The FET is up at 4.7V so you don't have any headroom to turn it on unless your reference is with respect to the 4.7V zener.

I would look at a small 3 terminal regulator that could be configured as a constant current source and use the FET to connect it to 0V when you want it turned on.

The circuit will work as intended. It should be considered as a constant current generator circuit enabled by the mosfet. I've attached the simulation screenshot (since I'm lazy for the NMOS I used the NDC7002N that is similar to the one chosen by the OP) and the LTSPICE files.

Best,
0xfede
Semel in anno licet insanire.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: Constant current source for LED driver with MOSFET control
« Reply #4 on: April 27, 2018, 10:28:44 am »
I would have thought that the 5V signal on the FET will not work. The FET is up at 4.7V so you don't have any headroom to turn it on unless your reference is with respect to the 4.7V zener.

I would look at a small 3 terminal regulator that could be configured as a constant current source and use the FET to connect it to 0V when you want it turned on.

The circuit will work as intended. It should be considered as a constant current generator circuit enabled by the mosfet. I've attached the simulation screenshot (since I'm lazy for the NMOS I used the NDC7002N that is similar to the one chosen by the OP) and the LTSPICE files.

Best,
0xfede
The zener diode isn't doing anything. Look at the voltage across it and current flowing through it. It's way below the zener turn on/threshold voltage.

If the 5V logic supply is regulated, then remove the MOSFET and zener and it will work perfectly. Otherwise, use a lower voltage zener, with a suitable resistor, powered from the 5V control signal.

By the way, just upload the .asc file. No need for the other files in a zip.
 

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: Constant current source for LED driver with MOSFET control
« Reply #5 on: April 27, 2018, 08:35:58 pm »
@Neilm  I imagine it works because the current needed from the MOSFET is extremely small.   But using a 4.7v zener was probably a bad initial choice.  I looked for current source chips and found some.  But ones that fit all my specs(temperature being a big one) had no alternates in the same package.  I've been told to not use parts that don't have an alternate so I moved to using discrete components. 

@hampster_nz I don't believe precise current is important.  The task I have been given is to drive the LEDs so they variations in input voltage don't cause a noticeable change in brightness.  I'm not sure how much current is enough to make the LED noticeably brighter.  I would guess an normal diode will be fine for me.  Thank you for the suggestion.

@Hero999 I should have given more details in the original post.  The reason I don't want to drive the BJT directly is because the logic that would drive it is open collector and has an extremely weak pull up which is used in multiple places.  I haven't done the calculations but to simplify the problem I'm using the MOSFET.  But I agree, if I didn't have those restrictions your solution would be much simpler.   
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19524
  • Country: gb
  • 0999
Re: Constant current source for LED driver with MOSFET control
« Reply #6 on: April 29, 2018, 10:46:49 am »
@Hero999 I should have given more details in the original post.  The reason I don't want to drive the BJT directly is because the logic that would drive it is open collector and has an extremely weak pull up which is used in multiple places.  I haven't done the calculations but to simplify the problem I'm using the MOSFET.  But I agree, if I didn't have those restrictions your solution would be much simpler.
Add a pull-up resistor. If the BJT has an Hfe of 200, then the input impedance to my circuit would be 90k. A 4k7 pull-up would be more than sufficient.

Alternatively, replace the MOSFET with an emitter follower. It will increase the input impedance by another factor of 100 or more and doesn't have as much voltage drop, as a MOSFET.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf