Let's Make Robots!


Navigate around via ultrasound
skybot.bas1.99 KB

Maus was the robot I originally built on this platform with an Arduino and Microphone or IR.  Then today Ossipee posted the code for his Mini-Skybot and I realized that I could use the same configuration that he had (a PicAxe 08M2 brain and HC-SR04 with the batteries and existing 2-CR servos for motivation.)  Since the brain was made in England I felt it needed a new British name.  At first I thought "Titmouse" because it was a Mouse and I like... well, anyway, we tried on "Flyingsquirrel" before jinx reminded me of this character:

We used to watch him on Nickelodeon when I was a kid. Thus, DangerMaus it is (not a big fan of the other Danger Mouse-the one that works with the guy on "The Voice.")

All I did was take Ossipee's skybot code and make the HC-SR04 read a subroutine (attached.)  Servos are on C.1 and C.2, the ping Trig is on C.0 and Echo is on C.5.  There are still two pins left over if I want to add a pair of antennae bump switches, but I think I've taken this as far as I'm interested.  It was a great learning experience.  I'll work on a blog about the differences between Arduino and PicAxe later.  Again, both are great-no need to "pick teams" as it were.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Something which would be ABSOLUTELY BRILLIANT for front sensors / antennae would be quantum tunelling cable (if you could get hold of it). Maplin Electronics (in the UK) sold this a few years ago and I bought a couple of pieces.  If you used a pair of these as a potential divider with an ADC pin in the middle you could detect the slightest bend of the tube to the left or right.  Sadly, I no longer have the stuff and I can't find it to buy anywhere, except as small 'pills'. (I maght buy a few and see what I can do with them.)

A little tip i discovered some years ago (i don't know if someone else uses this):

Instead of using the classical two pins for the two contact switches, by using an A/D converter and a joystick as bump sensor with a piece of plastic or wood attached to it as a whisker you will have much more resolution on how much it touches obstacles in 3D axes, doing so it will be more similiar to the real sense of touch :)

I hope this helps!

I can see how it would be useful.  The only issue I see on a machine this size is can you always predict how the robot forward axis will end up in relation to the yaw of the joystick?  It could easily end up getting pushed to either extreme regardless of which quadrant makes contact, couldn't it?

Not necessarily: Imagine to have the joystick in front of you, if at center we place a V shaped whisker we solve the obstacle-at-center issue, if we add a 45 degrees angle whisker onto the V we obtain something similiar to a W whisker.

Now having the angle sharper on the top of the whisker we can predict also the dinstance from the object basing on the angle it detects. Giving more importance to the more angle we obtain a kind of touchable "infrared ray".

By giving a counter every cycle of the routine we can adapt the speed basing on the number of obstacles we detected, so if the floor is polulated by thousands of obstacles, the robot will proceed carefully, avoiding to end up with the sensor onto any extreme.

If we also add another V in the vertical axes of the whiskers we obtai a floor sensor also, and just using one or two pins.

I also suggest to add a spring in the rear of the whisker, so if we pass the obstacle, the whisker won't bumb back giving false readings.

To know the side it hitten is easy: all the joystick i used were potentiometers and were centered at half of the total resistance, so if resistance goes less it is a side, else is the other side.

Obviously we also need a deadzone to avoid false readings :)

So for your question, angles are the solution!

I think I need a diagram! How about doing a tip/Walkthrough on it?

i'll do it, now it's saturday night and at this moment i don'have the plenty of my "skills" to do it, you know *cheers*

I was publishing the joystick bump sensor here in italy in the little communities there are but those sensors here don't had the fame they deserve, i'm using them since my first robot in early 2008, it was the only sensor, the robot was called junk-e was made almost with trash, but it could navigate around without much trouble.Sadly i've lost the sourcecode for a PIC12f675 i made to convert joystick signal to PWM for servos but i think anyone here could do it without it.

I really suggest anyone to try, an ohm meter is good enough to see the potential of this method.

@AndyGadget, why not to use fiber optics with photoresistor? i have seen it somewhere (robot builder's bonanza maybe?) i think it could be a valid alternative, bending the fiber changes the values. Simple, efficent!(maybe)

Ha, nice little Maus - Dangerous or not I like the quick turning of the rear drive setup like that. Going to have to give that a try some time. Yet another entertaining creation from Mr. Max! -Stephen