<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zenlogic</title>
	<atom:link href="http://zenlogic.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenlogic.org</link>
	<description>musings of a self-proclaimed inventor named Travis</description>
	<lastBuildDate>Wed, 15 Feb 2012 06:06:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>StarTiny v1 is in!</title>
		<link>http://zenlogic.org/2012/02/15/startiny-v1-is-in/</link>
		<comments>http://zenlogic.org/2012/02/15/startiny-v1-is-in/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 06:06:27 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Stardweeny/StarTiny]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[light]]></category>
		<category><![CDATA[ornament]]></category>
		<category><![CDATA[stardweeny]]></category>
		<category><![CDATA[startiny]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=421</guid>
		<description><![CDATA[The circuit boards have come back through BatchPCB, and I...]]></description>
			<content:encoded><![CDATA[
<a href='http://zenlogic.org/2012/02/15/startiny-v1-is-in/img_3065/' title='StarTiny v1 Single PCB'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/02/IMG_3065-150x150.jpg" class="attachment-thumbnail" alt="StarTiny v1 Single PCB" title="StarTiny v1 Single PCB" /></a>
<a href='http://zenlogic.org/2012/02/15/startiny-v1-is-in/img_3066/' title='StarTiny v1 Panel PCBs'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/02/IMG_3066-150x150.jpg" class="attachment-thumbnail" alt="StarTiny v1 Panel PCBs" title="StarTiny v1 Panel PCBs" /></a>
<a href='http://zenlogic.org/2012/02/15/startiny-v1-is-in/img_3070/' title='StarTiny v1 First Test!'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/02/IMG_3070-e1329285839513-150x150.jpg" class="attachment-thumbnail" alt="StarTiny v1 First Test!" title="StarTiny v1 First Test!" /></a>
<a href='http://zenlogic.org/2012/02/15/startiny-v1-is-in/img_3071/' title='StarTiny v1 First Test, Dimmer'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/02/IMG_3071-e1329285873730-150x150.jpg" class="attachment-thumbnail" alt="StarTiny v1 First Test, Dimmer" title="StarTiny v1 First Test, Dimmer" /></a>
<a href='http://zenlogic.org/2012/02/15/startiny-v1-is-in/img_3074/' title='StarTiny v1 Up Close'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/02/IMG_3074-e1329285904653-150x150.jpg" class="attachment-thumbnail" alt="StarTiny v1 Up Close" title="StarTiny v1 Up Close" /></a>

<p>The circuit boards have come back through BatchPCB, and I couldn&#8217;t be happier with the results. The lines are clean, the sizes are just to spec, and I got 20 boards instead of the ten I ordered (presumably to account for manufacturing defects, though I haven&#8217;t found any). I populated one of the PCBs, and the design works!</p>
<h3>The Boards</h3>
<p>The StarTiny boards turned out just right. Granted, it&#8217;s a very simple design. However, the price was right at just $3 per board. I originally hoped to order in the US, but the cost was just too high for an entry-level designer trying to get a feel for the manufacturing process.</p>
<h3>The Code</h3>
<p>The code I had written for my solderless-breadboard ATtiny was close to correct, though the timings were a bit off from what I wanted. As I&#8217;ve said before, there&#8217;s not enough flash space to include floating-point math libraries, so I had to forgo the sin() function I used on the Ardweeny. The code uses a rudimentary linear ramp to approximate the sine, and the results are pretty good, though there is a bit less visual distinction between the nodes.</p>
<p>I altered the pin mappings in the code to reflect the connections on the PCB, and I think with a few more tweaks I can get the look just right.</p>
<h3>Change of Plans with Paper</h3>
<p>The paper doesn&#8217;t pass light as well as I had hoped. I could try sourcing brighter LEDs, but they would have to stay under the 20mA drive capabilities of the &#8216;tiny. I think I might go with lighter-colored (and thinner) paper instead. The issue then would be structural integrity, though.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2012/02/15/startiny-v1-is-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The StarTiny Paper Pattern</title>
		<link>http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/</link>
		<comments>http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 07:28:39 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Origami]]></category>
		<category><![CDATA[Stardweeny/StarTiny]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=410</guid>
		<description><![CDATA[StarTiny is cool, in my opinion, partly because it features...]]></description>
			<content:encoded><![CDATA[<p>StarTiny is cool, in my opinion, partly because it features a hand-crafted paper star housing. The paper gives the whole item a certain crafty feel that speaks of art and care. And I appreciate care in products.</p>
<h3>Photos of the Paper Patterns</h3>

<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2906/' title='StarTiny Papers 1'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2906-150x150.jpg" class="attachment-thumbnail" alt="StarTiny Papers 1" title="StarTiny Papers 1" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2907/' title='StarTiny purple point, inside'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2907-e1327044425619-150x150.jpg" class="attachment-thumbnail" alt="StarTiny purple point, inside" title="StarTiny purple point, inside" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2908/' title='StarTiny purple point, up close'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2908-e1327044389939-150x150.jpg" class="attachment-thumbnail" alt="StarTiny purple point, up close" title="StarTiny purple point, up close" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2909/' title='StarTiny points, ready for gluing'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2909-e1327044355795-150x150.jpg" class="attachment-thumbnail" alt="StarTiny points, ready for gluing" title="StarTiny points, ready for gluing" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2911/' title='StarTiny Purple, Red, and Turquoise'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2911-e1327044312163-150x150.jpg" class="attachment-thumbnail" alt="StarTiny Purple, Red, and Turquoise" title="StarTiny Purple, Red, and Turquoise" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2912/' title='StarTiny Red, up close'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2912-e1327044285574-150x150.jpg" class="attachment-thumbnail" alt="StarTiny Red, up close" title="StarTiny Red, up close" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2913/' title='StarTiny Purple, up close'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2913-e1327044242982-150x150.jpg" class="attachment-thumbnail" alt="StarTiny Purple, up close" title="StarTiny Purple, up close" /></a>
<a href='http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/img_2914/' title='StarTiny Papers'><img width="150" height="150" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2914-e1327044200597-150x150.jpg" class="attachment-thumbnail" alt="StarTiny Papers" title="StarTiny Papers" /></a>

<p>I can&#8217;t wait to get the PCBs to bring these colors to life!</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2012/01/20/the-startiny-paper-pattern/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stardweeny evolves into StarTiny: PCBs sent to production!</title>
		<link>http://zenlogic.org/2012/01/20/stardweeny-evolves-into-startiny-pcbs-sent-to-production/</link>
		<comments>http://zenlogic.org/2012/01/20/stardweeny-evolves-into-startiny-pcbs-sent-to-production/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 07:07:43 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Stardweeny/StarTiny]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=406</guid>
		<description><![CDATA[The Stardweeny finally has its own PCB! The first version...]]></description>
			<content:encoded><![CDATA[<p>The Stardweeny finally has its own PCB! The first version was based on a<a title="Ardweeny by Solarbotics" href="http://www.solarbotics.com/products/kardw/"> Solarbotics Ardweeny</a> on a perfboard, but I wanted to lower the cost and especially the manufacturing complexity.</p>
<h3>Enter the StarTiny</h3>
<p>I made the new StarTiny PCB with <a title="gEDA/gaf EDA Suite" href="http://www.gpleda.org/">gEDA</a>. It is based on the ATtiny13 microcontroller from Atmel, as the name suggests. The tiny13 has just enough storage space to hold the necessary firmware for the star. It comes in a compact <a title="SOIC on Wikipedia" href="http://en.wikipedia.org/wiki/Small-outline_integrated_circuit">8-SOIC package</a> that fits neatly between the five LEDs on the board.</p>
<h3>The Order</h3>
<p>I ordered 10 of the StarTiny PCBs through <a title="BatchPCB Home" href="http://batchpcb.com/">BatchPCB</a>, a Sparkfun-related frontend to the Chinese Gold Phoenix PCB fab. The boards are only 1.25&#8243; to a side, so the cost comes out to only $3.95 per board. There&#8217;s a $10 per-order tooling fee (for panelization and human design verification) and a $5 shipping fee.</p>
<div id="attachment_407" class="wp-caption alignright" style="width: 160px"><a href="http://zenlogic.org/wp-content/uploads/2012/01/overview.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-thumbnail wp-image-407" title="StarTiny v1 Overview" src="http://zenlogic.org/wp-content/uploads/2012/01/overview-150x150.png"  alt="StarTiny v1 Overview" width="150" height="150" /></a><p class="wp-caption-text">StarTiny v1 Overview</p></div>
<h3> The Files</h3>
<p>As you may have read in the first post on the Stardweeny, I&#8217;m sharing the design files freely. I want anyone to be able to share in the simple joy of soothing, blinky LEDs! The effect is really quite charming. Also, if you want, you can order your own PCB directly via <a title="The PCB on BatchPCB" href="http://www.batchpcb.com/product_info.php?products_id=77179&amp;check=26228635823ea789a06cf6bbb8f63b87">BatchPCB</a>.</p>
<ul>
<li><a href="http://zenlogic.org/wp-content/uploads/2012/01/startiny1.zip">StarTiny v1 Gerber Files</a></li>
</ul>
<div><em><strong>Please note: I have not yet received these boards from the manufacturer, so they aren&#8217;t tested. As usual, no guarantees!</strong></em></div>
<p><a href="http://creativecommons.org/licenses/by/3.0/" rel="license"><img style="border-width: 0;" src="http://i.creativecommons.org/l/by/3.0/88x31.png" alt="Creative Commons License" /></a><br />
StarTiny v1 by <a href="http://www.zenlogic.org/" rel="cc:attributionURL">Travis Geis</a> is licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 Unported License</a>.<br />
Based on a work at <a href="http://www.zenlogic.org/" rel="dct:source">www.zenlogic.org</a>.<br />
Permissions beyond the scope of this license may be available at <a href="http://www.zenlogic.org/" rel="cc:morePermissions">http://www.zenlogic.org/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2012/01/20/stardweeny-evolves-into-startiny-pcbs-sent-to-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software PWM on the ATtiny13</title>
		<link>http://zenlogic.org/2012/01/11/software-pwm-on-the-attiny13/</link>
		<comments>http://zenlogic.org/2012/01/11/software-pwm-on-the-attiny13/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 04:28:07 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Stardweeny/StarTiny]]></category>
		<category><![CDATA[ATtiny]]></category>
		<category><![CDATA[ATtiny13]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[AVR-LibC]]></category>
		<category><![CDATA[led]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=394</guid>
		<description><![CDATA[This year for the holidays I created a little dynamic...]]></description>
			<content:encoded><![CDATA[<div id="attachment_403" class="wp-caption alignright" style="width: 160px"><a href="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2929.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-thumbnail wp-image-403" title="Stardweeny ATtiny First Prototype" src="http://zenlogic.org/wp-content/uploads/2012/01/IMG_2929-e1326866475822-150x150.jpg"  alt="A first go at the Stardweeny using an ATtiny13" width="150" height="150" /></a><p class="wp-caption-text">Testing the ATtiny13 with one LED</p></div>
<p>This year for the holidays I created a little dynamic ornament with five channels of independent LED light. The prototype, which had to be finished in a matter of days, used an Ardweeny board from Solarbotics. The Ardweeny is based on the ATmega328, a great chip with more than five hardware channels for PWM (pulse-width modulation). While I love the ATmega chips, they get a bit pricey at $5 apiece just to drive some LEDs.</p>
<p>I was shopping on Digi-Key for alternatives and decided to try a couple of ATtiny13 microcontrollers. The ATtiny13 is a small, low-power AVR with the standard 8-bit core size, and conveniently comes with a 9.6-MHz internal RC oscillator. Because the ATtiny has an internal oscillator, I knew I could keep my hardware very minimal and thus very small, a requirement for the small paper ornament I was hoping to build.</p>
<p>The problem is that the ATtiny13 has only one PWM output. If I used only its hardware functionality, I would get one channel of control, where I needed five. To solution is to implement a simple software PWM. In this post I describe my process of getting software PWM (and embedded C programming in general) working on the ATtiny13.</p>
<p><span id="more-394"></span></p>
<p>The first step with programming any part is reading the datasheet [link]. The Attiny13 comes with 1KB of internal flash memory for programs. When I ordered it this sounded plenty large for my purposes, but I forgot to account for the heavy Arduino libraries I&#8217;m used to using, whose needed functionality I would have to implement myself in the code. 1KB turns out to feel like a tiny amount of space.</p>
<p>1KB is too small to hold the floating-point math libraries of AVR-LibC, the C library I use for AVR programs. It&#8217;s also too small to hold the math.h library, which includes the trigonometry functions. In my &#8217;328-based prototype I used a sin() function to calculate the brightness levels of the light channels, to give a soothing light pulsation. That won&#8217;t be an option on the tiny13.</p>
<p>I had a lot of trouble getting started with C on the ATtiny. It&#8217;s not too complicated once you get going, though.</p>
<p>[steps for strting with libc]</p>
<h2>Implementing Software PWM</h2>
<p>Software PWM uses an inbuilt functionality of the microcontroller called a timer. The timer counts off clock cycles, and when it reaches a certain point, in this case its maximum value of 255 (the max value of a single unsigned byte), the timer triggers an interrupt.</p>
<p>The interrupt is important precisely because it interrupts the running code. Specifically, it tells the microcontroller to jump to a predefined location in program memory, execute the instructions there, and then return to the main routine. For software-based PWM, the timer interrupt is perfect. It frees up the main program logic by periodically and consistently executing the same function, called an Interrupt Service Routine.</p>
<p>So the desired program flow looks like this:</p>
<pre class="brush: cpp; title: ; notranslate">
main(){
	loop infinitely, changing the output levels
	accordingly.
}

ISR(){
	run now and then, twiddling the hardware
	outputs to correspond with the output levels
	set in main
}
</pre>
<p>The main function in my case was supposed to set the output level of each of five LEDs such that one LED would &#8220;lead&#8221; the others in a gentle up-down pulsation. The ISR would be responsible for dealing with the actual on-off settings of the LEDs.</p>
<p>For my project I chose a PWM resolution of one byte, or eight bits. A byte allows for 256 possible output levels, plenty more than the eye can see in brightness gradation. A resolution of 256 means that there are 256 &#8220;time slots&#8221; wherein an LED can turn on or off.</p>
<p>For example, if the brightness of the LED is supposed to be 255, it is on from time slot &#8220;0&#8243; all the way to time slot &#8220;255&#8243;—in other words, all the time. If the brightness is 0, the LED is off for every cycle. If the brightness is 100, the LED is on for the first hundred cycles, then off for the remaining 155.</p>
<p>The resulting output is not smooth, but a series of full-on and full-off positions that, to the relatively slow human eye, average together to some intermediate brightness. So, now we know roughly what the ISR should do:</p>
<ol>
<li>Read the desired brightness level of an LED, in the form of a global variable.</li>
<li>Read the current progress through the 256 cycles</li>
<li>Compare the brightness level to the current progress</li>
<ol>
<li>If the progress is lower than the desired on-time, turn the LED on.</li>
<li>If the progress is past the desired on-time, turn the LED off.</li>
</ol>
<li>Increment the progress by one.</li>
</ol>
<p>AVR-LibC says that the ISR for the timer interrupt on the tiny13 has the signature</p>
<pre class="brush: cpp; title: ; notranslate">

ISR(TIM0_OVF_vect){}
</pre>
<p>The TIM0_OVF_vect parameter indicates that this ISR (potentially one of several) is specifically for interrupts triggered by a TIMER0 overflow.</p>
<p>Given the pin number of each LED channel, and the brightness level desired, the ISR body looks like:</p>
<pre class="brush: cpp; title: ; notranslate">
ISR(TIM0_OVF_vect)
{
	if(ISRcounter &lt; ch1) PORTB |= (1 &lt;&lt; CH1_PIN); //Write the ch1 pin high
	else PORTB &amp;= ~(1 &lt;&lt; CH1_PIN); //Write the ch1 pin low

	if(ISRcounter &lt; ch2) PORTB |= (1 &lt;&lt; CH2_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH2_PIN);

	if(ISRcounter &lt; ch3) PORTB |= (1 &lt;&lt; CH3_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH3_PIN);

	if(ISRcounter &lt; ch4) PORTB |= (1 &lt;&lt; CH4_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH4_PIN);

	if(ISRcounter &lt; ch5) PORTB |= (1 &lt;&lt; CH5_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH5_PIN);

	ISRcounter++;
}
</pre>
<p>where ch1, ch2, &#8230;, ch5 are the single-byte output levels of each channel, and CH1_PIN, CH2_PIN, &#8230;, CH5_PIN are the pin numbers for each channel.</p>
<p>The ISR is actually very simple:</p>
<p>ISRcounter holds the current count of ISR runs (0 to 255). For each channel, if the ISRcounter is less than the brightness level desired for that channel, write the LED HIGH (PORTB |= (1 &lt;&lt; pinNumber)). Once the counter exceeds the desired brightness level, keep writing the LED LOW (PORTB &amp;= ~(1 &lt;&lt; pinNumber)). So, in effect, the brightness level byte is simply the ON-time of the LED, out of 255.</p>
<p>The rest of the code can now fall into place:</p>
<pre class="brush: cpp; title: ; notranslate">
#define F_CPU 9.6E6L /* CPU Freq. Must come before delay.h include. 9.6MHz */

#include  /* For data types */
#include  /* Register and port definitions */
#include  /* Busy-wait delay functions */
#include  /* Exposes timers, counters and ISR functions */

#define CH1_PIN PB0 /* Bind output channels to specific PortB pins. This depends on schematic. */
#define CH2_PIN PB1
#define CH3_PIN PB2
#define CH4_PIN PB3
#define CH5_PIN PB4

#define TIME_OFFSET 50
#define DELAY_MS 3

uint8_t ch1, ch2, ch3, ch4, ch5; /* The one-byte PWM level of each channel */
uint8_t directions = 0xFF;
/*
This one-byte flag holds five channel direction bit flags
0x [nothing] [nothing] [nothing] [ch5] [ch4] [ch3] [ch2] [ch1]
*/

volatile uint8_t ISRcounter = 0; /* Count the number of times the ISR has run */
uint8_t timeCount;

int main(void);

int main(void)
{
	/* Setup */
	ch1 = 0;
	ch2 = TIME_OFFSET;
	ch3 = 2 * TIME_OFFSET;
	ch4 = 3 * TIME_OFFSET;
	ch5 = 4 * TIME_OFFSET;

	DDRB = 0xFF; //Every PORTB pin is output
	PORTB = 0x00; //Start with every pin low

	TCCR0B |= (1 &lt;&lt; CS00); // disable timer prescale (=clock rate)
	TIMSK0 |= (1 &lt;&lt; TOIE0); // enable timer overflow interrupt specifically 	sei(); // enable interrupts in general 	/* Loop */ 	while(1){ 		if(directions &amp; 1) ch1++; 		else ch1--; 		if(directions &amp; 0B00000010) ch2++; 		else ch2--; 		if(directions &amp; 0B00000100) ch3++; 		else ch3--; 		if(directions &amp; 0B00001000) ch4++; 		else ch4--; 		if(directions &amp; 0B00010000) ch5++; 		else ch5--; 		if(ch1 &gt; 254) directions &amp;= ~0B00000001;
		else if(ch1 &lt; 1) directions |= 0B00000001; 		if(ch2 &gt; 254) directions &amp;= ~0B00000010;
		else if(ch2 &lt; 1) directions |= 0B00000010; 		if(ch3 &gt; 254) directions &amp;= ~0B00000100;
		else if(ch3 &lt; 1) directions |= 0B00000100; 		if(ch4 &gt; 254) directions &amp;= ~0B00001000;
		else if(ch4 &lt; 1) directions |= 0B00001000; 		if(ch5 &gt; 254) directions &amp;= ~0B00010000;
		else if(ch5 &lt; 1) directions |= 0B00010000;

		_delay_ms(DELAY_MS);
	}
	return 0;
}
</pre>
<p>Like all AVR-LibC programs, the main() function is divided into a setup phase, which runs once at the time of power-up, and a loop phase, which runs after setup as long as power is supplied. The setup function here sets the five LED channels to a starting brightness with an interval determined by the macro TIME_OFFSET, so-named because it simulates the amount of time by which each LED leads the one &#8220;behind&#8221; it in the circular brightness pattern.</p>
<p>Then the loop logic uses a one-bit &#8220;direction&#8221; flag to decide whether to increment or decrement the brightness of each channel, and finally a comparison checks whether the direction needs to reverse (in case the LED is at minimum or maximum brightness). The loop delays by time DELAY_MS, in milliseconds, and starts again.</p>
<p>That&#8217;s it! Beyond setting up the timer details with the lines</p>
<pre class="brush: cpp; title: ; notranslate">
	TCCR0B |= (1 &lt;&lt; CS00); // disable timer prescale (=clock rate)
	TIMSK0 |= (1 &lt;&lt; TOIE0); // enable timer overflow interrupt specifically

	sei(); // enable interrupts in general
</pre>
<p>as given in the ATtiny13 datasheet, the main() function and the ISR together handle everything the program has to do to make pretty blinky lights.</p>
<p>There is one more step, actually. By default, the ATtiny13 ships with a 1/8th clock prescaler enabled, a fuse called &#8220;CKDIV8&#8243; or &#8220;clock divide 8.&#8221; To make the timer count quickly enough for the PWM to be invisible to the human eye, we need to disable this clock divisor. To do so, we must run the command</p>
<pre class="brush: plain; title: ; notranslate">
&quot;avrdude -c usbtiny -p t13 -U lfuse:w:0x7A:m&quot;
</pre>
<p>instructing avrdude to wirte 0x7A to the low fuse. This is the same as the default low fuse value in every way but the CKDIV8 bit, which has been disabled.</p>
<p>The complete code:</p>
<pre class="brush: cpp; title: ; notranslate">
/*
* Stardweeny Source Code
* Author: Travis Geis
* Version: 1
* Date: January 2012
* URL: http://zenlogic.org/
*
* file: main.c
*
* The Stardweeny project runs five channels of software PWM to
* control the five individual LEDs in the points of a paper star.
*
* Inspired by and dedicated to Linda Geis.
*
* For this code to work correctly, lfuse = 0x7A. (Disabling CKDIV8)
* Run the command &quot;avrdude -c usbtiny -p t13 -U lfuse:w:0x7A:m&quot;
*/

#define F_CPU 9.6E6L /* CPU Freq. Must come before delay.h include. 9.6MHz */

#include  /* For data types */
#include  /* Register and port definitions */
#include  /* Busy-wait delay functions */
#include  /* Exposes timers, counters and ISR functions */

#define CH1_PIN PB0 /* Bind output channels to specific PortB pins. This depends on schematic. */
#define CH2_PIN PB1
#define CH3_PIN PB2
#define CH4_PIN PB3
#define CH5_PIN PB4

#define TIME_OFFSET 50
#define DELAY_MS 3

uint8_t ch1, ch2, ch3, ch4, ch5; /* The one-byte PWM level of each channel */
uint8_t directions = 0xFF;
/*
This one-byte flag holds five channel direction bit flags
0x [nothing] [nothing] [nothing] [ch5] [ch4] [ch3] [ch2] [ch1]
*/

volatile uint8_t ISRcounter = 0; /* Count the number of times the ISR has run */
uint8_t timeCount;

int main(void);

/*
* int main(void):
*
* The main function runs automatically when the AVR powers up.
* It never returns, and so dispatches all other actions for the
* microcontroller.
*
* The goal is to make a sinusoidal light intensity with time.
*
*/

int main(void)
{
	/* Setup */
	ch1 = 0;
	ch2 = TIME_OFFSET;
	ch3 = 2 * TIME_OFFSET;
	ch4 = 3 * TIME_OFFSET;
	ch5 = 4 * TIME_OFFSET;

	DDRB = 0xFF; //Every PORTB pin is output
	PORTB = 0x00; //Start with every pin low

	TCCR0B |= (1 &lt;&lt; CS00); // disable timer prescale (=clock rate)
	TIMSK0 |= (1 &lt;&lt; TOIE0); // enable timer overflow interrupt specifically 	 	sei(); // enable interrupts in general 	 	/* Loop */ 	while(1){ 		if(directions &amp; 1) ch1++; 		else ch1--; 		if(directions &amp; 0B00000010) ch2++; 		else ch2--; 		if(directions &amp; 0B00000100) ch3++; 		else ch3--; 		if(directions &amp; 0B00001000) ch4++; 		else ch4--; 		if(directions &amp; 0B00010000) ch5++; 		else ch5--; 		if(ch1 &gt; 254) directions &amp;= ~0B00000001;
		else if(ch1 &lt; 1) directions |= 0B00000001; 		if(ch2 &gt; 254) directions &amp;= ~0B00000010;
		else if(ch2 &lt; 1) directions |= 0B00000010; 		if(ch3 &gt; 254) directions &amp;= ~0B00000100;
		else if(ch3 &lt; 1) directions |= 0B00000100; 		if(ch4 &gt; 254) directions &amp;= ~0B00001000;
		else if(ch4 &lt; 1) directions |= 0B00001000; 		if(ch5 &gt; 254) directions &amp;= ~0B00010000;
		else if(ch5 &lt; 1) directions |= 0B00010000;

		_delay_ms(DELAY_MS);
	}
	return 0;
}
/*
* The ISR is responsible for toggling the states of the five output channels
* based on the current global variables for the desired brightness levels.
* Because the brightnesses (ch1 ... ch5) are single-byte values, the range
* of values is 0 to 255. Thus the ISR needs to restart its counting cycle every
* 256th time it is called.
*
* To avoid undesired wiggle on the PWM, the ISR updates evey channel's pin
* every time it runs. It should take the same number of cycles every time.
* The duty period of the PWM is the first section. Thus the LED goes ON then OFF.
*/
ISR(TIM0_OVF_vect)
{
	if(ISRcounter &lt; ch1) PORTB |= (1 &lt;&lt; CH1_PIN); //Write the ch1 pin high
	else PORTB &amp;= ~(1 &lt;&lt; CH1_PIN); //Write the ch1 pin low

	if(ISRcounter &lt; ch2) PORTB |= (1 &lt;&lt; CH2_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH2_PIN);

	if(ISRcounter &lt; ch3) PORTB |= (1 &lt;&lt; CH3_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH3_PIN);

	if(ISRcounter &lt; ch4) PORTB |= (1 &lt;&lt; CH4_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH4_PIN);

	if(ISRcounter &lt; ch5) PORTB |= (1 &lt;&lt; CH5_PIN);
	else PORTB &amp;= ~(1 &lt;&lt; CH5_PIN);

	ISRcounter++;
}
</pre>
<p>Feel free to use the code any way you want. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2012/01/11/software-pwm-on-the-attiny13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Portable Power</title>
		<link>http://zenlogic.org/2011/11/23/more-portable-power/</link>
		<comments>http://zenlogic.org/2011/11/23/more-portable-power/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 05:00:07 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=370</guid>
		<description><![CDATA[I&#8217;m working right now on a more portable ATX power...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working right now on a more portable ATX power supply, hopefully one that can survive a rough plane ride in the cargo hold without any special attention. I&#8217;d like to inset the terminals and switch, to keep them out of harm&#8217;s way and to allow me to stack stuff on the supply.</p>
<p>I think while I&#8217;m at it I will add a LM317 variable regulator and an Adafruit <a title="Adafruit's Panel Volt Meter" href="http://www.adafruit.com/products/575">Panel Volt Meter</a> to keep an eye on the voltage of the regulator. I could even add a current-sensing resistor, though I probably won&#8217;t need it.</p>
<p>I started off intending to roll my own supply, but it turns out they don&#8217;t get much smaller than the ATXs for what those do. I like having all the separate power lines, and the overcurrent protection is priceless.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/11/23/more-portable-power/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better Starduino</title>
		<link>http://zenlogic.org/2011/09/13/a-better-starduino/</link>
		<comments>http://zenlogic.org/2011/09/13/a-better-starduino/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 05:10:02 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Starduino]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=363</guid>
		<description><![CDATA[I&#8217;ve been working on a new version of the Starduino...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a new version of the Starduino lamp. The first one, though it worked, took a long time to make. It had 50 individually wire-wrapped LEDs held at a fixed spacing with drinking straws and hot glue.</p>
<p>The new version will use thin PCBs holding surface-mount LEDs in position. Each PCB, like each drinking straw, will hold 5 LEDs, which need to be individually addressable. I found some nice flexible FR4 copper-clad on eBay, and have been working on toner-transfer etching these boards. My initial attempts failed because the toner did not fully stick, but I think I may have a fix: I have increased the amount of toner to be transferred by selecting the blank space in GIMP and shrinking the selection a bit, then filling it with black. This filler helps to balance the toner distribution on the boards, allowing the paper to adhere evenly and not peel back (which ruins the transfer).</p>
<p>Below are the panelized new boards, intended to work on 9&#8243; by 6&#8243; PCB.</p>
<div id="attachment_364" class="wp-caption alignright" style="width: 210px"><a href="http://zenlogic.org/wp-content/uploads/2011/09/9x6.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-364" title="Starduino2 9x6" src="http://zenlogic.org/wp-content/uploads/2011/09/9x6-200x300.png"  alt="Panelized Starduino2 PCBs ready for transfer." width="200" height="300" /></a><p class="wp-caption-text">Panelized Starduino2 PCBs ready for transfer.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/09/13/a-better-starduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BeeCNC Z-Axis Binding</title>
		<link>http://zenlogic.org/2011/07/12/beecnc-z-axis-binding/</link>
		<comments>http://zenlogic.org/2011/07/12/beecnc-z-axis-binding/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 15:46:53 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[BeeCNC]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=360</guid>
		<description><![CDATA[Well the BeeCNC is coming along. I have it responding...]]></description>
			<content:encoded><![CDATA[<p>Well the BeeCNC is coming along. I have it responding to gcode commands from my laptop and it seems to move alright. There is one problem: the Dremel tool is quite heavy for this scale of machine, and its weight leans the Z-axis gantry forward. This causes the gantry to &#8220;rack&#8221; on its guide rods, meaning it gets jammed at a non-upright angle, and then the motor can&#8217;t lift it.</p>
<p>While parts of the problem would be alleviated if I had tighter-fitting bushings for the Z axis, I think the main concern is weight. I am going to try adding some gentle tension springs to the gantry, to passively take weight off the lead screw and motor. Hopefully this will help keep everything moving smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/07/12/beecnc-z-axis-binding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ebike Conversion Notes</title>
		<link>http://zenlogic.org/2011/07/10/ebike-conversion-notes/</link>
		<comments>http://zenlogic.org/2011/07/10/ebike-conversion-notes/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 04:03:06 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[E-Bike]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=357</guid>
		<description><![CDATA[My brother and I are working on converting his old...]]></description>
			<content:encoded><![CDATA[<p>My brother and I are working on converting his old Diamondback mountain bike to a hybrid human/electric bicycle. We picked up some stuff from Sick Bike Parts and TNC Scooters. I thought I would post some notes on the conversion project as the process can be far from intuitive.</p>
<p>First, I thought I would make a note for posterity that the <a title="The Throttle on TNC" href="http://tncscooters.com/product.php?sku=101101">24V Throttle with LED Indicator</a> does not actually require a controller with power-status output. The throttle has four wires, and acts simply as a potentiometer. The wires are as follows:</p>
<table>
<tbody>
<tr>
<td>Throttle Wire</td>
<td>Controller Wire</td>
<td>Description</td>
</tr>
<tr>
<td>Red</td>
<td>Red*</td>
<td>+5V Power (to potentiometer)</td>
</tr>
<tr>
<td>Black</td>
<td>Black or Yellow*</td>
<td>Ground (for potentiometer and LEDs)</td>
</tr>
<tr>
<td>Green</td>
<td>Green, Blue, or White*</td>
<td>Throttle Signal Output (0-5V; potentiometer wiper)</td>
</tr>
<tr>
<td>Yellow</td>
<td>Orange or Yellow</td>
<td>Power Status. The included slip says this wire can be ignored if using a three-wire controller. However, this line simply uses a voltage directly from the battery to light a resistor divider with LEDs. Thus, you can connect the power indicator LEDs directly to the battery output, and the throttle will show the battery charge. You may want to run this through our main switch so the lights aren&#8217;t always on.</td>
</tr>
</tbody>
</table>
<p>*<strong>Note:</strong> On the Yi-Yun controller we bought, these three cables for the throttle control are labeled &#8220;dérailleur.&#8221; I can only assume it&#8217;s a translation error and that the manufacturer intended to say &#8220;throttle.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/07/10/ebike-conversion-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BeeCNC Power Supply</title>
		<link>http://zenlogic.org/2011/06/24/beecnc-power-supply/</link>
		<comments>http://zenlogic.org/2011/06/24/beecnc-power-supply/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 04:52:34 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[BeeCNC]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=342</guid>
		<description><![CDATA[The BeeCNC uses the salvaged 7V EPSON steppers, which draw...]]></description>
			<content:encoded><![CDATA[<p>The BeeCNC uses the salvaged 7V EPSON steppers, which draw about 0.7A each. I found a datasheet on <a title="The EPSON/Astrosyn Stepper Datasheet on Wrobots" href="http://www.motors.wrobots.com/EM-257_17PM-K212-PIT.php">wrobots</a>.To power everything correctly, considering the unusual 7V requirement of the motors, I designed a little power supply board myself.</p>
<div id="attachment_343" class="wp-caption alignnone" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2017.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-343 " title="BeeCNC Power Board, Solder Side" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2017-e1308976577385-224x300.jpg"  alt="BeeCNC Power Board, Solder Side" width="224" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board, Solder Side</p></div>
<div id="attachment_344" class="wp-caption alignnone" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2018.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-344 " title="BeeCNC Power Board, Component Side" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2018-e1308976623689-224x300.jpg"  alt="BeeCNC Power Board, Component Side" width="224" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board, Component Side</p></div>
<div id="attachment_345" class="wp-caption alignnone" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2019.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-345 " title="BeeCNC Power Board Assembled" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2019-e1308976689531-224x300.jpg"  alt="BeeCNC Power Board Assembled" width="224" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board Assembled</p></div>
<div id="attachment_346" class="wp-caption alignnone" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2021.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-346 " title="BeeCNC Power Board Working!" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2021-e1308976743518-224x300.jpg"  alt="BeeCNC Power Board Working!" width="224" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board Working!</p></div>
<p>To power each motor at its ideal voltage, each gets its own LM317 adjustable voltage regulator on the power board. The power board also includes a 7805 regulator for the 5V logic. It has a power switch, a big 6A diode for reverse-polarity protection, and a 5A fuse to prevent fires. Discounting the router itself (which plugs directly into the wall), the BeeCNC shouldn&#8217;t draw more than about 2.2A.</p>
<p>I decided to keep the power board separate from the logic to avoid complications in debugging and to keep the modularity of the design. Using two boards also frees me from making a whole new board, when the logic board I have seems to work fine so far.</p>
<h3>The Schematic</h3>
<div id="attachment_347" class="wp-caption alignnone" style="width: 310px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/beecnc-power-schematic-1.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-347 " title="BeeCNC Power Schematic, Version 1" src="http://zenlogic.org/wp-content/uploads/2011/06/beecnc-power-schematic-1-e1308977005691-300x198.png"  alt="BeeCNC Power Schematic, Version 1" width="300" height="198" /></a><p class="wp-caption-text">BeeCNC Power Schematic, Version 1</p></div>
<h3>The Layout</h3>
<div id="attachment_348" class="wp-caption alignnone" style="width: 254px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/component.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-348 " title="BeeCNC Power Board, Component Side" src="http://zenlogic.org/wp-content/uploads/2011/06/component-244x300.png"  alt="BeeCNC Power Board, Component Side" width="244" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board, Component Side</p></div>
<div id="attachment_350" class="wp-caption alignnone" style="width: 254px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/solder.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-350 " title="BeeCNC Power Board, Solder Side" src="http://zenlogic.org/wp-content/uploads/2011/06/solder-244x300.png"  alt="BeeCNC Power Board, Solder Side" width="244" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board, Solder Side</p></div>
<div id="attachment_349" class="wp-caption alignnone" style="width: 254px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/silk.png" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-349 " title="BeeCNC Power Board, Silkscreen" src="http://zenlogic.org/wp-content/uploads/2011/06/silk-244x300.png"  alt="BeeCNC Power Board, Silkscreen" width="244" height="300" /></a><p class="wp-caption-text">BeeCNC Power Board, Silkscreen</p></div>
<h3>The Files</h3>
<p><a href="http://zenlogic.org/wp-content/uploads/2011/06/beecnc-power.tar.gz">BeeCNC Power Board Files (v1)</a></p>
<p><a href="http://zenlogic.org/wp-content/uploads/2011/06/beecnc-power.zip">BeeCNC Power Board Files (v1)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/06/24/beecnc-power-supply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://zenlogic.org/2011/06/19/336/</link>
		<comments>http://zenlogic.org/2011/06/19/336/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 06:00:39 +0000</pubDate>
		<dc:creator>Travis ("ottobonn")</dc:creator>
				<category><![CDATA[BeeCNC]]></category>

		<guid isPermaLink="false">http://zenlogic.org/?p=336</guid>
		<description><![CDATA[A salvaged EPSON motor from an old printer serves to...]]></description>
			<content:encoded><![CDATA[<p>A salvaged EPSON motor from an old printer serves to drive one of the BeeCNC axes. Actually, I found three of them <img src='http://zenlogic.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Unfortunately, the motors have short, non-standard bolts holding them to a custom steel plate with very small threaded holes for mounting. I needed something else to mount the motors, so I set out to make some new mounting plates.</p>
<p>A trip to Home Depot found some narrow and flat sheet Aluminium just wide enough to hold the motor bolts.</p>
<div id="attachment_331" class="wp-caption alignright" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2009-e1308462113132.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-331" title="A NEMA17 Stepper from an old EPSON printer" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2009-e1308462113132-224x300.jpg"  alt="A NEMA17 Stepper from an old EPSON printer" width="224" height="300" /></a><p class="wp-caption-text">A NEMA17 Stepper from an old EPSON printer</p></div>
<h3>1: Field Measurements</h3>
<p>First, I had to get the measurements. The motor bolts were about 1-1/4&#8243; apart and were basically 4-40 size. I took off the nuts and found some nice rubber washers under there.</p>
<div id="attachment_332" class="wp-caption alignright" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2010.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-332" title="Taking the stock plate off" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2010-e1308462220533-224x300.jpg"  alt="Taking the stock plate off" width="224" height="300" /></a><p class="wp-caption-text">Taking the stock plate off</p></div>
<h3>2: Saving some parts</h3>
<p>I liked those little rubber washers, so I decided to keep them in my design. They will make the machine quieter and hold the plate tight against the nuts.</p>
<div id="attachment_334" class="wp-caption alignright" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2012.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-334" title="Salvaging the washers" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2012-e1308462271119-224x300.jpg"  alt="Salvaging the washers" width="224" height="300" /></a><p class="wp-caption-text">Salvaging the washers</p></div>
<p>The washers have little brass bushings that popped out easily.</p>
<div id="attachment_333" class="wp-caption alignright" style="width: 310px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2011.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-333" title="A custom fabbed Aluminium plate" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2011-300x224.jpg"  alt="A custom fabbed Aluminium plate" width="300" height="224" /></a><p class="wp-caption-text">A custom fabbed Aluminium plate</p></div>
<h3>3: Fabbing the replacements</h3>
<p>I cut some of the new Aluminium to length and drilled four bolt holes, a large center axle/hub hole, and two easier mounting holes off to the sides. The Aluminium was very easy to drill cleanly with a metal bit, but I didn&#8217;t have one large enough for the center hole. With some assistance holding the workpiece, I managed to use a Speedbor wood bit to carve out that large center hole.</p>
<h3>4: Reassembly</h3>
<p>With four plates made (one for each axis, and one extra) I bolted the motors back together with the rubber washers on each bolt behind the plate. Beautiful!</p>
<div id="attachment_335" class="wp-caption alignright" style="width: 234px"><a href="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2013.jpg" class="highslide" onclick="return hs.expand(this , { maxWidth: 640, maxHeight: 900, autoplay: false });"><img class="size-medium wp-image-335" title="The new plate on the motor" src="http://zenlogic.org/wp-content/uploads/2011/06/IMG_2013-e1308462611860-224x300.jpg"  alt="The new plate on the motor" width="224" height="300" /></a><p class="wp-caption-text">The new plate on the motor</p></div>
]]></content:encoded>
			<wfw:commentRss>http://zenlogic.org/2011/06/19/336/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

