Ardunio Mega with servo rotating laser 180

I'm fairly new to Ardunio and attempting to setup a 5v laser with a SG92 servo on Ardunio MEGA board. I have the servo setup and rotating 180 degrees back and forth. I'm not sure where to install laser since the servo is taking up the 5v pin on the board. I'm only using one servo and feel its not neccessary to use a breadboard for power.

Would it be best to solder the laser directly to the servo power wires?

I'd like to use pins, but Im not sure where to put the gnd/5v for laser?

My goal is to make this as compact as possible. I'll switch over to a UNO once I get this prototype working.

Right now, I have a breadboard with 5v power supply powering the laser and servo is getting power from ardunio board.

Any suggestions would be great, I hope to participate more in the forums when I know what Im doing. :slight_smile:

I prefer to always solder when I can but with the inital prototyping pins are OK but remember they come out and become intermittent over time. The best solution is to get a second power supply and use it for the servo and laser, be sure to connect the grounds. There's not much power available on the arduino boards. This will probably save a lot of debugging later.

Good Luck & Have Fun!

Even micro servos draw some 750mA at stall so you shouldn't even be thinking of powering it from the Arduino 5V pin. (In spite of the tuts on this very site showing you to do exactly that.)

(In spite of the tuts on this very site showing you to do exactly that.)

I can only imagine that the tutorial is intended to teach 2 things.

  • how to move a servo.
  • how to quickly become aware of power limitations of the 5v pin.
    I must say that this tutorial is very effective at both of these items.