2025-03-17 10:02 AM
Hello, I am creating 2 pcbs, one for controlling 6 stepper motor drive boards, and one for controlling 8 servos. Both have an STM32 and CAN communication. It would be great if you could critique my designs and tell me where I could improve so they have the maximum chance of working
Zoomed Out stepper
zoomed in Stepper
Servo
Thanks so Much!!
2025-03-17 10:30 AM
There are many things where poor layout could make the design a failure.
But without access to the schematic, it's largely guesswork. What is your chosen stm32? Help us to help you by posting both schematics, including component-values and capacitor-dielectric choices.
2025-03-17 10:44 AM
using stm32l476rg.
Decoupling Capacitors are ceramic, the capacitors for the driver boards are electrolytic (as stated in the datasheet). Driver board is mp6500.
Can transceiver is MCP6500,
Power and CAN are both delivered to the board using a DB9 Connector. the 3.3V input is connected to a 10uF cap near its entry point onto the board, The can lines are connected to the transceiver, which then connect to the MCU
stepper schematic
headers for driver board
servo schematic
headers to connect servos
power control
2025-03-17 11:08 AM
Two things are clear that I don't like:
Different pin-outs for your SWD1 connectors. That's just asking for trouble. (I tend to use the TC2030 as it means I don't have to mount anything on my pcb and there is an "official" pinout I can stick to. Those connector are expensive so maybe a hobbyist can't justify them.)
Your pnp transistors Q1 to Q8: The emitters claim to be at +5V but the stm32 output will only swing to Vdd i.e. 3.3V. So the transistors will never properly be turned off. (You might get away with it by driving them open-drain, but in the absence of any resistor between base and emitter turn-off could be slow).
2025-03-17 11:12 AM
Thank you so much for the reply, I realized that the transistor thing may be an issue and have been looking into ways to rework the design. Apart from that, what are your thoughts on how the PCB is laid out? Decoupling Capacitors, Clock placement, PWM signals, etc? Im fairly new at this and am designing it for a club, so I havent really had the chance to progressively work my way up to complex PCBs so any advice would be a huge help.
Thanks!
2025-03-19 7:09 AM
How do you propose to mount the boards? Quite often we'll have 3mm diameter holes at each corner. It stops things flapping around and potentially shorting out.
I don't like that you don't have voltage-regulation for the stm32 on-board.
On the stepper-motor board, you have very thick wires between the 16-pin modules and the 4-pin stepper motors. But I don't see the +24V distribution being much thicker. And more-importantly, I don't see the 0V return for the stepper-motors being separate from the stm32's 0V.
Is it a 4-layer board? 2oz copper?
Do you propose to hand-solder the through-hole components? If so, I'd make the pad rings-of-copper rather thicker to allow the heat of your soldering-iron tip to get to the metal particularly on the 4-pin servo connectors.
2025-03-19 10:59 AM
Lol i forgot to add the mounting holes, they have ben added
Is voltage regulation necessary if the board receives power from a stable buck converter.
In terms of wire thickness, only one stepper motor will be on at once.
For the 0v, is this a huge issue, the 24V and 3.3v share a common ground at the supply, so can't they both connect to the ground plane. If not, where should the 0V of the stepper motors go?
The stepper motor board is 4 layers, the servo one is 2
2025-03-20 1:28 AM
In general:
Even crappy designs might work with disregarding the above - but then it will surely never pass the EMI testing...
2025-03-20 2:59 AM
What do you mean when you say "only one stepper motor will be on at once"?
Do you mean that the others will be totally powered-down, and free to turn (even losing their positions)?
Or do you mean that you will not be actively moving them. Because in this state, they still keep one or two coils energised, and so still draw the current. That's why stepper motors get and stay hot.
2025-03-20 6:24 AM
the stepper motors are for pumps, so they just need to rotate. They will be fully powered down so their position does not matter