teensy stepper control first time building a pcb,

Status
Not open for further replies.

littletim

Member
hey im looking to try build a pcb for stepper control,

im using 8 steppers with a teensy 4.0,

i have so far built up most of the pcb but have started to worry im missing something.

i have a screenshot of the board in kicad https://imgur.com/a/rQrX4iQ
as you can see its not finished im just wokring on the basics to see how it looks,and thought id ask other before i continue down some hole.

so far my setup is

8x tmc stepper drivers-- all drivers are 3.3 compatable
bluetooth and hc12 adaptor for wireless control. 3.3 compatable
regulator for the teensy vin pin,
a couple of buttons and led to show its started up and thats about it.
8 x motors

i have added the needed caps to vmot and gnd as normal and added resistor to the ms1 pins to ground.

other than this is there anything else i should be doing?
its my first time im doing a pcb are my lines ok or should i have them set up differently,i have tried to make the input voltage go direct to motors and have made the stepper pin adaptors as short as possible,

i havent added any diodes on input or fuse's should i?
as at times i may be powered via battery>vin and i would still be using usb serial at times i should cut the vin trace to vusb?

my input voltage will either be a ac>dc 12volt input or it will be 14.8v4s2p lion pack connect via a bec to an xt60,if my bec brings down the voltage to 6v should i be fine to put that directly to the vin pin on teensy?or should i use my own regualtor still.

just looking for a little tip,thanks
 
Last edited:
Hard to say without a schematic. I would regulate to 5V for the T4.0.

You don't want your 5V fighting Vusb so yes, isolate. Especially if it might be 6V...

How are you interfacing to the step sticks? and are you expecting to program them (via spi or something else)?

Have you sized the total current draw of 8 motors? It looks like you have fairly wide traces for that but there is no substitute for doing the math. Worry about stall current, too. the trinamics are pretty good about over current, though.

Battery/voltage reversal protection?
 
ok i will change regulator to 5v instead.
and cut the vusb line,
i dont plan on interfacing with them via spi or uart as im just using the standard stealchop and controll the whole thing through serial on the teensy with high low's.
im using some small motor Nema 14 Bipolar 1.8deg 18Ncm (25.5oz.in) 0.8A 5.4V 35x35x34mm 4 Wires
so .8 per phase 1.6 amp but i dont need or require the full torque for this project so am not worried about it being allot less to save battery.
i will supply 5v from the lion pack to a ubec then 5v to motors and split to teensy vin.

my traces on the pcb are for sure bigger i need but i looked at the ramps board and sort of copied a bit there sizes.

the thing is sometimes in future i may want to use some bigger motors and need the board setup to accept 5v upto 12v

thanks
 
OK, sounds good. Sizing the traces is easy - there are on online calculators for trace width based on copper thickness and current. You don't want more than a 10C temperature rise. Note that you will never get both coils drawing fully. A good proxy for max draw is one coil at full current so .8A * 8 or 6.4A for your board. You can also run wires on your Vmot bus for additional current if you want narrower traces - sort of a very thick trace.
 
ok so if i go with 6.4 and run it through a calculator i got this,https://imgur.com/msyijos
but im confused as 10 mm is enormous much bigger than i see others use or im i using the calc wrong?
can you explain what you mean by this " You can also run wires on your Vmot bus for additional current if you want narrower traces - sort of a very thick trace. "
do you mean jumper wires?i.e outside of the pcb i run a wire across to each vmot?
also do you think a AMS1117 5v 1a will be suficient to power all the io current needed for the drives and teensy itself ? or should i add a bigger buck convertor.

thanks,
 
Thought I posted this but it seemed disappear.

The photo is pretty blurry but it looks correct. 10 mm wide.

You would run a bare wire right on top of the trace and solder it at each pad where there is significant current draw. Of course, you need to size the wire to handle the current.

Power engineering is pretty much ignored by most hobbyists and, sadly, a lot of professionals too. 1A max for the AMS1117 is a nice number but highly unrealistic. Like max voltage, nobody runs their parts at that. At least not without some extreme measures if they want them to survive. You need to add up all the current draws from your logic and teensy. This tells you what you need to supply. Then size your supply - probably at 125% or even 150% of that number.

On the AMS1117, your max current is related to the temperature rise for the way you are using it. Heat is what kills electronic parts. The datasheet has something called "thermal considerations". It's an eye opener - they talk about 1000 mm2 of copper to get a temperature that won't kill the part. There is also something called "thermal resistance" and is spec'd as temperature rise/watt. If you push 1 A at 5V through it you will see 5Watts. The TR value for that case is 15 C/W so 75C rise over ambient temp - you are looking at >100C. With good copper area or a decent heatsink you might get close but I wouldn't run any electronics over 100C. Of course if you only pull 0.5A, you will see a much lower temp - 50C or so. Still hot enough to burn your finger but the part will survive.
 
The boring suggestion, before building a PCB to control 8 stepper motors take the time and build a pcb for controlling a single stepper motor. Use this one to find out what mistakes you have made and what design improvements can be made, and there I dont mean extra bells and whistles but in term of cooling, current draw and possible step speeds.
 
mlu: it would be boring if i had to do it again, i already have a few systems i built by hand with jumpers everywhere on a proto board,but gets messy and hard to check what went wrong in future so i just used it as a test like you suggest, it took me to this stage so im happy.

still lost about the 10mm size as the ramps board is no where near 10mm nor many others,i like the idea of adding a few pads to add a wire if needed.
ok so instead of the 1 a from the AMS1117 im going to change for a buck convertor as i can fit one inside the teensy space and it would be hidden.

i will do the add up and check before but am sure a buck convertor supplying 2a should be more than enough,each driver neads near 30-50ma and teensy 100 ma or so,

if i supply the bluetooth module or the hc12 with a 5v input will it give 3.3v logic back or 5?
i.e should i power the module from the vin 5v line or 3.3v, i was hoping to supply direct from the vin to not use the teensy onboard regualtor but worried that the mdoule may send back a 5v logic signal and damage the teensy.
 
Yeah, the RAMPS board was never intended to drive so many steppers and, frankly, is fairly underspec'd for the total amount of power it could draw. The saving grace there is that 3D printers are not terribly demanding.

Can't help you on the bt or hc12 questions - what do the datasheets say? worst case, test them.
 
Status
Not open for further replies.
Back
Top