Constant current source for LED driver with MOSFET control - Page 1
Forum section: electronics / beginners

author: pigtwo
author_rank: Regular Contributor
timestamp: April 26, 2018, 05:25:39 pm
content: 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!

author: Neilm
author_rank: Super Contributor
timestamp: April 27, 2018, 09:20:54 am
content: 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.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 27, 2018, 09:33:40 am
content: 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.

author: 0xfede
author_rank: Regular Contributor
timestamp: April 27, 2018, 09:35:51 am
content: Quote from: Neilm on April 27, 2018, 09:20:54 amThe 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

author: Zero999
author_rank: Super Contributor
timestamp: April 27, 2018, 10:28:44 am
content: Quote from: 0xfede on April 27, 2018, 09:35:51 amThe 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.

author: pigtwo
author_rank: Regular Contributor
timestamp: April 27, 2018, 08:35:58 pm
content: @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.

author: Zero999
author_rank: Super Contributor
timestamp: April 29, 2018, 10:46:49 am
content: Quote from: pigtwo on April 27, 2018, 08:35:58 pmAdd 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.