Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:19 22 Nov 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Help needed with power circuit

Author Message
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 375
Posted: 06:25pm 19 Nov 2026
Copy link to clipboard 
Print this post

Hi,

I am interested in robots - driven by MMBasic - and I am currently working on a new version: A hexapod with 3DOF per leg that uses serial servos (12 V Waveshare ST3215 HS). I have a library written in MMBasic that can control all 18 servos and make the robot walk. But currently I am using a bench power supply. Eventually, I want to become mobile with a LiPo battery.

I have mainly experience with "normal" servos and their power draw. I used Claude to work out the specifications of a power control board with the following requirements:
- 2x connectors for serial bus input from a Waveshare Bus Servo Adapter
- 6x connectors to a chain of 3 servos each (for the 6 legs)
- a XT60 connector for the LiPo
- a fuse
- a soft-on circuit that can be controlled by a microcontroller (PiCo2)
- there will be an external power switch between the battery and the board

This is what Claude generated (edited for clarity by me):


Anyone experience with such circuits?
Could that work?

Thanks
Thomas
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 07:10pm 19 Nov 2026
Copy link to clipboard 
Print this post

I have no experience with servos whatsoever, but from an electronics point of view I would say that that circuit makes sense.

Making the J2 input high causes the battery to be connected to the servos and the bank of 470uF capacitors. This supply will ramp up, not switch on suddenly. When the servos operate the current is supplied initially by the capacitor bank, the capacitors recharging from the battery while the servos are stationary.

Commands from the two servo control signals are merely paralleled across three servos each so the three will move together.

Taking the J2 input low again disconnects the battery from the circuit. There will be residual charge in the capacitor bank, I suppose, but that doesn't matter.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3453
Posted: 08:47pm 19 Nov 2026
Copy link to clipboard 
Print this post

For soft start I think C1 + R4 are placed incorrectly. For a simple resistive load they would work as they are but when the battery is first connected the capacitor bank is at 0V with just a few milliohms resistance.
I think they should go from gate to source (+BATT) and C1 may need to be bigger. Q1 could still get hot as the capacitor bank charges so a heatsink with thermal mass (thick aluminium or copper) may help.

Currently they will momentarily turn Q1 fully on as soon as the battery is connected. The peak current into the capacitor bank might be enough to damage Q1 or the battery before the fuse has time to blow.
Edited 2026-11-20 07:38 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 10:35pm 19 Nov 2026
Copy link to clipboard 
Print this post

It's a circuit to model, but not tonight.

Because the cap bank is discharged the lower side of C1 is also low. For Q1 to turn on the gate has to get low enough. C1 is already charged to 12V via R3 so the gate is held up by that voltage via R4. C1 now has to discharge via (R2+R4) to (12-Vgs) before Q1 opens. R2 and C1 are fairly high so this will take a little time. True, Q1 will start to dissipate as soon as Vgs is exceeded, but that may not be for long at that point.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3453
Posted: 11:30pm 19 Nov 2026
Copy link to clipboard 
Print this post

  Quote   C1 is already charged to 12V via R3
Not when you first plug the battery in. Then C1 has 0V across it, briefly pulling the gate low through the capacitor bank.

For modeling put a switch in the battery line and see what the peak current is when you close it. Maybe it is possible to also see how much energy is in the pulse that the MOSFET must absorb.
That should reveal whether it is a problem or not.
Edited 2026-11-20 10:00 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 08:56am 20 Nov 2026
Copy link to clipboard 
Print this post

Good point - I hadn't looked at when the battery is first connected. I reckon you've got almost 100ms of virtually dead short across the battery. That's not good...

As I've said, I have no experience of servos. Are the caps even necessary? They are motors, not solenoids. The impedance of a LiPo battery is very low. A good mosfet will have RDSon of 50mΩ or even less. The tiny little SOT23 AO3140 for example can manage that with Id of 4A. Just don't look for TO92 packages that can do anything useful.

.
Edited 2026-11-20 18:57 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 375
Posted: 09:20am 20 Nov 2026
Copy link to clipboard 
Print this post

Thanks Mixtel90 and Phil99!

  Mixtel90 said  Commands from the two servo control signals are merely paralleled across three servos each so the three will move together.

These are digital serial servos; they listen to a simple 1-wire serial bus for packages and respond to their ID. But I agree, the labelling of two serial busses is confusing, because the Waveshare board which translates the COM signals of the Pico2 to the servo bus signals has two connectors with the bus shared.

I wanted to switch to these servos because they can respond to complex motion commands and report on their status, such as position, current, voltage, temperature, load ...

  Mixtel90 said  It's a circuit to model, but not tonight.

That'd be great!
I have no experience with that ...

  phil99 said  For soft start I think C1 + R4 are placed incorrectly. For a simple resistive load they would work as they are but when the battery is first connected the capacitor bank is at 0V with just a few milliohms resistance.
I think they should go from gate to source (+BATT) and C1 may need to be bigger. Q1 could still get hot as the capacitor bank charges so a heatsink with thermal mass (thick aluminium or copper) may help.

Currently they will momentarily turn Q1 fully on as soon as the battery is connected. The peak current into the capacitor bank might be enough to damage Q1 or the battery before the fuse has time to blow.

Thanks for this hint. I gave it back to Claude and it agreed, but suggested a different solution: An additional C8 between source and gate and a different value for C1:



  Mixtel90 said  As I've said, I have no experience of servos. Are the caps even necessary? The impedance of a LiPo battery is very low. A good mosfet will have RDSon of 50mΩ or even less. The tiny little SOT23 AO3140 for example can manage that with Id of 4A. Just don't look for TO92 packages that can do anything useful.

I am wondering that too. This was a recommendation by Claude. The servos are said to feature local voltage regulation, and all sorts of protection (overcurrent, overvoltage, and thermal shutoff), though it is hard to get a circuit diagram.

Best
Thomas
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3453
Posted: 09:50am 20 Nov 2026
Copy link to clipboard 
Print this post

The circuit looks good now.
  Quote  The servos are said to feature local voltage regulation, and all sorts of protection (overcurrent, overvoltage, and thermal shutoff)

With all that perhaps 47 to 100µF close to each servo will be enough.
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 375
Posted: 10:05am 20 Nov 2026
Copy link to clipboard 
Print this post

  phil99 said  The circuit looks good now.
  Quote  The servos are said to feature local voltage regulation, and all sorts of protection (overcurrent, overvoltage, and thermal shutoff)

With all that perhaps 47 to 100µF close to each servo will be enough.

Thanks - yes, I'll try that.

Best
Thomas
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6276
Posted: 10:30am 20 Nov 2026
Copy link to clipboard 
Print this post

Hi,

The pinout on the servo connectors is wrong (1-3 swapped). See :



Not sure you need all the 470uF E-caps. The battery is low impedance, the FET is only 4 mohm. Maybe one is sufficient. Just to get rid of the short spikes. One 470uF may be better that 6 small ones (ESR wise).

Volhout
Edited 2026-11-20 20:32 by Volhout
PicomiteVGA PETSCII ROBOTS
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 375
Posted: 02:20pm 20 Nov 2026
Copy link to clipboard 
Print this post

Hi Volhout,

  Volhout said  Hi,
The pinout on the servo connectors is wrong (1-3 swapped).

Thanks for the schematic - where did you get this from?

In KiCad, it is the other way around:




  Volhout said  Not sure you need all the 470uF E-caps. The battery is low impedance, the FET is only 4 mohm. Maybe one is sufficient. Just to get rid of the short spikes. One 470uF may be better that 6 small ones (ESR wise).

Ok, thanks!

Best
Thomas
Edited 2026-11-21 00:20 by karlelch
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 177
Posted: 05:04pm 20 Nov 2026
Copy link to clipboard 
Print this post

Hi Thomas,
Regardles of the numbering of pins in a socket or diagram, look at the ribbon cable on the servo you have.

Standard RC servos have a common signal order of control signal, +ve supply, ground.

The middle wire is coloured red or orange - +ve supply,
the brown or black wire - ground,
the control wire - often yellow or white.

While the ST3215 HS isn't quite a run-of-the-mill servo, my guess is it will still have the same ribbon colours.

The connecting socket is polarised for this servo, look at :-
www.waveshare.com/st3215-hs-servo-motor.htm
about a third way down for the serial scheme.

With best regards, Paul.

p.s.See also :-
https://files.waveshare.com/upload/d/d3/Bus_servo_control_circuit.pdf
Edited 2026-11-21 03:13 by Bowden_P
Nothing so constant as change.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 06:08pm 20 Nov 2026
Copy link to clipboard 
Print this post

The biggest problem might be the locked rotor current of 2.4A *per servo*. Some sort of current sensing and supply disconnection or limiting may be required.

Found a manual
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 375
Posted: 06:19pm 20 Nov 2026
Copy link to clipboard 
Print this post

Hi Paul,

  Bowden_P said  Regardles of the numbering of pins in a socket or diagram, look at the ribbon cable on the servo you have.

Standard RC servos have a common signal order of control signal, +ve supply, ground.

The middle wire is coloured red or orange - +ve supply,
the brown or black wire - ground,
the control wire - often yellow or white.

Yes, the ST3215 cables are coded the same. I looked at the cables I have and it matches the pins in the pictures I showed in my previous post.

But I see that in my circuit, the serial input connector is not correctly wired. Thanks!

It is confusing that Waveshare names 1=data pin, whereas in the KiCad footprint of the matching connector, 1=gnd ...

Best
Thomas
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 07:15pm 20 Nov 2026
Copy link to clipboard 
Print this post

The manual suggests that the supplied lead is white/red/black, so signal/+/GND makes sense.

For normal PCB connectors the square pad is defined as pin 1. I always try to make that one GND. Waveshare drawings are not always to be trusted. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6276
Posted: 09:25am 21 Nov 2026
Copy link to clipboard 
Print this post

I looked at the waveshare website.


  karlelch said  Hi Volhout,

  Volhout said  Hi,
The pinout on the servo connectors is wrong (1-3 swapped).

Thanks for the schematic - where did you get this from?

In KiCad, it is the other way around:




  Volhout said  Not sure you need all the 470uF E-caps. The battery is low impedance, the FET is only 4 mohm. Maybe one is sufficient. Just to get rid of the short spikes. One 470uF may be better that 6 small ones (ESR wise).

Ok, thanks!

Best
Thomas

PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9383
Posted: 09:58am 21 Nov 2026
Copy link to clipboard 
Print this post

I seriously doubt if the caps are needed. Maybe 100nF to reduce noise. The mosfet is rated for 90A continuous and I like to think that the fuse will go before the mosfet is asked to exceed that by much. :)  If it doesn't your battery is in serious trouble.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026