Let's Make Robots!

LDR Cyclops - holding, scanning, seeking, recalling

Continuation from here.

Video straight from the camera to Youtube (Sorry Oddbot).


 Continued here.

ldr_eye_telescope_scanning.bas3.38 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Only one suggestion. Use a phototransistor instead of an LDR. They have a much faster response time and they have a lens built in. Different models have different lenses for narrow or wide angles. Most are only sensitive to IR but you can get some with sensitivity in the visible spectrum. A single additional transistor can be used to boost sensitivity if required.

Could you explain your data a little more, I'm having some trouble.  Is it 2 runs?  brightest (dark)?

Have you tried moving it to a different location then moving it back and seeing how close the fingerprint is?

How are your math skills for convolution and matching ?  

Have you done some experiments on "blindly" trying to position your LDREye from just the data?

Holy Stereopsis Batman! - have you done ranging to the brightest or darkest point?  Come on rik, I'm on the edge of my seat !

You are looking at two sets of data in one graph. One set called "dark" and the other set "lamp" It's the actual sets from the video. The dark set is without desk lamp lit. The other one has it turned on.

At servoposition 80 (that's pulses to RC servo of .8 ms) the scope looks far right (from scope's pov). As it turns toward the left (2.2 ms pulses), you see the light levels increase. Dead center (150 or 1.5 ms) you see that light levels between the datasets start to differ. The desk lamp starts to get noticed.

The blue graph has a peak at position (azimuth) 171 (square in the graph). The orange peak is later in the scan, or further to the scope's left at pos 208. It is also brigher. That's where the scope is staring the desk lamp in the face. Or rather, starts to look it in the face. The peak is three readings wide, of equal brightness 19. The code notes the very first of these three as the ultimate brightest reading. This comes from the
if voltage > brightest then...
Had that comparator been a ">=" aka "greater or equal than", it would have found the last reading to be the brightest.

In order to make it find the middle one of the three, I would have to smarten up the code. First find the right most and left most, then take the average of those positions. It's easier to just enhance the LDR resolution in the ADC or tuning the potmeter. That way no two adjacent positions would ever read the same voltage.

Notice the significantly brighter readings at the rightmost position (80). Both sets show outlyers there and nowhere else. The orange outlyer being much further out of line than the blue one.

I suspect this is the delayed effect of the LDR. It just turned fat from left back to right. In this case (check levels at 220) from bright to dark. The telescope still "sees spots before its eye". More so from looking almost directly into the sun (desk lamp).

One more reading into the left, the effect is gone. I guess 300 ms is plenty if waiting time, given these lightlevels, just not when adjusting from bright desklamp to dark operator sweater.

Not yet. But that IS what this is all about. But first I want hi resolutions scans over lenthgs of time. Just to get a feel of the informational challenge we're up against here.

In other words: I want scans like this one for every room in the house, for every hour of the day/night. And then see what the natural variations are.

Oops, my TJ parts all arrived today... Fat change homeboy!

No I have not. Turn To The Source Grog. RTFC.

I guess a "Four Eyes" Mintvelt construction would be required. Or a single eye sliding left to right (and then turning to reaquire the target). Angular difference between two readings would lead to range. Geometry is easier than integral calculus.Even in a Picaxe I guess.

I suppose a mobile platform (robot anyone?) would be bale to range a light source (or dark source) the same way a sailor ranges a light beacon. Recognising the stationary object is off course crucial, as is good sensing of traveled distance between readings (taking bearings). I suppose a robot could decide not to take its eye off of the beacon. A sharp transtition dark-light would probably be easiest to code for.

Not sure what you mean by that. The current seeking routine wil scan right to left in steps of 5 (from 80 - 220). Then return to the brightest step in that sequence and turn back 9 servobits. Than scan 18 bits / servopositions in steps of 1. The position (azimuth) with the brightest rteading is noted.

The servo is then slightly beyond the brightest point (unless situation has changed on him). It will "prove" that is has found something by pointing at it. In this case it first points at a lamp on the ceiling, later at the desklamp. That pointer behaviour is based on the psition stored in memory.

Are you kidding me?


Are you F'ing me?


Are you F'ing kidding me!?

Thats a cool model rocket you've got mounted on that block of wood. It needs a nose cone and some fins :p

Seriously though, the lens and tube is the same setup I used for my laser rangefinder. The big problem I found though is that it was big.

If you are using an LDR which is very sensitive to light then could you not get as good a results by placing it in the back of a small tube like Chris did with Walters IR beacon receiver? Sensitivity can also be adjusted by changing the value of the resistor in series with the LDR. Using the ADC in 10bit mode also amplifies the sensitivity by a factor of 4. 


Yes it is way big. The lense has a fixed focal length. It was the only lense I could buy for money I was willing to throw on top of a totally different more important purchase (Polymorph!). I think I got like 25 for a GBP.

The diameter of this lens happens to fit a cartboard roll as found in toilet paper. This may be less of a coincidence then first thought: it was produced with education to kids in mind. Wich suits me. I am just as frugle as they are.

The big lense does not serve to focus an image. It serves to collect more light in dark environments. There is the difference with the camera obscura you are suggesting. Makine the "pinhole" in a CO smaller, will reduce the amount of light entering. Making the hole bigger, will widen the angle of observation.

My telescope can make out a single bit (out of eight) LDR difference at the angular resolution of my servo (180 / 140 ~ 1.3 degrees). Without the lense that would be widened to say 7 degrees. At the same time, the light levels on the LDR would reduce.

I could put two LDRs on the bottom of my tube. Touching each other at the optical center. That might increase angular resolution by another factor of two. Whether anyone needs such resolution remains to be seen. The same goes for 10 bit LDR resolution. I am indeed using a 10-turn 250 Kilo Ohm pot to tune for prevailing light conditions. I could have turned it up, so I would utilize the whole 8 bit ADC on a single desk lamp. But it is now set for daylight conditions in my lab.

Impatient as I am I grudgingly allow for 300 ms per reading for the LDR to settle. The thingey needs time to regain its resistance one the light goes away. Probably a lot more than 300 ms when going from daylight to pitch black.