Okay I am about to start in on an AH3-R and since everybody I know that is involved in robotics/engineering is a huge fan of incrementalism…
I will start with a PS2 controlled version of my little death machine. but for later upgrades( I have to order all of my parts for the summer in one fell swoop) for use in my slow conversion to autonomosy( is that a word) I would like to have a small array of sensors at my disposal. the only problem is that I am not sure what kind of sensors to get. I basically want it to act like a mars rover and just roam around and explore it’s environment with obstacle and “fall off table” avoidance. so it doesn’t kill itself and maybe shut itself down when battery levels get too low.
suggestions? anyone?
thanx in advance for the help. hopefully this will be the last time I ask you guys pointless and annoying questions.
For don’t-bump-into-that protection, you have a bunch of choices.
Probably the simplest are rangefinders.
For don’t-fall-off-of-that protection, an edge sensor is probably your best bet.
For don’t-drain-your-battery-too-much protection…
Well, there are a bunch of people trying that on the forums.
There’s a battery monitor on Lynxmotion, but I think that’s just a visual indicator of battery voltage.
I don’t think that could actually tell your microcontroller when the battery is too low.
Looks like it uses a row of surface-mount LEDs under shrink-wrap to provide a visual indication. I imagine that you could cut open the wrap, and solder a thin wire onto the non-common side of the LED that would turn off when you reached your low-voltage warning point, and feed that to a microcontroller pin.
High signal == LED on == voltage at or above your warning level - carry on normally.
Low signal == LED off == voltage below cutoff level - time to take corrective measures before you can’t move anymore.
I guess you could use several taps to provide multiple voltage levels - sort of the difference between ‘hungry’ and ‘starving’ - and react accordingly.
this may be a really stupid question but where could I find a edge sensor? do you mean a line follosing sensor thingy? does lynxmotion offer them?
would this work ? I would have a ping sensor looking down at about a 65* angle and sensing the distance form the ground. then if I had three of these assemblies positioned on three sides of the bot and if one read a higher value past a certain threshhold than that would mean that the the sensor was looking over an edge and it should back up. how ever if it was a only a little bit over I could have the robot maybe try to step down or vice versa. hmm. in the quest to solve one problem I have found the solution for another.
I don’t think that your sonar/IR idea would work as an edge sensor.
For one thing, there’s a physics principle that you’re going against.
The angle that a beam hits at is the same as the angle that it reflects back at.
So, a 65 degree beam would continue going forewards after hitting the ground at a 115 degree angle.
If that’s hard to picture, think of this.
If you threw in front of you at the ground at a 65 degree angle, would it bounce back to you?
Nope, it would keep bouncing away from you.
I’ve never seen a sensor made specifically for detecting edges (which means little, since I never needed one).
I can think of a few ways to make one though.
If you make a boom that sticks out in front of your bot a bit, you can stick sensors on the tip to detect the edge of the land.
One method (and probably the simplest) would be to use an rangefinder at the end of the boom, pointing downwards.
When the range is greater than a couple inches, then the edge has been reached.
Another (and definitely the cheaper) way would be to use a photoresistor and an LED.
The LED would light up the area underneath the sensors.
When the photoresistor reads a lower value than usual, the edge has been reached.
so I could just mount four or five of those assemblys on the edge on the bottom of the hexapod chassis and just program it basically the same way as described above only with the LED sensors? and what if it is operating in the dark or in a very bright room? wouldn’t the ambient light change the normal value since it was a few inches above the ground? Could I still use my threshhold Idea because I thought that was a pretty cool way to get the robot to deal with uneven terrain . I felt special.
after taking a look at the components would it just be easier to by the prewired line following sensors? since they do basically the same thing.( I think) or if not could you help me a bit with getting the Photo resistor cell resistance wired into some sort of signal for the ATOM to receive and make decisions on? :signature:
Well, you’re right.
You’d have to devise a way to calibrate it for light changes, and for surface changes, as well
A good idea would be for your bot to read the value as soon as it is activated.
Thus, it would know what the value of being on proper ground is, since you won’t be activating it on the edge of a table (at least, I hope not).
However, since the LED will be shining it’s light on the surface, and the photoresistor will be looking for a pretty large amount of light (imagine shining a light on the ground and then bending down and holding your face an inch above that spot on the ground; that’s how bright it’ll be), you shouldn’t really even need this calibration.
True, in a truly bright room, or in a room where there is highly reflective floorings, you might have some problems.
As I said, a photoresistor and an LED is the cheap way.
Yes, you could just use a line follower, but that’s defeating the cheap purpose.
If you want an accurate way of doing it (and I would recommend this, since you’re trying to keep a thousand dollars or so of robotic toy from leaping off the table), use range finders.
These will be better, since you’ll be able to tell exactly how big a drop or increase in elevation is.
Thus, if the floor only goes down an inch, you can have your bot traverse it, since an inch probably won’t harm it.
but won’t the range finders sticking out on those booms between the legs interfere with the gait? how far out would they go Ideally? thanx for all the help
With most sonars reflections aren’t that big a deal. Unless you’re building it from scratch such as with a Polaroid sensor or some other US transducer, most have electronics onboard that ignore any echos after the first. The idea being that they report the closest object because the first echo you hear is the closest. That doesn’t mean that you can’t have glancing blows that bounce all over the place, but it does mean that you can’t do much about it since you’re only getting the timing for the first echo.
With the IR sensors, you have similar issues but with a different cause. The Sharp sensors anyways are angle based. Again you get only a single value back which I believe is the brightest reflection. The angle at which its spotted is used to determine the distance to the reflective object.
With both you have to worry about the materials reflective properties. Carpet is harder to see with a sonar than a hard surface. The amount of IR light a material reflects affects a IR distance reading.
With the sonars, there are a couple of other issues I’m aware of that are complicating factors. First, they tend to be a bit power hungry and you’ll need to balance power draw with how frequent you need updates.
Second is the shape of the “beam” through the air isn’t intuitive. Most of the spec sheets include various lobe graphs that show you the rough shape of the sensing area. This irregular pattern makes interpreting the data a challenge.
For the “hungry” test there’s a few ways to go about it. Most are simple voltage monitors. This is a very simple thing to replicate with any micro that has an analog input. Don’t connect your battery directly to that analog input! Most all these micros are running at 5V or lower and usually cannot handle any voltage over a small margin above it’s own operating voltage. So if you’re running off a 7.2V system you’ll need to divide that voltage down before the micro is exposed to it. This is a matter of lining up 2 resistors and feeding the micro the signal in between them. google resistive voltage divider.
The other way to go about this I don’t have any experience with but I’ve read about. The idea is based around precise monitors called columb counters. You let the counter monitor the battery as it’s being charged and it counts the units that go into the battery. It then counts the discharge as well and lets you get a really good sense of how much effective usage you’ll get out of the battery.
The reason a simple voltage monitor of a battery isn’t as good as the columb counter becomes clear if you look at your batteries data sheet. The discharge curves aren’t nice linear graphs. With most chemistries that I’ve seen (certainly not all inclusive) the voltage will drop quickly when it first comes off the charger, stabalize around it’s optimal voltage (7.2 is a common pack voltage) and stay fairly stable for most of the life of the battery. As it’s nearly depleted the rate of the drop will increase very quickly.
This sort of monitoring works great for hungry/starving, but if you want 67% you need columb counting.
autonomy
as for a good means of avoiding the obstacles with the kind of data you’ll get from distance sensors google avoidance repulsion vector.
now for my own correction
coulomb counter
so according to andy the 50* angle away from flat and level with the chassis(reduced for those of you who are keeping track) will not not affect the Ping sensor I have my eye on. comments? anybody?
next issue. the power hunger of death. would every 2 sec be enough to keep it safe but with good battery mileage? thanx again guys
Yep, I think that he said that the Ping would allow other angles without too much of a problem.
Keep in mind, that the best results would still come from a setup that is perpendicular from the ground.
The sampling rate would depend entirely upon the velocity of your bot.
I’d say that sampling every inch that the bot moves would be enough.
If you want it to be a bit more accurate, though, sample every half inch it moves and tell your bot to stop when it finds two consecutive samples where land is not detected.
well I am in ponder mode bettween andy’s angles and nicks perpindicular stuff. how far out would the booms come ideally I can’t just have it under the chassis because it would go to far over the edge and fall off. but I don’t wnat to have stick out htere so much it looks stupid and interferes with the gait. feel free to tell me I don’t know what I am talking about here becaus i probably don’t.
well I am in ponder mode bettween andy’s angles and nicks perpindicular stuff. how far out would the booms come ideally I can’t just have it under the chassis because it would go to far over the edge and fall off. but I don’t wnat to have stick out htere so much it looks stupid and interferes with the gait. feel free to tell me I don’t know what I am talking about here becaus i probably don’t.
I agree that a boom would look silly but how to get the results you are looking for is not clear. I have seen the Parallax toddler utilize some kind of edge detect, but I am not sure what was used to do this. I know it did not have any kind of long boom to detect the edge of a table top.
Hydro,
You might want to check out this PDF manual starting on page 131 talks about table top edge detection. Chapter 7 called “Staying on the table”
Here’s a link to that pdf manual:
If all you want to do is detect the edge of the surface the robot is walking on, use the feet… Put a switch on the end of the foot and when the leg is in the down position, check for switch closure. If the switch does not close, the foot is not touching the ground. The proper response is to stop right there, and then reverse the motion. Simple eh?
That is brilliant!! And here I was using complex range sensors and stuff… I should always just K.I.S.S. that makes so much sense I am literally in awe at this point. where could i get 6 of these switches and how do I mount them in the boot of the Hexapod? thank you so much robot dude. and all the others who have helped me with my delima (spelled right?)