New ways of seeing things

Hi all, I am so excited about this. It may not be much to anybody else, but to me it is!

You all know how we only have the IR's or the Ultra sound to work with when we want to check distance? Yeah, if we have millions we can also get a camera or two, and laser range finders..

However, I wanted something cooler.

This is not that, I am sorry.

However, I am working on something cooler (I hope, but it may be far fetched), and when doing so, as a spin off I made this.

And it is pretty wicked, I think.

The setup is simple, as simple as you can see it on the video; An LDR (Light Dependent Resistor) is hooked up with a 330 Ohm (or something) resistor, to the analogue input of a standard Picaxe 28 board with no extra modifications.

Also a speaker and a "white" (pale blue they are) LED are hooked up to the standard outputs, batteries, and that is it.

At first you may think that I have done nothing special.. LDR detecting light, or maby just pulsating light.. but then why don't you try to replicate it? I am going to be very surprised (and my day spoiled) if you can make something that works like this! ;)

I have made an LDR measure distance!

There you go, for less than half price of a Sharp IR range finder, and twice as fun, as you can actually see where the robot is focusing!

I am so excited to hear what you all think of this, and to hear if anyone can figure out how I did it, so I am not going to tell yet, but I will make a walkthrough, and am planning to make a robot (Start here-kind of project) that will not drive over the table's edge, and will navigate just by this.

..And while I am at it, I think I may have a look at giving that robot the ability to sense colors as well, so it can find say a red object amongst green on a black surface.. and then it can play ball :)

Because color detecting is also a spin off by this method! (Not on the setup on the video, and I have not tried it in real life yet, but I am pretty sure, and am going to prove it soon :)

And if not for color sensing, then for coolnes: Yes, the LED can be red as well (or any other color, possibly even IR, though I have not tried it yet) In fact it was red when I made the original test, but I swapped it to a "white" so you should not think it was the difference in color that did it. The flash light on the video has 3 LED's of same type & color..

How did I do this? Make me happy, throw me a theory, or try to duplicate :)

Thanks (I will tell later, but here is a chance to take me down first ;) Did I mention it is working in sunlight?

I’m assuming it is pulsing
I’m assuming it is pulsing out light and detecting how long it takes until the light is reflected back (or how strong it is) and then figures out an approx distance?

I’m going to call you “Barnes Wallace” from now on

 

Here’s a theory…

No. That was before I saw the video. That’s not how it’s done. It’s definitely some really neat-o outside-the-box thinking, though.

I’m guessing once the LDR detects light, you start a timer, then switch the light off until the LDR no longer detects light, then figure out how long the light persisted. The longer it persists, the closer the reflective surface. If you used alternative samples as baselines for the subsequent ones, this would work in variant ambient brightnesses where the ambient light is weaker than the LED focal point.

How am I doing so far?

I dont know what you are opn
I dont know what you are opn about, and please stick to the subject, thanks!

Bouncing Bomb

Barnes Wallance invented the "bouncing bomb" which was dropped from a known height. The height was established by focussing two lights on a point on a lake and the aircraft was at a known height when teh light reflected back was strongest. Obviously this would only work for one given distance, though and you appear to have achieved a distance measuring thingy.

Both relevant and humorous, I thought.

How can anyone make Picaxe

How can anyone make Picaxe fast enough to detect the speed of light??

If we had that kind of speed in the procoessors it would be great. But as it is now, I think the ray of light would have to travel something across europe for the picaxe to have time to measure anything!

Thanks for guessing, wrong, please come again :slight_smile:

Well it is not it under all
Well it is not it under all circumstances :slight_smile: No better guess?

Strength and Speed

I thought “strength of reflected light” too but that can’t be it if it works in sunlight as well as the dark.

I doubt it’s measuring the length of time to reflect the light: With the speed of light being about 300 million metres per second, and the CPU (presumably a PIC) working at 20MHz, the smallest distance it could measure would be 60 metres (and that would also be its resolution: 60 metre steps).

Need more clues…

Are you switching the LED off when the LDR detects light?

When the reflective surface is not perpendicular to the light, does your sensor “think” it’s further away?

It’s not a geodimeter. The PIC wouldn’t be fast enough to measure the wavelength.

No lenses. No phase shift measurements. No interference patters.

I’m stuck.

 

A: That would be answred

A: That would be answred best by "yes and no" :slight_smile:

B:That would be answered best by "No but yes"

Sorry, it really is the best answers I can give.

Let’s see… You produce
Let’s see… You produce light of certain intensity, and the LDR “sees” it. Then you produce a bit less intensive light, and the LDR still is able to see it. Thus you gradually decrease light intensity until the LDR stops “seeing” it, and the last time you’ve caught the reflected light would roughly define the distance to the obstacle.
Now the question is, how you control light strength. My guess is you just produce “sounds” of different frequensies…

Another theory…

Looks awesome!! :smiley:

Another theory…

By using a 330 Ohm resistor you are causing a delay in the LDR enough to calculate the reflection distance… so instead the speed of light, you have something like the speed of sound !?

And, if you use the LED with PWM (instead of a steady light) and change the frequency, this slight change could be enough for the LDR, and he "knows" that the light wich is coming in his direction belongs to the LED

???

The closer you move the LED

The closer you move the LED to the LDR the greater the light intesnsity is and therefore the lower the resistance at the LDR. Intensity is a direct function of distance in this circuit and Bob’s your uncle.

As to the resistor value on the LDR… well, I would use a calculation something like this -

Vo = 5*RL / (RL+3.3) (taken from some old data sheets) to derive voltage (substitute the R value in koms for atenuation).

and then…

Lux = (2500/Vo - 500)/3.3 substituting the R value in koms as needed to atenuate the circuit. This calculation will give you intensity.

For better rejection, I might even create a pulse train similiar to that used on an IR reciever, because the picaxe could care less how the pulse train was recieved - but I don’t think that this circuit uses a pulse train.

no fair some of us were
no fair some of us were guessing while at work and unable to view the video :wink:

Wrong Fritsl

The speed of light isn’t the issue. If you do the maths you’ll find that light only travels a few tens of metres in the time that it would take a fast eight bit microcontroller to react, never mind one that operates in the hundreds of megahertz or gigahertz range. The limiting factor is actually the response time of the light dependent resistor which takes milliseconds to react to changes in light levels. However phototransistors and photodiodes don’t have that problem so you can use them instead.

 

My math is not as good as

My math is not as good as Casca’s.
and I am microcontroller challenged …

but I’ll take a stab at it… I think Casca got it at an “instant”, however, I think the circuit works on comparing two analog pulses. You’ve got the microcontroller sampling at some constant rate. The differences in the samples will give you a relative intensity value.

It would work well in different ambient light conditions, since the saturation is relatively constant, most sunlight and other bright sources would be filtered out, since your only sampling the differences.

maybe a little clever filtering in software too …

A twist on this would be to look for the LOW and HIGH of the LED switching OFF then ON - if you know when the LED is supposed to be OFF and when it is supposed to be ON, you can measure difference betweent the two intensities. The different intensities are propotionately related to proximity.

Just a shot in the dark :smiley:

GroG
my robots
my garden

You will find that light

You will find that light dependent resistors are more sensitive to green LEDs than other colours, so using a green LED would use less power. Other than that, you are right, the colour probably doesn’t really matter. (I corrected this after reading the Wikipedia article.)

Also, it would be more useful if you could get it to work under mains powered artificial lights.

I personally think this is
I personally think this is both a very good guess, and quite close. But that is not ment to be a hint, and it is a matter of interpitation of the right answer and this theory - I am sure many will think this is not the best answer. I just think that the thinking here is good, and the theory is on the right path, if you sort of see it as a matter of thinking outside the box :slight_smile:

To put it short; There is no

To put it short; There is no calculation of time / speed of light / delay involved in the most basic form, at the "oh is that really all"-place in here.

I would be too stupid to make anything like this, and I think the Picaxe would not be fast enough or precise enough to work with these things.

"The closer you move the LED

"The closer you move the LED to the LDR the greater the light intesnsity is and therefore the lower the resistance at the LDR"

That is right, and that is one parameter of how distance is measured here!

I do not understand the rest of your post, sorry.