profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Using SG-5010

Sat Nov 25, 2017 4:58 pm

Good day, I have a SG-5010 servo motor for my raspberry pi. Its purpose is to serve as a lock for my chest. Is it possible to use the raspberry pi as the power supply for it? thanks

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Sat Nov 25, 2017 5:27 pm

If you only intend to have one servo and nothing else connected to the gpio and you have a good power supply, you should be able to power it from the 5v pin on the gpio.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Sat Nov 25, 2017 5:32 pm

I have 3.5" lcd screen connect with rpi. what now

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Sat Nov 25, 2017 7:22 pm

If you are using a 2.5A PSU then you will probably still be ok. Screen won't draw that much.
Try it and see. Just keep an eye on the red Led to make sure it does not go out.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Sat Nov 25, 2017 8:14 pm

where should I put the wirings? i only have gpio 19, 16,gpio 19, 16, 26, 20, gnd, gpio 21 left
because of the lcd screen.

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Sat Nov 25, 2017 9:35 pm

You can use software pwm on any gpio pin but you will also need 5v and ground connection to power the servo.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Sun Nov 26, 2017 4:58 pm

Here’s my setup:
Image

and this is my servo
Image

where should I put the yellow, red, and brown cables put power and use it?

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Sun Nov 26, 2017 5:04 pm

yellow to a gpio pin ( 5,6,13,16,1920,21,26 are all spare )

red to 5v pin both of which are in use so you will have to find another way of connecting it

brown ground pin of which you have 3 spare.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Mon Nov 27, 2017 12:35 am

can you help me find other way to connect the red ?

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Mon Nov 27, 2017 4:02 pm

I would say that depends upon you skill level with a soldering iron.

You could solder a wire to the underside of your pi on one of the gpio 5v pins, but you need to be good with a soldering iron.

The safer method would be to get one of these https://www.ebay.co.uk/itm/26-Pin-Long- ... Sw3WxZ6PDK
which would just fit between your gpio and the screen connector then you could solder the wire to the 5v pin on the connector right at the bottom of the pin so the screen can still plug on to the pins.

this one covers all 40 pins if you prefer. https://www.ebay.co.uk/itm/GPIO-Header- ... SwepJXT-Yj
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Mon Dec 04, 2017 3:02 pm

I bought a 4x AA battery component in order to power my servo motor since AA produces 1.5V and 5V is required to operate the servo. Now I’m wondering if its okay to solder the red wire of servo to the red wire of the battery component which is (+) and the black one of the battery component to the brown wire of servo and connecting it to ground pin. and the yellow wire for the gpio pin to control. am I correct?

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Mon Dec 04, 2017 4:31 pm

Yes that should work OK

just to confirm.

red wire of battery to servo red wire

yellow wire on servo to gpio pin

black battery wire to servo brown wire and ground on pi gpio
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

Re: Using SG-5010

Sat Feb 10, 2018 4:27 am

Done with it but with some problems. whenever i turned on or off my raspberry pi, the servo rotates randomly because of the spike on voltage. I’m thinking about using a resistor to prevent that. So, what kind of resistor should I use for SG5010 or SG92R to prevent the shock? Also, where should I connect/bind the resistor? (im not using motherboard) I’m new with this

pcmanbob
Posts: 8365
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Using SG-5010

Sat Feb 10, 2018 9:57 am

Your servo rotates because there is no pwm signal telling it were to go to so it goes to a random position , even if you were using a driver board you servo might do this unless the driver board has a pre set position to home the servo to on power up.

you could try powering your servo via a transistor that way you could leave it powered off until your program is running to control it, and turn it off before your stop your program.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Beginners”