PDA

View Full Version : Servo motion recorder and playback



Snap
- 11th June 2010, 04:08
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.

Darrel Taylor
- 11th June 2010, 08:19
Robo-Ware Robotics Control Software v.II
http://www.rentron.com/Robo-WareV2.htm

Snap
- 11th June 2010, 12:21
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.

mackrackit
- 12th June 2010, 08:39
This might help with the EEPROM part.
http://www.picbasic.co.uk/forum/content.php?r=165-Serial-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.

JetPack Spartan
- 12th June 2010, 10:31
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

Acetronics2
- 12th June 2010, 11:05
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... :cool:

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

Alain

Snap
- 12th June 2010, 21:32
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.

tiresmokindad
- 13th June 2010, 08:29
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? :D

eggman
- 13th June 2010, 11:17
here's one for you

http://www.bpesolutions.com/a.ServoControl.html#anchor283241

Acetronics2
- 13th June 2010, 14:37
While browsing the Web ...;)

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

Alain

Snap
- 13th June 2010, 15:45
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

happytriger2000
- 16th June 2010, 16:52
http://www.cibomahto.com/2008/02/thing-a-day-day-9-servo-as-input-device/

JetPack Spartan
- 17th June 2010, 00:25
http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=121278

Rich H

happytriger2000
- 18th June 2010, 06:12
Rotary encoder + DC brushed servo

http://tw.myblog.yahoo.com/cncfreakcncfreak/article?mid=265&prev=-1&next=263