Iron man motorised faceplate electronics tutorial!!!

Ok here is the code I have, its only set up to open and shut, i haven't finished it yet. I was just using this so i could get the motion smoothed out, but i need for servo 3 and 4 to run in reverse if it's possible.

Code:

#include <Servo.h>

Servo servo1; // create servo object to control a servo
Servo servo2; // create servo object to control a servo
Servo servo3; // create servo object to control a servo
Servo servo4; // create servo object to control a servo

int pos1; // angle of servo 1
int pos2; // angle of servo2
int pos3; // angle of servo3
int pos4; // angle of servo4
void setup()
{
servo1.attach(9); // attaches the servo on pin 9 to the servo head object
servo2.attach(10); // attaches the servo on pin 10 to the servo faceplae object
servo3.attach(11); // attaches the servo on pin 11 to the servo faceplate 2
servo4.attach(12); //attaches the servo on pin 12 to the servo head 2
}

void loop()
{
// Scene 1:
for (int i=0; i<45; i += 1) {
pos1 = 90 - i;
pos2 = 90 + (i*1);
pos3 = 90 + i;
pos4 = 90 - (i*1);

servo1.write(pos1);
servo2.write(pos2);
servo3.write(pos3);
servo4.write(pos4);
delay(15);
}

// Scene 2
for (int i=0; i<60; i += 1) {
pos1 = 170;
pos2 = 180;
pos3 = 170;
pos4 = 180;
servo1.write(pos1);
servo2.write(pos2);
servo3.write(pos3);
servo4.write(pos4);
delay(15);
}
}
 
Hey guys im back again to ask question. Lolol hahaha.

Does anyone here know how to control the speed of the servos using the commands shown on the first post? o_O tried to change



to



But it doesnt seem to have ANY difference? o_O


Where you have changed the 10's to 1's is the correct place to speed up the movement. However what you have done is slowed it down slightly (not enough to notice). The number refers to degrees of movement within an allocated time, NOT time taken to move. So the higher the degree of movement you set, the faster it will have to move in order to reach 180 within the given time. In order to speed it up may I suggest you change this number to 30 or 40. Ignore the comments suggesting add delays: this will just make the program wait longer before movement, however when it does eventually move it will be the same speed.
Please note: If you set the speed too high, the sudden jerk may damage the motors though, so move up slowly.

Good to see you all again by the way. Love ya all.
 
Last edited:
ImageUploadedByTapatalk1367252591.170442.jpg

Bought these from eBay. Looking through kids toys for ideas and found this awesome thing.

ImageUploadedByTapatalk1367252628.720405.jpg

The parts will work perfectly for attaching the faceplate to servos and helmet.
 
Nice! What type of set was this?
Nevermind. Second picture didn't load the first time I looked at the thread.
 
I'm curious what is the general concensus on the size of servo needed to lift the faceplate from beneath the "widows peak". I've seen some people who seem to have gotten by with a single micro servo, others have used a high torque micro, and some have used a standard, and some say that isn't even enough. I'm not really sure what to shoot for. The cheaper and smaller the better, but I dont' want to under shoot and have to buy another servo.
 
IMHO.. the micro plastics will NOT work..

but I suppose it depends on your specific prop.. what it was made form.. how thick/heavy...etc

if I was gooing for one, middle servo (like TheRealStark member here does)..

Id follow suit.. use a higher torque.. with METAL gears... (that lock or help lock it in place when not moving)
 
got some test servo's in finally..

and whipped up some of the eye pcb's I designed..


bottom side you solder wires too (transistor and resistors too)

IM_eyeCircuit_pics_-006_sized.jpg



Top side.. just some test leds in there.. (need to order some nice super bright 1206 white leds still)

IM_eyeCircuit_pics_-005_sized.jpg


IM_eyeCircuit_pics_-004_sized.jpg


IM_eyeCircuit_pics_-003_sized.jpg


IM_eyeCircuit_pics_-001_sized.jpg


these were designed to be used with an Arduino...(resistors are calculated based on the battery pack you are using)
 
I'm getting a bit frustrated here. My servo works fine when I hook it up to the arduino directly, but when I try to power it seperately via 4 AA batteries and a 5V rectifier, it just goes all the way to 180 and buzzes regardless of the input signal. What is the deal here. I have tried it with various battery packs and various rectifiers and not of them work. It only works when it is hooked to the arduino. What am I missing here?
 
Ok, I figured that out. The issue is my rectifier. I got a 6V rectifier assuming that it would attenuate any voltage above 6v to 6v. But the the rectifier converters 6V to 4.8V, which is barely enough to make the servo turn, and results in the buzzing. If I hook it up to 9V, it pumps out about 5.8V and everything works fine. But I don't want to use a 9V battery, because it will die crazy fast. Is this typical rectifier behavior?
 
Back
Top