Fads to Obsessions and Beyond...




Free domain for life, exceptional technical support, website transfer

LED Garden Lights

Garden lights for illuminating a walking path are made from six salvaged high current LED's. The lights automatically turn-on at night (LDR as light sensor - with adjustable sensitivity) and then turn-off after a preset time (variable up to hours) to save 12V battery power. See Updated Garden Lights Project for a version using Bluetooth and PIC microcontroller (with Android Phone App).

A discarded emergency beacon that was found at a rubbish dump contained six high current LEDs (see Photographs Section) which were still operational. Testing of the salvaged LED's showed they have a forward voltage of ~1.6V and even with a relatively modest current of 0.25A were very bright.

The rear garden of my house has a walking path with a set of stairs leading to a side entrance, which has resulted in a number of falls when being used at night time. The salvaged LED's are bright enough to more than adequately illuminate this path.

The LED's are to be powered by a 12V battery, that is recharged by a small solar cell/regulator. In order to minimise current draw, the LED's will turn on automatically at dusk and then turn off again after a preset amount of time, seven (7) hours in this case. At my location, dusk is generally between 6pm and 7pm, which with a seven hour LED 'on time' results in the walking path being automatically illuminated from sun-down to between 1am-2am in the morning.

The LED's consume 0.25A (via an adjustable constant current source) at the desired level of illumination. A sealed 'motor cycle' 15Ahr battery is used as the power source. Therefore, the LED's at 0.25A could operate for approximately 60 hours continuously from this battery. The automatic illumination from sun-down for seven hours therefore means the walking path could be illuminated for approximately six days (ie nights) before the battery needs recharging. As previously mentioned, a small solar cell/regulator is available to recharge the battery through the day light hours. Therefore, the lights for the garden walking path should always be available when needed.

In order to achieve an even greater battery life (and allow for lower amounts of solar recharging due to shading/poor weather etc) pulse width modulation (PWM) of the LED's is used (a ~50% duty cycle).

It was initially desired that the garden lights could be automatically turned on via ultrasonic sensors acting as a 'trip wire', placed at start and end of the path. However, this requires a microcontroller/code and the circuitry to provide an ultrasonic pulse and detection, in addition to that required to power the LED's and the timing function.

However, considering that a number of falls on the garden walking path had already occurred at night time, it was decided that an initial 'version 1.0' of the garden path lights would only involve light sensing to automatically turn-on the LED's and the timer function to turn-off the LED's after the preset amount of time. This limited set of functionality would enable the lighting of the garden path to be achieved more quickly.

The incorporation of an ultrasonic sensor to provide additionally functionality or options for illuminating the LED's will be 'version 2.0'.

See Updated Garden Lights Project for a version using Bluetooth and PIC microcontroller (with Android Phone App).


The circuit involves the following four "functional blocks":

  • Light level sensor (LDR)
  • LED cut-off timer/counter
  • Logical NOR gate for light sensor and timer inputs to control LED's
  • PWM/Constant current source for powering LED's

The power supply for the circuit is from a 15Ahr battery recharged via a small solar cell/regulator. Therefore, a relatively constant voltage can be expected (at least constant enough for the purposes of this circuit) and a voltage regulator, which would involve consuming additional power, is not included.

Light level sensor (LDR)

The light sensing is performed using a light dependent resistor (LDR) which in bright light (room lights) has a resistance of ~1k and in the 'dark' (covered with a finger) of >10k. The LDR is used as part of a voltage divider formed with RV3 and R5 (the potentiometer RV3 controls the light level that will cause the LED's to be illuminated) which controls the base of NPN transistor Q1. As the light level falls, the resistance of the LDR increases and consequently the voltage at the base of Q1 increases. When the voltage at the base of Q1 is greater than ~0.65V, the transistor conducts and pin 12 of U1 is pulled to ground, enabling the CD4060 to begin timing/counting.

When the light level is high, transistor Q1 does not conduct and consequently pullup resistor R4 holds U1 pin 12 high, which disables the CD4060 from timing/counting.

LED cut-off timer/counter (CD4060)

The CD4060 is a 14-stage binary ripple counter (U1), which advances one count on the negative transition of each clock pulse. The clock pulse to the CD4060 can be from a simple RC network connected to the on-board oscillator stage (see the datasheet in the Bill of Materials Section). There is only a sub-set of the outputs from the binary ripple counter that are available on external pins of the IC package (1).

The first available output of the binary counter is at pin 7 (output 3) which has a frequency of the clock frequency (or oscillator frequency from the RC network) divided by sixteen (16). The frequency at each successive output is then half the preceeding output (and note output 10 is not available externally). This means that the range of possible output pulse frequencies is determined obviously by the input clock (oscillator) frequency and the limited number of outputs actually available at external pins.

In this case, the on-board oscillator is used with the external timing capacitor (C1) and resistor (R6 + RV1). The frequency of the oscillator is calculated using the formula:

f =
1 / 2.3 x Rt x Ct

where: (note the units)

  • f = frequency (kHz) of CD4060 oscillator
  • Rt = timing resistor (connected to pin 10) in k ohm
  • Ct = timing capacitor (connected to pin 9) in uF

For the values given in the schematic, Ct is capacitor C1 which is nominally 33uF with a target Rt of 40.5 kohm (for the total of R6 and RV1) which gives a frequency of 0.3253Hz. The 'timing resistor' Rt is composed of the potentiometer RV1 (with R6 to provide a minimum resistance if the potentiometer is 'turned full off') to enable calibrating the frequency of the CD4060 oscillator to allow for variation in the actual capacitance value of C1.

Having established a nominal frequency of 0.3253Hz this means the first available output from the CD4060 (pin 7) will have a frequency of 0.3253/16 = 0.0203Hz or a period of 49 seconds. Subsequent outputs on the CD4060 have half the frequency (i.e. twice the period). Therefore, output 12 (pin 2) should have a period of seven (7) hours.

Logical NOR gate for light sensor and timer inputs to control LED's

The desired functionality is that the LED's are illuminated when night time occurs (as set by RV3) and then the LED's remain illuminated for seven hours (or other preset time via RV1). The timing function via the CD4060 is enabled/disabled by holding CD4060 pin 12 low/high respectively. The actual illumination of the LED's is controlled by enabling/disabling the 555 timer (U2) which forms the PWM of the LED constant current supply (U2 pin 4 held high/low respectively). The following table summarises the logical conditions required by these voltage states:

A B Q
LDR (light=HIGH ~9V, darkness=LOW ~0.4V) CD4060 output pin 2 (timer tripped=HIGH) 555 timer pin 4 (enabled=HIGH)
100
110
001
010
Note: LDR=High/Low also respectively Disables/Enables CD4060

This equates to a logical NOR function (transistors Q2, Q3 and Q4 with associated resistors).

PWM/Constant current source for powering LED's

The circuit used for the constant current driver for the LED's was sourced from an article by Giorgos Lazaridis (3). This circuit is also used in the strip lighting project except in this situation, pulse width modulation (PWM) of the constant current supply was included to decrease overall power consumption of the LEDs, as battery power is used.

With reference to the details in (3) and the components labelled on the diagram in the Schematic Diagram section, when U2 is enabled (via output from the NOR gate explained above), voltage is applied to the gate of MOSFET Q5 and current flows through the LED's and the sense resistor (formed by the combination of R12 and RV2).

As the current increases through the LED's and the sense resistor, the voltage drop across the sense resistor also increases. When this voltage reaches ~0.7V transistor Q5 starts to conduct, pulling the MOSFET gate to ground, and hence turning off the MOSFET. Therefore, current through the LED chain is regulated by the value of sense resistor.

To calculate the value of the sense resistor use the following formula:

Rsense =
Vbe / Iled

where:

  • Vbe = base-emitter voltage transistor Q5 (~0.7V)
  • Iled = limiting current through LED (amps from datasheet)

The salvaged LED's used in the project were observed to be sufficiently bright with a current approximately 300mA. Therefore, the sense resistor value is 0.7/0.3 = 2.3 ohm. In the constructed circuit, the sense resistor is composed of the total resistance of R12 plus RV2 . The potentiometer RV2 allows varying the resistance and hence the current and therefore the brightness of the LED's.

A value of 1ohm was selected for R12 (which gives the minimum sense resistance even if the potentiometer is wound to zero resistance) which with RV2 at minimum resistance still gave a measured resistance of ~2.5ohm (due to manufacturing tolerance of RV2).

The value of R11 is selected to enable ~1mA of current to flow to the gate of the MOSFET

The 555 timer (U2) is connected in the astable configuration (4) with a duty cycle of ~50%. The design equation for the 555 astable timer is:

f =
0.72 / R10 x C3

With the nominal values in the schematic diagram (R10 = 10k and C3=1uF) the frequency will be approximately 72Hz, and a duty cycle of ~50%. Therefore, when U2 is enabled, the LED's will be pulsed on/off ~72Hz (quicker than the eye can register, i.e. persistence of vision POV etc) consequently saving approximately half the current.


Note: Image loading can be slow depending on server load.

  • LED Garden Lights SchematicLED Garden Lights Schematic

    Silver Membership registration gives access to full resolution schematic diagrams.

    LED Garden Lights Schematic

Note: Image loading can be slow depending on server load.

  • LED Garden Lights - All LayersLED Garden Lights - All Layers

    Silver Membership registration gives access to full resolution diagrams.

    LED Garden Lights - All Layers

  • LED Garden Lights - All Layers

  • LED Garden Lights - Bottom CopperLED Garden Lights - Bottom Copper

    Silver Membership registration gives access to full resolution diagrams.

    LED Garden Lights - Bottom Copper

  • LED Garden Lights - Bottom Copper

  • LED Garden Lights - Top CopperLED Garden Lights - Top Copper

    Silver Membership registration gives access to full resolution diagrams.

    LED Garden Lights - Top Copper

  • LED Garden Lights - Top Copper

  • LED Garden Lights - Silk ScreenLED Garden Lights - Silk Screen

    Silver Membership registration gives access to full resolution diagrams.

    LED Garden Lights - Silk Screen

  • LED Garden Lights - Silk Screen



Qty Schematic Part-Reference Value Notes
Resistors
2R1,R41K1/4W, 10% 
4R2,R3,R9,R1010K1/4W, 10% 
1R547K1/4W, 10% 
1R627K1/4W, 10% 
2R7,R11100K1/4W, 10% 
1R8,R14,R144.7K1/4W, 10% 
1R121 ohm1/4W, 10% 
1RV125Kpotentiometer 
1RV250 ohmpotentiometer 
1RV3100Kpotentiometer 
Capacitors
1C133 uF25V electrolytic 
1C210 nFceramic 
1C31 uF25V electrolytic 
Integrated Circuits
1U1CD406014-stage binary ripple counter datasheet
1U2NE555555 Timer IC datasheet
Transistors
5Q1-Q5BC547small signal NPN 
1Q6BC547FQP13N10 N-channel MOSFET 
Diodes
1D1LED5mm 10mA Red LED 
6D2-D6LED1W 
Miscellaeous
1LDRLight Dependent Resistor 
1SW1switchSPST
Description Downloads
LED Garden Lights Bill of Materials Text File Download

The salvaged LED's obviously did not have any specifications that could be referenced. The forward voltage drop is readily determined (found to be ~1.6V) however the maximum and continuous current is more difficult.

Using the test circuit, the current was increased and the salvaged LED's gave a very bright output (blinding to the naked eye) when ~0.25A was applied. "High-current" white LED's available from ebay Asian suppliers 'typically' are 1W with forward voltages of ~3.4V. So the observed 0.25A for the salvaged LED's appear to indicate they may be "1W" components. In any case, 0.25A applied continously from a bench supply for 8 hours appeared to have no detrimental affect.

The constructed breadboard prototype consumed ~7mA when 'quiescent' (i.e only light sensing) and 250mA when the six LED's are illuminated.

With six LED's connected approximately 10V are required by the series connected LED's (battery voltage nominally 12V minimum) leaving only ~2V to be 'dropped' by the MOSFET.

With the circuit continuously operating for eight hours with six LED's, none of the transistors were observed to increase in temperature, so no heat-sinking required.

The value of RV3 and R5 were manually selected (i.e different value components inserted into the test circuit and the result observed) to give an adjustment range for the light sensitivity in relation to the particular LDR used.

The observed frequency of the 555/PWM circuit was ~65Hz with the actual components used. To my eyes a slight 'flicker' could be observed. The frequency of the PWM for the LED is not critical. The lower frequency is limited by the human 'flicker fusion threshold' and this apparently is ~50-60Hz (which is why I could detect the slight flicker).

The upper frequency is limited as the LED's cannot turn on/off at arbitrarily high frequency and the MOSFET will start having switching losses (heating). Google search indicates upper frequency should be limited to a few kilohertz.


The garden path LED lights project is a relatively simple project and no particular difficulties, other than the usual care and attention required when constructing any electronic circuit, should be expected.

The enclosure was made using metal sheeting salvaged from a disused/broken cloths dryer (see the Photographs Section). Any other suitable enclosure can be purchased and or made from alternative materials.

A DIY printed circuit board (PCB) was used, however, there are relatively few components and veroboard or similar construction could also be done to simplify the construction if desired.

Circuit Enhancements

Reverse polarity protection for battery inputs would be a reasonable addition. However, using typical approaches such as blocking diode or PNP transistor/high-side switch have the disadvantage of the intrinsic voltage drop induced. In order to power the six LED's from the 12V battery source, this disadvantage of the additional voltage drop out weighed the polarity protection (for this one-off circuit/controller at least - just need to be careful when connecting!).

Another addition that was considered was detection of connected battery voltage, and then cutting of circuit function if the battery voltage was below a critical value. This would have the benefit of avoiding possible over-discharge of the battery which can cause damage. An op-amp comparator circuit or similar could be used for this additional functionality. However, the solar cell recharging regulator used for recharging the battery already has a low-voltage cut-off. So this function was not included as part of the garden LED lights controller.

If an op-amp comparator was to be used to provide low-battery voltage protection (e.g. for a 'stand alone' version that was not recharged by solar cell), and since op-amps are readily available as dual and quad packages, the light sensing circuit could take advantage of this by using a 'spare' voltage comparator instead of the voltage divider currently utilised as per the schematic.


Note: Image loading can be slow depending on server load.

Album 1: Breadboard Testing

Album 2: Completed Project

Album 3: DIY PCB production

Album 4: Salvaged LED's


Comments/Questions

No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.

X

Sorry!

Only logged-in users with Silver Membership and above can download.


Silver Membership is only $2, so join now!