<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects"/>

<title>Projects</title>
<modified>2006-06-03T15:25:42Z</modified>
<tagline>Hardware Projects</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>1MHz+ Quadrature Divider for attiny13</title>
<issued>2006-06-03T15:25:42Z</issued>
<modified>2006-06-03T15:25:42Z</modified>
<id>https://emergent.unpythonic.net/projects/01149348342</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01149348342"/>
<content type="text/html" mode="escaped">&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- quadrature_divider_brd.png--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0.0px;&quot;&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149348342/quadrature_divider_brd.png&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;Quadrature divider board.  Actual size: .7x.4 inches (about 18x10mm)&quot;&gt;&lt;img src=&quot;https://media.unpythonic.net/emergent-files/projects/01149348342/quadrature_divider_brd-small.png&quot; width=300 height=217&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149348342/quadrature_divider_brd.png&quot;&gt;&lt;img class=zoom src=&quot;https://media.unpythonic.net/emergent-files/default/zoom.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149348342/quadrature_divider_brd.png&quot;&gt;Quadrature divider board.  Actual size: .7x.4 inches (about 18x10mm)&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
This &lt;b&gt;untested&lt;/b&gt; code, along with an Eagle schematic and board layout, are
for a quadrature divider that polls at over 1MHz.  The R and S test points are
used to program the device.

&lt;p&gt;Like the &lt;a href=&quot;https://emergent.unpythonic.net/projects/01149271333&quot;&gt;400kHz triple divider&lt;/a&gt;, &lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149348342/quad-tiny13.S&quot;&gt;this program&lt;/a&gt; uses a state table generated by &amp;quot;mkstate.py&amp;quot;, and
is GPL software.

&lt;p&gt;For real-world use, external pull-ups should probably be added to the board's
input side, according to the directions of the encoder manufacturer.</content>
</entry>
<entry>
<title>400kHz Triple quadrature divider for atmega8 and quadrature state table generator</title>
<issued>2006-06-02T18:02:13Z</issued>
<modified>2006-06-02T18:02:13Z</modified>
<id>https://emergent.unpythonic.net/projects/01149271333</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01149271333"/>
<content type="text/html" mode="escaped">
summary I promised a single, 800kHz quadrature divider for the attiny13.
Well, I haven't done that yet (I don't have any attiny13s to test on anyway),
but I have something else instead.

&lt;p&gt;As I mentioned earlier, Chris had already milled a servo control board for his
lathe.  Like the Etch Servo board, it controls two servo motors with a single
L298 chip.  Unlike the Etch Servo, it has 3 encoder inputs (X, Z, and spindle).
His servo motors have 500-line encoders and have a no-load speed of about 4000
RPM, while the spindle will have a 1024-line encoder with index pulse,
but rotate slower (much less than 2000RPM when threading).  133kHz is too fast
to count in the PC, but divided by 8 or 16 it's very managable.

&lt;p&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149271333/mkstate.py&quot;&gt;mkstate.py&lt;/a&gt; is a Python program which generates a quadrature
divider table.  By changing 'N', 'M', 'x' and 'ux', it's possible to generate
tables with different properties.  After generating the table, a variety of
tests are performed on it to verify that it is correct.  Output can be a &amp;quot;C&amp;quot;
array or a table of bytes for an assembler program. &lt;b&gt;Note (2025):&lt;/b&gt;
I've had reports that this program (which is python2 code anyway) doesn't work
as I believe it did. I haven't been able to correct the bugs.

&lt;p&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149271333/qq2.S&quot;&gt;qq2.S&lt;/a&gt; is a GNU assembler program that actually performs the
quadrature division.  According to my cycle counting, it polls at 470kHz
when a 16MHz crystal is used, so it is expected to work reliably with a 133kHz
quadrature signal.  So far, though, it has been tested with a single motor
spinning at hundreds of RPM.

&lt;p&gt;mkstate.py and qq2.S are released as free software under the terms of the
GNU GPL.

&lt;p&gt;&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5 style=&quot;width:auto!important; clear:none!important&quot;&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149271333/mkstate.py&quot;&gt;mkstate.py&lt;/a&gt;&lt;/td&gt;&lt;td&gt;5.5kB&lt;/td&gt;&lt;/tr&gt;&lt;tr bgcolor=#dddddd&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149271333/qq2.S&quot;&gt;qq2.S&lt;/a&gt;&lt;/td&gt;&lt;td&gt;5.7kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;

</content>
</entry>
<entry>
<title>Creating a Quadrature Divider: What Won't Work</title>
<issued>2006-05-31T16:57:54Z</issued>
<modified>2006-05-31T16:57:54Z</modified>
<id>https://emergent.unpythonic.net/projects/01149094674</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01149094674"/>
<content type="text/html" mode="escaped">
&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- wontwork.png--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0.0px;&quot;&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149094674/wontwork.png&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;A proposed quadrature divider circuit, and a
waveform that it will treat incorrectly&quot;&gt;&lt;img src=&quot;https://media.unpythonic.net/emergent-files/projects/01149094674/wontwork-small.png&quot; width=300 height=128&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149094674/wontwork.png&quot;&gt;&lt;img class=zoom src=&quot;https://media.unpythonic.net/emergent-files/default/zoom.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01149094674/wontwork.png&quot;&gt;A proposed quadrature divider circuit, and a
waveform that it will treat incorrectly&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
As an improvement to the &lt;a href=&quot;https://emergent.unpythonic.net/projects/01142347802&quot;&gt;simplest possible
closed-loop servo system&lt;/a&gt;, I've been trying to design a circuit that will
function as a quadrature divider: the input and output are both quadrature
waveforms with the same direction, but the output waveform is 1/8 or 1/16 as
fast as the input.

&lt;p&gt;Because emc2's encoder module poops out somewhere around 20 microsecond polling
intervals, an external divider is the only way to get accurate feedback from a
fast servo motor with a high-resolution encoder.  Division by 16 lets the PC
see a 25kHz quadrature signal instead of a 400kHz one.  For Chris's lathe
retrofit, the target speed is actually around 125kHz (1250 mm/min, 1mm/rev
leadscrew, 3:1 pulley, 500 line/rev encoder), but to keep it from being too
easy, he's going to do 3 such decoders on a single 16MHz atmega.

&lt;p&gt;Many people seem to hit on the idea of using an up/down counter to process a
quadrature input.  &lt;a href=&quot;http://timeguy.com&quot;&gt;Chris&lt;/a&gt; and I managed to
convince a couple of bright guys on the #emc channel that this would work to
create a quadrature divider circuit.  Well, it doesn't.</content>
</entry>
<entry>
<title>Two-axis servo schematic and board</title>
<issued>2006-05-22T13:13:28Z</issued>
<modified>2006-05-22T13:13:28Z</modified>
<id>https://emergent.unpythonic.net/projects/01148303608</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01148303608"/>
<content type="text/html" mode="escaped">&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- l298-servo-brd.png--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0.0px;&quot;&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01148303608/l298-servo-brd.png&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;L298 single-sided board&quot;&gt;&lt;img src=&quot;https://media.unpythonic.net/emergent-files/projects/01148303608/l298-servo-brd-small.png&quot; width=300 height=255&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01148303608/l298-servo-brd.png&quot;&gt;&lt;img class=zoom src=&quot;https://media.unpythonic.net/emergent-files/default/zoom.png&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01148303608/l298-servo-brd.png&quot;&gt;L298 single-sided board&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
I didn't &lt;a href=&quot;https://emergent.unpythonic.net/projects/01142347802&quot;&gt;originally&lt;/a&gt; include the
eagle-format schematic and board for this project.  Well, here it is.</content>
</entry>
<entry>
<title>Parallel-port Two-axis PWM servo controller for Etch CNC</title>
<issued>2006-03-14T14:50:02Z</issued>
<modified>2006-03-14T14:50:02Z</modified>
<id>https://emergent.unpythonic.net/projects/01142347802</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01142347802"/>
<content type="text/html" mode="escaped">&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- crw_3713.jpg--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:206px;margin-left:50.0px;&quot;&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01142347802/crw_3713-medium.jpg&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;ETCH Servo&quot;&gt;&lt;img src=&quot;https://media.unpythonic.net/emergent-files/projects/01142347802/crw_3713-small.jpg&quot; width=200 height=300&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01142347802/crw_3713-medium.jpg&quot;&gt;(M)&lt;/a&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01142347802/crw_3713.jpg&quot;&gt;(L)&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01142347802/crw_3713.jpg&quot;&gt;ETCH Servo&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
Inspired by discussion on &lt;tt&gt;#emc&lt;/tt&gt; and by the fact that I'd already
bought two &lt;a href=&quot;http://www.goldmine-elec-products.com/prodinfo.asp?number=G15607&amp;amp;variation=&amp;amp;aitem=4&amp;amp;mitem=5&quot;&gt;tiny servo motors&lt;/a&gt;, I've designed and built a two-axis PWM servo controller
with a parallel port interface.</content>
</entry>
<entry>
<title>ET-ARM Stamp</title>
<issued>2006-03-07T03:33:30Z</issued>
<modified>2006-03-07T03:33:30Z</modified>
<id>https://emergent.unpythonic.net/projects/01141702410</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01141702410"/>
<content type="text/html" mode="escaped">I recently got an &lt;a href=&quot;http://www.futurlec.com/ET-ARM_Stamp.shtml&quot;&gt;ET-ARM Stamp&lt;/a&gt; (a very wide
DIP-format board with an ARM microcontroller on board).  I haven't done
anything exciting with it yet, but I will as soon as I can think of something!
Some notes about the thing:</content>
</entry>
<entry>
<title>SOIC-8 to DIP adapter board</title>
<issued>2005-12-17T15:53:35Z</issued>
<modified>2005-12-17T15:53:35Z</modified>
<id>https://emergent.unpythonic.net/projects/01134834815</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01134834815"/>
<content type="text/html" mode="escaped">
&lt;div style=&quot;float:right;clear:right&quot;&gt;&lt;!-- soic8dip.jpg--&gt;&lt;div class=albumouter style=width:306px id=&gt;&lt;div class=albumimage style=&quot;width:306px;margin-left:0.0px;&quot;&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8dip-medium.jpg&quot; class=&quot;thickbox&quot; rel=&quot;album&quot; title=&quot;SOIC-8 to DIP adapter board&quot;&gt;&lt;img src=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8dip-small.jpg&quot; width=300 height=158&gt;&lt;/a&gt;&lt;div &gt;&lt;div style=&quot;float: right&quot; &gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8dip-medium.jpg&quot;&gt;(M)&lt;/a&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8dip.jpg&quot;&gt;(L)&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8dip.jpg&quot;&gt;SOIC-8 to DIP adapter board&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
This little board is an adapter from SOIC-8 to .6&amp;quot;-spacing DIP.  It allows a
surface-mount or thru-hole decoupling capacitor to be placed on the board as
well.  I'll be using this to breadboard a &lt;a href=&quot;http://www.stereoscopy.com/faq/stopaction.html&quot;&gt;flash trigger circuit&lt;/a&gt;.  The
op-amp I chose is in a surface-mount package.

&lt;p&gt;The board very cleanly milled.  Two areas needing just a bit of additional
cleanup are visible at the bottom, and that was solved with nothing more than
the tip of the fingernail.  To give a sense of scale, the board is about .4x.75
inches overall (10x19mm), with the holes being .1&amp;quot; (2.54mm) apart.

&lt;p&gt;I took the photo with my new macro lens.  I used a combination of back-lighting
and the camera's built-in flash.  The photo is hand-held with an exposure time
of 1/125s (ISO 100, f/8.0), and postprocessed with gimp's perspective tool.
&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5 style=&quot;width:auto!important; clear:none!important&quot;&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/projects/01134834815/soic8-to-dip.brd&quot;&gt;soic8-to-dip.brd&lt;/a&gt;&lt;/td&gt;&lt;td&gt;6.9kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;
</content>
</entry>
<entry>
<title>4-axis half-stepping translator in AVR</title>
<issued>2005-10-15T19:11:55Z</issued>
<modified>2005-10-15T19:11:55Z</modified>
<id>https://emergent.unpythonic.net/projects/01129403515</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01129403515"/>
<content type="text/html" mode="escaped">Chris started with a MAXNC 10 open-loop machine.  The included driver
boxes (which we came to understand were complete crap) use one pin per winding.
This requires two parallel ports for 4 axes.  So, a year or so ago, before he
switched to &lt;a href=&quot;http://www.pminmo.com/l297-8/l297-8.htm&quot;&gt;L297/8-based boards&lt;/a&gt;,
I helped Chris design an avr-based translator
from step+direction pulses to the individual winding activation signals.  Today
I'm posting the program, which I compiled with avr-gcc.  In the future I might
post the board, which was a double sided design created in eagle.</content>
</entry>
<entry>
<title>XY display update</title>
<issued>2005-05-26T00:36:42Z</issued>
<modified>2005-05-26T00:36:42Z</modified>
<id>https://emergent.unpythonic.net/projects/01117067802</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01117067802"/>
<content type="text/html" mode="escaped">New CRT, new board, same software...</content>
</entry>
<entry>
<title>Regulated LED flashlight -- update</title>
<issued>2005-04-03T20:19:12Z</issued>
<modified>2005-04-03T20:19:12Z</modified>
<id>https://emergent.unpythonic.net/projects/01112559552</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/projects/01112559552"/>
<content type="text/html" mode="escaped">
It was a bust.  The button cell I selected just can't supply the required current.  When I hooked up a pair of AA batteries, it worked well.  

&lt;p&gt;Later, when I tried to substitute a 1F capacitor (thinking &amp;quot;tiny *rechargable* regulated LED flashlight) I screwed up and either damaged the tiny SMD button or bridged some pads under it, because now it is stuck &amp;quot;on&amp;quot;.  Oh, and it doesn't run long from the capacitor anyway.

&lt;p&gt;I still like the idea, but I need a different power source.  Oh well.
</content>
</entry>
</feed>
