SprintBot

Hi all, new to the group. Here's my first robot project ever - "SprintBot"

I do laser engraving and cutting as a business, so the chassis of the bot was fairly straight forward for me. I found the original idea and drawings here http://www.instructables.com/id/How-to-Make-an-OAWR-Obstacle-Avoiding-Walking-Rob/?newComment=true#comments and redid them to suit my needs.

As of tonight it walks and the servo points and the Parallax Ping triggers, but I get no readings from it :-( so... more work to be done.

Here's the code I used to debug the sensor (gleamed from this site) -

main:
LOW PORTC 0
HIGH PORTC 0
PAUSE 1
LOW PORTC 0
LET DIRSC = %00000000
PULSIN 0, 1, W0

sertxd ("The value is ",#W0,cr,lf)
pause 500 ‘ short delay
goto main ‘ jump back to the start

just added the sertxd stuff from the manual.

Any ideas on the ping??

 


Navigates via ultrasound

  • Actuators / output devices: 240:1 Tamiya dual gear box
  • Control method: autonomous
  • CPU: Picaxe 28x1
  • Power source: 4 AA
  • Programming language: Picaxe basic
  • Sensors / input devices: Parallax Ping
  • Target environment: Indoors is best

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/sprintbot

Very cool looking robot. Add
Very cool looking robot. Add some fur and you have a puppybot. Someone has ping code here somewhere. Unfortunately I haven’t used a ping only srf05.

I took a look at the ping
I took a look at the ping code, but couldn’t make it work for me. I’ll did a little deeper.

Slick looking bot! I had the
Slick looking bot! I had the zero read problem with mine too. Check the voltage being fed to the ping, it should hover around 5v. see if your led is flashing on the right intervals too (every low-hi-low sent)

V+ is right at 5.9dc and the
V+ is right at 5.4dc and the light on the ping flashes every .5 seconds, so it’s triggering. I’m just unable to get a reading. Not sure what’s up -

disconnect your servo and

disconnect your servo and see if readings change, also try move your "sertxd ("The value is ",#W0,cr,lf)" i found that dit actually makes a difference where i place the debug output command. hmm what else…you could try lengthen the 500 delay.

also give this a try, omit the last low:

LOW PORTC 0
HIGH PORTC 0
PAUSE 1
LOW PORTC 0
LET DIRSC = %00000000
PULSIN 0, 1, W0

OK, that worked - now I’m

OK, that worked - now I’m getting readings. you were right, gotta remove the last “low portc 0” and put the “sertxd” after everything happens.

 

Now that you’ve got it

Now that you’ve got it working, you should post a vid for us to see!

It looks awesome, I expect to see some rockin’ bots coming our way from you!

Well… I don’t have the

Well… I don’t have the whole thing working :slight_smile:

I have the ping working independantly. Using code I can slew the servo, take a reaning and it’s quite accurate. The difficulity is when the main motors are running there’s a nasty timing issue that I haven’t traced down yet.

Secondly, I may have to implement an encoder for each motor - the legs get out of sync and the bot vectors instead of walking in a straight line until they sync up again. If I leave it “as is”, I’ll have to rename it DrunkBot.

Anyone have some working ping code they could post (nav code, with motors running)?

Here’s some quick sloppy code for test of servo slew and ping function (remember to press F8 to get a terminal window).

+++

main:

servo 0,150

pause 500
LOW PORTC 0
HIGH PORTC 0
PAUSE 1
LET DIRSC = %00000000
PULSIN 0, 1, W0
sertxd ("The center value is ",#W0,cr,lf)
pause 500 ‘ short delay

servo 0,100

pause 500
LOW PORTC 0
HIGH PORTC 0
PAUSE 1
LOW PORTC 0
LET DIRSC = %00000000
PULSIN 0, 1, W0

sertxd ("The right value is ",#W0,cr,lf)
pause 500 ‘ short delay

servo 0,200

pause 500
LOW PORTC 0
HIGH PORTC 0
PAUSE 1
LOW PORTC 0
LET DIRSC = %00000000
PULSIN 0, 1, W0

sertxd ("The left value is ",#W0,cr,lf)
pause 500 ‘ short delay
goto main

+++

Do you have it all on the
Do you have it all on the same batteries? If so try putting the motors on a secondary power source. The motors may be getting different voltages when the sensor is working.

Not sure if this will help,

Not sure if this will help, but somebody recently wrote a guide on here for getting the Ping to work with the Picaxe.

https://www.robotshop.com/letsmakerobots/node/1276

I’ll give that a try - very
I’ll give that a try - very well might be the issue.

Lovin’ it!

Lovin’ the look of the bot.

Laser cutting, eh? What format do I need to send my drawings to you for that?

Well, I have an Epilog Helix

Well, I have an Epilog Helix with a 24"X18" bed size, so I can cut at any one go up to that size. Plexi (perspex) is routinely sold in 12" X 12" and 24" X 12" as standard. CAD drawings work fine, but I convert them so they have contiguous lines with no gaps. EPS works well also and I rarely have to touch them. Corel Draw vector files are easy for me to work with as well.

I got burned paying $5 for the ping servo bracket, but never again - I think I can bang up a life time supply in plexi (perspex) in about five minutes of cutting time - think I’ll get started on that.

You’re on a goldmine

Pretty sure you have about 10 customers right here.

Is this an expensive process, comercially? Do you have “Mates Rates” for people who give you free electronics advice?

:slight_smile:

As long as the art work is

As long as the art work is ready to cut, it wouldn’t be expensive at all for me to do it. No worries on the mates rates, happy to help out.

Happy Days!

Well, thank yo very much. I’d be happy to cover your materials, postage and a few beers at Christmas.

Could you recommend a piece of freeware which is able to produce suitable drawings?

Sure, Alibre make a nice

Sure, Alibre make a nice package that’s free for the hobbyist -

 

http://www.alibre.com/promos/online/easy3dcad_c.asp?ovchn=GGL&ovcpn=CAD+Design&ovcrn=&ovtac=CTX&GCID=S17431x001&KEYWORD=free%20cad&gclid=COfu2viCuJQCFQOfxgodjiKHSw

Awesome! I’m making the same

Awesome! I’m making the same offer, I’d love to cover the cost of everything and throw in some extra for beers, as long as you don’t go and buy something gross like Bud Light or any Miller products.

I just downloaded the program, now let’s see if I can learn it!

Beers

How about you start a seperate off-topic forum listing good beer and "evil empire beer (Miller)"?