mathjax

2014-03-16

Motherboard/ Driver carrier board preview


Here is a preview/test route of the motherboard to hold the tango drivers:










The traces go kind of like this:
gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd, signal, gnd
I'll talk about why in my next post and some adjustments I made to the tango board before sending it to the fab, I need sleep.

2014-03-04

Stepper Driver v1.1.3: tango: ready for manufacturing

So the next iteration of the stepper driver for the millathe has been laid out. It it fixes a few quirks on the waltz board such as some mussed up foot prints and lack of labelling on the dip switches. Also it takes up much less copper are and uses a different card edge connector, actually made to fit a 64 pin PCIe connector. Why? Because as it turns out PCIe connectors are
1. apparently way cheaper than other car edge connectors mostly likely because they're made in stupid quantities.
2. capable of carrying fairly high currents 1A+/pin*64 pins = more amps than a board this size should carry.
3. It's metric  and has a 1mm pin pitch, the 1mm pitch is nice and small shrinking the space the signals take up vs .1" pitch. Also I abhore standard units and .1" spacing is the bane of my existance.
4. A 2x32 pin connector is just about the right size for this board.

That being said lets take a look at this board, behold Tango:

Top + bottom

top
bottom
You might have noticed I did not skimp on the copper. all of the large current carrying traces (motor voltage, pwrgnd, all motor out/inputs) are straight up polygons. I figured there really was no harm in increasing the power sinking capabilities of the board. Actually there is some harm assembly will be slightly more painful, there are no thermals on this board, it is made to be soldered in an oven or with the aid of a hot air gun. The terminal connectors on the left hand side of the board just won't go on with out the soldering iron turned to the max other wise. However besides that one downside there isn't much of a case against using all of the power side copper that is is available in this scenario.  I would rather maximise dissipative capabilities and minimize dissipation.

As far as gate driving is concerned this circuit is still using the original A4989 output as the driver despite (in my opinion) it's relative low current output in the 10's to -barley 100's of mA range for maybe a 20Ohmish resistive values on the gate output. One this I might want to experiment with in this scenario is the ringing effects of an under damped gate vs. the losses from turning on slower due to the damped circuit. In order to minimize inductance ( and therefore overshoot/ringing) in the system each gate drive trace was routed in a pair with a trace going to the source of it's corresponding mosfet, similar to a parallel port matching each signal is matched with a return ground for lower inductance. With the smaller loop it will also lower noise from inductive coupling from the currents on the power side of the board.

In comparison with the last stepper board this one boasts a larger volume pair of decoupling caps for the motors, they could probably be smaller and they take up an ass load of room where assload is like 1cm^2 each... maybe not huge but for this board that is a big component. If you put a rectangle arround the board there is around 35cm^2 of area on this board making them take up around roughly 5.7% of all possible physical space.
But  on the plus side with the increased size of the capacitors allows me to use ones with higher voltage ratings/ capacitance ratings. That was a major limiting factor of the driver last time. Now the main voltage limitation is the power mostfets.

So about them
mosfets. this time around going with the DPAK FDD8778 again same fet as last time. One of the main reasons I'm going with it again is it's relatively low gate charge and reasonable on resistance (14mOhm@25C/10vgs). When operating at higher voltages my calculations say that according to the equation:

\\[ Psw = I_{ds} V_{ds} /2(Q/ I_{hl} +Q) \\
but apparent the latex add in I have isnt working... I'll edit this bit later.

Either way the important take away is this equation:

Psw = Ids*Vds/2*Qg*(1/ihl+1/ilh)

It represents the switching power losses occuring in the system.
As far as numbers go for me.

Vds=25V
Ids = 10A
Qg(that I care about) ~ 9nC
ihl/ilh~100mA with a complete short on the driver (I'm going to look at how low a value of gate resistors this circuit can get away with)
f=some weird poop

Now the stepper frequency, it has a linear correlation with your switching losses and is therefore important highly dependent on your control method. In the tango driver, the A4989 controller provides a hysteretic-constant off time current control method. A hysteretic controllers are also called bang-bang controllers, they are not constant frequency and the dependent on the system load. Often thermostats contol temperature using a bang-bang controller. Generally with a hysteretic controller you have a high limit and a low limit, when the output sense is below the lower limit the controller turns on the power full blast, then once the out put sense reaches the higher limit it turns off the power.

Example:
Your thermostat is set to 70 with +/-5 degree limits on the temperature, the temperature is dropping in your house because it's winter and cold outside. The temperature in your house drops to 65. The thermostat senses this and cranks on the heater; depending how large your house is and how powerful the heater affects how quickly your house heats up. Regardless of how long it takes, your heater is going to try it's damnedest to heat up that house as fast as it possibly can. Once your house is 75 degree the thermostat shuts off the the heater and your house begins to cool again. This cycle then repeats.

In the control of the stepper motor the controller is similar, but rather than having a lower limit it just turns the controller off for a fixed time. With this controller, the controller clock is 4MHz (set through a resistor) and the fixed off time is 87 clock cycles. This sets an upper limit pwm frequency of ~46kHz, giving us a decay time of 21.75microseconds. The load dynamics decide how long the on-period will be. The load: a big ass stepper motor, motors are commonly modeled as a voltage source, inductor and resistor. What matters most in this case is this motor inductance.

For a decay time of 21.75us assuming we are dominated by the motor inductance... the time constant is 2.8mH/.73Ohm = millisecond range = way longer than we care about (go on wikipedia and read about RC and L/R time constants if you are curious). Assuming steady state operation with the stepper motor which is ironically is a pretty bad case for this controller in terms of power dissipation, but that is another interesting discussion that is highly related but I don't want to get into right now.

If the motor is drawing 5A RMS on a phase

dIon=dIoff
Von*dton/L=Voff*dtoff/L
dton=Voff*dtoff/Von

You know what, maximum pwm frequency in the steady state is 35ish kHz and I'm tired of writing about this right now this post really went on a tangent. More about controls pwm frequency and losses later and how it relates to this controller.

 Either way the drivers should have pretty much the same amperage rating as the last ones at (+10A) but with more voltage up to 25V till the fets poop them selves giving it 200W/ driver minimum for a bit of margin on the driving voltage, I'll be on the look out to better suited fets to increase the power density of the system since that is a real limiting factor at the moment.

I'm gonna go order the boards now.