<?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>work in progress &#187; Blender</title>
	<atom:link href="http://www.workinprogress.ca/category/blender/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.workinprogress.ca</link>
	<description>of patrick sébastien coulombe</description>
	<lastBuildDate>Mon, 26 Jul 2010 02:37:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>cheap avr intervalometer</title>
		<link>http://www.workinprogress.ca/avr-intervalometer/</link>
		<comments>http://www.workinprogress.ca/avr-intervalometer/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 08:38:21 +0000</pubDate>
		<dc:creator>psc</dc:creator>
				<category><![CDATA[Blender]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://www.workinprogress.ca/?p=755</guid>
		<description><![CDATA[now that i have a digital camera (but my heart will always belong to film-based photography) i can do time lapse photography. sadly the firmware of my camera isn&#8217;t supporting this feature, so i had to build an intervalometer. i didn&#8217;t want to use an arduino (overkill &#38; pricy), so i went with an attiny45, [...]]]></description>
			<content:encoded><![CDATA[<p>now that i have a digital camera (but my heart will always belong to film-based photography) i can do time lapse photography. sadly the firmware of my camera isn&#8217;t supporting this feature, so i had to build an <a href="http://en.wikipedia.org/wiki/Intervalomete" target="_blank">intervalometer</a>. i didn&#8217;t want to use an arduino (overkill &amp; pricy), so i went with an attiny45, a generic optocoupler, a voltage regulator and a potentiometer for adjusting the timer from 1 second to 1 minute.</p>

<a href='http://www.workinprogress.ca/avr-intervalometer/intervalometer_1/' title='intervalometer_1'><img width="150" height="150" src="http://www.workinprogress.ca/wp-content/uploads/intervalometer_1-150x150.jpg" class="attachment-thumbnail" alt="intervalometer_1" title="intervalometer_1" /></a>
<a href='http://www.workinprogress.ca/avr-intervalometer/intervalometer_3/' title='intervalometer_3'><img width="150" height="150" src="http://www.workinprogress.ca/wp-content/uploads/intervalometer_3-150x150.jpg" class="attachment-thumbnail" alt="intervalometer_3" title="intervalometer_3" /></a>
<a href='http://www.workinprogress.ca/avr-intervalometer/avr_intervalometer_schematic/' title='avr_intervalometer_schematic'><img width="150" height="150" src="http://www.workinprogress.ca/wp-content/uploads/avr_intervalometer_schematic-150x150.png" class="attachment-thumbnail" alt="avr_intervalometer_schematic" title="avr_intervalometer_schematic" /></a>


<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Intervalometer from 1 second to 1 minute</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Author: Patrick Sebastien Coulombe</span>
<span style="color: #666666; font-style: italic;">//Website: www.workinprogress.ca</span>
<span style="color: #666666; font-style: italic;">//Date: 2010-07-24</span>
&nbsp;
<span style="color: #339933;">#define F_CPU 8000000</span>
<span style="color: #339933;">#include &lt;avr/io.h&gt;</span>
<span style="color: #339933;">#include &lt;util/delay.h&gt;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// use PB2 for led, pin 7</span>
<span style="color: #339933;">#define LED_BIT 2</span>
<span style="color: #666666; font-style: italic;">// select ADC2, PB4, pin 3</span>
<span style="color: #339933;">#define CHANNEL 2</span>
<span style="color: #666666; font-style: italic;">// shutter on (in ms)</span>
<span style="color: #339933;">#define HOLD 300 </span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Return the 10bit value of the selected adc channel.</span>
uint16_t get_adc<span style="color: #009900;">&#40;</span>uint8_t channel<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// ADC setup</span>
	ADCSRA <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> ADEN<span style="color: #009900;">&#41;</span> <span style="color: #339933;">|</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> ADPS1<span style="color: #009900;">&#41;</span> <span style="color: #339933;">|</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> ADPS0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// select channel</span>
	ADMUX <span style="color: #339933;">=</span> channel<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// warm up the ADC, discard the first conversion</span>
	ADCSRA <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> ADSC<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>ADCSRA <span style="color: #339933;">&amp;</span><span style="color: #339933;">#038; (1 &lt;&lt; ADSC)); </span>
&nbsp;
	ADCSRA <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> ADSC<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// start single conversion</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>ADCSRA <span style="color: #339933;">&amp;</span><span style="color: #339933;">#038; (1 &lt;&lt; ADSC)); // wait until conversion is done</span>
&nbsp;
	<span style="color: #b1b100;">return</span> ADCW<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Scale</span>
<span style="color: #993333;">long</span> map<span style="color: #009900;">&#40;</span><span style="color: #993333;">long</span> x<span style="color: #339933;">,</span> <span style="color: #993333;">long</span> in_min<span style="color: #339933;">,</span> <span style="color: #993333;">long</span> in_max<span style="color: #339933;">,</span> <span style="color: #993333;">long</span> out_min<span style="color: #339933;">,</span> <span style="color: #993333;">long</span> out_max<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>x <span style="color: #339933;">-</span> in_min<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>out_max <span style="color: #339933;">-</span> out_min<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span>in_max <span style="color: #339933;">-</span> in_min<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> out_min<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Main program</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// vars</span>
	uint16_t adcvalue <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
	uint16_t i<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// define LED as outputs</span>
	DDRB <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> LED_BIT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	
&nbsp;
		<span style="color: #666666; font-style: italic;">//release the shutter</span>
		PORTB <span style="color: #339933;">|=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">&lt;&lt;</span> LED_BIT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//exposure length</span>
		<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>HOLD<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			_delay_ms<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span>
		PORTB <span style="color: #339933;">&amp;</span><span style="color: #339933;">#038;= ~(1 &lt;&lt; LED_BIT);</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//interval time (using a potentiometer to adjust)</span>
		adcvalue <span style="color: #339933;">=</span> map<span style="color: #009900;">&#40;</span>get_adc<span style="color: #009900;">&#40;</span>CHANNEL<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1023</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		adcvalue <span style="color: #339933;">=</span> adcvalue <span style="color: #339933;">*</span> <span style="color: #0000dd;">1000</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//one way to achieve long delay</span>
		<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> adcvalue<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			_delay_ms<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p></code></p>
<p>A short time lapse test (4 hours) from my balcony. I used Blender for making the tilt / shift effect. Here's the <a href="http://www.workinprogress.ca/wp-content/uploads/blendertiltshift.tar.gz">source</a> of the Blender file + the png mask.</p>
<p>
<object width="540" height="405"><param name="movie" value="http://www.youtube.com/v/8nQMBAMxHys&amp;hl=en_US&amp;fs=1?rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8nQMBAMxHys&amp;hl=en_US&amp;fs=1?rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="540" height="405"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.workinprogress.ca/avr-intervalometer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>face 2 blender</title>
		<link>http://www.workinprogress.ca/face-2-blender/</link>
		<comments>http://www.workinprogress.ca/face-2-blender/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 20:12:36 +0000</pubDate>
		<dc:creator>psc</dc:creator>
				<category><![CDATA[Blender]]></category>
		<category><![CDATA[Pure Data]]></category>

		<guid isPermaLink="false">http://www.workinprogress.ca/?p=399</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5699993&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5699993&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.workinprogress.ca/face-2-blender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
