Click to visit Lumintop new flashlights!
Results 1 to 12 of 12

Thread: How to use distance to alter LED power?

  1. #1
    Flashaholic*
    Join Date
    Jan 2007
    Location
    Southern UK
    Posts
    1,745

    Default How to use distance to alter LED power?

    So I was thinking, is there any way to link a distance measurer to LED current? i.e, something 20 metres away, LED current is 650ma, something 2 metres away, LED current is 150ma and 30 metres gives 1000ma to the LED. I've no experience with circuits, would this be possible? (or even, practical!)

  2. #2
    *Flashaholic* Mr Happy's Avatar
    Join Date
    Nov 2007
    Location
    Southern California
    Posts
    5,390

    Default Re: How to use distance to alter LED power?

    There's always a way.

    It seems like you want to adjust brightness according to how far away the target is.

    A reasonable way to do this would be to fit a reflected light sensor on the front of the light. If no light is reflected back the light comes on at full brightness. However, if a lot of light is reflected back (e.g. you shine the light on something a few inches away) the light output is dimmed to reduce dazzle.

    This would be a reasonably simple circuit to come up with I think, for someone familiar with electronics.

  3. #3
    Flashaholic*
    Join Date
    Jan 2007
    Location
    Southern UK
    Posts
    1,745

    Default Re: How to use distance to alter LED power?

    Quote Originally Posted by Mr Happy View Post
    There's always a way.

    It seems like you want to adjust brightness according to how far away the target is.

    A reasonable way to do this would be to fit a reflected light sensor on the front of the light. If no light is reflected back the light comes on at full brightness. However, if a lot of light is reflected back (e.g. you shine the light on something a few inches away) the light output is dimmed to reduce dazzle.

    This would be a reasonably simple circuit to come up with I think, for someone familiar with electronics.
    Although that would work, I'm planning to use it as a helmet mount while mountain biking, so chances are there'd be interference from my bar lights. I mean, your circuit would be fairly simple- LDR and a driver which varies output according to resistance and play around with fixed resistors to give the correct change, but I'm not so sure if it would work because of the bar mounted lights.

  4. #4
    *Flashaholic* Marduke's Avatar
    Join Date
    Jun 2007
    Location
    Huntsville, AL
    Posts
    10,117

    Default Re: How to use distance to alter LED power?

    It might be possible to somehow wire in a cheap rangefinder into a light. I know they make <$100 construction ones that are meant to measure across rooms. Somehow tie into that circuit could work.

    Good luck trying though, that project would be far beyond my patience.

  5. #5
    Flashaholic* gallonoffuel's Avatar
    Join Date
    Mar 2008
    Location
    Northern MD
    Posts
    560

    Default Re: How to use distance to alter LED power?

    Depending on the distances involved, a small radio transciever could be coupled with a PIC controller to do this. I've used these relatively inexpensive devices before, but for a class project using a DSP board. I never got it to be accurate further than a few meters though, so if you want to range something say 15 feet away or more, this solution would not be ideal.

  6. #6
    Flashaholic*
    Join Date
    Jan 2007
    Location
    Southern UK
    Posts
    1,745

    Default Re: How to use distance to alter LED power?

    Ideally I'd be doing distances 0.5 metres (2 feet or so) to 30 metres (90 feet). On ebay, all the cheaper ones have lower max. ranges (60 feet), and are probably more designed for use against a flat wall which will definitely reflect the sound, rather than bouncing off a couple of bits of grass and a bush.

  7. #7
    *Flashaholic* Mr Happy's Avatar
    Join Date
    Nov 2007
    Location
    Southern California
    Posts
    5,390

    Default Re: How to use distance to alter LED power?

    That's partly your trouble though. Distance to what, exactly? When outside the ground is close to the front wheel but also stretches off into the distance; then there are trees, fences, parked cars and other obstacles all around. I'm really not sure you could do anything that would be more useful than annoying.

    I hardly know any automatic thing that I find convenient. Self-cancelling indicators on cars always cancel just when you don't want them to, and automatic transmissions always select the wrong gear. Automatic focus on cameras frequently focuses wrongly, and automatic exposure often gets it wrong too.

    I think I'd rather have manual settings.

  8. #8
    Flashaholic* Stillphoto's Avatar
    Join Date
    Mar 2005
    Location
    Orange County
    Posts
    1,213

    Default Re: How to use distance to alter LED power?

    Don't forget the inverse square law of light...Might help

    http://hyperphysics.phy-astr.gsu.edu...sion/isql.html

    In layman's terms, at twice the distance you're getting a quarter of the light.
    Time flies like an arrow, fruit flies like a banana.

  9. #9
    Flashaholic* MrAl's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    3,071

    Default Re: How to use distance to alter LED power?

    Hi there,

    Measuring reflected light may be a problem because objects tend to vary
    greatly in their reflectivity. This means bright objects would look close and
    dark objects would look far away, even if both are the same distance from
    the observer.

    Another way is to use one of those ultrasonic sonar detectors made just for
    the purpose of measuring distance, and couple that to a PIC or other uC and have
    that drive the LED.
    I cant remember now but maybe i saw one on the Parallax site...
    It's a raw detector that puts out a signal that is related to the distance
    between the detector and the object, along a straight line.
    You'd have to test it on various objects however to make sure it worked right.
    Im sure it will work on a brick wall, but not sure how it would work on say
    bushes.

    Another way is to use a BW camera and IR light source. Would take a bit
    of experimentation however.
    Take care,
    Al
    LED's vs Bulbs, the battle is on.
    My bumper sticker: "I Brake for LED's"
    To err is human, to theorize divine.

    Got Light?

  10. #10
    Flashaholic* 2xTrinity's Avatar
    Join Date
    Dec 2006
    Location
    Arizona
    Posts
    2,383

    Default Re: How to use distance to alter LED power?

    Quote Originally Posted by Stillphoto View Post
    Don't forget the inverse square law of light...Might help

    http://hyperphysics.phy-astr.gsu.edu...sion/isql.html

    In layman's terms, at twice the distance you're getting a quarter of the light.
    Worse than that even. Your light will spread out as an inverse square, then the light reflected off your target will ALSO diminish with the inverse square. So light returning to you is actually proportional to the inverse 4th power of the distance.

    Essentially, you're most likely going to want something that runs at 100%, but only reduces output if it detects "glare". Imagine the frustration if you're in a lit up room, but trying to light up a small corner of the room that's in the shadows. Your automatic sensor picks up a lot of light, so dims the output -- the exact OPPOSITE of what you want. The only time you want dimming is if your hotspot is much brighter than your surroundings causing a dazzling effect.

    In order to do this, you need at least two sensors. I built a crude "glare detecting" LED once, using two photodiodes -- one diffused, and pointing away from the emitter to detect ambient light. The other pointed so as to detect incident light. They were then fed into a difference amplifier, which was fed into the control loop on a buck converter. If the ambient sensor voltage was significantlt LOWER than than the hotspot sensor, current to the LED was reduced. I never followed up with tuning it etc. but hte concept did work.
    Last edited by 2xTrinity; 06-06-2008 at 03:25 AM.

  11. #11
    Flashaholic* Stillphoto's Avatar
    Join Date
    Mar 2005
    Location
    Orange County
    Posts
    1,213

    Default Re: How to use distance to alter LED power?

    Well yeah 2xT, just depends on which direction the meter is pointing, reflective or incident.
    Time flies like an arrow, fruit flies like a banana.

  12. #12
    Flashaholic*
    Join Date
    Jan 2007
    Location
    Southern UK
    Posts
    1,745

    Default Re: How to use distance to alter LED power?

    been bouncing some PM's with znomit, and he suggested some sort of angle sensor- the idea being, when I'm looking down at my front wheel and I want dimmer output, the angle sensor does it's stuff, and when I'm looking up, angle changes ->change in output. Noise from bumps, and hills could be an issue, though if someone does a fluid filled angle sensor that'd eliminate the problem of noise to some degree, and some sort of sliding resistor to give me some flexibility over the brightness while going up hills would be good too.


    Although I agree that auto isn't nearly as good as doing it myself, this is one thing that while riding I can't do myself, and it would greatly help if it were implemented. When you have 2000 lux falling on ground lighted by 700 lux, you tend to loose some definition.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •