Servo motion recorder and playback


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50

    Smile Servo motion recorder and playback

    Hi everyone,
    I was wondering if someone could please point me in the right direction for making a servo motion
    recorder. I would like to press a button and in real time record a pot controlled servo's position
    for about four min's and then be able to play it back over and over again. Im sure the same type of thing is out there for training a robotic arm but I want to use it for animatronics.I can do the pot to servo motion but I need to record it. My questions are.
    Are there any simular threads out there? Is it a simple as a loop with a input value? I imagine I will need more memory ,is there a eeprom or sd card tutorial or thread out there? Thank You for your time.
    Beer is proof that God loves us and wants us to be happy.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Robo-Ware Robotics Control Software v.II
    http://www.rentron.com/Robo-WareV2.htm
    DT

  3. #3
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Smile That would work but.....

    Thanks for that program but I guess I didn't make myself clear, sorry. I Need to be independant of a pc in the field so a software based program won't work. I just need to record and playback streaming data. Im sure a robot arm needs this the first time through. I can even remember (but can't find ) a pic program to joystick train a robot arm. I just need a start.
    Thanks for your help.
    Beer is proof that God loves us and wants us to be happy.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    This might help with the EEPROM part.
    http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1

    I have not done what you are wanting but if it is any help this is how I think I would go about it.

    If you are using a "hobby" servo an external POT or encoder of some kind will be needed for feed back to the MCU.

    The servo controller with either the hobby or industrial will take care of the positioning once the signal is sent from the MCU. So you only need to record direction changes.

    When there is a direction change the servo will have stopped, read the encoder and save the value keeping track of how many stops (direction changes) there are in the moving routine.

    When you go into auto mode, read the saved position values. These values will need to be converted to "servo" values to send to the servo controller. These values could be read into an array, that is why you will need to keep track of the "stops".

    There is a pert that I have not got thought out yet but maybe this will get you started... or not.
    Dave
    Always wear safety glasses while programming.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    It is unclear to me how you want to record the motion. Do you want to move the servo, then push the button to save the position or do you want to push the button and then record the motion until you push the button again?

    If you are using a pot to move the servo then simply save the pulse value when you push the button. If you want to record the motion then save the pulse value into an array at regular intervals. Maybe every 100 milliseconds. I don't think that recording just the changes in direction will work because a new position does not require a change in direction.

    Another option that would require few external components is to move the servos into position by hand and create a program that detects the position of the servo based upon the current it draws when it is sent various pulses. When a pulse is sent that does not require the servo to move then no current is drawn - and then you know the correct pulse width for that position.

    Rich H

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Snap View Post
    Are there any simular threads out there? Is it a simple as a loop with a input value? I imagine I will need more memory ,is there a eeprom or sd card tutorial or thread out there? Thank You for your time.
    Hi, Snap

    I do not remember any similar dataloggers here ... moreover with the "Replay " function

    Very simple , for the principle ...

    Servos are driven with a " pulsout " command ... you just need to memorize the pulse duration every, say 35 to 100 ms ... 8 bits is enough ...

    4 mins = 28 x 60 x 4 = 6720 samples @ 8 bits ...

    so, a 64K I2C memory is enough here ( 10 ms writing delay per sample ...) , processor can be as simple as a 16F628 ...

    could even fit into a 18F2620 chip ... with its 64k Prog memory...

    SD Card is overkill ... until you want to have many " programs " to play ...

    Alain
    Last edited by Acetronics2; - 12th June 2010 at 11:07.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Thank's for all the help

    Thanks for getting me started. I ordered a 256k I2C chip and can't wait to test it out . The tutorial should be enough to get it working. I am going to need real time for this because I am playing an SD card soundtrack along with the servo movements. I will be using a joystick that provides 2 pot signals ( 2 axis) as well as a 3 button inputs. This will be controlling a talking moving skull. So Im thinking I will start with another button input that starts (and stops) the I2C recording. Everything that happens now will be recorded. A second button starts the independent audio and the joystick pots feed the analog to digital inputs and the coresponding values are recorded in the I2C. The jaw or 3rd button will be a straight command for the servo to go full open when it is pressed and full closed when it is not. I have done this all before with the PC and a servo controller card and have a video on youtube called Uncle buck sings rob zombie but as I said before I want to lose the bulky pc.
    Thanks again I will post when I get further.
    Beer is proof that God loves us and wants us to be happy.

  8. #8


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by Snap View Post
    Hi everyone,
    I was wondering if someone could please point me in the right direction for making a servo motion
    recorder. I would like to press a button and in real time record a pot controlled servo's position
    for about four min's and then be able to play it back over and over again. Im sure the same type of thing is out there for training a robotic arm but I want to use it for animatronics.I can do the pot to servo motion but I need to record it. My questions are.
    Are there any simular threads out there? Is it a simple as a loop with a input value? I imagine I will need more memory ,is there a eeprom or sd card tutorial or thread out there? Thank You for your time.
    I think you need more memory for that. My friend has sd car. Do you want me to refer him to you?

  9. #9
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

  10. #10
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Lightbulb

    While browsing the Web ...

    http://www.hvlabs.com/serservo.html

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  11. #11
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Red face Nothing new under the sun

    I guess Im not the only one who needed a product like this. The puppet trainer joystick thingie is pritty much exactly what I was describing. I still will build my own but it's going to be tough knowing I could just buy one for half the price and 1/100th the labour . It looks like the trick will be controlling more then one servo. I think it can be done by giving each servo a small microcontroller or by using a serial to parallel shift register. It would be cheaper with the shift register but more fun with the Microcontrollers. Ill try and get it working with one servo to start any way.
    Sorry for the spelling, I never finished university
    Thanks for the help
    Beer is proof that God loves us and wants us to be happy.

  12. #12


    Did you find this post helpful? Yes | No

  13. #13


    Did you find this post helpful? Yes | No

  14. #14


    Did you find this post helpful? Yes | No

    Default

    Rotary encoder + DC brushed servo

    http://tw.myblog.yahoo.com/cncfreakc...ev=-1&next=263

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts