My P1 Themed Predator Costume with Electronics and Sounds. (Pic Heavy)

I am in need of some wiring help. I have very very limited experience with arduino, and electronics in general. I have the servos all wired up, but i can’t seem to get them to do what they are supposed to do. They turn on, but they seem to either get caught in a loop and just kinda go haywire (sometimes they do nothing at all). The head tracking does nothing for moving the servos. Any help would be greatly appreciated. I’ll attach pictures on my wiring. I’m sure I’ve done something wrong, I just don’t know what that is.
 

Attachments

  • IMG_3304.jpeg
    IMG_3304.jpeg
    2.8 MB · Views: 40
  • IMG_3303.jpeg
    IMG_3303.jpeg
    2.9 MB · Views: 43
  • IMG_3305.jpeg
    IMG_3305.jpeg
    4.2 MB · Views: 45
I am in need of some wiring help. I have very very limited experience with arduino, and electronics in general. I have the servos all wired up, but i can’t seem to get them to do what they are supposed to do. They turn on, but they seem to either get caught in a loop and just kinda go haywire (sometimes they do nothing at all). The head tracking does nothing for moving the servos. Any help would be greatly appreciated. I’ll attach pictures on my wiring. I’m sure I’ve done something wrong, I just don’t know what that is.
What kind of power supply are you using? Does it have enough mAH? I use this one from amazon because it had a high amperage and was not a smart charger meant for cellphones (turns off after fully charged).

1741783227971.png
 
The above may be correct.

Not clear on your wiring approach here.. but you should -not- power things from the Arduino board itself. Arduinos are for -controlling- things.. -not- powering them (perhaps tiny accent leds..etc)

What servos? +5v? +12v?

If you are using a 'STABLE' +5v power source to power the Arduino itself.. you may be able to use the VIN pin to power other components (if your stable +5v power source has enough current for things)
 
What kind of power supply are you using? Does it have enough mAH? I use this one from amazon because it had a high amperage and was not a smart charger meant for cellphones (turns off after fully charged).

View attachment 1913568
Yes. This is the exact one I bought. I am able to get the servos to work for a few seconds, then they stop responding. I’m very green to Arduino, but could the Mega be getting overloaded somehow and resetting?
 
The above may be correct.

Not clear on your wiring approach here.. but you should -not- power things from the Arduino board itself. Arduinos are for -controlling- things.. -not- powering them (perhaps tiny accent leds..etc)

What servos? +5v? +12v?

If you are using a 'STABLE' +5v power source to power the Arduino itself.. you may be able to use the VIN pin to power other components (if your stable +5v power source has enough current for things)
Servos are MG 996R. I am using the power source above. So, if I shouldn’t power the servos through the Arduino, do I tie them in between the power source and Arduino? I apologize if my questions don’t make sense. I’m very slowly learning about all of this.
 
Things are still not 100% clear (sorry)

These servos -are- +5v servos......correct?
This PSU is a +12v power source......correct? (or does it have DUAL power lines +12v -and- +5v?)

Doesnt look like you -are- powering the servos from the power source then. (how are you converting the +12v power source to +5v for the servos then?) - not clear on PSU yet.. (re-looking seems like +5v is available from PSU?)

Assuming (now) that this PSU does have a direct +5v output.. then yes you would need to -power- the servos from the PSU directly.

Going forward, this assumes you are using -only- the +5v output from the PSU.

PSU and Arduino should be connected via +V/GND lines.
Servos should be powered directly from the PSU +V/GND
Arduino should connect 'data' lines to servos

Because PSU has GND lines connected to Arduino and Servos, you have a -common ground- (which is needed to proper control)
 
Things are still not 100% clear (sorry)

These servos -are- +5v servos......correct?
This PSU is a +12v power source......correct? (or does it have DUAL power lines +12v -and- +5v?)

Doesnt look like you -are- powering the servos from the power source then. (how are you converting the +12v power source to +5v for the servos then?) - not clear on PSU yet.. (re-looking seems like +5v is available from PSU?)

Assuming (now) that this PSU does have a direct +5v output.. then yes you would need to -power- the servos from the PSU directly.

Going forward, this assumes you are using -only- the +5v output from the PSU.

PSU and Arduino should be connected via +V/GND lines.
Servos should be powered directly from the PSU +V/GND
Arduino should connect 'data' lines to servos

Because PSU has GND lines connected to Arduino and Servos, you have a -common ground- (which is needed to proper control)
Servos are 5v, yes.
PSU is 12v / 5v output
Data lines are connected directly to Arduino. Servo V+/GND are also connected through Arduino. So, I should connect the V+/GND directly to PSU, and also PSU to Arduino?
It’s about as clear as mud to me.
I’m sorry, you’ll just have to pretend I’m 10 years old.
 
"Data lines are connected directly to Arduino. Servo V+/GND are also connected through Arduino. So, I should connect the V+/GND directly to PSU, and also PSU to Arduino?"

Correct...
1.) Never (ever) try to power things from an Arduino. (they are for controlling things.. not powering things).

The only approach that powering an external component from an Arduino would be using a STABLE +5v power source.. and then powering EVERYTHING through the VIN in pin. (because you are then by=passing the voltage regulator on-board the Arduino which has very little current it can provide)

2.) Do not use/touch the +12v power line on the PSU (no reason/need to)


power servos from +5v PSU
power Arduino from +5v PSU
connect data lines from Arduino to servos
 
"Data lines are connected directly to Arduino. Servo V+/GND are also connected through Arduino. So, I should connect the V+/GND directly to PSU, and also PSU to Arduino?"

Correct...
1.) Never (ever) try to power things from an Arduino. (they are for controlling things.. not powering things).

The only approach that powering an external component from an Arduino would be using a STABLE +5v power source.. and then powering EVERYTHING through the VIN in pin. (because you are then by=passing the voltage regulator on-board the Arduino which has very little current it can provide)

2.) Do not use/touch the +12v power line on the PSU (no reason/need to)


power servos from +5v PSU
power Arduino from +5v PSU
connect data lines from Arduino to servos
Okay. So, now I have servos to PSU, PSU to Arduino vin, data lines from servos to Arduino. Same thing happens: it turns on, servos get power/move as expected for about 30 seconds or so, then stop responding.
 
hmmm... perhaps a code thing then?

Do you see loss in power/leds anywhere? Do you see glitching/clicking? (servo)

Perhaps try this generic code to ensure its not a hardware issue:


Q: How many servos?
Perhaps just try one.

Also.. made add a GND wire from Arduino itself to the Servo (checking for common ground)
No loss of power, and leds stay constant. I’m running two servos. I can try just one and see if that makes a difference. If that does fix it, what would that mean?

And do you mean just running ground directly from servo to Arduino?

PS. I really really appreciate your help and patience with my lack of knowledge here.
 
No worries! I love adding electronics to props (Im over static props now) LOL

And once you get more comfortable with Arduino stuff.. it will open a TON of new doors for you.

(when you need any LED project stuff.. feel free to hit me up and I can walk you through some WLED set-up stuff.... no code needed..etc.. and can control led in patterns, animations..etc.. all pre-set from phone)

1.) Sure just try one servo.. see if any difference
2.) Yes.. while having Arduino GND line connected to PSU and PSU GND lines connected to servos.. perhaps try adding a GND line from Arduino to servo.

Is PSU all charged up? The comments make it -seem- like a power issue.. if it IS working.. does.behaves as expected.. but then just stops after 30 seconds or so.. is odd. So code or power at this point I think.

Did you try that generic code in the link above as well? (make sure you change code to the I/O pin your servo is connected to)
 
No worries! I love adding electronics to props (Im over static props now) LOL

And once you get more comfortable with Arduino stuff.. it will open a TON of new doors for you.

(when you need any LED project stuff.. feel free to hit me up and I can walk you through some WLED set-up stuff.... no code needed..etc.. and can control led in patterns, animations..etc.. all pre-set from phone)

1.) Sure just try one servo.. see if any difference
2.) Yes.. while having Arduino GND line connected to PSU and PSU GND lines connected to servos.. perhaps try adding a GND line from Arduino to servo.

Is PSU all charged up? The comments make it -seem- like a power issue.. if it IS working.. does.behaves as expected.. but then just stops after 30 seconds or so.. is odd. So code or power at this point I think.

Did you try that generic code in the link above as well? (make sure you change code to the I/O pin your servo is connected to)
I want to learn as much as I can about this and more (led being another id like to learn). I have not tried the single servo, or GND straight from servo to Arduino. I also haven’t tried the other code, yet (I’ve got a sick 3 month old baby girl I’m also tending to). But I’ll certainly let you know when I do and the results.

Thank you, again!
 
"....or GND straight from servo to Arduino"

Just to clarify, I'm saying an 'additional' wire here (still keep the PSU GND wire to servo as well.. or create a common GND 'strip/end point' that they all connect to. GND is all one connection more or less)


Good luck!
 
"....or GND straight from servo to Arduino"

Just to clarify, I'm saying an 'additional' wire here (still keep the PSU GND wire to servo as well.. or create a common GND 'strip/end point' that they all connect to. GND is all one connection more or less)


Good luck!
Well, I tried something before reading that. I did each servo into a different GND on the Arduino. Works like a charm!
 
Common ground (GND) issue.. (All GND lines should be connected together)

Perhaps use a general GND screw terminal:

Or these:

 
Back
Top