<?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>www.jhodges.co.uk</title>
	<atom:link href="http://jhodges.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://jhodges.co.uk</link>
	<description>I ain&#039;t not never done nothing to nobody and there ain&#039;t not no way none of that couldn&#039;t not never have happened. See?</description>
	<lastBuildDate>Thu, 04 Mar 2010 10:29:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DynDNS Lite!</title>
		<link>http://jhodges.co.uk/dyndns-lite/</link>
		<comments>http://jhodges.co.uk/dyndns-lite/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:47:18 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=269</guid>
		<description><![CDATA[As my IP address changes so rarely, my Dynamic DNS accounts keep expiring before the IP changes!

Here is a cron line to download my ip address from whatismyip.org and then upload it via ssh to a file on a server every hour!
00 * * * * curl whatismyip.org 2>/dev/null &#124; ssh user@server.tld "cat >ip.txt"
]]></description>
			<content:encoded><![CDATA[<p>As my IP address changes so rarely, my Dynamic DNS accounts keep expiring before the IP changes!<br />
<span id="more-269"></span></p>
<p>Here is a cron line to download my ip address from whatismyip.org and then upload it via ssh to a file on a server every hour!</p>
<p><code>00 * * * * curl whatismyip.org 2>/dev/null | ssh user@server.tld "cat >ip.txt"</p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/dyndns-lite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digikam in Ubuntu 9.10</title>
		<link>http://jhodges.co.uk/digikam-in-ubuntu-9-10/</link>
		<comments>http://jhodges.co.uk/digikam-in-ubuntu-9-10/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 22:34:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/digikam-in-ubuntu-9-10/</guid>
		<description><![CDATA[After installing Digikam on Ubuntu, I had no video thumbnails or ability to play video.

When trying to play a video I recieved the error &#8220;an error has occurred with the media player digikam&#8221; and on the terminal &#8220;xine is asking to seek behind the end of the data stream&#8221;
To resolve this I installed mplayer thumbs [...]]]></description>
			<content:encoded><![CDATA[<p>After installing Digikam on Ubuntu, I had no video thumbnails or ability to play video.<br />
<span id="more-268"></span></p>
<p>When trying to play a video I recieved the error &#8220;an error has occurred with the media player digikam&#8221; and on the terminal &#8220;xine is asking to seek behind the end of the data stream&#8221;</p>
<p>To resolve this I installed mplayer thumbs for the thumbnails and xine-ui to play the vids.</p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/digikam-in-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony: Propel VS Doctrine</title>
		<link>http://jhodges.co.uk/symfony-propel-vs-doctrine/</link>
		<comments>http://jhodges.co.uk/symfony-propel-vs-doctrine/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 08:58:23 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=259</guid>
		<description><![CDATA[A few days ago I started using Symfony.  I chose to use Propel as the ORM.  The ORM generates the PHP classes and database structure from your schema.

When I stared using Propel in PHP, it looked amazing, each db table has a php class representing it, with methods generated to set and get [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I started using Symfony.  I chose to use Propel as the ORM.  The ORM generates the PHP classes and database structure from your schema.<br />
<span id="more-259"></span><br />
When I stared using Propel in PHP, it looked amazing, each db table has a php class representing it, with methods generated to set and get the fields, and also to allow you to fetch foreign tables.  The propel query class offers a way to join and select from your database that returns these objects.  As everything is represented as automatically built classes, any good IDE will offer autocomplete with all you table and field names! <img src='http://jhodges.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Not to mention the SQL manipulation methods too!</p>
<p>However not far into it I discovered a problem, and quite a big one at that!!  Turns out there is a <a href=" http://propel.phpdb.org/trac/ticket/438">long standing bug</a> and kinda makes Propel suck.</p>
<p>Time to try Doctrine then&#8230;</p>
<p>Very similar to Propel in what it does, but generates quite a different class structure.  Auto complete does not work because of the &#8216;magic&#8217; methods it defines, and the way it chains commands together confuses my IDE (and me) about which object has been returned after each successive command. </p>
<p>However, it handles the situation that Peopel failed at quite gracefully and looks like it is much more flexible and powerful when it comes to complex SQL.</p>
<p>Its just a shame I&#8217;m having to spend ages referring to the manual and searching Google when autocomplete would have instantly showed me the command I needed. Yet another mountain added to the learning curve, but despite that it looks like Doctrine wins for its bug free (so far) and powerful SQL methods.</p>
<p>A couple of resources I found:<br />
<a href=" http://redotheweb.com/2008/07/08/comparing-propel-doctrine-and-sfpropelfinder/"></p>
<p>http://redotheweb.com/2008/07/08/comparing-propel-doctrine-and-sfpropelfinder/</a></p>
<p><a href="http://codeutopia.net/blog/2008/03/02/doctrine-vs-propel/">http://codeutopia.net/blog/2008/03/02/doctrine-vs-propel/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/symfony-propel-vs-doctrine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count unique IP address in Apache&#8217;s access log</title>
		<link>http://jhodges.co.uk/count-unique-ip-address-in-apaches-access-log/</link>
		<comments>http://jhodges.co.uk/count-unique-ip-address-in-apaches-access-log/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 23:14:43 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/count-unique-ip-address-in-apaches-access-log/</guid>
		<description><![CDATA[sed < /var/log/httpd/webtop.access_log -e 's/ .*$//' &#124; sort &#124; uniq -c
]]></description>
			<content:encoded><![CDATA[<pre>sed < /var/log/httpd/webtop.access_log -e 's/ .*$//' | sort | uniq -c</pre>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/count-unique-ip-address-in-apaches-access-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony Deploy Script</title>
		<link>http://jhodges.co.uk/symfony-deploy-script/</link>
		<comments>http://jhodges.co.uk/symfony-deploy-script/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 15:48:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=245</guid>
		<description><![CDATA[I&#8217;ve just started using the PHP framework, Symphony, after putting it off for far too long!
This seems to be the way to download and deploy symfony, and I&#8217;m sure I&#8217;m going to want to do it again so I took notes, here they are: 

cd PROJECT DIR
mkdir -p lib/vendor
cd lib/vendor/
curl -O http://www.symfony-project.org/get/symfony-1.2.8.zip &#124;&#124; wget http://www.symfony-project.org/get/symfony-1.2.8.zip
unzip [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just started using the PHP framework, Symphony, after putting it off for far too long!</p>
<p>This seems to be the way to download and deploy symfony, and I&#8217;m sure I&#8217;m going to want to do it again so I took notes, here they are: <img src='http://jhodges.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<span id="more-245"></span><br />
<code>cd PROJECT DIR<br />
mkdir -p lib/vendor<br />
cd lib/vendor/<br />
curl -O http://www.symfony-project.org/get/symfony-1.2.8.zip || wget http://www.symfony-project.org/get/symfony-1.2.8.zip<br />
unzip symfony-1.2.8.zip<br />
mv symfony-1.2.8 symfony<br />
rm symfony-1.2.8.zip<br />
cd ../..<br />
php lib/vendor/symfony/data/bin/check_configuration.php<br />
#nano /etc/php.ini</code></p>
<p>Thats pretty standard as far as I can tell, you may want to update the version numbers at some point and I&#8217;ve had to fall back to curl as my hosting company doesnt include wget.  This first block can most likley be ran as a script to get symfony setup.  The following blocks of commands will probably need a bit more thought and changing some paramaters and config files.  There are here for me only as a cheat sheet really.</p>
<p>Next creating the project, frontend and configuring the database:</p>
<p><code>php lib/vendor/symfony/data/bin/symfony generate:project NAME<br />
php symfony generate:app --escaping-strategy=on --csrf-secret=SECRET frontend<br />
php symfony configure:database "mysql:host=localhost;dbname=DBNAME" DBUSER DBPASS<br />
#edit schema or build it<br />
php symfony propel:build-schema<br />
#edit test data or dump it<br />
php symfony propel:data-dump > data/fixtures/test.yml</code></p>
<p>Now to build everything + an app and a module</p>
<p><code>php symfony propel:build-all --no-confirmation<br />
php symfony cache:clear<br />
php symfony propel:data-load<br />
php symfony propel:generate-module --with-show --non-verbose-templates APPNAME MODULE-NAME MODEL-NAME<br />
php symfony propel:generate-admin APP MODEL-NAME --module=MODULE-NAME</code></p>
<p>I&#8217;ll also list any useful sites I come across while learning symfony</p>
<ul>
<li><a href="http://symfony-check.org/">Check if your symfony application is ready for deployment</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/symfony-deploy-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shaven pussy, giant cock!</title>
		<link>http://jhodges.co.uk/shaven-pussy-giant-cock/</link>
		<comments>http://jhodges.co.uk/shaven-pussy-giant-cock/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 10:43:22 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Randum/Funny]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=233</guid>
		<description><![CDATA[As promised&#8230;



What? What were you expecting to see?



]]></description>
			<content:encoded><![CDATA[<p>As promised&#8230;<br />
<span id="more-233"></span></p>
<div style="float:left">
<img src="http://www.jhodges.co.uk/media/shaven-pussy-giant-cock/shaven-pussy.jpg" alt="shaven pussy" /><br />
<strong>What? What were you expecting to see?</strong>
</div>
<p><img style="float:left" src="http://www.jhodges.co.uk/media/shaven-pussy-giant-cock/giant-cock.jpg" alt="giant cock" /></p>
<div style="clear:both;height:20px;"></div>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/shaven-pussy-giant-cock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu &#8211; Purge configuration files for removed packages</title>
		<link>http://jhodges.co.uk/ubuntu-purge-configuration-files-for-removed-packages/</link>
		<comments>http://jhodges.co.uk/ubuntu-purge-configuration-files-for-removed-packages/#comments</comments>
		<pubDate>Tue, 26 May 2009 11:24:05 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=224</guid>
		<description><![CDATA[This bash command will remove the left over config files from old packages that were removed with &#8220;apt-get remove&#8221;.
dpkg -l &#124; awk '/^rc/ {print $2}' &#124; xargs sudo dpkg --purge
See the source article for an explanation of how it works.
]]></description>
			<content:encoded><![CDATA[<p>This bash command will remove the left over config files from old packages that were removed with &#8220;apt-get remove&#8221;.</p>
<p><code style="padding:10px;border:1px solid #4f4;background:#dfd;">dpkg -l | awk '/^rc/ {print $2}' | xargs sudo dpkg --purge</code></p>
<p>See the <a href="http://ascending.wordpress.com/2007/04/10/apt-tip-purge-removed-packages/">source article</a> for an explanation of how it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/ubuntu-purge-configuration-files-for-removed-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote control car speedometer V2</title>
		<link>http://jhodges.co.uk/remote-control-car-speedometer-v2/</link>
		<comments>http://jhodges.co.uk/remote-control-car-speedometer-v2/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 13:59:59 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=196</guid>
		<description><![CDATA[After my semi successful prototype of my remote control car speedometer project using a reed switch, I&#8217;m back with version 2, this time using a hall effect sensor.
 The same principle applies as before, there is a magnet on the wheel that passes the sensor each revolution allowing the speed to be calculated. However the [...]]]></description>
			<content:encoded><![CDATA[<p>After my semi successful prototype of my <a href="/remote-control-car-speedometer/">remote control car speedometer project using a reed switch</a>, I&#8217;m back with version 2, this time using a hall effect sensor.</p>
<p><span id="more-196"></span> The same principle applies as before, there is a magnet on the wheel that passes the sensor each revolution allowing the speed to be calculated. However the hall affect sensor is quite different from a reed switch. The reed switch is either on or off depending on whether it&#8217;s been activated by a magnetic field. The hall effect sensor gives an analogue output measuring the strength and polarity of a magnetic field. This required a rewrite of the software, including a calibration function, and I also added some goodies while I was there.</p>
<p>I used my <a href="/stripboard-arduino-sd-card/">strip board Arduino SD card writer</a> for the main board for this project. I designed it with this project in mind so it already has three connectors to allow the hall effect sensor to be connected.</p>
<p>Calibration only needs to be done once, unless any of the hardware is changed or replace, and is performed by holding down the button whilst powering up the device. The magnet must be away from the sensor during this process. This takes a reading and stores the value to the ATmegas EEPROM. This is our baseline value, and as the wheel rotates and the magnet passes the sensor the current reading will stray from this baseline value, and we log the milliseconds taken since the last rotation to the memory card. There is a bit more maths and logic involved to try and reduce false readings, but I won&#8217;t go into details here.</p>
<p>If the card is not present or failed to initialise the LED will flash constantly signifying a problem. Once the system is initialised the LED will flash once every time the magnet passes the sensor, and will also be logging this information to the card.</p>
<p>Before the card is removed the button must be held down until the LED is constantly lit, this flushes (writes) any data that has not yet been written to the card, much like un-mounting/ejecting your USB stick or memory cards before removing them from the computer.</p>
<p>The other goodies I mentioned is a race and driver selector. Pressing the button will mark the end of the current race and the beginning of the next race. The number of times the button is pressed in succession indicates which driver will be racing next. When reading the data into the computer this allows the data to be split into separate graphs for each race and they can also labelled with who was racing. An example follows of the results of me testing this functionality&#8230;</p>
<style>
	table.racestats{
		border:1px solid #000;
	}
	table.racestats th{
		background:#444;
		color:#fff;
		padding:2 5 2 5;
	}
	table.racestats td{
		text-align:right;
		background:#ccc;
		padding:2 5 2 5;</p>
<p>	}
</style>
<table class="racestats">
<tr>
<th>Race #</th>
<th>Driver #</th>
<th>Race Time (Secs)</th>
<th>Top Speed (MPH)</th>
<th>Avg Speed (MPH)</th>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>5.80</td>
<td>4.89</td>
<td>4.47</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>12.16</td>
<td>7.21</td>
<td>5.49</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>11.61</td>
<td>4.82</td>
<td>3.14</td>
</tr>
<tr>
<td>4</td>
<td>1</td>
<td>3.23</td>
<td>4.09</td>
<td>3.77</td>
</tr>
</table>
<p>The graphs have been omitted, but this data table would be accompanied by four graphs, one for each race.</p>
<p>Time for a road test&#8230;.</p>
<p><img src="/media/speedo2/car.jpg" alt="car with speedo" /></p>
<p>I mounted the device to the car, wired it up and power it on, and it initialised fine. I had a spin up and down the road and came back, pressed the button to start a new race with another driver number and had another spin, I did this several times with various different driver numbers and then flushed the buffer to the card. I took the card out and put it in my computer expecting to see quite a few different race graphs. I was only shown two races and graphs, one looked a complete mess and the other didn&#8217;t really have much data on it at all. Here is the messy graph&#8230;</p>
<p><img src="/media/speedo2/graph1.png" alt="graph" /></p>
<p>Not a lot of use, and I&#8217;m fairly sure it wasn&#8217;t doing 700 mph. After a bit of an investigation I found the cause was electromagnetic interference from the car&#8217;s motor or speed controller interfering with the readings from the sensor, also possibly interfering with the data being written to the card. I tried mounting the board in a grounded tin but that did not seem to help much. What seem to help most was moving the board away from the cars electronics and also twisting the hall effect sensors output signal wire with the ground wire. I also shortened the wires as much as possible.</p>
<p>Finally I got a sensible graph of me doing top speed, and here it is&#8230;</p>
<p><img src="/media/speedo2/graph2.png" alt="graph" /></p>
<p>The points that look like they&#8217;re in the wrong place, being much lower than the points around them are because a reading is missed every time a sector is written to the SD card. I&#8217;m sure this anomaly can probably be hidden in the software somehow, but are not overly concerned with this at the moment.</p>
<p>Still a fair bit of work to do, but a definite improvement on the first version which was unable to measure my top speed.  Occasionally I seem to get no, or random data on the card and also my average speed calculation is far from accurate, but all things that I think have relatively easy solutions.</p>
<p>I guess I need to find some other drivers now and we can do some time trials and compare results <img src='http://jhodges.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/remote-control-car-speedometer-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stripboard Arduino &amp; SD Card</title>
		<link>http://jhodges.co.uk/stripboard-arduino-sd-card/</link>
		<comments>http://jhodges.co.uk/stripboard-arduino-sd-card/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 18:52:21 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=183</guid>
		<description><![CDATA[I love my Arduino development board and have done some interesting experiments with it, and now I am at the stage of wanting to make some of my circuits a bit more independent and permanent, mainly so I can continue to use development board for tinkering with while leaving my other projects in a working [...]]]></description>
			<content:encoded><![CDATA[<p>I love my Arduino development board and have done some interesting experiments with it, and now I am at the stage of wanting to make some of my circuits a bit more independent and permanent, mainly so I can continue to use development board for tinkering with while leaving my other projects in a working state. The mind, body and soul of the Arduino is the ATmega168 chip, which contains all the memory, processor, analogue to digital converters and pretty much everything else. As these chips can be picked up for only a couple of pounds I thought I would have a go at making a stand alone unit to log data to an SD card&#8230;</p>
<p><span id="more-183"></span>I have made an SD card module for my Arduino before, so this is really about getting the ATmega chip powered up and running and interfacing to the module, for more information about the SD card project and the software involved see my <a href="http://www.jhodges.co.uk/sd-card-and-arduino/">SD card and Arduino</a> post.</p>
<p><img src="/media/stripboard-arduino/front1.jpg" alt="" /><img src="/media/stripboard-arduino/back1.jpg" alt="" /></p>
<p>At this stage it is pretty generic, all that it consists of is a power supply (5 V regulator, protective diode and resettable fuse, and a couple of smoothing capacitors), a 16 MHz crystal with two capacitors, and  the ATmega168 chip whith a 10 KΩ pull up resistor on the reset pin, I chose not to have a reset button but this could easily be added. This seems quite a nice layout and could be a good starting point for many different projects. Most of the chips Digital I/O pins are accessible, and so are all of the analogue input pins.</p>
<p>One thing the development board does give you is a USB port, allowing easy programming of the chip. To programme this chip I simply pop the chip out of its socket and place it back in the development board, upload the programme and then pop the chip back into my board.</p>
<p><img src="/media/stripboard-arduino/front2.jpg" alt="" /><img src="/media/stripboard-arduino/back2.jpg" alt="" /></p>
<p>Here I have added a pushbutton and LED with 330 Ω resistor to digital I/O pin zero and one respectively.  You pretty much always need some sort of input and output, these were very useful during debugging, and essential for communication between the running programme and the user. The pushbutton does not need a pull up resistor as the ATmega168 has internal pull up resistors that can and will be enabled in my code.  I have also added three connectors to allow external access to ground and 5 V, and also analogue input zero.</p>
<p><img src="/media/stripboard-arduino/front3.jpg" alt="" /><img src="/media/stripboard-arduino/back3.jpg" alt="" /></p>
<p>This next stage shows the connector to mount my SD card socket onto. It is actually half a chip socket that I have cut up, bent the pins slightly and tinned. There are also three voltage dividers used to drop the 5 V output logic from the ATmega down to the 3.3 V required for the SD card.</p>
<p>I ran into a bit of a problem at this point, in my haste to build this circuit and as I had also made an SD card module for my Arduino before I didn&#8217;t test this part when building the prototype. This was a big mistake! What I had done was used the same voltage divider method to drop the 5 V supply voltage down to 3.3 V to supply the SD card, however it turns out that this is not a good thing to do, it is fine for the logic but not the supply. The voltage isn&#8217;t particularly stable, as when the internal resistance of the card changes it upsets the ratio of the resistance in the divider.</p>
<p>After muttering some obscenities and returning to the prototyping board I found a 22 µF or greater capacitor across ground and 3.3 V helped slightly, allowing the MMC library to initialise, but failing at the second hurdle now with the microfat library failing to initialise.  I somehow needed a very stable 3.3 V supply. I didn&#8217;t really really want another voltage regulator on my circuit, then I remembered our good old friend the zener diode! Using a 3.3 V reverse biased zener as the lower side of the voltage divider and a smaller resistor above (47 Ω) I was able to achieve a steady voltage, and the card initialised perfectly.</p>
<p><img src="/media/stripboard-arduino/front4.jpg" alt="" /> <a href="/media/stripboard-arduino/schematic.gif"><img src="/media/stripboard-arduino/schematic-thumb.gif" alt="" /></a></p>
<p>So here it is now with the card holder and card attached, all working and tested. It is probably a bit hard to follow the wiring from the photographs, so I have also included schematic. This is a nice compact but minimal package, with a lot of the input pins available for reading data and a card to log that data to. I can imagine many uses for this, and there is even a little bit of space on the board for a fewer additional components should they be required.</p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/stripboard-arduino-sd-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laser Show Prototype</title>
		<link>http://jhodges.co.uk/laser-show-prototype/</link>
		<comments>http://jhodges.co.uk/laser-show-prototype/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 23:01:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://www.jhodges.co.uk/?p=162</guid>
		<description><![CDATA[I&#8217;ve recently acquired a laser pen, and of course, instantly dismantled it! I bypassed the push button and soldered on a couple of wines replacing the batteries, allowing it to be powered and controlled by the Arduino.

I wanted it to wobble about in a random fashion, so I mounted it on a spring and attached [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently acquired a laser pen, and of course, instantly dismantled it! I bypassed the push button and soldered on a couple of wines replacing the batteries, allowing it to be powered and controlled by the Arduino.</p>
<p><span id="more-162"></span><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/hI21BXg7zJw&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hI21BXg7zJw&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>I wanted it to wobble about in a random fashion, so I mounted it on a spring and attached the spring to a motor.  I powered up both the laser and the motor and let the show begin! It wasn&#8217;t bad for the initial test, but before long it seemed to get into a repetitive loop drawing just a figure of eight or other mundane but curvy shapes.</p>
<p>To add some extra randomness to it I programmed the Arduino to randomly turn on and off the motor, which seemed to do the job quite nicely and is shown in the video above. It does not look as good on video as it does in real life, this is due to limitations caused by the relatively slow frame rate of the camera. Oh how I wish I could justify buying a high speed camera <img src='http://jhodges.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The next step will be to make it a bit smoother, hopefully quieter, and get it displaying on a wall outside during the night. Stay tuned to see how that goes!</p>
]]></content:encoded>
			<wfw:commentRss>http://jhodges.co.uk/laser-show-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
