Powering Servo Motor via breadboard to myRIO

Hi,
I am working on a uni project which involves controlling a SG5010 TowerPro Servo Motor using myRIO and LabVIEW. I have created a LabVIEW VI which can control a SG92R Micro Servo over a pulse width of 0.5ms-2.5ms with 50Hz frequency with no issues.

I purchased the SG5010 servo as I need a stronger motor for this project, but when when I run the code it makes a ticking noise and doesn’t move consistently. The motor is connected to the +5V power output pin on the myRIO which has a maximum current current draw of 100mA. It seems that this +5V pin doesn’t supply enough current to power the SG5010 servo, but could be fixed with an external power source connected via a breadboard.

What type of power supply (voltage/current) can be used to control the SG5010 servo motor? I heard that servo motors can be powered using 4xAA batteries or a LiPo battery but I am not sure what current is required and what the best rechargeable or wall outlet option is.

Any help would be greatly appreciated, thanks!

1 Like

Hi Kate,

I think you’re on the money there! A guide that uses that servo specifies it’s current reaching up to 300mA during motion, or up to 600mA at stall, so a beefier power supply may just solve your problems.

Usually you want your motors on a separate power supply anyway, as voltage dips can make a microprocessor seriously unreliable.

We’ve got quite a few supplies in our store, so if you let us know what the rest of your equipment setup looks like (breadboards?) we can suggest something easy and beefy enough.

-James

1 Like

Hi James,

Thanks for the reply!. That definitely makes sense if the motor requires up to 300mA during motion!

This is what the equipment set up looks like:

This is for a myoelectric claw project so other components will be attached to the breadboard, but only the servo requires a power supply. I assume something could be added directly to the board?

Let me know what you think, thanks!

Hi Kate,

Unfortunately, you can’t just connect everything together and have it work (or work long-term), you’ll need to use an Optoisolator (sometimes called optocoupler) to convey the signal to the servo without back-powering the controller, or creating a ground loop where your power supplies are effectively fighting each other.

This breakout should be pretty easy to use, it has two channels so you could even use it with 2 servos down the line if you decided you needed to:

As for your power supply, a plug pack with a barrel jack at the end is all you need, you can plug them into a breadboard easily with one of these:

A suitable 5V supply would be something like this:

All the best with your project, and let us know if you need more info!
-James

Thanks James, that helps so much.

Is the opto-isolator breakout needed due to the high output current (2A) from the DC barrel adaptor which can interfere with the myRIO device?

Could I use something like this breadboard attachment and eliminate the need for an opto-isolator as the output current is only 500mA (enough to move servo?):

I found this video of servo control with power supply and Arduino (similar to myRIO I assume), where they just used the breadboard attachment so would be interested to hear what you think:

Sorry about the questions, I’ve never used an opto-isolator before and can’t find much information online so am not really sure how they work!

Thanks again!

Hey Kate,

Seems my understanding of ground loops and isolation was a little off, I’m going to do some reading and get back to you with a verdict!

(Maybe someone with a better understanding than me can pipe up)
-James

2 Likes