<?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>Krazatchu Design Systems</title>
	<atom:link href="http://krazatchu.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://krazatchu.ca</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 14:53:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>M&#8217;Day: Low Power Motion Sensor Arduino Night Light&#8230;</title>
		<link>http://krazatchu.ca/2012/05/13/mday-low-power-motion-sensor-arduino-night-light/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mday-low-power-motion-sensor-arduino-night-light</link>
		<comments>http://krazatchu.ca/2012/05/13/mday-low-power-motion-sensor-arduino-night-light/#comments</comments>
		<pubDate>Sun, 13 May 2012 04:01:16 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Battery]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[Low power]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1415</guid>
		<description><![CDATA[A few years back I made a motion sensitive night light as a Mother&#8217;s day gift and while it worked pretty well it really chewed out the batteries.  And as with all devices that eat batteries it eventually fell out of use.  The standby current was around 4 mA due to the common LM324 opamp [...]]]></description>
				<content:encoded><![CDATA[<p>A few years back I made a motion sensitive night light as a <a href="http://en.wikipedia.org/wiki/Mother%27s_Day" target="_blank">Mother&#8217;s day</a> gift and while it worked pretty well it really chewed out the batteries.  And as with all devices that eat batteries it eventually fell out of use.  The standby current was around 4 mA due to the common LM324 opamp that was used to amplify the PIR motion sensor signal.  The original enclosure was CNC milled from a bit of re-purposed apple which had a former life as a guitar body I built as a child.  Apple happens to be my favorite wood, it&#8217;s rich and creamy and the project just needed some new electronic guts:<a href="http://krazatchu.ca/wp-content/uploads/2012/05/CNC-milled-finger-joint-Arduino-Motion-Light.jpg"><img class="alignnone  wp-image-1440" title="CNC milled finger joint Arduino Motion Light" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/CNC-milled-finger-joint-Arduino-Motion-Light.jpg" width="614" height="240" /></a></p>
<p>The new variant sports a TLC1079 micropower quad opamp from <a href="http://www.ti.com/product/tlc1079" target="_blank">TI</a> that draws just 150 microwatts per channel.  It also received  an upgrade from a Tiny13 to a Mega328p allowing for a custom Arduino bootloader spec&#8217;d for operation at 1MHz.  The upload speed was set at 62500 baud as this worked out best with the internal 8Mhz RC oscillator divided by 8.  As can be seen in the schematic below, the entire circuit forgoes a regulator and runs directly from battery.  It also includes a CDS to sense the light, a pair of RGB LEDs switched with 3 P-channel FETs and a 6 pin port to connect a USB to serial converter.  Note the DC blocking 4.7uF capacitor, non-polarized ceramic or polypropylene works best, all other parts are standard fare.  Click to view a larger image:<a href="http://krazatchu.ca/wp-content/uploads/2012/05/low-power-PIR-Arduino-RGB-Schematic.png"><img class="alignnone  wp-image-1432" title="low power PIR Arduino RGB Schematic" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/low-power-PIR-Arduino-RGB-Schematic.png" width="625" height="145" /></a></p>
<p>After the circuit was prototyped on a <a href="http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/">breadboard Arduino</a>, it was moved to a piece of predrilled strip board for quick assembly.  Not shown are the P-channel FETS which are on the original RGB LED board under copious amounts of hot glue for diffusional purposes.  The LED PCB was originally made with the toner transfer method but strip board would have sufficed just as well.  The Red PCB holding the PIR sensor had a previous life as a <a href="https://triggertrap.com/" target="_blank">TriggerTrap</a> motion sensor, there are a few components under the dome as well.  Here is the circuit board with a bit of heatshrink keeping all the arms and legs inside:<a href="http://krazatchu.ca/wp-content/uploads/2012/05/PIR-low-power-Arduino-motion-Light.jpg"><img class="alignnone  wp-image-1436" title="PIR low power Arduino motion Light" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/PIR-low-power-Arduino-motion-Light.jpg" width="614" height="220" /></a>It&#8217;s been bench tested from 5 volts down to 2.7 volts and at a nominal battery voltage of 4.5 volts, it draws just 0.08 mA in sleep mode.  This equates to over 3 years of standby from a triple set of AA batteries.  Motion detection is quite good at over 5 meters and it&#8217;s more than what&#8217;s required to keep Mom from tripping up if she gets up for a night time stroll.</p>
<p>Programming was done in the Arduino IDE and the <a href="https://github.com/n0m1/Sleep_n0m1" target="_blank">n0m1 sleep library</a> was used to shut down the microcontroller for power saving.  The device wakes from slumber when either of the external interrupts are triggered, the light sensor triggers interrupt 1 and the motion sensor triggers interrupt 0.  The code itself is very simple, the light sensor sets the mode and if the mode is nighttime, the motion sensor triggers the RGB LEDs to cycle through a color gradient using the <a href="http://krazatchu.ca/2012/01/27/colorbabel-hue-to-rgb-do-you-copy/" target="_blank">Hue to RGB</a> conversion code.  As can be seen in the following video, it takes about 10 triggers to get all the way through the gradient as each trigger shows just one primary color and a bit of secondary color:<br /> <iframe src="http://www.youtube.com/embed/T0-zNYG0B0U?rel=0" height="360" width="640" frameborder="0"></iframe></p>
<p>The Arduino sketch, schematic, custom bootloader and boards entry are neatly wrapped up in the following RAR: <a href="http://krazatchu.ca/wp-content/uploads/2012/05/n0m1.com-Arduino-PIR-Night-Light.rar">n0m1.com Arduino PIR Night Light</a><br /> And the n0m1 sleep library can be found here: <a href="https://github.com/n0m1/Sleep_n0m1" target="_blank">https://github.com/n0m1/Sleep_n0m1</a><br /> Happy Mother&#8217;s Day Mom!</p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/05/13/mday-low-power-motion-sensor-arduino-night-light/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SuperDuplex: An InfraRed Bootloader for Arduino&#8230;</title>
		<link>http://krazatchu.ca/2012/05/07/superduplex-an-infrared-bootloader-for-arduino/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=superduplex-an-infrared-bootloader-for-arduino</link>
		<comments>http://krazatchu.ca/2012/05/07/superduplex-an-infrared-bootloader-for-arduino/#comments</comments>
		<pubDate>Mon, 07 May 2012 03:53:31 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Infra Red]]></category>
		<category><![CDATA[LEDs]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1281</guid>
		<description><![CDATA[We&#8217;ve implemented an optical infrared Arduino bootloader based on the common 38kHz infrared remote modualtion.  Using the Asuro as inspiration, our bootloader goes a step further in that it works seamlessly from within the Arduino IDE, utilizing the STK500V2 protocol without modification.  As described in detail below, due to hardware specifics and a low carrier frequency, [...]]]></description>
				<content:encoded><![CDATA[<p>We&#8217;ve implemented an optical infrared Arduino bootloader based on the common 38kHz infrared remote modualtion.  Using the Asuro as inspiration, our bootloader goes a step further in that it works seamlessly from within the Arduino IDE, utilizing the STK500V2 protocol without modification.  <a href="http://krazatchu.ca/wp-content/uploads/2012/05/Arduino-Optical-IR-Bootloader.jpg"><img class="alignnone  wp-image-1373" title="Arduino Optical IR Bootloader" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/Arduino-Optical-IR-Bootloader.jpg" width="614" height="261" /></a></p>
<p>As described in detail below, due to hardware specifics and a low carrier frequency, the maximum data rate is 4200 baud and in practice about 4k baud reliably without error.  While not amazingly fast, this results in about 1 min 30 seconds to transfer a moderately large Arduino sketch of 20kb.  With the sketch loaded, the IR hardware also functions as a bidirectional half duplex serial link.  As itemized in the following list, the project as a whole is the sum of it&#8217;s parts:</p>
<blockquote>
<ul>
<li>Echo Cancellation Simplex</li>
<li>Continuous Demodulation</li>
<li>Demodulator Phase Delay</li>
<li>USB Transceiver (Software)</li>
<li>USB Transceiver (Hardware)</li>
<li>Arduino IR Transceiver</li>
<li>Arduino Bootloader</li>
<li>Board Specifications</li>
</ul>
</blockquote>
<p><strong>Echo Cancellation Simplex</strong><br /> If you&#8217;ve ever talked to someone on speakerphone and heard your own echo, you can understand the confusion this creates.  This is the issue when adapting the normally full-duplex USB converter to infrared communication, while transmitting the reflected infrared bitstream is also being heard and it stuffs up the receive buffer like a bad head cold.  To make the bootloader work seamlessly with the Arduino IDE over modulated infrared, full duplex serial operation is blocked, this is achieved on both sides with software and/or hardware.</p>
<p><strong>Continuous Demodulation</strong><br /> Almost all infrared receivers found in home appliances have an automatic gain control (AGC) circuit to account for variations in signal strength as well as ambient interference from fluorescent lights.  If your lucky, the datasheet for the part will state the maximum duty cycle for data transmission before the AGC normalizes the signal and kills the output.  From testing it appeared to be less than 5%, which is much too low to send appreciable amounts of data within a reasonable time frame.<a href="http://krazatchu.ca/wp-content/uploads/2012/05/ir-demodulator.jpg"><img class="alignnone  wp-image-1356" title="ir demodulator" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/ir-demodulator.jpg" width="614" height="128" /></a></p>
<p>Ideally we want the AGC to allow a bit over 50% or no AGC at all.  Infrared demodulators without AGC are not common but thankfully, they do exist.  Besides being specifically purposed for high volume data transmission, they also find use in sensing and light barrier systems.  A couple of these devices are the TSOP58038 and the TSOP4038 from <a href="http://www.vishay.com/ir-receiver-modules/" target="_blank">Vishay</a>.</p>
<p><strong>Demodulator Phase Delay</strong><br /> To reject ambient noise, the infrared data is modulated with a 38kHz carrier frequency, a digital one is represented as a tone and a digital zero as no tone.  When the demodulator sees the correct carrier frequency,  it outputs a digital one.  Inside the demodulator, the detection process is implemented in analog as a band pass filter and requires about 7 carrier waves to pass before it reports on the output.  It is this requirement that introduces as phase response delay of about 200 microseconds and which can be seen in the following signal capture of the transmission &#8220;Hello World&#8221;: <a href="http://krazatchu.ca/wp-content/uploads/2012/05/IR-demodulator-phase-delay1.png"><img class="alignnone  wp-image-1337" title="IR demodulator phase delay" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/IR-demodulator-phase-delay1.png" width="576" height="126" /></a></p>
<p>The red signal is the 38kHz modulated send and yellow is the demodulated receive signal.  The received signal is phase shifted right a full bit width (200us), resolution is at 1ms per division.</p>
<p><strong>USB Transceiver (Software)</strong><br /> For simplicity the computer side transceiver was first implemented in software with a spare Arduino and an IR shield.  A 120 ohm resistor is used to hold the Arduino&#8217;s reset pin high, preventing the transceiver from resetting.  It&#8217;s implemented using pinChange interrupt as a bit bang pass though, with the condition that when transmitting, the receiver is ignored.  As TTL serial signals are active low and the IR LED is active high, the transmission component is inverted.<a href="http://krazatchu.ca/wp-content/uploads/2012/05/IR-shield-and-truth-table.jpg"><img class="alignnone  wp-image-1359" title="IR shield and truth table" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/IR-shield-and-truth-table.jpg" width="614" height="185" /></a>The Arduino, the IR shield and the logical truth table to make sense of it all.</p>
<p><strong>USB Transceiver (Hardware)</strong><br /> Once the transceiver was proven in software, the design was moved into the hardware space.  This presented a couple of challenges in that the aforementioned phase delay made a logical OR difficult.  The solution was to implement a similar or longer delay on the TX line OR input.  As can be seen in the following schematic, this is implemented with a 100nF capacitor and 4k7 resistor, click for pops:  <a href="http://krazatchu.ca/wp-content/uploads/2012/05/discrete-PC-side-USB-IR-transceiver.png"><img class="alignnone  wp-image-1342" title="discrete PC side USB IR transceiver" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/discrete-PC-side-USB-IR-transceiver.png" width="625" height="150" /></a></p>
<p>The phase delay arrangement turns on quickly and turns off slowly,  adding about 2 milliseconds to block the receiver while transmitting using a bit of transistor logic.  As the signals are active low and the TX line is inverted, the gate function required for RXD is the logical OR between inverted TX and the demodulator output (refer to truth table for clarification).</p>
<p><strong>Arduino IR Transceiver</strong><br /> On the Arduino side, all that is required for additional hardware is a demodulator and an IR LED, this makes for a very cheap Arduino sans FT232R converter.  The demodulator is connected directly to the Arduino UART receiver (Pin 0).  The IR LED connection takes inspiration from the Asuro bootloader, the LEDs anode is fed with a 38kHz PWM from Pin3 while the cathode is connected to Arduino Pin1, the UART Transmitter.  As TTL serial is active low, the LED lights with the 38kHz carrier when commanded by the UART.<a href="http://krazatchu.ca/wp-content/uploads/2012/05/Arduino-with-IR-bootloader.png"><img class="alignnone  wp-image-1365" title="Arduino with IR bootloader" alt="" src="http://n0m1.com/wp-content/uploads/2012/05/Arduino-with-IR-bootloader.png" width="625" height="170" /></a>This schematic has been setup on a bread board Arduino, the basics which have been detailed in the previous post here: <a href="http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/">http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/</a></p>
<p><strong>Arduino Bootloader </strong><br /> The existing bootloader was modified for half duplex by turning off the receiver while transmitting, 38kHz PWM was setup and some delay was added to handle the phase offset of the demodulator.  Prior to making changes, some effort was required to successfully compile the bootloader as documented here: <a href="http://krazatchu.ca/2012/04/01/how-to-compiling-the-arduino-bootloader/">http://krazatchu.ca/2012/04/01/how-to-compiling-the-arduino-bootloader/</a></p>
<p>When uploading the IDE checks for the existence of the bootloader, so the hex, source and makefile need to be in the folder here: arduino-1.0hardwarearduinobootloadersIRbbArduino.  The source, hex and makefile can be downloaded here: <a href="http://krazatchu.ca/wp-content/uploads/2012/05/IRbbArduino.rar">IRbbArduino</a>.</p>
<p><strong>Board Specifications</strong><br /> The final bit of the puzzle is to let the Arduino IDE know who we are talking to.  We add a few lines of text to the end of the boards.txt file in arduino-1.0hardwarearduino.  As seen below, it defines who, what and how we are talking.  The IDE must be restarted for these changes to apply:</p>
<pre class="brush: actionscript3; gutter: true; first-line: 1">##############################################################
bbArduino.name=BreadBoard Arduino328 16MHz w/IR Bootloader@2400
bbArduino.upload.protocol=arduino
bbArduino.upload.maximum_size=30720
bbArduino.upload.speed=2400
bbArduino.bootloader.low_fuses=0xc6
bbArduino.bootloader.high_fuses=0xdd
bbArduino.bootloader.extended_fuses=0x00
bbArduino.bootloader.path=IRbbArduino
bbArduino.bootloader.file=ATmegaBOOT_168_atmega328ir.hex
bbArduino.bootloader.unlock_bits=0x3F
bbArduino.bootloader.lock_bits=0x0F
bbArduino.build.mcu=atmega328p
bbArduino.build.f_cpu=16000000L
bbArduino.build.core=arduino
bbArduino.build.variant=standard</pre>
<p><strong>Video</strong><br /> Of course no post would be complete without a video of the bootloader in action.  The autoreset feature has yet to be implemented but will include a line in the sketch to signal a reset vector on command.  For now it&#8217;s reset manually or with power on, there is about a 2 second window in which it must be reset after the IDE indicates uploading.<br /> <iframe src="http://www.youtube.com/embed/hhBlUWy1W_8?rel=0" height="480" width="640" frameborder="0"></iframe></p>
<p>As per requested in comments below, here is the code for the PC side software transceiver which runs on an Arduino.<br /> Don&#8217;t forget to disable reset with a 120 ohm pullup, otherwise the Arduino will bootload instead of passing the data along to IR.<br />  </p>
<pre class="brush: c; gutter: true; first-line: 1">/*
 n0m1 IR bootloader PC side, software based bitbang pass through

http://n0m1.com/2012/05/07/superduplex-an-infrared-bootloader-for-arduino/

 by krazatchu &amp; socialhardware - 2012/05/07

 IR Demodulator on pin 2
 IR LED on pin 3 with NPN inversion

 PC TXD on pin 1
 PC RXD on pin 0

 Reset pullup/disable using 120 ohm resistor
 Optional Red LED indictor on A1/A4
*/

#include &lt;PinChangeInt.h&gt;
boolean SerialRX = false;

void setup() {
  // dont use serial - bitbang output by turning pwm off and on

  // onboard Red LED indicator
  pinMode(A1, OUTPUT); // LED Anode
  pinMode(A4, OUTPUT); // LED Cathode

  // Disable the Timer2 Interrupt (which is used for receiving IR)
  TIMSK2 &amp;= ~_BV(TOIE2); //Timer2 Overflow Interrupt

  pinMode(3, OUTPUT); // IR TXT PWM
  digitalWrite(3, LOW); // IR TXT PWM

  // COM2A = 00: disconnect OC2A
  // COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted
  // WGM2 = 101: phase-correct PWM with OCRA as top
  // CS2 = 000: no prescaling
  TCCR2A = _BV(WGM20);
  TCCR2B = _BV(WGM22) | _BV(CS20);

  // The top value for the timer.  Mod frequency will be SYSCLOCK/2/OCR2A.
  OCR2A = 210; // SYSCLOCK / 2 / khz / 1000; = 16M /2 /38 /1000 = 210.526
  OCR2B = OCR2A / 3; // 33% duty cycle

  pinMode(0, INPUT); // Serial receiver 
  PCintPort::attachInterrupt(0, serialRXDoff, RISING);
  PCintPort::attachInterrupt(0, serialRXDon, FALLING);

  pinMode(1, OUTPUT); // serial out
  digitalWrite(1, HIGH); // 
  pinMode(2, INPUT); // IR RXR1 38kHz
  PCintPort::attachInterrupt(2, serialTXDoff, FALLING);
  PCintPort::attachInterrupt(2, serialTXDon, RISING);

}

void loop() {
 // do nothing, let interupts work
}

void serialRXDon (){
	// turn pwm on - PIN3  
	SerialRX = true;
	// or switch to in/out
	TCCR2A |= _BV(COM2B1);
	// blink (300); 
}

void serialRXDoff (){
    // turn pwm off - PIN3  
    TCCR2A &amp;= ~(_BV(COM2B1)); 
    // digitalWrite(3, LOW);
    PORTD &amp;= ~ (1&lt;&lt;PORTD3);
    SerialRX = false;
}

void serialTXDon (){
    // turn on FTDI RXD
    if(SerialRX == false){
        // led on
		PORTC &amp;= ~(1&lt;&lt;PORTC1);
        PORTD |= (1&lt;&lt;PORTD1); 
	}
}

void serialTXDoff (){
	// turn off FTDI RXD
	if(SerialRX == false){
		// led off
		PORTC |= (1&lt;&lt;PORTC1);
		PORTD &amp;= ~(1&lt;&lt;PORTD1);
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/05/07/superduplex-an-infrared-bootloader-for-arduino/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How to: Bread Board Arduino&#8230;</title>
		<link>http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-bread-board-arduino</link>
		<comments>http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 02:33:38 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[How to]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1288</guid>
		<description><![CDATA[Having a couple of Bread Board Arduinos handy can really make prototyping quick and painless.  And while the Bread Board Arduino has pretty much been flogged to death in every way, shape and horse, we&#8217;re posting our rendition as reference for future projects and yet to be released libraries.  Before we begin, here are a [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/Arduino-BreadBoard-with-USB.jpg"><img class="alignnone  wp-image-1289" title="Arduino BreadBoard with USB" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/Arduino-BreadBoard-with-USB.jpg" width="614" height="215" /></a></p>
<p>Having a couple of Bread Board Arduinos handy can really make prototyping quick and painless.  And while the Bread Board Arduino has pretty much been flogged to death in every way, shape and <em>horse</em>, we&#8217;re posting our rendition as reference for future projects and yet to be released libraries.  Before we begin, here are a few links to some of the nicer dead ponies previously referred to:</p>
<ul>
<li><a href="http://arduino.cc/en/Tutorial/ArduinoToBreadboard" target="_blank">The Arduino Reference Guide</a></li>
<li><a href="http://www.instructables.com/id/How-to-Breadboard-Arduino-Compatible/" target="_blank">Beautiful Printout Template via Instructables</a></li>
<li><a href="http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard" target="_blank">An Incredibly Detailed Assembly Guide by NYU</a></li>
</ul>
<p>For simplicity and to conserve power, our variant forgoes any and all voltage regulation.  It runs directly from 3x AA batteries where it will work reliably at 16MHz down to about 4 volts.  At 8MHz the battery voltage can safely fall to as low as 2.5 volts which is a great use for  &#8220;dead&#8221; batteries.  As indicated by the label, this specific Mega328 has it&#8217;s fuses set to the internal RC oscillator at 8MHz, the 16Mhz crystal is on the board but it&#8217;s just for show, what a poser&#8230;</p>
<p>The status LED is on Arduino pin 13, there is an SPI/ICSP connector at the top right and the USB dongle in the middle.  As we&#8217;ve been working on a modified bootloader, the ICSP connector has been seeing much use.  The USB miniboard is an in house design, it&#8217;s based on the QFN package of the FT232R and as well as having all the I/O broken out, it sports a 3/5 volt slide switch on the bottom.  The remainder of the parts are a smattering of capacitors, both bulk and bypass, as well as the reset and power switch.  Below we have the circuit diagram, roughly laid out in the bread board fashion, click to view full size:</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/Bread-Board-Arduino-Circuit1.png"><img class="alignnone  wp-image-1304" title="Bread Board Arduino Circuit" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/Bread-Board-Arduino-Circuit1.png" width="625" height="200" /></a></p>
<p>The Eagle footprint for the Mega328 is arranged as per the physical chip pins.  The library file is available here: <a href="http://krazatchu.ca/wp-content/uploads/2012/04/n0m1.com-mega328p.rar" target="_blank">n0m1.com-mega328p.rar</a>.  And the schematic in eagle format is here: <a href="http://krazatchu.ca/wp-content/uploads/2012/04/BBA-sch.rar">BBA sch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/04/30/how-to-bread-board-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On the Cheap: Supported Linear Rail&#8230;</title>
		<link>http://krazatchu.ca/2012/04/23/on-the-cheap-supported-linear-rail/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=on-the-cheap-supported-linear-rail</link>
		<comments>http://krazatchu.ca/2012/04/23/on-the-cheap-supported-linear-rail/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 01:39:45 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Motion Control]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1259</guid>
		<description><![CDATA[Supported linear rail can be quite expensive, at over $100 per rail per meter, not including shipping.  An alternative support was theorized using 3/8&#8243; threaded rod, drilled, tapped and screwed into the rail.  Today it was assembled and tested, and has now been confirmed as a valid lower cost linear rail/bearing solution.  This following method [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/cheap-supported-linear-rail-bearing.jpg"><img class="alignnone  wp-image-1260" title="cheap supported linear rail bearing" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/cheap-supported-linear-rail-bearing.jpg" width="614" height="115" /></a></p>
<p>Supported linear rail can be quite expensive, at over $100 per rail per meter, not including shipping.  An alternative support was theorized using 3/8&#8243; threaded rod, drilled, tapped and screwed into the rail.  Today it was assembled and tested, and has now been confirmed as a valid lower cost linear rail/bearing solution.  This following method required no precision equipment other than a straight edge.</p>
<p>To facilitate handling as well as semi-accurate drilling and tapping, a 2&#215;4 was notched approximately 90 degrees to carry the 25mm rail.  Strapping was placed across the rail and screwed on either side to firmly fix it.<a href="http://krazatchu.ca/wp-content/uploads/2012/04/rail-in-V-groove.jpg"><img class="alignnone  wp-image-1261" title="rail in V groove" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/rail-in-V-groove.jpg" width="614" height="152" /></a></p>
<p>With rail securely nestled in groove, it was then marked every 12cm, center-drilled for alignment, drilled to 5/16&#8243; and tapped to 3/8&#8243;.  The drilling was performed with a vise in the drill press, tapping was done with the cordless drill and was finished up by hand with a blunt tap.  No taps we&#8217;re harmed, maimed or mangled in the process, a localized anesthetic consisting mainly of 10w30 was used for the tapping process.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/tapping-linear-rail.jpg"><img class="alignnone  wp-image-1263" title="tapping linear rail" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/tapping-linear-rail.jpg" width="614" height="162" /></a></p>
<p>After blind tapping, the 3/8&#8243; threaded rod was cut to 14cm lengths and the cut ends were sanded to remove burs.  A pair of wrenches and a double nut was used to apply ample torque in securing the threaded rod into the linear shaft.  With the threaded hole being  tapered, some thread deformation occurred to make for a very solid fit.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/rod-into-rail-double-nut.jpg"><img class="alignnone  wp-image-1266" title="rod into rail double nut" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/rod-into-rail-double-nut.jpg" width="614" height="149" /></a></p>
<p>With the rails assembled, the focus then shifted to the body of the Y-axis.  A pair of thick walled 1.5&#8243; steel square channel were drilled every 12cm to match the increments in the rails.  A pair of 3/4&#8243; MDF sheets were also prepared, that along with the channel, form a torsion box structure making up the Y-axis.  As MDF is of sandwich construction, 1.5&#8243; fender washers were used as force spreaders to prevent critical surface deformation (cracks around washers).  With pressure the fender washers visibility deformed to apply a concave gradient.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/force-spreading-fender-washer.jpg"><img class="alignnone  wp-image-1268" title="force spreading fender washer" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/force-spreading-fender-washer.jpg" width="614" height="153" /></a></p>
<p>A single rail was bolted to the torsion box frame and adjusts were made with the straight edge of a level until no light could be seen between the level and the rail.  The Z-axis carriage was then added to align the second rail.  As the carriage rode from one end to the other, the second rail was tightened down to make for a parallel linear system.  No further adjusts were required, as seen in the following video the carriage rides smoothly end to end and without bind.</p>
<p><iframe src="http://www.youtube.com/embed/bGbWBDtzydw?rel=0" height="360" width="640" frameborder="0"></iframe></p>
<p>The last step is to seal the MDF from absorption of moisture for dimensional stability.  Weather permitting, this will be done with some epoxy based garage floor paint.  In perspective, this is one of three axis&#8217; making up the <a href="http://krazatchu.ca/2012/03/17/cnc-gantry-router-collecting-bits-pieces/">CNC Gantry Router</a> project.</p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/04/23/on-the-cheap-supported-linear-rail/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LocoMotion: MMA8453 with Interrupts&#8230;</title>
		<link>http://krazatchu.ca/2012/04/08/locomotion-mma8453-with-interrupts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=locomotion-mma8453-with-interrupts</link>
		<comments>http://krazatchu.ca/2012/04/08/locomotion-mma8453-with-interrupts/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 00:41:23 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Motion Control]]></category>
		<category><![CDATA[Sensors]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=942</guid>
		<description><![CDATA[In the previous post about the MMA8453_N0m1 library we talked about how to get the stream of raw XYZ data back from the accelerometer.  In this post we will be getting into some of the more advanced features of the MMA8453. The two advanced features that the MMA8453_N0m1 library breaks out for easier use are [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/02/mma8453q.jpg"><img class="alignleft  wp-image-794" title="mma8453q" alt="" src="http://n0m1.com/wp-content/uploads/2012/02/mma8453q.jpg" width="614" height="190" /></a>In the <a href="http://krazatchu.ca/2012/02/12/shake-rattle-roll-the-mma8453q-arduino/" target="_blank">previous post</a> about the MMA8453_N0m1 library we talked about how to get the stream of raw XYZ data back from the accelerometer.  In this post we will be getting into some of the more advanced features of the MMA8453.</p>
<p>The two advanced features that the MMA8453_N0m1 library breaks out for easier use are the interrupt motion detection, and the interrupt shake detection.  Now motion and shake sound like the same things, but in fact they are slightly different.  What motion detection does is allows you to detect any type of motion above a certain force threshold.  While shake is more specific and allows for only detecting sharp fast motion, by using a highpass filter to remove gentler smoother rolling motions.  The library includes 1 example for each feature.  However the way the library is designed, the two features are used in a very similar manner so we will only cover one here.</p>
<p>So lets assume you have the library and circuit still setup from the <a title="Shake, Rattle &amp; Roll: The MMA8453Q &amp; Arduino" href="http://krazatchu.ca/2012/02/12/shake-rattle-roll-the-mma8453q-arduino/">previous post</a> on the MMA8453_N0m1 lib.  The example we will be explaining is the shake example, because its ever so slightly more complex than the motion.  Though really its almost identical.  After making the library object just as before, the first thing you will do is initialize the library in the arduino setup() function, with the following function call:</p>
<pre class="brush: cpp; gutter: true; first-line: 1">accel.shakeMode(32,true,true,true,false,2);</pre>
<p>So the first parameter in this function, which is currently set at &#8220;32&#8243;  the shake detection acceleration force threshold, which is a value between 0-127.  This value is calculated through a simple formula as follows.  The gravitational threshold you desire divided by 0.063.  So for example in the above line we do this: 2g/ 0.063g = 31.746, and since the parameter is an int, lets round that value to 32.</p>
<p>The next 3 parameters are just enabling each axis for shake detection; listed X, Y, Z.  So if your project only needs to detect a shaking motion over 1 axis you can disable the others.</p>
<p>The second last parameter is a boolean to enable one of the INT pins on the MMA8453. So, to put it simply, True = pin 2, False = pin1.</p>
<p>The last parameter is to set the Arduino interrupt pin number.  In this example we are setting it to pin 2.  However you could set this to any interrupt pin you have available.  Included in the example folder is an example that uses pin change interrupt to use a non standard interrupt pin.  After that you are pretty much done.  There are just a few simple lines left to add:</p>
<pre class="brush: cpp; gutter: true; first-line: 1">accel.update();

  if(accel.shake())
  {

    if(accel.shakeAxisX()) //X
    {
      Serial.println("Shake X");
    }
  }</pre>
<p>You must call the update function at the top of the loop().  The shake function returns true or false if shake is detected, and the shakeAxisX(), shakeAxisY(), shakeAxisZ() functions will return true if a particular axis is shaken. That&#8217;s all there is to it!  The motion functions are almost identical except it will only return whether or not there is motion, not which axis is in motion.  Well I tried to make it more complex, then the <a href="http://krazatchu.ca/2012/02/12/shake-rattle-roll-the-mma8453q-arduino/">previous post</a>.  That formula had you sweating, didn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/04/08/locomotion-mma8453-with-interrupts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to: Compiling the Arduino Bootloader&#8230;</title>
		<link>http://krazatchu.ca/2012/04/01/how-to-compiling-the-arduino-bootloader/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-compiling-the-arduino-bootloader</link>
		<comments>http://krazatchu.ca/2012/04/01/how-to-compiling-the-arduino-bootloader/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 02:49:13 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[How to]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1136</guid>
		<description><![CDATA[A project we&#8217;ve been recently working on requires a custom Arduino boot loader.  Working in an incremental fashion, the first step is getting the stock Arduino boot loader to compile with the latest WinAVR libraries and current Arduino 1.0 IDE.  While this wasn&#8217;t terribly difficult, it did require a bit of searching, debugging, testing and [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/command-prompt.jpg"><img class="wp-image-1137 alignnone" title="command prompt" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/command-prompt.jpg" width="516" height="209" /></a><br />A project we&#8217;ve been recently working on requires a custom Arduino boot loader.  Working in an incremental fashion, the first step is getting the stock Arduino boot loader to compile with the latest WinAVR libraries and current Arduino 1.0 IDE.  While this wasn&#8217;t terribly difficult, it did require a bit of searching, debugging, testing and then a bit more debugging before it worked as intended.  Presented here for your convenience, are the fruits of this labor, outlined are the following steps:</p>
<ol>
<li>Download the latest Arduino IDE &#8211; 1.0</li>
<li>Modify the boot loader source</li>
<li>Modify the makefile</li>
<li>Compile in command prompt</li>
</ol>
<p><strong><br /> Step 1: Download the latest Arduino IDE &#8211; 1.0</strong><br /> The latest Arduino IDE, version 1.0 can be downloaded directly here: <a href="http://arduino.googlecode.com/files/arduino-1.0-windows.zip" target="_blank">http://arduino.googlecode.com/files/arduino-1.0-windows.zip</a><br /> The complete package is an 86MB zip that unpacks to about 240 MB.<br /> You can also locate the specific files in the <a href="https://github.com/arduino/Arduino" target="_blank">Github Arduino repository</a>.</p>
<p>Once you&#8217;ve downloaded and unzipped it, navigate to the bootloaders folder at the following path in Windows:  <em>arduino-1.0hardwarearduinobootloaders</em>.  On the Mac, the path is <em>/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/</em>.  For purposes of testing, I&#8217;ve made a new folder here called: <em>atmega168test</em>.  And populated the new test folder with the two files <em>ATmegaBOOT_168.c</em> and <em>Makefile</em> from the folder <em>atmega</em>.</p>
<p>For programming under Windows, I prefer to use Programmers Notepad 2, an open source editor with syntax highlighting for many common languages (it makes the words pretty colors).  You can download it here: <a href="http://www.pnotepad.org/" target="_blank">http://www.pnotepad.org/</a>.  Windows Notepad or any other text editor will also suffice.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/Programmers-Notepad.jpg"><img class="wp-image-1143 alignnone" title="Programmers Notepad" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/Programmers-Notepad.jpg" width="509" height="187" /></a></p>
<p><strong><br /> Step 2: Modify the boot loader source</strong><br /> The first (and only) compiler error we will tackle is due to the EEWE bit definition missing in versions 1.6.7 and newer of the file /<em>avr</em>/<em>eeprom.h.</em>  The actual compiler error reads as:</p>
<p style="padding-left: 30px;"><em>ATmegaBOOT_168.c: In function &#8216;main&#8217;:</em><br /> <em> ATmegaBOOT_168.c:596:11: error: &#8216;EEWE&#8217; undeclared (first use in this function)</em><br /> <em> ATmegaBOOT_168.c:596:11: note: each undeclared identifier is reported only once for each function it appears in</em><br /> <em> make: *** [ATmegaBOOT_168.o] Error 1</em></p>
<p>This <a href="http://code.google.com/p/arduino/issues/detail?id=152&amp;q=eewe" target="_blank">EEWE issue (152)</a> has been around for a while and was originally reported in 2009.  Within the source file <em>ATmegaBOOT_168.c</em>, around line 584, we will comment out the old and add in the new:</p>
<p><code></p>
<pre class="brush: actionscript3; gutter: true; first-line: 584">// ?kraz? -fixed EEWE bit definition missing in versions 1.6.7 and newer of the file /avr/eeprom.h
// According to this issue reported in 2009: http://code.google.com/p/arduino/issues/detail?id=152&amp;q=eewe
#if defined(EEPE)
				while(bit_is_set(EECR,EEPE));			//Wait for previous EEPROM writes to complete
#else
				while(bit_is_set(EECR,EEWE));			//Wait for previous EEPROM writes to complete
#endif

/*
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
				while(bit_is_set(EECR,EEPE));			//Wait for previous EEPROM writes to complete
#else
				while(bit_is_set(EECR,EEWE));			//Wait for previous EEPROM writes to complete
#endif
*/</pre>
<p></code></p>
<p>And don&#8217;t forget to save the file!</p>
<p><strong><br /> Step 3: Modify the makefile</strong><br /> Now that we have the bootloader fixed, it does compile without error, but it ends up larger than the 2k space allocation for the bootloader section of the MCUs flash.  The easiest solution here is to bump the compiler optimization level up to <em>-0s</em>.  This is in the makefile on line 52, beware the makefile isn&#8217;t C language, it uses the # operator to comment out a line:</p>
<pre class="brush: actionscript3; gutter: true; first-line: 52"># ?kraz? - changed opt level to fit under 2k
OPTIMIZE   = -Os
# OPTIMIZE   = -O2</pre>
<p><strong><br /> Step 4: Compile in command prompt<br /> </strong>The final step is to compile, under Windows we will be using the command prompt.  The location of command prompt will depend on your version of Windows, in 7 it can be found by typing the first few letters of command in the search box of the start menu.  Once it&#8217;s open, use the <em>&#8220;CD&#8221;</em> command navigate to the bootloader folder of your Arduino install as seen below in Windows, like this:</p>
<p style="padding-left: 30px;"><em>cd C:arduino-1.0hardwarearduinobootloadersatmega168test</em></p>
<p>And on the Mac, like this:</p>
<p style="padding-left: 30px;"><em>cd /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/atmega168test</em></p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/04/cmd-pmpt-navigate.jpg"><img class="wp-image-1168 alignnone" title="cmd pmpt navigate" alt="" src="http://n0m1.com/wp-content/uploads/2012/04/cmd-pmpt-navigate.jpg" width="518" height="149" /></a></p>
<p>We then compile with the command <em>&#8220;make pro8&#8243;</em>, which specifies the target board, in this case it&#8217;s an Mega168 clocked at a relaxing 8Mhz.  Other board target definitions can be found listed in the makefile, such as diecimila, lilypad, ng, atmega328_pro8, mega, etc.   If the hex already exists in the folder, you will get a message <em>make: Nothing to be done for `pro8&#8242;.</em>  In this case just delete the hex and compile again with <em>&#8220;make pro8&#8243;</em>.  If everything went alright, you should see the compiler report as in the first image at the top of this post.  Good luck and happy compiling!</p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/04/01/how-to-compiling-the-arduino-bootloader/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SiC LED: Half the cost, same great taste&#8230;</title>
		<link>http://krazatchu.ca/2012/03/30/sic-led-half-the-cost-same-great-taste/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sic-led-half-the-cost-same-great-taste</link>
		<comments>http://krazatchu.ca/2012/03/30/sic-led-half-the-cost-same-great-taste/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 01:04:09 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[LEDs]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1094</guid>
		<description><![CDATA[NoMi Design&#8217;s northern lab recently received some next generation gallium-nitride on silicon carbide LEDs.  These new XBD series LEDs from Cree are promising double the lumen per dollar of existing technologies.  From what we gather, the reduced cost is a result of a smaller die (2.45 mm²) and the silicon carbide base allowing higher manufacturing [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/03/leds-banner.jpg"><img class="wp-image-1103 alignnone" title="leds banner" alt="" src="http://n0m1.com/wp-content/uploads/2012/03/leds-banner.jpg" width="614" height="85" /></a></p>
<p>NoMi Design&#8217;s northern lab recently received some next generation gallium-nitride on silicon carbide LEDs.  These new XBD series LEDs from Cree are promising double the lumen per dollar of existing technologies.  From what we gather, the reduced cost is a result of a smaller die (2.45 mm²) and the silicon carbide base allowing higher manufacturing yields by way of better thermal expansion matching.  The four above on the left are the XBD SiC LEDs, for comparison, the two on the right are a slightly larger (3.45 mm²) and more powerful Cree XBG.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/03/LEDs-XBD-XBG-.jpg"><img class="wp-image-1099 alignnone" title="LEDs XBD XBG" alt="" src="http://n0m1.com/wp-content/uploads/2012/03/LEDs-XBD-XBG-.jpg" width="542" height="120" /></a></p>
<p>As seen on left the new SiC LEDs sport an XBox logo, copyright lawsuit expected in 3, 2, 1 &#8230;  This specific R3 binned XBG (right) is rated for 406 lumen at 1.5 Amps and the R2 binned SiC XBD (left) is rated for 252 lumen at 1 Amp.  Some modification of a Cree 7090 star was required to heatsink these tiny LEDs.  A bit of cutting, followed by application of Pb free solder paste and then into the toaster on high for about 5 minutes resulted in some baked goodness, crunchy on the outside but still chewy inside.</p>
<p><a href="http://krazatchu.ca/wp-content/uploads/2012/03/toasted-led.jpg"><img class="wp-image-1109 alignnone" title="toasted led" alt="" src="http://n0m1.com/wp-content/uploads/2012/03/toasted-led.jpg" width="461" height="127" /></a></p>
<p>Next up is the characterization curves, where we can see the SiC LED has a higher forward voltage for equal current when compared to the XBG.  With these new SiC LEDs offering up a much better lumen per dollar it won&#8217;t be long before they start showing up everywhere&#8230;<a href="http://krazatchu.ca/wp-content/uploads/2012/03/led-graph1.jpg"><img class="wp-image-1126 alignnone" title="led graph" alt="" src="http://n0m1.com/wp-content/uploads/2012/03/led-graph1.jpg" width="542" height="195" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/03/30/sic-led-half-the-cost-same-great-taste/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CNC Half Nuts: The Smell of Melting Plastic&#8230;</title>
		<link>http://krazatchu.ca/2012/03/24/cnc-half-nuts-the-smell-of-melting-plastic/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cnc-half-nuts-the-smell-of-melting-plastic</link>
		<comments>http://krazatchu.ca/2012/03/24/cnc-half-nuts-the-smell-of-melting-plastic/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 20:12:33 +0000</pubDate>
		<dc:creator>krazatchu</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Motion Control]]></category>

		<guid isPermaLink="false">http://n0m1.com/?p=1072</guid>
		<description><![CDATA[After cutting down the Y axis screw for the CNC gantry router project we had a short piece of 3/4 inch Acme leadscrew remaining that was just long enough to drive the Z-axis.  Buying an ACME tap to make a single nut was out of the question as they are normally over $100.  So we [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://krazatchu.ca/wp-content/uploads/2012/03/half-nuts.jpg"><img class="alignleft  wp-image-1075" title="half nuts" alt="" src="http://n0m1.com/wp-content/uploads/2012/03/half-nuts.jpg" width="614" height="161" /></a></p>
<p>After cutting down the Y axis screw for the <a href="http://krazatchu.ca/2012/03/17/cnc-gantry-router-collecting-bits-pieces/">CNC gantry router</a> project we had a short piece of 3/4 inch Acme leadscrew remaining that was just long enough to drive the Z-axis.  Buying an ACME tap to make a single nut was out of the question as they are normally over $100.  So we set about heat forming a threaded nut from some bits of scrap <a href="http://en.wikipedia.org/wiki/Ultra-high-molecular-weight_polyethylene" target="_blank">UHMWPE </a>(Ultra High Molecular Weight Poly Ethylene).  We made the nut in two halves with the intention of  shimming them in the final build, this will allow for slight adjustment while keeping backlash under control.  According to Wikipedia, UHMWPE has a melting point of around 145°C and a co-efficient of friction that approaches Teflon.  Up next is short video of the thread forming followed by some drive testing with the cordless drill.<br /> <iframe src="http://www.youtube.com/embed/LlRrj6_2CYA?rel=0" height="360" width="640" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://krazatchu.ca/2012/03/24/cnc-half-nuts-the-smell-of-melting-plastic/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
