go_away

Author Topic: mega n00b please help!  (Read 1666 times)

0 Members and 1 Guest are viewing this topic.

Offline tjpark1111Topic starter

  • Full Member
  • ***
  • Posts: 51
  • Helpful? 1
mega n00b please help!
« on: February 22, 2009, 10:24:12 PM »
i came here a while ago for help with RC robots a few months ago, and now the n00b is at it again for another high school science project.
i need to build a vehicle (im talking small like 12"x5") thatll go precisely whatever distance i tell it to in a straight line and stop there. that's all it needs to do. I'm sure this involves some sort of programming and i know nothing of it. i have a few leftover servos so i just need to know what to do with them to make them go a certain distance and stop. help help! thank you so much!

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: mega n00b please help!
« Reply #1 on: February 22, 2009, 11:17:02 PM »
Perhaps you could, if you have any encoders or servos with built in encoders, program your robot to turn a certain number of degrees which will in turn move your robot a certain distance based upon the radius of your wheels.  For example, lets say your have two main drive wheels, each which have a radius of 3 cm.  lets say your encoders can measure 360 degrees also.  the circumference of each wheel is equal to:
2(pi)r
= 2(pi)3
= 18.85 cm

That means for every 360 degrees of rotation your robots main wheels the robot will move foreward or backwards 18.85 cm.  Now lets say you want to travel  150 cm, simply divide 150 by 18.85 and then multiply by 360 degrees to get the amount of degrees needed to move the robot 150 degrees.
150/18.85
= 7.967559682   <-- dont round until your final answer
then
7.967559682*360
= 2864.721 <-- now round
= 2865 degrees     Therefore, your servos with wheels which have a 3cm radius will need to rotate 2865 degrees in order to move 150 cm.

if you cant do this, you could always just time everything.  For example give the servos a certain time to run for (lets say 10 sec.) and calculate the distance the robot travels.  Do this numerous times and then average everything out to find the distance the robot travels in 10sec.  Simple use the equation velocity=displacement/time  to find the velocity of your robot  (since your robot only moved foreward and backwards, in this case displacement is also equal to distance) once you know the velocity your robot travels at rearrange the equation so you can find the amount of time needed to travel a certain distance:  time = displacement/velocity.
If you plan to time your robot, you can just use the $50 robot design, without the sensors.

Of course, with time, as with the encoders, make sure that there is enough traction between your robot and the floor so that your robot will not slide.  to reduce slippage, you can simply slow down the speed of the servos.

as with the programming, i am still learning, and am pretty much clueless....sorry


Offline tjpark1111Topic starter

  • Full Member
  • ***
  • Posts: 51
  • Helpful? 1
Re: mega n00b please help!
« Reply #3 on: March 07, 2009, 10:41:30 PM »
ok, im actually looking at getting the basic stamp starter kit shown here: http://www.parallax.com/Store/Microcontrollers/BASICStampProgrammingKits/tabid/136/CategoryID/11/List/0/SortField/0/Level/a/ProductID/295/Default.aspx
but i'm still very confused as to how im supposed to even attach the servos to the microcontroller. i know it probably involves soldering, but idk where the solder the wires to. it says there's 8 i/o ports, are those the holes to the right???? im so confused i dont even know where to begin.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: mega n00b please help!
« Reply #4 on: March 07, 2009, 11:00:39 PM »
one wire of servo is ground...one wire is power ...one wire is sgnal which is connected to mirocontroller pwm pin...
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline tjpark1111Topic starter

  • Full Member
  • ***
  • Posts: 51
  • Helpful? 1
Re: mega n00b please help!
« Reply #5 on: March 08, 2009, 11:51:49 AM »
thanks.......... there's like 500 holes on the board......... i don't know which ones to solder the wires to........ the manual doesn't tell me which holes do what...........
.............

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: mega n00b please help!
« Reply #6 on: March 08, 2009, 01:18:48 PM »
u got the net dude...so google a bit...am sure u can get ur answers there...wth i learned image processing in a day inthe net
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

 


Get Your Ad Here