<?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>Voiding Warranties</title>
	<atom:link href="http://www.voidingwarranties.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.voidingwarranties.com</link>
	<description>Taking Apart Gadgets and Building New Ones</description>
	<lastBuildDate>Sun, 11 Dec 2011 16:51:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Accurate LED Timing Circuit for Measuring Camera Response</title>
		<link>http://www.voidingwarranties.com/2011/11/accurate-led-timing-circuit-for-measuring-camera-response/</link>
		<comments>http://www.voidingwarranties.com/2011/11/accurate-led-timing-circuit-for-measuring-camera-response/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 06:20:26 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Eagle]]></category>
		<category><![CDATA[PCB]]></category>

		<guid isPermaLink="false">http://www.voidingwarranties.com/?p=127</guid>
		<description><![CDATA[A friend wanted to measure the linearity of his CCD camera, and asked for my help. He needed to measure linearity to 0.1% and wanted to do so by exposing the CCD sensor to a constant light source for varying &#8230; <a href="http://www.voidingwarranties.com/2011/11/accurate-led-timing-circuit-for-measuring-camera-response/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/36306782@N03/6493304147/" title="LED timer eagle to board by Voiding Warranties, on Flickr"><img src="http://farm8.staticflickr.com/7159/6493304147_1179e83ce3.jpg" width="500" height="485" alt="LED timer eagle to board"></a><br />
A friend wanted to measure the linearity of his CCD camera, and asked for my help. He needed to measure linearity to 0.1% and wanted to do so by exposing the CCD sensor to a constant light source for varying time intervals. To decrease the effect of <a href="http://en.wikipedia.org/wiki/Dark_current_(physics)" target="_blank">dark current</a>, the smallest time interval needed to be extremely short, shorter than the shutter of the camera could achieve. Instead he asked if I could design a circuit to accurately turn on and off an LED, allowing the CCD sensor to be exposed for a much shorter interval than the shutter is capable of.</p>
<p>To measure the camera response to 0.1%, a range of 1000:1 is needed. This requires at least a 10 bit counter (2^10 = 1024). A constant current source is required to drive the LED so that its luminosity is constant. With those specifications in mind, I came up with a design.</p>
<p><span id="more-127"></span></p>
<h3>Parts:</h3>
<ul>
<li><a href="http://search.digikey.com/us/en/products/ATTINY2313A-SU/ATTINY2313A-SU-ND/2238278" target="_blank">ATTiny2313</a> (slightly overkill)</li>
<li><a href="http://search.digikey.com/us/en/products/LM317MBSTT3G/LM317MBSTT3GOSCT-ND/1967052" target="_blank">LM317 voltage regulator</a> (acting as constant current source)</li>
<li><a href="http://search.digikey.com/us/en/products/LM340MP-5.0%2FNOPB/LM340MP-5.0CT-ND/270747" target="_blank">LM340 5V regulator</a></li>
<li><a href="http://search.digikey.com/us/en/products/MMBT3904/MMBT3904FSCT-ND/458971" target="_blank">2N3904 NPN transistor</a></li>
<li><a href="http://search.digikey.com/us/en/products/3250W-1-102/3250W-102-ND/83791" target="_blank">1KΩ 25 turn trimpot</a></li>
<li><a href="http://search.digikey.com/us/en/products/RC1206FR-0710KL/311-10.0KFRCT-ND/731430" target="_blank">10KΩ resistor</a></li>
<li><a href="http://search.digikey.com/us/en/products/C1206C104K5RACTU/399-1249-1-ND/411524" target="_blank">0.1μF cap</a></li>
<li><a href="http://search.digikey.com/us/en/products/C1206C224K5RACTU/399-1251-1-ND/411526" target="_blank">0.22μF cap</a></li>
<li><a href="http://search.digikey.com/us/en/products/208-10/CT20810-ND/20803" target="_blank">10 position DIP switch</a></li>
<li>DC power jack</li>
<li>2 position screw terminal</li>
<li>3 x 2 header</li>
</ul>
<h3>Schematic and Board:</h3>
<p>This was my first time using <a href="http://www.cadsoftusa.com/eagle-pcb-design-software/product-overview/" target="_blank">Eagle</a>, but thanks to <a href="http://www.sparkfun.com/tutorials/108" target="_blank">Sparkfun&#8217;s tutorials</a> it was easy. Links to Eagle files are at the end of the post. I used <a href="http://dorkbotpdx.org/wiki/pcb_order" target="_blank">DorkbotPDX&#8217;s PCB service</a> to order the boards. The price was amazing, only $10.85 (that includes shipping!) for three double-sided 1.6&#8243;x1.4&#8243; PCBs.<br />
<a title="LED timer schematic by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6361253433/"><img src="http://farm7.staticflickr.com/6046/6361253433_3a923061d5.jpg" alt="LED timer schematic" width="500" height="271" /></a><br />
<a href="http://www.flickr.com/photos/36306782@N03/6366304533/" title="board front by Voiding Warranties, on Flickr"><img src="http://farm7.staticflickr.com/6232/6366304533_c8773a17bc_m.jpg" width="240" height="161" alt="board front"></a>      <a href="http://www.flickr.com/photos/36306782@N03/6366303403/" title="board back by Voiding Warranties, on Flickr"><img src="http://farm7.staticflickr.com/6120/6366303403_f8904e3db5_m.jpg" width="240" height="161" alt="board back"></a><br />
<a href="http://www.flickr.com/photos/36306782@N03/6366307135/" title="board populated front by Voiding Warranties, on Flickr"><img src="http://farm7.staticflickr.com/6057/6366307135_4ea4ed43ec_m.jpg" width="240" height="161" alt="board populated front"></a>      <a href="http://www.flickr.com/photos/36306782@N03/6366305849/" title="board populated back by Voiding Warranties, on Flickr"><img src="http://farm7.staticflickr.com/6060/6366305849_e1f182ddee_m.jpg" width="240" height="161" alt="board populated back"></a></p>
<h3>Code:</h3>
<div style="border:1px solid gray;">
<pre class="brush: cpp; title: main.c; notranslate">
/*Attiny2313 LED timer
 *V1.0
 *Jordan Horwich
 */

#include &lt;avr/io.h&gt;
#include &lt;avr/interrupt.h&gt;

uint16_t initialDelay = 0xffff; //initial delay before LED turns on. Used for convenience.
volatile int var = 0;
uint16_t top = 0x0000;

uint8_t input = 0x00;

uint8_t i;
uint16_t k;

int main(void)
{
  cli(); //disable global interrupts
  TCCR1B |= 1&lt;&lt;CS11 | 1&lt;&lt;CS10; //divide clock by 64
  TCCR1B |= 1&lt;&lt;WGM12; //put Timer/Counter1 in CTC mode
  OCR1A = initialDelay; //initial delay, default 2^16 cycles, or ~4 seconds
  TIMSK |= 1&lt;&lt;OCIE1A; //enable timer compare interrupt

  DDRD |= (1&lt;&lt;4); //set PortD Pin4 as an output
  PORTB |= (1&lt;&lt;7)|(1&lt;&lt;6)|(1&lt;&lt;5)|(1&lt;&lt;4)|(1&lt;&lt;3)|(1&lt;&lt;2)|(1&lt;&lt;1)|(1&lt;&lt;0); //enable internal pull-up resistor on DIP switch inputs
  PORTD |= (1&lt;&lt;6)|(1&lt;&lt;5); //enable internal pull-up resistor on DIP switch inputs

  //read and store DIP switch values
  i = ~PINB;
  k = (i&lt;&lt;2);
  if((PIND &amp; _BV(PD6)) == 0) {
    k |= (1&lt;&lt;1);
  }
  if((PIND &amp; _BV(PD5)) == 0) {
    k |= (1&lt;&lt;0);
  }
  top |= (k&lt;&lt;6); //scales 16-bits to 10-bits by shifting k 6 places left

  sei(); //enable global interupts

  while(1) {
  }
}

ISR(TIMER1_COMPA_vect) //Interrupt Service Routine
{
  PORTD ^= (1&lt;&lt;4); //xor toggles LED
  OCR1A = top;
  if(var == 1) {
    TCCR1B &amp;= ~0x07;
  }
  else {
    var++;
  }
}
</pre>
</div>
<p>&nbsp;<br />
The 10 position DIP switch is used to input the desired LED on-time in binary. Each position represents a bit with bit-0 on the far right closest to the power jack. The current is set from 1mA to 500mA by adjusting the trimpot. As the code only reads the DIP switch once when the ATTiny first powers on, DIP switch is changed and then the reset button is pressed to change the time interval. This becomes very tedious if you need to cycle through all 1024 values. The code could be rewritten so that the time interval value is stored in the EEPROM and is automatically incremented after every reset. The ATTiny&#8217;s clocks and counters are set such that the shortest time interval is 0.004096 seconds, and the longest time interval is 4.194304 seconds (0.004096 * 1024).</p>
<h3>Results:</h3>
<p><iframe src="http://player.vimeo.com/video/32385969?title=0&amp;byline=0&amp;portrait=0" width="490" height="368" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe><br />
The first interval tested in the video is 1111111111, or about 4.19 seconds. The next is 01111111 (~2.10 seconds), then 0011111111 (~1.05 seconds), then 0001111111 (~0.52 seconds), and I think you can figure out the rest.</p>
<h3>Files:</h3>
<ul>
<li><a href="http://www.voidingwarranties.com/wordpress/wp-content/uploads/LED-timer.zip">Eagle schematic, Eagle board, main.c and makefile (zip)</a></li>
</ul>
<p><a href="http://www.flickr.com/photos/36306782@N03/sets/72157628045530815/">See more pictures of this project on <strong style="color: #3993ff;">flick<span style="color: #ff1c92;">r</span></strong>.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidingwarranties.com/2011/11/accurate-led-timing-circuit-for-measuring-camera-response/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPod Speakers</title>
		<link>http://www.voidingwarranties.com/2009/01/ipod-speakers/</link>
		<comments>http://www.voidingwarranties.com/2009/01/ipod-speakers/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 22:00:21 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[PCB]]></category>

		<guid isPermaLink="false">http://www.voidingwarranties.com/?p=88</guid>
		<description><![CDATA[I had a broken first generation iPod lying around and wanted to do something with it other than let it collect dust. Since iPods have become a staple of music, I decided I would turn it into a portable speaker. As &#8230; <a href="http://www.voidingwarranties.com/2009/01/ipod-speakers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="ipod-speaker-with-screen by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338950217/"><img class="alignleft" src="http://farm7.static.flickr.com/6117/6338950217_fcd51cb45e_m.jpg" alt="ipod-speaker-with-screen" width="193" height="240" /></a>I had a broken first generation iPod lying around and wanted to do something with it other than let it collect dust. Since iPods have become a staple of music, I decided I would turn it into a portable speaker.</p>
<p>As I thought about it more, I realized an iPod would make a perfect speaker. The headphone jack could be the audio input, the hold switch could be the power switch, and the scroll wheel is the perfect size and shape for a speaker.<br />
<span id="more-88"></span></p>
<h3>Parts:</h3>
<ul>
<li>2.25 inches (diameter) speaker</li>
<li>switch</li>
<li>mono audio jack</li>
<li><a href="http://www.radioshack.com/product/index.jsp?productId=3064080" target="_blank">10kΩ potentiometer</a></li>
<li>10μF capacitor</li>
<li><a href="http://www.instructables.com/id/Altoids-Tin-Speaker/" target="_blank">Altoid Tin Amplifier</a></li>
<li>gutted iPod</li>
</ul>
<p><a title="speakers by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338938349/"><img style="border: 1px solid black;" src="http://farm7.static.flickr.com/6106/6338938349_96bce324f2_s.jpg" alt="speakers" width="75" height="75" /></a> <a title="switch-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338948977/"><img style="border: 1px solid black;" src="http://farm7.static.flickr.com/6213/6338948977_612d748700_s.jpg" alt="switch-2" width="75" height="75" /></a> <a title="potentiometer-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6339700206/"><img style="border: 1px solid black;" src="http://farm7.static.flickr.com/6213/6339700206_538e2e020f_s.jpg" alt="potentiometer-2" width="75" height="75" /></a> <a title="ipod-shell-3 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338948581/"><img style="border: 1px solid black;" src="http://farm7.static.flickr.com/6044/6338948581_b3798b5699_s.jpg" alt="ipod-shell-3" width="75" height="75" /></a></p>
<h3>Construction:</h3>
<p>I attached the power switch, audio jack, and potentiometer with epoxy and hot glue, using white credit card plastic to cover any gaps. Following the advice of a comment on the <a href="http://www.instructables.com/id/Altoids-Tin-Speaker/">Altoid Tin Amplifier Instructable</a> for gain control, I connected one pin of the potentiometer to pin 8 of the LM386 and the other pin of the potentiometer to the 10μF capacitor, and the other pin of the capacitor to pin 1 of the LM386.<br />
<a title="screw-holes-cut by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338939777/"><img src="http://farm7.static.flickr.com/6220/6338939777_ec8e0967d6_m.jpg" alt="screw-holes-cut" width="240" height="161" /></a>      <a title="potentiometer-no-plastic by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6339702228/"><img src="http://farm7.static.flickr.com/6236/6339702228_e9f5efc053_m.jpg" alt="potentiometer-no-plastic" width="240" height="161" /></a></p>
<p>Then I glued in battery contact springs and fit the speaker. Luckily the width of the iPod is perfect for a AA battery.<br />
<a title="battery by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6339696252/"><img src="http://farm7.static.flickr.com/6119/6339696252_3ecdfa830a_m.jpg" alt="battery" width="240" height="161" /></a>      <a title="ipod-speaker-no-amp by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338940561/"><img src="http://farm7.static.flickr.com/6237/6338940561_dcaf67b0f0_m.jpg" alt="ipod-speaker-no-amp" width="240" height="161" /></a></p>
<p>Then I assembled the Altoid Tin Amplifier. This was my first time etching a PCB and I was delighted with the result. I used the <a href="http://hackaday.com/2008/07/28/how-to-etch-a-single-sided-pcb/">toner transfer method</a> to print the design on the PCB, and ferric chloride to remove the unwanted copper.<br />
<a title="speaker-amp by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338936157/"><img src="http://farm7.static.flickr.com/6115/6338936157_4f148c89bf_m.jpg" alt="speaker-amp" width="240" height="161" /></a>      <a title="speaker-amp-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338949907/"><img src="http://farm7.static.flickr.com/6054/6338949907_12e25a976e_m.jpg" alt="speaker-amp-2" width="240" height="164" /></a></p>
<p>After soldering everything I turned it on and&#8230; success! It works and is surprisingly loud for such a small speaker.<br />
<a title="ipod-speaker-with-amp by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338947065/"><img src="http://farm7.static.flickr.com/6119/6338947065_f996c45fb3.jpg" alt="ipod-speaker-with-amp" width="500" height="334" /></a></p>
<p><a title="finished-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338949539/"><img src="http://farm7.static.flickr.com/6046/6338949539_7594b4668d.jpg" alt="finished-2" width="500" height="417" /></a></p>
<p><a title="finished by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6339700706/"><img src="http://farm7.static.flickr.com/6041/6339700706_39bfae1d0c.jpg" alt="finished" width="500" height="277" /></a></p>
<p>I liked the final result so much that I built another one! I didn&#8217;t have another broken iPod, but I was able to buy the front and back panels from <a href="http://www.welovemacs.com/1106frontpanel.html" target="_blank">WeLoveMacs.com</a>. When I received the panels I was happy to see a &#8220;warranty void if removed&#8221; sticker. I couldn&#8217;t resist.<br />
<a title="back-panel-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6339679746/"><img src="http://farm7.static.flickr.com/6211/6339679746_a54db74e2e_m.jpg" alt="back-panel-2" width="240" height="161" /></a>      <a title="warranty-sticker by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338929169/"><img src="http://farm7.static.flickr.com/6218/6338929169_8ea715ec80_m.jpg" alt="warranty-sticker" width="240" height="161" /></a></p>
<p><a title="ipod-speakers by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338947629/"><img src="http://farm7.static.flickr.com/6230/6338947629_97cde38d36.jpg" alt="ipod-speakers" width="500" height="334" /></a></p>
<p><a href="http://www.flickr.com/photos/36306782@N03/sets/72157628115627972/">See more pictures of this project on <strong style="color: #3993ff;">flick<span style="color: #ff1c92;">r</span></strong>.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidingwarranties.com/2009/01/ipod-speakers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rocket Camera</title>
		<link>http://www.voidingwarranties.com/2008/11/rocket-camera/</link>
		<comments>http://www.voidingwarranties.com/2008/11/rocket-camera/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 19:51:08 +0000</pubDate>
		<dc:creator>Jordan</dc:creator>
				<category><![CDATA[Rockets]]></category>

		<guid isPermaLink="false">http://www.voidingwarranties.com/wordpress/?p=46</guid>
		<description><![CDATA[A few years ago I attempted to put a camera in a small rocket. I had always had the idea in the back of my head, but I never knew how to do it. As soon as I saw this Make &#8230; <a href="http://www.voidingwarranties.com/2008/11/rocket-camera/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/32010599?title=0&amp;byline=0&amp;portrait=0" frameborder="0" width="400" height="300"></iframe></p>
<p>A few years ago I attempted to put a camera in a small rocket. I had always had the idea in the back of my head, but I never knew how to do it. As soon as I saw this <a href="http://www.make-digital.com/make/vol07/?folio=78" target="_blank">Make Magazine article</a> I knew I had to try.</p>
<p><span id="more-46"></span>I mostly followed the advice in the Make article. The major problem I encountered was what camera to use. I didn&#8217;t want to risk damaging anything expensive, so I opted to use a $30 CVS &#8220;one-time-use&#8221; video camera. The <a href="http://camerahacks.10.forumer.com/" target="_blank">Camera Hacks forum</a> has useful information to get around CVS&#8217;s security and make the camera reusable.</p>
<p>I removed everything but he bare essentials of the camera to reduce its weight. Following the instructions on the Camera Hacks forum, I soldered headers onto the camera for a USB connection.<br />
<a title="camera-4 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6337427093/"><img src="http://farm7.static.flickr.com/6043/6337427093_3466a0178d.jpg" alt="camera-4" width="500" height="334" /></a></p>
<p>I attached the camera to the rocket by gluing standoffs into the nose cone, and screwing the camera into the standoffs.<br />
<a title="nose-cone-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6337419725/"><img src="http://farm7.static.flickr.com/6037/6337419725_368d5cf700_m.jpg" alt="nose-cone-2" width="240" height="161" /></a> <a title="camera-installed by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338180568/"><img src="http://farm7.static.flickr.com/6032/6338180568_392f8a9f79_m.jpg" alt="camera-installed" width="240" height="161" /></a></p>
<p>With the help of <a href="http://www.jbgizmo.com/page27.htm" target="_blank">jbgizmo.com</a> I built a cheap lightweight altimeter that uses a pressure transducer to calculate altitude.<br />
<a title="altimeter-2 by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338187888/"><img src="http://farm7.static.flickr.com/6213/6338187888_4996388e23.jpg" alt="altimeter-2" width="500" height="202" /></a></p>
<p>With a hole drilled in the nose cone the final result looks like this.<br />
<a title="camera-hole by Voiding Warranties, on Flickr" href="http://www.flickr.com/photos/36306782@N03/6338181118/"><img src="http://farm7.static.flickr.com/6233/6338181118_30dcfdc280.jpg" alt="camera-hole" width="500" height="334" /></a></p>
<p>I launched the rocket once with the camera and once without. Both launches had the altimeter. The launch with the camera used a D12-5 engine and reached an altitude of 420 feet. The launch without the camera used a E9-4 engine and reached an altitude of 835 feet.</p>
<p><a href="http://www.flickr.com/photos/36306782@N03/sets/72157628112390104/">See more pictures of this project on <strong style="color: #3993ff;">flick<span style="color: #ff1c92;">r</span></strong>.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.voidingwarranties.com/2008/11/rocket-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
