my first robot

my robot is using the picaxe18 power board from sparkfun.com. he turns both ways and decides which way is better to go and goes that way

here is my code:

symbol dangerlevel= 84

Main:

readadc 0,b0

if b0<dangerlevel then

low 4: high 5: low 6: high 7

goto main

else

label_1: readadc 0,b0

end if

high 4: low 5: high 6: low 7

if b0>75 then

goto label_1

else

low 4: high 5: high 6: low 7

pause 500

readadc 0, b0

high 4:low 5: low 6: high 7

pause 1000

readadc 0,b1

low 4: high 5: high 6: low 7

pause 500

end if

if b0<b1 then

low 4: high 5: high 6: low 7

pause 500

goto main

else

high 4:low 5: low 6: high 7

pause 500

end if

goto main

navigate around using sharp ir

  • Actuators / output devices: 1:58 ratio twin tamiya gear motor box
  • Control method: autonomous
  • CPU: picaxe 18x
  • Power source: 4 AA batteries
  • Programming language: Picaxe basic
  • Sensors / input devices: Sharp IR
  • Target environment: inside

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/my-first-robot-8

When I first saw your robot

When I first saw your robot I thought it was a picture of mine take at another angle. then I realized it wasnt mine it just looked a lot alike.

 

The computer I’m on doesnt have sound so I cant tell if its as loud as mine. we both used the same geared motor set and tracks I think. Mine is on the loud side. I wish mine drove straight. I have to correct for a slower motor using pulse width modulaton.

yeah, a lot of people use

yeah, a lot of people use these gear boxes and tracks, their great and easy to use. my robot is a little loud probably because he goes fast.

here, might help,
here, might help, https://www.robotshop.com/letsmakerobots/node/6780

this robot you make it
this robot you make it where you want to go with a remote control???or it moves alone???

it moves alone. It makes all
it moves alone. It makes all of its moves based on the sensor.

I know you are using a Sharp
I know you are using a Sharp IR Sensor. But could you tell me the exact one. I was on there website and there are a few to choose from.

Sharp IR sensor

I think he is using the GP2Y0A21YK / GP2D12 (they are pretty similar) http://www.sparkfun.com/commerce/product_info.php?products_id=242 & http://www.lynxmotion.com/Product.aspx?productID=260&CategoryID=8 That would be one of the most common GP2D returning an analog voltage. My other guess would be the digital version which is less commonly used.

Awesome bot btw, I noticed that there was no power switch (unless i missed it) do you have to stick the battery in every time?

yup im using the first
yup im using the first sensor. No it didnt have a switch at the time but it does now. Its a old post.

I like the way it looks
I like the way it looks around to decide which way to go, but doesn’t require an extra servo to do it.

exactly, i was on a budget
exactly, i was on a budget so i didnt get a servo but instead made it in the program and it worked pretty well.

i mean if you move it with a
i mean if you move it with a remote control…

no it does not have a remote
no it does not have a remote control

ok thanks
ok thanks

Hey!

You stole my alias! Or perhaps a kindred spirit?!

Regards

Bender unit Aniss1001 :slight_smile:

patrickmccabe, you used
patrickmccabe, you used PICAXE-18 High Power Project Board. And if to use PICAXE-18 Standard Project Board that motors to connect to project board also?

Take a look at the datasheet

Take a look at the datasheet for the standard project board.

Page 1 explains the difference.

The standard board uses a darlington driver IC to provide 8 digital (on/off) outputs. Each output is rated at 800mA.

"The high power board uses 4 FETs to provide 4 high power digital outputs (rated at 1.5A each), and the option of a L293D motor driver IC to provide 2 reversible motor outputs, rated at 1A each."

If you have the standard board, you have less power per output. You also lack the option for a built-in motor driver chip. So you could build or buy an external board for motor control. Or you could go with servos modified for continuous rotation, which can be driven from a single output pin. You can drive these from the V2 supply up to 6V, though I imagine you are still limited to 800mA each. If you need more power, you could use the outputs to drive relays, which could switch higher power for you.

Good luck!

yup. This being my first
yup. This being my first robot i built, i did not know how to wire up the l293d motor driver (now the circuit is glued in my head). So i used this board simply because it had the built in motor driver.

so, how to make an external
so, how to make an external board for motor control?

http://letsmakerobots.com/nod
https://www.robotshop.com/letsmakerobots/node/2074