Uncategorized

Power spliter for Raspberry pi and servo motor

Power spliter for Raspberry pi and servo motor

Ask QuestionAsked todayActive todayViewed 31 times1

I would like one plug to power a raspberry pi zero and also a servo motor… I know I need a transistor chip or something between the pi and the motor, but I want to be able to plug this into the same device, so what do I use to split the power?

enter image description here

power-supplypowerraspberry-piservoshareedit  follow  flag asked 5 hours agoMatthew11933 bronze badges New contributor

  • 2The concept of a “power splitter” is fundamentally mistaken for devices using voltage mode supplies. You need to concentrate instead on the specific supply requirements of your motor. If you really want to do this, get a mains supply which meets the motor’s needs, and then use a DC switching regulator to drop that down to what the pi needs, making sure that the first motor-voltage output is high enough that the pi regulator’s input requirement will be met even when the motor loads the supply. Using distinct mains supplies would typically be the simplest… – Chris Stratton 6 hours ago
  • 3Please edit the question to include the electrical specifications of your servomotor or its driver board, if that is external to the motor itself. – Chris Stratton 6 hours ago
  • 1@mguima until we know the nature of the asker’s motor, it is impossible for anyone to meaningfully help them. And that is not just a practical necessity, the requirement to include such information happens to be a fundamental rule of this site. – Chris Stratton 2 hours ago
  • 1@mguima has provided a useful link in his answer. BUT do note Chris Stratton’s comments also. Any motor tends to make electrical “noise” which a microcontroller is very sensitive to. Also, usually the power needs of a motor exceed that which what can sensibly be fed from a Pi header directly. Finally, the voltage needs to be correct and may not match the Pi supply. Overall, when starting off, supplying the servo from a separate supply, batteries or other is a safe move. Grounds of Pi supply and servo supply MUST be connected. The servo control lead can usually be driven directly by the Pi. – Russell McMahon 2 hours ago
  • 1We don’t yet know that this is an “RC hobby servo” the term “servomotor” tends to mean the much more power hungry and capable industrial sort of device. Until the asker says what they have, anything posted is guesswork, and that’s not what this site is for. – Chris Stratton 2 hours ago 
  • 1@ChrisStratton I agree largely with what you say. I’m trying to steer the conversation in a way that a new user will feel comfortable with. Even very good advice can be fairly offputting when new to how things work. It’s still needed but … . I was about to add a “You need to …” comment. – Russell McMahon 2 hours ago
  • 1@ChrisStratton and Russel, 99,999% chances that OP has a blue 9G servo. I edited my answer, because of course the circuit needed to isolate the SBC and the motor would be a lot complicated to OP build. – mguima 2 hours ago
  • 1Matthew: It will greatly help people help you if you provide web links to anything you are using . The term “servo” can cover several quite different motor types and power and voltage and drive requirements for what you are probably using vary. Please provide brand & model of your servo motor and a web link to a data sheet (or a technical description if data sheet not available). A web link to a Pi Zero datasheet would also do no harm. || Note that what Chris says is valid – to get a good answer that works it is necessary to be sure of what the real requirement is. – Russell McMahon 2 hours ago 
  • @Matthew, I like your little cute yellow cubes very much. I would give 5 stars (Top 1%) to your question. I guess, from your concise question and the use of the words “transistor chip”, “splitting power”, “servo motor” that it is very likely that you are like me, a hobbyist. You remind me of a recent StackOverflow blog saying the following: “It is a good idea to guide the newbie to arrive at a good question, and let them know what they don’t know that they don’t know. / to continue, … – tlfong01 1 hour ago   
  • @Matthew, / continued, … It is only when the newbie sees the big picture, knows the basic things that he should know, and then uses a hobbyist friendly language to ask the question, then other newbies, ninjas, and pros can all join in to contribute a newbie language. – tlfong01 1 hour ago   
  • @Matthew, / continue, … When I first read your question, I was surprised of two things: (1) How come this guy presents his question so succinctly and effectively, (using eye catching little yellow cubes etc), (2) But at the same time, this guy is using electronics amateurish language (eg, “transistor chips” instead of “transistor”, “servo motor” instead of, in short, “servo” which we hobbyists always use). / to continue, … – tlfong01 40 mins ago   
  • @Matthew / to continue, … One of my hobbies is “technical presentation” and “effective communication”, so before I start answering any question, I almost always check the asker’s profile, to make sure we are talking the same “language”. When I skimmed your profile, I was surprised of another two things: (3) Your educational and career background, (4) Your long history with EESE and your very short list of questions and answers here. My surprise #3 of course make Surprises #1, #2 no longer surprising. / to continue, … – tlfong01 33 mins ago    
  • @Matthew /continued, … And before I make an answer, I sometimes also let the asker know myself, a little bit more than my short profile in this EE SE. (1) I also have a MSc IT, at Imperial College London. I also once studies, (but dropped out after a year), in the Cybernetics Dept in Reading (UK’s Reading. :)) (2) It is only two years ago that I bought my first toy servo. I am a poor hobbyist, and I never played any RC toys, not to mention drones. / to continue, … – tlfong01 21 mins ago   
  • @Matthew / continue, …The price of drones dropped so very much these years, that it has become a popular toy, and I would lose face if my 10 year old niece discovers that I don’t know nothing about drones. I know that drones use servos, but also BLDC (BrushLess DC) motors, which is another thing I don’t know nothing about (I do know toy DC motors very well, though). – tlfong01 13 mins ago    
  • @Matthew, /continued, … (3) Now, my 3 year hobbyist learning and project plan: Make a cyber cat using 4 servos (You can find more details about my cyber cat project in the chat room chatting here: chat.stackexchange.com/rooms/112589/… ). – tlfong01 10 mins ago   
  • @Matthew. / continue, …I will stop my TLDR pre-answer introduction here. You might like to tell me your learning/project plan, so that I can tailor my answer to fit the plan of yours and other future newbies. Cheers. – tlfong01 5 mins ago   

add a comment

2 Answers

ActiveOldestVotes2

@mguima has provided a useful link in his answer. BUT do note Chris Stratton’s comments also.

Important considerations include:

  • Any motor tends to make electrical “noise” which a microcontroller is very sensitive to.
  • Usually the power needs of a motor exceed that which what can sensibly be fed from a Pi header directly.
  • The servo voltage needs to be correct and may not match the Pi supply.

Overall, when starting off, supplying the servo from a separate supply, batteries or other is a safe move.

Grounds of Pi supply and servo supply MUST be connected.

The servo control lead can usually be driven directly by the Pi.shareedit  follow  flag answered 48 mins agoRussell McMahon135k1515 gold badges181181 silver badges336336 bronze badges

  • 1The question uses the term “servomotor” which tends to be associated with traditional industrial devices. It does not say “hobby servo” so it’s not appropriate to be assuming that the asker is speaking of a hobby servo. The whole point of EESE is that we don’t guess what someone is asking about, we wait for them to provided the critically needed information. Normally that would be electrical specifications; if it actually is a hobby servo then identifying the brand or model or providing a picture, would at least let people know which set of collected knowledge is applicable. – Chris Stratton 46 mins ago 
  • 1@ChrisStratton Again, I largely agree with you. In a level-playing-field discussion your suggested approach is the greatly preferred one. I also initially took “servomotor” to mean a traditional ‘servo’. It took mguima’s comment to trigger the mentat mode (Dune, about 35% of necessary facts for a usually right solution 🙂 ) to realise that with high probability he means a hobby servo. I certainly do not know with certainty. | I agree that what I am doing is a non ideal approach on a level playing field. I also consider that for a beginner with obviously very limited technical knowledge … – Russell McMahon 34 mins ago
  • 1… ‘getting them comfortably to the table where we can talk’ probably requires a slightly different approach. I value technical rigour about as much as the great Olin Lathrop. Getting there I may favour a different path in order not to lose victims along the way 🙂 :-(. – Russell McMahon 32 mins ago
  • @ChrisStratton I keep meaning to ask – are you the person with the same name that I knew in NZ decades ago, or someone else? – Russell McMahon 30 mins ago

add a comment1

A servo motor has three wires. Two are for power: positive and negative. The third one is for controlling the servo, telling it what is the position that it has to assume.

If you were using use just a small servo motor, like one of these:

enter image description here

for such a small motor, the wire from the power supply could theoretically be split, in order to send power (positive and negative) directly to the servo motor and for the Pi, and the control wire would be connected directly from the RPi to the motor.

But, as it was pointed in a series of comments and discussion, this kind of connection, without a series of proper protection circuit and components that only a more experienced person would add (and this person should know what he/she is doing), would definitelly put your RPi at serious risk. So, don’t consider this option before you get very experienced.

As you probably is using a small servo motor like those above, just for thinkering with them, your best option is: use different power sources for RPi and for the motor.

There are so many good tutorials about this, you have to make your “homework”, the internet is full of information, just Google about.

This is a good tutorial from a reputable source, that, conveniently, uses a bunch of AA cells for powering the servohttps://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/hardware


One of many many possible hobbyist servo motors.
“Blue 9G” servo tutorial here

Note: Other types of servo-motors cannot be driven or powered in this manner.shareedit  follow  flagedited 31 mins agoanswered 1 hour agomguima1,24855 silver badges1616 bronze badges

  • 1NO. DO NOT DO THIS Even if the voltage matched (which as of yet there is no reason to believe is the case) one should still not use the same power supply even with distinct wiring, as motors do notoriously horrible things electrically, and the pi needs to be protected from both the resulting “grunge” and power dips caused by the load of the motor. The comment you dismissed explains what is needed to address this sort of problem, in contrast, what you are suggesting here is highly unwise. Even your very own link shows the hobby servo motor used there has its own battery supply. – Chris Stratton 1 hour ago 
  • 1@ChrisStratton I changed the answer to address your useful comment. – mguima 43 mins ago
  • 2There are reasonable, appropriate ways to power various kinds of servo motors from a mains supply which also powers a pi, meeting the asker’s goal of having a single mains supply. As in the original comment, these often involve starting with a higher voltage and having a distinct regulator for the computer and possibly the motor. When the asker clarifies the type of motor they have, then what would be involved in safely doing so, and if that is or is not economically reasonable, can be provided. But until then, this is speculation is not interpolating the truth. – Chris Stratton 27 mins ago 

add a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.