Author Topic: spin 90 degrees 50$ robot.  (Read 2620 times)

0 Members and 1 Guest are viewing this topic.

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
spin 90 degrees 50$ robot.
« on: February 02, 2009, 01:18:01 PM »
Hello, I need help with the code of the 50$ robot.
How to make robot turn around in 90 degrees?
I tried the following code
Code: [Select]
void robot_spin_right(void) //robot spin right 90 degrees
{
for (i=0 ; i<19 ; i++)
{
robot_turn_right();
delay_cycles(1000);
}
}

But there is a problem with this code. If the battery full, it spins about 90 degrees,
but as the battery voltage falls down the robot is not able to complete the spin.

Someone has an idea how to help me?

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: spin 90 degrees 50$ robot.
« Reply #1 on: February 02, 2009, 02:28:33 PM »
Are you powering your MCU with a Voltage Regulator or raw battery power?
Kurt

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: spin 90 degrees 50$ robot.
« Reply #2 on: February 02, 2009, 02:30:53 PM »
Yup.... but you gotta let yourself in some deeper water....
To do an exact 90 degree spin you need encoders...
encoders are like switches that measure a certain amount of "clicks" per revolution of one wheel...
Google about encoders and servos.... NOTE that RC servos are NOT real servos... They are a hybrid...
A real servo let's you know the position of the motor or it's speed... RC servos get a pulse and you assume
it will run at the speed requested.... :P


So do a little goggle and we will help you out more if we can!!! :P
Cheers!!!
For whom the interrupts toll...

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: spin 90 degrees 50$ robot.
« Reply #3 on: February 02, 2009, 02:36:56 PM »
Good point, some really easy to use motors and encoders to use would probably be:

Encoders from Solarbotics:
              http://www.solarbotics.com/motors_accessories/wheels/3/
EDIT: from what I've been told via email from Dave at SB, they are either re-vamping the design of them or canning 'em for good.


Motors like these ones from them fit perfectly with it:
http://www.solarbotics.com/products/gm8/
« Last Edit: February 16, 2009, 02:59:05 PM by galannthegreat »
Kurt

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: spin 90 degrees 50$ robot.
« Reply #4 on: February 02, 2009, 04:31:29 PM »
Also you could use a magnetic compass sensor.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: spin 90 degrees 50$ robot.
« Reply #5 on: February 02, 2009, 05:44:13 PM »
Or you could use stepper motors
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: spin 90 degrees 50$ robot.
« Reply #6 on: February 03, 2009, 10:32:19 AM »
i read about wave_front tutorial
http://www.societyofrobots.com/programming_wavefront.shtml
Admin use iRobot and like i saw at the movie, the robot spin exactly 90 degrees.
did Admin use encoders or digital compass to rotate the robot?


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: spin 90 degrees 50$ robot.
« Reply #7 on: February 13, 2009, 12:57:14 AM »
i read about wave_front tutorial
http://www.societyofrobots.com/programming_wavefront.shtml
Admin use iRobot and like i saw at the movie, the robot spin exactly 90 degrees.
did Admin use encoders or digital compass to rotate the robot?
The iRobot Create uses encoders . . . attached to a stretchable rubber belt . . . so the accuracy was horrible . . .

Anyway, its impossible to rotate 90 degrees exactly every time:
http://www.societyofrobots.com/robot_faq.shtml#robot_accuracy_tradeoff

 


Get Your Ad Here

data_list