Iron man motorised faceplate electronics tutorial!!!

Hey guys and girls. I've been away for a while due to having the attention span of a gold fish. I have edited the first post to include xI97's code and schematic with credits to him. And member's schematic and credits which works with my own code.

As an added project, as if life wasn't complicated enough already, I've been looking into working out how to install jet streams under the flight stabilisers as seen in Master Le's mk7 costume. My first idea uses one of these: COMPRESSED AIR DUSTER, attached to a split hose. The problem is coming up with a solution to electronically start the compressed air can… something like THIS GUYS SUB ZERO FREEZE BLASTER THING. You can see it in action HERE. His build thread is HERE.

My next idea is to use ECigs which are much smaller, easier to build, give a much better smoke effect but no spray. Tutorials can be found HERE and HERE.

Slightly off topic i know, but still fun to look at.

If there's anything else that i need to put in the first post and any further credits i should add, please let me know.
 
I use this set:

2X Protected Trustfire 2200mA/h 3.7V, 18650 Li-Ion cells
1X 18650 holder (enclosure)
1x protected 18650 charger

http://i3.photobucket.com/albums/y87/oozi/20130513_172007_zps6006a023.jpg

$10.00 total.

So are these safe to use as long as they are 'protected'? I was eyeing a similar approach but had concerns after seeing things like this: Ultrafire 18650 3000mA exploded

The idea of mounting something near my forehead that can do that kind of damage scares me.
 
So are these safe to use as long as they are 'protected'? I was eyeing a similar approach but had concerns after seeing things like this: Ultrafire 18650 3000mA exploded

The idea of mounting something near my forehead that can do that kind of damage scares me.

While searching for this type of battery, i found a place where it said not to buy any of these batteries if the name had "fire" in it

Sent from my HTC One X+ using Tapatalk 2
 
While searching for this type of battery, i found a place where it said not to buy any of these batteries if the name had "fire" in it

Sent from my HTC One X+ using Tapatalk 2

Yeah, I've heard mixed things as well. Honestly I'm finding battery/power selection much more difficult than Arduino programming/circuit wiring in this process.
 
I have bought 2 18650 Ultrafire batteries in Germany. If they werent safe, they would not be allowed to sell them there!

I have a problem with my servos thoug. I first tried using the Towerpro MG90s, the worked on my setup but were not really strong enough too easily lift my fibreglass faceplate. Thats why i ordered 2 new Blue Bird BMS 380. BUT THEY DONT DO Anything. There is no movement what so ever when press my switch.

What could be the problem? They reseller told me it was pulse code modulation or something, but i dont understand. I have a regulated 5V power suplly and the requirements for both servos are equal?
Someone any ideas?

Also, how did you guy go from the breadboard to the actual setup inside the helmet. I dont know were to begin welding all the parts. Did you ordere a PCB board, or make one yourself? Tips tricks pls.
 
Also, how did you guy go from the breadboard to the actual setup inside the helmet. I dont know were to begin welding all the parts. Did you ordere a PCB board, or make one yourself? Tips tricks pls.

If you're going from an Arduino Uno to an Arudino Nano/Mini the pins should be labelled the same, but you have to solder wires to their respective pins (where you only had to stick jumper wires in holes with the Uno/breadboard). Here's an example (not from this setup): http://api.ning.com/files/A*62JbAg9...gIEpXTP3kZhn9rflRhwRRI*Ge9hUULZZ/P4200034.JPG
 
If you're going from an Arduino Uno to an Arudino Nano/Mini the pins should be labelled the same, but you have to solder wires to their respective pins (where you only had to stick jumper wires in holes with the Uno/breadboard). Here's an example (not from this setup): http://api.ning.com/files/A*62JbAg9...gIEpXTP3kZhn9rflRhwRRI*Ge9hUULZZ/P4200034.JPG

I have the nano, and every pin has been pre-soldered. I mean more like how to solder the Vreg and transistors and resistors and so.
 
I have the nano, and every pin has been pre-soldered. I mean more like how to solder the Vreg and transistors and resistors and so.

Personally I just wrap the wire around the 'arm' of the resistor and apply the solder. Sort of like this: http://www.the370z.com/members/equi...ed-online-you-will-need-two-one-each-seat.jpg

The breadboard is just a middle man for testing temporary connections, so if you had a led wire on 10d and a resistor wire on 10e, then in your actual wiring you would just solder that LED wire and resistor wire together.
 
I was just coming back here to ask that exact question - getting from testing on the UNO to something to actually put in the helmet. So just basically grab an uno - upload the same code and attach the wires as required? Cool.

Thanks.
 
hi guys, it might be a silly question to ask but i would like to know if i want to connect my wire like this, do i have to change wire size?
Irondummie_zpse67bfbe8.jpg
 
Hi Guys, i made a sketch using Fritzing.

Could someone please check it, maybe change it or clean i up for me.
Here you can see my sketch. If you PM me your email adress, i could email the original Fritzing file.
fritzing overview.jpg

My basic setup is:
18650 7.4V battery
Arduino Nano V3
5V Regulator
Push Switch with resistor
2x Servo. Towerpro MG90s or Blue Bird BMS380 (cant seem to get the last one up and running. the pulse range is different)
2x 5V Led Panel connectot to NPN transintor with resistant

Please help
 
Hi, Just thought I would put my input into this thread! I have modified xI97's code to run on a ATTiny 85. This is a 8 pin chip that runs without any external support. No Crystals or such. Has 6 inputs/ outputs and 3 PWM pins. Its about £2 here in the UK and would be far better than the Pro Mini being used. Waaaay smaller too. I also removed the need for two pins for the eyes but kept the dual transistors though. I have tested it and it works but if you come across any bugs let me know! :)


Heres the code:

You will need to install the 8bit servo library from here: » ATtiny45/85 Servo Library Cunning Turtle

//Based on xI97's code on The RPF.

//Pin 3 = Button
//Pin 4 = LEDs
//Pin 5 = Servo 1
//Pin 6 = Servo 2

#include <Servo8Bit.h>

//servo object names
Servo8Bit myservo; // create servo object to control a servo
Servo8Bit myservo1;

const int buttonPin = 3; // the pin that the pushbutton is attached to
int buttonState = 0; // current state of the button
int lastButtonState = 0; // previous state of the button


// led control pins (need to be PWM enabled pins for fading)
const int Eye = 4; // the number of the left eye/pcb LEDs

unsigned long fadeDelay = 10; //speed of the eye 'fade'
unsigned long callDelay = 700; //length to wait to start eye flicker after face plate comes down
unsigned long blinkSpeed = 100; //delay between init blink on/off
unsigned long currentPWM = 0;
boolean isOpen = true;

#define S_IDLE 1
#define S_LEDON 2
#define S_WAITON 3
#define S_LEDOFF 4
#define S_WAITOFF 5
#define S_INITON 6
#define S_INITWAIT 7
#define S_BLINKON 8
#define S_SERVOUP 9
#define S_SERVODOWN 0
#define S_SERVOWAIT 10



//FSM init vars
static int state = S_IDLE; // initial state is 1, the "idle" state.
static unsigned long lastTime; // To store the "current" time in for delays.


void setup() {

//start it off
state = S_BLINKON;


myservo.attach(5); // attaches the servo on pin 9 to the servo object
myservo1.attach(7); // attaches the servo on pin 10 to the servo object

pinMode(buttonPin, INPUT); // initialize the button pin as a input
digitalWrite(buttonPin, HIGH); //use interal pull up resistors
}

void loop() {
switch(state)
{
case S_IDLE:
// We don't need to do anything here, waiting for a forced state change...like button press.
//check mian button state
buttonState = digitalRead(buttonPin);

// compare buttonState to previous state
if (buttonState != lastButtonState) {
//if button pressed/down
if (buttonState == LOW){
//ie: pressed
if(isOpen == true){
state = S_SERVODOWN;
}
else{

//state = S_SERVOUP;
state = S_LEDOFF;
}
isOpen = !isOpen;
}
else{
//went from ON/HIGH to LOW/OFF..ie: released
//Serial.print("RELEASE: ");
//Serial.println(isOpen, DEC);
}
}
// save the current state for next loop
lastButtonState = buttonState;
break;

case S_BLINKON:
//do blink routine here
//one blink
analogWrite(Eye, 155);
delay(blinkSpeed);
analogWrite(Eye, 0);
delay(10);
//two blinks

analogWrite(Eye, 155);
delay(blinkSpeed);
analogWrite(Eye, 0);
delay(10);

//one blink
analogWrite(Eye, 155);
delay(blinkSpeed);
analogWrite(Eye, 0);
delay(10);
//two blinks

analogWrite(Eye, 155);
delay(blinkSpeed);
analogWrite(Eye, 0);
delay(50);

state = S_LEDON;
break;

case S_LEDON:
lastTime = millis(); // Remember the current time
analogWrite(Eye, currentPWM);
state = S_WAITON; // Move to the next state
break;

case S_WAITON:
// If one second has passed, then move on to the next state.
if(millis() > (lastTime + fadeDelay)){
if(currentPWM < 255){
currentPWM += 5;
state = S_LEDON;
}
else{
state = S_IDLE;
//state = S_LEDOFF; //no auto turn off.. set to idle state
}
}
break;

case S_LEDOFF:
lastTime = millis(); // Remember the current time
analogWrite(Eye, currentPWM);
state = S_WAITOFF;
break;

case S_WAITOFF:
// If one second has passed, then move on to the next state.
if(millis() > (lastTime + 0.5)){
if(currentPWM > 0){ //change 0 to higher number to init face 'up' function sooner.
currentPWM -= 1;
state = S_LEDOFF;
}
else{
state = S_SERVOUP; //leds off..raise faceplate
}
}
break;

case S_SERVOUP:
myservo.write(100);
myservo1.write(100);
state = S_IDLE;
break;

case S_SERVODOWN:
lastTime = millis(); // Remember the current time
myservo.write(0);
myservo1.write(0);
state = S_SERVOWAIT;
break;

case S_SERVOWAIT:
// If enough time has passed, call the eye flicker routine
if(millis() > (lastTime + callDelay)){
state = S_BLINKON;
}
else{
}
break;

default:
state = S_IDLE;
break;
}
}


Callum :)
 
Hi, Just thought I would put my input into this thread! I have modified xI97's code to run on a ATTiny 85. This is a 8 pin chip that runs without any external support. No Crystals or such. Has 6 inputs/ outputs and 3 PWM pins. Its about £2 here in the UK and would be far better than the Pro Mini being used. Waaaay smaller too. I also removed the need for two pins for the eyes but kept the dual transistors though. I have tested it and it works but if you come across any bugs let me know! :)


Heres the code:

You will need to install the 8bit servo library from here: » ATtiny45/85 Servo Library Cunning Turtle




Callum :)

Awesome!
Do you have some video to see results? I am interested on a cheap solution than Arduino


Enviado desde mi iPhone con Tapatalk
 
could some one help me write a program for pololu
what I want it to do is when I push a button frame 1 plays and when I push it again frames 2-9 play and a course it stay their until I push the button again and back to 1 or edit a code I already have
please and thank you
 
Last edited:
off the wall ideas:
maybe use RBG leds for the eyes?

I feel generous today

Hey guys! :D
I just went thru the full 55 pages before asking, to be sure it's not a repeated question:

What would be your take on wiring RGB leds for the eyes?
and how would someone trigger the change between colors? (white to red / red to white)

.. and just to complicate things a bit, since you guys are more than capable, I'm sure:
would there be a way to fade from white to red, rather than "switching" color all of a sudden?

many, many thanks in advance.. :cheers
 
you would use 1 pin for each color instead of the one pin to control the 1 color.


If you wanted to 'fade' then you would make sure the pins you use are PWM capable pins..

there are several on the Arduino.

the problem you face (like all led projects & Arduino).. is how to power it? and what leds you wanna use. .. unless you want to light-up only 1 small led (color) you need to power it from something other than the Arduino. The Arduino can only kick out about 20-40mA per pin.. (and 200mA? total for the board), most likely a batter source of some kind directly. The Arduino is really used more or less as a go between, to toggle/control the power going to the higher mA requirement/demand of the 'device' (high power leds, or multiple leds etc)

this is what you have been seeing in the diagrams running around in this thread. :)

keep in mind, if (for example) your RGB LED has requirements of: 350mA:RED 350mA:BLUE 350mA:GREEN

you will need a battery source that can supply enough current to run more than one color/channel at a time (the fading you mentioned/PWM)...

with all channels/colors were on full current ("white")... thats 1050mA (over 1 amp)..

keep that in mind for whatever your led requirements are.. what your using in your project..etc :)

take care!
 
Back
Top