xl97's Iron Man motorized face plate tutorial

It's not for the faceplate, its for the arc reactor but it will tie into my arduino. I can wire it directly with a button switch and it works fine with the 9v. I wrote code to have it fade in and out so it doesn't blind people. So max it will be on for about 10 seconds at a time, not constantly. I'm not worried about battery drain. I'm trying to figure out how to separately power the led's and only control the current from the arduino, which the code does.
 
you power the leds through a transistor.. and the Arduino 'toggles' the transistor...

you'll have to figure out what transistor, fits your requirements...

probably a separate power source for this?

*note: make sure you connect all grounds/GND together! :)

good luck with your +9v batteries I guess...
 
Last edited:
Hi xl97,

I finally got my parts but I have some issue now.

Here is what I did:

1) I used exactly your code but only plug 4 leds (2 on each side) for testing. The servo I'm using is HD-1501MG supply voltage is 6v.

2) I bought a 5v module (input: 6-12v, Output: 5v 800ma) to replace the lm7805, 0.33uf & 0.1uf on your diagram. Looks like this
File 2016-03-29, 9 16 08 PM.jpeg

3) I used a 9v battery for power supply. I also have 4 AA battery pack but it only provide 6V not +7v, So I used 9v battery.

4) I use bread board to connect everything for test.File 2016-03-29, 9 10 57 PM.jpeg. So I connect the battery to the 5v module and than connect it to the breadboard. Then connect all servos and leds to the breadboard.

Here is my problems:

1)When I plug in the power supply, the servo start moving themselves.

2) when I push the button, the led turns on but keep flashing and the servo keeps moving by themselves after they move to the right position

3) Seems like every time when servo start moving by themselves, the L led light on the UNO r3 board flashing as well.

Could you give me a hand on this?

Thanks

Dio
 
Hi xl97,

I finally got my parts but I have some issue now.

Here is what I did:

1) I used exactly your code but only plug 4 leds (2 on each side) for testing. The servo I'm using is HD-1501MG supply voltage is 6v.

2) I bought a 5v module (input: 6-12v, Output: 5v 800ma) to replace the lm7805, 0.33uf & 0.1uf on your diagram. Looks like this
View attachment 609288

3) I used a 9v battery for power supply. I also have 4 AA battery pack but it only provide 6V not +7v, So I used 9v battery.

4) I use bread board to connect everything for test.View attachment 609289. So I connect the battery to the 5v module and than connect it to the breadboard. Then connect all servos and leds to the breadboard.

Here is my problems:

1)When I plug in the power supply, the servo start moving themselves.

2) when I push the button, the led turns on but keep flashing and the servo keeps moving by themselves after they move to the right position

3) Seems like every time when servo start moving by themselves, the L led light on the UNO r3 board flashing as well.

Could you give me a hand on this?

Thanks

Dio
Have you been able to find low price steel servo ? :)

Envoyé de mon SM-G530W en utilisant Tapatalk
 
The servo I bought from oversea cost a little bit cheaper than the one on Amazon. It is around 40-45 per servo after tax.
 
Ok i dont have a lot of money remaining so for a one day von i think i will take plastic servo wich should be fibe for one day and then invest in better servo

Envoyé de mon SM-G530W en utilisant Tapatalk
 
you can give a try at canadian tire or homedepot, if they don't have it try the store that you bought your servo see if they have it or not. There are couple places in my city such as toy and hobby, AVF hobbies they may have it as well. Not sure if they have store over your place or not. You can google them.
 
1.) (again) do not use +9v batteries! they are notorious for SUCKING!.. seriously... probably wont be able to provide enough current for the project.

- +6 voltage probably would have worked.. give it a try..

2.) servos:
- do you have all GND's connected.. battery/Arduino/servos?
- try limiting the range/movement of the servos.. (maybe your arms arent centered/set and its trying to move past its stop position?) try a range of say 30 - 90 for testing..

3.) Have you metered the module you are using? getting a steady/stable +5v out of it on your meter?

the servo twitch sounds like the GND not being connected to me.. (or moving past the stopping point)

* looking at your pics.. I dont see a wire from the Arduino GND pin to breadboard GND (where battery and servo GNS connect).. but I cant fully see/grasp what you are doing at the battery directly either.. lots of wires going on)



4.) You can probably eliminate the leds & transistors/resistors..etc..

and just use 1-led (with resistor) directly to each pin for testing as well (helps to trim things down when troubleshooting)





side note:
1000th post!!!!
 
Last edited by a moderator:
Hi xl97,

Thanks for the reply. Will work on it tonight and keep you posted about the progress.

BTW, if I want to replace the push button to a Photoresistor, what should I change for the code?

Thanks

Dio
 
Also what is the servo size to use i saw super sub micro, sub micro and mini but I dont know which one people.use

Envoyé de mon SM-G530W en utilisant Tapatalk
 
Also im not really sure what and where is what you call the ground on your diagram sory I dont know anything in electronic so I try to donexactly the same thing as your tutorial to avoid getting lost

Envoyé de mon SM-G530W en utilisant Tapatalk
 
This is the one I'm using. I haven't done the real test yet since I'm still working on the circuit. However, this is most people suggested based on these blog that I have read.
https://www.pololu.com/product/1057

I think the key is how heavy can the servo support. This one is 240 oz-in (17 kg-cm).

- - - Updated - - -

The ground is the negative (-) wire which showing as the black wire on xl97's diagram.

Hope this helped
 
1.) (again) do not use +9v batteries! they are notorious for SUCKING!.. seriously... probably wont be able to provide enough current for the project.

- +6 voltage probably would have worked.. give it a try..

2.) servos:
- do you have all GND's connected.. battery/Arduino/servos?
- try limiting the range/movement of the servos.. (maybe your arms arent centered/set and its trying to move past its stop position?) try a range of say 30 - 90 for testing..

3.) Have you metered the module you are using? getting a steady/stable +5v out of it on your meter?

the servo twitch sounds like the GND not being connected to me.. (or moving past the stopping point)

* looking at your pics.. I dont see a wire from the Arduino GND pin to breadboard GND (where battery and servo GNS connect).. but I cant fully see/grasp what you are doing at the battery directly either.. lots of wires going on)



4.) You can probably eliminate the leds & transistors/resistors..etc..

and just use 1-led (with resistor) directly to each pin for testing as well (helps to trim things down when troubleshooting)





side note:
1000th post!!!!

Hi xl97,

Thanks for the reply. Will work on it tonight and keep you posted about the progress.

BTW, if I want to replace the push button to a Photoresistor, what should I change for the code?

Thanks

Dio
 
Last edited by a moderator:
Hi xl97,

I did follow your steps but still no luck. I draw a diagram to show you how I connect everything.

Test 5.jpg

So the 2xAA battery pack represent 4xAA 6v battery pack. And the RGB LED is represent the 5v module. It has in +/- and out +/-.

Here is how it looks like when I power it on and push the button.


I have already change the move degree from 180 to 30 for the servo.

Could you please help me out?

Thanks

Dio
 
Last edited by a moderator:

Your message may be considered spam for the following reasons:

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