## 2016-10-30

### On Voltage Multipliers, Spiral Multipliers

So of late I have been thinking about voltage multipliers for a variety of reasons. One of which was that I wanted to build a nixie clock and it seemed like an excellent excuse to over design something which could be far simpler. This circuit is what I call a spiral multiplier and I'll get into the details of it in a bit. A friend wanted to learn something about electronics when deciding to do this and this circuit seemed like an interesting way to learn about a variety of concepts and component properties at the same time. The tubes I planned on using could 'just' be powered off of rectified wall voltage with some resistors and filtering, but for safety's sake its nice not to power things with up to 170V and a kW of oomph behind it, it also make the problem more interesting to step the low voltage up to the high voltage.

So I went and somewhat arbitrarily said, 'imma take 15V' and turn it into; &gt140V to power the nixie tubes. The decision to go with a multiplier was partly motivated by not being pleased by the transformers I saw available. But realistically speaking that would be the practical thing to do in this case,(beside powering the tubes off wall power) but where is the fun in that?

Lots of things are technically feasible in this case since it is a low power supply and don't care about the efficiency of a nixie clock as long as heat sinks aren't required.

Which brings about the aforementioned spiral multiplier:
 4 series 3 parallel Spiral Multiplier, peak detector on output as filter.
The body of the multiplier (everything on the left side of the schematic) is the part pertaining to this post.

 Output Voltage green (set a lower control voltage), control feed back: red, pink is the gate voltage on the feed back transistor.
The above traces are for a controlled output set point and if left to its own devices the multiplier will go to a much higher voltage at full power. Open loop the circuit went up to ~200V. The above schematic doesn't look much like a spiral. Below is a topological approximation of the spice simulation circuit which most importantly looks like a spiral:
 Spiral style schematic of the nixie multiplier, it has a filtering peak detector on the output.

This spiral topology represents a combo of two basic multiplier types the parallel and series style multipliers. Each 'spoke' coming from the center of the spiral is topologically identical to a capacitor string (or stack) found in a series multiplier while each round of the spiral is analogous to travelling up a parallel multiplier. The spiral multiplier of some arbitrary number of rounds $\geq 1$ and spokes $\geq 2$ is a generalization of the series and parallel multipliers where either one represents a base case; spiral circuits similar to the full wave cockcroft-walton multiplier can also be constructed.

Backing up to the big picture:
Diode based voltage multipliers have been around a very long time like almost a 100ish years according to the wikipedia. If you aren't familiar with voltage multipliers they do as the name implies and take a smaller magnitude (AC) voltage and turn it into a larger magnitude (DC) voltage of some multiple of the AC amplitude (in the ideal case).

Fundamentally multipliers are built up of capacitor coupled nodes with some diodes slapped on. This forms a network of peak detectors, each takes the peak AC voltage through a diode and deposits it on to a capacitor. This forms a 'unit pump':

 The unit cell of a multiplier

In the unit pump, if $Vac$ dips below $Vin$ (by a diode drop), charge is deposited onto capacitor C1. $Vo = Vin-Vd$ when Vac swings positive you get: $\hat{Vo} = \hat{Vac} + Vc$. The capacitor maintains a DC bias from the AC wave form injected through Vac boosting Vo.
These unit pumps are chained in various formats to form different types of multipliers.

Traditional diode multipliers tend to break down into two forms series/cascade multipliers and dickson/parallel multipliers which are generally treated as two fundamentally different approaches.

The series multiplier is driven from a power source a coupled up through all the subsequent stages whereas in a parallel multiplier the power source is directly coupled through a capacitor to a node in a chain of diodes. The difference in the power coupling has interesting effects. The source impedance of a series multiplier increases as the cube of the number of stages, this is an incredible pain sometimes. However it conveniently grades the voltage up the whole multiplier stack so you only have to couple power into the low voltage end and all of your components can be of a lower voltage rating.

 Series multiplier, takes 20Vpp input, 40Vmax output

A parallel multiplier doesn't have that $n^{3}$ impedance issue but requires direct energy couplings to the high voltage end resulting in a fair amount of energy storage (for the same F capacitors) and it doesn't grade the voltage with the capacitors. Note the similarity between the above series example and the below parallel example

 Parallel multiplier, takes 20Vpp input, 40Vmax output

The voltage increases by the Vpp AC voltage with every pumping node and get filtered to some extent by every filtering node. Both multipliers have the same AC source and reach the similar output voltage.

Both are special in their own way. However both also only represent usage of the unit pump in one 'dimension'. The spiral multiplier is the cross of the two defining a a series/parallel matrix of unit cells. I haven't actually analyzed the topology in detail to see if there are any fundamentally better properties, but it seemed like a fun experiment. Analytical awesomeness can be postponed.

 A 2x4 Spiral Multiplier
 2x4 Wave forms with tiny load

Here is an example of a spiral multiplier.It is effectively 2 parallel multipliers (each consisting of 4 unit cells) stacked on top of each other. The output of the lower one feeding the input of the higher voltage one.  Really you could string $n$ of them together on top of each other and feed the bias of each multiplier one into the beginning of the next. Alternately it can be seen as taking M series capacitor strings and setting them side by side, linking up each DC biased section in the proper format. 2 rounds of a 4 spoke spiral. How it is viewed is  a somewhat arbitrary thing that could be argued multiple ways depending on the nuances of a particular system. Note that in the initial 4x3 multiplier at the top of the post I didn't even bother with a filter string in the body of the multiplier, just an output peak detector to mellow the output ripple.

I'm tired of typing about this right now and feel like it'll turn into a thesis if I keep going. The spiral multiplier concept seemed like an interesting one and there are a couple expansions of the topology that I can think of, involving peak detector loops and phasing

## 2015-10-08

### The Derp Driver

Everyonce in a while I get a really dumb idea behold the derp drive:

Derp Drive 99% 'what if?', 1% something else

So one day I decided that I wanted to make a cutesy little bench top supply because bench top supplies are balls expensive. I'm going to talk about the rest of this venture at a later date. But today I will talk for too long about the gate drive and how it is for the most part an exercise in curiosity.

Imagine for a moment that you wanted to switch a supply at 500kHz on a full bridge in an odd synchronous fashion. Your are strapped by cash and need synchronous rectification on the output because you're going to be dealing with high current and low voltages. You also want the output floating because if the output floats that's handy it means you can have +V or -V or stacked or paralleled if the outputs can share current.

But doing synchronous rectification requires gate drives, some weird boot strapping some form of isolation. If gate drives go in that means an auxiliary floating set of voltage rails for the drivers and some sort of sensing the voltage state which means chips and rails and money and stuff.

It would be nice if all the switches were driven by floating things, you know kinda like a transformer.

But transformers cost money they are big and slow and inductive... but that is a fallacy. Lots of fast things use transformers for signals, pulse transformers are things, USB uses transformers, ETHERNET uses transformers. Ain't nobody calling my gigabits slow. There are some highly legitimate reasons why signals like usb and ethernet utilize magnetic coupling for signals:

1. It can be isolated electrically. My laptop could sit at a completely different potential than your laptop, powered by batteries or off the line and they could still yarble at one another over an CAT5e cable thanks tot he awesomeness that is transformers.
2. A local return path/ reference. Any signal sent out needs to be with reference to something and have a return path and to be a fast signal inductance needs to be minimized. This is why PCIe, usb, ethernet, SATA and ect. are all differential pairs for high speed signalling. Transformers by nature create a differential voltage source. As a statement of Gauss's law and conservation of charge they must create a + and relative - to maintain the E field flux but I'm going off on a limb. The important bit is that by creation of a differential signal a return path exists that does not necessarily need to be referenced to ground or anything in particular besides the other end of the wire in the transformer.
3. You can have common modes impedance without differential mode impedance. if your output if flapping around a some voltage this can help keep noise from getting into the primary side of the circuit. because transformers aren't perfect and they have some amount of capacitance going from the secondary to primary side.
Transformers are pretty nifty for a variety of reasons, but they have their limitations. That being said in the system of this gate drive I am worried about the volt-seconds that the cores will be able to withstand before saturating.

Once the cores become saturated the primary becomes decoupled from the secondary in at least  one direction and the ability to keep the switches in a specific state compromised (to some extent). The ethernet transformers I have seen largely don't come with a primary volt-second spec. However the ethernet transformers I have seen seem to posses a magnetizing inductance of ~300uH which I thought was surprisingly high, and I think puts the idea of the gate driver on the edge of potentially acceptable/ practical.

As far as practical implementations go all of the ethernet transformers are center tapped on the primary and secondary side. By running a push-pull converter using the primary centertap the transformer is a 2:1 step up. This allows you to effectively drive a fet using logic level voltages, once you get above 10V on the gate of a FET the reduction in Rds on is generally marginal. I think the advantage this system would get from running at higher voltages is the faster turn on time of the switch but once the switches are on it won't matter much.

This brings into discussion a few things which I have marginally modeled in spice. What limits the turn on speed of the device? Like I got a voltage source with some impedance. The switches require some base line amount of voltage to turn on. The FET gates are a derpy capacitor, in order to turn on the switch requires some amount of charge slapped on the gate which roughly translates into a given amount of energy (roughly). The goal of a fast gate driver must be to deposit that energy onto the gate as a fast as possible. Any impedance between your roughly ideal voltage source of a decoupling cap which is hopefully sized significantly larger than your gate capacitance otherwise what the fuck are you doing, will restrict the flow of power. There were many many assumptions made in that last sentence.

But what it boils down to is what is throttling the current? resistance or inductance? with a transformer inductance can be a severe issue at high frequency. Even if the fundamental frequency of the switching isn't that fast what is important its about the rise time of the gates voltage waveform. The long the turn on the longer the losses and that what I care about reducing.

But holy fuck the post is longer than I expected and I'm just glossing over things. may I'll post the spice sim next post.

## 2015-09-28

### On the Mother board and stepper carriers

The mother board I was referring to in my last post got made and seems roughly functional.
Despite me screwing up the stepper driver to some extent.

The mother board should be able to interface to six of the stepper carriers as soon as I produce a stepper carrier that isn't inherently screwed up ...besides the first round of stepper carriers which worked just fine ironically.Tango 1.1.3 has some dumb issues as i turns out not all 780x devices in the same packages have the same pin out and I was playing a bit fast and loose with the foot prints and mixed up the 5V with the ctl power in on the 5V regulator I was using. This may have resulted in burning out the gate driver chip immediately since I wasn't able to coax any PWMing out of the tango driver after fixing the foot print mess up. Le sigh.

Time to populate/kludge another carrier board. If this time round I get the board built up right and touble shoot it it will be pretty exciting to have a board carrier for so many boards. It will make a nice test platform.

The mother board is laid out in a fashion that allows for n arduino mini or some other equivalent micro to be mounted onto the board and have its outputs connect to all the varirious driver boards through the parallel busses laid out on the mother board. There are up to ~8 accessible signals on each bus/ for each driver board (the GND/SIG/GND/SIG/GND/SIG traces reffered to in the last post). This was intended to leave the future possibilities open. Currently the stepper driver would only use 2 signals/ driver leaving lots of possibilities.

Hopefully I'll get something done on the stepper fron again soon. I've been a bit distracted by other electronics and that whole having a job thing.

## 2014-03-17

### 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-05

### 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.

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.

## 2013-11-11

### Waltz Stepper Drivers: Functional Yet Noisy

After assembling one of the Waltz boards and only screwing up the the tiny driver once the board works!
There were only a few quirks in getting the board to run. A grounding issue between my laptop and the Arduino and the scope which made things flip out whenever the scope connected. Which means something isn't as well grounded as it should be, since half the outlets where I live don't have a ground that might have been the issue... connecting all grounds explicitly in the circuit fixed the grounding issue. From that point out operating the motor was pretty smooth. The board was hooked up to an arduino with modified 'blink' code to step the motor continuously in a given direction. Here's a video of the waltz board driving a stepper:

It worked well up to several kHz of step frequency if the step frequency got too fast the motor would just sit there and make a very annoying whining sound. The controllers were tested up to around 10A with no heat sinking or additional cooling. Using the 'will this burn my finger?' test methodology the main power fets remained cool enough up to around 6A that you could continuously keep you finger on them. At 10A they had a temperature of  'owfuckshitthathurts' after around 5s of keeping your finger on a fet, but it wasn't that 'burn on contact' kind of hot. In conclusion I should get some thermocouples/ temp sensors also the boards seem quite capable of being pumped over 10A. Once they are upgraded to D2pak FETs rather than the jankily soldered on Dpak FETs this might improved heat sinking and current capacity.

On the next rev of the stepper driver the caps are going to be swapped out so the motors can run at higher voltage. Hopefully this will push the motor PWM frequency out of the audible range. The way the A4898 does current control is a fixed off time system, this makes the output PWM of the system variable with various operating conditions such as  the voltage supply inductance of the motor and the decay rate settings on the controller. The noise and vibration also seems to vary greatly with the step frequency of the motor and the microstep settings. Motor operation seems much smoother and less noisy at increased speeds, this might be partially due to rotor inertia/velocity matching up with the commutation of the motor. There will have to be some characterization to find optimal operating points.
The motors being used are 27.4kgf*cm (381oz*in), 3.5Arms/phase, NEMA 23 hybrid steppers: data sheet. When stepping the motors vibrate enough on any hard surface to be really obnoxious, that's why the motor is sitting on a cushion in the video.

Next steps for the millathe project will include measuring up the millathe itself sizing it for a new set of ballscrews and mounting hardware. The next set of boards needs to be designed as well as the motherboard to hold all of the smaller stepper boards.

## 2013-11-06

### Stepper Boards have Arrived: Waltz v0.2

Woooooo the boards arrived like several weeks ago they arrived, but what ever they're getting posted about now so ...woooo stepper boards. They're all pretty n'purple n'stuff.
So far I've only assembled one and there seem to be no fatal errors on the board that will prevent it from functioning. Couple minor package errors and what not but whatever.

here's a pic of the board:
 I went with purple because why the hell not?
I've been slightly distracted from the project by work. However there will be more posts soon since there needs to be board testing.

In the mean time pretty boards are pretty, but pretty useless boards are pretty useless until they are tested otherwise.