<?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>Richi&#039;s Blog</title>
	<atom:link href="http://blog.ulrichard.ch/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.ulrichard.ch</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Tue, 11 Jun 2013 20:44:16 +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>AtTiny  Advent Wreath</title>
		<link>http://blog.ulrichard.ch/?p=1020</link>
		<comments>http://blog.ulrichard.ch/?p=1020#comments</comments>
		<pubDate>Tue, 11 Jun 2013 20:33:28 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[AtTiny]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=1020</guid>
		<description><![CDATA[An advent wreath in late spring, you ask? Yes, the timing is a bit off, and that&#8217;s not just because the coldest spring in ages has not finished yet. While browsing for the topic of my last post, I discovered a nice little one-evening-project: Geeky advent from tinkerlog. I had all the required parts here, &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=1020">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>An advent wreath in late spring, you ask? Yes, the timing is a bit off, and that&#8217;s not just because the coldest spring in ages has not finished yet. While browsing for the topic of my <a href="http://blog.ulrichard.ch/?p=1012">last post</a>, I discovered a nice little one-evening-project: <a href="http://tinkerlog.com/2009/12/12/geeky-advent/">Geeky advent from tinkerlog</a>.<br />
I had all the required parts here, so I just gave it a try. The adaptation from the AtTiny13 to an AtTiny45 was straight forward. But finding the right threshold value for the ambient light sensor was a bit trickier. Especially, as the ADC didn&#8217;t work at first. That was probably a difference between the two AtTiny&#8217;s. But once I configured the ADC properly for the AtTiny45, I flashed it a couple of times with different values, and turned the room light on an off, until I had a good threshold value.<br />
It&#8217;s interesting how the flickering is done with the random values and the manual PWM. And especially, how one of the LED&#8217;s is used to sense the ambient light was intriguing. To save battery power during the day, it goes to sleep and waits for the watchdog timer to wake it up. It then senses the ambient light. If it is bright, it goes straight back to sleep. If it&#8217;s dark, it lights up the LED&#8217;s. Going through the four modes for the four weeks of advent is done by resetting, or just quickly disconnecting the power from the battery.</p>
<p>But now I look forward for the summer to come, before we can put the mini advent wreath to use&#8230;</p>
<table>
<tbody>
<tr>
<td><a href="http://gallery.ulrichard.ch/gallery2/main.php?g2_itemId=7657"><img alt="" src="http://gallery.ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7659&amp;g2_serialNumber=2" /></a></td>
<td><a href="http://gallery.ulrichard.ch/gallery2/main.php?g2_itemId=7657"><img alt="" src="http://gallery.ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7663&amp;g2_serialNumber=2" /></a></td>
<td><a href="http://gallery.ulrichard.ch/gallery2/main.php?g2_itemId=7657"><img alt="" src="http://gallery.ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7666&amp;g2_serialNumber=2" /></a></td>
</tr>
</tbody>
</table>
<p>As my modified code is so similar to the original, it&#8217;s not really worth to create a project on github. So, I just pasted the code below.</p>
<p><span id="more-1020"></span></p>
<pre class="brush: c; gutter: false; first-line: 1">/* -----------------------------------------------------------------------
 * Title:    advent.c
 *           Flicker 4 LEDs
 * Author:   Alexander Weber
 *           http://tinkerlog.com/2009/12/12/geeky-advent/
 * Date:     22.11.2009
 * Hardware: ATtiny13v
 * Software: CrossPack-AVR-20090415
 *
 * Modified to use an AtTiny45 by Richard Ulrich &lt;richi@paraeasy.ch&gt; 11.06.2013
 *
 * Credits:
 * This code is based heavily on sritesmods version.
 * Find the original at http://spritesmods.com/?art=minimalism&amp;f=gpl
 *
 * Changes:
 * - support 4 LEDs
 * - added a bit of sampling for light detection
 * - moved the "power down" out of the ISR, was always resetting
 * - removed callibration, replaced by hardwired value.
 */

#include &lt;avr/io.h&gt;
#include &lt;util/delay.h&gt;
#include &lt;avr/interrupt.h&gt;
#include &lt;avr/eeprom.h&gt;
#include &lt;avr/pgmspace.h&gt;
#include &lt;avr/sleep.h&gt;
#include &lt;avr/wdt.h&gt;

#define LED1  PB4 
#define LED2  PB3
#define LED3  PB2
#define LED4  PB1
#define ADC2 2
#define AMBIENT_LIGHT 55

#define TRUE 1
#define FALSE 0

//Bunch o' random numbers: I'm too lazy to write or port a real random number
//generator.
//generated using bash:
//for x in `seq 0 255`; do echo -n $(($RANDOM%256)),; done
const uint8_t randomvals[] PROGMEM = {
	234,191,103,250,144,74,39,34,215,128,9,122,144,74,137,105,123,218,158,175,205,
	118,149,13,98,7,173,179,194,97,115,110,213,80,220,142,102,102,36,152,90,135,
	105,176,173,49,6,197,48,140,176,122,4,53,83,216,212,202,170,180,214,53,161,
	225,129,185,106,22,12,190,97,158,170,92,160,194,134,169,98,246,128,195,24,
	198,165,156,77,126,113,136,58,156,196,136,41,246,164,84,138,171,184,42,214,
	203,128,89,39,198,85,140,148,149,36,215,78,170,234,131,124,152,239,154,214,
	130,194,49,3,69,248,120,179,101,163,131,124,184,148,213,118,213,81,177,149,
	58,213,33,201,63,10,195,215,190,7,86,245,128,9,8,40,102,51,125,94,92,5,159,
	75,253,158,40,4,6,178,241,92,124,73,248,1,157,61,50,86,136,113,22,16,171,209,
	230,144,240,14,188,2,167,22,88,57,50,86,171,73,114,175,34,226,245,57,180,111,
	220,186,170,242,141,229,49,158,30,82,161,49,124,65,139,24,95,14,133,65,238,
	116,180,190,49,130,30,30,59,93,173,139,19,187,2,163,102,26,255,23,239,196,19,
	6,162
};

uint8_t mode_ee EEMEM = 0;                      // stores the mode in eeprom
static volatile uint8_t sleep = 0;

// Gets a semi-random number between 0 and 255
uint8_t getRandom(void)
{
	//This'll probably give a warning because we use it uninitialised. Little 
	//does the compiler know: that's actually what we _want_ <img src='http://blog.ulrichard.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> 
	static uint8_t random1, random2;
	random1++;
	if(random1 == 0)
		random2 += 0x41;
	return pgm_read_byte(randomvals + random1) ^ random2;
}

uint16_t getLight(void)
{
	uint16_t val = 0;
	uint8_t i;

	ADMUX = (0 &lt;&lt; REFS0) 	// Set ADC reference to AVCC
		  | (0 &lt;&lt; REFS1) 	// Set ADC reference to AVCC 
		  | (1 &lt;&lt; MUX1);    // Use ADC2 or PB4 pin for Vin
//		  | ADC2;        	// use ADC2 on PB4     

	ADCSRA = (1 &lt;&lt; ADEN)    // enable ADC
		   | 3; 			//  prescaler 8

	// kill all leds
	PORTB &amp;= ~((1 &lt;&lt; LED1) | (1 &lt;&lt; LED2) | (1 &lt;&lt; LED3) | (1 &lt;&lt; LED4));
	_delay_ms(5);

	DDRB &amp;= ~(1 &lt;&lt; LED1); // let led generate some voltage
	_delay_ms(5);

	// warm up the ADC, discard the first conversion
	ADCSRA |= (1 &lt;&lt; ADSC);
	while(ADCSRA &amp; (1 &lt;&lt; ADSC))
		; // wait for the measurement to complete

	for(i = 0; i &lt; 4; i++)
	{
		_delay_ms(5);
		ADCSRA |= (1 &lt;&lt; ADSC);
		while(ADCSRA &amp; (1 &lt;&lt; ADSC))
			; // wait for the measurement to complete
		val += ADC;
	}
	val &gt;&gt;= 2; // divide by 4

	ADCSRA = 0;             // disable adc
	DDRB |= (1 &lt;&lt; LED1);    // re-enable led

	return val;
}

ISR(WDT_vect)
{
  //check if it's still dark
  sleep = (getLight() &gt; AMBIENT_LIGHT) ? TRUE : FALSE;
}

int main(void)
{
	uint8_t lval1, lval2, lval3, lval4;
	uint8_t i, x, y;
	uint8_t mode;

	// set up wdt
	wdt_enable(WDTO_2S);

	WDTCR |= 0x40; // WDT generates interrupts instead of resets now.
				   // We want interrupts because a reset clears our nice random
				   // seeds, and an interrupt doesn't.

	for(i = 0; i &lt; 10; i++)
	{
		_delay_ms(100);
	}

	// retrieve mode from eeprom and write back mode + 1
	mode = eeprom_read_byte(&amp;mode_ee);
	mode = mode % 4;
	eeprom_write_byte(&amp;mode_ee, mode + 1);  

	sei(); // enable interrupts

	// go directly into sleep mode and lets wake up by the wdt
	sleep = TRUE;

	// enable leds
	DDRB = (1 &lt;&lt; LED1) | (1 &lt;&lt; LED2) | (1 &lt;&lt; LED3) | (1 &lt;&lt; LED4);

	while(1)
	{
		WDTCR |= 0x40; // make sure wdt keeps generating an int instead of a reset

		if(sleep)
		{
			// switch off all LEDs and power down
			PORTB &amp;= ~((1 &lt;&lt; LED1) | (1 &lt;&lt; LED2) | (1 &lt;&lt; LED3) | (1 &lt;&lt; LED4));
			set_sleep_mode(SLEEP_MODE_PWR_DOWN);
			sleep_mode();
		}
		else
		{
			// get a random value for the leds intensity
			lval1 = getRandom();
			lval2 = getRandom();
			lval3 = getRandom();
			lval4 = getRandom();    
			// Manually do some pwm
			for(x = 0; x &lt; 20; x++)
			{
				if(mode == 0)
					PORTB |= (1 &lt;&lt; LED1);
				else if(mode == 1)
					PORTB |= (1 &lt;&lt; LED1) | (1 &lt;&lt; LED2);
				else if(mode == 2)
					PORTB |= (1 &lt;&lt; LED1) | (1 &lt;&lt; LED2) | (1 &lt;&lt; LED3);
				else if(mode == 3)
					PORTB |= (1 &lt;&lt; LED1) | (1 &lt;&lt; LED2) | (1 &lt;&lt; LED3) | (1 &lt;&lt; LED4);

				for(y = 0; y != 255; y++)
				{
					if(y == lval1)
						PORTB &amp;= ~(1 &lt;&lt; LED1);
					if(y == lval2)
						PORTB &amp;= ~(1 &lt;&lt; LED2);
					if(y == lval3)
						PORTB &amp;= ~(1 &lt;&lt; LED3);
					if(y == lval4)
						PORTB &amp;= ~(1 &lt;&lt; LED4);
					_delay_us(5);
				}
			}
		}
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=1020</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AtMega breadboard header</title>
		<link>http://blog.ulrichard.ch/?p=1012</link>
		<comments>http://blog.ulrichard.ch/?p=1012#comments</comments>
		<pubDate>Thu, 06 Jun 2013 19:13:23 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AtTiny]]></category>
		<category><![CDATA[AVR]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=1012</guid>
		<description><![CDATA[A while ago, I ordered some AtTiny breadboard headers from tinkerlog.com. Unfortunately, they didn&#8217;t have any boards for AtMega&#8217;s left. The ones for the AtTiny&#8217;s are very handy, and I used them whenever prototyping something with an AtTiny. In fact, I used it almost whenever flashing an AtTiny. Many times I wished I had one &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=1012">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A while ago, I ordered some <a href="http://tinkerlog.com/2009/01/18/attiny-breadboard-headers/">AtTiny breadboard headers from tinkerlog.com</a>. Unfortunately, they didn&#8217;t have any boards for AtMega&#8217;s left. The ones for the AtTiny&#8217;s are very handy, and I used them whenever prototyping something with an AtTiny. In fact, I used it almost whenever flashing an AtTiny. Many times I wished I had one of these tiny boards for the AtMega&#8217;s and at some point I even forgot that they existed. Often times I just included in ICSP header on the stripboard.</p>
<p>Last week I thought I must have such a board for the AtMega&#8217;s as well, and created one with a bit of stripboard. The wiring is not pretty, but the device works well, and is a real help when prototyping.</p>
<p><a href="https://github.com/ulrichard/jungleroom/blob/master/icsp_board/icsp_board.fzz">Fritzing layout on github</a></p>
<p><a href="http://gallery.ulrichard.ch/gallery2/main.php?g2_itemId=7653"><img alt="" src="http://gallery.ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7654&amp;g2_serialNumber=2" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=1012</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jumping ship as google is getting evil</title>
		<link>http://blog.ulrichard.ch/?p=976</link>
		<comments>http://blog.ulrichard.ch/?p=976#comments</comments>
		<pubDate>Fri, 24 May 2013 20:18:29 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=976</guid>
		<description><![CDATA[For many years google stood out of the big IT enterprises as an example of respecting their users and embracing open standards. Sadly, they are drifting away from that, and it looks as if they want to get as insidious as the others. Gone are the times of &#8220;do no evil&#8221;. Just recently, I wanted to &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=976">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>For many years google stood out of the big IT enterprises as an example of respecting their users and embracing open standards. Sadly, they are drifting away from that, and it looks as if they want to get as insidious as the others. Gone are the times of &#8220;do no evil&#8221;.</p>
<p>Just recently, I wanted to upload a video to <a href="https://www.youtube.com/">youtube</a>. For some reason, it didn&#8217;t let me, unless I created a Google+ profile. WTF!!! This is insane. I don&#8217;t want your creepy, time wasting social platform. I just wanted to upload a video!</p>
<h4>Instant Messaging</h4>
<p>This week, <a href="https://www.eff.org/deeplinks/2013/05/google-abandons-open-standards-instant-messaging">I read in the news </a>that they want to abandon <a href="http://xmpp.org/">XMPP</a> in their GoogleTalk. This one is even worse. After <a href="http://www.skype.com">Skype</a> was assimilated by the evil empire, I was happy to find a better alternative. Long before that, I was unhappy with the closed proprietary nature of Skype. And with GoogleTalk I was not forced to use some crappy piece of proprietary software to <a href="http://www.theverge.com/2013/5/16/4336004/pick-your-poison-mobile-messaging-will-be-fragmented-expensive-or-locked-in">chat with my friends</a>.</p>
<p>The good thing about such events, is that every time I learn a little something about the underlying technology. For instance, I just learned about the federated nature of <a href="http://xmpp.org/">XMPP</a>. So far, I only used it to communicate with people on the same server. So I thought about running my own xmpp server, but then I created a jabber account on <a href="http://fsfe.org/">FSFE</a> today. With this I&#8217;m able to chat with people on any standards conforming XMPP server&#8230;.. Google is sadly soon no longer one of them. My xmpp address is  <a href="xmpp:ulrichard@jabber.fsfe.org">ulrichard@jabber.fsfe.org</a> if you want to connect.</p>
<h4>PIM Syncronization</h4>
<p>Next thing was contacts and calendar synchronization. I used to do this directly via infrared or bluetooth between phone and computer. But when I bought my Android phone, it was just sooo convenient to use the Google services. That even outweighted the unease of having my private data on their servers. So far it has always been easy to download all my PIM data from the Google website to make backups and be prepared to use it somewhere else, just in case&#8230; Thanks for that Google, that is exemplary! But who knows what they are up to, next.</p>
<p>To be prepared, I looked for alternatives, to have the same ease of use, but re-gaining control of my data. I didn&#8217;t want to set up a box with <a href="https://owncloud.org/">owncloud</a> or something similar, as I have an <a href="http://www.ubuntu.com/server">ubuntu server</a> running already. It didn&#8217;t take much <a href="https://duckduckgo.com/">duckducking</a> to find <a href="http://davical.org/">davical</a>. The <a href="http://davical.org/installation.php">installation is easy</a>, but I&#8217;m sure the debian package could be made in a way that none of this manual configuration would be necessary. It used to be only for calendar, but with recent versions, they also added contacts.</p>
<p><a href="http://davical.org/clients.php?client=Evolution">Setting it up in Evolution</a> was also quickly done.  The only thing to find out was that apparently CardDAV and WebDAV are the same thing.</p>
<p>Contrary to my expectation, Android 4.0 has no native support for CardDAV nor CalDAV. But the app&#8217;s from the market work well. I use <a href="https://play.google.com/store/apps/details?id=org.dmfs.caldav.lib">CalDAV-Sync</a> and <a href="https://play.google.com/store/apps/details?id=org.dmfs.carddav.sync">CardDAV-Sync</a> both from the same developer. They nicely synchronize the built in address book and calendar. He promised to opensource them, once he cleans up the code. I also tried <a href="https://play.google.com/store/apps/details?id=org.gege.caldavsyncadapter">Caldav Sync Free</a> which is already opensource, but it currently has only one way sync.</p>
<h4>eMail</h4>
<p>I never used my gmail for much other than mailing lists. For the most part, I use my <a href="http://www.paraeasy.ch">paraeasy</a> address over <a href="https://en.wikipedia.org/wiki/IMAP">imap</a>. It is hosted at a regular provider and works good enough. It would offer webmail, but who needs webmail anyway? I made more than one attempt to set up an eMail server on my own server, but so far I&#8217;m not confident enough to use it publicly. From what I know, correctly maintaining an eMail server, and not ending up on a black-list is more difficult than a webserver. This is because spammers are happy to abuse it, if it is configured incorrectly. I tried different tutorials with varying degrees of success. Some tutorials are actually quite intimidating. Now today, I found <a href="http://iredmail.org/">iredmail</a> which seems to be very easy to set up, but is meant only for freshly installed servers, and has some stuff that lives outside of the repository. As my server has been running for some years, was upgraded multiple times and runs a variety of services, it didn&#8217;t go so well. I will probably keep trying, but it has still no priority.</p>
<h4>Files</h4>
<p>I don&#8217;t use GoogleDrive nor UbuntuOne nor dropbox nor wuala nor anything similar to synchronize files. While I appreciate the ease of use, <a href="http://git-scm.com/">git</a> suits me better. That&#8217;s right, <a href="http://git-scm.com/">git,</a> the distributed version control system, a developer tool. It was not developed to synchronize the home folder, but it works very well for that purpose. Long before anybody talked about file synchronization (other than <a href="https://rsync.samba.org/">rsync</a> alikes), I used <a href="http://subversion.tigris.org/">subversion</a>. I admit, there is some typing involved, but I have full control, full offline history and can compare revisions. That is on any device, and yes I run debian inside my Android phone. The master repository lives on my own server and is protected with a key that is stored on a smart card.</p>
<h4>Conclusion</h4>
<p>It&#8217;s sad to see Google services deteriorating, <a href="https://kkinder.com/2013/05/21/leaving-googles-silo-alternatives-to-gmail-talk-calendar-and-more/">but there are alternatives</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=976</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jaguar headliners repair</title>
		<link>http://blog.ulrichard.ch/?p=965</link>
		<comments>http://blog.ulrichard.ch/?p=965#comments</comments>
		<pubDate>Fri, 12 Apr 2013 21:09:42 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[jaguar]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=965</guid>
		<description><![CDATA[Remember the Asterix &#38; Obelix comics, and that the only thing they feared was that heaven would fall on their heads? That happened to me lately. But it was not as bad as that might sound. Well, the joke doesn&#8217;t quite work in English. In German, we call the headliners of a car &#8220;heaven&#8221;. Last &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=965">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Remember the <a href="https://en.wikipedia.org/wiki/Asterix_and_the_Falling_Sky" target="_blank">Asterix &amp; Obelix comics</a>, and that the only thing they feared was that heaven would fall on their heads? That happened to me lately. But it was not as bad as that might sound. Well, the joke doesn&#8217;t quite work in English. In German, we call the <a href="http://www.himmelservice.de/english/himmeltuch.htm" target="_blank">headliners of a car &#8220;heaven&#8221;</a>. Last summer, when I had the power steering of my vintage Jaguar XJS repaired, the car was in the sun for a few weeks. Thus, the fabric on the inside of the roof loosened and hung down.</p>
<p>Now, I finally had it repaired. I found a holstery  in Goldau. To bring the price down a bit, and also out of interest, we agreed that I would take a day off, and help with the tedious parts. While he would do the more complicated stuff that requires experience not to break anything.</p>
<p>That worked out really well. I dismounted and mounted the misc stuff from the car, and helped with the headliners. To make sure the new fabric wouldn&#8217;t fall off again, I had to scrub off all the old glue from the pressed glass wool mold. Also the trims at the side of the roof got new fabric. There was a spot which had a hole, that was visible for all of the eleven years I have owned that car.</p>
<p>In the afternoon, we disassembled the passenger seat. It was in need of sewing on the side.</p>
<p>After everything is done, it&#8217;s now much more pleasant to sit into the old cat.</p>
<table>
<tbody>
<tr>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7605"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7607&amp;g2_serialNumber=5" alt="" /></a></td>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7605"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7611&amp;g2_serialNumber=2" alt="" /></a></td>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7605"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7614&amp;g2_serialNumber=5" alt="" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=965</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variable fan speed for the camper</title>
		<link>http://blog.ulrichard.ch/?p=948</link>
		<comments>http://blog.ulrichard.ch/?p=948#comments</comments>
		<pubDate>Tue, 02 Apr 2013 22:02:12 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Büssli]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=948</guid>
		<description><![CDATA[The T3 VW camper vans came with a three step fan speed switch. Maybe it broke just like that, or maybe it was due to the kids playing with it endlessly. No matter what, the broken switch was a good opportunity for an upgrade. I ordered a 15A PWM motor speed controller which I thought &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=948">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The T3 VW camper vans came with a three step fan speed switch. Maybe it broke just like that, or maybe it was due to the kids playing with it endlessly. No matter what, the broken switch was a good opportunity for an upgrade. I ordered a <a href="http://dx.com/p/dc-6v-90v-15a-pwm-motor-speed-control-switch-governor-green-black-160094" target="_blank">15A PWM motor speed controller</a> which I thought should be big enough. Its potentiometer was broken on arrival, so I got <a href="http://www.conrad.ch/ce/de/product/450016/" target="_blank">a more rugged one</a> from the local shop.</p>
<p>Connecting it was more complicated than I thought. With the original three step switch, the motor was directly connected to ground, and the highest tier connected it directly to 12V. The other two tiers had resistors in series. My naive expectation was that the ground would be common between source and motor, in the PWM unit as well. But instead the plus was common and the minus was PWM switched. So I had to search the connection from the motor to ground and cut it.<br />
In the end, it works like a charm&#8230;</p>
<table>
<tbody>
<tr>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7581"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7595&amp;g2_serialNumber=5" alt="" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=948</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tinkering with the kids</title>
		<link>http://blog.ulrichard.ch/?p=942</link>
		<comments>http://blog.ulrichard.ch/?p=942#comments</comments>
		<pubDate>Tue, 02 Apr 2013 21:40:52 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Solar]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=942</guid>
		<description><![CDATA[This Easter weekends the weather was really crap, so we stayed home. We had lots of time to spend with the kids, and we all enjoyed that. The boys are still a bit too young for the projects I usually do, but we just did our first electronics lession.. Even if Levin didn&#8217;t fully understand &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=942">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This Easter weekends the weather was really crap, so we stayed home. We had lots of time to spend with the kids, and we all enjoyed that. The boys are still a bit too young for the projects I usually do, but we just did our first electronics lession.. Even if Levin didn&#8217;t fully understand how a photon derails an electron in the silicon of the solar cell, he still liked to see how the prop blew more air when he better aligned the cell to the sun.</p>
<p>What you need is just a pack of match sticks, some glue, a <a href="http://www.conrad.ch/ce/de/product/191321/" target="_blank">small solar cell</a> and a tail boom of a broken RC helicopter.</p>
<p>Levin also created a Triceratops. You see it on the photos, that&#8217;s the dinosaur with the three horns.</p>
<table>
<tbody>
<tr>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7598"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7600&amp;g2_serialNumber=2" alt="" /></a></td>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7598"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7603&amp;g2_serialNumber=2" alt="" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=942</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BitCoin hits CHF 100 mark</title>
		<link>http://blog.ulrichard.ch/?p=935</link>
		<comments>http://blog.ulrichard.ch/?p=935#comments</comments>
		<pubDate>Tue, 02 Apr 2013 21:22:52 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Paragliding]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[BitCoin]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=935</guid>
		<description><![CDATA[Yesterday one BitCoin was, for the first time, worth more than CHF 100! When I first learned about BitCoin in early 2011, CPU mining was still enabled in the default client. I mined for a few days, but it was probably already too late for the CPU. GPU&#8217;s took over before that. Last year, you &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=935">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Yesterday one BitCoin was, for the first time, <a href="http://www.bitcoincharts.com/charts/mtgoxCHF#rg120zczsg2013-01-01zeg2013-04-03ztgSzm1g10zm2g25zvzcv" target="_blank">worth more than CHF 100</a>!</p>
<p>When I first learned about BitCoin in early 2011, CPU <a href="http://bitcoin.stackexchange.com/questions/148/what-exactly-is-mining" target="_blank">mining</a> was still enabled in the default client. I mined for a few days, but it was probably already too late for the CPU. GPU&#8217;s took over before that. Last year, you needed FPGA&#8217;s to profitably mine, and now it&#8217;s shifting over to fully custom ASIC&#8217;s. I still sometimes mine with the GPU in the background while the Computer is running anyway, and I don&#8217;t use the GPU for anything else. It didn&#8217;t find a block so far. But for me that&#8217;s kind of like playing the lottery. The chances are slim, but if my computer could find the proper hash, that would cash in 25 BTC at the moment which would equate to CHF 2&#8217;500. And that slim chance starts over roughly every ten minutes.</p>
<p>There is a site somewhere on the net (I forgot the location) where you get free BTC. Back in those days, you got 0.05 BTC. That&#8217;s how I started off. This would now equate to CHF 5, but these days you get much less.</p>
<p><a href="http://blog.ulrichard.ch/?p=49" target="_blank">Since July 2011, I accept BitCoins</a> as payment for the <a href="http://paraeasy.ch" target="_blank">paraeasy.ch</a> paragliding tandem flights. In fact only one guy payed that way so far. In October 2011 the flight cost 75 BTC at a rate of less than CHF 3 per BTC. If I still had those 75 BTC, they would be worth a whopping CHF 7&#8217;500 today.</p>
<p>I was thrilled last August, when it had an 80% increase within two weeks. But what happened this year was just insane. The price went from CHF 11 to CHF 110 in just three months. There were weeks with 10 to 15% increase every day.</p>
<p>The other day I walked past a local bank, and saw an advertisement for a defensive savings plan with an 8 year obligation where you get 1% profit. Of course it&#8217;s an unfair comparison. Noone knows what will happen next to the BTC value. It could drop any day for any number of reasons, or it could keep rising. I wouldn&#8217;t invest my savings so far.</p>
<p>There is a lot of speculation going on about the future value of BTC, and how certain events could influence that. Last week <a href="http://falkvinge.net/2013/03/06/the-target-value-for-bitcoin-is-not-some-50-or-100-it-is-100000-to-1000000/" target="_blank">I read an interesting article about that.</a> But there is also a lot of speculation about a <a href="http://www.dailykos.com/story/2013/03/28/1197629/-Bitcoin-s-Bubble-Bound-to-Burst" target="_blank">bubble about to burst</a>. Indeed the recent rise in value was so unnaturally fast, that it looks like a bubble. But such a bubble already bursted in 2011, and BTC recovered remarkably well.</p>
<p>Let&#8217;s not concentrate on the value itself. I think for BTC it would actually be better if the value was a bit more stable. The system was designed as a means to transfer money quick and easy. The main motivator was being able to transfer funds around the globe without waiting for a couple of days to arrive, and paying ridiculous transfer fees, as with current bank wire transfers, credit cards or paypal. That&#8217;s where BTC really shines. Of course it&#8217;s nice to see the value of your Coins rise, but I hope a possible bubble will not harm the system too much, and I strongly hope if that bubble should really burst, BTC will recover even stronger.</p>
<p>Update : additional links to good articles:</p>
<p><a href="https://medium.com/money-banking/2b5ef79482cb" target="_blank">The bitcoin bubble and the future of currency</a></p>
<p><a href="http://blog.priceonomics.com/post/47135650437/are-bitcoins-the-future" target="_blank">Are BitCoins the future?</a></p>
<p><a href="http://falkvinge.net/2013/03/06/the-target-value-for-bitcoin-is-not-some-50-or-100-it-is-100000-to-1000000/" target="_blank">The target value of BitCoin</a></p>
<p><a href="http://blog.nyaruka.com/bitcoins-bottom-billion-why-the-developing-world-may-be-bitcoins-biggest-customers" target="_blank">BitCoin in the 3rd world</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=935</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a display to rfid time tracking</title>
		<link>http://blog.ulrichard.ch/?p=901</link>
		<comments>http://blog.ulrichard.ch/?p=901#comments</comments>
		<pubDate>Wed, 06 Mar 2013 20:22:43 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[bifferboard]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[i2c]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[RFID]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=901</guid>
		<description><![CDATA[More than a year ago, I blogged here about using RFID to track presence times in the BORM ERP system. I used the system a lot since then. But the BlinkM was really limited as the only immediate feedback channel. To use it with multiple users, a display was needed. The default Arduino compatible displays &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=901">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>More than a year ago, I blogged here about <a href="http://blog.ulrichard.ch/?p=136" target="_blank">using RFID to track presence times in the BORM ERP system</a>. I used the system a lot since then. But the BlinkM was really limited as the only immediate feedback channel. To use it with multiple users, a display was needed. The default Arduino compatible displays seemed a bit overpriced, and the Nokia phone that I disassembled didn&#8217;t have the same display as I used for the <a href="http://blog.ulrichard.ch/?p=39" target="_blank">spectrum analyzer</a>. But these displays are <a href="http://dx.com/p/arduino-1-6-lcd-display-screen-for-nokia-5110-red-silver-140226" target="_blank">available for a bargain from china</a>. The only problem was that the bifferboard didn&#8217;t have enough GPIO pins available to drive the &#8220;SPI plus extras&#8221; interface. But i2c was already configured for the BlinkM.</p>
<p>So, the most obvious solution was to use an AtMega8 as an intermediary. I defined a simple protocol and implemented it as i2c and uart on the AVR. I also wrote a small python class to interface it from the client side. As I buffer only one complete command, I had to add some delays in the python script to make sure the AVR can complete the command before the next one arrives. Apart from that, it all worked well when testing on an Alix or RaspberryPi. But i2c communication refused to work entirely when testing with the bifferboard. Not even i2cdetect could locate the device. That was bad, since I wanted to use it with the Bifferboard, and the other two were only for testing during the development. I checked with the oscilloscope, and found out that the i2c clock on the bifferboard runs with only 33kHz while the other two run at the standard 100kHz. So I tried to adjust the i2c clock settings on the AVR, as well as different options with the external oscillators and clock settings, but I was still still out of luck. Then I replaced the AtMega8 with an AtMega168 and it immediately worked. Next, I tried another AtMega8 and this one also worked with the Bifferboard. I switched back and forth and re-flashed them with the exact same settings. Still, one of them worked with all tested linux devices, while the other one still refused to work with the Bifferboard. So I concluded, one of these cheap AVR&#8217;s from china must be flaky, and I just used the other one. Seems like that&#8217;s what you get for one 6th of the price you pay for these chips in Switzerland.</p>
<p>Apart from the display, I also added an RGB LED that behaves like the BlinkM before. And on top of that a small piezo buzzer. But since I could hardly hear it&#8217;s sound when driven with 3.3V, I didn&#8217;t bother re-soldering it when it fell off.</p>
<p>Now, my co-workers also started logging their times with RFID.</p>
<p><a href="https://github.com/ulrichard/rfidtime" target="_blank">The code is still on github</a>.</p>
<table>
<tbody>
<tr>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7570"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7572&amp;g2_serialNumber=2" alt="" /></a></td>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7570"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7579&amp;g2_serialNumber=2" alt="" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=901</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wallis Ski Holiday</title>
		<link>http://blog.ulrichard.ch/?p=897</link>
		<comments>http://blog.ulrichard.ch/?p=897#comments</comments>
		<pubDate>Wed, 06 Mar 2013 20:17:21 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[Paragliding]]></category>
		<category><![CDATA[ski]]></category>
		<category><![CDATA[Wallis]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=897</guid>
		<description><![CDATA[Last week we spent a ski holiday in the Wallis. We stayed with Mirella&#8217;s mother. Most days we went to Bürchen to practice skiing with Levin, and have some sledge rides with Noah. Levin went to the ski school for half a day, but he didn&#8217;t like it at all. He preferred being taught by &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=897">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last week we spent a ski holiday in the Wallis. We stayed with Mirella&#8217;s mother. Most days we went to Bürchen to practice skiing with Levin, and have some sledge rides with Noah. Levin went to the ski school for half a day, but he didn&#8217;t like it at all. He preferred being taught by us.</p>
<p>I did two flights from the Ski area above to Bürchen. Both were in downward wind. At the later one, the wind was blowing down so strong, that I inflated in the lee of a small building, and then skied really fast to get airborne. The icy wind was a good test for my new down insulation layer jacket.</p>
<p>Mirella and me took one day off, and went to Zermatt for skiing. We were mildly shocked when we saw the price for a one day ski pass. That&#8217;s roughly CHF 80. But we were never before on the small Matterhorn, and the snow as well as the weather was perfect. The cablecar for the small Matterhorn runs up to 3880 meters above sea level. Well, one could say the Jungfrau Joch is not as high, has no ski slopes and costs even more. We had lunch up at the top and could feel the altitude. Then we descended into Italy before returning back to Switzerland.</p>
<p>And then there was one day with clouds forecasted. As all others had better weather, we made a break. But still, the sun was shining when we walked around the town.</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7543"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7549&amp;g2_serialNumber=2" alt="" /></a></td>
<td><a href="http://ulrichard.ch/gallery2/main.php?g2_itemId=7543"><img src="http://ulrichard.ch/gallery2/main.php?g2_view=core.DownloadItem&amp;g2_itemId=7558&amp;g2_serialNumber=2" alt="" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=897</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPGPU programming class</title>
		<link>http://blog.ulrichard.ch/?p=903</link>
		<comments>http://blog.ulrichard.ch/?p=903#comments</comments>
		<pubDate>Wed, 06 Mar 2013 20:10:33 +0000</pubDate>
		<dc:creator>ulrichard</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[GPGPU]]></category>
		<category><![CDATA[online education]]></category>
		<category><![CDATA[OpenCL]]></category>

		<guid isPermaLink="false">http://blog.ulrichard.ch/?p=903</guid>
		<description><![CDATA[It&#8217;s already a while back that I completed the coursera class &#8220;Heterogeneous Parallel Programming&#8220;. It was mainly concerned with cuda, which is Nvidia&#8217;s GPGPU framework. GPGPU is about running common computations on the graphics card. The class also quickly covered OpenCL, OpenACC, C++AMP and MPI. In the programming assignments, we juggled a lot with low &#8230; <a class="read-excerpt" href="http://blog.ulrichard.ch/?p=903">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s already a while back that I completed the coursera class &#8220;<a href="https://class.coursera.org/hetero-2012-001/class/index" target="_blank">Heterogeneous Parallel Programming</a>&#8220;. It was mainly concerned with <a href="http://www.nvidia.com/object/cuda_home_new.html" target="_blank">cuda</a>, which is Nvidia&#8217;s GPGPU framework. <a href="https://en.wikipedia.org/wiki/GPGPU" target="_blank">GPGPU</a> is about running common computations on the graphics card. The class also quickly covered <a href="https://www.khronos.org/opencl/" target="_blank">OpenCL</a>, OpenACC, C++AMP and MPI.</p>
<p>In the programming assignments, we juggled a lot with low level details such as distributing the work load to thread blocks, which I almost didn&#8217;t care about when using OpenCL so far. After seeing cuda and OpenCL, it was a little surprise, that C++AMP is indeed a more convenient programming model, and not just a C++ compiler for the graphics card. Let&#8217;s hope that it gets ported to other platforms soon.</p>
<p>The most eye opening revelation for me was, that it is possible to parallelize <a href="https://en.wikipedia.org/wiki/Prefix_sum" target="_blank">prefix sum computation</a>. When I was first presented with the problem, I thought that&#8217;s a showcase for serial execution. But apparently it&#8217;s not. <a href="http://http.developer.nvidia.com/GPUGems3/gpugems3_ch39.html" target="_blank">Making it parallel</a> is a two step process. First make a number of blocks, and compute the sum at the boundary for each one using something like a tree structure (in parallel). Once you have that, it&#8217;s more obvious, how to parallelize the rest.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ulrichard.ch/?feed=rss2&#038;p=903</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
