tag:blogger.com,1999:blog-5695538552181194202024-03-12T17:23:55.323-07:00Zoom Boom... ZapBuilding Stuff...wootjumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-569553855218119420.post-63129085453641273152018-11-29T01:54:00.002-08:002019-02-22T17:02:29.616-08:00KiCad, Generalization and Workflow<a href="https://drive.google.com/open?id=16FVLRoMhw6f6x-8J0wz9ro3arXX5UB_H" target="_blank"><span style="color: #f6b26b;">ugh</span></a> the preceding document is the culmination of a set of rants and thought about PCB design software for some; there's a TLDR at the bottom. I ran out of steam writing it eventually but some of the ideas with work flow are kind of interesting. I'm going to post the bulk of it on kicad forums to see if anything will come of it there. If it doesn't maybe it's time to take a stab at the kicad source.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-60541163112773039922017-07-11T05:42:00.000-07:002017-07-11T05:42:54.580-07:00Spiral Multiplier Nixie ClockFirst I would like to devote this post to all the engineers that put their time into the creation of the modern printed circuit board and namely Pail Eisler who apparently is the inventor. Because I decided to point to point solder this project together and I am never doing that again, even if it is 'small' and all through hole, just like this dumb clock . When a 40 pin fan out is required there are just so many connections involved, stripping every wire, hand soldering each joint. I did this originally because I wasn't in the mood to route and wait for a board, that was a horrible idea. Boards get routed by hand threading wires and soldering them in place or they get routed on a computer; one method is infinitely more painful for a even a moderate number of components.<br />
<br />
<a href="http://2.bp.blogspot.com/-Dm9ILpMrqXs/WUsUAhHWMdI/AAAAAAAACiM/E9v8IUay5MoArSBGADvojanoQ1YEslV6gCK4BGAYYCw/s1600/IMG_2372.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="240" src="https://2.bp.blogspot.com/-Dm9ILpMrqXs/WUsUAhHWMdI/AAAAAAAACiM/E9v8IUay5MoArSBGADvojanoQ1YEslV6gCK4BGAYYCw/s320/IMG_2372.JPG" width="320" /></a><br />
The clock is a bit of a Rubegoldberg machine but really it didn't have to be this way. All of the pain and annoyance of this particular project are entirely self inflicted, but once everything was debugged everything seemed to work as intended and nothing exploded of it's own accord. I helped it out with that a few times though.<br />
<br />
That being said I've made a nixie clock. It powers the tubes from a spiral multiplier topology; if you're wondering what that is, see my last post cause I made it up and haven't seen it anywhere else. In this particular case it is a 4s3p multiplier array. This one in particular has 3 strands in parallel because it was easy to make a ring oscillator to drive them all out of phase, there is no other particular reason for it. Future designs could be done in a much more efficient compact fashion, that being said despite being an overly complex machine, it works. The FETs don't get hot at all, the caps are stressed a lot voltage wise but that was somewhat intentional and a bit of an experiment and you wouldn't notice if any of the supply was actually turned on and there's no noticeable noise, really nothing is being worked hard power wise.<br />
<br />
The build up of the system went in a piece wise fashion. Multiplier was built up first, mainly because it was easy to free hand and capable of being treated as an independent lump with only a few connections.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><img border="0" height="320" src="https://4.bp.blogspot.com/-l08urCWFDyw/WUsVY-w3ZNI/AAAAAAAACig/VytCwy62y9cUZGJdYSQj39vMGHBQfBKFQCK4BGAYYCw/s320/20160625_210722.jpg" style="margin-left: auto; margin-right: auto;" width="180" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">First, assembly of the multiplier stack</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-X17A_qoBfas/WVh7ZNu-K2I/AAAAAAAACk0/TSYpXs-z8MU0oDru2_cqYuzCImcy-CprQCLcBGAs/s1600/20160709_220754.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" data-original-height="1280" data-original-width="720" height="320" src="https://1.bp.blogspot.com/-X17A_qoBfas/WVh7ZNu-K2I/AAAAAAAACk0/TSYpXs-z8MU0oDru2_cqYuzCImcy-CprQCLcBGAs/s320/20160709_220754.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">then the controllllls and inverter</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-qJKn47q_YZI/WVh7Y1U21uI/AAAAAAAACkw/zlU4PjXCpbIaQzFzJD89rbyx5qyeXqOVwCLcBGAs/s1600/20160709_220745.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" data-original-height="1280" data-original-width="720" height="320" src="https://4.bp.blogspot.com/-qJKn47q_YZI/WVh7Y1U21uI/AAAAAAAACkw/zlU4PjXCpbIaQzFzJD89rbyx5qyeXqOVwCLcBGAs/s320/20160709_220745.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">mooore soooooldering controls and inverter</td></tr>
</tbody></table>
This assembly really was the painful part. The speed of bending each wire into joint and soldering it was excruciating.<br />
<br />
After making the multiplier came the PWM /controls set up. Since the system is open loop so there really aren't any controls to speak of. Controls would be logical for almost any other implementation, however the input to the multiplier system is a 15V regulated wall wart, and the multiplier itself is effectively a fancy step-up with constant load. So load variation and line variation are not issues. If people had the potential to plug in other regulators, or if the system were powered straight from the line regulation would be more of a concern. After finishing the inverter some basic testing was possible:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-FsDZ9Z1Ig4o/WVltmOFe6bI/AAAAAAAACl0/Q9b1DMje6eEfVa4EROl-lJVGCf8zPf0VACLcBGAs/s1600/initial%2Btest%2Bwith%2Bmultimeter.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="822" data-original-width="1600" height="205" src="https://3.bp.blogspot.com/-FsDZ9Z1Ig4o/WVltmOFe6bI/AAAAAAAACl0/Q9b1DMje6eEfVa4EROl-lJVGCf8zPf0VACLcBGAs/s400/initial%2Btest%2Bwith%2Bmultimeter.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Single tube test of multiplier</td></tr>
</tbody></table>
<br />
The multiplier is hiding in the far right f this picture, the inverter is front and center. Controls/ inverter are dead center. The Red wire is the HV into the tube. Output voltage from the supply can reach >200V with no load, but rides at 170V under load with all of the nixies. The voltage over the tube (that's on the multimeter) sits right at where the data sheets says it should site ~140V and in this test there was a resistor doing the current limiting for the tube. There are probably some resonant effects playing into the output voltage stability that I haven't characterized. The system output voltage is surprisingly invariant under different loads.<br />
<br />
Feed back can always be added but, it wasn't needed and time, cost, effort...<strike>laziness</strike> efficiency. The heart of the 'controls' is a 3-inverter ring oscillator. It generates three 120 degree out of phase triangle waves. These go to the inputs of three comparators that output three square waves. AND THEN they go to a set of inverters that flip half the PWM signals, add dead time then buffer the outputs. This was all done using 74XX14's and passives/diodes, too many of them. Really the more proper way to implement this set up effort would be a PLD or microcontroller, it would greatly reduce parts count and over all cost of this endeavor; since only one of this particular object was getting made and didn't want to futz with tool chains and microcontrollers. It seemed like less trouble to do it in a very brain dead way using 74 logic with this circuit:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-7V15sza55Oc/WSIyqyxQ_OI/AAAAAAAACbw/WgsAcotB8TMgrHeDu7WJ-CT1nWrhbh2BQCLcB/s1600/delay%2Bwave0.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="182" src="https://2.bp.blogspot.com/-7V15sza55Oc/WSIyqyxQ_OI/AAAAAAAACbw/WgsAcotB8TMgrHeDu7WJ-CT1nWrhbh2BQCLcB/s320/delay%2Bwave0.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It nibbles off the front end of the wave form and inverts it</td></tr>
</tbody></table>
<br />
Six of these circuits were used, one for each pwm channel. They invert each wave and lop off the front of each pulse. Half of the delayed signals are inverted again. This makes it so there will be dead time between each pwming pair; and no shoot through between the hi and lo switches in each bridge.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-_qS7f7YIwBE/WViLsqVQToI/AAAAAAAAClM/wqvkzl74WhkZqivs7bj6y6ufGcFiiUK3QCLcBGAs/s1600/20160818_222946.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="720" data-original-width="1280" height="225" src="https://2.bp.blogspot.com/-_qS7f7YIwBE/WViLsqVQToI/AAAAAAAAClM/wqvkzl74WhkZqivs7bj6y6ufGcFiiUK3QCLcBGAs/s400/20160818_222946.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Example of dead-time between falling and rising wave forms there is indeed something weird with the upperr wave form but I can't actually remember what is was anymore.</td></tr>
</tbody></table>
The duty cycle is constant around 50% and the system is run approximately resonantly at 47ish kHz.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-QukK5_1oA-Q/WQ9gd4K_5PI/AAAAAAAACYc/vGfzplXG4UA4zopL92OFXNFFWB3AcA7bgCLcB/s1600/IMG_2369.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://1.bp.blogspot.com/-QukK5_1oA-Q/WQ9gd4K_5PI/AAAAAAAACYc/vGfzplXG4UA4zopL92OFXNFFWB3AcA7bgCLcB/s320/IMG_2369.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pretty Glowy Tubes</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The real regrets in this project (besides the assembly) comes with implementation of the digital controls for the clock. The power electronics were really the less obnoxious part, maybe that says something about my skill set, but at least I know why this part of the implementation was stupid and had an initial reason for the subsequent masochism. The digital controls comprises a clock chip, microcontroller, and load of stupid that fans out the microcontroller to all of the HV outputs. The clock chip is one of the cheapest through hole clock chips available the DS1307 by maxim. It's a pretty simple object and uses I2C to communicate with the microcontroller, this helps it keep actual accurate time with a crystal. One thing to note is that you can just buy a micro with a real time clock included, but this gave me an excuse to learn I2C. The microcontroller was an arduino, because as far as needing software or fancy programmers they represent an absolute minimum of effort and are acceptable for an application that doesn't have any respectable performance criteria.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
`<a href="https://3.bp.blogspot.com/-AkOVa2lJmQI/WVnkCtwvcJI/AAAAAAAACmc/p3vdq2o5XZcelZUbyExPdD8mB-cY4vLHACLcBGAs/s1600/IMG_2362.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://3.bp.blogspot.com/-AkOVa2lJmQI/WVnkCtwvcJI/AAAAAAAACmc/p3vdq2o5XZcelZUbyExPdD8mB-cY4vLHACLcBGAs/s320/IMG_2362.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
For the fanout, eight digital outputs of the microcontroller are used to control all of the nixie tubes; effectively an 8 to 40 expansion as one switch is required to control each digit on each nixie tube. The size of the fanout was really somewhat annoying. The tubes have a comma digit to each side of the number that were left unused in this application. One thing to note is that technically access to all digits in each tube is not required; this was going to be a 24 hour clock making it so that only 3/10 available digits were used on the 10's hours digit...actually you could get away with 2/10 on the last digit if it was blanked instead of showing a '0' which would let you do everything with 32 outputs. But you could definitely do a 12 hour clock with 32 outputs. I'm getting away from crapping on the the current design which should have been implemented as a set of shift registers (or a single shift register). The fanout setup in the current system that was done for the following reasons:</div>
<div class="separator" style="clear: both; text-align: left;">
A. to teach someone about human time vs. electrical time. </div>
<div class="separator" style="clear: both; text-align: left;">
B. To have them consider the boundaries of what is required vs. what is optimal. </div>
<div class="separator" style="clear: both; text-align: left;">
C. For some short amount of time it seemed like a fun idea. </div>
<div class="separator" style="clear: both; text-align: left;">
A and B still seem like valid reasons. the fanout was set up as two channels of BCD, 4-digital pins of the micro went to each channel feeding one BCD which then fed 2 more BCDs from its 10 valid outputs. One set of three BCD for the minutes, another set for the hours. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This encoding and conversion was just annoying to deal with. There is one aspect missing here, because the first layer of the fanout can only select one output at a time, it can't produce all the combinations required on the output BCD's. To do this the following circuit was used:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-O5S_nPXHGPU/WVpSrt2ow-I/AAAAAAAACm4/aGqxzXOOefY2Un3y2lFWEhj6yffCsWfYgCLcBGAs/s1600/bcd%2Bholder%2Bcircuit.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1091" data-original-width="1600" height="218" src="https://2.bp.blogspot.com/-O5S_nPXHGPU/WVpSrt2ow-I/AAAAAAAACm4/aGqxzXOOefY2Un3y2lFWEhj6yffCsWfYgCLcBGAs/s320/bcd%2Bholder%2Bcircuit.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
On the input of each second layer BCD the voltage is held by the RC. Then refreshed before the RC runs out. This allows the first layer BCD to turn on an arbitrary set of inputs to the second layer as long as its quick enough, which is pretty easy as long as the RC time constant is long enough. It's dumb but it seemed to work pretty well. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Finally after all these shenanigans the output of each second level BCD goes to a high voltage transistor for switching each digit on the tubes. This whole ordeal was far more trouble than it needed to be. But whatever, the clock clocks, and damn if those glowing tubes don't look pretty. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-OCQytEAtSL8/WWHqNsKJ89I/AAAAAAAACnk/UI6-_KHpMc0uloWKRof0jhUOt9TN5uTdwCLcBGAs/s1600/IMG_2374.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://4.bp.blogspot.com/-OCQytEAtSL8/WWHqNsKJ89I/AAAAAAAACnk/UI6-_KHpMc0uloWKRof0jhUOt9TN5uTdwCLcBGAs/s400/IMG_2374.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">mmm glowy</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I bought a box to put the clock in as well, because not shocking people is important. That's less exciting, but I might make a post about it.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
What's exciting though is I've already started on my next nixie venture and I'm most of the way done with it. It uses it's own silly topology and does not use any switching regulators to run off of the line, so you will be seeing a post about that.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-33369317660442846872016-10-30T18:36:00.002-07:002016-12-18T19:49:01.975-08:00On Voltage Multipliers, Spiral MultipliersOf 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 power oomph. It also makes the problem more interesting stepping the low voltage up to the higher voltage.<br />
<br />
I somewhat arbitrarily decided to take 15V and turn it into; $\gt$ 140V at full load (minimum holding voltage of the tubes) to power the nixie tubes. Really the tubes need 170V to spark over according to the data sheet. The decision to go with a multiplier was partly motivated by not being very pleased by many of the transformers I saw available. But realistically speaking using a transformer would be the practical thing to do in this besides powering the tubes off wall power; but where is the fun in that?<br />
<br />
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.<br />
<br />
Which brings about applicable designs and the aforementioned spiral multiplier:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-kHzG7yaDyoE/V_sfqevbMtI/AAAAAAAABeE/ktLy5gljfNI04tKSJ2ArndEKi3bW_wEpgCLcB/s1600/fullcircuit0.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://2.bp.blogspot.com/-kHzG7yaDyoE/V_sfqevbMtI/AAAAAAAABeE/ktLy5gljfNI04tKSJ2ArndEKi3bW_wEpgCLcB/s400/fullcircuit0.PNG" width="370" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">4 series 3 parallel Spiral Multiplier, peak detector on output as filter.</td></tr>
</tbody></table>
The body of the multiplier (everything on the upper left side of the schematic) is the part pertaining to this post. It is all about the caps and the diodes.<br />
<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-g16CK2JkrUE/V_sfML41KjI/AAAAAAAABeA/Mm6nF6igIUoHmzcp3Y-lYeDgwUYKGrgKACLcB/s1600/regout%2Band%2Bfb0.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://2.bp.blogspot.com/-g16CK2JkrUE/V_sfML41KjI/AAAAAAAABeA/Mm6nF6igIUoHmzcp3Y-lYeDgwUYKGrgKACLcB/s400/regout%2Band%2Bfb0.PNG" width="352" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Output Voltage green (set a lower control voltage), control feed back: red, pink is the gate voltage on the feed back transistor.</td></tr>
</tbody></table>
The above traces are for a controlled output set point, 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:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-dYKWLaet_mo/WBZ5YZzbg9I/AAAAAAAABkM/rhlC8LxrjBUI3d9SHzoM8goEhaU0UAECACLcB/s1600/spriral_schema0.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="248" src="https://2.bp.blogspot.com/-dYKWLaet_mo/WBZ5YZzbg9I/AAAAAAAABkM/rhlC8LxrjBUI3d9SHzoM8goEhaU0UAECACLcB/s320/spriral_schema0.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Spiral style schematic of the nixie multiplier, it has a filtering peak detector on the output.</td></tr>
</tbody></table>
<br />
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 (look at the wikipedia page).<br />
<br />
Backing up to the big picture:<br />
Diode based voltage multipliers have been around a very long time like almost a 100ish years according to the <a href="https://en.wikipedia.org/wiki/Voltage_multiplier" target="_blank">wikipedia</a>. 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).<br />
<br />
Fundamentally multipliers are built up of capacitor coupled nodes with some diodes slapped on. This forms a network of peak detectors, each peak detector takes the peak AC voltage through a diode and deposits it on to a capacitor. This forms a 'unit pump':<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-kaai8OKZYWM/V_w1vEkzSJI/AAAAAAAABes/k5EuLKjn2oY1n2Z2nQwI1r0QqnIrSdKOACLcB/s1600/unitpump0.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="283" src="https://2.bp.blogspot.com/-kaai8OKZYWM/V_w1vEkzSJI/AAAAAAAABes/k5EuLKjn2oY1n2Z2nQwI1r0QqnIrSdKOACLcB/s320/unitpump0.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The unit cell of a multiplier</td></tr>
</tbody></table>
<br />
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.<br />
These unit pumps are chained in various formats to form different types of multipliers.<br />
<div>
<br /></div>
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.<br />
<br />
A 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.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-b80G2F8955g/WAOKFEsNTrI/AAAAAAAABgY/M8NaNl1kOcAW5Ah_ZEwwiCJNhC34Er5BwCLcB/s1600/series_mult_nodesngraphes.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://2.bp.blogspot.com/-b80G2F8955g/WAOKFEsNTrI/AAAAAAAABgY/M8NaNl1kOcAW5Ah_ZEwwiCJNhC34Er5BwCLcB/s640/series_mult_nodesngraphes.PNG" width="385" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Series multiplier, takes 20Vpp input, 40Vmax output</td></tr>
</tbody></table>
<br />
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<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-1EyKTDl6JKg/WAOKFPTubBI/AAAAAAAABgU/jVrFQ9iAjd8NF9XrjOBFXSdzGt4P8MOcQCLcB/s1600/parrallel_mullt_nodesngraphs.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://2.bp.blogspot.com/-1EyKTDl6JKg/WAOKFPTubBI/AAAAAAAABgU/jVrFQ9iAjd8NF9XrjOBFXSdzGt4P8MOcQCLcB/s640/parrallel_mullt_nodesngraphs.PNG" width="387" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">Parallel multiplier, takes 20Vpp input, 40Vmax output</span></td></tr>
</tbody></table>
<br />
The voltage increases by the Vpp AC voltage with every pumping node and gets filtered to some extent by every filtering node. Both multipliers have the same AC source and reach the similar output voltage.<br />
<br />
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 seems like a fun experiment. Analytical awesomeness can be postponed.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-6Bev-UNgpdg/WAQ9b4xv3AI/AAAAAAAABhU/CamjB0HHvLAJW9tmfLX_Edd-rZymlwVSgCLcB/s1600/spiral_mult0_1meg.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://4.bp.blogspot.com/-6Bev-UNgpdg/WAQ9b4xv3AI/AAAAAAAABhU/CamjB0HHvLAJW9tmfLX_Edd-rZymlwVSgCLcB/s320/spiral_mult0_1meg.png" width="294" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A 2x4 Spiral Multiplier</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-AsFSU1nzS2Y/WAQ9hhNUYdI/AAAAAAAABhY/ENgTq737tC0bpLmreVA_gKR4DCIJdCV7wCLcB/s1600/spiral_mult0_1meg_graphs.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://1.bp.blogspot.com/-AsFSU1nzS2Y/WAQ9hhNUYdI/AAAAAAAABhY/ENgTq737tC0bpLmreVA_gKR4DCIJdCV7wCLcB/s320/spiral_mult0_1meg_graphs.png" width="296" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">2x4 Wave forms with tiny load</td></tr>
</tbody></table>
<br />
<br />
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 exercise imo. that could be argued multiple ways depending on the nuances of a particular system. Every circuit is what it does. 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.<br />
<br />
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 over filter caps and gaming the phasing of the pump sources.<br />
<br />
toodloo<br />
<br />
<br />
<br />jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com1tag:blogger.com,1999:blog-569553855218119420.post-4363752912932558812015-10-07T21:12:00.001-07:002015-10-07T21:12:53.258-07:00The Derp DriverEveryonce in a while I get a really dumb idea behold the derp drive:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-KPca0MfFA1A/VgoaydwM2fI/AAAAAAAAA6c/toHAWl0HQD4/s1600/derp_drive0.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="http://3.bp.blogspot.com/-KPca0MfFA1A/VgoaydwM2fI/AAAAAAAAA6c/toHAWl0HQD4/s640/derp_drive0.PNG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Derp Drive 99% 'what if?', 1% something else</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
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.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
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. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
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. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It would be nice if all the switches were driven by floating things, you know kinda like a transformer.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
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:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ol>
<li>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.</li>
<li>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.</li>
<li>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. </li>
</ol>
<div>
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. </div>
<div>
<br /></div>
<div>
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.</div>
<div>
<br /></div>
<div>
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.</div>
<div>
<br /></div>
<div>
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 <u>require</u> 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. </div>
<div>
<br /></div>
<div>
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.<br />
<br />
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.</div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com2tag:blogger.com,1999:blog-569553855218119420.post-9138463254147921172015-09-27T21:53:00.002-07:002015-09-27T21:53:41.060-07:00On the Mother board and stepper carriersThe mother board I was referring to in my last post got made and seems roughly functional.<br />
Despite me screwing up the stepper driver to some extent.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-20570604449513442372014-03-16T22:48:00.001-07:002014-03-16T22:48:19.898-07:00Motherboard/ Driver carrier board preview<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-SNZydc-qxZg/UyaLHBc4H5I/AAAAAAAAAhI/Nm3OP7N01PQ/s1600/motherboard+preview.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
Here is a preview/test route of the motherboard to hold the tango drivers:<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a href="http://3.bp.blogspot.com/-SNZydc-qxZg/UyaLHBc4H5I/AAAAAAAAAhI/Nm3OP7N01PQ/s1600/motherboard+preview.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-SNZydc-qxZg/UyaLHBc4H5I/AAAAAAAAAhI/Nm3OP7N01PQ/s1600/motherboard+preview.PNG" height="640" width="500" /></a><br />
<br />
The traces go kind of like this:<br />
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 <br />
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. jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-53628126206301873992014-03-04T22:41:00.002-08:002014-03-04T22:41:39.398-08:00Stepper Driver v1.1.3: tango: ready for manufacturingSo 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<br />
1. apparently way cheaper than other car edge connectors mostly likely because they're made in stupid quantities.<br />
2. capable of carrying fairly high currents 1A+/pin*64 pins = more amps than a board this size should carry.<br />
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.<br />
4. A 2x32 pin connector is just about the right size for this board.<br />
<br />
That being said lets take a look at this board, behold Tango: <br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-qCwPqBKzYLs/Uwwanc5ykhI/AAAAAAAAAfg/z10IrnR2U4U/s1600/tango_1.1.3_all.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://1.bp.blogspot.com/-qCwPqBKzYLs/Uwwanc5ykhI/AAAAAAAAAfg/z10IrnR2U4U/s1600/tango_1.1.3_all.png" height="400" width="290" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Top + bottom</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-5jMvo_uN9xA/UwwanThaG4I/AAAAAAAAAfY/Yo8M_vSLSTI/s1600/tango_1.1.3_top.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://2.bp.blogspot.com/-5jMvo_uN9xA/UwwanThaG4I/AAAAAAAAAfY/Yo8M_vSLSTI/s1600/tango_1.1.3_top.png" height="400" width="286" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">top</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-BnTQFStkBuo/UwwanTLC4OI/AAAAAAAAAfU/_axR0p8CDOY/s1600/tango_1.1.3_bottom.png" height="400" style="margin-left: auto; margin-right: auto;" width="286" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">bottom</td></tr>
</tbody></table>
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.<br />
<br />
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.<br />
<br />
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.<br />
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.<br />
<br />
So about them<br />
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:<br />
<br />
\\[ Psw = I_{ds} V_{ds} /2(Q/ I_{hl} +Q) \\<br />
but apparent the latex add in I have isnt working... I'll edit this bit later.<br />
<br />
Either way the important take away is this equation: <br />
<br />
Psw = Ids*Vds/2*Qg*(1/ihl+1/ilh)<br />
<br />
It represents the switching power losses occuring in the system.<br />
As far as numbers go for me.<br />
<br />
Vds=25V<br />
Ids = 10A<br />
Qg(that I care about) ~ 9nC<br />
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)<br />
f=some weird poop<br />
<br />
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.<br />
<br />
Example:<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
If the motor is drawing 5A RMS on a phase<br />
<br />
dIon=dIoff<br />
Von*dton/L=Voff*dtoff/L<br />
dton=Voff*dtoff/Von<br />
<br />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. <br />
<br />
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.<br />
<br />
I'm gonna go order the boards now. jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-28260928196348398032013-11-11T14:59:00.005-08:002013-11-11T15:01:52.766-08:00Waltz Stepper Drivers: Functional Yet NoisyAfter assembling one of the Waltz boards and only screwing up the the tiny driver once the board works!<br />
<div>
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 '<a href="http://arduino.cc/en/Tutorial/blink" target="_blank">blink</a>' code to step the motor continuously in a given direction. Here's a video of the waltz board driving a stepper:</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxTiwxWtXa2IfrseB9MSuyH7ZUpjW1lwzifc0vzJc6oEvNDCd6x1va5WmI-X0P0bMFZshDhsPR8H2b0fum_ng' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
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.<br />
<br />
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.<br />
The motors being used are 27.4kgf*cm (381oz*in), 3.5Arms/phase, NEMA 23 hybrid steppers: <a href="http://www.automationtechnologiesinc.com/wp-content/plugins/download-monitor/download.php?id=83" target="_blank">data sheet</a>. 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. </div>
<div>
<br />
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.</div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-14227491485792804912013-11-05T23:54:00.004-08:002013-11-08T23:42:47.455-08:00Stepper Boards have Arrived: Waltz v0.2Woooooo 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.<br />
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.<br />
<br />
here's a pic of the board:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-yhJnCO1-ZCo/UnnU4hzruaI/AAAAAAAAAas/rLP0o_2op8s/s1600/IMG_1636.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://4.bp.blogspot.com/-yhJnCO1-ZCo/UnnU4hzruaI/AAAAAAAAAas/rLP0o_2op8s/s320/IMG_1636.JPG" width="240" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I went with purple because why the hell not?</td></tr>
</tbody></table>
I've been slightly distracted from the project by work. However there will be more posts soon since there needs to be board testing.<br />
<br />
In the mean time pretty boards are pretty, but pretty useless boards are pretty useless until they are tested otherwise.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-67164936283325450432013-10-09T21:47:00.001-07:002013-10-09T21:47:46.713-07:00Millathe Stepper Driver v0.2: waltzIn order to power the millathe's axes I decided to create a stepper driver with a higher current capacity than most hobby stepper controllers out there. Driving a mill seems to be above the capabilities of standard hobby stepper motors. Below is a picture of the board. I named this version 'waltz'.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-2j74BIsTZIQ/UlM_Gg3vKnI/AAAAAAAAAXw/t-UXlxwTFAA/s1600/waltz_v0.2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="http://2.bp.blogspot.com/-2j74BIsTZIQ/UlM_Gg3vKnI/AAAAAAAAAXw/t-UXlxwTFAA/s640/waltz_v0.2.png" width="530" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Waltz v0.2</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-t8AmwpAVdio/UlM8eXfeDEI/AAAAAAAAAXQ/_FyyHusl3rE/s1600/waltz_v0.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="http://2.bp.blogspot.com/-HC2LaKEAnoo/UlM90mVOTpI/AAAAAAAAAXc/yQTMiyvQA0I/s1600/waltz_top_v0.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a><a href="http://4.bp.blogspot.com/-IzbkdpsUrYE/UlM90lUvv1I/AAAAAAAAAXg/YM7PAbPiCAo/s1600/walt_bot_v0.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-XyYVG84xuys/UlNBPBKz8KI/AAAAAAAAAYA/GTaxYh62XB4/s1600/waltz_top_v0.2.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="http://4.bp.blogspot.com/-XyYVG84xuys/UlNBPBKz8KI/AAAAAAAAAYA/GTaxYh62XB4/s200/waltz_top_v0.2.png" width="165" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Top</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-i8agMqaQ-DQ/UlNBOqaWw8I/AAAAAAAAAX8/rZ0Ug6e1Ofs/s1600/walt_bot_v0.2.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="http://2.bp.blogspot.com/-i8agMqaQ-DQ/UlNBOqaWw8I/AAAAAAAAAX8/rZ0Ug6e1Ofs/s200/walt_bot_v0.2.png" width="165" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bottom</td><td class="tr-caption" style="text-align: center;"></td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-XyYVG84xuys/UlNBPBKz8KI/AAAAAAAAAYA/GTaxYh62XB4/s1600/waltz_top_v0.2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<br />
The waltz boards are currently being manufactured overseas in China at Myro PCB. Unfortunately as it turns out the first week of October is 'National Day' in China and the the factory closed down for the week a few days after the order was put in. On the flipside this gave me time to finalize/order components before the boards arrived. <br />
<br />
<br />
waltz v0.2<br />
Overview:<br />
<br />
The waltz board is designed to fit in a 20 position 0.1" spacing card edge connector, this makes the board 53x62.5mm. Each board has two full bridges made to power a single bipolar stepper motor. The control of the motor is handled by an Allegro A4989. The FETs to be
used in the half bridge are FDD8778 in a TO-263 package, each has 14mOhm of on resistance. These
were chosen because of their relatively low gate capacitance/charge to reduce
switching losses, however the majority of losses in this system will be
ohmic. The Allegro A4989 was chosen because it seemed like a good all in one solution for various features such as current control, fast current decay and, up to 16th microstepping all while still supporting external FETs. The only two control inputs to the chip required are step and direction.<br />
<br />
This brings us to how this system is going to be controlled. The plan is that several waltz boards will be plugged into a single motherboard carrying an arduino nano. Card edge connectors seemed like a modular way to stack multiple
stepper drivers on a single board while having large amounts of
connector contact area for the power paths and conveniently allowing
for data to come in the same connector. The Arduino nano will partly be the brains of the operation. A computer will stream the control information (step and direction) for all of the waltz boards to the Arduino which will act as a buffer/ demultiplexer and timer making sure all of the outputs are switched synchonously and with proper timing. This type of setup will take heavy calculation off of the arduino however the tool paths/ step patterns will have to be preprocessed on a computer before being sent to the arduino.<br />
<br />
Concerns /Issues/Thoughts/Modifications:<br />
-The current ripple for this system could be quite large depending what motor is chosen. That being said each capacitor is rated to pretty high ripple >4A ripple. However I would like to raise the input voltage to the motors, which would make this more of a concern.<br />
-I would like to increase the voltage of the system allowing for faster stepping and more awesomeness, this requires new bus caps as they are the limiting factor for the motor voltage, currently they are only rated to 16V.<br />
-Screw these capacitors.<br />
-I Screwed up the zener gate clamp pinout on using a 3-pin package...derp. In the mean time the diodes will have be added in a weird orientation. can be fixed on next rev.<br />
<br />
That is all on the waltz board for now more updates when they come in and the mother board is ready to go.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-13594394110302460252013-07-22T07:05:00.000-07:002013-07-22T07:05:30.013-07:00Millathe: Initial State Pictures<br /><span style="font-size: 13px; text-align: center;">The Millathe with tool post and homemade tool post holder, the spindel speed is adjusted through the pair of little leve :</span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-fT8igzhRtHs/Uez_4UqmerI/AAAAAAAAAT4/c4Yt560sKkg/s1600/020.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="http://3.bp.blogspot.com/-fT8igzhRtHs/Uez_4UqmerI/AAAAAAAAAT4/c4Yt560sKkg/s400/020.JPG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
For some reason the door does not like to shut, it pushes against the lid of the gear box despite not looking bent, seems to close fine without the gear box lid though.<br />
<br />
All the gears on this side are for the autofeed. Notice the small cracked plastic gear on the upper right. There is also a gear hidng be hind the 76 tooth gear which appears to be detached from its shaft. On the left is the main drive belt, it goes down to the motor which is single phase 500W asynchronous:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-BFtPm7CHRGM/Uez_4lOQR9I/AAAAAAAAAT8/RLrR3Hu6pc0/s1600/021.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://2.bp.blogspot.com/-BFtPm7CHRGM/Uez_4lOQR9I/AAAAAAAAAT8/RLrR3Hu6pc0/s400/021.JPG" width="300" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The gear box/ shifter. While there is no back gear on this device it can go pretty slow (speeds are printed on the front of the lather below here it says Maximat7). Theres a little bit of rust on the steel gears and some wear from shifting visible on the phenolic gears but over all it doesn't seem to be in bad shape:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-b2wxrTSICII/Uez_45llCSI/AAAAAAAAAUE/a87dlHsflYo/s1600/026.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://4.bp.blogspot.com/-b2wxrTSICII/Uez_45llCSI/AAAAAAAAAUE/a87dlHsflYo/s400/026.JPG" width="400" /></a></div>
<br />
One day perhaps the traction system in the millathe will be redone or incorporated into the control system, but that is a project for the future.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-60994477935189686912013-07-19T16:41:00.001-07:002013-07-22T07:08:33.158-07:00The Millathe: A CNC storySo a long while back I managed to acquire an Emco maximat 7 machining center. It has been my goal to make it a CNC machine, however it has been sadly sitting in my living room waiting for me to finish busscooter, but now that that is done (besides a few safety features which need to be added). I've turned my sites to making this CNC dream a reality and things are finally starting to happen.<br />
<br />
So hear's the deal: this machining center, or the millathe as it is has been nicknamed, is like 75% lathe 25% mill and 100% heavy, seriously the millathe isn't that big but weighs well over 100lbs. Unfortunately I don't have pictures right now and am other wise not at home so those will get posted later. It also happens to be Austrian and metric which is wonderful because if you know me I tend to shun 'standard' units (really? Who calls 'units standard' when only a small fraction of the planet uses them?). The lathe portion of the millathe seems fully operable except for the lead screw; which is linked through a mess of gearing to what appears to be a cracked plastic press fit gear, so cant be turned automatically by the spindle motor. The lead screw does have a knob so you can turn it by hand, but this project is about avoiding that. Unfortunately most of the gears in the lathe system seem to be of phenolic materials but they're functional for now, perhaps some time in the future I will rebuild the power part of the spindle drive but that's another project and another thing to add to the list of fixes.<br />
<br />
Currently the plan is to make lathe portion CNC before turning to what ever may be wrong with the mill section of the machine. The list of key action items for modifying the millathe in no particular order looks like this:<br />
<br />
<ul>
<li> Replace lead screws (I might not replace them but they look a bit wonky).</li>
<li>Add Backlash compensation, because no one loves backlash in automated systems.</li>
<li>Acquire steppers for driving the Z and R axis screws giving control of the lathe port.</li>
<li>Create method of supplying power to said steppers in order to control the system.</li>
<li>Create control system for the steppers.</li>
</ul>
<div>
At the moment I've started looking at the control side of things. The plan is to stream through USB to an arduino nano which can act as a buffer and send the signal out separately to each stepper driver synchronously. I plan on using the Allegro <a href="http://www.allegromicro.com/Products/Motor-Driver-And-Interface-ICs/Bipolar-Stepper-Motor-Drivers/A4989.aspx">A4989</a> stepper motor driver to control all of these shenanigans. It will require that each motor needs 2 outputs from the arduino, one for step and, one for direction.</div>
<div>
The outputs from the A4989 generally go straight to the gates of transistors but, it's tempting to instead direct them to some gate drives to allow them to drive larger fets for larger stepper motors. I haven't really done any calculations to justify this but it seems like it would be nice thing to have a one size fits all solution to driving steppers even if it is over kill. A pair of <a href="http://www.ti.com/lit/ds/symlink/lm5109a.pdf">LM5109A</a> gate drivers per stepper driver seem perfect for this task since they have inputs that can be driven separately allowing for whatever sort of control method the stepper controller feels like. </div>
<div>
<br /></div>
<div>
However last night I began to experiment with methods of sending arduino data over usb and had moderate success in getting LED's to count synchronously according to their appropriate digital out ports rather than by using the normal digitalWrite commands. This was kind of interesting since apparently pyserial only sends data as strings and chars. Which to me this seems weird and inefficient but I'm not that experienced with data streaming techniques. Hopefully it will be able to send data at a pace appreciable enough to make it work other wise. I'll talk more about messing around with this in the next post.</div>
<div>
<br /></div>
<div>
I don't have any pictures of the millathe to post at the moment but I always feel bad not posting a picture so here have a repost of the tool post holder I made for the millathe a while back. It is currently mounted on the millathe and works just dandily. yaaay reposts.</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-yX90_qLDQ4A/Uemk6p65cXI/AAAAAAAAATk/pLEss5HcGLI/s1600/040.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-yX90_qLDQ4A/Uemk6p65cXI/AAAAAAAAATk/pLEss5HcGLI/s320/040.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-47463306231341852942013-07-15T17:12:00.004-07:002013-09-04T22:54:53.748-07:00Math n Stuff (Specifically Geometric Algebra)<span style="font-family: inherit;"><span style="font-size: small;">So one thing, I've been doing lately instead of building things is studying geometric algebra.</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">Now you might as why on earth would someone devote them self to some obscure type of math when vector calculus, differential equations and linear algebra satisfy most engineers. Geometric Algebra while not that widely known as far as I can tell (at least I know no mechanical engineers that know of it, but that really isn't saying much), has some pretty snazzy properties. I will babble about it for for a variety of reasons:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">1. Its pretty cool (for debatable definitions of cool). </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2. It has applications to a robotics engineering problem I have encountered and would like to solve. </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">3. Geometric algebra is like a general enough form of math that it encompasses several other forms of math used in various areas of engineering in a single construct and could be useful in a wide variety of engineering applications.</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">4. Writing down the important bits will help me remember it. </span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">Honestly as a mechanical engineer it's been a bit of a 'mindfuck' learning mathematics from papers on maths. After reading several papers, maths from a mathematician's perspective seems very different from how I've thought about math up to this point and how I think more applications oriented think about math. As a meche I was looking at maths in what I think was a practical yet backwards thought process that dictated math functions the way it does because that's the way the world works; but I think mathematicians would say math functions the way it does because of the way that people decided to define it is as a logical construct, regardless of how reality works. Which I would say is much more accurate and leaves the door open to interesting ways types of constructs. Math only functions how it does because of how we define it, it just so happens the world was nice enough to allow its self to match up with some of out logical patterns that we like to call 'math'.</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">Either way, back to geometric algebra.</span></span><span style="font-family: inherit;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Some of its useful characteristics: </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Geometric Algebra naturally models geometric things we tend to care about in a concise fashion, it can be extended to n dimensions, and structures that represent imaginary numbers are naturally formed by the algebra without actually having imaginary numbers. Remember those weird things where \(i^2 = -1 \)? That is an 'imaginary' number. In geometric algebra </span></span><span style="font-family: inherit;"><span style="font-size: small;"><span style="font-family: inherit;"><span style="font-size: small;">(what I consider one of the most useful properties) </span></span>you can represent more than just \(i\), the algebra can be used for <a href="http://en.wikipedia.org/wiki/Quaternion">quaternion</a> representations where the imaginary numbers are extended to \(ijk\) or extended even further to represent arbitrary set of 'imaginary' constants which would all have the property \(n^2 = -1\) while remaining orthogonal to each other in an whatever dimensional space. </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">If you're an engineer you might realize the utility of that last bit, it allows you to perform rotations of abitrary dimension using <a href="http://en.wikipedia.org/wiki/Rotor_%28mathematics%29">rotors</a> which are kind of like generalized <a href="http://en.wikipedia.org/wiki/Versor">versors</a>.</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">While I don't know of any applications where you would want to use >6 dimensions but I think it's kind of nice that geometric algebra gives you the option. </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">For a bit of history on Geometric Algebra <a href="http://catdir.loc.gov/catdir/samples/cam033/2002035182.pdf">http://catdir.loc.gov/catdir/samples/cam033/2002035182.pdf</a></span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">Otherwise I'm going to talk about some of the technical details of geometric algebra. This are defined in terms of the geometric product, which is the fundamental operation of geometric algebra, it is denoted by a lack of symbol ,similar to what we do with multiplication. It has the properties of multiplicative associativity, and distributivity over addition. In the following example \(a,b\) and \(c\) are multivectors but you can think of them as normal vectors right now. The geometric algebra rules that:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">1.Associative: \(a(bc) = (ab)c\)</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2.Distributive: \(a(b+c) = ab + ac \)</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">Note the geometric product is non commutative, I think that this property is best thought of as a feature because it ends up giving the outer product of the geometric some important characteristics. The inner and outer products of the geometric algebra are defined in terms of the geometric product as:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">outer product: \((ab-ba)/2 = a \wedge b\) </span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">inner product: \((ab+ba)/2 = a \cdot b\)</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">geometric product in terms of the inner and outer product: $$ab = a \cdot b + a \wedge b$$</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">And the outer and inner products are analogous to the cross products and dot products of normal vector math how ever they have some subtle differences that I wont go into right now.</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;"> More on the outer product:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">The outer product is the antisymmetric part of the geometric product. Also from now on the outer product will be noted as \(\wedge\) in equations. This property of antisymmetry has some useful effects, and results in something almost the same as a cross product. The cross product of two parallel vectors is 0. similarly the outer product of two vectors that are scalar multiples(a.k.a. parallel) will also result in 0. </span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">$$a \wedge b = - b \wedge a$$</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">if $$ b = a $$ </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a \wedge a = - a \wedge a $$</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ \therefore a \wedge a = 0 $$ </span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">If vectors are orthogonal then the following is true: \(ab = a \wedge b \). The result of vector \(vector2 \wedge vector1\) is not a vector, it is of greater dimension or 'grade', a vector is of grade 1, a plane is of grade 2 and a volume element would be of grade 3. When two things are wedged together their grades add as long as they are not linear multiples of each other.</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a , vector, line$$ </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a \wedge b, grade 2 plane$$</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a \wedge b \wedge c, grade 3 volume$$</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a \wedge b \wedge a = - a \wedge a \wedge b = - 0 \wedge b, grade 0$$</span></span><span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">This is to show some of the basic properties of geometric properties of geometric algebra but I don't have time to write a text book so I'm just going to show a few more things about the outer product right now. Consider two vectors \(a\) and \(b\) with orthonormal bases (fancy terms for \( \hat x\) and \( \hat y \) ) \( e_{1}, e_{2} \) and scalars \( a_{1} , a_{2}, b_{1}, b_{2} \).</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br />Consider the following: </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a \wedge b = (a_{1} e_{1} + a_{2} e_{2}) \wedge (b_{1} e_{1} + b_{2} e_{2}) $$</span></span><span style="font-family: inherit;"><span style="font-size: small;"></span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Remember in geometrric algebra stuff distributes over addition so:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ a_{1} b_{1} e_{1} \wedge e_{1} + a_{1} b_{2} e_{1} \wedge e_{2} + a_{2} b_{1} e_{2} \wedge e_{1} + a_{2} b_{2} e_{2} \wedge e_{2} = a_{1} b_{2} e_{1} \wedge e_{2} + a_{2} b{1} e_{2} \wedge e_{1} $$</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">and the outer product anti-commutes so: </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">$$ = ( a_{1} b_{2} - a_{2} b_{1}) e_{1} e_{2}$$ </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">If you are familiar with the vector math this may be apparent but the outer product of two vectors results in a planar element with a magnitude of the parallelogram spanned by the vectors \(a\) and \(b\). This is the same as a cross product except that the cross product would produce a third vector perpendicular to the other two rather than a plane spanning the two vectors. This pattern continues with higher dimensions, the outer product of 3 vectors would produce a signed volume element with the magnitude of the spanned parallel piped. In fact this would hold to n-dimensional hyper volumes!</span></span><br />
<br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">I mentioned before that one of my favorite properties of geometric algebra was how it treated imaginary numbers. Lets take a look at how 'imaginary numbers' occur as a result of the geometric algebra. Consider orthonormal vectors of magnitude 1, \(a\) and \(b\). The inner product is 0 for orthogonal vectors so in this case \(ab = a \wedge b\).</span></span><br />
<br />
<span style="font-family: inherit;">$$ (ab)^{2} = abab = -aabb = - (aa)(bb) = -1 $$</span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">That's right. \( (ab)^{2} = -1\). The imaginary numbers naturally appear out of the geometric algebra. Part of the nifty thing is is that it does not require anything to define this besides the geometric product, and isn't actually dependent on a number of dimensions to exist besides having more than two. In this way you can construct multiple 'imaginary' planes and perform rotations higher dimensional systems in the same manner as a lower dimensional system. Some of you guys might note the possibility of the Euler equation to be applied here which does happen. Infact is allows us to construct the powerful rotor which allows arbitrary rotation across a vector. But that is for another time. </span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">End of geomtric algebra for now next time I will talk about the inner product and general screw motion. </span></span>jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-89144006989054648772013-06-26T12:20:00.002-07:002013-07-22T07:58:07.286-07:00Busscooter maiden voyage: successfulSo buss scooter was pretty much finished it is missing two not 'required' but generally highly recommended things being among them are non-foot brakes(since we aren't going to count foot brakes despite them being quite effective) and head lights. But for the time being busscooter after its successful maiden voyage of driven home will chill in my living room; functional (being defined as having the capability to transport myself from point A to B) but without those 'safety bells and whistles'. But for now it can be considered done the extra stuff will go on in due time since I don't plan on using it as a main means of transport.<br />
<br />
Over all it was a satisfyingly uneventful maiden voyage home, namely because no one died and the battery didn't run out. The ride home took like 20mins for around 4.2miles giving an average speed of 12.6mph including many stops which probably made actual traveling speed ~15mph or 6.7m/s.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-z4CdqffsLWs/Ucs5htqrA6I/AAAAAAAAAS0/Bgw5kN1Zt4w/s1600/IMG_20130517_030217_230.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="225" src="http://2.bp.blogspot.com/-z4CdqffsLWs/Ucs5htqrA6I/AAAAAAAAAS0/Bgw5kN1Zt4w/s400/IMG_20130517_030217_230.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Current form of the busscooter</td></tr>
</tbody></table>
You might notice a few modifications, namely nicer sprockets (also larger gear ratio), different motor and a splatter/chain chain guard (made from a random piece of plastic bent using a hot wire).<br />
<br />
I might talk a bit more about the additions to busscooter later, but that's all for now on busscooter, there'll be more posts when the head lights and brakes get added. I think my next vehicle will be a bit more practical and have more than two wheels because from observation making an interesting and ride-able scooter-like vehicle seems to take more effort than a four wheeled vehicle, but maybe I just don't find scooter-like things as interesting as gokarts.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-30458152728228562162013-04-07T19:50:00.002-07:002013-05-03T12:12:18.546-07:00Electric Vehicle Part II: Frame BuiltSo the frame of the vehicle when last discussed was a highly non-structural frame with a seat some wheels and a motor. This is it now:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-xvHw8Gp5G7M/UWCvIAn_MHI/AAAAAAAAAQE/_YsWf_BCS7o/s1600/IMG_20130405_173757_395.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="http://2.bp.blogspot.com/-xvHw8Gp5G7M/UWCvIAn_MHI/AAAAAAAAAQE/_YsWf_BCS7o/s400/IMG_20130405_173757_395.jpg" width="400" /></a></div>
<br />
A much more structural thingy with a base board and supports and hot damn it even has a chain to transfer power. This thing is almost usable. All of the making the fork and headset and such happened of the course of a few months of off and on work. The making it structural bit happened in about two weeks of more dedicated work. This thing has existed too long in a semi constructed shape, hopefully it will be done soon; or at least rideable its hard to say when a project is done because then the mods and shiny bits start getting added.<br />
<br />
How ever on that note time to talk about structure a lot of the 80/20 carts made at MITERS have been planar creations supported by the sheer shear strength of the aluminum beams they sat on. Since this bike/EV/thing is like 1.5m long and made out of 20mm 80/20 bars that wasn't going to fly. What the vehicle really needed was a larger moment of inertia to prevent flexing in the middle. This was achieved through the angular braces that form a bridge like structure under the seat. The ends of this bridge structure sit on horizontal bars that are fixed in between 1/4" plates this provides a solid base near the ends of the scooter. Unfortunately this meant the 80/20 had to connect at strange angles, this required bent brackets to accommodate the angles needed by the supports.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-Cww2Dqh1L2Q/UWEiuFeyHZI/AAAAAAAAAQU/Xyh2K53zdPk/s1600/IMG_20130330_223616_137.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://3.bp.blogspot.com/-Cww2Dqh1L2Q/UWEiuFeyHZI/AAAAAAAAAQU/Xyh2K53zdPk/s320/IMG_20130330_223616_137.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Rear brackets</td></tr>
</tbody></table>
Here is a picture of a bent and yet to be bent pair ofrear brackets. The aluminum is 1/8" thick and for size reference the holes are 20mm apart and fit M5 screws. That also gives a reference for the wrench in the next picture as a poor-man's brake. It is fucking huge. It is around 2' long and provides an excellent lever arm.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-2PeBPtCqtjI/UWEk8wSGQ6I/AAAAAAAAAQs/XGpjH8I5iPk/s1600/IMG_20130329_211216_257.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-2PeBPtCqtjI/UWEk8wSGQ6I/AAAAAAAAAQs/XGpjH8I5iPk/s320/IMG_20130329_211216_257.jpg" width="180" /></a></div>
Each bracket was bent in small increments deforming one section at a time along the bend line. Despite the inaccurate method the brackets fit in place pretty well. Some brackets which needed larger angles were heated with a torch before bending this made it significantly easier to bend some of the brackets without ruining the intergrity of the metal(...well maybe its temper was ruined but w/e).<br />
<div>
<br /></div>
<div>
Whats was actually more obnoxious than the bending was cutting some of the 80/20 sections. Distinctly the braces on the rear of the vehicle. In order to provide natural support for the braces (both in the front and in the back) they were cut with a niche in the bottom so they could rest on top of the the brackets and supports on the frame base. Due to the odd 3-D angles getting the interface was a pain without using a mill but since I wanted to get this done quickly and precision was not a requirement the joints were band sawed then filed a bit.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-_4Pi0HnAEOQ/UWFbXPmNTAI/AAAAAAAAAQ8/8Mc2oUgooQw/s1600/IMG_20130330_165133_836.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-_4Pi0HnAEOQ/UWFbXPmNTAI/AAAAAAAAAQ8/8Mc2oUgooQw/s320/IMG_20130330_165133_836.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Etched cut to make</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-_nzLenuVmAE/UWFcLo2vhKI/AAAAAAAAARU/syXijC13khY/s1600/IMG_20130330_165606_836.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://4.bp.blogspot.com/-_nzLenuVmAE/UWFcLo2vhKI/AAAAAAAAARU/syXijC13khY/s320/IMG_20130330_165606_836.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Left: Cut Just made by bandsaw, chunk barely held in Right: mirror support without chunk of aluminum in place.<br />
<br />
<div style="text-align: left;">
<span style="text-align: center;">Yes that cut looks weird but that is actually how its supposed to be. When viewed from the proper angle it is just a 90 degree cut out like this:</span></div>
</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-n9hJmngA2ck/UWFbdUxf33I/AAAAAAAAARI/8qTftgquRxA/s1600/IMG_20130330_164039_057.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://2.bp.blogspot.com/-n9hJmngA2ck/UWFbdUxf33I/AAAAAAAAARI/8qTftgquRxA/s320/IMG_20130330_164039_057.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Support bar from a less confusing angle</td></tr>
</tbody></table>
The angle in the end of each support fits over the edge bar or bracket it connects to, this way when some one is sitting on the scooter and these bars are loaded in compression and they transfer the forces more directly to the structural objects they sit on rather than the brackets that keep them in place. It also means I don't have to worry about them becoming displaced as easily Either way not very exciting yadd yadda, after attaching the additional supports and what not the electric vehicle was quite solid. After the supports a large sheet of 1/2" plastic(it might be HDPE) that I found was fixed to the base. These steps are kind of boring and I'll skip posting more about the structure of this thing. It's a frame in the shape of a bike/scooter. The next discussion will be about the drive train/energy storage of the scooter.<br />
<br />
Also holy crap I'm tired of referring the 'the electric vehicle' as a scooter , EV, minibike. From now on it shall be known as busscooter because it is long like bus and according to some people will have the turning radius of a bus....which is not entirely inaccurate given its length.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-10289323633323383252013-04-06T16:23:00.001-07:002013-05-03T12:11:06.405-07:00Electric Vehicle coming along Part I<div class="separator" style="clear: both; text-align: center;">
<br /></div>
So in the mean time of not posting I've been making an electric vehicle for <a href="http://wattsdottime.blogspot.com/2011/09/small-motor-completed-with-sensors.html">small motor</a>.<br />
<br />
It kind of like a minibike..ish. Its been called a skate board crossed with a scooter among various other things, but nothing seems to describe it right. Either way its coming along and its about time for the post of the project. To start off here's the (partially incomplete because I'm lazy) cad model of the project:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-hZWYeunNEpA/UQ7pR0BdcaI/AAAAAAAAAK8/3LuWSLchE9M/s1600/assembly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="126" src="http://3.bp.blogspot.com/-hZWYeunNEpA/UQ7pR0BdcaI/AAAAAAAAAK8/3LuWSLchE9M/s320/assembly.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Despite being incomplete the vehicle is pretty much the same shape as the cad model. However there were several changes to the structure of the vehicle that were just done on the fly. Namely all the additional supports besides the vertical posts holding the seat up. But I'll get to that in the next post.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
The bike was meant to be ridden in the 'superman' position. This vehicle really borrows a lot from other vehicles that have been produced by other people at <a href="http://miters.mit.edu/">miters</a>, hence the 80-20 frame. However unlike most of the other 80/20 vehicles that seem to get made the mini bike will be non planar. Partially because the 80-20 extrusions are too thin with out more support (20mm metric is being used rather than 1").<br />
In retrospect it was a bad decision to use 20mm framing for this, not because it is skinny but because the 20mm 80/20 on mcmaster carr uses M5 nuts/screws and its difficult to find M5 tabbed weld nuts of the proper dimensions (at least in quantities less than several thousand) which forces you to buy the expensive proprietary ones actually meant for the framing. If it had been made with 25 or 30 mm extrusion the frame would have been quite heavier not to mention more expensive but the price difference might have been compensated for if I was to using generic nuts.<br />
<br />
Time to go over the construction of the vehicle:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
One of the first things to do for the vehicle was to figure out the steering for the project. The wheels picked out were unfortunately too wide for a standard bike fork. So a fork was made out of a bike The tubes were roughly cut then milled to the proper angle and size. Then roughly fit together and welded<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="http://4.bp.blogspot.com/-lBLyiOzA-uY/UQ8LpNtRMVI/AAAAAAAAANE/4CkmpO1ICHQ/s1600/2012-12-22_11-46-28_794.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-lBLyiOzA-uY/UQ8LpNtRMVI/AAAAAAAAANE/4CkmpO1ICHQ/s320/2012-12-22_11-46-28_794.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 13px;">Partially machined tubes</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-77VD46aMWEM/UQ7qGFK_kzI/AAAAAAAAALM/u-N9tdopM2o/s1600/2012-12-22_14-34-50_578.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-77VD46aMWEM/UQ7qGFK_kzI/AAAAAAAAALM/u-N9tdopM2o/s320/2012-12-22_14-34-50_578.jpg" width="180" /></a><a href="http://3.bp.blogspot.com/-ZwbX7fMdnME/UQ7qFRby_HI/AAAAAAAAALE/YUD3SOTxPqk/s1600/2012-12-22_14-34-19_583.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-ZwbX7fMdnME/UQ7qFRby_HI/AAAAAAAAALE/YUD3SOTxPqk/s320/2012-12-22_14-34-19_583.jpg" width="180" /></a><a href="http://3.bp.blogspot.com/-keEtPwydFHw/UQ7qGuEn_bI/AAAAAAAAALU/4wDr66q_cEA/s1600/2012-12-22_19-46-43_876.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-keEtPwydFHw/UQ7qGuEn_bI/AAAAAAAAALU/4wDr66q_cEA/s320/2012-12-22_19-46-43_876.jpg" width="180" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Machined tubes fit being fit together and the welded fork.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
After welding the main portion of the fork together some steel plugs were turned and cut to fit into the ends of the fork. These were welded into the fork and will hold the shaft/wheel assembly.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="http://2.bp.blogspot.com/-BS-ti6wngOY/UQ7qIiNHhkI/AAAAAAAAALk/7-_M219ie00/s1600/2012-12-24_18-26-14_997.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://2.bp.blogspot.com/-BS-ti6wngOY/UQ7qIiNHhkI/AAAAAAAAALk/7-_M219ie00/s320/2012-12-24_18-26-14_997.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 13px;">Steel plugs inserted into fork</td></tr>
</tbody></table>
<div class="separator" style="clear: both;">
The plugs were then welded in place then flats were milled onto the sides and a 1/2" bit was drilled through for the shaft which is also 1/2". </div>
<div class="separator" style="clear: both;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-zMTLhxdoZ_4/UQ7qJpny6MI/AAAAAAAAALs/8_r5dFKQKuo/s1600/2012-12-24_20-04-56_220.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" height="320" src="http://3.bp.blogspot.com/-zMTLhxdoZ_4/UQ7qJpny6MI/AAAAAAAAALs/8_r5dFKQKuo/s320/2012-12-24_20-04-56_220.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fork awkwardly clamped down ready to get its flats</td></tr>
</tbody></table>
<div class="separator" style="clear: both;">
Note: the welds were ground down because they looked ugly. The welds seem solid though, after attempting to break them several times unsuccessfully, they're expected to be strong enough to hold a mildly obese person.</div>
<div class="separator" style="clear: both;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="http://3.bp.blogspot.com/--6U2zjKkGcY/UQ8ztw6IBGI/AAAAAAAAANU/byblbriKtiw/s1600/2012-12-25_20-22-15_535.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/--6U2zjKkGcY/UQ8ztw6IBGI/AAAAAAAAANU/byblbriKtiw/s320/2012-12-25_20-22-15_535.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 13px;">plugs with holes going though fork</td></tr>
</tbody></table>
<div class="separator" style="clear: both;">
A chunk of steel was turned down to act as the fork crown and support the bottom bearing of the headset and the bearings were press fit into the head tube.</div>
<div class="separator" style="clear: both;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-jE4unoKQAgM/UQ84bV_GYuI/AAAAAAAAANk/1JImyz3emfo/s1600/2013-01-19_13-53-29_643.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-jE4unoKQAgM/UQ84bV_GYuI/AAAAAAAAANk/1JImyz3emfo/s320/2013-01-19_13-53-29_643.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ghetto step welded on now the Y of the fork is a complete mass of ground down weldedness</td></tr>
</tbody></table>
<div class="separator" style="clear: both;">
Next step was to make a method of attaching the head tube to the rest of the frame. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-bGayUyHNJZo/UQ881dubg5I/AAAAAAAAAN0/6436P3rbG0A/s1600/2013-01-20_13-25-52_233.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-bGayUyHNJZo/UQ881dubg5I/AAAAAAAAAN0/6436P3rbG0A/s320/2013-01-20_13-25-52_233.jpg" width="180" /></a></div>
<div class="separator" style="clear: both;">
I kinda winged it and welded some 1/8" steel U-channel to make an attachmenty thingma dig, it takes x2 M8 bolts in the bottom to hold it on the front brace of the rest of the frame. Here is the head set/fork mounted on the frame base:</div>
<div class="separator" style="clear: both;">
<a href="http://1.bp.blogspot.com/-69Xsy85ApUg/UVidQXJ6K-I/AAAAAAAAAOc/yJMALimcqVg/s1600/2013-01-27_12-52-05_657.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="180" src="http://1.bp.blogspot.com/-69Xsy85ApUg/UVidQXJ6K-I/AAAAAAAAAOc/yJMALimcqVg/s320/2013-01-27_12-52-05_657.jpg" width="320" /></a></div>
<div class="separator" style="clear: both;">
It was a giant floppy mass at this point but I get into the rest of the structural details later.</div>
<br />
Those little orange wheels were obtained from harbor freight for a disturbingly cheap price of like $8.50 a piece. They came with a matching pair of disturbingly crappy bearings; after watching someone else using the same wheel destroy their bearings, I decided it would be best to preemptively swap them out for a better set.<br />
<br />
The old bearings were removed and a spacer was placed in the center of the wheel that would hold a bearing on either side. The new bearings were then press fit in up to their retaining rings, but the spacer was over sized slightly to make sure that it would contact both inner bearing races.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-igSmoNbPr7E/UQ7qKAwZ8hI/AAAAAAAAAL8/r_ca_1RObDY/s1600/2013-01-01_16-35-12_628.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-igSmoNbPr7E/UQ7qKAwZ8hI/AAAAAAAAAL8/r_ca_1RObDY/s320/2013-01-01_16-35-12_628.jpg" width="180" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Turning down one of the spacers.</td></tr>
</tbody></table>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-l640nvoTu9M/UQ7qLk9odTI/AAAAAAAAAMU/NXy5b5uXnvo/s1600/2013-01-01_16-45-59_528.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="112" src="http://2.bp.blogspot.com/-l640nvoTu9M/UQ7qLk9odTI/AAAAAAAAAMU/NXy5b5uXnvo/s200/2013-01-01_16-45-59_528.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Spacer next to bearing</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-aXd2Ozq3OHY/UQ7qKgIISeI/AAAAAAAAAMI/PzdAesCmVZA/s1600/2013-01-01_16-45-47_602.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="112" src="http://4.bp.blogspot.com/-aXd2Ozq3OHY/UQ7qKgIISeI/AAAAAAAAAMI/PzdAesCmVZA/s200/2013-01-01_16-45-47_602.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bearing on spacer</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-g3fPiLgKBfY/UQ7qLp5Ik4I/AAAAAAAAAMY/KTu8Spyd3zw/s1600/2013-01-01_16-51-48_251.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="112" src="http://1.bp.blogspot.com/-g3fPiLgKBfY/UQ7qLp5Ik4I/AAAAAAAAAMY/KTu8Spyd3zw/s200/2013-01-01_16-51-48_251.jpg" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Spacer and bearing in hub of wheel</td></tr>
</tbody></table>
The in-hub spacers remove axial loading on the inner bearing races.This allows the wheels to be tightened in place without stressing the bearings in a bad way (these were normal roller bearings not meant for high axial loading) as well as transfer axial forces to both bearings at the same time. Here is a ghetto mspaint illustration of the hub/bearing assembly:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-1eLRTRtBR3U/UV91y280nbI/AAAAAAAAAP0/QYR0j5hqz3o/s1600/spacer+assembly.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="396" src="http://4.bp.blogspot.com/-1eLRTRtBR3U/UV91y280nbI/AAAAAAAAAP0/QYR0j5hqz3o/s640/spacer+assembly.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
The hub spacer forms a bridge between the two hub bearings effectively making a solid column, making sure that both of the inner bearing races are supported at the same time.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
The next step was to actually get handles bars on the bike by making the bike stem. In the course of this the main thing learned was that the bike stem was not called the 'handle bar holder'.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-9VxiViEMJS8/UVic_DzaiWI/AAAAAAAAAOU/edLNAgnPBVk/s1600/2013-03-16_20-42-38_52.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://2.bp.blogspot.com/-9VxiViEMJS8/UVic_DzaiWI/AAAAAAAAAOU/edLNAgnPBVk/s320/2013-03-16_20-42-38_52.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Started with a large chunk of aluminum</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-Cpqoh4bZ66s/UVifRE1BnRI/AAAAAAAAAOo/cFDKrjSZC2U/s1600/2013-03-21_19-21-15_367.jpg" imageanchor="1" style="font-size: medium; margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-Cpqoh4bZ66s/UVifRE1BnRI/AAAAAAAAAOo/cFDKrjSZC2U/s320/2013-03-21_19-21-15_367.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Drilled some holes for a flexture clamp to hold the handle bars and reamed a larger hole to take the top of the bike fork<br />
<br /></td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: 1em; margin-right: 1em; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-rgQPd4G9SWE/UVifZYgY9SI/AAAAAAAAAO0/qDdvcGG9ZfE/s1600/2013-03-23_22-45-41_827.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://4.bp.blogspot.com/-rgQPd4G9SWE/UVifZYgY9SI/AAAAAAAAAO0/qDdvcGG9ZfE/s320/2013-03-23_22-45-41_827.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Repeated process on the other side of the block but drilled holes for the clamp of the fork and drilled a larger hole to hold the handle bars. Then the front was rounded while being held very awkwardly (read: improperly) in an indexing head note: I would highly recommend against doing this for various reasons. The stem was sanded a bit afterward so it didn't look like it'd been chewed on by an angry aluminum hungry dog.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: 1em; margin-right: 1em; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-vT-obVqBnlk/UVikHhNMtiI/AAAAAAAAAPE/NW9yvEnV6Sk/s1600/2013-03-24_00-02-16_851_cropped.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-vT-obVqBnlk/UVikHhNMtiI/AAAAAAAAAPE/NW9yvEnV6Sk/s320/2013-03-24_00-02-16_851_cropped.jpg" width="316" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The rounding was kind of a pain in the ass so on the other side the corners were milled off at 45 degree angles .<br />
Also note the larger holes were slit on one side using a band saw, the slits are roughly 1mm wide but it seems to be plenty of room to get effective clamping force.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td><a href="http://1.bp.blogspot.com/-x6_qCaxFDKg/UVkeOZaqIhI/AAAAAAAAAPU/bfU3LmH-AIs/s1600/2013-03-24_02-24-48_907_cropped.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://1.bp.blogspot.com/-x6_qCaxFDKg/UVkeOZaqIhI/AAAAAAAAAPU/bfU3LmH-AIs/s320/2013-03-24_02-24-48_907_cropped.jpg" width="296" /></a></td></tr>
<tr><td class="tr-caption" style="font-size: 13px;">The complete stem installed, a homemade cap was installed to connect to the star nut in the top of the fork</td></tr>
</tbody></table>
</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-AfKufB2GQKM/UVkec6BnGlI/AAAAAAAAAPc/EKj5UM2--lU/s1600/2013-03-24_02-25-47_316.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="http://2.bp.blogspot.com/-AfKufB2GQKM/UVkec6BnGlI/AAAAAAAAAPc/EKj5UM2--lU/s320/2013-03-24_02-25-47_316.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Bike with temporary handle bars installed... it also grew a seat and a motor in this picture but we can talk about that later.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Yay it's finally a rolling frame. But it has no support structure and I would not bet it on holding any one with that skinny 20mm 80/20 frame. This part actually posed some annoying requirements since 80/20 framing really doesn't do angles well unless you make your own brackets for it. It probably would have taken less time to learn to weld aluminum and put the frame together at this point each joint has too many nuts and screws it both seems annoying inelegant and pain in the ass to make. That being said this post</div>
<div class="separator" style="clear: both; text-align: left;">
feels really long so talking about how this flat floppy frame was made structural will be talked about in part II of this post.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-16120583067070733972013-02-24T23:17:00.004-08:002013-05-03T12:10:41.401-07:00winding pattern generator: finally wrote the winding pattern generator for an arbitrary number of phases, source:<br />
<a href="https://www.dropbox.com/s/2rxmk2c8iua74ru/winder_v15.py">winding pattern generator</a><br />
It was written in python 3.x so you'll need to run it. It out put the phase as a number and the direction of the winding as the sign. If any of you end up using it, it would be awesome to hear suggestions, or added features or what you might like to see next.<br />
<br />
But yeah so this is that motor winder thing I was talking about, it was accidentally lost while playikng the game of musical partions while reinstalling things on the laptop.<br />
But I rewrote it! and here is.<br />
It gives you a winding pattern for a n-phase, m-pole and k*2 pole motor. If you're too lazy to open up the code to look at it, here's the most important part of it:<br />
<br />
<br />
def pattern_gin(slot_edeg, phase_slice):<br />
<br />
phase = m.floor((slot_edeg % 180)/ phase_slice)#actually calculates the phase for the slot<br />
<br />
if (phase % 2 == 0):#dictates the direction of each winding<br />
if slot_edeg >= 180:<br />
phase_sign = '+'<br />
else:<br />
phase_sign = '-'<br />
else:<br />
if slot_edeg >= 180:<br />
phase_sign = '-'<br />
else:<br />
phase_sign = '+'<br />
return phase_sign, phase<br />
<br />
This is the function that defines the phase and direction of a winding on one stator tooth.<br />
As the input it takes the electrical degree position and the electrical degrees of each phase and matches them up...its really not that exciting.<br />
<br />
I've been learning haskell and I'm considering making some sort of simulatorjumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-91822783750997008682013-01-19T19:33:00.002-08:002013-05-03T12:12:47.271-07:00Long time no seeSo hello again. Thought it was past time to make another post.<br />
Current projects that have been happening/ happened are:<br />
-A motor winding pattern generator for an arbitrary number of phases.<br />
It was written in python and was made in a fairly awkward form, but I ended up deleting some of it in frustration while rewriting it.<br />
<br />
Idea behind a pattern generator for a motor:<br />
A permanent magnet motor consists of magnets and solenoids in some circular configuration. In order to produce torque the solenoids must be turned on when they are in the proper position. This is where the winding pattern generator comes in it creates the winding 'pattern' so that when voltage is applied to any particular phase of the motor each pole on that phase produces a force in the same direction this goes back to one of my last posts when I made a motor. This bring about babble of electrical angles which I talked about for a moment in <a href="http://wattsdottime.blogspot.com/2011/07/redoing-things-becauseimadubass-also.html">this post</a>. 2pi rads of electrical angle per pair of magnet poles (or you can think about it in degrees if you like), this gives a whole crap load of radians per motor but since our magnets are tessellate (positive pole up, then negative, then positive.....repeat) we really only care about how things line up within a single 2pi rads interval. So when talking about electrical angles it is useful to think of them as electrical angle mod(2pi), I kind of like to think of it as walking off the right edge of a TV screen and coming back on the left side.<br />
<br />
<br />
This makes things easier to count and think about positionaly and bring up the question:<br />
When do we actually want to turn on a phase?<br />
And depending on what the goal iswant to do that answer can actually not be that straight forward. However in most cases you probably only care about getting maximum torque out of your motor. In order to produce the maximum amount of torque you want to turn your motor on when it is directly between the pole of two magnets.<br />
<br />
This corresponds to an angle of either 0 or pi depending how you want to look at it. So how do you get all of your poles in one phase to produce torque in the same direction? By applying voltage to all of the poles in a certain interval at the same time. Ideally all of the poles in the phase would be at the same electrical angle when turned on. This ensures that they all push in the same direction. By defining a certain window of electrical degrees where sum((nth pole torque) for 0 to n poles)>0 at all times in that interval. i.e. the motor will always be pushing in the same direction.<br />
<br />
This pattern can be calculated without too much work below is some fake code I wrote to calculate the winding pattern for an arbitrary phase motor of n even poles, and an arbitrary number of slots.<br />
Please forgive the bastardization of code, it was really an organizational exercise to make sure the motor winder is written properly next time it gets written...hopefully this is not too nonsensical looking.<br />
<br />
Psuedo code for motor winder:<br />
#pretend the person already entered the number of poles, number of phases and number of slots(stator poles) and they make physical sense:<br />
pole_num<br />
phase_num<br />
slot_num<br />
<br />
#find the amount of electrical degrees to alot to each phase interval<br />
#and the electrical degrees per slot<br />
phase_slice = 180 / phase_num<br />
slot_slice = pole_num * 180 /slot_num<br />
<br />
#map the values out over all the slots and phases so you have each phase interval<br />
#and the electrical and of each slot<br />
slot_angles = map(lambda(n): (n * slot_slice) % 360): range(slot_num))<br />
#phase intervals mapping not needed but good to look at sometimes to make sure everything makes sense<br />
#phase_intervals = map(lambda(n): ( n * phase_slice) % 180): range(phase_num))<br />
<br />
#this is the heart of the program it decides the phase number and the direction in which to wind each phase slot<br />
<br />
defun pattern_picker (slot_angle[n], phase_slice)(<br />
#makes and integer of each slot corresponding to the phase interval it lies on<br />
phase = floor(slot_angle[n] % 180 /phase_slice)<br />
<br />
#decides the direction of each slot winding on the stator<br />
(if even?(slot_angles[n])<br />
then (if (slot_angle[n] > 180)<br />
then (case = "-") else(case = "+")))<br />
(if odd?(slot_angles[n])<br />
then (if (slot_angles[n] > 180)<br />
then (case = "+") else(case = "-")))<br />
<br />
#outputs the direction and phase for a given stator slot<br />
return( string(case)+string(phase))<br />
<br />
#gets the direction/phase for each slot<br />
winding_pattern = map(pattern_picker(slot_angles[n], phase_slice): slot_angles, repeat(phase_slice))<br />
<br />
print("Behold! Your winding pattern sir: \n")<br />
for slot in range(len(slots)):<br />
(if (slot != len(slots)) then (print(winding_pattern[slot] + ", ")<br />
else (print(winding_pattern[slot] + "... the end"))<br />
<br />
<br />
I'll babble more about this later and potentially post some code which will actually calculate a winding pattern.<br />
<br />
Edit: I tweaked the code upon realizing I made a few mistakes in the pattern picker funtion with regards to the variables being passed in as well as the definition of the phase number.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-69544375845823036892012-05-29T21:43:00.003-07:002013-05-03T12:13:50.278-07:00Long story short I got swallowed up this school year and not much got done on a projects front. It was really en escapade of screwing up in some respects from a project stand point which can be gotten into later.<br />
<br />
Things that did happen:<br />
-made a generator (read: BLDC motor) for a class, which was really a rework of an existing generator, really the only reason parts of the old generator were used was because its stator was the right dimensions. But its rotor was remade and the stator was rewound and hall effect sensors were added. It was rewound at 50RPM/V, the target was ~100RPM/V; but because I can't do math that didn't quite turn out. Pretty much lesson here is the average voltage of a rectified 3phase is not the same as the average value of a rectified sine wave... and don't do math at 3am. luckily in the. many thanks to alex and erich in helping getting the rotor machined.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-7whs4YYSlRM/T8PlATBwY6I/AAAAAAAAAIc/I4x_45eTbWQ/s1600/013.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="http://3.bp.blogspot.com/-7whs4YYSlRM/T8PlATBwY6I/AAAAAAAAAIc/I4x_45eTbWQ/s320/013.JPG" width="240" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">shiny insides</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-S6Prb8WEQP8/T8PlBjeSaRI/AAAAAAAAAIk/XaNWOb_vY4U/s1600/016.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://4.bp.blogspot.com/-S6Prb8WEQP8/T8PlBjeSaRI/AAAAAAAAAIk/XaNWOb_vY4U/s320/016.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">less shiny generator outsides</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-fKi-H_bVDH0/T8PnRn3NB1I/AAAAAAAAAJE/PjQKkT5q3GI/s1600/056.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://3.bp.blogspot.com/-fKi-H_bVDH0/T8PnRn3NB1I/AAAAAAAAAJE/PjQKkT5q3GI/s320/056.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Stator before rewind</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-XIkNeWhBmck/T8Pnk4TJXbI/AAAAAAAAAJM/bx3Lj18Etkw/s1600/014.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://3.bp.blogspot.com/-XIkNeWhBmck/T8Pnk4TJXbI/AAAAAAAAAJM/bx3Lj18Etkw/s320/014.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Stator after rewind/adding sensors</td></tr>
</tbody></table>
Another project was a tool post holder for the lathe/mill combo thingy that was acquired a while ago. The 'millathe' is <a href="http://www.lathes.co.uk/emco/page4.html">Maximat7</a> made in Austria god knows how long ago and probably weighs close to 75kg<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-mIlwiQWpijU/T8PlbQbzFMI/AAAAAAAAAIs/EipqruxR2Mo/s1600/040.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://4.bp.blogspot.com/-mIlwiQWpijU/T8PlbQbzFMI/AAAAAAAAAIs/EipqruxR2Mo/s320/040.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">tool post sitting on tool post holder it looks like a zebra because the mill spindle wasn't level and i was too lazy to change it, I like to consider this a stylistic plus.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
the failgatedrivetroller was supposed to be a gate driver board for a 3 phase bridge</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-5thHFSvNnDU/T8Pmq3U07WI/AAAAAAAAAI8/iBxp4v_B0xo/s1600/059.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://4.bp.blogspot.com/-5thHFSvNnDU/T8Pmq3U07WI/AAAAAAAAAI8/iBxp4v_B0xo/s320/059.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">failgatedrivecontroller has 2 mistakes: mirrored to arduino pinout and forgot the all important ground</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-yfGUZuIZv-M/T8Plhuyf6rI/AAAAAAAAAI0/B0iaMH3kgNQ/s1600/058.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://1.bp.blogspot.com/-yfGUZuIZv-M/T8Plhuyf6rI/AAAAAAAAAI0/B0iaMH3kgNQ/s320/058.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The horrible mezzanine thing was made to swap the pinout of the arduino.</td></tr>
</tbody></table>
<br />
Long story short there's been a good amount of fail in recent projects due to messing up details. Devils always is in the details but this leaves rooms for revisions and what not. Considering the pain it is to make boards I'll probably transition to getting boards fabricated by a third party and using a lot more surface mount components. DIL packages have been getting a bit old and clunky and it would be nice to have sexy well done boards with less errors than I would make.<br />
<div>
<br /></div>
<div>
Either way that's whats been happening over the lat few months and I'm going to start a new post to separate this post from a more technical one and shall be babbling about motors among other things.</div>
jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-70541328570155865552011-10-23T03:21:00.003-07:002011-10-23T03:33:48.958-07:00Things getting done: The beginning of Big MotorI unfortunately have other things to do than post on the internet but I feel obligated to update this every once in a while so for the maybe one or two people who stumble here by accident so please sit down and enjoy the beginnings of Big Motor (the motor that will supersede small motor). For a scale reference on this motor the air gap OD is 10.5" and the magnets are doubled up to for super poles with 2 magnets per pole, making this a 30 pole 36 slot machine. The model isn't fully done yet, I'm still deciding if I want to attempt getting a second stator of the same type and doing a transverse flux concentrating geometry to avoid magnet reluctance. The attempted result would be a ridiculously high flux linkage and by ridiculous, that is to say something that would just almost saturate the iron with a few 2-5mm of air gap. The operating goal of this linkage would be 1. High torque for low current (hence avoiding magnet reluctance) 2. Avoiding higher harmonics of eddy current losses induced by quickly changing back emf from the magnets (taken care of by the larger air gap). Since these goals are directly at odds with one another some FEMM simulations will be under way to see how achievable this will be. Either way enjoy the picture its Big Motors initial design without any fancy pants transversefluxyness (note: the model isnt done yet).<br />
<div><br />
</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-kGMwHRY06YA/TqPkWLCGBII/AAAAAAAAAFg/g0Xn1-QCOLw/s1600/large+motor+assembly+1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="213" src="http://1.bp.blogspot.com/-kGMwHRY06YA/TqPkWLCGBII/AAAAAAAAAFg/g0Xn1-QCOLw/s400/large+motor+assembly+1.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Big Motor....its big</td></tr>
</tbody></table><div><br />
</div>jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-20150747199542624842011-10-03T00:40:00.002-07:002011-10-03T00:43:22.363-07:00Power Supply and Vehicle Update<div class="separator" style="clear: both; text-align: left;">I have been quite busy with school so I'm just going to post some pretty pictures of some of the progress made towards the electric vehicle and power supply. First off here is the transformer. Because I wanted to experiment it is made of a pair of toroids. It is litzed because this will be run at ~300kHz min making skin depth and eddy currents an issue. The turns ratio is 4:1 and its meant to operate at 120VRMS on the primary side drawing around 10A minimum.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-f9hfMKM_KbM/TolXp19kxEI/AAAAAAAAAFQ/I0a0WhUzFaI/s1600/006.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="http://2.bp.blogspot.com/-f9hfMKM_KbM/TolXp19kxEI/AAAAAAAAAFQ/I0a0WhUzFaI/s200/006.JPG" width="150" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">just the primary</td></tr>
</tbody></table><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-0PcxiVOsUIM/TolXs6e3s0I/AAAAAAAAAFU/j8SMloLOmCI/s1600/008.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="150" src="http://4.bp.blogspot.com/-0PcxiVOsUIM/TolXs6e3s0I/AAAAAAAAAFU/j8SMloLOmCI/s200/008.JPG" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">with the secondary</td></tr>
</tbody></table><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: left;">The wire is the same stuff used on my motor, its nice because the low gauge makes winding easy, however it has a <a href="http://www.superioressex.com/uploadedFiles/Magnet_Wire_and_Distribution/North_America/Magnet_Wire_-_Winding_Wire/GP_MR_Extra.pdf">gnarly</a> polyamideimide coating with astoundingly good mechanical and electrical characteristics coating which much to my chagrin cannot be burned off in a solder pot or removed with standard solvents such as acetone. The easiest ways of removing the coating without a sketchy solvent seems to be sand paper (labor intensive) or propane (not the neatest). At the moment torching it is easiest despite the bits of semi scorched insulation it leaves behind. However to stop the thermal gradient from crawling up the wires and leaving a bunch of damaged insulation I recommend covering the wires in a wet paper towel up to where you want the insulation gone.</div><br />
On the mechanical side of things I hacked apart a pair of bike frames to be used in the electric vehicle.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-mHD4nwo-pCs/TolX9_ym71I/AAAAAAAAAFY/qgl4o6diudw/s1600/010.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://2.bp.blogspot.com/-mHD4nwo-pCs/TolX9_ym71I/AAAAAAAAAFY/qgl4o6diudw/s320/010.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Initial bike frame</td></tr>
</tbody></table>It is amazing how much less space a bike takes up once it has been reduced to a pile of tubes; even more amazing is the destructive power of a sawzall on a bike frame.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-T11UB-fbzI8/TolX_8rF1qI/AAAAAAAAAFc/Mpn8TQvMOjk/s1600/013.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://3.bp.blogspot.com/-T11UB-fbzI8/TolX_8rF1qI/AAAAAAAAAFc/Mpn8TQvMOjk/s320/013.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A pair of bikes that were attacked by a sawzall</td></tr>
</tbody></table>Next step in this process is to strip the paint from the tubes so they can be cut up and welded together. To strip the paint I got some paint removal discs; they kind of make me think <a href="http://www.amazon.com/Wagner-Power-Products-513041-Replacement/dp/B000FFVBO4/ref=sr_1_10?s=hi&ie=UTF8&qid=1317626885&sr=1-10"> a brillo pad and bunch of sanding discs tried to have kids</a>. However after trying them out, the process is a bit more labor intensive than I want it to be and so I might resort to chemical methods.<br />
<div>....however work needs to get done so until next time.</div>jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-2756144123362007192011-09-10T13:33:00.000-07:002011-09-10T13:33:13.134-07:00small motor completed with sensorsThe small motor has been done for a few weeks now with hall effect sensors included. so here's a picture.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-gVoDj_iY2N8/Tmu7G5Cxw0I/AAAAAAAAAFI/VCwTlH60zKE/s1600/001.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-gVoDj_iY2N8/Tmu7G5Cxw0I/AAAAAAAAAFI/VCwTlH60zKE/s320/001.JPG" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>Looking back on the design its not half bad besides need for the mounting set up, next time the bearings will at least be flush with the motor face if not inset a bit. The next step in this project is to build a vehicle for this motor. I already have an idea in my head along the lines of a mini bike/ scooter, if you've ever seen The Worlds Fastest Indian this will will be a scooter more akin to the <a href="http://www.flickr.com/photos/skrb/410156282/">motorcycle</a> in that movie rather than a normal bike where one sits more upright. In the mean time I have some bicycle frames to chop into usable tubing and some CADing to do. Also I have a couple side projects and random ideas to post about in the near future with include tranverse flux motors high power AC/DC converters.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-21414917923886290162011-08-20T01:29:00.002-07:002011-09-22T02:23:00.740-07:00hall effect sensors (yay) + less abominable sprocket mountSo as this is being written those hall effect sensors in my last post are drying in place on the stator with 3 poles in between each sensor woot, hopefully I'll post pictures of that soon enough or at least in a timely manner unlike every other post on here. Those hall effect sensors aren't the only thing happening though. I got my hands on an aluminum round ... more like an aluminum patty it was .5"thick x4"diam. These flat dimensions were ideal for making something well... much more flat to replace the last janky rig. This new sprocket adapter consists of a single aluminum flange with a bit of an inset and some small standoffs, the standoffs are only needed until I get some pan head screws to inset into the base of the flange rather than the current socket cap ones.<br />
On the new flange there are only 3 slots for screws rather than six, six is really over kill. To mill these slots I was going to try a easy method of screwing a fat bolt through the middle of the plate and sticking it in a collet block. Unfortunately that didn't quit go as planned and the adapter lost a chunk out of the side.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-GwGUfKzAXMM/Tk9quyfKq_I/AAAAAAAAAE0/32iu_C58hks/s1600/IMG_2458.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="http://3.bp.blogspot.com/-GwGUfKzAXMM/Tk9quyfKq_I/AAAAAAAAAE0/32iu_C58hks/s200/IMG_2458.JPG" width="200" /></a><a href="http://2.bp.blogspot.com/-_h3RsYkO-7M/Tk9qzN-U-iI/AAAAAAAAAE4/o1NlhELoiZY/s1600/IMG_2461.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="http://2.bp.blogspot.com/-_h3RsYkO-7M/Tk9qzN-U-iI/AAAAAAAAAE4/o1NlhELoiZY/s200/IMG_2461.JPG" width="200" /></a></div><div class="separator" style="clear: both; text-align: center;">Top and bottom before attempt with collet block.</div><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-GP-acJWRsAk/Tk9rP-XJk4I/AAAAAAAAAE8/yxjH0jC2Ths/s1600/IMG_2465.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://1.bp.blogspot.com/-GP-acJWRsAk/Tk9rP-XJk4I/AAAAAAAAAE8/yxjH0jC2Ths/s320/IMG_2465.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">after indexing head and collet block</td></tr>
</tbody></table> Unfortunately the collet really needed to be cranked into the block and we were missing the proper spanner wrench to tighten it in there, as seen above the collet wasn't quite tight enough to hold that bolt. Thankfully the slotting worked just fine on an indexing head.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-XYKTmRTTyYM/Tk9rc0fNi4I/AAAAAAAAAFA/M9pRUC8jGO4/s1600/IMG_2471.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://3.bp.blogspot.com/-XYKTmRTTyYM/Tk9rc0fNi4I/AAAAAAAAAFA/M9pRUC8jGO4/s320/IMG_2471.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sprocket adapter flangey thing from its good side</td></tr>
</tbody></table>Despite having a bite out of the side it works just fine.<br />
<div>Anyway hopefully this glue will dry soon so I can:<br />
A. hopefully close this motor and never open it again until it dies a fiery death from over current.<br />
B.post about it. </div>jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-5968143680878839202011-07-31T00:34:00.007-07:002011-09-22T15:00:00.496-07:00Redoing Things, Also Woot Hall Effect SensorsSo in the last post I was describing my special abomination. But looking at it makes my inner engineer feel bad so in the near future it will be remade using a single chunk of aluminum that the sprocket can be mounted on. Also small motor is under going a few changes do to the fat assery of the bearings there was a bit of rubbing on some heat shrink so I turned on of the plates to seat the bearing around .125" farther out from the stator. This seems to have fixed the rubbing problem. On a side note all hot glue in the motor used to hold down wires will be removed from the motor after talking to <a href="http://www.etotheipiplusone.net/">Charles</a> about fears of oozing thermoplastics getting all over the place.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-c146Lp6U-7Y/TjUDx_QJ95I/AAAAAAAAAEU/9QDMXOwukLI/s1600/008.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://1.bp.blogspot.com/-c146Lp6U-7Y/TjUDx_QJ95I/AAAAAAAAAEU/9QDMXOwukLI/s320/008.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sexy red heat shrink</td></tr>
</tbody></table>But on to something not about me messing up: HALL EFFECT SENSORS (read that again with enthusiasm and a disregard for the preceding paragraph) they tell where the magnets are in the motor which is *sometimes* essential for starting a brushless motor from a dead stop. I'm going to stick hall effect sensors in my motor soon but am currently out of town so I'm ti babble about hall effect sensors for a while. Now there are sensorless motor controllers and sensorless brushless motors, however to start from a complete stand still with a large amount of inertia you want sensors. The sensorless controllers work off of the back emf from the phases, the voltage from the changing magnetic flux tells them where the magnets are and when it is appropriate to turn on a particular phase buuuut to do this you need a bit of a spin to figure out the magnet placement. Therefore in vehicles where you want to be able to start from a stop, hall effect sensors are nifty things. Timing with hall effect sensors is analogous to the timing of cam shafts in a car engine; firing all 6 pistons (or 3 phases if its a motor) at once will get you nowhere but when things are done in the proper order you get rotation.<br />
Generally in a 3 phase sensored motor you'll have 3 sensors. Each hall effect sensors i will work with (ATS177) are effectively <a href="http://en.wikipedia.org/wiki/Flip-flop_(electronics)">flip-flop</a>s with some hysteresis and can tell the direction of the magnetic flux through the sensor. Because there are 3 phases and 3 sensors we want each hall effect sensor to be 120 electrical degrees apart (not necessarily physical degrees). The difference between electrical and physical degrees for the magnets is Eelectrical.deg=Physical.deg*polepairs (start at 0 after each 360) note: there are 20 pole pairs in my small motor, because of this there are several theoretical positions to place the hall effect sensors; really though there aren't many practical places you'd want to put them. Below my crappy illustration attempts to show this (for a prettier illustration of almost exactly the same thing see <a href="http://amymakesstuff.com/2011/06/11/pf-adding-sensors/">Amy's blog</a> where she pretty much did exactly what I'm about to do), Tm represents 1 magnetic period/pole pair/360 electrical degrees/ the smallest repeatable section to get the proper magnetic pattern. Each colored dot represents a theoretical place where a hall effect sensor could reside. The purple dots represent the closest theoretical placement of the sensors at 120 electrical degrees apart...give or take a bit in the picture.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-5uNl-d2rtJ0/TjT7IJxpRNI/AAAAAAAAAEQ/jMXgkTMmKX4/s1600/smallmotorsensors.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="388" src="http://2.bp.blogspot.com/-5uNl-d2rtJ0/TjT7IJxpRNI/AAAAAAAAAEQ/jMXgkTMmKX4/s400/smallmotorsensors.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Motor diagram w/ magnets and hall effect placement</td></tr>
</tbody></table> Practically we want the placement of the hall effect sensors to line up with the stator slots because we physically can't shove them into the 1mm air gap (and the stator phase windings would mess up the readings) so that leaves us two possibilities where the <strike>stars align</strike> magnet and stator phases line up at spacings of 60 and 120 physical degrees; this is respectively represented by the orange and green dots. One important thing to note is the order of the phases with the placement of the sensors. By following the orange dots clockwise the phases will go ABC but doing the same for the green dots will give ACB. This difference in pattern will make the motor spin in backwards for the same sensor pinout, but that can be fixed by switching any pair of phase wires. Oh and just a note as long as you have 3 phases everything is independent of the winding pattern but ummmm yeah that's hall effect sensors for now. I'll post pretty pictures soon.jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0tag:blogger.com,1999:blog-569553855218119420.post-29684430917290728932011-07-14T18:47:00.000-07:002011-07-14T18:47:17.630-07:00So I haven't posted in a while buuut um yeah while away I've created some sort of abomination to show who ever reads this. On my motor with its fat ass shaft the OD of the bearings is 47mm and because it's an outrunner everything that needs to turn must be mounted around said bearing and shafts. Its important to note that thin section bearings would have a full 15mm smaller OD...don't buy bearings at 3 am kids. In addition to the diameter issue the bearings stick out from the surface a bit this makes mounting stuff extremely awkward. Rather than being intelligent and spending a bit of money to buy a chunk of aluminum to turn down to a proper flanged adapter to fix this, I opted for the cheap approach and used the steel cut out of my magnet can combined with a piece of aluminum scrap which was at one point roughly rectangular and 4 home made standoffs. Which when mounted on the side of the motor form a sprocket on standoffs on plate on a plate on a plate.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-p8BC6gALT0k/Th-NcYs7VVI/AAAAAAAAAEM/fgwc5ahMdi4/s1600/007.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://1.bp.blogspot.com/-p8BC6gALT0k/Th-NcYs7VVI/AAAAAAAAAEM/fgwc5ahMdi4/s320/007.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Le parts magnet can remnants on motor plate, with in-between plate with sprocket</td></tr>
</tbody></table><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-dEGTFa5XvEk/Th-Mw9gijNI/AAAAAAAAAEI/4ituoca3-54/s1600/016.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="http://2.bp.blogspot.com/-dEGTFa5XvEk/Th-Mw9gijNI/AAAAAAAAAEI/4ituoca3-54/s320/016.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">By their powers combined + standoffs=inception sprocket?</td></tr>
</tbody></table>Lo and behold this abomination of mechanical engineering. More later when this thing starts spinning at high rpm.<br />
<div><div><br />
<br />
</div></div>jumehttp://www.blogger.com/profile/03224265299249074319noreply@blogger.com0