Notifications
Clear all

PCB trace width for 4 x DC motors with 2 x TB6612 @8.4V; based on max stall current x 4??? Help!

12 Posts
5 Users
9 Likes
1,510 Views
(@alex-uk)
Member
Joined: 3 years ago
Posts: 14
Topic starter  

Hi everyone. I'm a noob, on a steep learning curve trying to build my first PCB (using Easy EDA software) for a small robot car; but I don't have enough grasp of electronics to decide how wide my traces need to be and avoid things melting...what I need to understand is 'realistic' total (possibly peak?) current draw on my motors. Afraid I'm going to need as 'non-technical' an answer as possible (crayons? 🙂 ) but am doing my best to learn and have scoured this forum and the web for answers already. Really grateful for any help.

Details for context; 

I have four  DC TT gearmotors, usually using between 4-12V, such as this:

https://www.adafruit.com/product/3777

Power is 2 x 3.7V 18650 batteries so max 8.4V and nominal 7.4V.  Apparently the battery can provide large currents if needed, 10A or more certainly for short burst. 

Adafruit says that at 6V, each motor draws 160mA @250 rpm no load, and 1.5A when stalled. Hard to find info on current with loads, but some sites say max is 250mA.  I extrapolated that at the max 8.4V, the stall current on each motor would therefore be around 2.1A, but as it's not entirely linear, for safety I'm going with absolute worst case 2.5A max per motor if stalled. 

Maybe pertinently, Adafruit sell these with 28AWG wires attached.

I have no fuses planned (at the moment, though could if needed).

Motor control is through two TB6612 FNG motor controllers, each controlling a pair of motors (front pair, back pair respectively), and they can handle 3.2A on each channel.

I'm controlling the whole thing from ESP32 development board, with 2 PWM channels (left and right), each going in parallel to the TB6612s. The ESP takes its power from 5V VCC supply that comes from a LM2596 buck convertor (also tapping off from the battery voltage, but there are no high current loads on the VCC side). So one motor on each board responds in parallel when either left or right control inputs given (via Bluetooth Low Energy and a PS3 console controller, just if anyone is interested!)

I have had this same setup working on solderless breadboard with jumper wires (a mix of 22 and (I think?) 28AWG connectors, sitting on the perseid car chassis with same 4 motors.

The question;

Some parts of my circuit nearer to the battery are going to be providing power and ground to either one, two or four of these motors, and I am trying to understand therefore how wide the traces on my PCB need to be to handle the current realistically expected with a suitable safety margin. 

I've taken the max stall currents, and assumed I need to add together so 4 x 2.5A = total max 10A  if all 4 motors are stalled (I'll come back to this scenario..). Based on that, and the IPC trace width calculators (based on 10 deg C temperature rise) such as at...

www.4pcb.com/trace-width-calculator.html

...with the normal 1 oz copper/sq ft trace thickness, which I understand is 0.035mm (35microns) thick, 10A would require a track width of 7.62mm (on the short common power/ground section of trace that all four motors share; I've branched them off as close to battery terminals as I can) which seems absolutely massive and would not allow me space to route the traces on my small PCB!

I know that standard traces on Easy EDA are 0.254mm, and a lot of people work with around 0.5mm and 1mm too. Looking at the TB6612 itself, it can't have traces that wide on it; hence, I must be going wrong somewhere!

What current scenario should I base my trace width calculations on when using 4 DC motors in a car like this? And can anyone help me arrive at the appropriate trace widths (depending on where in the circuit)?

The questions I'm already thinking;

Assuming the top end of motor current under load at 250mA is right, this is so much less than stall current; should trace width be based on something nearer 4 x 250mA = 1A =  around 0.25mm wide? I can certainly fit up to 1mm wide traces on the board so plenty of margin against that.

Are we ever going to see all four motors drawing stall current at the same time? If so, for how long? Are the trace widths in PIC tables based on continuous current, so peaks above this won't melt it?

And (assuming no fuse), if stall currents do occur on any motor, what actually happens? Does the motor just stop? Does the TB6612 offer any kind of 'fail safe' to limit total current on the pair of motors it controls? Or will things actually start melting?

As yet, no burning smells from my breadboard on wheels prototype, but I do want to make sure the PCB version is safe!

Thanks to anyone who can educate me, and really grateful for as easy to understand answers (as possible). If I've missed any salient details please let me know.

All the best,

 

Alex


   
Quote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@alex-uk

I had a similar design conundrum a short while ago, and without actually answering your question directly, I think you will find most of what you need if you google  PCB trace width calculator.

A link I bookmarked is https://www.ourpcb.com/pcb-trace.html  but your will find quite a lot out there on the web. 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

I think your logic re using 2.5A is sound.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi @alex-uk,

   I haven't built a robot or other motorised object, so others here have infinitely more experience in that domain. However, maybe I can expand your thoughts a little. Sorry it is a bit of sermon, rather than an easy answer, but if it was easy, you wouldn't have a challenge. 😀 Hope it's useful anyway.

----------

An electric motor and a generator are (essentially) the same thing. That is, if you take a motor, and spin the armature, it will generate electricity. This is probably not new to you, but what may be 'less obvious' is that when an electric motor (armature) is spinning because it is connected to a power supply, it is STILL acting as a generator.

Obviously, when power is first applied to a stationary motor, the initial rotation rate is zero, and if the applied power is sufficient, the motor will accelerate up to a certain speed, at which it will stabilise. For simplicity, lets just consider cases in which the load is constant, and the motor has had time to reach a stable speed (including zero rpm i.e. stationary because the load is so high, it is unable to move).

  1. If the mechanical load is less than the value needed to stall, the motor will be rotating
    • the motor will be (internally) generating a voltage
    • the generated voltage is of opposite polarity to the applied voltage
    • the magnitude of the generated voltage is less than the applied voltage
    • it is not possible to directly observe the generated voltage, but its effect is to reduce the motor's current demand, which can be observed
    •  
  2. If the mechanical load is too high, the motor cannot move, and we say the motor is 'stalled'.
    • A 'stalled motor' is not moving, and hence it is not generating any voltage
    • The current flow will be determined by the applied voltage and 'normal' Ohmic resistance of the current path(s), through the windings, brushes, etc connected to the power input terminals

Hopefully, this gives an insight why a motor might take 250 mA when spinning with no load, and 2.0 A when stalled, even though the applied voltage, of say 8V, was the same in both cases.

(I've picked rounded values for current and voltage to simplify the discussion - adjust to your data.)

The 250mA case applies when the motor is motor is spinning at high speed, and the 'generated voltage' is only a little less than the applied voltage.

The 2.0 A case applies when the motor is stalled, and acting like a resistor .. 4 Ohms (R = V/I) in this case.

(Note that the power consumed by the motor goes from 8V x 0.25 A = 2 W, to 8V x 2 A = 16 W. Almost all of that power will be heating the motor ... hence stalled motors are prone to magic smoke syndrome...)

---------------

So how does this apply to PCB tracks and all of the associated wiring, switches, etc.?

Well it depends what conditions your motor is going to experience -- which only you know!

Unless your robot is extremely light and 'friction free', it seems likely that even when it is moving 'freely', that the motors will experience some mechanical load, which will slow them down, reduce their 'generator' effect, and increase their current consumption. Whether that increase be a few milliamps or more than an Amp is impossible for me to guess.

Assuming the motors are driving the wheels, what happens when the robot drives into a 'solid' object? Bear in mind, you may be planning lots of clever strategies to avoid or cope with such cases, but whilst you are getting these to work, there will be occasions when they all go wrong!

Possibilities include immediately backing off, stopping, spinning the wheels, or the wheels may 'jam' due to the tyre friction with the 'road', causing the motors to stall. If the motors stall, then as discussed, the current will rise to (say) 2 A per (stalled) motor.

How long will it be in this state? How will you 'rescue it?  Can you be sure of 'rescuing' it within one second, 10 seconds, .... The longer the time, the hotter everything will get, including the PCB tracks which heat up rather quickly ... less than a second in adverse circumstances!!

If the track, assuming it is on the outer layer, gets above (about) 130 deg Celsius, it will probably detach and expand away from the board, then melt. The board may also get charred.

----------------

As already advised, there are PCB track calculators on the web which estimate the 'steady state' temperature rise for a given track size and current. These are only estimates, but, assuming the one you find correctly implements the IPC recommendations, then it will be based on a lot of experience.

As partial mitigation, you might decide that the maximum current case will only apply for a very short time, and also you will accept that your PCB tracks will occasionally get hotter than would normally be regarded as acceptable. (I think temperature rises of more than say 50 deg C would definately be frowned on ... and 10-20 degrees would be more likely limits on a complex board in normal conditions .. but these are only wild guesses ... others may have a view.)

You might also instigate a 'physical mitigation' strategy. e.g. solder a tinned copper wire in parallel with the high current PCB track along its length to reduce its effective resistance. It is not a 'pretty' approach, but it can be made to work, and may be 'cost effective'. If you follow this approach, consider ensuring the solder mask does not cover this track ... scratching it off to solder the wire is possible, but not fun. And obviously you want the track to be wider than the diameter of the wire, to allow a nice solder flowed result.

---------

To me, 'Standard trace' size of say 0.254mm ('10 thou' of an inch in the old money) is a 'flashback' to maybe 40 years ago, when PCBs were manually designed with sticky tape on acetate, practically all logic chips, including 64-pin 68000 processors, came in 0.1 inch DIL packages, and PCB fabrication technology could reliably route a '10 thou track, 10 thou gap' between adjacent pins. At that time, thinner tracks were liable to have 'nicks' to break the track, and thinner gaps were liable to have track-to-track shorts. (This wasn't state of the art performance, but you traded a lot of cost and/or low reliabilty to go much finer.)

If you are trying to etch the PCB yourself at home, then it is probably still a useful size for general purpose, low current connections, but commercial boards can achieve much finer pitch.

However, it is NEVER a 'standard' in terms of high current connections.

----------

Also, I am guessing you are assuming '1 oz copper' thickness, which is common default. If you were considering manufacturing a product, then as this is a power controller, you might well choose a thicker copper layer to keep your tracks a reasonable width. I am not recommending this in your case, as it will probably not be 'cost effective', but it might well apply to the PCB in your controller.

You might consider double sided PCB, with one side having a very wide track/plane to carry the current. Don't forget to use multiple (paralleled) vias if you need to swop to another layer.

----------

By the way, depending upon the length of the high current tracks, remember they are actually resistors, which will reduce the votage delivered .. I suspect your board may be quite small, and this is not an issue, but it is worth checking - the decent (free) PCB calculators include the voltage drop at the specified current.

--------

In summary, I suspect the 'no load current' is unrealistically low, but I recommend you try to get some realistic current measurements from your prototype rig. Use those as a 'normal running' current specification.

If there is a chance the motors will occasionally be stalled, and that condition may last for a second or more, then I recommend you design your tracking to 'cope' with it, albeit possibly allowing for it to get 'a little more stressed' than would be acceptable for 'normal' running conditions. (And the soldered wire trick may be helpful?)

Your controller may have some current limiting protection that could assist you .... that's a read the manual job... and if the first manual is unhelpful, try Googling for any others ... clones of clones seems to be a common phenomenon, and sometimes one clone gets a better manual than another, but there is a good chance they look very similar inside the box. Of course, they might be different.

----------------

Also:

Protecting your battery with some form of fusing system sounds vital to me ... I would hope you have chosen batteries that can cope with the maximum (usually stalled) current for a considerable time, but lithium based cells can get very unfriendly if accidentally shorted, etc.

Unfortunately fuse ratings are a nightmare .. different countries have different ways of specifying fuses. In lieu of a personal major research project on fuses, all I can suggest is "Pick the lowest rating that doesn't blow in 'normal' circumstances, and have some spares for when one expires prematurely".

If you can find a value that allows the motor run 'normally' but blows within a second or so, if it gets stalled, then that might reduce the possibility of  motor magic smoke ..

--------------

Hope this is helpful and not too much of a nightmare. Best wishes and good luck. Dave


   
frogandtoad, Alex UK and Ron reacted
ReplyQuote
(@alex-uk)
Member
Joined: 3 years ago
Posts: 14
Topic starter  

Many, many thanks for the replies, especially @davee. Really gave me a good background on the issue and DC motors. From the sound of it, without being confident enough that the multiple motor stall scenario will not occur. I've tweaked it, allowing, temporarily, higher temperature ranges and taking the traces as wide as possible in the space, but still didn't quite close the gap. The problem therefore seems a real one.

So, taking on board all of the above suggestions, I'm going to reapproach the design from a different angle to avoid the problem. Instead of having my batteries, power switch and the 'trunk' circuits on the board, I'm going to remove them and have all of the the circuit taking the combined, high current loads as decent sized wire/distribution (bus? bar? Is that the term?), heat shrinked etc and fixed to the chassis. I'll then bring in three 'branches' with battery power and grounds separately to each motor driver and to the buck converter, inserting into the board in screw terminal blocks. I do have space for short traces in that can take around 5A for two stalled motors (3mm seems to fit from the tables, more if space). Also separate wire to board connections near their destinations makes my routing easier.

I'll keep the above suggestions and tricks in my toolbox too as required.

Thanks again to everyone.

Alex


   
DaveE reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@davee

Posted by: @davee

Hi @alex-uk,

   I haven't built a robot or other motorised object, so others here have infinitely more experience in that domain. However, maybe I can expand your thoughts a little. Sorry it is a bit of sermon, rather than an easy answer, but if it was easy, you wouldn't have a challenge. 😀 Hope it's useful anyway.

[snip]

As you probably know, I am more of a software guy than an electronics one, but this is exactly the kind of material that floats my boat and why I am here!

Fantastic analysis!

Cheers


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@alex-uk A buss is a good approach.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
DaveE reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi @frogandtoad & @alex-uk,

 Good to hear you found something of interest .. hope it proves helpful in practice as well.

-------

Alex, it sounds like you are on the right lines. As I say, I haven't built such a thing, so there are bound to be some points that are 'obvious' I haven't considered and others may be able to suggest. My comments refer to power distribution challenges in general.

------

Remember current flows in a complete loop, so particularly for high circuits, trace out the loop from the source, say the + terminal on the battery/power supply, all the way round to the negative/0V terminal. Imagine you are designing a road system, and each high current loop needs a smooth three-lane motorway with no 'pinch spots'. Similarly, try to keep such loops separated from low current control/data traffic ... local traffic and bicycles on a motorway, and diverting fast and heavy through traffic onto a country lanes for one section are not good ideas!

If your circuit has a low current/sensitive to noise part, and a high current, noise creating part, both powered from the same source, then make sure they have separate loops, with a common 'ground' connection at just ONE point, usually near the source. You may have more than two such loops, in which case aim to bring them all to to the same point .. this is sometimes known as a star connection.

You might find a busbar approach useful .. the electricity in your home will be distributed from a consumer unit (often still known as the 'fuse box', even though fuses have generally been replaced by circuit breakers) which contains busbars for each of live, neutral and 'earth' This is a common example, albeit for higher voltage and current distribution unit, facing similar challenges. The power input to the consumer unit (live and neutral conductors) is fed to a 'master' double pole switch (with red lever), and through to busbars, which feed the circuit breakers. (Simplified description, ignoring RCDs, RCBOs etc.) If you are not familiar with them, you might have a look to see how they work for ideas .. but certainly NOT one that is connected to a mains supply ... even with the red switch 'off'!)

-------------------------

I am not clear if you intending to buy motor controller integrated circuits, and solder them onto your PCB, or buy controller board(s)/module(s). For the latter, maybe consider excluding the motor current loop from your PCB, relying on copper wires, etc. for the entire circuit from the battery, through main switch, controller and motor, and back to the battery.

If you were intending to put controller integrated circuit(s) on a PCB, remember they often expect a 'generous' PCB area to dissipate the heat .. it might make sense to have two PCBs .. one for 'low power control, etc', the other for motor controller ICs. (Only a thought, not a recommendation either way.)

----------------------

I noted TB6612 in your title, so I just Googled TB6612, (naively expecting to see a small box unit/module), but instead, the first entry was a small (Adafruit) PCB with a chip, and headline of 1.2A ...

https://www.rapidonline.com/adafruit-2448-tb6612-1-2a-dc-stepper-solenoid-motor-driver-breakout-board-73-5310

which produced an immediate reaction is one of 'Is this an appropriate device?'

A glance at the Toshiba data sheet ( https://static.rapidonline.com/pdf/73-5310_v1.pdf ) showed:

image

So it can handle 2A, but only for 20ms ... that suggests it is liable to get 'cooked' if your motor stalls ...

I can believe the 1.2A might be enough for 'normal' operation if the motors are not too heavily loaded, but a stall of more than 20ms would appear to put it in jeopardy. The comments in the data sheet about avoiding overload didn't inspire confidence either. On the basis of the (limited) data I can see, I would suggest you look for an uprated device if your motor can demand 2 Amps or more.

In principle, you could consider using the TB6612 with some form of current limiting .. simple fuses might provide some protection against serious (fire) problems, but will almost certainly take longer to blow than the TB6612 in the event of a stalled motor overload. A slightly stronger controller is probably easier to implement.

------

Good luck with your project.

Best wishes, Dave

 


   
frogandtoad reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@frogandtoad @davee always provides good feedback

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
DaveE and frogandtoad reacted
ReplyQuote
(@alex-uk)
Member
Joined: 3 years ago
Posts: 14
Topic starter  

Thanks again @davee. The TB6612 I'm using is the TB6612 FNG here

https://www.sparkfun.com/products/14451

Which claims it can  manage 1.2A and 3.2A peak, briefly.

Just placed my JLCPCB order for 'prototype', so it's a PCB but with headers for the ESP and TB6612, a LM2596 soldered on, and then connector blocks out to everything else.

 

Thanks for all you help

 

Kind regards,

 

Alex


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi @alex-uk,

  Great to see you are moving forward .. and I wish you every success. I am sure several on the

forum will be interested to know how it goes.

Best wishes, Dave


   
Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@alex-uk I for one am curious.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote