### Browsed byMonth: June 2011

Simple LED Constant Current Circuit Uses Four Discrete Components

## Simple LED Constant Current Circuit Uses Four Discrete Components

I need to add an active current limit to the LEDs from the previous post. The main reason for the current limit is so that the brightness of the LEDs remains uniform across the lead acid battery voltage range of 11.8 to 14.4V. The circuit I am using is a very simple and only uses 4 components to limit current.
See the schematic here:(to see a bigger version of any of these pictures click the image, then click the image on the following page, it is a weird wordpress issue)

The circuit functions as follows:
For this example we will set the current limit at 100mA so R2 is 6 Ohms.
The NMOS is turned on when the voltage from Vin through R1 exceeds the NMOS Gate threshold level. As voltage at Vin rises so does current through the circuit and so does the voltage drop across R2. The current limit kicks in when the R2 voltage drop exceeds the base voltage threshold (VBE) of approximately 600mV on Q1. So if the current limit is set for 100mA the voltage across R2 = 6 Ohms * 0.1A = 600mV. When Q1 turns on it starts to pull the voltage down at the gate of the NMOS causing the FET to go into its linear region, this limits the current through the circuit. The NPN transistor is so much faster than the NMOS that there is no problems with oscillation in the circuit ( this assumes that the circuit is built properly with the current limit components in a very tight group )

There is one more ‘benefit’ to this circuit. If you want some limited form of over heating protection for your load circuit you can place the transistor next to the hottest part of the load. The VBE of the transistor will drop as it heats up, effectively dropping the the current limit in the circuit, this will all depend on the current in the transistor and the temperature. The greatest analog guru of all time Bob Pease wrote an article that explains VBE in detail just click here to read What’s All This VBE Stuff, Anyhow? Of course if you want to keep your current limit circuit constant keep the transistor away from the heating of the load.

Here is a simulation run of the circuit: Red line is the current going through the LEDs and R2, Blue line is the Voltage into the circuit ramped from 0 to 14.4V in 20mS, Green is the gate voltage of the NMOS, Light blue is the Voltage across R2 and at the base of Q1.

This circuit can be used for a constant current source / sink for LEDs and laser diodes (the circuit can be used on the high or low side of a load). It can also be used anywhere a current limit function is needed.

The NMOS can be just about any N-Channel FET that is rated for 1.5X the voltage of the circuit, 2X the Wattage of the circuit and at least 2X the current of the circuit, and should have a reasonable RDSon. The FET may need to attached to a heat sink, if you plan on running more than a 1/4 Watt.

The current limit function comes into play only if the input voltage is high enough to meet the following:

Vin > Load Circuit Voltage Drop + ( NMOS RDSon * Ilim ) + ( R2 * Ilim)

Here is an example of the current limit setting a constant current for two different voltage levels:

For example A the current limit is set for 30mA and is barely on with just 0.7V dropping across M1. This is derived with : 11.8V Vin – (LED forward voltage 3.5V at 30mA * 3 LEDs) – 0.6V across R2
The power dropped on M1 = 0.7V * 0.03A = 21mW

In example B the lead acid battery is fully charged and the power drop is at it highest with the power dissipated on M1 = 4V * 0.03A = 102mW

An LED Daylight Sensor with PWM Brightness Control

## An LED Daylight Sensor with PWM Brightness Control

This blog adds a PWM brightness control to the circuit from the previous post A Quick and Simple LED Daylight Sensor.

I have added a 555 timer circuit to give the LED daylight sensor circuit PWM brightness control. See the schematic here:
(to see a bigger version of any of these pictures click the image, then click the image on the following page, it is a weird wordpress issue)

Adding a variable PWM control to the previous circuit only uses eight more components.

Using the 500K potentiometer the PWM can be set for ~1% to ~99% duty cycle.

I have also increased the resistance going to the photo-transistor to further reduce the off state current draw and increase the dark sensitivity ( the circuit turns on later, when it is darker, and back off earlier in the morning ).

Since I am running my circuit with the PWM duty cycle set to 30% I have increased current to the LEDs to get more light out with less average current draw ( Note the 68 Ohm resistor that were 100 Ohms in the previous circuit ). The LEDS appear brighter because of persistence of vision from the human eye.

A Quick and Simple LED Daylight Sensor

## A Quick and Simple LED Daylight Sensor

I wanted to make a super high power solar light that puts out lots of light and turns off the LEDs automatically in the daylight. I wanted a very simple circuit, so this morning I put together this basic circuit that only uses three extra components for just that. See LED light sensor schematic below:
(to see a bigger version of any of these pictures click the image, then click the image on the following page, it is a weird wordpress issue)

When the sun is out the circuit only draws about 6uA from the battery. The 6uA draw is because the photo-transistor is conducting current from the 2.2M resistor to ground, this turns the MOSFET off since it does not have enough voltage on its gate. When the sun has gone down for the day the photo-transistor stops conducting current this turns the MOSFET on, drawing current through the LEDs to ground.

This light sensor is very sensitive to daylight, and turns on right around dusk. The sensitivity can be tweaked by changing the value of the 2.2M resistor, more resistive = more sensitive. If you increase the resistance too much the circuit will stop functioning because the leakage of the photo-transistor will pull the voltage at the gate down below the turn on threshold of the FET.

The LEDs are ~10,000mcd and I am running three of them in series for each string, my circuit is running two strings of LEDs. The 100ohm resistor limits the current to the LEDs to about 20mA, so with the two strings of LEDs this circuit draws about 40mA when the LEDs are on.

My circuit is powered from a 7A/Hr 12V SLA battery and is being recharged with a 1.5W solar panel. With the 40mA draw my LED solar light should run for more than 15 days without the solar charger, but with the solar charger this should run for years without any intervention.

I will be checking on the battery daily for couple of weeks and will try to determine how many more strings I should be able to attach. I also plan on adding a PWM circuit to the LEDs to pulse them with a higher current. With the PWM the circuit should draw less average current with the LEDs appearing brighter due to the persistence of vision from the human eye. More on this mod in the next two weeks.

Here is a picture of the LED light strings running side by side:

Here is a picture of my front door with the two LED strings light pointed at both sides of it: (note the yellow looking LED in between the two strings is from another solar light, it is putting out 1/20th of the light)