Hey guys. Well as im sure you all know, the electronics for the motorised faceplate in the iron man helmet are as rare as rocking horse ****.
Like many of you, I searched all over the internet for the code and a full tutorial, but its nowhere to be found. Certain individuals are happy to build the equipment, but not so happy to share the knowledge. Well over the past few weeks I have been taking various pieces of code and stitching them together and have finally come up with a solution I am happy with, and I'm ready to share this information with you.
This tutorial is my interpretation of the electronics and code required for a fully motorised faceplate including light up eyes. The code has a slight delay so that once the faceplate closes the eyes take a second to come on. Once open the eyes turn off again.
This tutorial only shows the breadboard stages so far but this post will be updated each time new information is provided. What i have supplied is a MASSIVE foundation for you all. This is purely designed to get all the coding and the order of components out of the way.
Moving from the breadboard into the helmet is something we can work on together.
Here's a quick video showing what i have achieved
Iron man faceplate and eyes arduino - YouTube
This is written for people that have absolutely no idea of electronics (just like me)
For this you will need:
Arduino UNO + USB cable (available on ebay or many electronics suppliers)
Arduino software (available here)
2 servo motors
1 LED
1 push button
1 10ohm resistor
1 breadboard
13 breadboard cables
Observations:
First lets take a look at the Bread board. Down each side of the bread board you will notice a red line and a blue line. Next to the red line running down the board are lots of holes. These are all connected together and will act as our positive power rail.
The the holes running down next to the blue line will act as our negative ground rail. Again all the ports running in a line parallel to this blue line are connected.
Next you will notice numbers and letters on the board. Each numbered row is connected across the board instead of down this time. So 1a 1b 1c 1d 1e are all connected together. Next there is a split in the board. Anything after this split is seperate. So 1f 1g 1h 1i 1j are again connected to each other but not connected to the ports the other side of the split.
Now take a look at the Arduino UNO. Please navigate it so that the USB cable is furthest from you. On the right of the board you will notice numbers from 0 to 13. For this tutorial those are signal ports and shall be referred to as such. On the left side of the board the only things you need to be aware of for this tutorial are the 5v port and the GND port. These are for our power.
Lets begin
Ok this is pretty complicated so double check check each stage before moving on to the next.
Here is what you are aiming for:
![]()
1) Run a cable from the 5v port of Arduino UNO to the positive RED rail running down the side of the breadboard
2) Run a cable from the Gnd port in arduino uno to the negative blue rail of the breadboard
3) Bend the longer leg on the LED so it is the same length as the shorter leg.
4) Insert shorter leg of LED (negative) into 11a on the breadboard.
5) Insert longer leg of LED (positive) into 14a of bread board.
6) Insert one leg of resistor into 25f on breadboard.
7) Insert the other leg of resistor into 20f on breadboard
8) Please notice the switch has 2 legs on one side and 2 legs on the other. The 2 legs per side are connected together. So orientate the switch so that 2 legs face up the breadboard, and 2 legs face down.
9) Legs should be inserted into the breadboard at: 25g, 25i, 28i, 28g. If the switch does not fit in these spaces turn it 1 quarter of a turn.
10) Examine the cables on the servo. There should be a red cable, a black cable and a white cable. Red is positive, black is ground, and white is signal.
11) Run a cable from red on servo 1 to the red rail on the breadboard
12) Run a cable from black on servo 1 to the blue rail on breadboard
13) Run a cable from white on servo 1 to signal port 9 on the right of Arduino.
14) Run a cable from red on servo 2 to the red rail on the breadboard
15) Run a cable from black on servo 2 to the blue rail on the breadboard
16) Run a cable from white on servo 2 to signal port 10 on Arduino.
17) Run a cable from 14c to signal port 5 on arduino (this should be connected to the positive leg on LED, PLEASE CHECK!)
18) Run a cable from 11e to the negative rail on breadboard (this should be the negative leg on LED, PLEASE CHECK!)
19) Run a cable from 20g to negative rail on breadboard (this should be connected to 1 leg of the resistor PLEASE CHECK!)
20) Run a cable from 28f to the positive rail on the breadboard (this should be connected to switch)
21) Run a cable from 25j to signal port 2 on breadboard (this should be connected to other side of switch and resistor.
22) YOUR DONE!!! Well done, now give yourself a big pat on the back.
![]()
![]()
![]()
Now start up the Arduino software and connect you Arduino UNO to the computer via the supplied USB cable.
Wait for your computer to install the Arduino Uno if it hasnt already.
Now copy this code and paste it into your arduino software:
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo1;
const int buttonPin = 2; // the pin that the pushbutton is attached to
const int ledPin = 5; // the pin that the LED is attached to
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button
int ledState = 0; // remember current led state
int pos = 0; // variable to store the servo positions
int pos1 = 180;
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.attach(10); // attaches the servo on pin 10 to the servo object
pinMode(buttonPin, INPUT); // initialize the button pin as a input
pinMode(ledPin, OUTPUT); // initialize the button pin as a output
}
void loop()
{
buttonState = digitalRead(buttonPin); // read the pushbutton input pin
if (buttonState != lastButtonState) // compare buttonState to previous state
{
if (buttonState == 1)
{
if(ledState == 1)
{
delay(30); ledState = 0;
for(pos = 0; pos <= 180; pos += 10) // goes from 0 degrees to 180 degrees
{ // in steps of 10 degrees
myservo.write(pos); // tell servo to go to position 'pos'
}
for(pos1 = 180; pos1 >= 0; pos1 -= 10) // goes from 180 degrees to 0 degrees
{ // in steps of 10 degrees
myservo1.write(pos1); // tell servo to go to position 'pos1'
}
delay(15); // waits 15ms for the servo to reach the position
}
else
{
delay(30); ledState = 1;
for(pos = 180; pos >= 0; pos -= 10) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position 'pos'
}
for(pos1 = 0; pos1 <= 180; pos1 += 10) // goes from 0 degrees to 180 degrees
{
myservo1.write(pos1); // tell servo to go to position 'pos1'
}
delay(1000);
}
}
lastButtonState = buttonState; // remember the current state of the button
}
// turns LED on if the ledState =1 or off if ledState = 0
digitalWrite(ledPin, ledState);
myservo.write(pos); // goes from 0 degrees to 180 degrees
myservo1.write(pos1); // goes from 180 degrees to 0 degrees
delay(20);
}
Click the arrow at the top of the software which will upload this code to the Arduino, then wait for it to say "done" at the bottom of the screen.
Testing:
Leave the board connected to the computer and press the switch on the breadboard.
1) First button press powers up the system and turns eye lights on (1.5 second delay), no movement will be seen.
2) Second button press rotates servos and turns off eye light, this is the faceplate opening.
3) Third button press rotates servos in opposite direction, then 1 second delay and light turns on. This is the faceplate closing and eye lights turning on.
You may notice a vibrating noise once the servos have reached their resting positions. I have been informed this is normal but Im not sure how reliable that information is. If anybody has a fix, please let me know.
Id like to give a massive thank you to ironleoman for his continued help throughout putting this together. He's been giving me the much needed kick up the arse to get this done so we can share it with you guys.
IDEAS
Some ideas for you to think of: Id like the eyes to flicker before coming on to mimic powering up... Could anyone modify the code to make this happen? Is anyone able to shut off power to the servos when they are in their resting positions to stop the buzzing noise? Feel free to modify this code and post your own findings. From this point on we're working together.
Circuit without eyes:
If you dont wish to have the eye lights in your circuit, please skip steps 3,4,5 and 17
First button press powers up the system, no movement will be see. Second button press and every botton press thereafter will move the servos.
Flight Stabilisers:
This code can also be used for the flight stabilisers on the back of the Iron Man armour. If you would like me to write 2 more servos into the code for all 4 flight stabilisers, please comment in the thread.
Quick glance at installation
This is the same installation method I intend on using, minus the jaw:
Faceplate
Close up
Like many of you, I searched all over the internet for the code and a full tutorial, but its nowhere to be found. Certain individuals are happy to build the equipment, but not so happy to share the knowledge. Well over the past few weeks I have been taking various pieces of code and stitching them together and have finally come up with a solution I am happy with, and I'm ready to share this information with you.
This tutorial is my interpretation of the electronics and code required for a fully motorised faceplate including light up eyes. The code has a slight delay so that once the faceplate closes the eyes take a second to come on. Once open the eyes turn off again.
This tutorial only shows the breadboard stages so far but this post will be updated each time new information is provided. What i have supplied is a MASSIVE foundation for you all. This is purely designed to get all the coding and the order of components out of the way.
Moving from the breadboard into the helmet is something we can work on together.
Here's a quick video showing what i have achieved
Iron man faceplate and eyes arduino - YouTube
This is written for people that have absolutely no idea of electronics (just like me)
For this you will need:
Arduino UNO + USB cable (available on ebay or many electronics suppliers)
Arduino software (available here)
2 servo motors
1 LED
1 push button
1 10ohm resistor
1 breadboard
13 breadboard cables
Observations:
First lets take a look at the Bread board. Down each side of the bread board you will notice a red line and a blue line. Next to the red line running down the board are lots of holes. These are all connected together and will act as our positive power rail.
The the holes running down next to the blue line will act as our negative ground rail. Again all the ports running in a line parallel to this blue line are connected.
Next you will notice numbers and letters on the board. Each numbered row is connected across the board instead of down this time. So 1a 1b 1c 1d 1e are all connected together. Next there is a split in the board. Anything after this split is seperate. So 1f 1g 1h 1i 1j are again connected to each other but not connected to the ports the other side of the split.
Now take a look at the Arduino UNO. Please navigate it so that the USB cable is furthest from you. On the right of the board you will notice numbers from 0 to 13. For this tutorial those are signal ports and shall be referred to as such. On the left side of the board the only things you need to be aware of for this tutorial are the 5v port and the GND port. These are for our power.
Lets begin
Ok this is pretty complicated so double check check each stage before moving on to the next.
Here is what you are aiming for:

1) Run a cable from the 5v port of Arduino UNO to the positive RED rail running down the side of the breadboard
2) Run a cable from the Gnd port in arduino uno to the negative blue rail of the breadboard
3) Bend the longer leg on the LED so it is the same length as the shorter leg.
4) Insert shorter leg of LED (negative) into 11a on the breadboard.
5) Insert longer leg of LED (positive) into 14a of bread board.
6) Insert one leg of resistor into 25f on breadboard.
7) Insert the other leg of resistor into 20f on breadboard
8) Please notice the switch has 2 legs on one side and 2 legs on the other. The 2 legs per side are connected together. So orientate the switch so that 2 legs face up the breadboard, and 2 legs face down.
9) Legs should be inserted into the breadboard at: 25g, 25i, 28i, 28g. If the switch does not fit in these spaces turn it 1 quarter of a turn.
10) Examine the cables on the servo. There should be a red cable, a black cable and a white cable. Red is positive, black is ground, and white is signal.
11) Run a cable from red on servo 1 to the red rail on the breadboard
12) Run a cable from black on servo 1 to the blue rail on breadboard
13) Run a cable from white on servo 1 to signal port 9 on the right of Arduino.
14) Run a cable from red on servo 2 to the red rail on the breadboard
15) Run a cable from black on servo 2 to the blue rail on the breadboard
16) Run a cable from white on servo 2 to signal port 10 on Arduino.
17) Run a cable from 14c to signal port 5 on arduino (this should be connected to the positive leg on LED, PLEASE CHECK!)
18) Run a cable from 11e to the negative rail on breadboard (this should be the negative leg on LED, PLEASE CHECK!)
19) Run a cable from 20g to negative rail on breadboard (this should be connected to 1 leg of the resistor PLEASE CHECK!)
20) Run a cable from 28f to the positive rail on the breadboard (this should be connected to switch)
21) Run a cable from 25j to signal port 2 on breadboard (this should be connected to other side of switch and resistor.
22) YOUR DONE!!! Well done, now give yourself a big pat on the back.



Now start up the Arduino software and connect you Arduino UNO to the computer via the supplied USB cable.
Wait for your computer to install the Arduino Uno if it hasnt already.
Now copy this code and paste it into your arduino software:
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo1;
const int buttonPin = 2; // the pin that the pushbutton is attached to
const int ledPin = 5; // the pin that the LED is attached to
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button
int ledState = 0; // remember current led state
int pos = 0; // variable to store the servo positions
int pos1 = 180;
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.attach(10); // attaches the servo on pin 10 to the servo object
pinMode(buttonPin, INPUT); // initialize the button pin as a input
pinMode(ledPin, OUTPUT); // initialize the button pin as a output
}
void loop()
{
buttonState = digitalRead(buttonPin); // read the pushbutton input pin
if (buttonState != lastButtonState) // compare buttonState to previous state
{
if (buttonState == 1)
{
if(ledState == 1)
{
delay(30); ledState = 0;
for(pos = 0; pos <= 180; pos += 10) // goes from 0 degrees to 180 degrees
{ // in steps of 10 degrees
myservo.write(pos); // tell servo to go to position 'pos'
}
for(pos1 = 180; pos1 >= 0; pos1 -= 10) // goes from 180 degrees to 0 degrees
{ // in steps of 10 degrees
myservo1.write(pos1); // tell servo to go to position 'pos1'
}
delay(15); // waits 15ms for the servo to reach the position
}
else
{
delay(30); ledState = 1;
for(pos = 180; pos >= 0; pos -= 10) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position 'pos'
}
for(pos1 = 0; pos1 <= 180; pos1 += 10) // goes from 0 degrees to 180 degrees
{
myservo1.write(pos1); // tell servo to go to position 'pos1'
}
delay(1000);
}
}
lastButtonState = buttonState; // remember the current state of the button
}
// turns LED on if the ledState =1 or off if ledState = 0
digitalWrite(ledPin, ledState);
myservo.write(pos); // goes from 0 degrees to 180 degrees
myservo1.write(pos1); // goes from 180 degrees to 0 degrees
delay(20);
}
Click the arrow at the top of the software which will upload this code to the Arduino, then wait for it to say "done" at the bottom of the screen.
Testing:
Leave the board connected to the computer and press the switch on the breadboard.
1) First button press powers up the system and turns eye lights on (1.5 second delay), no movement will be seen.
2) Second button press rotates servos and turns off eye light, this is the faceplate opening.
3) Third button press rotates servos in opposite direction, then 1 second delay and light turns on. This is the faceplate closing and eye lights turning on.
You may notice a vibrating noise once the servos have reached their resting positions. I have been informed this is normal but Im not sure how reliable that information is. If anybody has a fix, please let me know.
Id like to give a massive thank you to ironleoman for his continued help throughout putting this together. He's been giving me the much needed kick up the arse to get this done so we can share it with you guys.
IDEAS
Some ideas for you to think of: Id like the eyes to flicker before coming on to mimic powering up... Could anyone modify the code to make this happen? Is anyone able to shut off power to the servos when they are in their resting positions to stop the buzzing noise? Feel free to modify this code and post your own findings. From this point on we're working together.
Circuit without eyes:
If you dont wish to have the eye lights in your circuit, please skip steps 3,4,5 and 17
First button press powers up the system, no movement will be see. Second button press and every botton press thereafter will move the servos.
Flight Stabilisers:
This code can also be used for the flight stabilisers on the back of the Iron Man armour. If you would like me to write 2 more servos into the code for all 4 flight stabilisers, please comment in the thread.
Quick glance at installation
This is the same installation method I intend on using, minus the jaw:
Faceplate
Close up