2

I normally power my Raspberry Pi Pico via a USB connection to my computer. However, when working with servo motors, the motors can draw quite a bit of power, destabilizing the USB communication between (or the micro-controller altogether).

I know that it is possible to use an external power source to support the servos. At school we have some variable-power power supplies that work well. But these are pretty bulky. You also have to be careful to pick the right cables and not to overload the system. For my purpose, I just need a constant voltage of 5V (I am fine with the max. current the USB adapters can provide).

I am looking for a lightweight solution for this. In this context, I was wondering if I can use an ordinary AC-to-USB adapter to support the servos, while at the same time having the Pico connected to the computer via USB (for data transmission). How can I do this? Are there any adapters available for this?

5
  • The Pi/Pico is pretty irrelevant and even if that was not the case this would be a shopping question.
    – joan
    Commented Dec 9, 2022 at 18:22
  • 2
    @joan A) Why is Pi/Pico irrelevant? B) But even if it was irrelevant, would you accept the question if I remove the reference to Pico? I suspect that Pi is equally affected by this. C) I don't know how to plug stuff together to make a dual USB connection to the Pico work. I am interested in a concept, not to a product.
    – normanius
    Commented Dec 9, 2022 at 18:41
  • Can you share the P/N of your servo with us?
    – Seamus
    Commented Dec 12, 2022 at 17:51
  • @Seamus I'm using an AMX Servo 6221MG by Amewi
    – normanius
    Commented Dec 14, 2022 at 11:18
  • Apparently this servo part number is made by numerous manufacturers. There seems to be a fair amount of negative opinions on it, but it's hard to separate fact from fiction. No one seems to publish a schematic for it, and the specifications are vague and limited. This Q&A at Arduino SE had the most objective info I found in a quick search - it suggests a high output power supply is essential.
    – Seamus
    Commented Dec 14, 2022 at 18:17

3 Answers 3

1

Your question would be much improved if you added one or more schematics giving us better insight into what your ideas are. Here's how to add a schematic..

In general, there are a couple of solutions that come to mind wrt "destabilizing the USB communication":

  1. Yes - you can add a separate DC supply to power the motor, but don't forget that the GND terminal of the servo's DC supply must be connected to the Pico's GND. Alternatively, you may be able to use a single supply (assuming it can support both loads), and isolate the Pico from the servo. As noted in the comments, some reviews of the 6221AMG servo suggest it can draw a substantial amount of current, and this Arduino Q&A suggests that a 2nd supply may be preferable - or even necessary - due to the 6221AMG servo having inconsistent supply voltage requirements.

  2. If you think that the inductive kickback from the servo's dc motor is creating interference, a snubber circuit is typically used to tamp that down. However, you'll need to do some more research to apply this solution (i.e. I found no schematics online that would serve to guide wiring a snubber to the servo). If you can find a manufacturer's schematic, please add that to your question. There's a possibility the manufacturer has included a snubber or other suppression circuitry, but it's almost always a good idea to include one because it reduces stress on your switching components.

A few schematics add specificity to the words...

A dual-supply scheme:

schematic

simulate this circuit – Schematic created using CircuitLab

A single-supply scheme with power for Pico isolated from servo:

schematic

simulate this circuit

A snubber for limiting inductive kickback from a DC motor:

schematic

simulate this circuit

EDIT:

joan's comment (below) bears explanation; I'll make an effort to address it here:

It is true that servos and DC motors are not the same thing. If my answer implies this, I apologize for the confusion. Absent any data on the servo used, I took the fact that it used a dc power source as a clear indicator the servo contained a DC motor, and therefore presented an inductive load. Inductive loads produce "kickback" when the current is reduced (L*di/dt), and "snubbers" are routinely used to suppress that "kickback". Left un-suppressed, this "kickback" could potentially "destabiliz[e] the USB communication". AFAIK, in-built motor drivers do not imply in-built snubbers, and so I suggested that one might be useful. It's often necessary to make assumptions in answering questions, but if these assumptions are misleading, any feedback that makes for a better answer will be appreciated.

4
  • Thanks for pointing out the snubber circuit. Yes, the inductive kickback protection is also on my mind. I will have a look at this.
    – normanius
    Commented Dec 11, 2022 at 13:32
  • 1
    @normanius: I have a few minutes, so I'm following my own advice & adding a schematic.
    – Seamus
    Commented Dec 11, 2022 at 21:05
  • Thank you. Really, very helpful. I tried to make a schematic myself but stopped because I am not familiar enough with the symbols.
    – normanius
    Commented Dec 12, 2022 at 0:50
  • 1
    The OP said servo motors, not DC motors. A significant difference is that servos have in-built motor drivers.
    – joan
    Commented Dec 12, 2022 at 9:42
2

You can use an external power supply to power the servos without a problem. Use that power supply to feed the servo controller(s) and let the USB feed the Pico. You must connect the grounds together as that is your reference point for all voltages. Get an external power supply (phone charge type is OK) that will supply the needed voltage and current for the motors. If it supplies more current no problem the motors are not greedy they will take only what they need. You can also use a Buck, Boost or SEPIC converter if you already have a power supply you want to use. Have Fun Picoing!

0

Be careful with this... connecting grounds of power supplies can have dangerous effect and i would use power supply that have only 2 pins (live and neutral) or even better a floating power supply, like one with transformator - not a switching power supply (although USB power supply you mention has only 2 pins, it was not really designed to do this...)

This is due to grounds possibly (!!!) having different voltage levels between them, for example for short circuit or current sense protection. PC power supply usually has ground connected to earth pin in your AC socket, and when you connect a ground of other supply into it that has different level, you can create problems.

Other easy thing to fight against this is to use a laptop without DC jack (or any other AC Power device) connected, or use a battery source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.