Shop OBEX P1 Docs P2 Docs Learn Events
First bot speed problems — Parallax Forums

First bot speed problems

PrettybirdPrettybird Posts: 269
edited 2009-06-24 00:14 in Robotics
· I am getting the bugs out of my first boebot and having problems. I admit I got carryed away and am pushing the servos to the max. After modifing the program for a 5 button parallax R/C control the bot seemed to slow down. It never went in reverse when running the original program but noticed that running in reverse with the R/C, is much faster then forward. It may be mechanical but don't think so. Just learning programming some and try to keep the original program the same except for some offsets I put in to make it go straight. I know I will need stronger servos when I can afford them. Just trying to get by for now. Any ideas would be appreciatted. You guys have helped me alot and I appreciate it. I am enclosing a copy of the program I am working on.

The more you learn, the more you find you don't know. It is neverending.· Confucous 550 BC

Comments

  • Jamesbs2Jamesbs2 Posts: 3
    edited 2009-06-23 00:07
    It could be a current issue if you are using the AA battery pack that came with the boebot. I say this because you have a lot of stuff crammed on that robot.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2009-06-23 01:47
    Another thing to keep in mind is that as your batteries run down the servo motors used to drive the robot may also slow down so they won't travel as far as they would when the batteries are full. This can affect turns, and other movement of the robot.
  • iDaveiDave Posts: 252
    edited 2009-06-23 05:09
    Well, on this u gotta figure out what problems u can eliminate & look back in time and remember when it went forward normally. If u had all that gear on there and it was ok, then it can't be a lack of current problem. Make sure the servos are getting pulses every 20 ms. Look hard at the section of code that makes it go backward & make sure the timing in the code is the same for forward. I'd look, but can't download your program for some reason. Pretty sure the prob lies in what ever changes u made in the prog.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "THE ONLY TRUE WISDOM IS IN KNOWING YOU KNOW NOTHING." - SOCRATES
  • PrettybirdPrettybird Posts: 269
    edited 2009-06-23 12:18
    I am using a 7.2v R/C car battery pack andmonitor the voltage when running around. It stays around 7.2 to 7.4 volts. I don't think current is an issue. I may try a seperate supply for the processor next. I think the motors just don't have enough torque. Thanks for the help.
  • iDaveiDave Posts: 252
    edited 2009-06-23 18:55
    It is possible u burned out the servos if u have a constant supply over 7.2v, especially if u don't have a ramping (ease the speed up gradually) sequence before it gets to full speed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "THE ONLY TRUE WISDOM IS IN KNOWING YOU KNOW NOTHING." - SOCRATES
  • iDaveiDave Posts: 252
    edited 2009-06-23 22:48
    Finally looking at your code it seems to me that it takes longer than 20 ms to get to your pulsout (servo) commands. I'd try and shorten 'pause 20' to something less. Trial & error will reveal the right timing. Also, the below code seems inefficient:
    IF (irDetectLeft = 0) AND (irDetectRight = 0) THEN
        GOSUB Ping_Around                   ' Object Detected via IR Forward
      ELSEIF (irDetectLeft = 0) THEN
        GOSUB Ping_Around                   ' Object Detected via IR Left
      ELSEIF (irDetectRight = 0) THEN
        GOSUB Ping_Around                   ' Object Detected via IR Right
      ENDIF
    




    A simple ' IF (irDetectLeft = 0) or (irDetectRight = 0) THEN ' will cover all those cases

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "THE ONLY TRUE WISDOM IS IN KNOWING YOU KNOW NOTHING." - SOCRATES
  • GWJaxGWJax Posts: 267
    edited 2009-06-23 23:38
    iDave your correct with the fix to the program before I seen it I too was going to convert the AND to an OR statement.
    Also this code looks very similar to a code I help out with awhile ago..

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
  • GWJaxGWJax Posts: 267
    edited 2009-06-24 00:14
    Attached is a program that I used for my Spider Bot that is now ripped down. the movements are for a HBridge controller for the dc motors but look how I used the ping routine and of course it's for tilt/pan functions but you can see how I set it up using subroutines unlike your code that calls the ping routine inside all of your subroutines that need it. Also I had setup a distance measuring sub routine to do this as well.

    Another thing is that you over write the old distance data back to 30 and I'm not sure why you need 10 pings))) when only one should work since I do not see you getting an average from the Ping)))s your getting.

    here is how fast the ping works in the video but I wished I moved the camera to the computers screen so you could see the ping backs in inches.

    [noparse][[/noparse]url]

    have fun programming and hacking and if you need any help converting my program to your let me know.

    Jax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If a robot has a screw then it must be romoved and hacked into..
Sign In or Register to comment.