Lifesize Poseable Animatronic Endoskeleton
by robotoys in Circuits > Robots
15756 Views, 100 Favorites, 0 Comments
Lifesize Poseable Animatronic Endoskeleton
What you'll need.
Large Diameter PVC pipes
Large Double Compression Fitting
Smaller Diameter PVC Pipes
Smaller Double Compression T Fitting
Plastic Waste Basket
Plastic Tub
4 Single PVC Compression Fittings
Assorted PVC Fittings
Toy Robot Hands
Foam Skull
Silver Paint
Ductape
PVC Glue
Arduino
Motor Shield
Stepper Motor
Optical Sensors
Building the Torso Structure With Rotating, Lockable Shoulders and Hips
The shoulder compression fitting is a T with a threaded center tap. The larger diameter spine attaches to the center of the shoulder T fitting with a threaded reducing coupler. I chose a larger diameter fitting for the hips that was not available as a T. I made it into a T by splitting a standard, gluable T fitting lengthwise and gluing the T side to the compression fitting. This larger T compression fitting is attached to the bottom of the spine.
The threaded shoulder fitting is not glued to the spine. It provides limited rotation of the entire shoulder assembly around the spinal column.
Fashioning the Chest and Pelvis.
The pelvis is fashioned by cutting a front notch in a plastic tub. Add holes in the sides of the tub to pass hip pipes through and into the hip compression fittings. I placed a large diameter hardwood dowel through the hip pipes and central fitting to help support the weight of the body.
Building the Arms
The arms are fashioned from smaller diameter PVC pipes and fittings. Start with a 90 degree elbow at the end of the shoulder pipe. Next connect a single threaded compression fitting to provide a 2nd axis of shoulder rotation that is orthogonal to the compression fitting at the top of the spine. On the other side of the new compression fitting add another 90 elbow fitting. The upper arm pipe is then attached. The two orthoganal compression fittings allow the arm to rotate forward and back, and out to the side. Simply loosen the compression fitting cap to free the joint, pose the shoulder, and tighten the compression caps to lock the joints.
At the free end of the upper arm add another 90 elbow and another single compression fitting to form the elbow joint. Rather than a simple 90 elbow bend to connect the lower arm to the compression fitting , I chose to use two 45 degree elbows after the 90 degree elbow. This staggered bend helps to realign the forearm pipe with the upper arm.
Add Legs
I chose to use another pair of 45 degree fittings to fashion each knee. This unglued 45 swivel allows the knee to place the leg in a long or right angle position.
Add the lower leg pipe, a T to form an ankle, and a piece of pipe to form the foot. I used a heat gun to soften and flatten the toes.
The Endoskull
A motor shield on an Arduino controls a stepper motor attached to the bottom of the skull. The control sketch polls the values of two optical resistors mounted on the sides of the jaw. The stepper turns the skull towards the sensor with the brightest light. The sketch calibrates the two sensors at each reboot which defines what the skull considers the center point and neutral illumination.
An LED for each eye socket is connected to one of two motor winding drives on the shield, causing the eyes to wink as the motor steps back and forth.
Finishing Details
Some braided stainless plumbing lines were added to simulate power lines. Foil backed rigid foam was used to fashion dimensional pieces for the limbs.
The spine pipe was dressed up with foam blocks wrapped in duck tape to simulate the segments.
The Light Seeking Arduino Sketch
The following code embodies the Arduino sketch for seeking a bright light with a stepper motor.
/*
Stepper Motor Control - hunt to find a strong light source This program drives a unipolar or bipolar stepper motor. The motor is attached to digital pins 8 - 11 of the Arduino. The motor should revolve one revolution in one direction, then one revolution in the other direction. Created by Scott Turnbull October 30, 2014 */
#include
const int stepsPerRevolution = 72; // change this to fit the number of steps per revolution // for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8,11,12,13);
int sensorPin = A4; // select the input pin for the photoresistor
int sensorPin2 = A5; // select the input pin for 2nd photoresistor
int sensorValue = 0; // variable for light input value
int sensorValue2 = 0; // variable for 2nd light input value
int sensecalibrate = 0; // a value to calibrate matched sensor values
int sensorValue_old = 0; // previous value from sensor
int stepvalue = 2; // step value to move
int stepbump = stepvalue; // value (with sign) to move each update
int stepmax = stepsPerRevolution/4; // how far to sweep to either side
int steptally = 0; // keep count of steps from initial position
void setup() {
// set the speed at 5 rpm:
myStepper.setSpeed(5); // initialize the serial port:
Serial.begin(9600);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
digitalWrite(9,HIGH);
digitalWrite(10,HIGH);
sensorValue = analogRead(sensorPin);
sensorValue2 = analogRead(sensorPin2);
sensecalibrate = sensorValue - sensorValue2;
}
void loop() { // read the value from the sensor:
sensorValue = analogRead(sensorPin);
sensorValue2 = analogRead(sensorPin2)+sensecalibrate;
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print("Sensor Value 2: ");
Serial.println(sensorValue2); //Serial.print(" Step Tally:"); //Serial.println(steptally);
// if light is stronger, keep moving in that direction
if ( sensorValue > sensorValue2 ){
if ( abs(steptally+stepvalue) < stepmax ) {
myStepper.step(stepvalue);
steptally = steptally + stepvalue;
} else {
myStepper.step(-10);
steptally = steptally -10;
}
} else {
// if light is dimmer, switch direction, and double back
stepbump = 0-stepvalue;
if ( abs(steptally+stepbump) < stepmax ) {
myStepper.step(stepbump);
steptally = steptally + stepbump;
} else {
myStepper.step(10);
steptally = steptally +10;
}
}
delay(400);
}