Shop OBEX P1 Docs P2 Docs Learn Events
NEW Penguin Code - Line Dance & Twin Engine Motion Control Driver — Parallax Forums

NEW Penguin Code - Line Dance & Twin Engine Motion Control Driver

HumanoidoHumanoido Posts: 5,770
edited 2007-09-12 09:16 in Robotics
(Edit: the original code posted here
is removed and now updated with
a new version, as seen in a new
post. The new version is 1v6.)
humanoido


Post Edited (humanoido) : 9/10/2007 12:58:00 PM GMT

Comments

  • InteractInteract Posts: 79
    edited 2007-09-04 21:06
    I think I’m going to disagree on the battery savings part. Once the servo has reached its position the motor won’t turn if you send more pulses to tell it to go to that same position. True, you aren’t sending any extra signals. But those signals don’t use much power unless they cause the motor to activate. Remember, there servos not motors.
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-05 12:06
    Go ahead and hook up an ammeter, and you'll see the servo under control in the active subroutine will draw more power than the servo that's totally limp. With sent servo pulses to either move or hold the servo in position, it's taking more power compared to the limp servo that's not pulsed. It's not about the pulses drawing bulk energy, but rather the servo doing work to hold or move its position against resistance. These are servo motors, and pm motors will act the same under load, i.e. drawing more amperage. If an ammeter is not handy, try loading up a motor with one battery, compared to an unloaded motor and see how long the battery lasts. Typically, servos under load can drive up the amperage draw significantly. I've seen this in other robots too, like Robonova-1 and bought an ammeter to perform this test. Under various loads, it drove the amperage draw up to 7 amps! This is why this particular program is saving battery power. The following Wikipedia information states that a servo is a motor.

    en.wikipedia.org/wiki/Servomechanism
    Wikipedia said...
    RC servos are servos typically employed in industrial robotics, automation, and radio-controlled models. They are also used to provide actuation for various mechanical systems such as the steering of a car, the flaps on a plane, or the rudder of a boat.

    RC servos are comprised of a DC motor mechanically linked to a potentiometer. Pulse-width modulation (PWM) signals sent to the servo are translated into position commands by electronics inside the servo. When the servo is commanded to rotate, the DC motor is powered until the potentiometer reaches the value corresponding to the commanded position that it's ordered.

    Due to their affordability, reliability, and simplicity of control by modern microprocessors, servo motors are often used in small-scale robotics applications.
    I appreciate your comments and hope this helps clear up any misunderstanding.

    humanoido
  • InteractInteract Posts: 79
    edited 2007-09-05 20:32
    Thanks for continued dance routines by the way ... a real joy [noparse]:)[/noparse]

    I still maintain that the motor will not energize once it gets to the destination even if you send more pulses to tell it to go to that same position. (But hey I’ve been wrong half my life.)· If I take my Penguin and hold it in the air, and send center both servos commands to it continuously it will stop drawing motor current once it reaches center positions. This is when the “ the DC motor is powered until the potentiometer reaches the value corresponding to the commanded position that it's ordered.”· is reached. However if I leave the Penguin on the table it sometimes doesn’t quite get to its destination and the servo doesn’t seem to have quite enough power to move it that last little bit, it will keep energizing the internal motor of the servo because it is not quite reaching its destination. Give it a little bump and it gets there, and stops energizing. Since the penguin is moving most of the time, the servos will get to their destinations, and the penguin isn’t heavy enough to knock the servos out of these positions once reached. I can see on heavy robots, that the servo will be working all the time, because the servo will have to hold a position, that if let go would move from the weight.
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-06 13:54
    Glad you enjoyed the dance routines.
    You've come up with some really great code too!
    Keep up the good work! It's really wonderful to
    share code and wacky ideas on this forum.

    I wonder if the Penguin servo is going bad - it
    should reach destination without being shoved.
    How often do you have to get out and push?
    We are clearly talking about different things
    here. In the program, there's one motor that
    has no pulses sent to it. It's not being held in
    any position. If you want to run the two programs
    and see the battery savings in the one, that would
    be helpful.

    I think we've flogged this dead dog long enough.
    Holding your Penguin in the air?
    Hey! Now that's totally cheating!!!

    humanoido
  • GrievousfishGrievousfish Posts: 54
    edited 2007-09-08 05:12
    Thanks for the programs!· I am having trouble with line dance.· It keeps pushing me back out to the debug screen and the servo calibration· question even though I have used your servo·calibration program.·I don't think it is getting into the unsafe ranges as the program barely starts before it kicks back to the debug screen.

    Anyone else having this problem?shakehead.gif
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-10 05:42
    You're right. The code became corrupted.
    Thank you for bringing this to my attention.
    Please do not use this code version. I'll put
    together an update after my travel is more
    complete.

    humanoido

    Post Edited (humanoido) : 9/10/2007 6:34:05 AM GMT
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-10 13:07
    The program is now updated to 1v6.
    The twin engine is now a single
    engine so disregard any battery
    comments as they were intended
    for the old program. Grievousfish,
    thank you very much for your
    comments. This was very helpful.
    Let me know how it goes with the new
    version.

    humanoido
  • N-2-STUFFN-2-STUFF Posts: 25
    edited 2007-09-10 23:46
    humanoido
    my eyesight must be getting worse the code is where?
    thanks for all your hard work the last code (happy feet) was great.

    scott
  • HumanoidoHumanoido Posts: 5,770
    edited 2007-09-11 03:05
    Scott, the code is in a new post with the following subject:
    NEW Penguin Code - Line Dance 1v6

    Thanks for the comments and your keen eyesight!

    humanoido
  • GrievousfishGrievousfish Posts: 54
    edited 2007-09-11 04:12
    humanoido - thanks for working on this some more! I will try out the new code tomorrow and let you know if I see any more problems.

    Also, thanks for being willing to share your code! I learn more every time I review someone else's work.
  • GrievousfishGrievousfish Posts: 54
    edited 2007-09-12 09:16
    Revised code works great! Thanks!
Sign In or Register to comment.