Iron man motorised faceplate electronics tutorial!!!

zman88a -

thanks!

Im still learning too.. and read & ask questions.. and look at other designs and code/public libraries.. to 'get by'.. :)

Im not as smart of half of these guys out there! (but I still have fun with it!)

if you have any questions (that i can help with) about bringng it to the next level..

let me know.. I'll try to answer.. :)
 
Last edited by a moderator:
I know this is kinda late to the party, but I just finished building the simple LED with 2 servos circuit board. (very amateur and just copy and pasted exactly how you wrote it in the tutorial on page 1). When I push my tact switch pushbutton nothing happens.
These were the switches I purchased. I used both codes 1 and 2 (no flicker and flicker) and nothing happens.. The LED is lit and the motors kinda jiggle for a second when I first give the arduino power, but other than that I'm not sure.
Here is what I'm talking about in a horrible quality video.Confused - YouTube

Read the thread again, the answer you look for is a few pages back.
 
So I'm new to this forum but glad I joined because I am very confused. First off, very glad that this information is provided. Second, the part i'm confused about is wiring the leds into the original setup shown at the beginning of the thread. I have everything wired and ready to go except the leds for the eyes. I might of missed it in this thread but could someone possibly help me with this. Electronics just aren't my thing but i'm slowly learning.
 
instead of just wiring 1 or 2 leds directly to one leg of the led and the other to your power source..

you now need to use a transistor..

your arduino controls/toggles the transistor that in turn allows power/current through to the leds.

there are a couple diagrams posted on it here as well...

it depends on the specific transistor you pick/use to what pins go to what wires.. they do not all have the same pinout. (just an FYI)
 
Heej guys, my setup is almost ready! I received the leds. Really nice and bright wenn working on the regulated 5V.

Just 1 more thing....
How do i connect & What kind of transistor do i need between my 5v led panels - the Arduino port - and the 5v controlled power supply. (to use it as a switch for on/off and fade)

Because if i just connect it to the 5v and ground they continiously shine... And the arduino only supplys 3.4V.
 
Hi everyone,

First time poster - and I want to say thank you to everyone who put this tutorial together. I built a Mark IV our of foam a couple of months ago and have recently wanted to build a fiberglass motorized helmet, and that's how I came across this page.

I've assembled the Arduino Uno and the breadboard to power-up with the code that has the LED blink, then fade up.

I've only come across one problem: When I press the switch, nothing happens. I've tried a few different mm sized switches, but same thing. So I tried something random: I physically removed the switch from the breadboard, and that cause the LED to flicker and the servos to operate. Everytime I removed and inserted the switch, it operated as though I were physically pressing the button on the switch.

Why would this happen? Did I do something wrong? Also, I'm looking to move to the Arduino Mini for the helmet, but wanted to make sure everything worked properly on Uno first. I read through 18 pages and found nothing on the topic. Please help. Thanks!

First time poster, first time Arduino user.
 
What Arduino do you have?

(most should supply +5v unless you have a +3.3v version of one of them)

how you connect a transistor depends on the one you pick/are using...

(several were posted)

one that allows enough current to flow through for your leds..

just remember transistors do NOT 'regulate' voltage/current... they allow it to pass through based on how 'open' the door is (controlled by the Arduino)

so use a voltage regulator BEFORE (and one that can provide enough current for your leds..etc)
 
What Arduino do you have?

(most should supply +5v unless you have a +3.3v version of one of them)

how you connect a transistor depends on the one you pick/are using...

(several were posted)

one that allows enough current to flow through for your leds..

just remember transistors do NOT 'regulate' voltage/current... they allow it to pass through based on how 'open' the door is (controlled by the Arduino)

so use a voltage regulator BEFORE (and one that can provide enough current for your leds..etc)

I have a arduino nano v3. Wich should provide 5 volts. But i have allready regulated a 7.4v lion pack to 5v. I tested just now but maybe with the 5v i might find the eyes too bright.

What do you guys think? The vrighter the beter?
 
1.) DO -NOT- regulate the battery source BEFORE the Arduino.. let the Arduino regulate the source itself (should have on-board voltage regulator...no?)

2.) DO regulate the battery source to +5v GOING TO/BEFORE THE: servos & transistor/eye leds

3.) Calculate resistor values based off (source voltage going TO transistor - voltage drop over transistor)

How do we get that?

well source voltage (after voltage regulator) is +5v....right?
the voltage DROP across the transistor is about .7 or so I guess?

so our 'source/supply' voltage is now +4.3v or so..

Use this calculator and fill in the blanks:

LED series parallel array wizard

Source Voltage: = +4.3v
Diode Forward Voltage (voltage your LED needs): = +3.2v *(check you specific LED datasheet though)
Diode Forward Current (current you want to supply your LED, max is usually 20mA): = 15mA
*Number of LEDS doesnt really pertain to you, but add it in anyways..since each led WILL get its own resistor)

calculator says: 82 Ohm valued resistors on each led...


Since you NOW know you are going to supply each led 15mA..

you can add this up.. (say 5 leds [per 'eye'] x 15mA = 75mA total needed per eye)

75mA per 'eye'..... times 2 x 'eyes'.. = 150mA total for the leds....

............now your starting to get an idea of your project requirements.

add in all your other components.. (servo x 2) and anything else you might add.. other accent leds? audio?...etc..etc..

then plan accordingly on your purchases for batteries & voltage/transistor usage..etc..

(servos can take a TON of current under load, depends on the model/brand/load..etc)



Im still confused as to how your only getting +3.4v from your Arduino? where are you metering from/at?

if I plug in my Arduino (Duemilanove 2009) board...and meter the +5v pads.. I get +5v?.. if I meter the +3.3v pad.. I get +3.3v on the meter?...
 
1.) DO -NOT- regulate the battery source BEFORE the Arduino.. let the Arduino regulate the source itself (should have on-board voltage regulator...no?)

2.) DO regulate the battery source to +5v GOING TO/BEFORE THE: servos & transistor/eye leds

3.) Calculate resistor values based off (source voltage going TO transistor - voltage drop over transistor)

How do we get that?

well source voltage (after voltage regulator) is +5v....right?
the voltage DROP across the transistor is about .7 or so I guess?

so our 'source/supply' voltage is now +4.3v or so..

Use this calculator and fill in the blanks:

LED series parallel array wizard

Source Voltage: = +4.3v
Diode Forward Voltage (voltage your LED needs): = +3.2v *(check you specific LED datasheet though)
Diode Forward Current (current you want to supply your LED, max is usually 20mA): = 15mA
*Number of LEDS doesnt really pertain to you, but add it in anyways..since each led WILL get its own resistor)

calculator says: 82 Ohm valued resistors on each led...


Since you NOW know you are going to supply each led 15mA..

you can add this up.. (say 5 leds [per 'eye'] x 15mA = 75mA total needed per eye)

75mA per 'eye'..... times 2 x 'eyes'.. = 150mA total for the leds....

............now your starting to get an idea of your project requirements.

add in all your other components.. (servo x 2) and anything else you might add.. other accent leds? audio?...etc..etc..

then plan accordingly on your purchases for batteries & voltage/transistor usage..etc..

(servos can take a TON of current under load, depends on the model/brand/load..etc)



Im still confused as to how your only getting +3.4v from your Arduino? where are you metering from/at?

if I plug in my Arduino (Duemilanove 2009) board...and meter the +5v pads.. I get +5v?.. if I meter the +3.3v pad.. I get +3.3v on the meter?...


1+2: I think i've got this part covered. I have the 7.4V battery connected to breadboard. (i posted a youtube vid a few posts back, you could see my setup there)

a) One cable runs directly to the arduino VIN port.
b) Also in the same row a setup with a VREG(+2x10uF) are attached wich converts to a regulated 5V.
c) From there a cable runs to the positive rail of the breadboard.
d) al grounds/negatives go to the same row.

So basically what i need is a transistor that just works as a switch between my power supply 5V and the 5V LED Panels (the led panels are 5V), for getting the flicker en glow effect.
As you said before, the Arduino is only used as a trigger, not as a power supply.

For the rest. servos work! switch works!
Audio... hm dont know if i want it now. i have bought a wishcard mechanism with Jarvis startup sequence recorded on it. Its powered by 3x LR1130 batterys (total 4.5V).
 
Depends on what you wanna do, shared cathodes or anodes... so you can pick up the best transistor for your project, if you follow what I am and xl97 is doing, then use a NPN transistor that fits your circuit consumption

I'm using the BC548, xl97 is using the BC81725

But all the transistors works as a trigger, and also like a pipe with a valve in the end of it, so depending on the PWM signal you are sending to the transistor it will open this valve a lot or just a little, letting it pass different amounts of current depending on the signal received.

hot to link them to your project you can find here:

http://www.therpf.com/f24/iron-man-...nics-tutorial-170853/index26.html#post2916324
 
Depends on what you wanna do, shared cathodes or anodes... so you can pick up the best transistor for your project, if you follow what I am and xl97 is doing, then use a NPN transistor that fits your circuit consumption

I'm using the BC548, xl97 is using the BC81725

But all the transistors works as a trigger, and also like a pipe with a valve in the end of it, so depending on the PWM signal you are sending to the transistor it will open this valve a lot or just a little, letting it pass different amounts of current depending on the signal received.

hot to link them to your project you can find here:

http://www.therpf.com/f24/iron-man-...nics-tutorial-170853/index26.html#post2916324

That really sounds like abacadabra to me.. :facepalm
I just measuret the current on digital port5 were the LED panels are connect to. Its only 2.88v. How can i increase this?
The NANO is powered via the vin with 7.4V.

But as you guys claim not to use the arduino as a power source i really need to find the right transistor.
 
Is the pin HI or LO? when you are measuring it?

are you analogWrite() to it? or digitalWrite()?

If your board is a +5v based board..you should be getting +5v from it..

two transistors were already suggested..
 
Is the pin HI or LO? when you are measuring it?

he is probably measuring between something in the circuit, he is just getting the Vdrop on the point. probably measuring between the led legs before the resistor

so he is reading 2.88V on that led LOL

also, 2.88V sounds just right if he is using a 100ohms resistor with the led, thats the Vdrop he would get with 5V + 1 20mA led + a 100ohms resistor (2.12V on the resistor)
 
I measured it directly from the nano digital port 5.

This is my code:

Code:
#include <Servo.h>
//servo 1
Servo myservo;
Servo myservo1;
int val; // variable for reading the pin status
int val2; // variable for reading the delayed/debounced status
int buttonState;
int pos = 15;
int pos1 = 170;
int servostatus = 0;
int switchPin =3; // Switch connected to digital pin 3
int ledPin = 5;
int ledPin2 = 18;
void setup() // run once, when the sketch starts
{
//servo 1

myservo.attach(9);
myservo1.attach(10);
pinMode(switchPin, INPUT);
pinMode(ledPin, OUTPUT);
buttonState = digitalRead(switchPin);
myservo.write(15);
myservo1.write(165);
pinMode(ledPin2, OUTPUT);
}

void loop() // run over and over again

//servo 1
{
val = digitalRead(switchPin); // read input value and store it in val
delay(10); // 10 milliseconds is a good amount of time
val2 = digitalRead(switchPin); // read the input again to check for bounces
if (val == val2) { // make sure we got 2 consistant readings!
if (val != buttonState) { // the button state has changed!
if (val == LOW) { // check if the button is pressed
if (servostatus == 0) { // is the light off?
servostatus = 1; // turn light on!

myservo.write(15);
myservo1.write(165);
delay(1000);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(30);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(40);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(50);


// fading
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
delay(40); 


}

} else {
servostatus = 0; // turn light off!


digitalWrite(ledPin, LOW);
delay(15);
digitalWrite(ledPin2, LOW);
myservo.write(170);
myservo1.write(7);






}
}
}
buttonState = val; // save the new state in our variable
}
}
 
Last edited:
try using a sketch that simply turns ON an digital pin and try doing a read..

not a pin you are PWM'ing..

(which means turning on/off very fast to simulate a certain level of brightness..etc)
 
Guys, This is my setup right now. Hope you can make sense out of it.
setup 1.jpgsetup2.jpg

And these are the eyes glowing at 2.88v Directly from the arduino.
 
Last edited by a moderator:
DONT connect those eye led panels DIRECTLY to your Arduino..

you are gonna blow it!! (the Arduino..not the leds)

you are trying to pull more current than the pin can safely give!!!!!

it cant be any more clear than the two diagrams myself and memebr posted.. :)

and unless your LEDS are rated for around 2.1-2.2 vF.. then its incorrect ;)


Did you try to meter by using JUST the blink (put a LONG delay in there).. and see what the meter says?
 
This thread is more than 4 years old.

Your message may be considered spam for the following reasons:

  1. This thread hasn't been active in some time. A new post in this thread might not contribute constructively to this discussion after so long.
If you wish to reply despite these issues, check the box below before replying.
Be aware that malicious compliance may result in more severe penalties.
Back
Top