Page 1 of 1

Battery and servo and USB

Posted: Sun Mar 21, 2021 9:27 am
by OutoftheBOTS_
I have a PYBv1.1 and I am wondering about driving HV servos (7v to 8v) directly off the board.

I notice that the board has 4 sets of pins setup for driving servos (X1 to X4) with GND and V+ next to them to directly plug servos straight in.

I do also notice that there is a Vbat next to them.

Here's my questions:

1. Can I connect a 2S lipo (7.4v) to Vbat and also have the USB connected at the same time??
2. If a 2S battery is connected to Vbat is this what is supplied to V+ on the servo power rail or is that rail a regulated voltage or USB voltage??
3. is there a risk of back EMF from the servos damaging the PYB??

This is what I want to do: control 3 x HV servos from PYB and be able to have a REPL open on my PC to program the board at the same time. I am hoping that I can just plug them straight in to the PYB and plug the 2S LiPo into Vbat

Re: Battery and servo and USB

Posted: Tue Mar 23, 2021 2:09 pm
by CmdrDeLiver
Hi OutoftheBOTS,

Documentation on the PYB is here. You'll likely find everything you need there and if you intend to do some development it would be good to be familiar with the specs. I don't have a PYBoard so I can only speak in general terms.

With every other board I've used, driving devices like servos, steppers and motors has required some sort of external driver. This can be as simple as a transistor and resistor, or as complex as an H-Bridge. You may need reverse polarity protection (a diode) for some of these. A driver board is a cheap investment and you'll know it's done right. ;)

This site may shed some light on your goals.

Best of luck,
Mike

Re: Battery and servo and USB

Posted: Wed Mar 24, 2021 5:59 pm
by pythoncoder
The Pyboard 1.1 has four sets of 3 pins on X1-X4 which are designed to connect to small hobby servos. They are powered from V+. If using USB, V+ will be just below 5V. If a LiPo is attached to Vbat, V+ is powered from the battery. The USB connection is protected by a diode, so you can connect both simultaneously. What you are trying to do should work fine so long as your servos aren't huge powerful beasts - I've not heard of any problems with back emf. There is an introductory guide to servos here.

You can see schematics for the Pyboard here which clarify the power arrangement.

Re: Battery and servo and USB

Posted: Fri Mar 26, 2021 7:42 am
by OutoftheBOTS_
pythoncoder wrote:
Wed Mar 24, 2021 5:59 pm
The Pyboard 1.1 has four sets of 3 pins on X1-X4 which are designed to connect to small hobby servos. They are powered from V+. If using USB, V+ will be just below 5V. If a LiPo is attached to Vbat, V+ is powered from the battery. The USB connection is protected by a diode, so you can connect both simultaneously. What you are trying to do should work fine so long as your servos aren't huge powerful beasts - I've not heard of any problems with back emf. There is an introductory guide to servos here.

You can see schematics for the Pyboard here which clarify the power arrangement.
If both USB and LiPo is attached what will V+ be?? will it be powered by the battery or by the USB??

Re: Battery and servo and USB

Posted: Fri Mar 26, 2021 8:13 am
by pythoncoder
Whichever is the higher. In your case with two cells, Vbat. The USB 5V supply is protected by a diode.

Re: Battery and servo and USB

Posted: Fri Mar 26, 2021 8:21 am
by OutoftheBOTS_
Perfect. Thanks for your advice :)