Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 14th May 2008, 10:44 PM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default Wall Following Sensor, variable voltage to IR LED.

This afternoon I have been thinking about a wall following sensor to help a robot navigate a maze. They are popular in the robot vacuum cleaners but not so much elsewhere.

For the purpose of discussion the robot wil run in a maze with paths up to 10 inches wide. I want to point a narrow beam IR LED at the wall next to the robot. If the robot is parallel to the wall the beam will come back as a uniform cone. Reflected cone size will indicate the distance from the wall. When the robot is crooked the beam will be distorted. This will be detected by a line of photo-transistors ahead of and behind the emitter.

I can get about 9 photo-transistors to an inch and more if I stagger them. It is my hope that about 10 on each side of the emitter will be enough.

The problem that is bugging me is that I need the uC to control the voltage going to the IR LED in addition to modulating it at 40KHz. Let the computer pick the intensity that works best.

The first thing that comes to mind is to PWM the high part of the 40KHz, use a capacitor to smooth out the voltage. Can this work or is it too choppy.

A digital pot could be used if one could be found that handled the current (should not be a problem) and the correct resistance range. The smallest resistance pots from microchip are about 0 to 5K.

Maybe use a digital pot with an opamp. If it was setup right once could have all the pots steps in a useful range.

Suggestions?
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker
3v0 is online now   Reply With Quote
Old 14th May 2008, 10:49 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Wouldn't it be easier to use a Sharp IR distance sensor?
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 14th May 2008, 11:04 PM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default

Quote:
Originally Posted by blueroomelectronics
Wouldn't it be easier to use a Sharp IR distance sensor?
They work differently. They figure the distance by the angle at which the light comes back to the reciever. That only provides distance.
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker
3v0 is online now   Reply With Quote
Old 14th May 2008, 11:08 PM   (permalink)
Experienced Member
 
Torben is a name known to allTorben is a name known to allTorben is a name known to allTorben is a name known to allTorben is a name known to allTorben is a name known to all
Default

What about using two of them and comparing the distances returned? That should give both the distance and the angle, assuming the resolution is good enough.

I don't know how that compares in terms of final part count and cost, though.


Torben
Torben is online now   Reply With Quote
Old 14th May 2008, 11:10 PM   (permalink)
Experienced Member
mneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of light
Send a message via AIM to mneary
Default

If you PWM the high side of the 40 KHz, the peak output won't change. This might make PWM less effective than it would initialy seem. I would use a digital pot or just resistor ladder as the control element in a single-transistor current source.

When the bot is crooked, you might not get what you expect. The cones of the detectors will point in the same direction as the emitter. Draw some pictures and you'll see what I mean.
mneary is online now   Reply With Quote
Old 14th May 2008, 11:13 PM   (permalink)
Experienced Member
mneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of light
Send a message via AIM to mneary
Default

Unless you're using 40 KHz filtered sensors, why are you modulating the LED at 40 KHz? If it's just to save power, remember you only need to light up the LED when you want to take a reading.
mneary is online now   Reply With Quote
Old 14th May 2008, 11:39 PM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default

Quote:
Originally Posted by mneary
Unless you're using 40 KHz filtered sensors, why are you modulating the LED at 40 KHz? If it's just to save power, remember you only need to light up the LED when you want to take a reading.
No receiver, just plane Jane photo transistors. I was planing to use the 40KHz to reject stray light. Thinking I can get by without it?

Maybe the first post was too long and is not getting read.

There is a line of photo transistors about 3 inches long with a single IR LED in the center. When the IR beam strikes the wall it bounces back and hits the photo transistors.

If the robot is not crooked the same number of detectors on each side of the LED will be illuminated.

If the robot is crooked the line of photo transistors nearest the wall will have fewer illuminated. More on the end further from the wall.

Even the short version is long.
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker
3v0 is online now   Reply With Quote
Old 15th May 2008, 12:05 AM   (permalink)
Experienced Member
mneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of lightmneary is a glorious beacon of light
Send a message via AIM to mneary
Default

40 KHz alone won't reject stray light. You'll need to do something active to subtract out the ambient. At 40 KHz this will be difficult without active filters (like in the typical 3-wire IR sensor package.) If you measure ambient of all your photo detectors and then measure again with the LED on, the comparison will tell you who is illuminated.

I'm expecting that when the bot is crooked the lower intensity on the end further from the wall might reduce the number of photo detectors that detect above their threshold.

I'm thinking that a single detector with ambient measurement and multiple LEDs would be easier to perfect.
mneary is online now   Reply With Quote
Old 15th May 2008, 12:07 AM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

Have you considered the cones of the receivers as suggested by mneary, if you think of the receiving diodes as emitters then the overlap of the cones produced will stay the same no matter what angle the wall is.

Mike.
Pommie is offline   Reply With Quote
Old 15th May 2008, 12:22 AM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default

Quote:
Originally Posted by Torben
What about using two of them and comparing the distances returned? That should give both the distance and the angle, assuming the resolution is good enough.
I don't know how that compares in terms of final part count and cost, though.
Torben
After hearing the same think from you and Bill I went back and check again. The sharp IR distance sensors do not seem to function at distances short enough to be useful.

I did find a non-analog sensor that goes active at 5 cm. Digikey has them GP2Y0D805Z0F for $3.25 each. One could use them as electronic wiskers with one on each side of the robot. If one did a slight S path so that the sensor toggled frequently it could work. It may be hard to aquire the wall to start with.
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker
3v0 is online now   Reply With Quote
Old 15th May 2008, 12:49 AM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default

Quote:
Originally Posted by mneary
When the bot is crooked, you might not get what you expect. The cones of the detectors will point in the same direction as the emitter. Draw some pictures and you'll see what I mean.
Quote:
Originally Posted by Pommie
Have you considered the cones of the receivers as suggested by mneary, if you think of the receiving diodes as emitters then the overlap of the cones produced will stay the same no matter what angle the wall is.
Mike.
Not to say that I am right. But I did some sketches to convince myself that it could work. The IR LED is non diffused. There is bound to be some scatter and reflections but I think the majority of the light should follow the lines of the cone.

I am thinking of this like a very low resolution digital camera. Each photo-transistor can only sense light that strikes it, It can see everything it its cone/field.

The graphic shows what I mean. The light from the LED hits the edge of the right (green) photo-transistors cone but does not hit the transistor itself.
Attached Images
File Type: jpg wallsensor.jpg (8.4 KB, 14 views)
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker
3v0 is online now   Reply With Quote
Old 15th May 2008, 04:05 AM   (permalink)
Experienced Member
arhi is just really nicearhi is just really nicearhi is just really nice
Default

3v0, interesting idea, but, big issue is fighting the ambient light. if you use modulated signal and IR receiver then you will solve the ambient light problem (mostly) but then you cannot measure the intensity of light on each receiver (as all those I saw have digital output). with receivers stacked close to each other, I do not see how you will achieve resolution you need. I still think that sonar approach would be better. The ultrasound transducers are not expensive, the sound is quite slow so you can have pretty good resolution even with 4MHz uC. If you mount send/receive capsules on a motor and swing them around (180 degrees should suffice) you can get pretty good idea on what is the exact position of the wall related to the bot. I'm working on the exactly the same idea at the moment and have it all "work" in theory, but had no time to drive to the shop and get the us capsules so I can actually try the idea out.
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 15th May 2008, 04:18 AM   (permalink)
Experienced Member
arhi is just really nicearhi is just really nicearhi is just really nice
Default

one addition to the previous post. I tried out the 6 receivers 2 transmitter circuit. Basic theory is
Code:
while(1){
  both led's off
  catch "sense" from all 6 receivers
  led1 on, led2 off
  catch "sense" from all 6 receivers
  led1 on, led2 on
  catch "sense" from all 6 receivers
  led1 off, led2 on
  catch "sense" from all 6 receivers
  compare state of all 6 receivers in all 4 stages (00/01/10/11)
  output decision
}
and I was not satisfied with results. Then I tried something completely different, one IR LED, and one IR Receiver, 1K resistor in series with the LED and variable resistor 0-100K also in series with LED. Reading values from the Receiver with different "positions" of the variable resistor determines the "distance"... It works (I was manually changing the resistor value, as I only wanted a proof of concept) nice, but without enough resolution and with different behavior on different surfaces, so, if you try to keep 10cm from white wall, it will go 3-5cm near black wooden sofa. After all this I decided to try out the ultra sound .. it is pretty much the same as with IR .. the transducers I can get here are 40KHz, so the same freq as IR Receivers I have, the only addition is that I need to make a small 40KHz signal demodulator and amplifier but I believe I can google that one out (no way I can design it myself, toooooo much analog for my taste/knowledge)
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 15th May 2008, 10:25 AM   (permalink)
3v0
Moderator
 
Blog Entries: 3
3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold3v0 is a splendid one to behold
Default

arhi,

Why do you prefer US or IR? I have never used the US.

I have not settled on a single approach. I need to teach students how to do this next year and intend to present several methods that work. When class starts I will need several of robots equipped with maze capable sensors so keeping the cost down is an issue.

My original idea was to use little SMD PTs (photo-transistors) to form a strip of sensors. They are only about 1/10th inch wide so they can be packed together. The PT's could be mounted in the bottom of a flat black U with the open side facing the wall to reject much of the stray light. I like the idea that this sensor provides an angle but it is starting to look too complex for what it does. Just the same it is interesting. Some of the dsPIC33's have 24 and 32 analog inputs. That and the massive processing power could be fun.

--------------Slightly different IR sensor project. -----------------------
I built a PCB with a single IR receiver and 6 IR LEDs. It was not intended for wall following. The idea is to use overlapping IR LEDs to detect objects in an arc ahead of the robot. Each LED overlaps it neighbor by 1/3 so that you end up with about an 120 degree arc with 11 detectable zones. The beam width and placement of the LEDs need tuning but the diagram shows the idea. The arc needs to correspond to the Sharp sensors sensitivity area.

I need to do the variable resistor bit you were playing with but have not yet made any provisions for it on the board. I figured I would get the basic detection working first and then experiment to see if I could get the variable power to the IR LED working for range detection.

This sensor was not intended for use in a maze but it might work if the power level range detection thing works close in.

Quote:
Then I tried something completely different, one IR LED, and one IR Receiver, 1K resistor in series with the LED and variable resistor 0-100K also in series with LED. Reading values from the Receiver with different "positions" of the variable resistor determines the "distance"... It works
What sensitivity/(distance resolution) did you get? What is the shortest distance you could measure?

EDIT: Lost attachment. I am not a big fan of the pivoting motor mounted sensor.
Attached Images
File Type: jpg 11zone.jpg (55.2 KB, 8 views)
__________________
search engine for electronic parts
Junebug USB PIC programmer kit. USB Bit Wacker

Last edited by 3v0; 15th May 2008 at 10:35 AM.
3v0 is online now   Reply With Quote
Old 15th May 2008, 11:17 AM   (permalink)
Experienced Member
arhi is just really nicearhi is just really nicearhi is just really nice
Default

Quote:
Originally Posted by 3v0
Why do you prefer US or IR? I have never used the US.
Light is too fast. ~300Mm/s so if we say that you will use cheep dedicated pic for the sensor, those usually run on 4MHz hence 1 instruction takes 1us .. and in 1us light will travel 30000m .. so any measurement of length using light is impossible without high speed mcu.

With sound, it is much easier, at typical speed of ~300m/s the same calculation show that one instruction is 3cm.

Now, yes, you should think about round trip, not one way trip, so sound will actually bounce from object 1.5cm away during one instruction, and that is something you can work with, if you look at the light, it is still 15Km distance for one instruction ... huge resolution difference

All this in consideration, you have to use different approach for sound and light, for sound, you can actually measure time between your "ping" and the echoed pong and get usefull results. If you integrate some more complex calculation using the temperature sensor to change the speed of sound to "correct value" you can get it really precise, and sound bounces from "most" objects the same way. When light is involved, you have to measure intensity and not "round trip time" as light is too fast. The problem here is that you cannot get any precision as light will bounce differently from different objects, the experiment I made showed that difference between white wall, polished black wood and black cotton is too huge to get any value out of that detector. Now, you can use "audible sound" instead of "ultra sound" for the same purpose, but, using 40KHz modulated sound gives few benefits:
- you do not hear the beeps
- the receiving transducer is already calibrated to some freq (the ones I use are 40KHz) and it ignores "most" of other sounds so you do not have to worry about background noise.

Quote:
Originally Posted by 3v0
I need to do the variable resistor bit you were playing with but have not yet made any provisions for it on the board. I figured I would get the basic detection working first and then experiment to see if I could get the variable power to the IR LED working for range detection.
It can work, the biggest problem is "different reflective index of surrounding objects". An generale, you can test yourself, just build a simple detection circuit and manually change the resistor value .. as I already wrote .. the major PITA with light is
- ambient noise
- reflective index of surrounding objects
It might work with maze, as you can "predefine" the material maze will be made of, but for some "general" use, you cannot count on any resolution with light. Pay attention that placing IR led in alu tube (1-2cm in length) will increase the "focus" of the beam from the led.

Quote:
Originally Posted by 3v0
What sensitivity/(distance resolution) did you get? What is the shortest distance you could measure?
With sound, no test yet, as I still do not have time to go and get those transducers, with light - with the setting I have at the moment (the best one I could come up with, fixed resistor) module that detect highly reflective object (mirror) 1m away, white paper 30cm away, and black matte sponge from 2cm away ... now .. as you can see .. *same* setup detect different objects on different distances (mirror 1m, sponge 2cm).

The tests with variable resistor, I was able to get resolution of ~3cm using white paper as "wall" with 500R static + 100K variable resistor in series with the IR LED. IR LED was enclosed in aluminum tube 4cm in length
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Adjusting voltage output by a fixed amount - Part 1 meek13 General Electronics Chat 18 2nd March 2008 01:01 AM
need help... imisendo_4036 Micro Controllers 0 20th February 2008 01:14 AM
Voltage ElectroMaster Electronic Theory 44 8th August 2007 05:35 PM
I am not getting ripple voltage at the output dar2525 General Electronics Chat 3 14th July 2005 02:20 PM
Why does wall transformers output more voltage than printed? Lac General Electronics Chat 4 23rd June 2004 12:53 AM



All times are GMT. The time now is 11:54 PM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.