How to use distance to alter LED power?

Jarl

Flashlight Enthusiast
Joined
Jan 11, 2007
Messages
1,745
Location
Southern UK
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!)
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
Don't forget the inverse square law of light...Might help

http://hyperphysics.phy-astr.gsu.edu/hbase/vision/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:
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.
 
Top