Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Servo Movement Recording (Data Logging?)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Servo Movement Recording (Data Logging?)

by pd2kplus10 on Mon May 05, 2008 3:56 pm

Hello everyone!

I was wondering if anybody has tried to record servo movents using an arduino & SD Memory Card.

I was looking at RAPU by Brookshire Software .. very expensive @ $300 ... heard it's "buggy at best."

I know this is very possible with the Arduino. I just need a little help getting started.

Here is what I got :

Arduino # 1 duties:

1) Receive analog input from pots (I realize there are only 6 analog input pins)
2) Spit out serial data to a Pololu Micro Serial Servo Controller
(http://www.trossenrobotics.com/store/p/ ... Controller -assembled-.aspx?feed=Froogle)

Arduino # 2:

1) "Listen" in on the serial data that arduino # 1 is spitting out
2) Write an exact copy of this data to a memory stick
3) Spit out the same serial data at the same rate it was received (For playback of servos at a later time).
4) Control something like the Daisy Mp3 player by Make ... to have audio synched to the servo movement.

The Pololu Micro Serial Servo Controller can use 2 protocols ... 1 is their own and the other is the Mini SSC II by Scott Edwards. I would prefer to use Scott's because it only requires 3 bytes of serial data opposed to Pololu's 5 or 6 byte sequence.

This would all be used for Halloween animatronic props. I would like to be able to mirror the movements of a human skull at first. Using only 4 servos to begin with: Jaw, Head Left & Right, Head Up & Down, Head Tilt side to side. Later on if I get all this to work, I would animate the arms and possibly the fingers. Maybe control some pneumatic cylinders, RGB LED's for the eyes ... etc.
I don't want to have a dedicated PC running for each prop. I would much rather have a few $20 arduinos controlling the show.

I want to make a "helmet" that I could wear that would provide the potentiometer feedback... that way when the mp3 voice file is playing I can just memorize the words and "lip sing" it all the while moving my head and arms, etc ... probably have another helper that could hit the occasional switch for LED's to light or something.

I believe this is the way Hollywood makes their film animatronics seem so life like. Ibet it saves a ton of time doing it this way.

thanks,
Phil
pd2kplus10
 
Posts: 16
Joined: Tue Apr 22, 2008 9:01 am
Location: Hollywood FL

by adafruit on Tue May 06, 2008 8:14 pm

fyi if you open up a standard servo, you can solder a wire to the feedback potentiometer!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by Volt Dropper on Wed May 07, 2008 1:49 am

Maybe it is because I've gotten about 5 hours of sleep in 48 hours but I read you post twice and I have no clue what you are trying to accomplish.

You give us bits of a proposed solution but you don't really give us the problem.

What *exactly* are you trying to accomplish?
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by pd2kplus10 on Wed May 07, 2008 6:11 am

Thanks for the responses.

To Ladyada: I don't understand what I would be able to do with the servo feedback pot values.

To: Volt Dropper:

Sorry, I should have been more elaborate. I'm trying to make a stand alone (not connected to a PC) Halloween animatronic prop.

I've played around with Brookshire's VSA software ... which is quite good, but it's extremely time consuming to save servo movements.

I would like to synch head movements to audio (ie: jaw, neck, eyes.. etc).

I need to program an arduino to record the serial data that will be sent to the Pololu Micro Serial Servo Controller ... then be able to play the routine back at a later time with no user input. I'm guessing I will need at least 2 arduinos to accomplish this since there are only 6 analog input per arduino. For right now, I would be happy to record the movements of one servo.

I mentioned SD memory because I know recording that much data will not fit on arduino's limited memory.


thanks,
Phil
pd2kplus10
 
Posts: 16
Joined: Tue Apr 22, 2008 9:01 am
Location: Hollywood FL

by mtbf0 on Wed May 07, 2008 7:43 am

pd2kplus10 wrote:Thanks for the responses.

To Ladyada: I don't understand what I would be able to do with the servo feedback pot values.


i believe the idea is that you would be able to position the servo manually, then have the microcontroller sense its position. this could save a lot of trial and error in fine positioning.

not sure how you'd code it, but sure sounds interesting.
User avatar
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am
Location: oakland ca

by Volt Dropper on Wed May 07, 2008 10:52 am

hmmm...

So let me see if I have a clear picture of this...

1) Tools exist today (on the PC) to sync sevro movements to a time base. Specifically in this case music.

2) You're not in love with those tools due to the time required to sequence the movements and the cost.

therefore

You want to use analog devices (pots) to make the servos "dance" while you listen to the music and record that "dance" for later playback with music.

Then of course you need the hardware to playback the sequence (dance) at a later time.

--------

Sorry to be so pedantic about this but I have done a lot of work with servos and I'm trying to make sure I give you info you can use and not send you on a wild goose chase.

As far as LA's advice, there are pots inside the servo to control the movement. You could tap them to have them "report" their position. It's potentially a very good idea depending on how you approach the solution.
Last edited by Volt Dropper on Wed May 07, 2008 11:00 am, edited 1 time in total.
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by pd2kplus10 on Wed May 07, 2008 10:58 am

That's exactly what I would like to do Volt Dropper



Phil
pd2kplus10
 
Posts: 16
Joined: Tue Apr 22, 2008 9:01 am
Location: Hollywood FL

by Volt Dropper on Wed May 07, 2008 11:15 am

ok, have you looked at these? 100 bucks and you're done. (not near as much fun but it's done.)

http://www.servocity.com/html/servo_rec ... ontro.html
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by pd2kplus10 on Wed May 07, 2008 11:24 am

Yeah, I found that a few days ago. It's not bad for 100 bucks ... but it's limited. I would like to do more than 4 servos.

It would be fun to make it too.


thanks,
Phil
pd2kplus10
 
Posts: 16
Joined: Tue Apr 22, 2008 9:01 am
Location: Hollywood FL

by Volt Dropper on Wed May 07, 2008 11:35 am

Boy you're the king of limited info :D :D How many servos? (That's a very big question.)
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by adafruit on Wed May 07, 2008 1:04 pm

the feedback potentiometer will give you a linear voltage that is directly proportional to the position of the servo. that way you can just read this voltage and save it (to a computer, sd or whatever)
just saying you dont need a seperate measuring system

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by darus67 on Wed May 07, 2008 1:51 pm

But he still needs a control system to drive the servos in the first place.

You want to build a Teddy Ruxpin

Do you require stereo audio playback for your setup?

If not, you might be able to use the same scheme that Teddy used.
One track contained the audio, the other track contained the movement
data encoded in audio pulses. You would always be assured of the movements being in sync with the audio.
"He's just this guy. You know?"
darus67
 
Posts: 246
Joined: Wed Sep 26, 2007 10:25 pm
Location: Minnesota, USA

by darus67 on Wed May 07, 2008 2:05 pm

It seems to me that the most complex part of this whole idea is the initial
recording of the motion. I wonder if there's any open source motion
capture software that can take video input from a webcam, or something.
"He's just this guy. You know?"
darus67
 
Posts: 246
Joined: Wed Sep 26, 2007 10:25 pm
Location: Minnesota, USA

by Volt Dropper on Wed May 07, 2008 5:08 pm

There are a number of ways to do it.. the question which is the most effective.

In general terms, pick a time base (50ms for example) and record the sample off each A/D. The one big problem with that approach is on the 168 we're limited to 6 A/Ds.

Well, that's the first problem anyway.
Volt Dropper
 
Posts: 30
Joined: Thu Apr 24, 2008 12:58 am

by pd2kplus10 on Wed May 07, 2008 7:12 pm

I'm pretty confused now. My biggest problem is trying to figure out how to write this data to memory ... some kind of memory. The next problem is figuring out how to read it from memory at the correct rate ... and then using it to drive the servos.

I'm kinda surprised no one has done anything similar.


thanks everyone,
Phil
pd2kplus10
 
Posts: 16
Joined: Tue Apr 22, 2008 9:01 am
Location: Hollywood FL

Please be positive and constructive with your questions and comments.