November 21, 2024, 12:08:17 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Animated Skull

Started by davisgraveyard, March 14, 2007, 11:26:59 PM

Previous topic - Next topic

davisgraveyard

I want to build my own "Skulltronix" talking skull this year.

It will need to have 5 servos.   Jaw, Eyes, Head Turn, Head tilt (right/left), Head nod (front/back)

I'd like to be able to sync the movements to a sound track real time using a joystick or a RC transmiter.   Then just do a playback and the entire series of movements will play out to the soundtrack.

So, do I use a Prop-SX when it is out?   Do I use a Parallax product?  Can it be done with a Prop-2?   I figure no matter what hardware I end up buying it won't be spending half as much as the Skulltronix costs ($1100).

I am pretty sure I can get the servos mounted and the hardware built into a Standard Bucky skull with some modifications.  The real trick is how to program it to move like theirs does?

Anyone else want to work on this project with me?


Ryan

Issues to consider: the buckys can be heavy, depending on how you set up your mechanics (servo driven)- 

The questions on what hardware to use depend on specifically you want it to do:

-Will it be tethered to a computer, or stand alone?
-Pre-recorded routines, or reactive to environment (with some type of sensor or triggering)

The Skulltronix skulls are simply a servo controller, mechanics, and lighting (no 'control' board inside)- all driven from a PC- 

A PropSX with Jon's servo controller code would be great for a stand alone skull- but again it depends on what your finished product needs to be...

LosT

JonnyMac

March 15, 2007, 02:49:07 AM #2 Last Edit: March 15, 2007, 07:53:04 AM by JonnyMac
Wait until you see my May Nuts & Volts column... I designed a board with an SX28 that will control eight digital outputs and eight servos in real-time under control from a PC.  The control part is easy: the PC sends a packet [every 20 mS or so] that has nine bytes: one byte for the eight digital outputs and eight bytes of servo position data (10 uS resolution).  The device expects a two-byte [minimum] break on the serial line between packets (which takes about 2 ms at 38.4K); this is how sync is established, very similar to DMX512.  This will all run very nicely on a Prop-SX without any special hardware as the Prop-SX has and SX28 and a serial port.  Note that the code on the SX is in Basic (SX/B) but still moderately sophisticated as it is designed to send and receive serial data while refreshing the servos every 20 milliseconds -- this part is done in assembly language for the best performance.

My PC demo program for the project is a simple Visual Basic app (see below), but with the real-time control sorted I'm looking for ways to sync the servo and control outputs to an audio file.  Could be fun....



Anyone have suggestions for a cross-platform development tool for this kind of program?  I have a friend who suggests Java, I am leaning toward Python, and yet I'm open to other suggestions -- keep in mind, though, that the language you suggest must support serial communications.  As with the embedded programs we share here I'd like to do "community" PC-based projects for controlling props as well.  There are a lot of old, cheap PCs that could get new life as animatronic controllers using a Prop-2 or Prop-SX as the hardware interface.
Jon McPhalen
EFX-TEK Hollywood Office

DougLowe

I don't know anything about Python, but I would definitely look closely at the sound library. Java's standard sound library Javax.Sound is pretty sophisticated -- I haven't programmed with it much but I have looked at the specs & the programmer's guide to get a feel for what it can do. You need something that can do more than just load a sound and play it. In the crude scripting I've done with Frightmare Forest's Haunt Controller, the single most frustrating thing is that you can only play the script from the start, which makes it very time consuming to tweak the performance towards the end of the sound. To really do something cool like this, you need to be able to visually coordinate servo movements with the actual wave, and be able to play & replay just sections of the wave to test the results. Before you decide on Python, I'd look at what kind of support is available via the sound libraries.

As an alternative to all that complicated programming, I might be content to just have some random neck & eye movement, as long as the mouth in synced with the voice. This would simplify things a lot, might even eliminate the need for a PC.

Jon, I've been wondering about this -- is it possible to put an audio source on an input pin & use it to control a servo, to sync mouth movements with the audio?

Not knowing how to do this, the idea I was thinking of was to have a prop-2 or SX board and an AP-8 or other MP3 player, along with a Scarry Terry audio servo controller. The prop-2/SX board would play the sound when trigered and drive the neck & eye servos at random, while the output from the AP-8 would be fed into the audio servo controller to move the mouth.

But I bet there's a way to feed the audio output from the AP-8 back into one of the prop-2 or SX inputs to control the mouth servo.

Jeff, I might be interested in building something like this for next year as well -- though probably in the form of a mummy rather than a generic skull.

--Doug

gmacted

I like this idea as well, but only if the PC could be removed somehow.  I'm not really sure how this could be done however.  The skulltonix is incredible, but I don't like the idea that it needs to be controlled by a PC.

JonnyMac

You may have noticed that the Prop-SX has a big ol' 64K EEPROM on it.  Hmmm... I wonder if I can find a way to transfer the control elements from the PC through the Prop-SX's serial port into that EEPROM....
Jon McPhalen
EFX-TEK Hollywood Office

DougLowe

The Prop-SX sounds extraordinarily cool! Can't wait...

davisgraveyard

Let's see... I was thinking of it being self contained.  I didn't want to have a PC connected to it although I am not totally against the idea if it could be a laptop and I could run a LONG serial cable to it. 

I was planning on the routine being pre-recorded.  A 2-3 minute speach that pauses and then repeats.  This is for a buckey that will be sitting in the drivers seat of a horse draw hearse.  He will be wearing a tophat and a old tattered coat tails tux.  He will be talking to visitors about the graveyard.  There will be a speaker mounted near where the people stand to watch.  There will be a couple of LED spotlights pointed at his face that will light up when be begins his speach.

I know about the issues with the heavy bucky skull.   My plan is to use a 12V Stepper motor for the head turn which requires the most torque.  The tilt from side to side and nod front and back can be done with a set of rocker arms, push rods and a ball joint that won't require as much torque so a high torque servo should work.  The eyes could probably be done with a mino servo and the jaw should work with just a standard servo.

I'd prefer to manually record the head, eyes, and Jaw movements in sync with a sound file so I can get the movements just right.  The "Jaw flapper"  audio boards out there just don't look that real.   So I am going to need the ablity to do a one-time manual control and store the results and then just set a controller board to read from the recorded data and execute the movments as the sound is playing.









JonnyMac

The idea that I keep hint at above is that you'll program your servo movements in sync with an audio file and dump them into the Prop-SX EEPROM -- now it's stand-alone.  When you get a trigger, the Prop-SX starts your favorite audio player (that has the file you used to create the servo movements) and then starts moving the servos per your earlier programming.  You seem to want what I'm working toward (it's a lot of work though, so don't expect it next week...).
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

What about something a little more simplistic?  If I attached all the servos in the head to a RC Reciever and use a 5+ channel transmitter to "puppeteer" the head and then use the trainer cable to feed the realtime data to a PC for storage.  I could then write a program that processes the data into something that could be loaded onto the Prop-SX EPROM.    All we need for the data is +/- pulse and duration for each servo right?    I was envisoning a simple program in the Prop-SX that triggers the sound and starts moving the servios from the data.  When the data is finished there would be a 2-3 minute pause and the the program would loop again.

This is all theoretical but it seems simple?


gmacted

Quote from: JonnyMac on March 16, 2007, 03:13:12 PM
The idea that I keep hint at above is that you'll program your servo movements in sync with an audio file and dump them into the Prop-SX EEPROM -- now it's stand-alone.  When you get a trigger, the Prop-SX starts your favorite audio player (that has the file you used to create the servo movements) and then starts moving the servos per your earlier programming.  You seem to want what I'm working toward (it's a lot of work though, so don't expect it next week...).

I like your thinking Jon!

JonnyMac

If you could live with four servos and four digital outputs I could put that whole thing into the Prop-SX and never need a PC. 


Quote from: davisgraveyard on March 16, 2007, 03:42:20 PM
What about something a little more simplistic?  If I attached all the servos in the head to a RC Reciever and use a 5+ channel transmitter to "puppeteer" the head and then use the trainer cable to feed the realtime data to a PC for storage.  I could then write a program that processes the data into something that could be loaded onto the Prop-SX EPROM.    All we need for the data is +/- pulse and duration for each servo right?    I was envisoning a simple program in the Prop-SX that triggers the sound and starts moving the servios from the data.  When the data is finished there would be a 2-3 minute pause and the the program would loop again.

This is all theoretical but it seems simple?


Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

It's actually an easy program -- you restart the program in record mode and it blips the audio start output so you have something to sync with.  Then, every 20 ms or so it records the servo values coming in from the receiver and stores them along with the button presses.  In play mode it blips the output and then plays back the recorded information.  It's probably just few days coding and fine tuning.  Note that it will record or record everything at once; you'd have to add a bunch of interface hardware to the Prop-SX to allow it to record one channel at a time.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

NOW I get it.  You are talking about using a RC  Reciever as input and then outputing the signal to the servos sort of as a "pass through".   So you can just record the servo values.   Then when you are doing recording you can save the data to the controller.  I need to get busy building this head and getting my servos.  You'll have the software done before I am ready that is for sure.  Beside I guess we are waiting for the Prop-SX too.


JonnyMac

This conversation has become about apples and pears.  On one hand, I want to teach myself to do PC programming so I can animate digital and servo outputs on a PC and dump them down into a Prop-SX, or play them live, but still from the PC.

There seems to be some interest in connecting an RC receiver to a Prop-SX and recording the inputs from that and playing them back.  That's actually quite easy and done quite a bit.  It would actually be easier to skip the RC stuff and make a small interface circuit to read the data from two analog joysticks, but those are really hard to find these days.
Jon McPhalen
EFX-TEK Hollywood Office