<?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>Marengo</title>
	<atom:link href="http://www.martyndavis.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.martyndavis.com</link>
	<description>Martyn&#039;s Development, Electronics &#38; Gadget Weblog</description>
	<lastBuildDate>Tue, 03 Apr 2012 06:02:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Motorcycle Digital Speedo With Arduino</title>
		<link>http://www.martyndavis.com/?p=311&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=motorcycle-digital-speedo-with-arduino</link>
		<comments>http://www.martyndavis.com/?p=311#comments</comments>
		<pubDate>Mon, 02 Apr 2012 16:25:39 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=311</guid>
		<description><![CDATA[The first part of a (very) occasional series which follows my creation of a digital speedo for my motorcycle. This is a project I&#8217;ve been thinking about, and working towards, on and off, for positively ages now. Work is really busy (need a website designing and building?), and with a (still relatively) new daughter to [...]]]></description>
			<content:encoded><![CDATA[<p>The first part of a (very) occasional series which follows my creation of a digital speedo for my motorcycle.<span id="more-311"></span></p>
<p>This is a project I&#8217;ve been thinking about, and working towards, on and off, for positively ages now. Work is really busy (<a title="http://www.marengo.cc" href="http://www.marengo.cc">need a website designing and building?</a>), and with a (still relatively) new daughter to fill in the gaps, my free time for the last eighteen months has been somewhat limited.</p>
<p>Apart from electronics projects, another work in progress is my motorcycle. It&#8217;s thirty-two years old, and, being a Honda, still runs really well. I do plan to strip it right down and re-paint the frame eventually. It also needs the occasional fix, for example the speedometer gave up the ghost last year, simply making a racket as the drive cable rotated around, presumably, a jammed shaft. I didn&#8217;t bother trying to fix it &#8211; I&#8217;d been thinking for a while how cool it would be to build an arduino-based circuit that counted wheel revolutions via a hall sensor and magnet to display speed.</p>
<p>My plans became more grandiose &#8211; I could also monitor engine revs, extrapolate the gear I&#8217;m in from the speed/revs, and have an electronic ignition lock. I actually built the first circuit. It worked really well on my desk, not so well on the bike. For one thing the ignition lock was based around a relay which would disconnect occasionally, stalling the bike. Also the 4×20 LCD display was too small and impossible to read in sunlight, and the rectangular project box that everything went in looked horrible on the bike.</p>
<p>I decided to pare back to essentials. Essentially I need a speedo, and I wanted it to look more in keeping. I decided I was going to use the original speedo housing, and add bright LEDs around the outside to show the speed, and have more in the middle to act as indicator, neutral and high-beam warning lights.</p>
<p>I started, with Eagle, to lay out the LEDs. I&#8217;d need twenty-seven to go around the outside to show speed in 5kph increments, another three for the warning lights, and then I thought maybe I&#8217;d add a <a title="http://uk.farnell.com/avago-technologies/hdsp-4832/led-bar-array-multicolor/dp/1003271" href="http://uk.farnell.com/avago-technologies/hdsp-4832/led-bar-array-multicolor/dp/1003271">ten-LED array</a> (from <a title="http://uk.farnell.com/" href="http://uk.farnell.com/">Farnell</a>) below them in case down the line I wanted to use it as a rudimentary tacho. Getting the LEDs arranged in a circle required a bit of a spreadsheet with sine and cosine calcs on it.</p>
<p>To drive 40 LEDs from one Arduino requires either a bit of jiggery pokery (Google &#8220;charlieplexing&#8221; if you&#8217;re interested) or, to cut the Gordian knot, simply buying a bit of extra hardware to do it. I opted for the latter given my lack of time. I went for the Maxim 7221 (from <a title="http://uk.farnell.com/" href="http://uk.farnell.com/">Farnell</a>, the link to the item is: <a title="http://uk.farnell.com/maxim-integrated-products/max7221cng/ic-led-display-driver-8dig-24dip/dp/1593381" href="http://uk.farnell.com/maxim-integrated-products/max7221cng/ic-led-display-driver-8dig-24dip/dp/1593381">http://uk.farnell.com/maxim-integrated-products/max7221cng/ic-led-display-driver-8dig-24dip/dp/1593381</a>). Information on linking this IC to an Arduino can be found <a title="http://arduino.cc/playground/Main/MAX72XXHardware" href="http://arduino.cc/playground/Main/MAX72XXHardware">here</a>. It basically allows you to drive 64 LEDs from the one chip, and you can daisy-chain them together. The Arduino communicates with it via <a title="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus" href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">SPI</a>, so it only ties up three pins no matter how many MAX7221s you have chained together.</p>
<p>I&#8217;ve been experimenting with etching my own circuit boards using the <a title="http://fullnet.com/~tomg/gooteepc.htm" href="http://fullnet.com/~tomg/gooteepc.htm">printer toner</a> and <a title="http://www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/" href="http://www.instructables.com/id/Stop-using-Ferric-Chloride-etchant!--A-better-etc/">HCl/H2O2</a> method with great success, so that&#8217;s what I used here.</p>
<p>The LEDs effectively sit in an array &#8211; obviously physically they can be laid out any way &#8211; and I was using single-sided copper-clad board as it&#8217;s DIY. Usually when laying out a circuit in Eagle when you&#8217;ve only got one side (or layer) of copper means a bit of tweaking here and there to allow &#8220;nets&#8221; or tracks to connect where there&#8217;s no route for them to do so &#8211; normally I&#8217;ll add a few zero-ohm resistors in the board layout to connect them (and use plain wire, of course, when building). I found laying this array out impossible like this though, so the easiest solution was to tell Eagle I was using double-sided board, and tell it to favour the bottom side, and I figured I&#8217;d just add wire on the top where the tracks were meant to be. That ended up a bit of a rat&#8217;s nest when I came to build it!</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2012/04/back.jpg"><img class="alignnone size-thumbnail wp-image-319" title="back" src="http://www.martyndavis.com/wp-content/uploads/2012/04/back-150x150.jpg" alt="" width="150" height="150" /></a>  <a href="http://www.martyndavis.com/wp-content/uploads/2012/04/front.jpg"><img class="alignnone size-thumbnail wp-image-320" title="front" src="http://www.martyndavis.com/wp-content/uploads/2012/04/front-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>I&#8217;m not proud of how this looks &#8211; but it works, which I was pleased with. I think if I had to lay out something like this with so many top-side connections again I&#8217;d experiment with using two single-sided boards and sandwiching them together, linked with through pins (&#8220;<a title="http://en.wikipedia.org/wiki/Via_(electronics)" href="http://en.wikipedia.org/wiki/Via_(electronics)">vias</a>&#8220;) where needed.</p>
<p>To control the 7221, I used the <a title="http://arduino.cc/playground/Main/LedControl" href="http://arduino.cc/playground/Main/LedControl">LedContol library</a> &#8211; which makes addressing each individual LED on the matrix as easy as just specifying a row and column. You can also control the intensity of the LEDs as well, which is nice. Here&#8217;s the thing running. The photo doesn&#8217;t do the display justice &#8211; it should be much easier to see the LEDs even in bright sunlight. The green LED in the middle will be the neutral indicator.</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2012/04/working.jpg"><img class="alignnone size-medium wp-image-321" title="working" src="http://www.martyndavis.com/wp-content/uploads/2012/04/working-300x273.jpg" alt="" width="300" height="273" /></a></p>
<p>Next time (when I get a chance!!) I&#8217;ll document building the &#8220;veroboarduino&#8221; driver and handling the inputs from the hall sensor to count wheel rotations and pick up the neutral, high-beam and indicator warning signals.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=311</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Linux Music with Guitarix &#8211; A Fix for High CPU Usage</title>
		<link>http://www.martyndavis.com/?p=306&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linux-music-with-guitarix-a-fix-for-high-cpu-usage</link>
		<comments>http://www.martyndavis.com/?p=306#comments</comments>
		<pubDate>Thu, 19 Jan 2012 09:04:37 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=306</guid>
		<description><![CDATA[A quick tip for those using the excellent Guitarix guitar effects program on Linux. I regularly found both cores of my machine up around the 90%-100% when that application was running, causing XRuns in Jack and clicks in outputted audio. I just found a way around it. For some really weird reason, SSHing into my [...]]]></description>
			<content:encoded><![CDATA[<p>A quick tip for those using the excellent Guitarix guitar effects program on Linux. I regularly found both cores of my machine up around the 90%-100% when that application was running, causing XRuns in Jack and clicks in outputted audio. I just found a way around it. For some <em>really weird</em> reason, SSHing into my main box from a separate, really underpowered netbook (an EEE701) with the &#8220;-X&#8221; flag, then running Guitarix from that machine, results in <strong>much</strong> lower CPU usage. It&#8217;s weird because Guitarix is still running on my main machine, it&#8217;s just <em>displayed</em> on the remote machine. Presumably something in the display code for Guitarix is a lot heavier than it should be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=306</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Ethernet Shield with Veroboarduino</title>
		<link>http://www.martyndavis.com/?p=284&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-the-ethernet-shield-with-veroboarduino</link>
		<comments>http://www.martyndavis.com/?p=284#comments</comments>
		<pubDate>Sat, 19 Nov 2011 10:46:02 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=284</guid>
		<description><![CDATA[In which I investigate whether I can connect an Arduino Ethernet shield to my Veroboarduino. Not as easy as I first thought it would be! Disclaimer: this post discusses using the Ethernet shield in a way for which it wasn&#8217;t designed. If you blow yours up experimenting, you&#8217;ll have to buy another one, not blame [...]]]></description>
			<content:encoded><![CDATA[<p>In which I investigate whether I can connect an Arduino Ethernet shield to my Veroboarduino. Not as easy as I first thought it would be!</p>
<p><span id="more-284"></span></p>
<p><span style="color: #999999;"><em>Disclaimer: this post discusses using the Ethernet shield in a way for which it wasn&#8217;t designed. If you blow yours up experimenting, you&#8217;ll have to buy another one, not blame me :)  However, mine still works OK.</em></span></p>
<p>So, the nice chaps at Farnell (<a href="http://uk.farnell.com" target="_blank">http://uk.farnell.com</a>) sent me an <a href="http://uk.farnell.com/arduino/a000031/board-arduino-ethernet-shield/dp/1848680" target="_blank">Arduino Ethernet shield</a> to play around with and review.  (Update: I see they now have a dedicated Arduino section at <a href="http://uk.farnell.com/arduino/" target="_blank">http://uk.farnell.com/arduino/</a>)</p>
<p>Reviewing a stock board is pretty boring &#8211; nice little Arduino box, free stickers etc. I plugged it on the top of my Uno, loaded up the Example &#8220;WebServer&#8221; program available from the IDE&#8217;s File→Examples→Ethernet→WebServer menu, set the IP address, subnet mask, MAC address (it&#8217;s the number on the sticker on the bottom of the board), uploaded the &#8220;sketch&#8221; and off it went. Immediately working. Like I say, it works out of the box &#8211; cool, but not very exciting to write about!</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2011/11/terminal.jpg"><img class="alignnone size-medium wp-image-291" title="terminal" src="http://www.martyndavis.com/wp-content/uploads/2011/11/terminal-300x205.jpg" alt="" width="300" height="205" /></a></p>
<p>However my mind immediately started thinking&#8230; it&#8217;s all very well playing with this, but what if I want to build this in to a finished project? If you&#8217;ve read previous posts which explain how to build an Arduino-compatible circuit, you&#8217;ll know there&#8217;s no point buying a new Arduino board each time you make a new invention. Prototype on your Arduino, then build a Veroboarduino to make it permanent. But how would you interface a shield such as this Ethernet shield to a Veroboarduino?</p>
<p>In my innocence my first thought would be that the shield just uses a few of the pins on the headers &#8211; find the pins, connect them appropriately, and off you go.</p>
<p>So firstly I built up a quick Veroboarduino on a breadboard for this test:</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2011/11/1.jpg"><img class="alignnone size-medium wp-image-285" title="1" src="http://www.martyndavis.com/wp-content/uploads/2011/11/1-300x170.jpg" alt="" width="300" height="170" /></a></p>
<p>On the board you can see the FTDI connector I use and a big LED. I ran the &#8220;blink&#8221; program to ensure everything was working OK. So far so good :)</p>
<p>First test &#8211; I connected +5V and GND from the breadboard to 5V and GND header sockets. My first problem! The ethernet shield&#8217;s &#8220;ON&#8221; LED wouldn&#8217;t light. Hmm&#8230; so how does it get its power? I tried all the GND and voltage sockets on the board &#8211; none of them would cause the shield to power up.</p>
<p>Then I realised that, as well as connecting to all the normal Arduino header sockets, there&#8217;s also a six-pin header socket under the shield which connects to the Arduino&#8217;s ICSP pins. Aha! The pinout of the Arduino&#8217;s ICSP header (the six pins by the reset button) are as follows (click the image to see it larger). Pay attention&#8230; we&#8217;ll revisit this later!</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2011/11/icsp.png"><img class="alignnone size-medium wp-image-287" title="icsp" src="http://www.martyndavis.com/wp-content/uploads/2011/11/icsp-300x48.png" alt="" width="300" height="48" /></a></p>
<p><em> (NOTE: this image shows the pins as if if you are looking down onto the top of an Arduino board. <strong>NOT the underside of the shield.</strong>)</em></p>
<pre> 1 - MISO
 2 - VCC (+5V)
 3 - SCK
 4 - MOSI
 5 - RESET
 6 - GND</pre>
<p>So pins 2 and 6 &#8211; I connected them to the power rails of my breadboard and the shield&#8217;s &#8220;ON&#8221; LED lit up. One success!</p>
<p>Now&#8230; what pins does the shield use?</p>
<p>This was a useful post on the Arduino forums, a chap called Rob Gray has compiled a list of shields and what pins they use: <a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286284349/5#5" target="_blank">http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286284349/5#5</a> (bottom post at time of writing).</p>
<p>According to his sheet,  the Ethernet shield uses the following pins: D2, D10, D11, D12, D13, A0 and A1.</p>
<p>So first I tried hooking these up, as one would..!  Expectantly I browsed to 192.168.1.7 (the IP address I&#8217;d assigned the board in the sketch). No response from the board. Hmmm.</p>
<p>Then I noticed Rob&#8217;s comment in the sheet on the Ethernet shield&#8217;s line: &#8220;<em>SPI signals picked up from the ISP header</em>&#8221;</p>
<p>The ICSP header actually just connects to pins on the Atmel chip &#8211; here&#8217;s where they go&#8230;</p>
<pre> MOSI - D11
 MISO - D12
 SCK  - D13
 RST  - RESET</pre>
<p>So, I figured I needed to connect up more than just the power to the shield&#8217;s ICSP input!  I didn&#8217;t bother with the RESET connection, but I attached the others. On the top of the shield I just kept D10 and D2 &#8220;passed through&#8221; to the D10 and D2 pins of the breadboard.</p>
<p>I ignored A0 and A1 which Rob&#8217;s sheet said were the other pins the shield uses &#8211; as I&#8217;d read elsewhere that these are used to control access to the SD card reader built into the Ethernet shield. I might experiment with this later but ignored them for the time being.</p>
<p>And&#8230; power up the circuit again, browse to 192.168.1.7, and I&#8217;m greeted with:</p>
<p><a href="http://www.martyndavis.com/wp-content/uploads/2011/11/online.jpg"><img class="alignnone size-medium wp-image-292" title="online" src="http://www.martyndavis.com/wp-content/uploads/2011/11/online-300x152.jpg" alt="" width="300" height="152" /></a></p>
<p>So, as a quick summary: to connect a Veroboarduino or breadboard Arduino to the Ethernet shield:</p>
<ul>
<li>Connect the ICSP sockets on the bottom of the shield as described above for power and data connections.</li>
<li>&#8220;Pass through&#8221; D10 and D2</li>
<li>A0 and A1 are used for SD card access (I didn&#8217;t connect them &#8211; I wasn&#8217;t using it &#8211; something to experiment with at a later date)</li>
</ul>
<div>Hope this helps&#8230; cheers!</div>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=284</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Re-Located</title>
		<link>http://www.martyndavis.com/?p=268&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=site-re-located</link>
		<comments>http://www.martyndavis.com/?p=268#comments</comments>
		<pubDate>Sun, 11 Sep 2011 09:34:19 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=268</guid>
		<description><![CDATA[This weblog is now running on its own domain &#8211; www.martyndavis.com. You should have been redirected here automatically if you clicked a link which went to the other address (www.marengo-ltd.com/blog/). Apache mod_rewrite settings, being somewhat of a black art, means it&#8217;s possible I&#8217;ve mucked something up :) If you see any problems with any pages [...]]]></description>
			<content:encoded><![CDATA[<p>This weblog is now running on its own domain &#8211; www.martyndavis.com. You should have been redirected here automatically if you clicked a link which went to the other address (www.marengo-ltd.com/blog/). Apache <strong>mod_rewrite</strong> settings, being somewhat of a black art, means it&#8217;s possible I&#8217;ve mucked something up :) If you see any problems with any pages you&#8217;re trying to access, just comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=268</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VeroBoardUino &#8211; Last Part &#8211; Burning a Bootloader and Uploading Programs</title>
		<link>http://www.martyndavis.com/?p=188&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=veroboarduino-last-part-burning-a-bootloader-and-uploading-programs</link>
		<comments>http://www.martyndavis.com/?p=188#comments</comments>
		<pubDate>Thu, 02 Jun 2011 08:22:44 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Veroboarduino]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=188</guid>
		<description><![CDATA[In which we burn an arduino boot loader onto the ATMega, and then upload our own programs. Note: this is the final part of a series of posts describing how to create an arduino-compatible board from scratch for very little money. You can find the previous posts here: Part 1 Part 2 Part 2.5 (circuit [...]]]></description>
			<content:encoded><![CDATA[<p>In which we burn an arduino boot loader onto the ATMega, and then upload our own programs.</p>
<p><span id="more-188"></span></p>
<p><em>Note: this is the final part of a series of posts describing how to create an arduino-compatible board from scratch for very little money. You can find the previous posts here:</em></p>
<p><em> <a href="http://martyndavis.com/?p=105">Part 1</a><br />
<a href="http://martyndavis.com/?p=133">Part 2</a><br />
<a href="http://martyndavis.com/?p=150">Part 2.5 (circuit and parts list)</a><br />
<a href="http://martyndavis.com/?p=168">Part 3</a> </em></p>
<h3>BURNING THE BOOTLOADER</h3>
<p>This section describes how you can easily burn a bootloader onto the stock ATMega chip in your new circuit using nothing more than your existing Arduino Uno (or older board), a few wires and one component. You do <strong>not </strong>need an external programmer device.</p>
<p><strong>Wait, what IS a bootloader??</strong> &#8211; Good question. The bootloader is a small program that is run whenever the chip starts up, and, for a few seconds, it waits and listens to see if you want to upload a new sketch. If it doesn&#8217;t get an upload, it just runs the sketch that&#8217;s already resident on the chip.</p>
<p><strong>N.B. it is possible to buy ATMega chips with the arduino bootloader already burned onto them (obviously they cost more). If you have one of these, you can skip down to &#8220;Uploading a Sketch to the Board&#8221;</strong></p>
<p>So, grab your &#8220;real&#8221; arduino and load up the normal arduino IDE on your computer. Load the ArduinoISP &#8220;sketch&#8221; from the <span style="color: #333399;"><span style="color: #993300;">File -&gt; Examples</span> </span>menu option and upload it. Now connect up your new circuit to your arduino according to the image below (click to show larger in a new window).</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/06/step8.jpg" target="_blank"><img class="alignnone size-medium wp-image-247" title="Bootloading" src="http://martyndavis.com/wp-content/uploads/2011/06/step8-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p>The picture might not be as clear as it might be with all those wires floating about, so here are the connections:</p>
<table>
<tbody>
<tr>
<td style="vertical-align: top; padding-right: 20px;"><strong>Arduino Pin</strong></td>
<td style="vertical-align: top;"><strong>New Board</strong></td>
</tr>
<tr>
<td style="vertical-align: top;">13</td>
<td style="vertical-align: top;">row 17, right hand side, on the stripboard (i.e. connects to pin 13)</td>
</tr>
<tr>
<td style="vertical-align: top;">12</td>
<td style="vertical-align: top;">row 16, right hand side, on the stripboard (i.e. connects to pin 12)</td>
</tr>
<tr>
<td style="vertical-align: top;">11</td>
<td style="vertical-align: top;">row 15, right hand side, on the stripboard (i.e. connects to pin 11)</td>
</tr>
<tr>
<td style="vertical-align: top;">10</td>
<td style="vertical-align: top;">hold this wire against the RESET pin when burning the bootloader (i.e. row 8, left-hand side)</td>
</tr>
<tr>
<td style="vertical-align: top;">5V</td>
<td style="vertical-align: top;">take to an external breadboard, and take another wire from the same breadboard track to the female header on the left side of the new board, row 8 (i.e. +5V)</td>
</tr>
<tr>
<td style="vertical-align: top;">GND</td>
<td style="vertical-align: top;">connect to the header on the left of the new board, row 6 (i.e. GND)</td>
</tr>
</tbody>
</table>
<p>Finally we need to add a component to defeat the &#8220;real&#8221; arduino&#8217;s auto-reset feature as this gets in the way of the bootloader-burning sketch. For an Arduino Uno (which I&#8217;m using), you&#8217;ll need to take a  capacitor (electrolytic, so make sure you have the polarity right) from the +5V we&#8217;ve got on the <strong>BREADboard</strong> (not the stripboard). Connect the other end of this to the Uno&#8217;s RESET socket. If you&#8217;re using an older arduino, I understand a 120 ohm resistor will work in place of the capacitor.</p>
<p>Once you&#8217;re all hooked up, and you&#8217;ve got the ArduinoISP sketch loaded on your &#8220;real&#8221; arduino, change the board on the IDE to the one you&#8217;re burning <strong>TO</strong> &#8211; I&#8217;m burning an ATMega 168 so I select &#8220;<span style="color: #993300;">Arduino Diecimila, Duemilanova or Nano w/ ATMega 168</span>&#8221; from the <span style="color: #800000;"><span style="color: #993300;">Tools -&gt; Board</span> </span>menu.</p>
<p>Then make sure you&#8217;re holding the reset wire (the white wire that&#8217;s labelled in the picture) against the RESET pin on your new board, and select <span style="color: #993300;">Tools -&gt; Burn Bootloader -&gt; w/ Arduino as ISP </span>from the menu.</p>
<p>If all is connected correctly, you should see the TX/RX lights on your &#8220;real&#8221; Arduino flash for a couple of minutes, then the IDE should report &#8220;<span style="color: #993300;">Done burning bootloader</span>&#8220;.</p>
<p>Congratulations &#8211; we&#8217;ve made an Arduino! Next step will be programming the thing.</p>
<h3>UPLOADING A SKETCH TO THE BOARD</h3>
<p>&#8220;Real&#8221; arduinos normally have a USB socket on them to allow you to connect the board to your computer to allow you to upload &#8220;sketches&#8221; (i.e. your programs). As this is a designed to be a dedicated circuit, adding extra USB circuitry would be a waste and an unnecessary complication.</p>
<p>Therefore we are going to need to use something to convert USB to serial (which is what the chip &#8220;speaks&#8221; natively). Here are a couple of suggestions:</p>
<p><a href="http://www.sparkfun.com/products/10008" target="_blank">http://www.sparkfun.com/products/10008</a> &#8211; this is the one I&#8217;m using, I&#8217;ve soldered male header pins onto it so it plugs directly into the serial header on the circuit we&#8217;ve made.</p>
<p>Alternatively there are complete cables, e.g.:<br />
<a href="http://www.sparkfun.com/products/9718" target="_blank"> http://www.sparkfun.com/products/9718</a><br />
or<br />
<a href="http://www.oomlout.co.uk/usb-serial-cable-33v-p-232.html" target="_blank">http://www.oomlout.co.uk/usb-serial-cable-33v-p-232.html</a></p>
<p>Both of the cables mentioned above have <strong>female</strong> ends &#8211; when using one of these I usually use a 6 pin male to male adapter I made by soldering two six pin male headers back-to-back to convert it to a male end. You could of course use a male header on the circuit we&#8217;ve just made, but it&#8217;s easier with the female header to connect up for bootloader burning etc. Your choice!</p>
<p>So, with my FTDI Basic Breakout board plugged into the serial connector on our board (note which way round it goes &#8211; &#8220;BLK&#8221; on the breakout board corresponds to row 6 (i.e. GND) and a USB mini cable connecting that to my PC, I should have be able to upload sketches. Note that on the IDE I need to select &#8220;Arduino Diecimila, Duemilanova or Nano w/ ATMega 168&#8243; as the board type (as I used an ATMega 168) and the serial port is different from the usual one that shows up for the Uno &#8211; it&#8217;s /dev/ttyUSB0 (I&#8217;m running this on Linux).</p>
<p>I could now load up the Blink &#8220;sketch&#8221; and upload. <strong>But here&#8217;s a little &#8220;gotcha&#8221;</strong> &#8211; we don&#8217;t have any way to automatically reset our new board when uploading &#8211; we&#8217;ve not connected up the required line on the serial connector. I haven&#8217;t bothered with this because, for some reason, I found it very temperamental, and older arduinos didn&#8217;t have an auto-reset anyway. But to upload a sketch the board needs to be reset (because, as I explained earlier, that&#8217;s the only time that the bootloader is listening).</p>
<p>So here&#8217;s how to upload without problems every time&#8230; hold down the reset button on your new circuit, press the upload button on the IDE (or press Ctrl-U), then, <strong>only when you see the message</strong> &#8220;<span style="color: #993300;">Binary sketch size: xxx bytes (of a xxxxx byte maximum)</span>&#8221; pop up in the bottom black window (indicating it&#8217;s compiled and is about to upload), immediately let go of the reset button. This ensures the board is reset at just the right time. If you timed it correctly, you should soon then see the &#8220;<span style="color: #993300;">Done uploading</span>&#8221; message, and you&#8217;re done!</p>
<p>Try testing your board with the Blink program and connecting pin 13 to an LED with suitable resistor.</p>
<p>I hope this little series has been useful &#8211; if you have any comments, suggestions or have spotted any errors then feel free to leave a comment. It&#8217;s been fun &#8211; cheers!</p>
<p>&#8212;</p>
<p><span style="color: #000000;">By the way, &#8220;Vero&#8221; is a trademark of Vero Technologies Ltd, UK.</span></p>
<p><span style="color: #000000;"><br />
The text and images in this series are Creative Commons licensed &#8211; if you wish to use them for non-commercial purposes, go ahead &#8211; please just prominently label what you use with a link back to this site!<br />
<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="license"><img style="border-width: 0;" src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" alt="Creative Commons Licence" /><br />
</a> This VeroBoardUino Tutorial is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="license">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=188</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>VeroBoardUino Part Three &#8211; Crystal and Final Connections</title>
		<link>http://www.martyndavis.com/?p=168&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=veroboarduino-part-three-crystal-and-final-connections</link>
		<comments>http://www.martyndavis.com/?p=168#comments</comments>
		<pubDate>Wed, 01 Jun 2011 11:43:08 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Veroboarduino]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=168</guid>
		<description><![CDATA[In which we add the crystal, finish wiring and insert the chip. This is part three of a short series describing in detail how to build an arduino clone from scratch for very little money.  You can find the previous parts here: Part 1 Part 2 Part 2.5 (circuit and parts list) CRYSTAL OSCILLATOR CIRCUIT [...]]]></description>
			<content:encoded><![CDATA[<p>In which we add the crystal, finish wiring and insert the chip.</p>
<p><span id="more-168"></span></p>
<p><em>This is part three of a short series describing in detail how to build an arduino clone from scratch for very little money.  You can find the previous parts here:</em></p>
<p><a href="http://martyndavis.com/?p=105">Part 1<br />
</a><a href="http://martyndavis.com/?p=133">Part 2<br />
</a><a href="http://martyndavis.com/?p=150">Part 2.5 (circuit and parts list)</a></p>
<h3>CRYSTAL OSCILLATOR CIRCUIT</h3>
<p>The crystal circuit is used to allow the ATMega chip to accurately time intervals.</p>
<p>Components required:</p>
<ul>
<li>1 × crystal &#8211; 16.0MHz U4 style low profile can</li>
<li>2 × 22pF ceramic capacitors</li>
</ul>
<p>See the picture below for placement. As you can&#8217;t see where the crystal&#8217;s legs are placed, I&#8217;ve marked which holes they are in by two red dots. For clarity I&#8217;ve also marked where the capacitors&#8217; legs attach also.</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step6.jpg" target="_blank"><img class="alignnone size-medium wp-image-118" title="step6" src="http://martyndavis.com/wp-content/uploads/2011/05/step6-234x300.jpg" alt="" width="234" height="300" /></a></p>
<p>For extra clarity, from the picture:</p>
<p>Capacitor &#8220;A&#8221; connects to rows 15 and 17<br />
Capacitor &#8220;B&#8221; connects to rows 15 and 16<br />
Crystal &#8220;C&#8221; connects to rows 16 and 17.</p>
<p>Note that the crystal&#8217;s legs are set too wide to span two adjacent rows &#8211; I&#8217;ve just bent them in so they fit &#8211; it means the crystal&#8217;s case doesn&#8217;t sit flush to the board, but that doesn&#8217;t matter.</p>
<p>None of these components have a polarity so it doesn&#8217;t matter which way round they go.</p>
<h3>FINAL CONNECTIONS</h3>
<p>We&#8217;ve got all the componentry on the board now (apart from plugging in the ATMega chip!). Now it&#8217;s just a question of making a few more connections. See the following image and follow the list below:</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/06/step7.jpg" target="_blank"><img class="alignnone size-medium wp-image-173" title="step7" src="http://martyndavis.com/wp-content/uploads/2011/06/step7-204x300.jpg" alt="" width="204" height="300" /></a></p>
<p>Wire &#8220;A&#8221; connects row 7 to row 22 &#8211; now 7 and 22 are at +5V.<br />
Wire &#8220;B&#8221; connects row 2 (GND) to 23. We now have power &#8220;rails&#8221; at the bottom of the board.<br />
Wire &#8220;C&#8221; connects 22 back to row 14 (left side), i.e. attaches the ATMega&#8217;s VCC pin to +5V.<br />
Wire &#8220;D&#8221; connects 23 back to row 15 (left side), i.e. attaches the ATMega&#8217;s GND pin to negative.</p>
<p>We also need to connect a couple of pins on the right side of the ATMega:</p>
<p>Wire &#8220;E&#8221; connects row 22 to 16 (right side), i.e. attaches the ATMega&#8217;s AVCC pin to +5V.<br />
Wire &#8220;F&#8221; connects row 23 to 14 (right side), i.e. attaches the ATMega&#8217;s other GND pin to negative.<br />
Capacitor &#8220;G&#8221; connects between the bottom power &#8220;rails&#8221;, i.e. row 22 &amp; 23.</p>
<p>Now&#8217;s probably a good time to list the pins of the chip in more detail. I&#8217;ll list them by the row number of the board, starting with the left side:</p>
<pre><span style="color: #808080;">Row Pin Description 
</span><span style="color: #808080;">8 RESET - we've wired this to the reset button 
</span><span style="color: #808080;">9 RXD (pin 0) - this connects to the serial connector on the left for uploading your "sketches".
10 TXD (pin 1) - again, connects to the serial connector.
11 pin 2
12 pin 3
13 pin 4
14 VCC - connected to +5V
15 GND - connected to negative
16 CLOCK1 - connected to the crystal
17 CLOCK2 - connected to the crystal
18 pin 5
19 pin 6
20 pin 7
21 pin 8</span></pre>
<p>Now the right side of the chip:</p>
<pre><span style="color: #808080;">Row Pin Description
8 Analogue pin 5
9 Analogue pin 4
10 Analogue pin 3
11 Analogue pin 2
12 Analogue pin 1
13 Analogue pin 0
14 GND - connected to negative
15 AREF - we're leaving this unconnected
16 AVCC - connected to +5V
17 pin 13
18 pin 12
19 pin 11
20 pin 10
21 pin 9</span></pre>
<p>As you&#8217;ll probably see, all the pin names are the ones available on your &#8220;real&#8221; arduino. So, for example, if we wanted to test the board using the &#8220;blink&#8221; sketch, we could hook up an LED (plus current limiting resistor) to pin 13 on <strong>row</strong> 17, right hand side (&#8220;real&#8221; arduino boards already have an LED connected) and test it.</p>
<h3>ADDING A HEADER FOR PIN-OUTS</h3>
<p>Normally if we&#8217;re building a dedicated circuit we&#8217;ll want to solder our connections to particular input / output pins on the ATMega directly to the stripboard. However for convenience of testing and burning the bootloader, I&#8217;m adding a small female header to the board. This step is optional, especially if you are using an ATMega which has already had an arduino bootloader burned onto it.</p>
<p>We&#8217;re essentially just exposing three pins &#8211; 13,12 and 11. Connect it to rows 17,18 and 19,  on the right hand edge of the stripboard.</p>
<p>Now plug the ATMega chip in, carefully, to its socket, making sure the little notch on the top edge matches the notch on the socket (i.e. at the top, nearest to the power supply circuit). Usually chips come with their feet splayed a little wider than the socket &#8211; just gently bend them in on a flat surface if this is the case. When you&#8217;re inserting the chip make sure none of the legs get folded under rather than going into their sockets &#8211; it&#8217;s an easy thing to do if you&#8217;re not careful.</p>
<p>So, we&#8217;re finished as far as the hardware is concerned. Here&#8217;s the finished product:</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/06/step7a.jpg" target="_blank"><img class="alignnone size-medium wp-image-180" title="step7a" src="http://martyndavis.com/wp-content/uploads/2011/06/step7a-203x300.jpg" alt="" width="203" height="300" /></a></p>
<p>-</p>
<p>And that wraps up this installment.  We now have a board which is almost ready. So the next post will be an interesting one &#8211; how to burn the bootloader, which a lot of people seem to have problems with (especially using an Uno to do so), and after that we can then cover how to upload our programs to it.</p>
<p><em>Next post is now up here:  <a href="http://martyndavis.com/?p=188">http://martyndavis.com/?p=188</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=168</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VeroBoardUino &#8211; Part 2.5 &#8211; Circuit Diagram and Parts List</title>
		<link>http://www.martyndavis.com/?p=150&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=veroboarduino-part-2-5-circuit-diagram-and-parts-list</link>
		<comments>http://www.martyndavis.com/?p=150#comments</comments>
		<pubDate>Wed, 01 Jun 2011 06:23:20 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Veroboarduino]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=150</guid>
		<description><![CDATA[It was suggested to me that I should publish the actual circuit diagram of this project, together with a parts list. Here it is! Stripboard, at least 23 tracks long and 14 holes wide LM7805 voltage regulator C1 &#38; C2 &#8211; 100μF 25V electrolytic capacitor C3 &#38; C4 &#8211; 100nF ceramic disc capacitor C5 &#38; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/circuit.png" target="_blank"><img class="size-medium wp-image-147 alignnone" style="margin-left: 0px; margin-right: 0px;" title="VeroBoardUino" src="http://martyndavis.com/wp-content/uploads/2011/05/circuit-300x281.png" alt="" width="300" height="281" /></a></p>
<p>It was suggested to me that I should publish the actual circuit diagram of this project, together with a parts list. Here it is!</p>
<p><span id="more-150"></span></p>
<ul>
<li>Stripboard, at least 23 tracks long and 14 holes wide</li>
<li>LM7805 voltage regulator</li>
<li>C1 &amp; C2 &#8211; 100μF 25V electrolytic capacitor</li>
<li>C3 &amp; C4 &#8211; 100nF ceramic disc capacitor</li>
<li>C5 &amp; C6 &#8211; 22pF ceramic disc capacitor</li>
<li>R1 &amp; R2 &#8211; 10K resistor</li>
<li>X1 &#8211; 16MHz crystal</li>
<li>Atmel ATMega168-20PU microcontroller*</li>
<li>28-Pin DIL Socket 0.3&#8243; Pitch</li>
<li>Momentary make push button</li>
<li>6 pin female header (you may want to make this male) **</li>
<li>Hookup wire</li>
</ul>
<p>* You could use a 328 rather than the 168 to give you extra capacity, it depends on the requirements of your application.</p>
<p>** As the board has no USB circuitry, to upload your programs you&#8217;ll need a USB to serial FTDI adapter or cable, e.g. <a href="http://www.sparkfun.com/products/10008">http://www.sparkfun.com/products/10008</a> &#8211; this is the one I&#8217;m using, I&#8217;ve soldered male header pins onto it so it plugs directly into the serial header on the circuit we&#8217;ve made.</p>
<p>Alternatively there are complete cables, e.g.: <a href="http://www.sparkfun.com/products/9718">http://www.sparkfun.com/products/9718</a> or <a href="http://www.oomlout.co.uk/usb-serial-cable-33v-p-232.html?zenid=b3297f914547cb4f9649318b7a95cf9a">http://www.oomlout.co.uk/usb-serial-cable-33v-p-232.html?zenid=b3297f914547cb4f9649318b7a95cf9a</a> &#8211; these have a female six pin end, which is why you might want the header on the board to be male instead of female.</p>
<p>-</p>
<p>If the circuit doesn&#8217;t mean much to you, keep following the posts &#8211; all will become clear!</p>
<p>Next Post: <a href="http://martyndavis.com/?p=168">http://martyndavis.com/?p=168</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=150</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>VeroBoardUino &#8211; Part Two &#8211; Serial Connector and Reset Button</title>
		<link>http://www.martyndavis.com/?p=133&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=veroboarduino-part-two-serial-connector-and-reset-button</link>
		<comments>http://www.martyndavis.com/?p=133#comments</comments>
		<pubDate>Tue, 31 May 2011 07:00:21 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Veroboarduino]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=133</guid>
		<description><![CDATA[This is part two of a short series on how to build your own arduino-compatible board from scratch.  You can find part one here: http://martyndavis.com/?p=105. HARDWARE Components required: 1 × 28-pin DIL socket (.3&#8243; pitch) suitable for ATMega chips 1 × 6-pin female header Solder the DIL socket (i.e. the socket for the ATMega chip) [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is part two of a short series on how to build your own arduino-compatible board from scratch.  You can find part one here: <a href="http://martyndavis.com/?p=105">http://martyndavis.com/?p=105</a>.</em></p>
<p><em><span id="more-133"></span><br />
</em></p>
<h3>HARDWARE</h3>
<p>Components required:</p>
<ul>
<li>1 × 28-pin DIL socket (.3&#8243; pitch) suitable for ATMega chips</li>
<li>1 × 6-pin female header</li>
</ul>
<p>Solder the DIL socket (i.e. the socket for the ATMega chip) across the line of 14 holes we cut vertically under the board. Make sure the little notch on the end of the socket is facing up, towards the power supply circuitry. This will act as a reminder for us when we insert the ATMega chip itself. Solder the female header on the left-hand column, from row 6 down, as per the image below (click to zoom in).</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step3.jpg" target="_blank"><img class="alignnone size-medium wp-image-115" title="step3" src="http://martyndavis.com/wp-content/uploads/2011/05/step3-253x300.jpg" alt="" width="253" height="300" /></a></p>
<p>The 6-pin female header (henceforth referred to as the serial connector) on the left will be the socket we use to program the device via the arduino IDE once the circuit is finished. I&#8217;ve labelled the sockets in figure 3 but you can ignore that for the time being. <strong>NOTE</strong> &#8211; if you already have an FTDI cable you may find it has a female end &#8211; you might wish to use a male header for the serial connector. I&#8217;ve chosen female as it makes it easier to hook up for burning the bootloader. If this means nothing to you don&#8217;t worry at this stage.</p>
<h3>RESET CIRCUIT</h3>
<p>Components required:</p>
<ul>
<li>Momentary push-to-make button</li>
<li>10K resistor (brown, black, orange)</li>
<li>2 × short connector wire</li>
</ul>
<p>Any momentary-make button will do. Connect it so it connects rows 4 and 6 when pressed. Row 6 will be connected to row 2, so is ground. Row four will be connected to the &#8220;Reset&#8221; pin on the ATMega, which will normally be held high via a 10k resistor. Most little buttons like this have four legs, two connected pairs. Make sure you have it the right way around otherwise rows 4 and 6 will be permantly connected regardless of whether the button is pressed or not.</p>
<p>Connect row 2 (GND, i.e. negative) to row 6 with a piece of hookup wire &#8211; &#8220;A&#8221; in the image below.</p>
<p>Use the 10K resistor to connect row 3 (+5V) to the reset pin on the ATMega (row 8, left side) &#8211; &#8220;B&#8221; in the image.</p>
<p>Connect row 4 to the reset pin also &#8211; &#8220;C&#8221; in the image.</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step4.jpg" target="_blank"><img class="alignnone size-medium wp-image-116" title="step4" src="http://martyndavis.com/wp-content/uploads/2011/05/step4-267x300.jpg" alt="" width="267" height="300" /></a></p>
<p>So it can be seen that when the button is pressed, the reset button is taken low (i.e. connected to GND) which will trigger a reset of the ATMega.</p>
<p>That&#8217;s the reset circuitry complete. We can&#8217;t test this yet as we have no chip inserted!</p>
<h3>SERIAL CONNECTOR</h3>
<p>This is here so we can upload &#8220;sketches&#8221; (i.e. arduino programs) to the board. By virtue of its position on the stripboard, the serial connector (the six-pin female header we&#8217;ve already soldered to the board) is half way connected. The pins, top to bottom, are as follows:</p>
<p>GND (currently connected, as row 6 is GND thanks to wire &#8220;A&#8221; in the previous step)</p>
<p>CTS (&#8220;Clear to Send&#8221;) &#8211; not used, we&#8217;ve cut its track already</p>
<p>VCC (i.e. +5V) &#8211; we need to connect this.</p>
<p>TX &#8211; needs to be connected to the RXD pin on the ATMega via a 10K resistor</p>
<p>RX &#8211; connected directly to the TXD pin on the ATMega, already connected as it&#8217;s on the same row.</p>
<p>RTS &#8211; not connected. We&#8217;ve already cut this track.</p>
<p>So we need to connect VCC &#8211; we do this with hookup wires &#8220;A&#8221; and &#8220;B&#8221; in the image below.</p>
<p>Also we connect TX to the ATMega&#8217;s RXD pin &#8211; that&#8217;s just a question of bridging a cut we&#8217;ve already made with a 10K resistor (&#8220;C&#8221; in the image).</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step5.jpg" target="_blank"><img class="alignnone size-medium wp-image-117" title="step5" src="http://martyndavis.com/wp-content/uploads/2011/05/step5-227x300.jpg" alt="" width="227" height="300" /></a></p>
<p>Once those connections are made, our serial connector is finished. Again, with no chip, we can&#8217;t test it yet.</p>
<p>Stay tuned&#8230; the next part is coming up in a day or so, where we&#8217;ll add a crystal to the circuit to allow the ATMega to time accurately, and we&#8217;ll make the rest of the connections.  After that the interesting stuff &#8211; burning the bootloader and programming the chip with your sketches!</p>
<p>The next post in this series can be found here: <a href="http://martyndavis.com/?p=150">http://martyndavis.com/?p=150</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=133</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VeroBoardUino &#8211; How to Build an Arduino-Compatible Board for Very Little Money</title>
		<link>http://www.martyndavis.com/?p=105&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=veroboarduino-how-to-build-an-arduino-compatible-board-for-very-little-money</link>
		<comments>http://www.martyndavis.com/?p=105#comments</comments>
		<pubDate>Mon, 30 May 2011 15:24:22 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Veroboarduino]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=105</guid>
		<description><![CDATA[Note: this was going to be one post but it&#8217;s ballooned into a huge thing so this is one of several which will be posted over the next few days.  Stay tuned! So you&#8217;ve got a nice Arduino board for experimentation and you&#8217;ve built a circuit on a breadboard which you&#8217;d like to make permanent. [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: this was going to be one post but it&#8217;s ballooned into a huge thing so this is one of several which will be posted over the next few days.  Stay tuned!</em></p>
<p>So you&#8217;ve got a nice Arduino board for experimentation and you&#8217;ve built a circuit on a breadboard which you&#8217;d like to make permanent.</p>
<p>It&#8217;s expensive (and overkill) to use a new arduino each time you build a new circuit you want to keep. Here&#8217;s how you can easily build an arduino-compatible board, from complete scratch, for a few pounds/dollars/euros so you can keep your real arduino for experimenting with&#8230;</p>
<p><span id="more-105"></span></p>
<p>I assume you already have an arduino (we&#8217;ll need it to program the arduino bootloader on the ATMega chip). You can get ATMega chips with the arduino boot loader burned in already, but I&#8217;ve even saved that expense and used a stock Atmel ATMega168-20PU (available in the UK for about £3, I got mine from <a href="http://www.bitsbox.co.uk/">http://www.bitsbox.co.uk/</a>), and we&#8217;ll cover burning the boot loader in a later post.</p>
<p>We start with the vero board (AKA stripboard). Stripboard is simply a board with copper tracks running across it, with pre-drilled holes in it. It&#8217;s simply a permanent version of a breadboard.</p>
<p>The stripboard we&#8217;re going to use should be a MINIMUM of 23 holes long (across the tracks) and 14 wide (along the tracks). This will make the board around 37mm wide and 58mm long &#8211; quite a bit smaller than a regular arduino. If you have space for it in your project, make the board bigger than this to avoid running out of space, particularly if you know you are going to need to add a lot of other components.</p>
<p>Cut the tracks on the board where indicated in the image below (click to zoom in) &#8211; you can use a &#8220;spot face cutter&#8221; or just a large-ish drill bit (which is practically all a spot face cutter is) for this. Use a magnifying glass or other aid to look closely to ensure that the track is completely severed. Brush away any little shreds of copper track.</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step1.jpg" target="_blank"><img class="alignnone size-medium wp-image-111" title="step1" src="http://martyndavis.com/wp-content/uploads/2011/05/step1-197x300.jpg" alt="" width="197" height="300" /></a></p>
<p>POWER</p>
<p>First we&#8217;ll build the power supply for the board. By building in sections, this allows us to test as we go along.</p>
<p>Like the real arduino, we want to be able to run the board from a battery or other input with a voltage of something between 7V to 12V (we&#8217;ll also be able to run it from USB&#8217;s 5V, this won&#8217;t be via the power supply though, it&#8217;ll be via the connection to the computer &#8212; see later posts for more details).</p>
<p>The component that allows us to generate regulated 5V (which all our circuitry requires) from the input is an LM7805 (see <a href="http://en.wikipedia.org/wiki/78xx" target="_blank">http://en.wikipedia.org/wiki/78xx</a>). The full list of components we&#8217;ll need are:</p>
<ul>
<li>1 × LM7805</li>
<li>2 × 100 µF, 25V electrolytic capacitors</li>
<li>1 × 100 nF ceramic capacitor</li>
</ul>
<p>Solder them on to the board as shown in the image below (click on it to zoom in). Note that the 7805&#8242;s heatsink should be on the right. Also note the electrolytic capacitors have a polarity so need to be connected the right way around. Usually there&#8217;s a stripe down the side of the barrel showing the negative and the positive lead is longer. The ceramic capacitor (100nF) can go either way round. Position of these components can be anywhere along the strips &#8211; I&#8217;ve opted to put them in the middle.</p>
<p><a href="http://martyndavis.com/wp-content/uploads/2011/05/step2.jpg" target="_blank"><img class="alignnone size-medium wp-image-121" title="step2" src="http://martyndavis.com/wp-content/uploads/2011/05/step2-300x274.jpg" alt="" width="300" height="274" /></a></p>
<p>We now already have a board that we can test. The input voltage will go to rows one and two &#8211; the top row is positive, and row two is negative. If all is working correctly, the regulated output voltage will be on rows 2 (negative) and three (positive, 5V). So to test this, I&#8217;ve temporarily soldered a 9V battery connector to rows 1 and 2. Position along the row is not important &#8211; but NOTE that if you get the polarity wrong you <strong>will</strong> fry the voltage regulator. You might want to consider incorporating a diode for reverse polarity protection, and maybe a PTC (resettable thermal fuse) for overload protection in case of short circuits. Both of these are outside the scope of this basic circuit.</p>
<p>Also you could consider putting an LED (with suitable resistor) across rows 2 &amp; 3 to show that the circuit is powered on. If this is going inside a box this may not be useful!</p>
<p>With 9V applied to rows 1 &amp; 2, my multimeter shows 5.04V across rows 2 &amp; 3 as expected, and 9V (from the battery) across 1 &amp; 2.</p>
<p>Stay tuned for part 2 of several, I promise they&#8217;ll be no more than a day or two apart!</p>
<p><em>Edit: Part two is now available; you can find it at <a href="http://martyndavis.com/?p=133">http://martyndavis.com/?p=133</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=105</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Ubuntu Unity &#8211; The Last Straw!</title>
		<link>http://www.martyndavis.com/?p=99&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-unity-the-last-straw</link>
		<comments>http://www.martyndavis.com/?p=99#comments</comments>
		<pubDate>Sun, 29 May 2011 11:29:41 +0000</pubDate>
		<dc:creator>Martyn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.martyndavis.com/?p=99</guid>
		<description><![CDATA[The whole point about Linux, surely, is that it gives freedom back to the user. So what&#8217;s with Ubuntu? I got used to the buttons suddenly going on the other side of the window bar in 10.04, but this whole Unity thing now has just pushed me a bit too far. Again, I know that [...]]]></description>
			<content:encoded><![CDATA[<p>The whole point about Linux, surely, is that it gives freedom back to the user.</p>
<p>So what&#8217;s with Ubuntu? I got used to the buttons suddenly going on the other side of the window bar in 10.04, but this whole Unity thing now has just pushed me a bit too far.</p>
<p><span id="more-99"></span>Again, I <strong>know</strong> that you can log in using &#8220;Ubuntu Classic&#8221; but soon Gnome 2.x will be gone and where are my options then?</p>
<p>I tried to like Unity, but (a) it&#8217;s buggy and (b) it&#8217;s virtually unconfigurable.  The menu at the top left of the screen, when you&#8217;re running at 1920 resolution and your window is in the bottom right of the screen is just madness. And those &#8220;hidden&#8221; scroll bars are driving me crazy.</p>
<p>Unity is clearly designed as a touch interface and for beginners. It just doesn&#8217;t work for power users. It&#8217;s a shame that Ubuntu feel they need to force it on their users instead of offering it as an option.</p>
<p>I was thinking about going for Linux Mint, which still has Gnome 2.x as their main desktop, but with Gnome 3.x coming how long before they make the leap? Besides, I&#8217;m too busy to re-install my machine from scratch again.</p>
<p>So finally I decided to run the following:</p>
<blockquote>
<pre>sudo apt-get install xfce4</pre>
</blockquote>
<p>I logged out, logged in again selecting XFCE as the desktop, and it&#8217;s made my day. Everything is configurable again, and opening a window feels really snappy. I&#8217;ve used XFCE before and am happy to see it&#8217;s always improving.</p>
<p>Still got those weird scrollbars, but I disabled those by running</p>
<blockquote>
<pre>sudo apt-get remove overlay-scrollbar liboverlay-scrollbar-0.1-0</pre>
</blockquote>
<p>and logging out and in again.</p>
<p>I&#8217;m happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.martyndavis.com/?feed=rss2&#038;p=99</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

