<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2402893620308474936</id><updated>2011-07-30T12:38:58.104-05:00</updated><category term='hacking'/><category term='first post'/><category term='PIC'/><category term='Internet'/><category term='China'/><category term='Camera'/><category term='RF'/><category term='Projects'/><title type='text'>HAL's Hangout</title><subtitle type='html'>I'm sorry, Dave... I'm afraid I can't do that.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-8896672994966649288</id><published>2010-06-19T08:27:00.002-05:00</published><updated>2010-06-19T08:30:28.117-05:00</updated><title type='text'>Rain Barrels - Part V(b) - We've Got A Leak</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Checked the barrels early this morning. The water level looked to be almost exactly where it was last night. While I was pondering what the odds were that the rain had stopped exactly when I'd taken that last picture, I heard it:&lt;br /&gt;&lt;br /&gt;~Thwup~&lt;br /&gt;&lt;br /&gt;Then, about fifteen seconds later:&lt;br /&gt;&lt;br /&gt;~Thwup~&lt;br /&gt;&lt;br /&gt;Yep, it was the sound of water falling onto a piece of cardboard. I took a quick look and it seems to be coming from one of the bushings where I used the Extreme glue. I'm going to have to pump the water to below the hose level and then slather some Goop on - hopefully that will do the trick.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-8896672994966649288?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/8896672994966649288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=8896672994966649288' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8896672994966649288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8896672994966649288'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-vb-weve-got-leak.html' title='Rain Barrels - Part V(b) - We&apos;ve Got A Leak'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-585143376211747431</id><published>2010-06-19T00:20:00.003-05:00</published><updated>2010-06-19T00:29:54.214-05:00</updated><title type='text'>Rain Barrels - Part V(a)</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;It's been about three and a half hours since I took the last set of pictures. It hasn't been raining much anymore (the occasional bout of drizzle) but I thought I'd go take a look at the barrels just before I went to bed. This is what I found:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBxUN_PRDTI/AAAAAAAAAf8/GsiDm2nkLF0/s1600/SMALL-DSC02865.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBxUN_PRDTI/AAAAAAAAAf8/GsiDm2nkLF0/s320/SMALL-DSC02865.JPG" alt="" id="BLOGGER_PHOTO_ID_5484351045520919858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I thought the Sharpie had worn off until I noticed that the interconnect was now under water. If you look on the left hand side, you can still see the Sharpie line from earlier, it's now well below the surface!&lt;br /&gt;&lt;br /&gt;A quick check in the other two barrels and it looks like the water levels are up in all three of them (obviously, it'd need to be up in the middle one)!&lt;br /&gt;&lt;br /&gt;So, if there are any leaks, it looks like they're slower than the rate that water is going into the barrel right now. The grey fuzz that's floating on the water is plastic shavings from cutting holes in one of the other two barrels - it must have migrated over through the hose.&lt;br /&gt;&lt;br /&gt;I'm hoping it's coincidence that the water is at the level of the spigot, and not that the spigot is leaking or open right now. It's too dark to check, I'll look at it in the morning.&lt;br /&gt;&lt;br /&gt;Like I said, the rain hasn't been coming down in sheets or anything - more just a gloomy drizzle than anything. If the water has risen that much in less than four hours from that kind of rain, I'm pretty sure the overflow is going to get some exercise when it rains hard!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-585143376211747431?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/585143376211747431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=585143376211747431' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/585143376211747431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/585143376211747431'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-va.html' title='Rain Barrels - Part V(a)'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ci7z-qEWjJE/TBxUN_PRDTI/AAAAAAAAAf8/GsiDm2nkLF0/s72-c/SMALL-DSC02865.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-3995028398586212009</id><published>2010-06-18T21:22:00.007-05:00</published><updated>2010-06-18T21:57:55.955-05:00</updated><title type='text'>Rain Barrels - Part V</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;It rained all day again today. There was a bit of a lull this evening where it had slowed down to a drizzle, so I took advantage of it and went out to get some work done.&lt;br /&gt;&lt;br /&gt;First thing was to move the barrels into a mock-up of where they were going to go. That showed me that I'd cut the interconnect hoses too long - easy enough to fix. With the hoses shorter, I slathered some Goop on the exposed ends and stuck the hoses on, then tightened the pipe clamps.Then out came the hacksaw and shears and I cut the downspout about five feet off the ground. I slid the lower section down a bit but kept it on the side of the house in case something doesn't work and we need to go back to the old stuff quickly. I screwed a plastic formable elbow (think of the bendy part in a bendy straw) to the downspout, then bent it and screwed the piece that used to direct the water away from the house to it. Not pretty, but it's been working for, oh, 40 minutes so far.&lt;br /&gt;&lt;br /&gt;After the downspout was done, Mrs. HAL helped me shuffle the barrels into position. The ground was making sucking squishing sounds each time we stepped and when we were done, the barrels weren't exactly level. By this point I was wet and what seemed like every mosquito in the world was flying around me, waiting for their opportunity to bite so I didn't really care that the barrels weren't perfectly level.So, with the hoses on and the barrels in place, Mrs. HAL and I hauled over the two garbage cans we put out last night to collect water off the garage roof. We poured them into the centre barrel just to see what would happen. We were rewarded with happy gurgling in stereo - the water was flowing into the outer two barrels:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBwsTTKUqLI/AAAAAAAAAes/h2BtcZqeGRg/s1600/SMALL-DSC02847.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBwsTTKUqLI/AAAAAAAAAes/h2BtcZqeGRg/s320/SMALL-DSC02847.JPG" alt="" id="BLOGGER_PHOTO_ID_5484307156303128754" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBwsTlNviGI/AAAAAAAAAe0/ipb3-jfE0dg/s1600/SMALL-DSC02848.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBwsTlNviGI/AAAAAAAAAe0/ipb3-jfE0dg/s320/SMALL-DSC02848.JPG" alt="" id="BLOGGER_PHOTO_ID_5484307161149311074" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;While I had the camera out, I grabbed a picture of the middle barrel:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwsUGuu3wI/AAAAAAAAAe8/9HDm5HrpaCE/s1600/SMALL-DSC02849.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwsUGuu3wI/AAAAAAAAAe8/9HDm5HrpaCE/s320/SMALL-DSC02849.JPG" alt="" id="BLOGGER_PHOTO_ID_5484307170146049794" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;It sounds silly, but it was great to see water moving between the barrels.&lt;br /&gt;&lt;br /&gt;The next thing to take care of was connecting the overflow hose. Unfortunately, the hoses that come with the barrels aren't very long, so I used the overflow "T" from one of the outside barrels, some electrical tape, and a nitrile glove to connect the two hoses together - this made it just long enough to reach the front yard:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBwsUbPS4vI/AAAAAAAAAfE/xQuuj2Soumg/s1600/SMALL-DSC02850.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBwsUbPS4vI/AAAAAAAAAfE/xQuuj2Soumg/s320/SMALL-DSC02850.JPG" alt="" id="BLOGGER_PHOTO_ID_5484307175651336946" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwsU-n7KaI/AAAAAAAAAfM/h8KLCI8ECTU/s1600/SMALL-DSC02851.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwsU-n7KaI/AAAAAAAAAfM/h8KLCI8ECTU/s320/SMALL-DSC02851.JPG" alt="" id="BLOGGER_PHOTO_ID_5484307185149880738" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBwtsQ_HPJI/AAAAAAAAAfU/dpcKGaadvzk/s1600/SMALL-DSC02852.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBwtsQ_HPJI/AAAAAAAAAfU/dpcKGaadvzk/s320/SMALL-DSC02852.JPG" alt="" id="BLOGGER_PHOTO_ID_5484308684727598226" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Having the overflow hose out on the front lawn (even if it's just a little ways out) will help lessen the swampiness at the back and side of the house. With luck, more than moss and weeds will grow there someday...&lt;br /&gt;&lt;br /&gt;The wet conditions made it impossible to check for leaks so I grabbed a Sharpie and drew where the water level was when we finished up today:&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBwtsun9fWI/AAAAAAAAAfc/j3PqeAkOlIw/s1600/SMALL-DSC02854.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBwtsun9fWI/AAAAAAAAAfc/j3PqeAkOlIw/s320/SMALL-DSC02854.JPG" alt="" id="BLOGGER_PHOTO_ID_5484308692683554146" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;If everything works the way it should (and if it keeps raining) the water level should be way up in all the barrels tomorrow morning. If not, I'll have to fill the barrels up well past the hoses and watch them for a few days. If, of course, it rains like stink tonight and the barrels are exactly the same tomorrow, then I'll know there's a problem. Here's where the water was at in the middle barrel when we finished today:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBwttkWWJ2I/AAAAAAAAAfs/RmLztCw7r5w/s1600/SMALL-DSC02857.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBwttkWWJ2I/AAAAAAAAAfs/RmLztCw7r5w/s320/SMALL-DSC02857.JPG" alt="" id="BLOGGER_PHOTO_ID_5484308707105187682" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And a picture of the whole setup. You can see the overflow and interconnect hoses:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwtuFzOkcI/AAAAAAAAAf0/pXZcb_X2ivc/s1600/SMALL-DSC02858.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBwtuFzOkcI/AAAAAAAAAf0/pXZcb_X2ivc/s320/SMALL-DSC02858.JPG" alt="" id="BLOGGER_PHOTO_ID_5484308716084695490" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Assuming there are no leaks in the system, we've got a usable rain barrel setup right now. It doesn't have any fancy stuff, but we can still pull water out of it for a watering can or bucket. The only things I need to do are get some longer overflow hose so I can put all the parts back where they should be, and close up some of the other holes in the barrel (where the pump is going, etc.) so mosquitoes can't get in (or out).&lt;br /&gt;&lt;br /&gt;The next job is to finish up and test the electronics, then figure out how to get them outside and safe from the elements.&lt;br /&gt;&lt;br /&gt;This has been an enjoyable project so far.&lt;br /&gt;&lt;br /&gt;(I probably should have waited to see if there were any leaks before I said that, but what the heck.)&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-3995028398586212009?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/3995028398586212009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=3995028398586212009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3995028398586212009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3995028398586212009'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-v.html' title='Rain Barrels - Part V'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ci7z-qEWjJE/TBwsTTKUqLI/AAAAAAAAAes/h2BtcZqeGRg/s72-c/SMALL-DSC02847.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-126296842085381553</id><published>2010-06-17T20:51:00.006-05:00</published><updated>2010-06-17T22:40:54.196-05:00</updated><title type='text'>Rain Barrels - Part IV</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Made some progress on the barrels this evening. It rained on and off all day and into the evening so I sat down to work on the electronics side of things for a bit. First things first, activate the relay with the PIC.&lt;br /&gt;&lt;br /&gt;The relay I'm using is a JVN1A-4.5V-F from Panasonic. It's rated for 4.5V, will activate as low as 3.8V, and is safe up to somewhere around 6.75V. When activated, the coil pulls about 44mA. Since the PIC won't be doing much other than flashing an LED and turning on and off the pump, I decided that instead of using a MOSFET to turn the relay on, I would just tie three of the PICs output lines together. The 16F887 can source or sink 25mA on each I/O pin, to a maximum of 90mA for all pins on all ports combined. The code running on the PIC just turned the relay on and off every two seconds. Here's the code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;@ device  pic16F887, hs_osc, wdt_off, lvp_off, protect_off&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;define OSC 4&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;TRISD = 000000       'Set PORTD to outputs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PORTD = 000000     'Clear PORTD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;X var byte                   'Scratch variable for counting, etc.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;X = 0                           'Clear the X var&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;Init:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;' Flash the LED to show the PIC is alive&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;for X = 0 to 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;toggle PORTD.3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;br /&gt;pause 500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;next X&lt;/span&gt;   &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;MainLoop:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PORTD = PORTD ^ 000111    'XOR the lowest 3 bits on PORTD to toggle the relay&lt;/span&gt;  &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;pause 2000&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;goto MainLoop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;END     'This just here to shut compiler up&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I hooked the power up, and it came to life. I ran it for a few minutes on a 9V battery and it ran without a hiccup. It sounded like the relay was doing its thing, not too bad for a first test. I should really jot down the schematic...&lt;br /&gt;&lt;br /&gt;Around the time the relay started clicking, I noticed that the rain had stopped and there was even a hint of blue sky poking through. I decided to take advantage of the break in the rain and got my stuff together to try and finish up the barrels. I threw the back door open and stepped out into a giant cloud of mosquitoes.Arms flailing, I ran to the garage and took a look at the work from yesterday. I think I'm a convert to Goop - the joints done with it look a lot better than the ones done with the Extreme glue. The hoses turned out well, I plugged one end and tried to blow air through and they seem to be airtight. The Goop looks like it did a good job (pardon the bad focus):&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBrlt5BlmVI/AAAAAAAAAd8/uJBGBGY2LlI/s1600/SMALL-DSC02837.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBrlt5BlmVI/AAAAAAAAAd8/uJBGBGY2LlI/s320/SMALL-DSC02837.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948072841353554" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And the Goop did a great job on the bushings where they met the barrel:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBrltTzGEZI/AAAAAAAAAd0/p0KEUX3KHGY/s1600/SMALL-DSC02838.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBrltTzGEZI/AAAAAAAAAd0/p0KEUX3KHGY/s320/SMALL-DSC02838.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948062848455058" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I hauled the barrels outside and grabbed two of the 3/4" m-m nipples and put some teflon tape on one side:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrluQOg2tI/AAAAAAAAAeE/f1N7wFWVu9o/s1600/SMALL-DSC02839.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrluQOg2tI/AAAAAAAAAeE/f1N7wFWVu9o/s320/SMALL-DSC02839.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948079069584082" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Then they were screwed into the bushings in the centre barrel:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrlukxrBII/AAAAAAAAAeM/QOJ50Q17DdQ/s1600/SMALL-DSC02840.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrlukxrBII/AAAAAAAAAeM/QOJ50Q17DdQ/s320/SMALL-DSC02840.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948084585759874" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;With both of them screwed in, the centre barrel had two convenient spots for the hoses to connect to (on the right and left - the spigot is in the middle):&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBrlvHosekI/AAAAAAAAAeU/vEJW_TySDGA/s1600/SMALL-DSC02841.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBrlvHosekI/AAAAAAAAAeU/vEJW_TySDGA/s320/SMALL-DSC02841.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948093943347778" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Now, on to the hoses. some teflon tape on the threaded end:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBrl0-0bQbI/AAAAAAAAAec/sb2Fl5wNY2s/s1600/SMALL-DSC02843.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBrl0-0bQbI/AAAAAAAAAec/sb2Fl5wNY2s/s320/SMALL-DSC02843.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948194655846834" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And then the hoses were carefully screwed into the bushings on the outer two barrels:&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrl1YQUJjI/AAAAAAAAAek/wiBVINay1tA/s1600/SMALL-DSC02845.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBrl1YQUJjI/AAAAAAAAAek/wiBVINay1tA/s320/SMALL-DSC02845.JPG" alt="" id="BLOGGER_PHOTO_ID_5483948201483707954" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;So now I have two barrels with a hose hanging off them and one barrel with two ports for the hoses to connect to. Things are starting to come together.&lt;br /&gt;&lt;br /&gt;Unfortunately, by this time the mosquitoes were getting unbearable. I hauled the three barrels and hoses out to the side of the house where they'll be living, then beat a hasty retreat back into the house. I intend to finish the work on the hoses when I get home from work tomorrow, but if it's raining I'll work on the electronics some more.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-126296842085381553?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/126296842085381553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=126296842085381553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/126296842085381553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/126296842085381553'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-iv.html' title='Rain Barrels - Part IV'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ci7z-qEWjJE/TBrlt5BlmVI/AAAAAAAAAd8/uJBGBGY2LlI/s72-c/SMALL-DSC02837.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-8109175911180748564</id><published>2010-06-16T20:45:00.009-05:00</published><updated>2010-06-16T23:07:15.211-05:00</updated><title type='text'>Rain Barrels - Part III</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;It was pretty hot out today but I was excited about working on the rain barrels. I put on my big hat and went outside, hoping to get a lot accomplished. Boy, was I wrong...&lt;br /&gt;&lt;br /&gt;Before I started working, I headed out to Canadian Tire to pick up some more glue. I picked up another tube of the EXTREME stuff, and on a whim I grabbed a tube of Plumbing Goop:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBmTjSvdYtI/AAAAAAAAAdE/QoS6UnCCHmM/s1600/SMALL-DSC02834.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBmTjSvdYtI/AAAAAAAAAdE/QoS6UnCCHmM/s320/SMALL-DSC02834.JPG" alt="" id="BLOGGER_PHOTO_ID_5483576255835890386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It claimed it glues anything to anything, so I picked it up as backup.&lt;br /&gt;&lt;br /&gt;First thing I noticed when I got all the parts and tools together was that the glue I'd used yesterday seemed to have done the trick. This was great - I was a little concerned that I was going to find that the glue had crumbled off and the bushings were going to be sitting in the bottom of the barrel.&lt;br /&gt;&lt;br /&gt;I then rummaged through my bag of parts and noticed I had a lot of extra 3/4" male-male nipples. Suddenly it hit me - the 3/4" nipples were what the hose was supposed to connect to. That meant... the bushings I'd put in yesterday were in backwards.&lt;br /&gt;Gaah!&lt;br /&gt;&lt;br /&gt;So, out came the knife and after a bit of swearing I got the parts out. A bit of cleaning, a bit of sanding, and they went back in (the right way):&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmVEmqKGGI/AAAAAAAAAdM/a8cTib0UMy0/s1600/SMALL-DSC02833.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmVEmqKGGI/AAAAAAAAAdM/a8cTib0UMy0/s320/SMALL-DSC02833.JPG" alt="" id="BLOGGER_PHOTO_ID_5483577927629674594" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I know it's not the prettiest adhesive job, but I'm not doing this for style points. Notice how there's an internal thread there now? That's where the 3/4" nipple goes.&lt;br /&gt;&lt;br /&gt;I drilled the hole for the interconnecting hose in the third rain barrel, then cleaned the hole and used the Goop (I'd run out of the Extreme glue again by this point) when putting the bushing in. It's quite a bit different from the other two, but it'll hold water and that's all I'm really concerned about:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmWvlKKO-I/AAAAAAAAAdU/sDrXxW2S3o0/s1600/SMALL-DSC02830.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmWvlKKO-I/AAAAAAAAAdU/sDrXxW2S3o0/s320/SMALL-DSC02830.JPG" alt="" id="BLOGGER_PHOTO_ID_5483579765473033186" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;By this point I'd been working for about 90 minutes and was just slightly ahead of where I'd finished yesterday. Plus, everything now needed 24 hours of sit time for the adhesive to cure. Not much else I could do except work on the interconnect hoses.&lt;br /&gt;&lt;br /&gt;The hoses will have a 3/4" nipple at each end that screws into the bushings that I've put into the barrels. I cut the hoses to an (approximately) equal length of about "meeeehhhh" long (I definitely eyeballed it... maybe about two feet?) using a big X-ACTO knife. Then, some Goop went onto half the threads of the nipple, and it was hand-tightened into the hose (the threads are just big enough to grab the hose). Once tightened, I put a pipe clamp on the hose and cinched it up, just to give that extra bit of security. Since the hose is basically going to be screwed into the barrel, I can only set up one side at a time, unless I want to be turning a barrel over and over to thread the other side of the hose on. Here's the parts (minus the Goop) for one side of one interconnect hose:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmZq39pWZI/AAAAAAAAAdc/xzKPmWbpOMY/s1600/SMALL-DSC02835.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBmZq39pWZI/AAAAAAAAAdc/xzKPmWbpOMY/s320/SMALL-DSC02835.JPG" alt="" id="BLOGGER_PHOTO_ID_5483582983156357522" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;"But HAL," you may find yourself asking, "Why don't you just use the proper part that has the little grabby part at one end and the threads at the other end?"&lt;br /&gt;&lt;br /&gt;That's an excellent question. Simple answer - Mrs. HAL and I spent an hour and a half in two different stores trying to find the parts, and we did... but not for 1" hose. If I was using 3/4" hose, no problem. 1.25" hose, no problem. But with the parts we could find, the only thing we could do with 1" hose was find bushings and couplings and nipples that would convert it to something smaller or bigger. If everything leaks, I'll try more glue. If everything still leaks, I'll drill the holes to fit 1.25" parts and get new hose. But let's not get ahead of ourselves...&lt;br /&gt;&lt;br /&gt;I then put the rest of the other hardware that came with the barrels in (the spigot and overflow on the other grey barrel) to get that out of the way, then put all three barrels into the garage. It's supposed to rain again shortly, and I want to make sure the glue gets a good chance to dry.&lt;br /&gt;&lt;br /&gt;So now I have three barrels with their interconnect ports (I like saying it that way a lot more than "three barrels with their 1" to 3/4" reducer bushings") in and glue drying, interconnect hoses with one connector in and glue drying, and all of the other barrel parts put in. Everything should be dry by tomorrow afternoon, so if it's not pouring, I'll move the barrels to their positions by the downspout and do the rest of the work on the interconnect hoses.&lt;br /&gt;&lt;br /&gt;One of the things that's been occupying my mind is how to build a reliable water level meter. I'm pretty sure that part of it will be conductor pairs that dip into the water at different levels, but I don't want to completely rely on that - what if some slime or something bridges the gap and makes the system think it's full of water when it's not? I definitely want two different ways to tell the water level. I thought I had an old mercury switch lying around somewhere, but now that I think about it, I'm pretty sure I got rid of it when there was a hazardous waste day in the neighbourhood a few years back. A good old-fashioned float switch would do the trick, but I'm trying to do this on the cheap. I'll see what I've got lying around that I could build one from.&lt;br /&gt;&lt;br /&gt;So not a lot accomplished today - I spent a lot of time re-doing stuff I did yesterday. Not the end of the world (and I'm glad I caught it now as opposed to when I was trying to hook it all up in a few days), but a little embarrassing. Once the glue dries I plan to test and make sure there aren't any leaks. The weather forecast is not looking too good for tomorrow or Friday, and rain will make checking for leaks pretty much impossible. Hopefully it'll have the decency to hold off!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-8109175911180748564?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/8109175911180748564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=8109175911180748564' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8109175911180748564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8109175911180748564'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-iii.html' title='Rain Barrels - Part III'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ci7z-qEWjJE/TBmTjSvdYtI/AAAAAAAAAdE/QoS6UnCCHmM/s72-c/SMALL-DSC02834.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-4222298304362106265</id><published>2010-06-15T23:15:00.009-05:00</published><updated>2010-06-15T23:52:26.235-05:00</updated><title type='text'>Rain Barrels - Part II</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Had a little bit of time to work on the barrels today. But first, here's a photo of one of the two barrels we got this past weekend (the barrel from last year is quite different) before I really started messing with it:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBhQo8xO05I/AAAAAAAAAbs/Yy3ULIwF5HM/s1600/SMALL-DSC02813.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 240px; height: 320px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBhQo8xO05I/AAAAAAAAAbs/Yy3ULIwF5HM/s320/SMALL-DSC02813.JPG" alt="" id="BLOGGER_PHOTO_ID_5483221210761188242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The large hole in the back near the top is where the overflow outlet goes. The barrels come with a lid that has a hole in the middle where a good-fitting mesh basket goes to keep leaves and other garbage out of the barrel (and, possibly more importantly, keeps the barrel from becoming a mosquito farm).In Part I, I mentioned drilling out the holes in the sides where the interconnect hoses would go. I used a 1.25" hole saw. To provide a place for the hoses to clamp on to, I bought some 1" to 3/4" adapters (at about a dollar each, I figured out they'd be a good place to start):&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhR5JwwafI/AAAAAAAAAb0/RhWkHwSMEAA/s1600/SMALL-DSC02818.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhR5JwwafI/AAAAAAAAAb0/RhWkHwSMEAA/s320/SMALL-DSC02818.JPG" alt="" id="BLOGGER_PHOTO_ID_5483222588638390770" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;They threaded nicely into the 1.25" holes. Here you can see the positions of the two holes for the interconnecting hoses as well as the smaller hole where the spigot goes in the front of the barrel:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBhSekZBhoI/AAAAAAAAAb8/A5kUwMnGX1s/s1600/SMALL-DSC02816.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBhSekZBhoI/AAAAAAAAAb8/A5kUwMnGX1s/s320/SMALL-DSC02816.JPG" alt="" id="BLOGGER_PHOTO_ID_5483223231441766018" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;It's a little tight sticking my arms, head, and shoulders into the barrel, but once in there it's easy enough to tighten the parts from the inside.&lt;br /&gt;&lt;br /&gt;With the fit of the parts confirmed, I removed them, then cleaned up the walls around the inside and outside of the holes before scuffing them up with sandpaper. I looked around in my big drawer of glue and this looked like the best thing I had to use as an adhesive/gasket/sealant:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBhTaOiu-vI/AAAAAAAAAcE/d9eRuUg6Stc/s1600/SMALL-DSC02825.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/TBhTaOiu-vI/AAAAAAAAAcE/d9eRuUg6Stc/s320/SMALL-DSC02825.JPG" alt="" id="BLOGGER_PHOTO_ID_5483224256369064690" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I have no idea if this stuff will do the trick, but it says "Extreme" so it must be good. Smells, looks, and acts like silicone. I laid it on nice and thick on the inside, coating the threads before tightening the adapters in place. After it was tightened, I put a coat on the outside too. It got in the threads a bit, but that's okay - if everything works the way I'm hoping, I won't actually need the threads anymore.&lt;br /&gt;Here's the inside (notice the abundance of goopiness now):&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhUkkpifuI/AAAAAAAAAc0/VRKSAb2yD5U/s1600/SMALL-DSC02823.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhUkkpifuI/AAAAAAAAAc0/VRKSAb2yD5U/s320/SMALL-DSC02823.JPG" alt="" id="BLOGGER_PHOTO_ID_5483225533613506274" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And the outside:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhUjlnaBNI/AAAAAAAAAck/g3JNxd1zlS8/s1600/SMALL-DSC02821.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/TBhUjlnaBNI/AAAAAAAAAck/g3JNxd1zlS8/s320/SMALL-DSC02821.JPG" alt="" id="BLOGGER_PHOTO_ID_5483225516693128402" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;At this point I ran out of glue. So, I screwed the spigot on:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBhUkFEvTbI/AAAAAAAAAcs/Oo6j05zFxiQ/s1600/SMALL-DSC02822.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/TBhUkFEvTbI/AAAAAAAAAcs/Oo6j05zFxiQ/s320/SMALL-DSC02822.JPG" alt="" id="BLOGGER_PHOTO_ID_5483225525137657266" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;And attached the overflow:&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBhVbWzI71I/AAAAAAAAAc8/OCaLEtiOZUk/s1600/SMALL-DSC02824.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/TBhVbWzI71I/AAAAAAAAAc8/OCaLEtiOZUk/s320/SMALL-DSC02824.JPG" alt="" id="BLOGGER_PHOTO_ID_5483226474788482898" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Since I cut two holes in it for the interconnecting hoses, this is going to be the middle barrel - the other two will sit on either side of it. It will also be the one that the water drains into from the downspout and is pumped out of.&lt;br /&gt;&lt;br /&gt;The glue will be ready to go tomorrow afternoon, I'm hoping to hook some hoses up to it and see if it leaks like a sieve. Here's a partial list of what I need to do (in no particular order):&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Battery/electronics enclosure&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Solar panel placement and mounting&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Figure out an elegant (and cheap) way to detect the water level in the tank&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Electronics design/breadboard&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Test running the motor with the relay&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Build a mount to hold the pump off the bottom of the barrel&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;Set up the other two barrels&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: trebuchet ms;"&gt;More to follow!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-4222298304362106265?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/4222298304362106265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=4222298304362106265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4222298304362106265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4222298304362106265'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-ii.html' title='Rain Barrels - Part II'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ci7z-qEWjJE/TBhQo8xO05I/AAAAAAAAAbs/Yy3ULIwF5HM/s72-c/SMALL-DSC02813.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-8624669280359336345</id><published>2010-06-13T22:17:00.004-05:00</published><updated>2010-06-13T22:54:51.139-05:00</updated><title type='text'>Rain Barrels - Part I</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Wow... I've got to do a better job of keeping track of the things I'm playing around with.&lt;br /&gt;&lt;br /&gt;I guess the new thing right now is that Mrs. HAL and I are working on setting up a little compost bin and some rain barrels so we can water the lawn. Mrs. HAL took the lead on the compost bin, and I've come up with a giant, overcomplicated plan for the rain barrels.&lt;br /&gt;&lt;br /&gt;We bought a rain barrel from Canadian Tire last year but never actually used it. This year, we bought two more barrels from the Manitoba Eco Network (that was very frustrating, but that's a story for another day) and I started scribbling down a few ideas.&lt;br /&gt;&lt;br /&gt;Some research on rain barrels seems to indicate that a lot of people have great ideas for getting the water into the barrels, but how you get the water back out of the barrel is, well... boring. Putting the barrels up on stands to use gravity to get the water out with a little more pressure, or just dunking the watering can into the barrel to fill it.&lt;br /&gt;&lt;br /&gt;Don't get me wrong - our lawn is half dead because it pains me to pour drinking water on it to make it grow - but I'm also lazy enough that making three trips to the barrels (the downspouts are on the far side of the back yard from the gate) or waiting for the water to dribble out will ensure that the barrels will stay full of rainwater because I'll never use them.&lt;br /&gt;&lt;br /&gt;So I looked around the house to see what I had lying around. A deep-cycle battery, a couple of 5.5W solar panels, some hose, some microcontrollers... a plan began to form:&lt;br /&gt;&lt;br /&gt;Three barrels will be connected 6" from the bottom by 1" hoses. The hoses will carry the water between the barrels to make sure the water level stays equal between them. Hopefully any extra gunk that manages to get into the system will sit at the bottom, below the hoses. The centre barrel will be where the downspout drains into so there are two paths for water to flow into and out of, making it less likely that the water from the downspout will overwhelm the system (since the hoses are only 1"). The centre barrel will also have the overflow hole at the top connected, the overflow will go below the fence and out to the front yard which slopes down to the street. A pump will be used to pull the water from the centre barrel (which will also empty the other two through the low hoses) and run it out a garden hose. The pump will run off the deep-cycle battery, which will in turn be charged by the solar panels. The pump will be controlled by a relay that is activated by a microcontroller when the following conditions are met:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;The main power is turned on,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;There is enough water in the centre barrel,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;The battery is sufficiently charged, and&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: trebuchet ms;"&gt;The button to start the pump has been pressed.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family: trebuchet ms;"&gt;Like I said, it's going to be a giant, overcomplicated plan.&lt;br /&gt;&lt;br /&gt;A couple of two-litre pop bottles and some air hose were pressed into service for a small scale mock-up and things looked good. Mrs. HAL and I made a trip to Princess Auto about a week ago to pick up a 12V bilge pump (2000GPH, whoo!) and tested it that weekend. While the pressure was a little low, it made up for it in volume (again, 2000GPH, whoo!). Today we went to Princess Auto again to pick up all the hose couplers and adapters we'd need to get it all working. I must admit, I know very little about this stuff but it was very interesting looking at all the various different parts available (and the various different substances they're made of).&lt;br /&gt;&lt;br /&gt;This evening I drilled out the holes 6 inches from the bottom of the barrels for the hoses. I'm not going to tighten everything up until I know for sure that things look right. I'm not sure when I'll get time to work on it next, but hopefully we'll have something in place for when the next big rain comes along.&lt;br /&gt;&lt;br /&gt;I'll try to remember to take some photos next time I'm working on it.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-8624669280359336345?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/8624669280359336345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=8624669280359336345' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8624669280359336345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8624669280359336345'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2010/06/rain-barrels-part-i.html' title='Rain Barrels - Part I'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-3076998136484794530</id><published>2009-12-22T20:31:00.005-06:00</published><updated>2009-12-22T20:44:17.692-06:00</updated><title type='text'>Been A Little While...</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Happy Holidays, everyone!&lt;br /&gt;&lt;br /&gt;Well, it's been pretty hectic around here, haven't had much time to do anything lately.&lt;br /&gt;&lt;br /&gt;Every once in a while when I had a few minutes I'd hop onto the second Plug and play around with it. I moved the filesystem over to a 16GB SDHC card and tried to get the webcam working on it. Didn't have much luck. It was odd, the camera (QuickCam Pro 3000) worked fine on the original plug, but I couldn't get it working on the new one. It would be recognized, but as soon as I tried to start up anything that actually USED the camera, it would just... fail. Whenever I'd get a few minutes, I'd compile a new kernel, or play around with the last one I'd built - no luck. USB sticks and external drives worked, but no go with the camera.&lt;br /&gt;&lt;br /&gt;I put the camera back on the original plug and it still worked like a charm. Finally, I found a little snippet somewhere (I wish I'd kept the URL), but the SheevaPlug doesn't put out the full 500mA on its USB port. It's enough to run most devices (like the aforementioned USB keys and disks), and it was enough for the camera to be identified, but when the camera was switched on, it was starved for current. Interestingly, I'd never actually hooked the camera directly to the original Plug, I'd always connected it through the powered USB hub! I should've clued in to this earlier, what with the USB disk copy problems I'd had on the original Plug...&lt;br /&gt;&lt;br /&gt;A quick trip to the store to pick up a powered USB hub and the problem was solved.&lt;br /&gt;&lt;br /&gt;Since then, I've got the following working:&lt;br /&gt;&lt;br /&gt;- An FTDI USB to serial converter&lt;br /&gt;- Motion software (to use the webcam)&lt;br /&gt;- A PIC board connected to the serial port that responds to queries from the Plug and passes the temperature back, and&lt;br /&gt;- A heartbeat script that gets and forwards the temperature reading to me in an email.&lt;br /&gt;&lt;br /&gt;Next up is wireless networking, but that's probably going to have to wait until the new year.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-3076998136484794530?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/3076998136484794530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=3076998136484794530' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3076998136484794530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3076998136484794530'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/12/been-little-while.html' title='Been A Little While...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-7125671707690110460</id><published>2009-10-12T18:44:00.004-05:00</published><updated>2009-10-12T18:55:47.422-05:00</updated><title type='text'>SheevaPlug FTP Server</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;So now I've got a SheevaPlug that's running nicely and has 8GB of external USB storage. This is pretty neat, but still not all that useful. Time to figure out possible uses for this Plug. One of the important uses for me is as an FTP server. Again, the standard disclaimer is in effect - I'm no expert so follow these directions at your own peril!&lt;br /&gt;&lt;br /&gt;I mentioned in earlier posts that I've got an Axis 207W network camera. One of the things the camera can do is detect motion in its field of view and then dump images or video to an FTP server for review later. I think the SheevaPlug makes a great FTP server for this purpose. It's small and doesn't use much power. Also, if you've got a camera set up for security purposes and someone breaks in, they're probably not going to figure out what the Plug is (it kind of looks like it could be a timer or something instead of a computer).&lt;br /&gt;&lt;br /&gt;   I like ProFTPd – it's pretty easy to install and I haven't had any problems with it. Of course, FTP itself isn't the most secure thing in the world, but it's a protocol that the camera speaks.&lt;br /&gt;&lt;br /&gt;There's an excellent document on setting up ProFTPd at http://ubuntuforums.org/showthread.php?t=79588 – you may want to check it out.&lt;br /&gt;&lt;br /&gt;To set ProFTPd up:  &lt;br /&gt;&lt;br /&gt;sudo apt-get install proftpd&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo apt-get install proftpd&lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;The following extra packages will be installed:&lt;br /&gt; libmysqlclient15off libpq5 mysql-common proftpd-basic proftpd-mod-ldap&lt;br /&gt; proftpd-mod-mysql proftpd-mod-pgsql&lt;br /&gt;Suggested packages:&lt;br /&gt; proftpd-doc&lt;br /&gt;The following NEW packages will be installed:&lt;br /&gt; libmysqlclient15off libpq5 mysql-common proftpd proftpd-basic&lt;br /&gt; proftpd-mod-ldap proftpd-mod-mysql proftpd-mod-pgsql&lt;br /&gt;0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;Need to get 3648kB of archives.&lt;br /&gt;After this operation, 7692kB of additional disk space will be used.&lt;br /&gt;Do you want to continue [Y/n]?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8MB space required. At this point, you should still have tons of space left on your Plug's internal flash storage. As ProFTPd installs, you'll be presented with a configuration screen asking if you want to run it standalone or from inetd – I used inetd.&lt;br /&gt;&lt;br /&gt;Now, edit the /etc/shells file and add the following line:&lt;br /&gt;&lt;br /&gt;/bin/false&lt;br /&gt;&lt;br /&gt;Here's what my /etc/shells file looks like now:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# /etc/shells: valid login shells&lt;br /&gt;/bin/csh&lt;br /&gt;/bin/sh&lt;br /&gt;/usr/bin/es&lt;br /&gt;/usr/bin/ksh&lt;br /&gt;/bin/ksh&lt;br /&gt;/usr/bin/rc&lt;br /&gt;/usr/bin/tcsh&lt;br /&gt;/bin/tcsh&lt;br /&gt;/usr/bin/esh&lt;br /&gt;/bin/dash&lt;br /&gt;/bin/bash&lt;br /&gt;/bin/rbash&lt;br /&gt;/bin/false&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, you'll need to create a directory for the FTP server. Might as well create it on that external USB space you configured earlier, right?&lt;br /&gt;&lt;br /&gt;sudo mkdir /mnt/usb/DATA/FTP&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo mkdir /mnt/usb/DATA/FTP&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create download and upload directories:&lt;br /&gt;&lt;br /&gt;   sudo mkdir /mnt/usb/DATA/FTP/download&lt;br /&gt;   sudo mkdir /mnt/usb/DATA/FTP/upload&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo mkdir /mnt/usb/DATA/FTP/download&lt;br /&gt;test@debian:~$ sudo mkdir /mnt/usb/DATA/FTP/upload&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create a user to be used only for FTP (in this case, named userftp). Change “passwordfoo” to whatever password you want to use for the account. Note that the path /mnt/usb/DATA/FTP is located on the attached USB disk – if you have a different path to your USB disk, you'll want to change your line to match your path:&lt;br /&gt;&lt;br /&gt;sudo useradd userftp -p passwordfoo -d /mnt/usb/DATA/FTP -s /bin/false&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo useradd userftp -p passwordfoo -d /mnt/usb/DATA/FTP -s /bin/false&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, change the password – like I said, I'm not getting into security here, but having your password in plaintext anywhere is a dumb idea!&lt;br /&gt;&lt;br /&gt;sudo passwd userftp&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo passwd userftp&lt;br /&gt;Enter new UNIX password:&lt;br /&gt;Retype new UNIX password:&lt;br /&gt;passwd: password updated successfully&lt;br /&gt;test@debian:~$  &lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;br /&gt;Now that the directories and account have been created, give the account the proper access to the directories:&lt;br /&gt;&lt;br /&gt;sudo chmod 755 /mnt/usb/DATA/FTP&lt;br /&gt;sudo chmod 755 /mnt/usb/DATA/FTP/download&lt;br /&gt;sudo chmod 777 /mnt/usb/DATA/FTP/upload&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:~$ sudo chmod 755 /mnt/usb/DATA/FTP&lt;br /&gt;test@debian:~$ sudo chmod 755 /mnt/usb/DATA/FTP/download&lt;br /&gt;test@debian:~$ sudo chmod 777 /mnt/usb/DATA/FTP/upload&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now edit the /etc/proftpd/proftpd.conf file. Here's mine, you'll want to change the ServerName (in this case, Sparky) information. Again, this works for me, it may not work for you. For example, if your application will work with it, you may want to also change the port from 21 to something else for security reasons. I'm leaving it at 21 to keep my Axis camera happy:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;#&lt;br /&gt;# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.&lt;br /&gt;# To really apply changes reload proftpd after modifications.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# Includes DSO modules&lt;br /&gt;Include /etc/proftpd/modules.conf&lt;br /&gt;&lt;br /&gt;# Set off to disable IPv6 support which is annoying on IPv4 only boxes.&lt;br /&gt;UseIPv6                         off&lt;br /&gt;# If set on you can experience a longer connection delay in many cases.&lt;br /&gt;IdentLookups                    off&lt;br /&gt;&lt;br /&gt;ServerName                      "Sparky"&lt;br /&gt;ServerType                      standalone&lt;br /&gt;DeferWelcome                    on&lt;br /&gt;&lt;br /&gt;MultilineRFC2228                on&lt;br /&gt;DefaultServer                   on&lt;br /&gt;ShowSymlinks                    off&lt;br /&gt;&lt;br /&gt;TimeoutNoTransfer               600&lt;br /&gt;TimeoutStalled                  100&lt;br /&gt;TimeoutIdle                     2200&lt;br /&gt;&lt;br /&gt;DisplayLogin                    welcome.msg&lt;br /&gt;DisplayChdir                    .message true&lt;br /&gt;ListOptions                     "-l"&lt;br /&gt;&lt;br /&gt;DenyFilter                      \*.*/&lt;br /&gt;&lt;br /&gt;# Use this to jail all users in their homes&lt;br /&gt;DefaultRoot                  /mnt/usb/DATA/FTP&lt;br /&gt;&lt;br /&gt;# Users require a valid shell listed in /etc/shells to login.&lt;br /&gt;# Use this directive to release that constrain.&lt;br /&gt;# RequireValidShell             off&lt;br /&gt;&lt;br /&gt;# Port 21 is the standard FTP port.&lt;br /&gt;Port                            21&lt;br /&gt;&lt;br /&gt;# In some cases you have to specify passive ports range to by-pass&lt;br /&gt;# firewall limitations. Ephemeral ports can be used for that, but&lt;br /&gt;# feel free to use a more narrow range.&lt;br /&gt;# PassivePorts                  49152 65534&lt;br /&gt;&lt;br /&gt;# If your host was NATted, this option is useful in order to&lt;br /&gt;# allow passive tranfers to work. You have to use your public&lt;br /&gt;# address and opening the passive ports used on your firewall as well.&lt;br /&gt;# MasqueradeAddress             1.2.3.4&lt;br /&gt;&lt;br /&gt;# This is useful for masquerading address with dynamic IPs:&lt;br /&gt;# refresh any configured MasqueradeAddress directives every 8 hours&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;# DynMasqRefresh 28800&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;# To prevent DoS attacks, set the maximum number of child processes&lt;br /&gt;# to 30.  If you need to allow more than 30 concurrent connections&lt;br /&gt;# at once, simply increase this value.  Note that this ONLY works&lt;br /&gt;# in standalone mode, in inetd mode you should use an inetd server&lt;br /&gt;# that allows you to limit maximum number of processes per service&lt;br /&gt;# (such as xinetd)&lt;br /&gt;MaxInstances                    30&lt;br /&gt;&lt;br /&gt;# Set the user and group that the server normally runs at.&lt;br /&gt;User                            nobody&lt;br /&gt;Group                           nogroup&lt;br /&gt;&lt;br /&gt;# Umask 022 is a good standard umask to prevent new files and dirs&lt;br /&gt;# (second parm) from being group and world writable.&lt;br /&gt;Umask                           022  022&lt;br /&gt;# Normally, we want files to be overwriteable.&lt;br /&gt;AllowOverwrite                  on&lt;br /&gt;&lt;br /&gt;# Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:&lt;br /&gt;# PersistentPasswd              off&lt;br /&gt;&lt;br /&gt;# This is required to use both PAM-based authentication and local passwords&lt;br /&gt;# AuthOrder                     mod_auth_pam.c* mod_auth_unix.c&lt;br /&gt;&lt;br /&gt;# Be warned: use of this directive impacts CPU average load!&lt;br /&gt;# Uncomment this if you like to see progress and transfer rate with ftpwho&lt;br /&gt;# in downloads. That is not needed for uploads rates.&lt;br /&gt;#&lt;br /&gt;# UseSendFile                   off&lt;br /&gt;&lt;br /&gt;TransferLog /var/log/proftpd/xferlog&lt;br /&gt;SystemLog   /var/log/proftpd/proftpd.log&lt;br /&gt;&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;QuotaEngine off&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;Ratios off&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Delay engine reduces impact of the so-called Timing Attack described in&lt;br /&gt;# http://security.lss.hr/index.php?page=details&amp;amp;ID=LSS-2004-10-02&lt;br /&gt;# It is on by default.&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;DelayEngine on&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;ControlsEngine        off&lt;br /&gt;ControlsMaxClients    2&lt;br /&gt;ControlsLog           /var/log/proftpd/controls.log&lt;br /&gt;ControlsInterval      5&lt;br /&gt;ControlsSocket        /var/run/proftpd/proftpd.sock&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;&lt;ifmodule&gt;&lt;br /&gt;AdminControlsEngine off&lt;br /&gt;&lt;/ifmodule&gt;&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Alternative authentication frameworks&lt;br /&gt;#&lt;br /&gt;#Include /etc/proftpd/ldap.conf&lt;br /&gt;#Include /etc/proftpd/sql.conf&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# This is used for FTPS connections&lt;br /&gt;#&lt;br /&gt;#Include /etc/proftpd/tls.conf&lt;br /&gt;&lt;br /&gt;# A basic anonymous configuration, no upload directories.&lt;br /&gt;&lt;br /&gt;# &lt;anonymous&gt;&lt;br /&gt;#   User                                ftp&lt;br /&gt;#   Group                               nogroup&lt;br /&gt;#   # We want clients to be able to login with "anonymous" as well as "ftp"&lt;br /&gt;#   UserAlias                   anonymous ftp&lt;br /&gt;#   # Cosmetic changes, all files belongs to ftp user&lt;br /&gt;#   DirFakeUser on ftp&lt;br /&gt;#   DirFakeGroup on ftp&lt;br /&gt;#&lt;br /&gt;#   RequireValidShell           off&lt;br /&gt;#&lt;br /&gt;#   # Limit the maximum number of anonymous logins&lt;br /&gt;#   MaxClients                  10&lt;br /&gt;#&lt;br /&gt;#   # We want 'welcome.msg' displayed at login, and '.message' displayed&lt;br /&gt;#   # in each newly chdired directory.&lt;br /&gt;#   DisplayLogin                        welcome.msg&lt;br /&gt;#   DisplayChdir                .message&lt;br /&gt;#&lt;br /&gt;#   # Limit WRITE everywhere in the anonymous chroot&lt;br /&gt;#   &lt;directory&gt;&lt;br /&gt;#     &lt;limit&gt;&lt;br /&gt;#       DenyAll&lt;br /&gt;#     &lt;/limit&gt;&lt;br /&gt;#   &lt;/directory&gt;&lt;br /&gt;#&lt;br /&gt;#   # Uncomment this if you're brave.&lt;br /&gt;#   # &lt;directory&gt;&lt;br /&gt;#   #   # Umask 022 is a good standard umask to prevent new files and dirs&lt;br /&gt;#   #   # (second parm) from being group and world writable.&lt;br /&gt;#   #   Umask                           022  022&lt;br /&gt;#   #            &lt;limit&gt;&lt;br /&gt;#   #            DenyAll&lt;br /&gt;#   #            &lt;/limit&gt;&lt;br /&gt;#   #            &lt;limit&gt;&lt;br /&gt;#   #            AllowAll&lt;br /&gt;#   #            &lt;/limit&gt;&lt;br /&gt;#   # &lt;/directory&gt;&lt;br /&gt;#&lt;br /&gt;# &lt;/anonymous&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Once you've edited the file to where you want it, restart the ProFTPd service:&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/proftpd restart&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;test@debian:/etc/proftpd$ sudo /etc/init.d/proftpd restart&lt;br /&gt;* Stopping ftp server proftpd                                           [ OK ]&lt;br /&gt;* Starting ftp server proftpd                                           [ OK ]&lt;br /&gt;test@debian:/etc/proftpd$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, try connecting to the FTP server. I used Windows Explorer and was able to connect and see both the download and upload folders.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Using your FTP program of choice, try copying a file to and from the FTP server (if the permissions are set up correctly, you should only be able to copy data to the “upload” folder).&lt;br /&gt;&lt;br /&gt;If everything seems to be working, then congratulations – you've got an FTP server set up – and the best part is that it's not using up valuable space on your Plug's internal Flash.&lt;br /&gt;&lt;br /&gt;If you ever want to move to a bigger or different USB device, all you need to do to make things work is to copy or re-create the file structure and permissions from the current USB device to another one (but that's a discussion for later).&lt;br /&gt;&lt;br /&gt;I set up the Axis camera to use the FTP server and performance-wise, it's fine. The camera is saving MPEG-4 video when it detects motion, and the 8GB USB stick connected to the SheevaPlug looks like it will hold between 11 and 12 hours of video. Not too bad for something so small!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-7125671707690110460?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/7125671707690110460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=7125671707690110460' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7125671707690110460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7125671707690110460'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/10/sheevaplug-ftp-server.html' title='SheevaPlug FTP Server'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-2315902414615722525</id><published>2009-10-11T02:22:00.002-05:00</published><updated>2009-10-11T02:34:24.862-05:00</updated><title type='text'>Adding External USB Storage To The Plug</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Having trouble sleeping so I thought I'd try to do something constructive. Hopefully this makes sense, I'll probably read it tomorrow morning and wonder what the heck I was doing...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;Adding External Storage To The SheevaPlug&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;If you're looking to do something like setting up an FTP server or using the Plug to share files, you're going to need some external storage. Out of the box, the SheevaPlug does a pretty good job of supporting USB storage devices like flash drives and hard drives. I've successfully used the following USB hardware for storage:&lt;br /&gt;&lt;br /&gt;Kingston DataTraveler 8GB flash disk&lt;br /&gt;Verbatim 256MB flash disk&lt;br /&gt;PQI 8GB flash disk&lt;br /&gt;Acomdata external USB hard disk enclosure with 80GB IDE disk&lt;br /&gt;Enermax Jazz external USB hard disk enclosure with 1TB SATA disk&lt;br /&gt;&lt;br /&gt;A useful package to install before adding USB devices are the USB utilities:&lt;br /&gt;&lt;br /&gt;sudo apt-get install usbutils&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo apt-get install usbutils&lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;Suggested packages:&lt;br /&gt;  wget lynx&lt;br /&gt;The following NEW packages will be installed:&lt;br /&gt;  usbutils&lt;br /&gt;0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;Need to get 161kB of archives.&lt;br /&gt;After this operation, 524kB of additional disk space will be used.&lt;br /&gt;Get:1 http://ports.ubuntu.com jaunty/main usbutils 0.73-8ubuntu3 [161kB]&lt;br /&gt;Fetched 161kB in 1s (105kB/s)&lt;br /&gt;Selecting previously deselected package usbutils.&lt;br /&gt;(Reading database ... 12345 files and directories currently installed.)&lt;br /&gt;Unpacking usbutils (from .../usbutils_0.73-8ubuntu3_armel.deb) ...&lt;br /&gt;Setting up usbutils (0.73-8ubuntu3) ...&lt;br /&gt;&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once that's installed, plug your USB device in and turn it on (if required). You can tell if the Plug recognizes the device by checking the logs:&lt;br /&gt;&lt;br /&gt;dmesg&lt;br /&gt;&lt;br /&gt;You should see something along these lines (keep in mind I'm using a Kingston DataTraveler here):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;usb 1-1: new high speed USB device using ehci_marvell and address 2&lt;br /&gt;usb 1-1: configuration #1 chosen from 1 choice&lt;br /&gt;scsi0 : SCSI emulation for USB Mass Storage devices&lt;br /&gt;usb-storage: device found at 2&lt;br /&gt;usb-storage: waiting for device to settle before scanning&lt;br /&gt;scsi 0:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS&lt;br /&gt;sd 0:0:0:0: [sda] 15646720 512-byte hardware sectors (8011 MB)&lt;br /&gt;sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00&lt;br /&gt;sd 0:0:0:0: [sda] Assuming drive cache: write through&lt;br /&gt;sd 0:0:0:0: [sda] 15646720 512-byte hardware sectors (8011 MB)&lt;br /&gt;sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00&lt;br /&gt;sd 0:0:0:0: [sda] Assuming drive cache: write through&lt;br /&gt; sda: sda1&lt;br /&gt;sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;sd 0:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;usb-storage: device scan complete&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice that the disk is called “sda”. In some situations, you may also have an “sdb”, “sdc”, or otherwise named disk - usually if you just have one USB disk, it will be sda. Keep track of which one you've got or are working with.&lt;br /&gt;&lt;br /&gt;Using or putting the correct filesystem on the disk is important. The easiest thing to do would probably be to use the FAT32 filesystem. This has the advantage of being usable on both the Plug AND on any Windows computers you may want to use it with; unfortunately, it's kind of inefficient and if you use larger disks it becomes impractical. A disk can be set up with NTFS – this solves the disk size and efficiency problems but it's not supported on the Plug right out of the box. My personal favourite is to format with a Linux filesystem – that way, disk size isn't a problem and it should be supported nicely by any Linux machine. The big disadvantage with using a Linux filesystem is that you can't easily read it on a Windows machine.&lt;br /&gt;&lt;br /&gt;Regardless, I'm going with a Linux filesystem. If I'm using the Plug as a file server or FTP server, I don't really expect to be pulling the disk out and reading it in my Windows computer all that often. If I had a big rack-mount server, I wouldn't be pulling the disks out of it!&lt;br /&gt;&lt;br /&gt;So, to format a freshly attached USB disk with a Linux filesystem (in this case, ext2), you'll need to do the following. Remember that you're going to lose all of the data on your USB disk at this point. Also keep in mind that if you mistype these commands, there is the potential you'll kill your Plug.&lt;br /&gt;&lt;br /&gt;Blow away the old partitions on the disk:&lt;br /&gt;&lt;br /&gt;sudo fdisk /dev/sda  (You'll want to use sdb or sdc or whatever you saw when you typed dmesg a while ago)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo fdisk /dev/sda&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You'll now see the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;The number of cylinders for this disk is set to 30560.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;   (e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Type p to see the current partition table on the device:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 8011 MB, 8011120640 bytes&lt;br /&gt;16 heads, 32 sectors/track, 30560 cylinders&lt;br /&gt;Units = cylinders of 512 * 512 = 262144 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1       30560     7823344    b  W95 FAT32&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the filesystem is currently FAT32. Time to fix this. Type d to delete a partition.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;Command (m for help): d&lt;br /&gt;Selected partition 1&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If there had been more than one partition on the disk, you would have needed to select which one you wanted to delete. Now, type n to create a new partition. You will then be prompted a few times. You'll want to create a primary partition (select primary partition 1), and then accept the defaults for first and last cylinders:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;   e   extended&lt;br /&gt;   p   primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Partition number (1-4): 1&lt;br /&gt;First cylinder (1-30560, default 1):&lt;br /&gt;Using default value 1&lt;br /&gt;Last cylinder, +cylinders or +size{K,M,G} (1-30560, default 30560):&lt;br /&gt;Using default value 30560&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now hit p to take a look at the current partition table:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 8011 MB, 8011120640 bytes&lt;br /&gt;16 heads, 32 sectors/track, 30560 cylinders&lt;br /&gt;Units = cylinders of 512 * 512 = 262144 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1       30560     7823344   83  Linux&lt;br /&gt;&lt;br /&gt;Command (m for help):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the filesystem is already showing up as type 83, or Linux. If it wasn't, then you could hit t and then type in 83 to select it.&lt;br /&gt;&lt;br /&gt;So, things look good, time to commit to the changes. Kiss anything that's on that disk goodbye and hit w:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;Command (m for help): w&lt;br /&gt;The partition table has been altered!&lt;br /&gt;&lt;br /&gt;Calling ioctl() to re-read partition table.&lt;br /&gt;&lt;br /&gt;WARNING: Re-reading the partition table failed with error 16: Device or resource busy.&lt;br /&gt;The kernel still uses the old table.&lt;br /&gt;The new table will be used at the next reboot.&lt;br /&gt;Syncing disks.&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Looks like we need to bounce the Plug, so go ahead and restart it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo shutdown -r now&lt;br /&gt;&lt;br /&gt;Broadcast message from test@debian&lt;br /&gt;        (/dev/pts/0) at 1:33 ...&lt;br /&gt;&lt;br /&gt;The system is going down for reboot NOW!&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start pinging the Plug until it comes back (mine took 88 seconds), then SSH back in. I'm going to stop including the login screen as you should be familiar with it by now...&lt;br /&gt;&lt;br /&gt;Once you're logged in, start up fdisk again and take a look at the partition table. It should now look something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo fdisk /dev/sda&lt;br /&gt;[sudo] password for test:&lt;br /&gt;&lt;br /&gt;The number of cylinders for this disk is set to 30560.&lt;br /&gt;There is nothing wrong with that, but this is larger than 1024,&lt;br /&gt;and could in certain setups cause problems with:&lt;br /&gt;1) software that runs at boot time (e.g., old versions of LILO)&lt;br /&gt;2) booting and partitioning software from other OSs&lt;br /&gt;   (e.g., DOS FDISK, OS/2 FDISK)&lt;br /&gt;&lt;br /&gt;Command (m for help): p&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 8011 MB, 8011120640 bytes&lt;br /&gt;16 heads, 32 sectors/track, 30560 cylinders&lt;br /&gt;Units = cylinders of 512 * 512 = 262144 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1       30560     7823344   83  Linux&lt;br /&gt;&lt;br /&gt;Command (m for help): q&lt;br /&gt;&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Looks like it's a Linux partition now, and the partition (in this example) is /dev/sda1. Time to format it with the mke2fs command:&lt;br /&gt;&lt;br /&gt;sudo mke2fs /dev/sda1&lt;br /&gt;&lt;br /&gt;There are quite a few different ways to format the disk. This one is pretty straightforward but doesn't give you a lot of flexibility.&lt;br /&gt;&lt;br /&gt;The process may take quite a while (especially with larger disks), but will look something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo mke2fs /dev/sda1&lt;br /&gt;mke2fs 1.41.4 (27-Jan-2009)&lt;br /&gt;Filesystem label=&lt;br /&gt;OS type: Linux&lt;br /&gt;Block size=4096 (log=2)&lt;br /&gt;Fragment size=4096 (log=2)&lt;br /&gt;489600 inodes, 1955836 blocks&lt;br /&gt;97791 blocks (5.00%) reserved for the super user&lt;br /&gt;First data block=0&lt;br /&gt;Maximum filesystem blocks=2004877312&lt;br /&gt;60 block groups&lt;br /&gt;32768 blocks per group, 32768 fragments per group&lt;br /&gt;8160 inodes per group&lt;br /&gt;Superblock backups stored on blocks:&lt;br /&gt;        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632&lt;br /&gt;&lt;br /&gt;Writing inode tables: done&lt;br /&gt;Writing superblocks and filesystem accounting information: done&lt;br /&gt;&lt;br /&gt;This filesystem will be automatically checked every 39 mounts or&lt;br /&gt;180 days, whichever comes first.  Use tune2fs -c or -i to override.&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we have to mount the disk so we can use it. To do that, a mount point is needed. To create one:&lt;br /&gt;&lt;br /&gt;sudo mkdir /mnt/usb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo mkdir /mnt/usb&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the mount point created, the disk can now be mounted. Remember that /dev/sda1 will be replaced with whatever partition you want to mount. If you only have one USB disk and that disk has only one partition, chances are it will be /dev/sda1. To check the partition table quickly, type the following:&lt;br /&gt;&lt;br /&gt;sudo fdisk -l&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo fdisk -l&lt;br /&gt;&lt;br /&gt;Disk /dev/sda: 8011 MB, 8011120640 bytes&lt;br /&gt;16 heads, 32 sectors/track, 30560 cylinders&lt;br /&gt;Units = cylinders of 512 * 512 = 262144 bytes&lt;br /&gt;Disk identifier: 0x00000000&lt;br /&gt;&lt;br /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;/dev/sda1               1       30560     7823344   83  Linux&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Again, in this example the disk is /dev/sda, and the partition to mount is /dev/sda1. Once you know which partition you want to mount, then mount it:&lt;br /&gt;&lt;br /&gt;sudo mount /dev/sda1 /mnt/usb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo mount /dev/sda1 /mnt/usb&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once that's done, check out the filesystems available on your Plug with df:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ df&lt;br /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;br /&gt;rootfs                  519168    175716    343452  34% /&lt;br /&gt;tmpfs                   257816         0    257816   0% /lib/init/rw&lt;br /&gt;varrun                  257816       272    257544   1% /var/run&lt;br /&gt;varlock                 257816         0    257816   0% /var/lock&lt;br /&gt;udev                    257816        12    257804   1% /dev&lt;br /&gt;tmpfs                   257816         0    257816   0% /dev/shm&lt;br /&gt;tmpfs                   257816         0    257816   0% /var/cache/apt&lt;br /&gt;/dev/sda1              7700392     17196   7292032   1% /mnt/usb&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The last entry has the USB disk (in this case, /dev/sda1), and it's mounted at /mnt/usb.&lt;br /&gt;&lt;br /&gt;Now, create a directory on the USB disk that you'll actually store stuff in. While you could put data on the USB drive right now by dumping it in /mnt/usb, it's not a good idea. If the USB drive is connected and mounted properly, the data will be put on the USB drive. If, however, the USB drive is not mounted properly, the data will be dumped into the /mnt/usb directory on the Plug's internal filesystem!&lt;br /&gt;&lt;br /&gt;So, create a directory that you'll actually use now:&lt;br /&gt;&lt;br /&gt;sudo mkdir /mnt/usb/DATA&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo mkdir /mnt/usb/DATA&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Might as well check if the folder is there:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ ls -la /mnt/usb&lt;br /&gt;total 24&lt;br /&gt;drwxr-xr-x 4 root root  4096 Oct 11 01:50 .&lt;br /&gt;drwxr-xr-x 4 root root     0 Oct 11 01:42 ..&lt;br /&gt;drwxr-xr-x 2 root root  4096 Oct 11 01:50 DATA&lt;br /&gt;drwx------ 2 root root 16384 Oct 11 01:38 lost+found&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you want to be sure that the directory is actually on the USB disk, then unmount the USB disk so it's not available, then check to see if the DATA folder is there:&lt;br /&gt;&lt;br /&gt;sudo umount /dev/sda1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo umount /dev/sda1&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ls -la /mnt/usb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ ls -la /mnt/usb&lt;br /&gt;total 0&lt;br /&gt;drwxr-xr-x 2 root root 0 Oct 11 01:42 .&lt;br /&gt;drwxr-xr-x 4 root root 0 Oct 11 01:42 ..&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And it's gone, so it must've been on the USB disk. Mount the USB disk again so it's available:&lt;br /&gt;&lt;br /&gt;sudo mount /dev/sda1 /mnt/usb&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo mount /dev/sda1 /mnt/usb&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The problem with this setup as it is right now is that every time you reboot your Plug, you will need to manually mount the USB disk. This can be fixed by editing the /etc/fstab file. Unfortunately, fstab is one of those files where you can really mess things up if you're not careful.&lt;br /&gt;&lt;br /&gt;You're going to want to add the following line:&lt;br /&gt;&lt;br /&gt;/dev/sda1  /mnt/usb  ext2  defaults 1 2&lt;br /&gt;&lt;br /&gt;AGAIN – keep in mind that your entry may not be /dev/sda1 – take another look using fdisk -l if you're curious! If you created a different mount point than /mnt/usb then you'll also need to reflect those changes in your fstab file. There's a good outline of mount and fstab stuff at http://www.linux-usb.org/USB-guide/x498.html – check it out if you're looking for more options.&lt;br /&gt;&lt;br /&gt;Here's what my fstab looks like now:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;# UNCONFIGURED FSTAB FOR BASE SYSTEM&lt;br /&gt;tmpfs /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0&lt;br /&gt;/proc /proc proc rw,noexec,nosuid,nodev 0 0&lt;br /&gt;sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0&lt;br /&gt;varrun /var/run tmpfs rw,nosuid,mode=0755 0 0&lt;br /&gt;varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0&lt;br /&gt;udev /dev tmpfs rw,mode=0755 0 0&lt;br /&gt;tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0&lt;br /&gt;devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=620 0 0&lt;br /&gt;rootfs / rootfs rw 0 0&lt;br /&gt;tmpfs   /var/cache/apt  tmpfs   defaults,noatime&lt;br /&gt;&lt;br /&gt;/dev/sda1   /mnt/usb   ext2  defaults 1 2&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the last line.&lt;br /&gt;&lt;br /&gt;If you're comfortable with how everything looks, then restart your Plug and once it comes back up (mine took 94 seconds), hop back on and check your mounted filesystems:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ df&lt;br /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;br /&gt;rootfs                  519168    185240    333928  36% /&lt;br /&gt;tmpfs                   257816         0    257816   0% /lib/init/rw&lt;br /&gt;varrun                  257816       244    257572   1% /var/run&lt;br /&gt;varlock                 257816         0    257816   0% /var/lock&lt;br /&gt;udev                    257816        12    257804   1% /dev&lt;br /&gt;tmpfs                   257816         0    257816   0% /dev/shm&lt;br /&gt;tmpfs                   257816         0    257816   0% /var/cache/apt&lt;br /&gt;/dev/sda1              7700392     17200   7292028   1% /mnt/usb&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And there it is - /dev/sda1, mounted right where it should be.&lt;br /&gt;&lt;br /&gt;When you created the /mnt/usb/DATA folder, the only person who really has rights to it is root. You're not going to want to have to do everything as root, so we'll set some permissions on the DATA folder so you can use it. There is a great tutorial for how permissions work in Linux at http://catcode.com/teachmod/ - definitely worth checking out.&lt;br /&gt;&lt;br /&gt;Change the group on the DATA folder:&lt;br /&gt;&lt;br /&gt;sudo chgrp users /mnt/usb/DATA&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo chgrp users /mnt/usb/DATA/&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now change the owner on the DATA folder to your account (in this case, the username I'm using is test):&lt;br /&gt;&lt;br /&gt;sudo chown test /mnt/usb/DATA&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ sudo chown test /mnt/usb/DATA/&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You should now be able to create files and folders on the USB disk:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ mkdir /mnt/usb/DATA/sha-zam&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;No errors. Check and see if the folder is there:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;test@debian:~$ ls -la /mnt/usb/DATA/&lt;br /&gt;total 12&lt;br /&gt;drwxr-xr-x 3 test users 4096 Oct 11 02:16 .&lt;br /&gt;drwxr-xr-x 4 root root  4096 Oct 11 01:50 ..&lt;br /&gt;drwxr-xr-x 2 test test  4096 Oct 11 02:16 sha-zam&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And it is. So you've now got external USB storage set up that will mount automatically every time the Plug is rebooted. Now things like FTP or file servers start becoming practical – the 512MB of internal flash that the SheevaPlug comes with isn't quite enough to do serious file-related services.&lt;br /&gt;&lt;br /&gt;Again, I hope this is helpful information. I'm no expert when it comes to this stuff, but I have fun doing it and hope that by getting excited and writing all this stuff down, other people will discover it and have fun with it too.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-2315902414615722525?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/2315902414615722525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=2315902414615722525' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/2315902414615722525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/2315902414615722525'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/10/adding-external-usb-storage-to-plug.html' title='Adding External USB Storage To The Plug'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-2988439351723247995</id><published>2009-10-10T22:26:00.003-05:00</published><updated>2009-10-10T22:58:09.527-05:00</updated><title type='text'>Setting Up The SheevaPlug</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;So I finally had a chance to unbox and try out my second Plug. So far, it's also working like a charm. It also gave me the opportunity to check my notes to see if they were even remotely close to being right. Fortunately, they seem to be okay so without further ado, here are the first steps I took to getting the Plug running comfortably. I am using the stock firmware that came with the Plug - not the Alpha6 version (at least, not yet).&lt;br /&gt;&lt;br /&gt;Keep in mind that this is not a post on best practices, security, or how to use Linux. It's also what worked for me - it may not do the trick for you. As a result, I would suggest that if you're reading this you also look around at some of the other helpful documentation out there - I take no responsibility for what happens if this doesn't work for you or if it leaves giant security holes in your network!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-weight: bold;"&gt;SheevaPlug Basic Setup&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The first thing to do is check the box and Plug for any problems. If it looks okay on the outside and a light shake doesn't reveal any rattling sounds, then you'll need the following:&lt;br /&gt;&lt;br /&gt;The Plug,&lt;br /&gt;A source of power for the Plug,&lt;br /&gt;A source of wired network,&lt;br /&gt;DHCP running on the network somewhere (typically set up on the router), and&lt;br /&gt;A spare DHCP address.&lt;br /&gt;&lt;br /&gt;Ensure that DHCP is enabled either on the router or set up somewhere on your network and make sure there's a free address (but not too many free addresses – in my case, I've only got one DHCP address – 192.168.1.220). Once that's taken care of, you're ready to go.&lt;br /&gt;&lt;br /&gt;Connect the Plug to your network. I'm a little wary about the cable they include for this purpose – it looks like decent quality, but it's a little too kinked for my tastes after being bundled in the box like that.&lt;br /&gt;&lt;br /&gt;Power the Plug up, then sit down at your computer and start pinging the DHCP addresses you expect the plug to show up on (this is one of the reasons why it's a good idea to not have a larger DHCP address pool than you need). In my case, I'm waiting for 192.168.1.220 to show up. My Plug started responding to pings in 94 seconds. Give it a good five minutes before suspecting there's something wrong.&lt;br /&gt;&lt;br /&gt;Once the Plug responds to pings, you can connect to it via SSH. Grab your favourite SSH client (mine's PuTTY), and connect using the default credentials:&lt;br /&gt;&lt;br /&gt;Username: root&lt;br /&gt;Password: nosoup4u&lt;br /&gt;&lt;br /&gt;You should be rewarded with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;login as: root&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@192.168.1.220's password:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;The programs included with the Ubuntu system are free software;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;the exact distribution terms for each program are described in the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;individual files in /usr/share/doc/*/copyright.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;applicable law.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;To access official Ubuntu documentation, please visit:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http://help.ubuntu.com/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Last login: Sat Jan  1 00:07:04 2000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Take a look at the local filesystems. You might want to keep a copy of this so later on you can see where you started at. Use the df command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~# df&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;rootfs                  519168    150380    368788  29% /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257816         0    257816   0% /lib/init/rw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;varrun                  257816        36    257780   1% /var/run&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;varlock                 257816         0    257816   0% /var/lock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;udev                    257816         8    257808   1% /dev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257816         0    257816   0% /dev/shm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257816         0    257816   0% /var/cache/apt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The rootfs entry is the one you're particularly interested in. This is where all of your data will be stored. Keep in mind that it's only 512MB in total, and the operating system is already using 29% of that. Don't worry – you can do an awful lot with the space that's available on the plug, and it's not that difficult to expand the space!&lt;br /&gt;&lt;br /&gt;Now, take a look at how much memory is being used. Use the free command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~# free&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;             total       used       free     shared    buffers     cached&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Mem:        515636      29236     486400          0          0      11868&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-/+ buffers/cache:      17368     498268&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Swap:            0          0          0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can see that the Plug has 512MB of RAM, and thanks to the nice light default installation, it doesn't use a lot!&lt;br /&gt;&lt;br /&gt;A good place to start configuring your Plug is the New Plugger Howto on the PlugWiki - http://www.openplug.org/plugwiki/index.php/New_Plugger_How_To&lt;br /&gt;&lt;br /&gt;Edit /etc/dhcp3/dhclient.conf. Comment out the following line:&lt;br /&gt;&lt;br /&gt;supersede domain-name-servers 127.0.0.1;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;#supersede domain-name-servers 127.0.0.1;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, run the following:&lt;br /&gt;&lt;br /&gt;dhclient eth0&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~# dhclient eth0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Internet Systems Consortium DHCP Client V3.1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Copyright 2004-2008 Internet Systems Consortium.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;All rights reserved.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;For info, please visit http://www.isc.org/sw/dhcp/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Listening on LPF/eth0/00:50:43:01:68:10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sending on   LPF/eth0/00:50:43:01:68:10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Sending on   Socket/fallback&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DHCPOFFER of 192.168.1.220 from 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DHCPREQUEST of 192.168.1.220 on eth0 to 255.255.255.255 port 67&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DHCPACK of 192.168.1.220 from 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;bound to 192.168.1.220 -- renewal in 5470 seconds.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now to test if the DHCP client is grabbing DNS info correctly, ping a few of your favourite internet sites:&lt;br /&gt;&lt;br /&gt;ping www.cbc.ca&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~# ping www.cbc.ca&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PING a1849.gc.akamai.net (63.84.95.75) 56(84) bytes of data.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;64 bytes from host75.factsmgt.com (63.84.95.75): icmp_seq=1 ttl=57 time=48.5 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;64 bytes from host75.factsmgt.com (63.84.95.75): icmp_seq=2 ttl=57 time=48.2 ms&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;--- a1849.gc.akamai.net ping statistics ---&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;2 packets transmitted, 2 received, 0% packet loss, time 999ms&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;rtt min/avg/max/mdev = 48.226/48.387/48.549/0.272 ms&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;ping kernel.org&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# ping kernel.org&lt;br /&gt;PING kernel.org (204.152.191.37) 56(84) bytes of data.&lt;br /&gt;64 bytes from pub2.kernel.org (204.152.191.37): icmp_seq=1 ttl=60 time=80.4 ms&lt;br /&gt;64 bytes from pub2.kernel.org (204.152.191.37): icmp_seq=2 ttl=60 time=80.5 ms&lt;br /&gt;64 bytes from pub2.kernel.org (204.152.191.37): icmp_seq=3 ttl=60 time=80.1 ms&lt;br /&gt;64 bytes from pub2.kernel.org (204.152.191.37): icmp_seq=4 ttl=60 time=80.4 ms&lt;br /&gt;64 bytes from pub2.kernel.org (204.152.191.37): icmp_seq=5 ttl=60 time=80.8 ms&lt;br /&gt;&lt;br /&gt;--- kernel.org ping statistics ---&lt;br /&gt;5 packets transmitted, 5 received, 0% packet loss, time 4006ms&lt;br /&gt;rtt min/avg/max/mdev = 80.122/80.475/80.808/0.285 ms&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you get a return, then you're in good shape. If not, then make sure you edited the file correctly. If you did, then make sure you can actually ping the sites you're trying from another machine on your network.&lt;br /&gt;&lt;br /&gt;Now, edit the /etc/rc.local file. Comment out everything except the line:&lt;br /&gt;&lt;br /&gt;mkdir -p /var/cache/apt/archives/partial&lt;br /&gt;&lt;br /&gt;Then add a new line to keep the Plug's internal clock accurate:&lt;br /&gt;&lt;br /&gt;/usr/sbin/ntpdate-debian&lt;br /&gt;&lt;br /&gt;The file should now look something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;#!/bin/sh -e&lt;br /&gt;#&lt;br /&gt;# rc.local&lt;br /&gt;#&lt;br /&gt;# This script is executed at the end of each multiuser runlevel.&lt;br /&gt;# Make sure that the script will "exit 0" on success or any other&lt;br /&gt;# value on error.&lt;br /&gt;#&lt;br /&gt;# In order to enable or disable this script just change the execution&lt;br /&gt;# bits.&lt;br /&gt;#&lt;br /&gt;# By default this script does nothing.&lt;br /&gt;#insmod /boot/fat.ko&lt;br /&gt;#insmod /boot/vfat.ko&lt;br /&gt;mkdir -p /var/cache/apt/archives/partial&lt;br /&gt;/usr/sbin/ntpdate-debian&lt;br /&gt;#/root/discoverd&lt;br /&gt;#cd /&lt;br /&gt;##./demo.sh&lt;br /&gt;#date 012618002009&lt;br /&gt;#hwclock -w&lt;br /&gt;&lt;br /&gt;#exit 0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the file you just edited:&lt;br /&gt;&lt;br /&gt;/etc/rc.local&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~# /etc/rc.local&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; 9 Oct 01:18:45 ntpdate[1286]: step time server 91.189.94.4 offset -257334602.242881 sec&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@debian:~#&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, set your time zone:&lt;br /&gt;&lt;br /&gt;dpkg-reconfigure tzdata&lt;br /&gt;&lt;br /&gt;Just follow the prompts to find the closest match to your location. If you make a mistake, you can hit Cancel, or just run dpkg-reconfigure tzdata again later.&lt;br /&gt;&lt;br /&gt;When you're done, you'll get a nice little statement:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# dpkg-reconfigure tzdata&lt;br /&gt;&lt;br /&gt;Current default timezone: 'America/Winnipeg'&lt;br /&gt;Local time is now:      Thu Oct  8 20:20:58 CDT 2009.&lt;br /&gt;Universal Time is now:  Fri Oct  9 01:20:58 UTC 2009.&lt;br /&gt;&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, upgrade the existing installation:&lt;br /&gt;&lt;br /&gt;apt-get update&lt;br /&gt;&lt;br /&gt;(This may take a while, be patient while the packages are checked and downloaded.)&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# apt-get update&lt;br /&gt;Get:1 http://ports.ubuntu.com jaunty Release.gpg [189B]&lt;br /&gt;Get:2 http://ports.ubuntu.com jaunty Release [74.6kB]&lt;br /&gt;Get:3 http://ports.ubuntu.com jaunty/main Packages [1234kB]&lt;br /&gt;Get:4 http://ports.ubuntu.com jaunty/restricted Packages [865B]&lt;br /&gt;Get:5 http://ports.ubuntu.com jaunty/universe Packages [4442kB]&lt;br /&gt;Get:6 http://ports.ubuntu.com jaunty/multiverse Packages [159kB]&lt;br /&gt;Fetched 5910kB in 1min21s (72.6kB/s)&lt;br /&gt;Reading package lists... Done&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Upgrade the distribution:&lt;br /&gt;&lt;br /&gt;apt-get dist-upgrade&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# apt-get dist-upgrade&lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;Calculating upgrade... Done&lt;br /&gt;The following packages will be REMOVED:&lt;br /&gt;libxcb-xlib0&lt;br /&gt;The following NEW packages will be installed:&lt;br /&gt;aptitude libc6-vfp libcap2 libclass-accessor-perl libcwidget3 libept0&lt;br /&gt;libgdbm3 libio-string-perl libparse-debianchangelog-perl libsigc++-2.0-0c2a&lt;br /&gt;libtimedate-perl libxapian15 perl perl-modules python2.6 python2.6-minimal&lt;br /&gt;The following packages will be upgraded:&lt;br /&gt;adduser apt apt-utils base-files base-passwd bash bsdutils busybox-initramfs&lt;br /&gt;console-setup cpio cryptsetup debconf debconf-i18n debianutils dhcp3-client&lt;br /&gt;dhcp3-common dmsetup e2fslibs e2fsprogs eject file gcc-4.3-base ifupdown&lt;br /&gt;initramfs-tools initscripts kbd klogd language-pack-en language-pack-en-base&lt;br /&gt;libblkid1 libc6 libcomerr2 libcups2 libcurl3-gnutls libdevmapper1.02.1&lt;br /&gt;libgcc1 libgnutls26 libgpm2 libkrb53 libldap-2.4-2 libmagic1 libncurses5&lt;br /&gt;libncursesw5 libnewt0.52 libpam-modules libpam-runtime libpam0g libreadline5&lt;br /&gt;libsasl2-2 libsasl2-modules libselinux1 libsepol1 libsqlite3-0 libss2&lt;br /&gt;libssl0.9.8 libstdc++6 libuuid1 libvolume-id1 libwbclient0 libx11-6&lt;br /&gt;libx11-data libxcb1 locales login logrotate lsb-base lsb-release&lt;br /&gt;module-init-tools mount nano ncurses-base ncurses-bin netbase ntpdate&lt;br /&gt;openssh-client openssh-server openssl passwd procps python python-minimal&lt;br /&gt;python2.5 python2.5-minimal readline-common samba samba-common sudo sysklogd&lt;br /&gt;sysv-rc sysvinit-utils tasksel tasksel-data tzdata ubuntu-minimal ucf udev&lt;br /&gt;util-linux uuid-runtime vim-common vim-tiny whiptail xkb-data zlib1g&lt;br /&gt;103 upgraded, 16 newly installed, 1 to remove and 0 not upgraded.&lt;br /&gt;Need to get 57.1MB of archives.&lt;br /&gt;After this operation, 62.5MB of additional disk space will be used.&lt;br /&gt;Do you want to continue [Y/n]?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice it's telling you how much space it's going to use. I suggest keeping tabs on how much space you're using and how much you have left. These packages really don't take up that much space, but if you're not careful, it can build up quickly! Just hit Enter to continue.&lt;br /&gt;&lt;br /&gt;This may also take some time, there's a lot of stuff that's going to be updated. Some people wander away and have a coffee – I like watching the progress on the screen. There's a handy little timer at the  bottom right of the screen that will give you an “estimate” for how much longer you've got. I wouldn't put much faith in it, heh...&lt;br /&gt;&lt;br /&gt;You should be seeing a lot of “Get:## http://ports.ubuntu.com” statements (my update here had 119 of them). If you get a whole lot of something else, something may be wrong...&lt;br /&gt;&lt;br /&gt;Once it's done grabbing everything, you'll be prompted with a “Configuring console-setup” screen. I just left it on “UTF-8” and hit Enter. More unpacking and configuring will scroll up the screen. You'll then be prompted with a “Configuring libc6” screen. Just hit Enter again – the two services listed (samba and cron) are either useful (samba) or quite important (cron). So yeah, just hit Enter.&lt;br /&gt;&lt;br /&gt;More grinding away – restarting services, then more unpacking/replacing/installing. The SheevaPlug has a lot of processing power for its size and electrical requirements, but it's certainly no quad-core brute with eight gigs of RAM. Don't panic if it takes a while or if you see the occasional [fail] message. Lots are bad. I got one for syncookies.&lt;br /&gt;&lt;br /&gt;After about four minutes, you'll be prompted with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Configuration file `/etc/dhcp3/dhclient.conf'&lt;br /&gt;==&gt; Modified (by you or by a script) since installation.&lt;br /&gt;==&gt; Package distributor has shipped an updated version.&lt;br /&gt;What would you like to do about it ?  Your options are:&lt;br /&gt; Y or I        : install the package maintainer's version&lt;br /&gt; N or O    : keep your currently-installed version&lt;br /&gt;     D        : show the differences between the versions&lt;br /&gt;     Z        : background this process to examine the situation&lt;br /&gt;The default action is to keep your current version.&lt;br /&gt;*** dhclient.conf  (Y/I/N/O/D/Z)  [default=N] ?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hit Enter to accept the default. You edited that file a while ago, let's not overwrite it.&lt;br /&gt;&lt;br /&gt;A bit more grinding and you'll be prompted again, this time with the “Samba Server” configuration. Since we don't have any Samba stuff set up yet, select “install the package maintainer's version” and hit Enter. We'll have to configure Samba later anyway.&lt;br /&gt;&lt;br /&gt;Another brief burst of work, and you're done! These were the last few messages that scrolled up my screen:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;Generating locales...&lt;br /&gt;en_AU.UTF-8... up-to-date&lt;br /&gt;en_BW.UTF-8... up-to-date&lt;br /&gt;en_CA.UTF-8... up-to-date&lt;br /&gt;en_DK.UTF-8... up-to-date&lt;br /&gt;en_GB.UTF-8... up-to-date&lt;br /&gt;en_HK.UTF-8... up-to-date&lt;br /&gt;en_IE.UTF-8... up-to-date&lt;br /&gt;en_IN.UTF-8... up-to-date&lt;br /&gt;en_NG.UTF-8... up-to-date&lt;br /&gt;en_NZ.UTF-8... up-to-date&lt;br /&gt;en_PH.UTF-8... up-to-date&lt;br /&gt;en_SG.UTF-8... up-to-date&lt;br /&gt;en_US.UTF-8... up-to-date&lt;br /&gt;en_ZA.UTF-8... up-to-date&lt;br /&gt;en_ZW.UTF-8... up-to-date&lt;br /&gt;Generation complete.&lt;br /&gt;&lt;br /&gt;Processing triggers for libc6 ...&lt;br /&gt;ldconfig deferred processing now taking place&lt;br /&gt;Processing triggers for initramfs-tools ...&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, to tidy things up. This command is handy – you might want to run it every once in a while after you've installed or removed packages:&lt;br /&gt;&lt;br /&gt;apt-get autoremove&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# apt-get autoremove&lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;The following packages were automatically installed and are no longer required:&lt;br /&gt;libx11-data libxcb1 libxau6 libxdmcp6 libx11-6&lt;br /&gt;The following packages will be REMOVED:&lt;br /&gt;libx11-6 libx11-data libxau6 libxcb1 libxdmcp6&lt;br /&gt;0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.&lt;br /&gt;After this operation, 3621kB disk space will be freed.&lt;br /&gt;Do you want to continue [Y/n]?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Getting three and a half meg back isn't too shabby at all. Hit Enter to do it.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;(Reading database ... 12485 files and directories currently installed.)&lt;br /&gt;Removing libx11-6 ...&lt;br /&gt;Removing libx11-data ...&lt;br /&gt;Removing libxcb1 ...&lt;br /&gt;Removing libxau6 ...&lt;br /&gt;Removing libxdmcp6 ...&lt;br /&gt;Processing triggers for libc6 ...&lt;br /&gt;ldconfig deferred processing now taking place&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So your Plug is now updated. The New Plugger How To is cautious at the end – it advises trying to open a second SSH connection to make sure you can still log in before you reboot the Plug. This is my second Plug now, and I haven't had any problems yet, but taking a few extra seconds now can save you a lot of time later. So open up a second SSH session and try to log in. If you can, then it's time to reboot your plug (and cross your fingers):&lt;br /&gt;&lt;br /&gt;shutdown -r now&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# shutdown -r now&lt;br /&gt;&lt;br /&gt;Broadcast message from root@debian&lt;br /&gt;    (/dev/pts/0) at 20:51 ...&lt;br /&gt;&lt;br /&gt;The system is going down for reboot NOW!&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, back on your computer, ping away until you start getting replies. It took 87 seconds for my Plug to start responding.&lt;br /&gt;&lt;br /&gt;SSH back into the Plug using the root and nosoup4u credentials:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;login as: root&lt;br /&gt;root@192.168.1.220's password:&lt;br /&gt;Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl&lt;br /&gt;&lt;br /&gt;The programs included with the Ubuntu system are free software;&lt;br /&gt;the exact distribution terms for each program are described in the&lt;br /&gt;individual files in /usr/share/doc/*/copyright.&lt;br /&gt;&lt;br /&gt;Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by&lt;br /&gt;applicable law.&lt;br /&gt;&lt;br /&gt;To access official Ubuntu documentation, please visit:&lt;br /&gt;http://help.ubuntu.com/&lt;br /&gt;Last login: Mon Dec  4 04:52:05 2017 from 192.168.1.41&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So if you've got this far, then congratulations – you've now got a good solid platform to start playing with! There are many things that the plug can do at this point, the most popular would probably be sharing a USB disk over the network or something. Before you do that, though – there are two things you need to do: change the root password and create another account that does not have godly root-like powers.&lt;br /&gt;&lt;br /&gt;So, to change the root password, type:&lt;br /&gt;&lt;br /&gt;passwd&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# passwd&lt;br /&gt;Enter new UNIX password:&lt;br /&gt;Retype new UNIX password:&lt;br /&gt;passwd: password updated successfully&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, create a new account (in this case, I'm creating an account called “test”):&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;root@debian:~# adduser test&lt;br /&gt;Adding user `test' ...&lt;br /&gt;Adding new group `test' (1000) ...&lt;br /&gt;Adding new user `test' (1000) with group `test' ...&lt;br /&gt;Creating home directory `/home/test' ...&lt;br /&gt;Copying files from `/etc/skel' ...&lt;br /&gt;Enter new UNIX password:&lt;br /&gt;Retype new UNIX password:&lt;br /&gt;passwd: password updated successfully&lt;br /&gt;Changing the user information for test&lt;br /&gt;Enter the new value, or press ENTER for the default&lt;br /&gt;    Full Name []: Test User 1&lt;br /&gt;    Room Number []:&lt;br /&gt;    Work Phone []:&lt;br /&gt;    Home Phone []:&lt;br /&gt;    Other []:&lt;br /&gt;Is the information correct? [Y/n] y&lt;br /&gt;root@debian:~#&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So now your user account is ready to go. What I'd suggest at this point is that you set up the account with sudo access so you can actually install and run stuff with the new account:&lt;br /&gt;&lt;br /&gt;visudo&lt;br /&gt;&lt;br /&gt;I've added the line for the test user (obviously, you'll want to use whatever username you created instead of “test”) as shown below:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# /etc/sudoers&lt;br /&gt;#&lt;br /&gt;# This file MUST be edited with the 'visudo' command as root.&lt;br /&gt;#&lt;br /&gt;# See the man page for details on how to write a sudoers file.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;Defaults        env_reset&lt;br /&gt;&lt;br /&gt;# Host alias specification&lt;br /&gt;&lt;br /&gt;# User alias specification&lt;br /&gt;&lt;br /&gt;# Cmnd alias specification&lt;br /&gt;&lt;br /&gt;# User privilege specification&lt;br /&gt;root    ALL=(ALL) ALL&lt;br /&gt;test    ALL=(root) ALL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Uncomment to allow members of group sudo to not need a password&lt;br /&gt;# (Note that later entries override this, so you might need to move&lt;br /&gt;# it further down)&lt;br /&gt;# %sudo ALL=NOPASSWD: ALL&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once that's done, you can log back in with the account you created and you don't have to worry about accidentally messing too much up!&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;login as: test&lt;br /&gt;test@192.168.1.220's password:&lt;br /&gt;Linux debian 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl&lt;br /&gt;&lt;br /&gt;The programs included with the Ubuntu system are free software;&lt;br /&gt;the exact distribution terms for each program are described in the&lt;br /&gt;individual files in /usr/share/doc/*/copyright.&lt;br /&gt;&lt;br /&gt;Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by&lt;br /&gt;applicable law.&lt;br /&gt;&lt;br /&gt;To access official Ubuntu documentation, please visit:&lt;br /&gt;http://help.ubuntu.com/&lt;br /&gt;Last login: Fri Oct  9 18:59:43 2009 from 192.168.1.41&lt;br /&gt;test@debian:~$&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hopefully by now you're logged in as your non-root account. If you choose to log in with root at this point, that's your option – this is not intended to be a lecture or how-to on Linux (or any kind of) security.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;So that's that... the first in what will probably be quite a few posts on the SheevaPlug - I hope you found this helpful!&lt;br /&gt;&lt;br /&gt;There are so many uses for a little computer like this, and I'm super-impressed with how well they work. Granted, two isn't a great sample, but so far my experience has been great with these devices!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-2988439351723247995?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/2988439351723247995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=2988439351723247995' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/2988439351723247995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/2988439351723247995'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/10/setting-up-sheevaplug.html' title='Setting Up The SheevaPlug'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-1558660124431819945</id><published>2009-10-06T20:29:00.002-05:00</published><updated>2009-10-06T20:36:31.373-05:00</updated><title type='text'>They've Shipped!</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;My new Plug order has shipped! With luck it will be here before the end of the week!&lt;br /&gt;&lt;br /&gt;I've got a bunch of plans for this order, I especially want to apply my notes against it and see how accurate they are. If I can get the plug running with my notes, I'll post them here.&lt;br /&gt;&lt;br /&gt;I haven't had as much time to play with this stuff lately as I would have liked, but Blammo has been working exceptionally well. Mrs. HAL and I have been using Blammo's USB disks as a handy little network storage space. We've got about 190GB on it right now.&lt;br /&gt;&lt;br /&gt;I've been manually backing up the "live" 1TB disk using tar, but I tried zipping (tar -cvzf). Ouch - 24 hours later and it was still going. Just doing a tar -cvf and 190GB gets archived in about three hours or so.&lt;br /&gt;&lt;br /&gt;The FTP and Motion services have been running flawlessly, too. No problems or complaints at all!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-1558660124431819945?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/1558660124431819945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=1558660124431819945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/1558660124431819945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/1558660124431819945'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/10/theyve-shipped.html' title='They&apos;ve Shipped!'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-4735673357710516787</id><published>2009-09-24T21:43:00.005-05:00</published><updated>2009-09-24T22:13:42.197-05:00</updated><title type='text'>Put In Another Order...</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;I haven't had as much time to work with stuff over the last few days as I would have liked, but I did get a few more things working. I set up a little Perl script that talks SMTP, then set up a cron job to run it once an hour... now I'll get a very simple heartbeat email letting me know if Blammo is up. I'm just playing around right now, but it could have its uses.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Here's what I used to send the email:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;#!/usr/bin/perl -w&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;use Net::SMTP;&lt;br /&gt;&lt;br /&gt;my $smtp=Net::SMTP-&gt;new('smtp.mymailserver.com') or die $!;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;$smtp-&gt;mail("myaddress\@myaddress.com" );&lt;br /&gt;$smtp-&gt;to("destination\@address.com");&lt;br /&gt;$smtp-&gt;data();&lt;br /&gt;$smtp-&gt;datasend("To: destination\@address.com\n");&lt;br /&gt;$smtp-&gt;datasend("From: myaddress\@myaddress.com\n");&lt;br /&gt;$smtp-&gt;datasend("Subject: Blammo Heartbeat\n");&lt;br /&gt;$smtp-&gt;datasend("\n");&lt;br /&gt;$smtp-&gt;datasend("This is a heartbeat message from Blammo.");&lt;br /&gt;$smtp-&gt;dataend();&lt;br /&gt;$smtp-&gt;quit();&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;And that's it. Not a heck of a lot there. I'm planning on eventually hooking a PIC up to the USB serial thing and hanging various things off the PIC to check - maybe a PIR or smoke detector or something. The PIC would wait for Blammo to query it over the serial port; Blammo would read the data and if something was triggered it could fire an email off. I did something like this a while ago but it required a laptop sitting beside the breadboard that the PIC was on. Kind of clunky.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;Oh, and I ran a backup of one my desktop to the 1TB disk on Blammo. Transfer rates were quite consistent:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ci7z-qEWjJE/SrwzWSbKx8I/AAAAAAAAAQk/zbeiG1U6K90/s1600-h/SMALL-Trafshow_backup-fast-FromTX-Long.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 101px;" src="http://2.bp.blogspot.com/_ci7z-qEWjJE/SrwzWSbKx8I/AAAAAAAAAQk/zbeiG1U6K90/s320/SMALL-Trafshow_backup-fast-FromTX-Long.png" alt="" id="BLOGGER_PHOTO_ID_5385235712424200130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;It's sitting around the 70% utilization point. Checking the CPU utilization on the Plug showed the smbd process only using about 15% and the Plug was still over 20% idle. I'm not entirely sure what the limiting factor is for the data transfer - I'm betting it's my little home network. I'll have to try using a crossover cable between Blammo and something with a Gbit NIC just to see if it speeds things up...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Running an archive job using tar -cvf doesn't tax the Plug's CPU at all. I haven't run a -cvzf since I last had those USB problems, maybe I'll try it tonight. It's too bad I didn't have another one to play around with while this one is actually being used...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;Speaking of which - I ordered up another SheevaPlug dev kit yesterday. I'm planning on cracking it open to see how easy it'd be to run off a battery. I'm also going to use it to test all of the notes I wrote down. If I set the new Plug up successfully using my notes, I'll post them (instead of posting them and not being reasonably sure that they're correct). No idea when the new Plug will get here, but that's okay - I've still got a ton of stuff to do with the current one!&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-4735673357710516787?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/4735673357710516787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=4735673357710516787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4735673357710516787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4735673357710516787'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/09/put-in-another-order.html' title='Put In Another Order...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ci7z-qEWjJE/SrwzWSbKx8I/AAAAAAAAAQk/zbeiG1U6K90/s72-c/SMALL-Trafshow_backup-fast-FromTX-Long.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-3311099678222058750</id><published>2009-09-21T22:39:00.004-05:00</published><updated>2009-09-21T23:07:57.673-05:00</updated><title type='text'>SD Success!</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;The SheevaPlug - which, from this point on will be known as "Blammo" - is now running its root filesystem off of a 16GB SDHC card!&lt;br /&gt;&lt;br /&gt;I followed the directions from &lt;a href="http://www.openplug.org/plugwiki/index.php/SD_Card_As_Root_File_System"&gt;http://www.openplug.org/plugwiki/index.php/SD_Card_As_Root_File_System&lt;/a&gt; - they were quite thorough and well done, I only had one small burp but it was my own fault.&lt;br /&gt;&lt;br /&gt;The U-boot system built into the SheevaPlug makes it really easy to change the behaviour of the plug (as long as you're careful). The more I play with this thing, the more impressed I am with it!&lt;br /&gt;&lt;br /&gt;I'm going to be ordering another one or two Plugs this coming weekend, I think, so I'm going to get all of my notes together and try it out on a fresh-out-of-the-box Plug to see if my notes are anywhere near correct. If they are, I'll be posting everything I've done to get it working step by step.&lt;br /&gt;&lt;br /&gt;Here's something interesting - I compared boot times between the internal flash and the SDHC card. The timer started when I entered the "boot" command from the U-boot console and stopped when I saw the boot prompt. Booting off of the internal flash takes 110.07 seconds. Booting off the SDHC card takes 17.84 seconds. No, that's not a typo!&lt;br /&gt;&lt;br /&gt;Here's what the filesystems looked like before:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;root@Blammo:/media/big1/DUMP/BACKUPS/M/LAPTOP# df&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Filesystem          1K-blocks     Used    Available   Use%   Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;rootfs              519168        225320  293848      44%    /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs               257440        0       257440      0%     /lib/init/rw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;varrun              257440        584     256856      1%     /var/run&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;varlock             257440        0       257440      0%     /var/lock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;udev                257440        72      257368      1%     /dev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs               257440        0       257440      0%     /dev/shm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs               257440        21824   235616      9%     /var/cache/apt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/dev/sda1           961432072     16659648 895934424  2%     /media/big1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/dev/sdb1           961432072     10597304 901996768  2%     /media/big2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;... and here's what they look like now. Notice the rootfs entry:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;root@Blammo:/media/big1# df&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;rootfs                15796916    496092  14498380   4% /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs                   257440         0    257440   0% /lib/init/rw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;varrun                  257440       308    257132   1% /var/run&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;varlock                 257440         0    257440   0% /var/lock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;udev                    257440        80    257360   1% /dev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs                   257440         0    257440   0% /dev/shm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tmpfs                   257440         0    257440   0% /var/cache/apt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/dev/sdb1            961432072  17014652 895579420   2% /media/big1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/dev/sda1            961432072  43887736 868706336   5% /media/big2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'm not sure how long the SDHC card will last, but I'm planning on making a copy of it shortly just in case...&lt;br /&gt;&lt;br /&gt;Nothing new on the wireless front, haven't had a chance to look around for a new USB adapter.&lt;br /&gt;&lt;br /&gt;Oh - and there have still been no further USB problems since I plugged in that adapter. That's a bit of a relief!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-3311099678222058750?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/3311099678222058750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=3311099678222058750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3311099678222058750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3311099678222058750'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/09/sd-success.html' title='SD Success!'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-144950407877604120</id><published>2009-09-20T20:24:00.003-05:00</published><updated>2009-09-20T20:37:10.426-05:00</updated><title type='text'>No USB Hiccup Today</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Since I plugged in the USB hub, I've run seven tar jobs from one of the TB disks to the other. So far, so good!&lt;br /&gt;&lt;br /&gt;And let me spare you the effort by saying, "DUH" to myself about not plugging in the electrical thing...&lt;br /&gt;&lt;br /&gt;A great resource for the SheevaPlug stuff is the PlugWiki. Starting out, the New Plugger How-To was really helpful. Granted, it just works if you plug it in, but if you want to start customizing it a bit (and get around a few little nagging problems), it's a great place to start:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.openplug.org/plugwiki/index.php/New_Plugger_How_To"&gt;http://www.openplug.org/plugwiki/index.php/New_Plugger_How_To&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are also links to other How-To pages for various other things you may want to get running.&lt;br /&gt;&lt;br /&gt;I was a little worried about how much could be done with 512MB of flash disk space. Apparently, quite a bit! Even now, after installing a few extra packages that weren't actually needed to do the things I'm doing, I still haven't hit the 50% mark on the disk:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;root@Blammo:/media/big1/DUMP/BACKUPS/M/LAPTOP# df&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;rootfs                  519168    225320    293848  44% /&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257440         0    257440   0% /lib/init/rw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;varrun                  257440       584    256856   1% /var/run&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;varlock                 257440         0    257440   0% /var/lock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;udev                    257440        72    257368   1% /dev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257440         0    257440   0% /dev/shm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;tmpfs                   257440     21824    235616   9% /var/cache/apt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/dev/sda1            961432072  16659648 895934424   2% /media/big1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/dev/sdb1            961432072  10597304 901996768   2% /media/big2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So yeah, 44% full. I'm still planning on migrating the whole thing over to an SD card, but that's more because it'll be easy to duplicate when I get another Plug, and over time, the easily replaceable SD card will fail from repeated writes, and not the internal flash.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-144950407877604120?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/144950407877604120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=144950407877604120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/144950407877604120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/144950407877604120'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/09/no-usb-hiccup-today.html' title='No USB Hiccup Today'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-7988510390720434500</id><published>2009-09-19T23:58:00.002-05:00</published><updated>2009-09-20T00:20:24.485-05:00</updated><title type='text'>SheevaPlug Successes</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Well, I've had the Plug for a few days now and have had some success with it. I'm trying to write stuff down as I do it, and someday I'll get my notes in order, but here's the deal so far.&lt;br /&gt;&lt;br /&gt;Hardware:&lt;br /&gt;- SheevaPlug (duh)&lt;br /&gt;- Two 1TB disks in USB enclosures&lt;br /&gt;- QuickCam Pro 3000 webcam&lt;br /&gt;- Staples 4-port powered USB hub (more on this later)&lt;br /&gt;- Parallax-branded USB-to-serial converter&lt;br /&gt;&lt;br /&gt;Firmware:&lt;br /&gt;- Running my own custom kernel (2.6.30.7)&lt;br /&gt;&lt;br /&gt;Software:&lt;br /&gt;- Samba (for Windows file sharing)&lt;br /&gt;- ProFTPd (for the Axis 207W camera to dump video to)&lt;br /&gt;- Motion (to use with the webcam, it's working but I haven't done much with it yet)&lt;br /&gt;- Trafshow (it's cool and I've never done a Linux installation without installing it, heh)&lt;br /&gt;- Wget (useful for fetching new kernel stuff)&lt;br /&gt;- The Build-Essential package (essential for building a new kernel on the Plug)&lt;br /&gt;- Libncurses package (makes some screens pretty)&lt;br /&gt;&lt;br /&gt;So far it's been running quite well. It's a development kit, but there is a lot of documentation out there that's been put together by people fighting with one aspect or another of the Plug. Getting a new kernel to run was probably the most difficult thing I've done so far, but now I've got all the modules I need to get most of the goodies I want working up and running.&lt;br /&gt;&lt;br /&gt;I haven't got the wireless working yet, I think the main reason for that is my USB wireless adapter is a screaming piece of crap. But I digress...&lt;br /&gt;&lt;br /&gt;I was having some problems with the disk aspect of things. One of the 1TB disks is where all of the "live" data goes. Periodically, that data will be copied over to the other disk using tar. Every once in a while, though, during heavy disk access, the whole USB bus would just burp and that would be it - disks no longer accessible, camera no longer accessible... only a reboot of the Plug would fix it. Looking at /var/log/messages showed the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:04 Blammo kernel: usb 1-1.3: USB disconnect, address 6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:04 Blammo kernel: pwc: Disconnected while webcam is in use!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:04 Blammo kernel: usb 1-1.3: new full speed USB device using orion-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ehci and address 18&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:04 Blammo motion: [1] Closing video device /dev/video0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:06 Blammo kernel: usb 1-1.3: new full speed USB device using orion-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ehci and address 19&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:07 Blammo kernel: usb 1-1.3: new full speed USB device using orion-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ehci and address 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:08 Blammo kernel: usb 1-1.3: new full speed USB device using orion-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ehci and address 21&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:33 Blammo kernel: sd 1:0:0:0: [sda] Unhandled error code&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sep 19 21:32:33 Blammo kernel: sd 1:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Uh-oh...&lt;br /&gt;&lt;br /&gt;I was worried it was drivers or firmware or who knows what... but then I remembered that even though the USB hub came with an AC adapter, I hadn't been using it. So I plugged it in and have successfully done two full multi-GB transfers between the disks. So hopefully that solves that problem.&lt;br /&gt;&lt;br /&gt;I'm really impressed with this little device. With the CPU pinned at 100%, I'm measuring a temperature of 48C on the outside of the box. Pretty warm, but nothing that will start paper on fire or anything. Now that I think about it, this heat may even let it run all winter in an unheated garage, hmm...&lt;br /&gt;&lt;br /&gt;Still on my list of things to do are get wireless working, get the USB disks to automatically mount in the right order, and move the whole filesystem to an SD card to make replication easier and reduce the wear on the internal flash.&lt;br /&gt;&lt;br /&gt;More later!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-7988510390720434500?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/7988510390720434500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=7988510390720434500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7988510390720434500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7988510390720434500'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/09/sheevaplug-successes.html' title='SheevaPlug Successes'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-5901205686618987172</id><published>2009-09-12T02:43:00.006-05:00</published><updated>2009-09-12T03:11:42.795-05:00</updated><title type='text'>It's Here!</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;The SheevaPlug dev kit arrived this afternoon - I've been busy playing with it. So far, it's exceeded my expectations.&lt;br /&gt;&lt;br /&gt;Firstly, the box. As soon as I saw the box, I thought two things: firstly, half the cost of the item is probably because of the box - it's very sturdy and has a neat little magnetic snap to hold it shut. Secondly, even if the Plug itself was a piece of junk, at least I got a&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt; cool box out of it.&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SqtSMTHGvcI/AAAAAAAAAQU/ji9acy_gOJs/s1600-h/SMALL-DSC02419.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SqtSMTHGvcI/AAAAAAAAAQU/ji9acy_gOJs/s320/SMALL-DSC02419.JPG" alt="" id="BLOGGER_PHOTO_ID_5380484551066172866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Inside the box are five things - a CD (which for some reason my machine won't read - not a big deal as updated stuff is on the website), a power cable (which is optional as the unit itself has a regular plug built onto it), an ethernet cable, a USB cable, and the plug itself.&lt;br /&gt;&lt;br /&gt;As I mentioned above, I couldn't get the CD to work in my machine so I hopped onto Globalscale's site and downloaded all the SheevaPlug stuff. I read just enough of the documentation to get ready, then set up DHCP on my DSL router (to start everything up initially, the Plug needs DHCP), then plugged it in and turned it on.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;It worked. I downloaded PuTTY and hopped onto the Plug. Took a quick look around. The Plug has 512MB of internal storage (flash), and 512MB of RAM. Stock, the Plug was using about 30% of the storage and a little less than 10% of the RAM. Nice tight install.&lt;br /&gt;&lt;br /&gt;I took a peek at the Plug Wiki (www.openplug.org) and found some good "real world" instructions on what to do first to bring things up to spec. I updated the packages and distribution (it's running a slimmed-down Ubuntu for ARM-ish processors&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;), but didn't update to the A6 firmware.&lt;br /&gt;&lt;br /&gt;After that, I grabbed an 8GB USB stick and plugged it in, just to see what would happen. The Plug found it and I was able to mount the filesystem (FAT32) no problem. Connecting an old external hard disk (80GB, USB1.1) was a little more problematic, but after reformatting it with ext2, it was up and running just fine.&lt;br /&gt;&lt;br /&gt;Since then I've been running around in all kinds of directions, playing with it. Here's what's running so far:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;- Samba - it's functioning as a Windows file server, I've been copying stuff to and from it but that USB1.1 disk is BRUTALLY slow.&lt;br /&gt;- FTP - I installed ProFTPd, it's pretty snazzy. It's also suffering from the same performance problems as Samba due to the fact it's folders are on the same disk.&lt;br /&gt;- Just for the heck of it, I turned on motion detection on the Axis 207W camera and it's dumping its videos to the FTP server.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So far, so good! What I really need is a USB hub so I can run more than one device at a time. I'd also like to get a bigger (and faster) disk or two. I'm also looking at downloading the Motion software and having it talk directly to the Axis camera to do its own motion detection. I played with Motion a year or two ago and it worked really well.&lt;br /&gt;&lt;br /&gt;Here's a photo of the Plug in action. Notice how small it is!&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SqtVmtBxInI/AAAAAAAAAQc/23HcARxjdJM/s1600-h/SMALL-DSC02418.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SqtVmtBxInI/AAAAAAAAAQc/23HcARxjdJM/s320/SMALL-DSC02418.JPG" alt="" id="BLOGGER_PHOTO_ID_5380488303234589298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The cable at bottom left is ethernet, bottom right is USB (to the external disk), the power cable in the top outlet is also going to the external disk.&lt;br /&gt;&lt;br /&gt;The unit itself is silent. The whirr of the disk on the floor beside it is all I can hear. It's warm-ish, but not hot at all. I've got it all hidden downstairs in the basement - it's small and will stay out of the way. With no moving parts, it should last quite a while, the only thing I can see wearing out is the internal flash, but that can be mitigated by moving some of the applications to an SD card (there's an SD socket on the side, you can see it in the picture) or to an external USB disk or flash.&lt;br /&gt;&lt;br /&gt;I could see these being ridiculously popular if they were easier to get ahold of. Even from a business perspective - small companies that only need a small file or printer server and don't have any room, power, or environmental for a proper "server room" may be able to get away with using a few of these with USB disks attached. There are so many possibilities!&lt;br /&gt;&lt;br /&gt;I've got a lot of playing to do!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-5901205686618987172?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/5901205686618987172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=5901205686618987172' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5901205686618987172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5901205686618987172'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/09/its-here.html' title='It&apos;s Here!'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ci7z-qEWjJE/SqtSMTHGvcI/AAAAAAAAAQU/ji9acy_gOJs/s72-c/SMALL-DSC02419.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-8161142095534938203</id><published>2009-08-30T19:17:00.001-05:00</published><updated>2009-08-30T19:23:59.298-05:00</updated><title type='text'>Iiiiiiinteresting...</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;Whoo - been busy lately, haven't had any time to build or play around with anything, but...&lt;br /&gt;&lt;br /&gt;I just ordered up a SheevaPlug development kit. I saw them back in February and thought they were pretty neat, now the reviews are in and they're quite positive. Basically, what it is is a tiny server that runs Linux that fits into a wall wart. It's got 512MB RAM, 512MB flash storage, and to talk to the rest of the world it's got USB and ethernet ports.&lt;br /&gt;&lt;br /&gt;This is the kind of thing I've been waiting YEARS for! The potential is pretty much endless - aside from all the experiment-y stuff, just plug an external USB disk into it, plug it into the wall somewhere in the basement, wire it in (or set up a USB wireless ethernet adapter), and presto - instant back-ups! Instant file server! Plug in web cams, set up the motion software and presto - network accessible camera! Security camera! Whatever!&lt;br /&gt;&lt;br /&gt;The whole package has no moving parts and consumes 7W when running flat out. That's small - like, run-for-days-on-a-battery small!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-8161142095534938203?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/8161142095534938203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=8161142095534938203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8161142095534938203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8161142095534938203'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/08/iiiiiiinteresting.html' title='Iiiiiiinteresting...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-3120718333985610779</id><published>2009-07-05T23:04:00.004-05:00</published><updated>2009-07-05T23:20:57.483-05:00</updated><title type='text'>Moving Along...</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Didn't spend as much time on stuff as I'd planned, but I did get a chance to do up the boards for the Linx transceiver chips that I'm going to be using. Normally, I would buy something in a DIP package so I could just plug it into a breadboard, but I don't think any of these transmitter/receiver/transceiver chips actually come in DIP. That, and they're pretty succeptible to noise so you need a groundplane, so there's another reason to put them on a PCB.&lt;br /&gt;&lt;br /&gt;A long time ago (really long time ago), I'd just draw the lines out on a piece of copper-clad board with a Sharpie, then hope for the best. This worked pretty well for discrete components and up to, say, 8-pin DIPs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;Then I migrated to using a laser printer to print the traces on a sheet of paper, then pressing the traces from the paper onto the PCB with a hot iron, THEN soaking it in water for a few hours so the paper fell off. It gave me pretty decent results, but required a lot of touch-ups as the traces wouldn't be deposited on the PCB consistently. I could do 40-pin DIPs with this method, but it didn't look very good and I was limited as to how thin I could make my traces.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;About a year ago, I finally dropped some money on the pre-sensitized boards from MG Chemical. Print up your PCB design on a clear sheet of plastic, then use a lamp to expose it on a board for 10-15 minutes, then drop the exposed board into the developer, lightly brush, rinse, and voila! A (more often than not) great-looking board with no annoying shorts. It is a little more time to make a board, but I can make a board with much higher component and trace density than the other two methods.&lt;br /&gt;&lt;br /&gt;Anyway, so here's a batch (there are 10 on this board) of freshly etched transceiver boards, just ready to be cut out, drilled, and soldered. I put one of the tra&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;nsceiver chips on there just to make sure all the pins lined up:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SlF6367SslI/AAAAAAAAAGU/e__BgvwOIa4/s1600-h/SMALL-DSCI0068.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SlF6367SslI/AAAAAAAAAGU/e__BgvwOIa4/s320/SMALL-DSCI0068.JPG" alt="" id="BLOGGER_PHOTO_ID_5355196533049569874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;That hole on the left side is for the length of dental floss I tie to the board so I can move it around in (and lift it out of) the ferric chloride.&lt;br /&gt;&lt;br /&gt;With luck I'll have two of these up and running in the next day or two!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-3120718333985610779?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/3120718333985610779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=3120718333985610779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3120718333985610779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/3120718333985610779'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/07/moving-along.html' title='Moving Along...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ci7z-qEWjJE/SlF6367SslI/AAAAAAAAAGU/e__BgvwOIa4/s72-c/SMALL-DSCI0068.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-5175068910287000614</id><published>2009-06-28T16:24:00.005-05:00</published><updated>2009-06-28T17:13:32.555-05:00</updated><title type='text'>It's Alive!</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;Finally had a chance to sit down today and work on the CRC stuff. It works!&lt;br /&gt;&lt;br /&gt;I had it working over wire pretty quickly, but it was difficult to test because I had trouble introducing enough noise into the wire to flip bits at the right time. Imagine that - here I am, half the stuff I put together barely works because there's too much interference, but when I actually need to generate some... I tried:&lt;br /&gt;- Touching the wire,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;- Putting a long antenna-like wire in parallel with the transmission wire,&lt;br /&gt;- Grabbing my little fluorescent lamp (all the TVs and radios in the house make noise when I turn that sucker on),&lt;br /&gt;- Running the signal through a 30-foot piece of wire,&lt;br /&gt;- Wrapping the wire around the fluorescent lamp, and&lt;br /&gt;- Running the signal through a 150 foot spool of cable, which sat on top of the fluorescent lamp.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;None of these worked. I ended up having success by adding another wire to the 30-foot piece of wire (which was the transmission line at the time), then running a metal file along it. Made enough noise that I could get the receiving PIC to turn on the CRC fail LED with some regularity.&lt;br /&gt;&lt;br /&gt;Then went to RF. The signal's being transmitted at 2400bps, which is about as high as I can go running a 4MHz crystal. Most of the things I do don't really require anything any faster. 2400bps transfers 88bits plus a 16-bit preamble in less than 50ms. Not too sh&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;abby.&lt;br /&gt;&lt;br /&gt;Anyway, the transmitter sends the signal ten times. My old projects would transmit 50x or more to try to get a signal out. I left the transmitter in the basement and wandered outside and into the garage and if I knelt down behind the car with my chest, car, garage wall, deck, outside wall of the house, and two inside walls between the transmitter and receiver, I could sometimes mess up the signal enough to get the CRC fail LED to go on. I'm only using one of the ten available bytes to transmit data (the other nine are just a bu&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;nch of zeroes), but the data is being received and checked!&lt;br /&gt;&lt;br /&gt;I'm quite pleased with the progress here. Progress towards what, you ask? Well... I'm not 100% sure. I'm looking at some monitoring and automation down the road a bit, but for now it's just good to get this working. The code is pretty fat right now, but I'm not working on medical equipment or space station parts.&lt;br /&gt;&lt;br /&gt;So, a general outline here (I need to get me a scanner):&lt;br /&gt;&lt;br /&gt;- PORTC.0 of the transmitter connects to PORTC.1 of the receiver, w&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;hether it's by cable or through wireless.&lt;br /&gt;- PORTC.7 determines whether that particular PIC is going to be a transmitter or receiver. I'm only using a simplex link here, so PORTC.7 is directly wired in on both PICs right now.&lt;br /&gt;- PORTA.0 on the transmitting PIC is connected to a potentiometer that swings between VCC and GND, that way I read the voltage level with ADC port 0. That's the byte of data I'm tucking into the 80 bits worth of payload I have to work with.&lt;br /&gt;&lt;br /&gt;Here's a shot of the transmitter and receiver side by side. Notice the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;same display on both bar LEDs, and the green LED (CRC OK) on the receiver is lit:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/Skfnzb-lfDI/AAAAAAAAAF0/fd5GcNkGFQ4/s1600-h/SMALL-DSC02344.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/Skfnzb-lfDI/AAAAAAAAAF0/fd5GcNkGFQ4/s320/SMALL-DSC02344.JPG" alt="" id="BLOGGER_PHOTO_ID_5352501553022729266" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:trebuchet ms;"&gt;There's no way I'll be able to mess up the signal and take a picture of the transmitter and receiver at the same time so you'll have to take my word for it that it works. Already I can think of a whole bunch more uses for this scheme than the previous ways I'd done RF projects... I can actually send sampled data now instead of just notifying of a particular situation.&lt;br /&gt;&lt;br /&gt;Here's the code - this is also the first RF project I've done where the same code is running on both the transmitter and receiver!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;@ device  pic16F877A, hs_osc, wdt_off, lvp_off, protect_off&lt;br /&gt;&lt;br /&gt;define OSC 4&lt;br /&gt;&lt;br /&gt;DEFINE ADC_BITS 8           ' Set number of bits in ADC result&lt;br /&gt;DEFINE ADC_CLOCK 3          ' Set ADC clock source (rc = 3)&lt;br /&gt;DEFINE ADC_SAMPLEUS 50      ' Set ADC sampling time in microseconds&lt;br /&gt;&lt;br /&gt;TRISA = %11111111           'PORTA is set to inputs (using for ADC)&lt;br /&gt;TRISB = 000000           'PORTB is set to outputs&lt;br /&gt;TRISC = %11111110           'PORTC is set to inputs except pin0 (TX)&lt;br /&gt;TRISD = 000000           'PORTD is set to outputs&lt;br /&gt;&lt;br /&gt;'CRC-8-CCIT: x^8 + x^7 + x^3 + x^2 + 1 = 110001101&lt;br /&gt;&lt;br /&gt;'**Aliases**&lt;br /&gt;&lt;br /&gt;TX var PORTC.0&lt;br /&gt;RX VAR PORTC.1&lt;br /&gt;TX_RX var PORTC.7&lt;br /&gt;MSG_GOOD var PORTB.0&lt;br /&gt;MSG_BAD var PORTB.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'**Variables**&lt;br /&gt;MESSAGE4 VAR WORD       'Most sgnificant WORD (16 bits) of data&lt;br /&gt;MESSAGE3 VAR WORD         '2MSW of data&lt;br /&gt;MESSAGE2 VAR WORD       '3MSW of data&lt;br /&gt;MESSAGE1 VAR WORD       '2LSW of data&lt;br /&gt;MESSAGE0 VAR WORD       'Least significant WORD (16 bits) of data&lt;br /&gt;DATATMP4 VAR WORD         'a copy of the original data that will be shifted into CALC&lt;br /&gt;DATATMP3 VAR WORD&lt;br /&gt;DATATMP2 VAR WORD&lt;br /&gt;DATATMP1 VAR WORD&lt;br /&gt;DATATMP0 VAR WORD&lt;br /&gt;&lt;br /&gt;RECEIVED_CRC VAR BYTE   'CRC byte that's been received&lt;br /&gt;&lt;br /&gt;TRANSMIT_CRC VAR BYTE   'CRC byte that's been calculated and ready to go out with message&lt;br /&gt;&lt;br /&gt;WORKING_CRC VAR BYTE    'Byte for working CRC value. If CRC is being generated,&lt;br /&gt;                        'then this is set to zero. If CRC is being checked, then&lt;br /&gt;                        'this is set to RECEIVED_CRC.&lt;br /&gt;&lt;br /&gt;CALC VAR WORD             'space for DATA to be shifted in to run CRC against&lt;br /&gt;&lt;br /&gt;SHIFTCOUNT VAR BYTE        'count the number of bit shifts done&lt;br /&gt;&lt;br /&gt;POLY VAR WORD            'CRC-8-CCITT Polynomial. Actually needs nine bits&lt;br /&gt;&lt;br /&gt;X var byte              'Counter variable to transmit a burst of the same msgs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Init:&lt;br /&gt;PORTD = %10101010       'Show the PIC is alive&lt;br /&gt;msg_good = 1&lt;br /&gt;MSG_bad = 0&lt;br /&gt;PAUSE 500&lt;br /&gt;PORTD = %01010101&lt;br /&gt;MSG_GOOD = 0&lt;br /&gt;MSG_BAD = 1&lt;br /&gt;PAUSE 500&lt;br /&gt;PORTD = %10101010&lt;br /&gt;MSG_GOOD = 1&lt;br /&gt;MSG_BAD = 0&lt;br /&gt;PAUSE 500&lt;br /&gt;PORTD = 0&lt;br /&gt;PORTB = 0&lt;br /&gt;&lt;br /&gt;POLY = 00000110001101     'Preload with the CRC-8-CCITT polynomial value&lt;br /&gt;&lt;br /&gt;ADCON1 = 2              ' PORTA is analog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Start:&lt;br /&gt;&lt;br /&gt;'Clear everything:&lt;br /&gt;MESSAGE4 = 0&lt;br /&gt;MESSAGE3 = 0&lt;br /&gt;MESSAGE2 = 0&lt;br /&gt;MESSAGE1 = 0&lt;br /&gt;MESSAGE0 = 0&lt;br /&gt;&lt;br /&gt;'PORTD = 0          'Don't clear PORTD, leave the last result on the bar display.&lt;br /&gt;                    'That way, you can easily tell if it's still actuall running.&lt;br /&gt;                    'If a signal has not been received this time around, the&lt;br /&gt;                    'CRC OK or BAD LEDs will turn off. The effect ends up being&lt;br /&gt;                    'that if signals are being received either the OK or FAIL CRC&lt;br /&gt;                    'LEDs will flash if a signal is being received.&lt;br /&gt;PORTB = 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Read the TX_RX switch, see if we're receiving or transmitting. High = TX,&lt;br /&gt;'Low = RX.&lt;br /&gt;&lt;br /&gt;if tx_rx = 1 then&lt;br /&gt;    WORKING_CRC = 0&lt;br /&gt;    ADCIN 0, MESSAGE0.lowbyte&lt;br /&gt;    goto Docalc&lt;br /&gt;endif&lt;br /&gt;'If we're here, then TX_RX must be 0, which means we're receiving. Give the&lt;br /&gt;'only wait 15s for a signal before returning to Start so we're not stuck forever.&lt;br /&gt;serin rx,16780,15000,start,["AA"],message4.byte1,message4.byte0,message3.byte1,_&lt;br /&gt;message3.byte0,message2.byte1,message2.byte0,message1.byte1,message1.byte0,_&lt;br /&gt;message0.byte1,message0.byte0,received_crc&lt;br /&gt;&lt;br /&gt;working_crc = received_crc&lt;br /&gt;&lt;br /&gt;goto docalc&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;'--PSEUDOCODE HERE--&lt;br /&gt;&lt;br /&gt;'IF (TASK IS TO TRANSMIT DATA) THEN&lt;br /&gt;    'WORKING_CRC = 0&lt;br /&gt;    'ELSE&lt;br /&gt;        'WORKING_CRC = RECEIVED_CRC&lt;br /&gt;'ENDIF&lt;br /&gt;&lt;br /&gt;'--END PSEUDOCODE--&lt;br /&gt;&lt;br /&gt;DoCalc:&lt;br /&gt;&lt;br /&gt;CALC = 0                'Clear the CALC variable.&lt;br /&gt;&lt;br /&gt;DATATMP4 = MESSAGE4        'Get a working copy of the data for the calculations.&lt;br /&gt;DATATMP3 = MESSAGE3     'MESSAGEx comes from the data that is to be sent out&lt;br /&gt;DATATMP2 = MESSAGE2     'or is one of the bytes of data received from the TX side.&lt;br /&gt;DATATMP1 = MESSAGE1&lt;br /&gt;DATATMP0 = MESSAGE0&lt;br /&gt;&lt;br /&gt;SHIFTCOUNT = 0            'Clear the shift counter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RunCRC:&lt;br /&gt;&lt;br /&gt;If SHIFTCOUNT = 88 THEN        'Shifting 88 times: 80 for the actual data, another&lt;br /&gt;                            'eight for the padding zeroes or CRC data at the end&lt;br /&gt;    GOTO DoneShifting&lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;CALC = CALC &lt;&lt; 1           'Shift the bits in the calculation over by one.&lt;br /&gt;CALC.0 = DATATMP4.15       'Dump the MSB of DATATMP into the LSB of CALC&lt;br /&gt;DATATMP4 = DATATMP4 &lt;&lt;1    'And shift the DATATMP data over by one&lt;br /&gt;DATATMP4.0 = DATATMP3.15   &lt;br /&gt;DATATMP3 = DATATMP3 &lt;&lt; 1    &lt;br /&gt;DATATMP3.0 = DATATMP2.15&lt;br /&gt;DATATMP2 = DATATMP2 &lt;&lt; 1&lt;br /&gt;DATATMP2.0 = DATATMP1.15&lt;br /&gt;DATATMP1 = DATATMP1 &lt;&lt; 1&lt;br /&gt;DATATMP1.0 = DATATMP0.15&lt;br /&gt;DATATMP0 = DATATMP0 &lt;&lt; 1&lt;br /&gt;DATATMP0.0 = WORKING_CRC.7      'Append eight zeroes to the end of the message&lt;br /&gt;WORKING_CRC = WORKING_CRC &lt;&lt; 1  'or the received CRC data, depending on TX or RX.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SHIFTCOUNT = SHIFTCOUNT + 1    'We've just done a shift, so increment.&lt;br /&gt;&lt;br /&gt;IF CALC.8 = 0 THEN     'If there's a 0 in position 8, we can't do an XOR, need to shift again.&lt;br /&gt;    GOTO RunCRC   &lt;br /&gt;ENDIF&lt;br /&gt;&lt;br /&gt;CALC = CALC ^ POLY      'XOR the current calculation with the POLY.&lt;br /&gt;&lt;br /&gt;goto RunCRC:          'Done this cycle, see if there are more bits to do.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DoneShifting:          'Go here when done the shifting and calculation&lt;br /&gt;&lt;br /&gt;'Done all the shifting. If we're transmitting, then TRANSMIT_CRC = CALC.&lt;br /&gt;'If we're receiving, then if CALC = 0, the message passes the CRC check and can&lt;br /&gt;'(hopefully) be considered sane.&lt;br /&gt;&lt;br /&gt;if TX_rx = 1 then       '1=transmitting, 0=receiving&lt;br /&gt;    PORTD = message0.byte0  'Display the message being sent&lt;br /&gt;    transmit_crc = calc&lt;br /&gt;    for x = 0 to 10     'Send the message 10 times, just in case.&lt;br /&gt;    serout tx,16780,["AA",message4.byte1,message4.byte0,message3.byte1,_&lt;br /&gt;message3.byte0,message2.byte1,message2.byte0,message1.byte1,message1.byte0,_&lt;br /&gt;message0.byte1,message0.byte0,transmit_crc]&lt;br /&gt;    next x&lt;br /&gt;pause 1000              'Done. Wait here for 1s before starting again&lt;br /&gt;goto start&lt;br /&gt;endif&lt;br /&gt;'If we're here, then we're set to RX.&lt;br /&gt;'Did the data pass the CRC check?&lt;br /&gt;if calc = 0 then        'If CALC = 0, the data passed the CRC check&lt;br /&gt;    msg_good = 1&lt;br /&gt;    msg_bad = 0&lt;br /&gt;    PORTD = message0.byte0&lt;br /&gt;    PAUSE 1000          'Wait for 1s for display visibility and to ignore&lt;br /&gt;                        'any other attempts during this "burst" (10 copies).&lt;br /&gt;    goto start          'Done here, go back and try it all again&lt;br /&gt;endif&lt;br /&gt;'If we're here, then the data was bad!&lt;br /&gt;MSG_GOOD = 0&lt;br /&gt;MSG_BAD = 1&lt;br /&gt;PORTD = 0&lt;br /&gt;goto start          'Done here, go back and try it all again. Don't wait, go&lt;br /&gt;'back quickly to see if we can catch the transmitter before it's done sending&lt;br /&gt;'the rest of the burst (10 copies).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: trebuchet ms;"&gt;Next step is to sample more data... maybe a few more ADC channels. Displaying the data at the receiving end in text on an LCD would be a lot easier than watching the bar LEDs, too...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-5175068910287000614?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/5175068910287000614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=5175068910287000614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5175068910287000614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5175068910287000614'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/06/its-alive.html' title='It&apos;s Alive!'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ci7z-qEWjJE/Skfnzb-lfDI/AAAAAAAAAF0/fd5GcNkGFQ4/s72-c/SMALL-DSC02344.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-7360305172628693056</id><published>2009-06-23T20:45:00.002-05:00</published><updated>2009-06-23T20:58:02.567-05:00</updated><title type='text'>But... Will It... Work?</title><content type='html'>&lt;span style="font-family: trebuchet ms;"&gt;So I think I've put together what I need to both generate CRC blocks AND check the sanity of received data. Unfortunately, I don't have time to test it this evening, but I'm going to post it here anyway. If it works, I'll be pleased - if it doesn't, then my public humilitation on the internet will be complete. Either way, it'll be interesting.&lt;br /&gt;&lt;br /&gt;I'm heading towards using an 11-byte packet for my RF projects. Here's the structure:&lt;br /&gt;&lt;br /&gt;|Preamble/Sync|DST Addr/SRC Addr|Next Hop/Previous Hop |Flags1|Flags0|Desc2|Desc1|Desc0|Data2|Data1|Data0|CRC|&lt;br /&gt;&lt;br /&gt;And here's what each segment means:&lt;br /&gt;- Preamble/Sync (16 bits, not counted towards packet total or included in CRC calculations): Sends ASCII string "AA" to wake up receivers. The next 88 bits received after "AA" are counted as data.&lt;br /&gt;- DST Addr (4 bits) / SRC Addr (4 bits): You can probably figure out what these are.&lt;br /&gt;- Next Hop Addr (4 bits) / Prev Hop Addr (4 bits)&lt;br /&gt;- Flags1 (8 bits), Flags0 (8 bits): These are pretty fluid right now, but include ACK, NAK, Request ACK, RF Test, Data Test, Too Many CRC Errors, Low Power, PORTA Fail, PORTB fail, PORTC fail, PORTD fail, PORTE fail, Direction (for really, REALLY basic routing), and Last Gasp.&lt;br /&gt;- Desc2 (8 bits), Desc1 (8 bits), Desc0 (8 bits): Used to describe either the status of a particular reading or operation or to tell the receiving end what is contained in the DATA fields (i.e. a temperature reading, port bit reading, etc).&lt;br /&gt;- Data2 (8 bits), Data1 (8 bits), Data0 (8 bits): Meant to contain actual data from a PIC port or peripheral. PIC ADCs are 8-bit, 10-bit, 12-bit, or 16-bit depending on model.&lt;br /&gt;- CRC (8 bits): the CRC checksum that's generated by the above code (hopefully).&lt;br /&gt;&lt;br /&gt;The structure is most definitely going to be changing, but hopefully there's enough there for me to make some progress.&lt;br /&gt;&lt;br /&gt;As for the CRC code, here it is. Oh, and yes, I know I should have been using arrays instead of a big list of shuffling variables, but... well... uh... yeah, I have no excuse. Anyway, here it is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family: courier new;"&gt;'CRC-8-CCIT: x^8 + x^7 + x^3 + x^2 + 1 = 110001101&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Variables:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MESSAGE4 VAR WORD       'Most sgnificant WORD (16 bits) of data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MESSAGE3 VAR WORD         '2MSW of data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MESSAGE2 VAR WORD       '3MSW of data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MESSAGE1 VAR WORD       '2LSW of data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MESSAGE0 VAR WORD       'Least significant WORD (16 bits) of data &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP4 VAR WORD         'a copy of the original data that will be shifted into CALC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP3 VAR WORD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP2 VAR WORD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP1 VAR WORD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP0 VAR WORD&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RECEIVED_CRC VAR BYTE   'CRC byte that's been received&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;TRANSMIT_CRC VAR BYTE   'CRC byte that's been calculated and ready to go out with message&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;WORKING_CRC VAR BYTE    'Byte for working CRC value. If CRC is being generated,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                        'then this is set to zero. If CRC is being checked, then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                        'this is set to RECEIVED_CRC.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CALC VAR WORD             'space for DATA to be shifted in to run CRC against&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SHIFTCOUNT VAR BYTE        'count the number of bit shifts done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;POLY VAR WORD            'CRC-8-CCITT Polynomial. Actually needs nine bits&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Init:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PORTD = %10101010       'Show the PIC is alive&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PAUSE 500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PORTD = %01010101&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PAUSE 500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PORTD = %10101010&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PAUSE 500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;PORTD = 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;POLY = 00000110001101     'Preload with the CRC-8-CCITT polynomial value&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Start:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'--PSEUDOCODE HERE--&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'IF (TASK IS TO TRANSMIT DATA) THEN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'WORKING_CRC = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'ELSE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        'WORKING_CRC = RECEIVED_CRC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'ENDIF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'--END PSEUDOCODE--&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CALC = 0                'Clear the CALC variable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP4 = MESSAGE4        'Get a working copy of the data for the calculations.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP3 = MESSAGE3     'MESSAGEx comes from the data that is to be sent out&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP2 = MESSAGE2     'or is one of the bytes of data received from the TX side.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP1 = MESSAGE1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP0 = MESSAGE0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SHIFTCOUNT = 0            'Clear the shift counter&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RunCRC:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If SHIFTCOUNT = 88 THEN        'Shifting 88 times: 80 for the actual data, another &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                            'eight for the padding zeroes or CRC data at the end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    GOTO DoneShifting&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ENDIF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CALC = CALC &lt;&lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CALC.0 = DATATMP4.15       'Dump the MSB of DATATMP into the LSB of CALC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP4 = DATATMP4 &lt;&lt;1&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP4.0 = DATATMP3.15    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP3 = DATATMP3 &lt;&lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP3.0 = DATATMP2.15&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP2 = DATATMP2 &lt;&lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP2.0 = DATATMP1.15&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP1 = DATATMP1 &lt;&lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP1.0 = DATATMP0.15&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP0 = DATATMP0 &lt;&lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DATATMP0.0 = WORKING_CRC.7      'Append eight zeroes to the end of the message&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;WORKING_CRC = WORKING_CRC &lt;&lt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;SHIFTCOUNT = SHIFTCOUNT + 1    'We've just done a shift, so increment.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;IF CALC.8 = 0 THEN     'If there's a 0 in position 8, we can't do an XOR, need to shift again.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    GOTO RunCRC    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ENDIF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;CALC = CALC ^ POLY      'XOR the current calculation with the POLY.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;goto RunCRC:          'Done this cycle, see if there are more bits to do.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DoneShifting:          'Go here when done the shifting and calculation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Done all the shifting. If we're transmitting, then TRANSMIT_CRC = CALC.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'If we're receiving, then if CALC = 0, the message passes the CRC check and can&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'(hopefully) be considered sane.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now keep in mind that this code won't actually DO anything - it's meant to be plugged into other code that will gather/receive/transmit data.&lt;br /&gt;&lt;br /&gt;I'm hoping to try it out before the weekend. Wish me luck!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-7360305172628693056?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/7360305172628693056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=7360305172628693056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7360305172628693056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7360305172628693056'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/06/but-will-it-work.html' title='But... Will It... Work?'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-7124221596123641026</id><published>2009-06-21T18:33:00.003-05:00</published><updated>2009-06-21T23:05:51.831-05:00</updated><title type='text'>Doing The CRC Thing...</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Wow... been a while since I've posted here. Actually, it's been a while since I've sat down at the bench and worked on stuff.&lt;br /&gt;&lt;br /&gt;I picked up some of those Linx transceivers a little while ago and had some great plans for things to do with them. The reason I like the Linx stuff is they include everything except voltage regulation on the chip. You don't need any LC network or, well, anything else to make it work. They're a little more expensive, but it ends up being worth it when you're trying to get things to work - as long as there's power and serial data going in, you can be pretty sure there's serial data being sent out.&lt;br /&gt;&lt;br /&gt;Up until now all of my RF projects were very simple affairs - a PIC would read, say, an ADC and if it was out of range, it would send a particular signal. An example would be if it was a reading above 200 (8-bit ADC), it would send the string "AAAAAA". If it was a reading below 50, it would send "BBBBBB". The nice thing about this is that if you're worried about noise, you can send a shorter signal (like "AA"), or if you're worried about false alarms, you can send a longer signal (like "AAAAAAAAAA").&lt;br /&gt;&lt;br /&gt;There are two main problems with this scheme. The first is there is a definitive tradeoff between lessening the chance that a message will be accidentally "built" by noise and lessening the chance that a legitimate signal will be corrupted by noise. Make the signal shorter and there's less chance that noise will corrupt it - but then there's a better chance that a random burst of noise will actually create a signal or even corrupt one signal to make it look like another. Make the signal longer and it's less likely to be replicated by random noise, but then it's easier for the noise to mess the signal up.&lt;br /&gt;&lt;br /&gt;The second problem is that you're then stuck with either limiting the number of conditions you can test for, or you need to create lookup tables that tell the PIC what to do for any of the possible conditions that the system may encounter. For a small number of tests or conditions, this isn't a problem. Things like checking if an ADC is reading above or below something, whether an input line is high or low, this is fine. But once you start trying to transmit multiple conditions or (gasp) data, then it becomes a problem. Even something as easy as a wireless thermometer with 1.0 degree resolution would be a big chore. You'd need to send "AAAAAA" if the temperature was 0C, then "BBBBBB" if the temperature was 1C, then "CCCCCC" if the temperature was 2C, and so on. The receiving end would then need a lookup table for every possible temperature that was being sent so it would know what to do when it received something like "TTTTTT". Since a lot of microcontrollers are limited in RAM, code space, or clock cycles, It's obvious that in situations like this it'd be a lot more elegant to just send data to the receiver so it could do the calculations or do calculations and send the results as data to the receiver. But how to send data which could be any value through the air and be pretty sure that the receiver is reading it properly?&lt;br /&gt;&lt;br /&gt;One popular way to do this is to transmit multiple copies of the same message. Then, the receiver compares the copies and decides which is correct based on how many look the same. For example, five copies would be sent, the receiver found three the same and two are different, so it decides that the three matching ones are correct. This is a pretty simple way to do it but it does have problems, too - just because a certain number of messages match does not guarantee that that particular message is correct. Also, in lower-power environments it's not desireable to spend extra power transmitting the same message multiple times.&lt;br /&gt;&lt;br /&gt;Another way to go about it is using cyclic redundancy checks, or CRCs. CRCs have been around for a long time now, and depending on their application are excellent at detecting errors in data. CRC's can't fix the error, but they will tell if one has been received (with a certain degree of accuracy) so the message can be ignored or asked for again by the receiver. The main disadvantage of CRCs is that they require a bit of processing to calculate, at both the transmitting and receiving sides. Basically, a CRC block is the result of XORing data that you want to transmit with a generator polynomial. There are many different generator polynomials of different sizes. Ethernet, for example, uses a 32-bit CRC. The calculated CRC is tacked onto the end of the data and transmitted, and the receiver uses the same generator polynomial and runs it against the received data and CRC. If the answer ends up being zero, the message was received correctly (well, "should" have been received correctly - there are still some bit patterns that can fool the CRC check). &lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;There are a lot of good articles out there about how CRCs work, and I've become pretty decent at working them out on paper, but as I pretty much suck at math and programming (it's a hobby, not a career, thank goodness) I'm making slow progress getting them working on the PICs.&lt;br /&gt;&lt;br /&gt;I've had success with PicBasic Pro on the 16F877A (which has been discontinued - phooey) generating a 4-bit CRC with a 4-bit chunk of data, and I've also been able to generate an 8-bit CRC with a 32-bit chunk of data. Next step is to write a program that'll generate AND check 64-bit data with an 8-bit CRC.&lt;br /&gt;&lt;br /&gt;An 8-bit CRC certainly isn't the strongest error-detection scheme out there, but even so, it should detect 255/256 or 99.6% of errors. A 0.4% error rate is not too shabby, especially for what I'm doing. Probably not too great for something like a heart monitor or dialysis machine, but for telling the temperature outside or whether there's light on a photoresistor it should be fine. Tacking on eight bits to a 64-bit message would also keep overhead down to about 11%. Still not great, but it's not like it needs to be super speedy...&lt;br /&gt;&lt;br /&gt;What I'm really trying for here is a multi-node network where the nodes in the middle act as relays between the nodes at the ends. The Linx modules have a range of 3000 feet in the right conditions (and I've had the opportunity to test that out in the country - they actually exceeded 3000 feet line-of-sight), and what I'd like to do is be able to, say, check the temperature from 10000 or 15000 feet away (almost three miles).&lt;br /&gt;&lt;br /&gt;But baby steps. I need a portable 8-bit CRC program that will generate and check CRC data. Fortunately, the two activities are so similar that I just need to slightly modify my existing (working) CRC generator.&lt;br /&gt;&lt;br /&gt;I've tried to put up a set of instructions on how to do CRCs, but for the life of me, I can't get the formatting to come out nicely. Since there's a lot of XORing, the instructions make absolutely no sense if the bits don't line up. Everything looks fine in Notepad, but regardless of font or setting, I can't get them to line up properly here. Hmm... maybe I need to put up a picture or something...&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-7124221596123641026?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/7124221596123641026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=7124221596123641026' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7124221596123641026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7124221596123641026'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/06/doing-crc-thing.html' title='Doing The CRC Thing...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-4899457116654352884</id><published>2009-02-17T18:04:00.004-06:00</published><updated>2009-02-17T18:57:47.509-06:00</updated><title type='text'>So, let's try something - a blinking LED</title><content type='html'>Probably not a bad idea to actually look at a simple project with the 16F877A. With the parts I mentioned in the previous post, you can easily use PBP to write a program that will confirm that your PIC is indeed alive. Sure, a blinking LED isn't all that exciting, but what the heck, it can't hurt to start small. It's also a good idea to have an extra LED built into more complex projects so you can make it blink every once in a while to show you whether the program is working. I don't know how many times I've done that...&lt;br /&gt;&lt;br /&gt;I won't bother mentioning that you need a programmer, the PBP demo, or a computer to put it together with. How about a schematic?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SZtYdYZmFRI/AAAAAAAAABY/glIBRTqm57E/s1600-h/Schematic.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 239px; height: 320px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SZtYdYZmFRI/AAAAAAAAABY/glIBRTqm57E/s320/Schematic.JPG" alt="" id="BLOGGER_PHOTO_ID_5303930247948145938" border="0" /&gt;&lt;/a&gt;So, let's take a look. The top section is your power supply. Hook a 9V battery up to the Input and Ground pins of the 7805. Magically, at the output you'll have a usable 5V supply that you can use to hook up to your PIC. Remember to disconnect the battery - even when the PIC isn't hooked up, the 7805 will slowly drain your battery all by itself. Make sure you look up the pinout of the 7805 that you're using - the ones I've used are all (if you're holding it up, facing you) IN, GROUND, and OUT from left to right. Check before you hook it up, though!&lt;br /&gt;&lt;br /&gt;The second part is obviously where the PIC goes. The 10k resistor from Pin 1 to +5V makes keeps the /MCLR line high so the PIC won't accidentally reset itself. The 1k resistor hanging off pin 19 limits the current going to the LED, which in turn goes to ground.&lt;br /&gt;&lt;br /&gt;The Vdd and Vss pins are the +5V and GND (Ground) connections, respectively. The "dd" and "ss" mean "drain" and "source" in ye olde MOS lingo - best to just ignore that and remember that for the PICs, Vdd is +, Vss is -. It is VERY important to make sure you have both sets of these pins hooked up!&lt;br /&gt;&lt;br /&gt;Pins 13 and 14 are the oscillator pins. You hook your 4MHz crystal between them, and also hook each pin to GND with a 33pF capacitor. This provides a nice stable clock for your PIC to run on.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once you've got that built, it's time to write the program with the PBP demo. This is how I did it (and I do not pretend to be a master programmer):&lt;br /&gt;&lt;br /&gt;******&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;'Name - Blink.pbp&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;'MCU: 16F877A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;'Clock: 4MHz, external HS crystal oscillator&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;'Description: Blink an LED on PORTD.0&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@ device  pic16F877A, hs_osc, wdt_on, lvp_off, protect_off 'Turn off the WDT&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family:courier new;"&gt;define  OSC 4           'Clock at 4MHz, using external HS Crystal Oscillator&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;br /&gt;TRISD = 000000       'Set all of PORTD to outputs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PORTD.0 = 0             'Turn off PORTD.0 when starting up&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;MainFunction:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;pause 1000                    'Pause for 1000 milliseconds&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;toggle PORTD.0            'If PORTD.0 was on, turn it off. If it was off, turn it on.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;goto mainfunction       'Go back and do it again.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;******&lt;br /&gt;&lt;br /&gt;And that's pretty much it. If everything works properly, the LED should turn on and off at about one second intervals.&lt;br /&gt;&lt;br /&gt;That "define OSC 4" line near the top of the program tells PBP that you're using a 4MHz crystal. If you've got an 8MHz crystal, you should change it to "define OSC 8". If you've got a 1MHz crystal... well, you get the drift. If the "define OSC" line doesn't match the actual crystal you're using, your program will run either faster or slower than you intended. Or won't work at all, if you're really unlucky.&lt;br /&gt;&lt;br /&gt;The "pause 1000" line tells PBP to wait 1000 milliseconds. If you change that to 500, then everything's going to happen twice as fast.&lt;br /&gt;&lt;br /&gt;Pretty easy, eh?&lt;br /&gt;&lt;br /&gt;Here's the finished product:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SZtbzfoa-pI/AAAAAAAAABg/floEbS2xdQY/s1600-h/BlinkWorking_resized.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 276px; height: 320px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SZtbzfoa-pI/AAAAAAAAABg/floEbS2xdQY/s320/BlinkWorking_resized.JPG" alt="" id="BLOGGER_PHOTO_ID_5303933926381386386" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-4899457116654352884?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/4899457116654352884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=4899457116654352884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4899457116654352884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4899457116654352884'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/02/so-lets-try-something-blinking-led.html' title='So, let&apos;s try something - a blinking LED'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ci7z-qEWjJE/SZtYdYZmFRI/AAAAAAAAABY/glIBRTqm57E/s72-c/Schematic.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-8485562451652537986</id><published>2009-02-16T19:26:00.006-06:00</published><updated>2009-02-17T18:03:52.307-06:00</updated><title type='text'>So, you've got a PIC. What now???</title><content type='html'>I've been asked by several of my friends and coworkers who are interested in electronics about how to get into working with microcontrollers. Being a big fan of Microchip's PIC lines, I naturally point them in that direction. Of course, that always leads to what you can possibly do with these little chips.&lt;br /&gt;&lt;br /&gt;Well, there's a lot. I mean, an AWFUL lot.&lt;br /&gt;&lt;br /&gt;Some of the different PICs have ADCs built into them, some of them have PWM modules so you can pump out a fancy signal while you do other tasks with the PIC, some have 30 or more pins you can hook input or output devices to... the sky's the limit (as lame as that sounds).&lt;br /&gt;&lt;br /&gt;This brings up another point. What do you use to write the program? Well, thanks to the simplicity of the instruction set, the 12F and 16F series of PICs are actually pretty easy to program using assembler. It can be a little frustrating and take a while, but there is something nice about being so close to the hardware that you can time your programs by individual clock cycles. Me - I'm lazy. I bought microEngineering Labs' (www.melabs.com) PICBASIC Pro compiler a few years ago and have used it ever since. Sure, being right next to the hardware is nice, but it's also nice being able to read an ADC with a single command. PBP hasn't let me down yet. The one downside is that it's NOT cheap... but if you're looking at seriously playing with PICs as a hobby, you may want to consider investing in PBP (I got mine from Digi-Key).&lt;br /&gt;&lt;br /&gt;But... there's another possibility. MELabs is nice enough to offer a demo version of the PBP compiler. It's full-functioned but will only work with certain PICs and is limited to 31 lines of commands (comments and blank lines don't count towards the total).&lt;br /&gt;&lt;br /&gt;So, if you're interested in trying PICBASIC Pro out, you can always give the demo a shot before deciding whether you want to buy the full version. One of the limitations of the demo actually helps prove how good PBP is - you can do an AWFUL lot in 31 lines of code.&lt;br /&gt;&lt;br /&gt;One of the PICs that works with the PBP demo is the 16F877A. It's a pretty standard chip, been around for a while, and there are TONS of projects using it. I just happen to have one here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ci7z-qEWjJE/SZtN3CmSJLI/AAAAAAAAABQ/ZoRql5J1txQ/s1600-h/16F877A_resized.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 124px;" src="http://4.bp.blogspot.com/_ci7z-qEWjJE/SZtN3CmSJLI/AAAAAAAAABQ/ZoRql5J1txQ/s320/16F877A_resized.JPG" alt="" id="BLOGGER_PHOTO_ID_5303918594144478386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's a 40-pin monster, but it's got it where it counts!&lt;br /&gt;&lt;br /&gt;To get this sucker working, you'll need the following:&lt;br /&gt;&lt;br /&gt;- A parallel-cut crystal (4MHz is a good bet)&lt;br /&gt;- Two 20-40pF capacitors (I use 33pF)&lt;br /&gt;- A resistor (anywhere from 1k to 47k should do just fine)&lt;br /&gt;- Another resistor (1k would be perfect here)&lt;br /&gt;- An LED. Any colour but blue or white!&lt;br /&gt;- A power supply (I'm a big fan of a good old 9V battery)&lt;br /&gt;- A +5V voltage regulator (the 7805 series works well for playing around)&lt;br /&gt;- A breadboard&lt;br /&gt;- Some wire&lt;br /&gt;- **A PIC programmer**. These are available from several different places, I personally like (and use) Microchip's PICKit 2.&lt;br /&gt;- A computer (to compile your programs on and hook the aforementioned PIC programmer up to)&lt;br /&gt;&lt;br /&gt;And that's it - that's all you need to get a 16F877A running and being able to actually tell that it's running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-8485562451652537986?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/8485562451652537986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=8485562451652537986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8485562451652537986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/8485562451652537986'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2009/02/so-youve-got-pic-what-now.html' title='So, you&apos;ve got a PIC. What now???'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ci7z-qEWjJE/SZtN3CmSJLI/AAAAAAAAABQ/ZoRql5J1txQ/s72-c/16F877A_resized.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-4089103257952280449</id><published>2008-11-15T21:53:00.003-06:00</published><updated>2008-11-15T22:10:13.326-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='China'/><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><category scheme='http://www.blogger.com/atom/ns#' term='hacking'/><title type='text'>China's Attacking Me!!!</title><content type='html'>Interesting thing here. I've got the camera sitting in the DMZ of my router so I can check on the animal from wherever. I was wandering by it and couldn't help but notice that the activity LED was flashing regularly. Since there aren't many people who know where the camera is or the username and password, I thought it odd that there was that much activity.&lt;br /&gt;&lt;br /&gt;Time to sniff some traffic!&lt;br /&gt;&lt;br /&gt;Grabbed my trusty laptop and fired up Wireshark. Take a look at this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR-aWd5s4eI/AAAAAAAAABI/iUcvtTek0CA/s1600-h/GettingAttacked.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 280px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR-aWd5s4eI/AAAAAAAAABI/iUcvtTek0CA/s320/GettingAttacked.png" alt="" id="BLOGGER_PHOTO_ID_5269099799821214178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now this here... is an automated attack. Somebody's just hammering away at the camera with their little dictionary of possible passwords, trying to get in.&lt;br /&gt;&lt;br /&gt;I'd be worried that some day they'd actually get in, except that the username is not "test".&lt;br /&gt;&lt;br /&gt;Anyway... I plugged the IP into a few whois pages and (assuming the address isn't spoofed), the entity attacking my poor innocent little Axis camera is... CHINA!&lt;br /&gt;&lt;br /&gt;Now that's exciting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-4089103257952280449?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/4089103257952280449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=4089103257952280449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4089103257952280449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/4089103257952280449'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2008/11/chinas-attacking-me.html' title='China&apos;s Attacking Me!!!'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ci7z-qEWjJE/SR-aWd5s4eI/AAAAAAAAABI/iUcvtTek0CA/s72-c/GettingAttacked.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-5616724904883247413</id><published>2008-11-15T15:02:00.011-06:00</published><updated>2008-11-15T22:11:11.988-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PIC'/><category scheme='http://www.blogger.com/atom/ns#' term='Projects'/><category scheme='http://www.blogger.com/atom/ns#' term='Camera'/><title type='text'>Axis 207W Camera - Part II</title><content type='html'>Okay, so I had a bit of time today to take some pictures and jot down the schematic.&lt;br /&gt;&lt;br /&gt;Here's the back of the Axis 207W camera, showing the green terminal block:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR86-yrK5ZI/AAAAAAAAAAw/5zGYCo10bHM/s1600-h/207W-Back.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR86-yrK5ZI/AAAAAAAAAAw/5zGYCo10bHM/s320/207W-Back.png" alt="" id="BLOGGER_PHOTO_ID_5268994939475912082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here's how I've set it up on the board:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR87WCvN6mI/AAAAAAAAAA4/ShkLXLjhwag/s1600-h/Board.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_ci7z-qEWjJE/SR87WCvN6mI/AAAAAAAAAA4/ShkLXLjhwag/s320/Board.png" alt="" id="BLOGGER_PHOTO_ID_5268995338924845666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here's the schematic (pardon the quality, I should've used unlined paper):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ci7z-qEWjJE/SR87m58Id2I/AAAAAAAAABA/3REcztOFL0I/s1600-h/Schematic.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 258px;" src="http://1.bp.blogspot.com/_ci7z-qEWjJE/SR87m58Id2I/AAAAAAAAABA/3REcztOFL0I/s320/Schematic.png" alt="" id="BLOGGER_PHOTO_ID_5268995628620871522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here's the PicBasic Pro code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Axis207-01.pbp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; Listens to Axis 207's terminal port. Camera's external port goes high/low, PIC reads it,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; then turns on an LED. Turn external port high/low again, PIC turns on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; another pin.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; Camera connects to PIC via 4N37 optoisolator.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; Camera output signal fed to PORTB.0.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; PIC uses RB0 interrupt to tell when it's time to turn on/off LEDs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; Output pins are PORTD.0 through PORTD.3 inclusive.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;; This just sets PIC up. Let's not use the WDT here...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;@ device  pic16F877A, hs_osc, wdt_off, lvp_off, protect_off&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;; Use a 20MHz crystal. You can use a 1, 4, 8MHz crystal, whatever, as long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;            ; as you indicate the speed here. Check the PBP manual for what crystal&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;            ; types are supported right out of the box.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;define OSC 20     &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Set up one byte for a counter&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;x VAR BYTE     &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; PORTB set up - PORTB.0 (pin 33) is the INT pin.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;TRISB = 000001 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;;Make PORTD the output pins&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;TRISD = 000000 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Turn off all of the output lines&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;PORTD = 0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Clear the counter&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;x = 0 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Set up interrupts. When one is detected, jump to IntRoutine:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;on interrupt goto IntRoutine &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;                       &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Enable the RB0 interrupt&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;INTCON = %10010000 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;MainLoop:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Not much to do but wait...    &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;goto mainloop           &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Disable PBP interrupts while the interrupt routine is running&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;disable &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;IntRoutine:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; We don't have a fifth LED, so if the count has gone to 5, change it to 0.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; And yes, I know this isn't the best way to do this... but it works.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;if x = 5 then &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;            &lt;/span&gt;&lt;span style="font-family:arial;"&gt;PORTD = 000000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    x = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;if x = 0 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    PORTD = 000000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt; ; If count = 1 then turn on the PORTD.0 LED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;if x = 1 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    PORTD = 000001 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; If count = 2 then turn on the PORTD.1 LED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;if x = 2 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    PORTD = 000010 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; If count = 3 then turn on the PORTD.2 LED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;if x = 3 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    PORTD = 000100 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; If count = 4 then turn on the PORTD.3 LED&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;if x = 4 then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    PORTD = 001000 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;endif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Increment the counter&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;x = x + 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Done the interrupt routine. Clear the interrupt flag&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;INTCON.1 = 0 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Go back to where you were when the interrupt was called (MainLoop:)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;resume &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;; Re-enable PBP interrupts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;enable &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A few notes:&lt;br /&gt;&lt;br /&gt;The board pulls less than 20mA when running. Using a 5V micropower regulator instead of the good old 7805 would use about 5mA less right there. If you used a lower frequency crystal, you could drop that even further. I'm powering the board with a 12VDC, 300mA wall wart.&lt;br /&gt;&lt;br /&gt;It's been working fine for me for a few days now (I'm now using it to turn on and off a lamp in the living room for fun), but I take no responsibility if it burns down your house or something.&lt;br /&gt;&lt;br /&gt;BEFORE you hook it up to your camera, you should do a few things:&lt;br /&gt;- Check your camera manual to make sure which camera terminal pins are which&lt;br /&gt;- Measure the voltages on the camera terminal pins to make sure you know which pins are which&lt;br /&gt;- Make absolutely sure you are not either shorting out the camera or applying more than 5V to it. I think the manual says a maximum of 10V, but who wants to fool around, eh?&lt;br /&gt;- To test the circuit, you can connect the 1k resistor that's connected to pin 2 of the 4N37 between pin 2 and ground, and then connect and disconnect pin 1 of the 4N37 to +5V. If everything's working properly, that should trigger the output of the 4N37 which will in turn trigger the PIC and you should see LEDs turning on and off.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-5616724904883247413?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/5616724904883247413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=5616724904883247413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5616724904883247413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/5616724904883247413'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2008/11/axis-207w-camera-part-ii.html' title='Axis 207W Camera - Part II'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ci7z-qEWjJE/SR86-yrK5ZI/AAAAAAAAAAw/5zGYCo10bHM/s72-c/207W-Back.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-1094723822586298852</id><published>2008-11-12T20:58:00.002-06:00</published><updated>2008-11-12T21:16:53.560-06:00</updated><title type='text'>Axis 207W Camera</title><content type='html'>So I picked up an Axis 207W camera a while ago to use as a pet-cam. It's great - self contained, plug it in and it works.&lt;br /&gt;&lt;br /&gt;It also has an external four-pin terminal block that you can hook stuff up to. Two of the pins are power and GND, and the other two are signal in, and signal out. It's not too fancy - basically, the only "signal" is a high or low. It looks like there may be a way to change things by playing around with the scripts on the camera, but I'm more a hardware guy.&lt;br /&gt;&lt;br /&gt;The camera allows you to set up a "pulse" button on the main page, so you can easily trigger a pulse on the output pin. That gave me an idea.&lt;br /&gt;&lt;br /&gt;I have a few PIC 16F877A's lying around, so I hooked the camera's output pin up to it (through an optoisolator - no sense melting _everything_ if I screwed up). A bit of a program, and presto - I now have a camera that cycles through four outputs when you click the "pulse" button on the camera's webpage.&lt;br /&gt;&lt;br /&gt;I hooked one of the four outputs to a relay (through another optoisolator) and it's currently running a lamp.&lt;br /&gt;&lt;br /&gt;I'll clean it up a bit and post the schematic, pics, and code as soon as I can.&lt;br /&gt;&lt;br /&gt;But right now... I'm famished. Time for some scrounging in the fridge.&lt;br /&gt;&lt;br /&gt;Oh, and those parts from Digi-Key came in! It occured to me when I opened the box up that, along with the serial-to-USB converter I got, I should've picked up a USB jack. Whoops.&lt;br /&gt;&lt;br /&gt;Anyway, off to eat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-1094723822586298852?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/1094723822586298852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=1094723822586298852' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/1094723822586298852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/1094723822586298852'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2008/11/axis-207w-camera.html' title='Axis 207W Camera'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-9001542801528138108</id><published>2008-11-09T18:36:00.004-06:00</published><updated>2008-11-09T18:57:29.510-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Projects'/><category scheme='http://www.blogger.com/atom/ns#' term='RF'/><title type='text'>Yet Another Digi-Key Order</title><content type='html'>I buy a lot of stuff from &lt;a href="http://www.digikey.ca"&gt;Digi-Key&lt;/a&gt;. Probably too much, but I have a lot of fun with it. I've got another order that should be arriving tomorrow or the day after - and there are two parts I'm very excited about - an RF transceiver (no more needing two chips and two antennae or an antenna switch!), and a serial to USB converter. Both are from &lt;a href="http://www.linxtechnologies.com/"&gt;Linx Technologies&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm especially looking forward to the RF transceiver - I've built a lot of things that use a simplex communication link, and only once have I built something that ran half-duplex. I actually used two transmitter/receiver pairs, each running at different frequencies. It worked, but what a waste.&lt;br /&gt;&lt;br /&gt;Other than that, I picked up a few more micropower voltage regulators, I was fresh out of 3.3V regulators.&lt;br /&gt;&lt;br /&gt;Now, the tricky thing is to figure out what I'm going to do with all this stuff...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-9001542801528138108?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/9001542801528138108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=9001542801528138108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/9001542801528138108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/9001542801528138108'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2008/11/yet-another-digi-key-order.html' title='Yet Another Digi-Key Order'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2402893620308474936.post-7943237766810873208</id><published>2008-10-27T21:19:00.002-05:00</published><updated>2008-11-16T22:34:08.698-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='first post'/><title type='text'>There's always a starting point, I suppose...</title><content type='html'>Well, here I am. I never thought I'd actually set up a blog.&lt;br /&gt;&lt;br /&gt;I've been playing around with electronics for a while. It's always been a hobby. I'll get into it for a while, then leave it for something else for a while, then get back into it. I do it for fun.&lt;br /&gt;&lt;br /&gt;I'm not an electrical engineer, I'm just some dude with a workbench, a few breadboards, and lots of little electronic parts lying around. Maybe you'll laugh at the things I work on, or how I did it, or whatever. If you like something that I've got here, let me know. If you learn something, use something, or improve on something, let me know that too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2402893620308474936-7943237766810873208?l=hals-hangout.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hals-hangout.blogspot.com/feeds/7943237766810873208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2402893620308474936&amp;postID=7943237766810873208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7943237766810873208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2402893620308474936/posts/default/7943237766810873208'/><link rel='alternate' type='text/html' href='http://hals-hangout.blogspot.com/2008/10/theres-always-starting-point-i-suppose.html' title='There&apos;s always a starting point, I suppose...'/><author><name>HAL</name><uri>http://www.blogger.com/profile/12765970946474666579</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_ci7z-qEWjJE/SQZ6rmSNtYI/AAAAAAAAAAM/leyQkh-359k/S220/hal.jpg'/></author><thr:total>0</thr:total></entry></feed>
