Designing A NEMA 17 Motor Control Board PCB - Trace Routing?

Thread Starter

rpg663

Joined Sep 19, 2023
4
Hi! This is my first post on the forums. I'm an IT guy and also an automotive guy. Working on becoming an electronics guy too. I have a PCB I've been working on for a while that uses an ESP32 to control 2 TMC-2208 motor drivers, which drive 2 NEMA 17 stepper motors. It also uses an ADXL-234 accelerometer that I'll use as a data input for deciding how fast and in what direction to turn the motor drivers.

It will be used to control vehicle suspension dampening through a knob on top of a coilover.

The difficulty I'm having right now is with PCB layout. I've watched YouTube tutorials, but my PCB routing just got so crazy I used the autorouter. I think for something like this, it should be fine, but I just want to confirm I'm not doing something stupid before I order a couple to test my idea out. I tried breadboarding it but the connections were too small for me to solder with my current setup.

I'm linking my EasyEDA files and hoping someone has an opinion to share, or a direction I should go in learning to do this better. Maybe even a similar project to borrow from.

Let me know if I need to upload a different file type.

Thanks!
 

Attachments

Jerry-Hat-Trick

Joined Aug 31, 2022
451
I googled ADXL-235 but only found ADXL345 which is presumably similar, maybe a later version. This is a surface mount IC but thru hole modules for incorporating with Arduino type processor boards are widely available, as are Stepper Motor Driver boards, or use SN754410 H Bridge driver ICs directly - also thru hole.

So for small quanties, I'd recommend building the circuit on strip board. Overall, your circuit is quite straightforward to lay out by hand on strip board - I use the attached printed sheet which I find helpul for this. Remember to cut the tracks where necessary!
 

Attachments

Thread Starter

rpg663

Joined Sep 19, 2023
4
I googled ADXL-235 but only found ADXL345 which is presumably similar, maybe a later version. This is a surface mount IC but thru hole modules for incorporating with Arduino type processor boards are widely available, as are Stepper Motor Driver boards, or use SN754410 H Bridge driver ICs directly - also thru hole.

So for small quanties, I'd recommend building the circuit on strip board. Overall, your circuit is quite straightforward to lay out by hand on strip board - I use the attached printed sheet which I find helpul for this. Remember to cut the tracks where necessary!
Yes, I meant ADXL-345, oopsy.

I also misspoke. I did connect it with a breadboard and it worked properly, but since this is going in my car, it was too touchy for me to feel comfortable about using it like that.

I tried using proto-board and the soldering and wire connections were a bit too small for me to do.

I haven't used stripboard before, but the best layout I can get includes a via. I think I could figure that out, but this is my first "from the ground up" electronics board design, and I just want someone else to do it so I don't have to worry about how my traces work, and just focus on how the circuit works as a whole.

I redid my board and got a lot more comfortable with EasyEDA. Where I'm at now is wondering if the default trace size is big enough for 36 volt 2 amps going to the motor drivers. And should I move the placement around to avoid electromagnetic interference from it. The 36V comes in over VMOT, to the left of the ESP32.

I'll be powering the 36V part of the board with a 12-36V 5A DC-DC Step Up Converter, and the 5V portion with a 12V-5V DC-DC Step Down Converter that will be placed separately.

I'm attaching my new PCB design below if you want to take a look.ADAS.PNG
 

schmitt trigger

Joined Jul 12, 2010
775
You are going to receive 357,481 different opinions, thus I’ll provide my suggestion # 357,482:
If you are unsure about a trace’s current carrying capabilities, use a jumper wire on the high current traces.
 

Thread Starter

rpg663

Joined Sep 19, 2023
4
You are going to receive 357,481 different opinions, thus I’ll provide my suggestion # 357,482:
If you are unsure about a trace’s current carrying capabilities, use a jumper wire on the high current traces.
I appreciate you looking into it. Does everything else sorta look like it makes sense? Did I commit any cardinal sins?
 

Jerry-Hat-Trick

Joined Aug 31, 2022
451
Just taking a quick look, my view is that your layout is overly complicated with vias and tracks going between pins. Looking at your original schematic, if your layout were to mimic this more closely it’d be much simpler. Ideally, try to build on a single sided board without any tracks running between adjacent pins, with your component positions chosen to allow this.
 

Thread Starter

rpg663

Joined Sep 19, 2023
4
Just taking a quick look, my view is that your layout is overly complicated with vias and tracks going between pins. Looking at your original schematic, if your layout were to mimic this more closely it’d be much simpler. Ideally, try to build on a single sided board without any tracks running between adjacent pins, with your component positions chosen to allow this.
I took your advice and got my design down to 0 vias and cleaned up the routing some. Since this is going in a car, a fairly noisy environment, do you think I need a 4-layer PCB with a ground plane and power plane? Since I have the motor power supply of 36V and at a maximum 4 amps (divided between the two motor drivers), would a ground plane help with EMI? I was also considering using a metal case, so I could also use this as a ground surface.
 

Jerry-Hat-Trick

Joined Aug 31, 2022
451
I took your advice and got my design down to 0 vias and cleaned up the routing some. Since this is going in a car, a fairly noisy environment, do you think I need a 4-layer PCB with a ground plane and power plane? Since I have the motor power supply of 36V and at a maximum 4 amps (divided between the two motor drivers), would a ground plane help with EMI? I was also considering using a metal case, so I could also use this as a ground surface.
Good questions! You are right, cars are indeed horribly electrically noisy. There are probably members of this site who are more experienced to advise you on this. Personally, I think a (diecast) metal box is a good idea anyway but unless you are planning to put this into volume production I'd start with a single layer board and see how it goes. Hopefully you can monitor the operation in practice and if it loses it's way that the fault condition leaves it safe.
 
Top