A dirt cheap robot with 08M2

Dave Harpe

New Member
More coming on this. I just got it working and made a picture and a video. I want to do an article on building this one, because it can be done with very little money. I finally got a way to use the new "08M2" which does not work with my Power PC Mac. I have an old, but nice enough Mac Intel laptop. I had some trouble getting it working with Picaxe, but I finally did yesterday, so I built this. Cheap, easy to build, and kind of fun, it might be a very good first robot project for someone who wants to build one. Here is the first Youtube video, it's just running a test program now, and everything seems to work. http://youtu.be/WJcAkyVeFqg

One further note, There is one more pin available on the chip, and I want to add an ultrasound sensor, but I need one that uses a single pin. Those cost quite a bit more than the one I used on Mr. Magoo. It will probably have to wait a while. I could do it with the c.5 input pin, but I want this machine to be easy to do the programming on.

08 bug or maybe tree frog.jpg

Got Sonar!
Hey, guess what? The dirt cheap robot now has sonar, and it's still dirt cheap. I got these 'HY-SRF05" sensors from a Chinese vendor on Ebay, and it did not take as long as I expected to get them. They were less than a buck and a half each, including shipping.
So here I am holding a handful of sensors, and looking at my robot which didn't have one. It would be really cool if it had one, there ought to be a way.
I had to try this, and I figured out a way to do it.
The "HY" model has no "mode" pin, instead there is this thing called "out". From what I have seen it does something if there is an object at a preset distance, and it was used for curb sensing on cars. It only has one mode, and that's 2 pins, not 1. To use it, you pulse the "trig" pin, and then look for the pulse on the "echo" pin.
Well, that's a problem if you have only one pin available to use with it.
The original way I built this robot was to make the bumper switch normally high, and go low when it hit something, by shorting to ground. I realized that I could make it go high instead by putting the c.3 pin and its pullup resistor on the normally closed pin on the switch. Then I could tie the center pin to the "echo" pin on the sensor, instead of directly to ground. This pin is normally low, so if the bumper switch opens, this line goes high, and a pulse from the sensor also goes to the c.3 pin. Then all I need is "pulsin". If it's a number in the low hundreds, it's the sensor, and if it's zero, it's the bumper. The only sacrifice is that if the robot bumps into something, "pulsin" will totally time out before it moves on, and the robot will sit there for about 0.6 seconds before it responds, pushing on whatever it hit. Not a serious problem.
So I did all this, and connected the "trig" pin to c.4, and that's my "pulsout" to start the sensor. It works great. This will definitely be part of the finished design whenever I get to put it all together to publish. https://youtu.be/exh9Lroe-Uc
 

Attachments

Last edited:

techElder

Well-known member
Paperclips! That's a great bumper switch, too!

Man, you are old school. I like it. Just wish my grandson would hurry up and get to be 2 years old! ;)
 

Dave Harpe

New Member
Thanks, Tex, I guess I am kind of old school, the school I went to has been out of business for about 40 years. For a long time, I never thought I would get into this kind of stuff again, but I did.
 

Richard R

New Member
Hi I know I'm a bit late to this party, but if you are short of a 1K8 resistor and you want to use single mode with an HC-SR04, a diode between the Echo and the Trigger also works.
 

Dave Harpe

New Member
I have seen "1K8" a few times for a resistor, is that the same thing as "1K ohm"? I was concerned that if I put anything between "Echo" and "Trigger", then the the SR04 will keep retriggering itself and not produce an accurate output. Is there is a positive edge trigger, and then a built in time delay which disables the trigger pin long enough to prevent that? That can be done with an external circuit, but I did not want to add any more stuff than I had to.
 

erco

Senior Member
Hi I know I'm a bit late to this party, but if you are short of a 1K8 resistor and you want to use single mode with an HC-SR04, a diode between the Echo and the Trigger also works.
Interesting. Cathode/band to trigger?
 

Dave Harpe

New Member
I would take that to mean it definitely triggers on the edge, and does not retrigger while waiting for a return signal. Maybe the same applies to the "HY" version. Good to know.
 

Richard R

New Member
Hi, Yes cathode band to trigger. I found that a shottky diode works best. A standard power diode works but the returned signal can be a little unstable.
 

steviejay

Member
Hi Dave

I love this little robot and want to do it with my younger students. Im working on a simple 08m2 "backup and turn" responding to load sensing. Is there any chance of a schematic of some sort and perhaps code for this clever little guy"

mail jef < at > edgecumbecollege. <no space> school. <no space > nz
regards
Steve
 
Last edited by a moderator:

Dave Harpe

New Member
Thanks, I'm glad you like this. It was easier than Mr. Magoo, and actually kind of fun. I have been meaning to get the basic info done on this. I have a fledgling business that I have been giving a lot of attention to lately, and have not had a lot of time for these projects. I'll get at least a drawing and some code and let you know.
 

Dave Harpe

New Member
Hi Steve, check your email. There should be a schematic, with some extra information, and some code as well. The schematic is kind of big to post here, about 1.5 MB, I think.
 

erco

Senior Member
Dave, please consider writing an article for SERVO on your robot. Judging from the number of views here, there's plenty of interest. I just finished a 5-part series on simple Picaxe bots. Email Robin Lemieux <robin@nutsvolts.com>, she's very helpful.
 

Dave Harpe

New Member
If time allows, I might do that. I was surprised to see so many views on this humble little bot. I would love to see your articles as well. Thanks!
 
Top