<?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>Struck By Lightning</title>
	<atom:link href="http://www.struckbylightning.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.struckbylightning.co.uk</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sun, 08 Apr 2012 05:18:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Camera Controller Design, Version 2</title>
		<link>http://www.struckbylightning.co.uk/2012/04/08/camera-controller-design-version-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=camera-controller-design-version-2</link>
		<comments>http://www.struckbylightning.co.uk/2012/04/08/camera-controller-design-version-2/#comments</comments>
		<pubDate>Sun, 08 Apr 2012 05:18:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.struckbylightning.co.uk/?p=5</guid>
		<description><![CDATA[Following on from my Instructable almost three years ago, I've been working on a significant overhaul of almost every aspect.  Initially the motivation was to save effort when making time lapse sequences, during the construction phase I decided to add triggering as well.  Because Nikon insists on using proprietary control ports, I went with a [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my <a href="http://www.instructables.com/id/Build-your-own-cheap-multi-function-wireless-ca/">Instructable</a> almost three years ago, I've been working on a significant overhaul of almost every aspect.  Initially the motivation was to save effort when making time lapse sequences, during the construction phase I decided to add triggering as well.  Because Nikon insists on using proprietary control ports, I went with a wireless control system.  This had the benefit of, well, being wireless, but in practical terms this wasn't particularly useful.</p>
<p>So, I thought about how to improve things in the future and I came up with the following:</p>
<ol>
<li>More inputs and outputs.  I'm aiming for two output ports that can control either a flashgun or a camera.  There should also be two inputs that will be used to connect to triggering mechanisms.</li>
<li>Graphic display.  It's a bit more pain to code, but it gives a lot more in the way of user interfacing</li>
<li>Rechargeable battery.  They're small, have high energy density and means I have an excuse for number 4.</li>
<li>USB connectivity.  Using a controller such as the <a href="http://www.ftdichip.com/Products/ICs/FT232R.htm">FT232</a>, it's possible to connect circuits up to computers with relative ease.  There are even <a href="http://bleyer.org/pyusb/">Python</a><a href="http://pypi.python.org/pypi/pylibftdi">libraries</a>!</li>
<li>Wireless capability.  Not so much of a real want, but something that could be cool as an added feature.  I'm going with <a href="http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01">Nordic's NRF2401</a> because it's fairly easy to interface.</li>
<li>AVR powered still!</li>
</ol>
<p>That's a fairly significant upgrade.  The next thing to think about is what chip to use?  The Atmega8/168/328 is fine, but now we're beginning to run out of ports.  I'll try to take advantage of serial connected parts to cut down on the number of IO ports needed, but I think in this case going one step up will be good.  This naturally leads to the Atmega32.  It has four full 8-pin ports which has the advantage of secondary functions (e.g. MOSI, MISO, SCK) having individual pins - no more sharing!</p>
<p>Most of the design and board work is, in fact, done, but I'm going to post this in updates to pretend I'm making a progress log.</p>
<p>Let's tackle each thing individually.  This post will focus on sketching out the pin requirements:</p>
<p><strong>Sensor Inputs - 4 (7)<br />
</strong></p>
<p>The sensor inputs will be 2.5mm stereo jacks.  Clearly each input is going to require at least one pin.  I'm going to retain the analogue sensing capability, so we need an ADC pin for each input channel.  External devices need power and so providing a line to VCC is a good idea.  It also occurred to me that some sensors might require talking to and the easiest way to do this would be via a one-wire connection.  Fortunately this can be done via the ADC line.  Power should probably be mediated by the AVR, so a transistor switch is in order.  That's four ports down.</p>
<p><strong>Camera/Flash Output - 2 (9)</strong></p>
<p>Again, these will be stereo 2.5mm jacks.  More detail later, but there will be two outputs and a ground return for each channel.  These will be controlled via optocouplers - old flashes are nasty!  Therefore we need 4 IO pins, however this can be reduced to 2 using a 2-4 line decoder.  Thanks, binary!</p>
<p><strong>Display - 3 (12)</strong></p>
<p>I've decided to use a serial connected OLED display from <a href="http://www.newhavendisplay.com/index.php?main_page=product_info&amp;cPath=119_577&amp;products_id=3539">NewHaven</a>.  Yes they're expensive, but the display quality is fantastic and hey, I'm paying for it.  They're also a lot thinner than the usual character displays which is rather convenient.  Using the 4-wire serial interface, we need 5 wires although two of those will be MOSI and SCK so really we need 3 (chip select, data/command select and reset).</p>
<p><strong>Switches - 6 (18)<br />
</strong></p>
<p>4-way directional input and two control buttons make for 6 inputs.  Two of those buttons should ideally be connected to interrupt pins to perform actions like cancelling something in progress.  Every 8 switches requires a minimum of 4 inputs, so for 6 switches you can claw back 2 IO ports using an 8-3 line encoder if you're running short.</p>
<p><strong>Programming Port</strong></p>
<p>Let's not forget that this requires MOSI, MISO, SCK and RESET to be connected.  But we're assuming those are reserved pins!</p>
<p><strong>USB - 4 (22)<br />
</strong></p>
<p>The FT232 requires 4 pins, two are the RX/TX data lines and clear-to-send/clear-to-recieve handshake lines.  We're on 22 pins already.</p>
<p><strong>Wireless - 2 (24)<br />
</strong></p>
<p>This requires two more pins, chip select and chip enable.  We could probably get by just tying chip enable to force the chip to stay on, but I prefer to have more control over the power.  MISO, MOSI and SCK are also needed.</p>
<p><strong>Status LEDs - 3 (27)</strong></p>
<p>I've gone with an RGB led this time, so that needs 3 outputs.</p>
<p>At this point we've used up 27 pins out of 32 possible.  What's left?  Well it would be nice to have some idea of how much voltage/current the chip is using.  For this purpose it's reasonable to use a dedicated external chip - <a href="http://www.ti.com/product/bq27425-G1">a fuel gauge</a> - which communicates via I2C.  So another 2 pins go to SDA and SCL.  We've got three pins left, probably better leave them for now - it's always a bad idea to saturate your pin count before you've started really working through the connections...</p>
<p>If things get dire, the FT232 has 4 configurable pins that can be used as GPIO in a pinch.</p>
<p>Next thing to think about is power!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.struckbylightning.co.uk/2012/04/08/camera-controller-design-version-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.struckbylightning.co.uk/2011/10/15/hello-world/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hello-world</link>
		<comments>http://www.struckbylightning.co.uk/2011/10/15/hello-world/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 00:56:36 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.struckbylightning.co.uk/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.struckbylightning.co.uk/2011/10/15/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.037 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-03 19:16:55 -->

