WARNING
ALL STANDARD DISCLAIMERS APPLY.  THIS DESIGN WILL NOT WORK FOR YOU, DON’T BUILD THIS.  THIS IS NOT FOR BEGINNERS. YOU OR OTHERS CAN BE HURT OR KILLED.  I AM NOT RESPONSIBLE FOR ANYTHING.  EAT YOUR VEGETABLES.  DON’T BELIEVE EVERYTHING YOU READ ON THE INTERNET.
TURN OFF THIS COMPUTER NOW.

Problem
I am beginning to have need of additional lighting in my house.  A few years ago, my eyes started to show age, and this is not a trend I expect to reverse itself.  It’s the 21st century, I’m bored with snapping on and off light switches as I move from room to room, so I’m building a few lamps I can use.  These will be especially helpful in stairwells, but also in my basement.

Goals

  • Motion activated – this is pretty easy, if nothing in the area is moving, it probably doesn’t need to be illuminated.  This also implies adjustments for sensitivity (will it trigger for me, a cat, or a mosquito) and delay (how long does it stay on after triggering).
  • Ambient light sensor – no point turning on a lamp when there’s already enough light
  • Energy efficiency – uses pennies worth of juice each year.  Ideally, this works during a grid power outage, and/or is completely self sustaining through auxiliary power generation devices like solar panels, a micro-windmill, or a windbelt humdinger.  It should be bright enough to keep me from tripping over laundry, not for reading.
  • Solid state – no maintenance required other than occasional dusting.  Zero recurrent costs.

Vision
Create a device which triggers one or more high-brightness white light LEDs.  Device will use low voltage DC power supply, centrally located to supply multiple devices throughout a house.  Device will be installable using a circular hole saw through existing drywall, power supplied through in-wall wiring.

Design

The schematic accommodates  a dual output (+3.3V, 3 – 4 V adjustable, max 1 amp each side) power supply chip, an ambient light sensor phototransistor, the Zilog ePIR (infrared) motion detector module, three trimmers for the module control (detector sensitivity, triggered ‘on’ time, and ambient light level), a0.1 Farad aerogel power filter capacitor, the Cree XLampXP-E LED, a normally-closed optically isolated MOSFET, an N-channel power MOSFET, a PTC (thermally active resettable fuse), a power diode, and a handful of passive support components.

This is a circuit board designed with CadSoft Eagle .  The motion detector is a Zilog ePIR module, which is quite cheap (for what it does) and very simple to use.  After a bit of reading online, I’ll be using Cree XLampXP-E (group Q5) LEDs.  There will be a fairly good power supply on board, so the circuit will need about 5.5 – 7 relatively clean DC volts at half an ampere.  Also included is an ambient light detector (the light doesn’t need to be turned on unless it’s dark), and opto-isolation between the trigger logic and the relatively high-power LED.  The LED voltage can be adjusted between 3 – 4 volts, and there is a PTC device which may help protect the LED from overload.  The Cree LED is rated for 700mA, but I’ll be running it at 400mA.

According to a very brief internet research performed by me while mildly intoxicated, a 60 watt standard Edison light bulb puts out about 900 lumens.  I’ll be using 1.3 watts to drive a 107 lumen LED at around 110%, so about 1/8th the output of conventional lighting at 1/40th the power.  Since I’m driving the LED at 4/7ths of it’s rated maximum, so it should last a long, long time:  “Based on  internal  long-term  reliability  testing, Cree projects  royal blue, blue, green and white XLamp XP-E LEDs to maintain an average of 70% lumen maintenance after 50,000 hours, provided the LED junction temperature is maintained at or below 135°C and the LED is operated with a constant current of up to 700 mA”.   Heat is a big factor, the luminosity ratings drop precipitously with heat, especially with the white ones.  For this, I have designed for a heat sink on the back of the board.

So I’m prepping to make 6 units.  I’ve ordered the parts from Digi-Key , $195.86 + shipping.  Circuit board manufacture: 7 boards from Sierra Proto Express with 10 day turn-around, $189 (provided I don’t screw it up totally and the boards can actually be used).  I can also expand this circuit to use multiple LEDs in a grid, I just have to increase the amperage and the thermal handling.  I can definitely see making 8 or 12 LED units if I like the way this works out, something that mounts on or in an existing drop-ceiling acoustic tile would be neat.  I can add in a battery charging and backup circuit, a small 6-volt motorbike battery should power a few LEDs for hours.

At ~ $70 each, I hope these live up to their ‘mean time between failure’ specifications.

Here are the gerber files I submitted for manufacture: HouseLEDs-01d.zip.  See license below.

January 13th, 2010 – sweet savior on a pogo stick but Digi-Key and the United States Postal Service are fast.  The parts are here.  I swear those 0603 capacitors are the size of a mosquito’s nose, but I have faith that I have the tools that can do it.  Or… make a big honking expensive mess trying .  The Zilog modules are cool, the LEDs were humidity packed, and the aerogel caps are scary small for their rated power.
Sierra Proto Express
gave me a call, very kind of them.  Aparently they have a service where they’ll put on the more complicated parts, which makes fairly complex single-board computers a distinct possibility for me, since some of those high density quad flat packages use very very fine wires.

POV-Ray generated with Eagle 3D

Wednesday, January 27th, 2010Sierra Proto Express says the boards have been shipped, and they’ll be here in time for me to work this weekend, so I should know soon if this design has any merit to it.  I’ve made this board pretty much just on math, I didn’t do any testing… so I’m interested in finding out just how close to reality are my limited electrical engineering skills.

Thursday, January 28th, 2010: YAY for Fedex who got the PCBs here a day early.  I’ve built one of them and it works… except…

There is one error.  The MOSFET leaks a small but significant amount of current.  The MOSFET gate switches from 0.01 to 3.29 volts pretty cleanly when the detector is triggered, but there’s just enough leakage through the MOSFET that the LED doesn’t go completely off… so it lights up with just a slight glow even when there’s no motion detected.  It’s such a small amount that I’m not sure I’m worried about it, but I’ll measure how much current it’s leaking when I build the second one.  I’m guessing it’s only a few milliamps.

Saturday, January 30th, 2010: I made the other 5 lamps.  It was difficult, my hot air pencil is not heating properly, and two of the LEDs cracked the lens as I was heating them.  The little clear drop of plastic on these Cree LEDs is not actually solid, but kinda like a very stiff silicon gel, and when heated unevenly, it will shatter off a shard.  They still work, so I live and learn, but at $5.61 each, I was slightly disappointed.  Nobody is at fault, these are not designed for hand assembly, and I am making a modern high-efficiency silicon crystal lamp using stone knives and bear skins.

At least they’re all wired and assembled, all components are showing correct function, at least as designed.  Not the kind of work I can do a lot of, my eyes are pretty sore.  The error is more severe than I had hoped, and it doesn’t quite make sense to me.  The optoisolator pulls the MOSFET gate below the 1V minimum gate threshold voltage (I’m measuring 0.003V), and the Zero gate voltage drain current (per the data sheet) is 100 uA.  This sucka seems pretty darned bright already to be running at 0.1 milliamps, so I must be missing something.  An LED capable of generating 107 lumens at 350mA still glows fairly bright when a MOSFET leaks current of 0.1mA?  I don’t ‘get’ it. ‘On’ the MOSET voltage source/drain drop is 0.58V, ‘off’ it’s 0.09V (with a lamp voltage of 3.16V).

At any rate, here are the updated final assembly notes:

  • Assemble the left side of the schematic (the power supply), including the power diode (D1), the voltage regulator LX8116 (Q1), and the voltage adjustment (R3), but skip the big power cap (C1) for now.
  • Apply power.  Ensure voltage across C1 is VDC minus the forward voltage drop of the power diode (D1).  I’m using 6.00 volts, the cap voltage measured 5.35 volts, for a diode forward drop of 0.65V.
  • Adjust R3 (LED voltage adjustment) fully clockwise, measure the LED voltage, rotate fully counter-clockwise and measure again.  Full clockwise is low, I got 2.74 volts; full counter-clockwise is high, I got 4.10 volts.  Leave it fully clockwise at the lowest voltage.
  • Check the voltage at pin 5 of the voltage regulator to be 3.3V.
  • Disconnect the power.  Attach/solder all components except for the PTC.  Watch the polarity on the light sensor (Q3) and the optoisolator (OPTOMOS1).  The LED has a tiny little + on the side that goes towards the voltage regulator.  The longer pin of Q3 goes to ground, and the marking dot on the optoisolator goes towards the center of the PCB.
  • Apply power and ensure that pin 3 of the Zilog e-PIR can be adjusted from 0 to 1.6 volts with the delay trimmer (R7), at top-right.
  • Apply power and ensure that pin 4 of the Zilog e-PIR can be adjusted from 0 to 1.6 volts with the sensitivity trimmer (R5), at top-center.
  • Disconnect power.  Turn all 3 motion detector trimmers fully clockwise, this turns sensitivity to full, delay to several minutes, and negates the effect of the ambient light sensor.
  • Attach a heat sink to the back of the PC board.  Be sure not to short or come too close to one of the through-hole pads.
  • Configure an ampmeter (1A scale) across the SMD pads for the PTC. Don’t look at the LED, in fact, you might want to put a piece of tape over it during adjustments. Apply power, and employ a comedy troup of dancing clowns to trigger the motion detector.  Slowly rotate the voltage adjustment trimmer (R3) counter-clockwise until the LED is drawing 400mA (0.4A).  The power supply will go higher than 700mA, but you’ll eventually burn out the LED, so DON’T DO THAT and turn the trimmer very SLOWLY.  You can adjust this upwards to 500mA, but that’s the holding voltage for the PTC, so if you wish to use a load between 0.5A and 700mA, replace the PTC with a higher value, or a piece of wire.
  • Remove the ampmeter.  Measure the LED voltage from the voltage regulator at the PTC SMD pad.  This is the maximum voltage you should use on this LED.  Make a mark on R3 so you don’t go over this voltage.
  • Turn off power and install the PTC (or wire shunt).  Turn all 3 motion detector trimmers fully counter-clockwise, we don’t want the motion detector to trigger at this time.  Apply power, and the LED will still show some light.  Adjust the LED voltage trimmer (R3) clockwise until the ‘off’ state amount of light from the LED is tolerable.  The ‘on’ state will still be plenty bright.  You can also force the MOSFET off by shorting pins 3 & 4 on the outside of the optoisolator.

I found the LED to be very bright (almost painful) at 400mA, and given this load it should last a long, long time.  Using less amperage should make it run even cooler and last longer.  The heat sink I used became slightly warm pretty hot when the lamp was running for few minutes an hour, so I think the heat dissipation is adequate at this load.  All bets are off when running above 70 degrees Celcius, that’s the super critical overload evacuate all personnel meltdown imminent temperature.

Actual PC board
This is the actual manufactured PC board, for comparison to the ‘drawing’ above.

Heatsink on the back
Here is detail on the heat sink on the back, and yes, it’s supposed to be a little off-square so the voltage regulator gets a little better coverage, but none of the through-hole pads is covered.

The 6
The ‘6’

Build summary
I could have probably used cheaper LEDs and just powered them through the optoisolator if I’d known the ‘off’ state was going to be a problem.  In the future, I should use a real LED driver with a ‘PWM/Enable’ pin instead of a switched MOSFET.  This was fun to make and it works, but I learned a few things making mistakes.  I’ll make another post in the future when I get to installing them in the house.


Creative Commons License

Copyright (c) 2010 MDVE.NET. Some rights reserved.
This design is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License .

3 Responses to “House lights”
  1. Thorium Lasagna?

  2. Hi uncle! That sounds really cool. I wish I had motion detector-activated LED lighting at home. It sounds like quite a project!

    Tthe professor who invented white LEDs works at my campus and they just built a new wing of a building for solid state lighting. However, the recession started after they signed all the contracts, and they had to downgrade as much as possible, so the building wing is now being finished up with ONLY offices, and no labs or bathrooms.

  3. Hi Viva! This is very cool, thank you for the comment. I’m working on another circuit to replace the overhead fixture in my study in a 1965 house. I’m aiming for 1800 lumens, PWM dimming, and home automation interface. It’s a bit pricey, but will clearly pay for itself provided the LEDs live up to their specs. I value lifetime resilience just slightly over cost, which is always an object. If you have any tips on where to get good ones, I’d greatly appreciate the input. I might cop out and start buying overruns on Deal Extreme

    Hey, ask your prof if he’s got any early white LED prototypes lying around…. preferably one the size of a garbage can lid and puts out a spotlight like the top of the Luxor in Las Vegas.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2010, Multi-Dimensional Visual Echo. All rights reserved.
concern-kittycornered