{"id":2315,"date":"2015-07-16T19:56:37","date_gmt":"2015-07-16T19:56:37","guid":{"rendered":"http:\/\/www.richardmudhar.com\/?p=2315"},"modified":"2015-07-17T20:09:09","modified_gmt":"2015-07-17T20:09:09","slug":"weatherizing-a-raspberry-pi-camera-with-a-microscope-slide","status":"publish","type":"post","link":"https:\/\/www.richardmudhar.com\/blog\/2015\/07\/weatherizing-a-raspberry-pi-camera-with-a-microscope-slide\/","title":{"rendered":"Weatherizing a Raspberry Pi Camera with a Microscope slide"},"content":{"rendered":"<p>Sticking a Raspberry Pi camera exposed to the elements doesn&#8217;t do it any good over time, resulting in the <a href=\"http:\/\/www.richardmudhar.com\/2014\/10\/a-raspberry-pi-after-season-outdoors-in-the-british-weather\/\">hazy crazed lens<\/a> problem.<\/p>\n<figure id=\"attachment_1734\" aria-describedby=\"caption-attachment-1734\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2014\/10\/1410_flare_rpcam01.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1734\" src=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2014\/10\/1410_flare_rpcam01.jpg?resize=550%2C392\" alt=\"Flare on the camera lens after a year in the open\" width=\"550\" height=\"392\" \/><\/a><figcaption id=\"caption-attachment-1734\" class=\"wp-caption-text\">Flare on the camera lens after a year in the open<\/figcaption><\/figure>\n<p>The solution is to put some glass in front of the lens &#8211; and indeed this is exactly what this commercial outdoor spec little lipstick CCTV camera does<\/p>\n<figure id=\"attachment_2317\" aria-describedby=\"caption-attachment-2317\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2317\" src=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694-550x413.jpg?resize=550%2C413\" alt=\"it's hard to see, but there is a round glass against an O ring in gront of the camera lens on this weatherpoof camera, which has spent several years outside and still works well\" width=\"550\" height=\"413\" srcset=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694.jpg?resize=550%2C413&amp;ssl=1 550w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694.jpg?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694.jpg?resize=624%2C468&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2694.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 550px) 85vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2317\" class=\"wp-caption-text\">it&#8217;s hard to see, but there is a round glass against an O ring in gront of the camera lens on this weatherproof camera, which has spent several years outside and still works well<\/figcaption><\/figure>\n<p>I discovered this when I took it apart to unscrew the lens a bit to make a close focus. And then cracked the glass refitting it as the lens stuck out too much. If you ever need a flat round piece of glass, search for watch crystal on ebay and they are to be had in lots of diameters. A watch crystal is apparently a term for the glass on a watch as well as the 32,768 Hz timing quartz crystal. A flat watch crystal repaired this camera.<\/p>\n<p>The direct exposure of the camera lens to the elements is the biggest weakness of the now-defunct <a href=\"http:\/\/www.richardmudhar.com\/2014\/07\/pice-case-and-wifi-upgrade-for-the-remote-farm-camera\/\">PICE weatherproof <\/a>Pi case. But it is easily rectified now, using a piece of flat glass fitted with Sugru or Milliput putty. I used <a href=\"https:\/\/sugru.com\/\" target=\"_blank\">sugru <\/a>and a cut down microscope slide, since I didn&#8217;t want to buy another watch crystal when microscope slides are optically flat and cheaper. It is a lot easier to cut glass under water, and you can remove the viciously sharp edges using a cheap diamond sharpening stone to smooth the cut edge and chamfer the corner.<\/p>\n<figure id=\"attachment_2318\" aria-describedby=\"caption-attachment-2318\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2318\" src=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690-550x413.jpg?resize=550%2C413\" alt=\"Microscope slide fitted with Sugru to shed the water and seal the camera from the elements\" width=\"550\" height=\"413\" srcset=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690.jpg?resize=550%2C413&amp;ssl=1 550w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690.jpg?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690.jpg?resize=624%2C468&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/DSCN2690.jpg?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 550px) 85vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2318\" class=\"wp-caption-text\">Microscope slide fitted with Sugru to shed the water and seal the camera from the elements<\/figcaption><\/figure>\n<p><!--more-->I smoothed the Sugru using some plastic plumbing fitting, hence the embossed text that I didn&#8217;t spot. Hopefully this saves me from the crazed lens problem &#8211; this is a time-lapse camera to see how many weed seeds spring from <a href=\"http:\/\/www.richardmudhar.com\/2015\/06\/composting-win\/\">my compost<\/a>.<\/p>\n<figure id=\"attachment_2319\" aria-describedby=\"caption-attachment-2319\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2319\" src=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404-550x423.jpg?resize=550%2C423\" alt=\"Raspberry Pi image of compost and control\" width=\"550\" height=\"423\" srcset=\"https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404.jpg?resize=550%2C423&amp;ssl=1 550w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404.jpg?resize=1024%2C788&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404.jpg?resize=624%2C480&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.richardmudhar.com\/blog\/wp-content\/uploads\/2015\/07\/cam-e1437075661404.jpg?w=1574&amp;ssl=1 1574w\" sizes=\"auto, (max-width: 550px) 85vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-2319\" class=\"wp-caption-text\">Raspberry Pi image of compost and control<\/figcaption><\/figure>\n<p>The Pi does time-lapse photography easy as falling off a log &#8211; basically in crontab<\/p>\n<pre># For more information see the manual pages of crontab(5) and cron(8)\r\n#\r\n# m h\u00a0 dom mon dow\u00a0\u00a0 command\r\n30 13 * * * \/home\/pi\/takestill.sh &gt;&gt; \/home\/pi\/crontest.txt<\/pre>\n<p>and takestill.sh is<\/p>\n<pre>#!\/bin\/bash\r\n\/usr\/bin\/raspistill -o \/home\/pi\/image-`date +%g%m%d-%H%M`.jpg<\/pre>\n<p>the aim of all that garbage after date is to make the filename carry the date, in a way that will rank properly in a file listing, like<\/p>\n<pre>image-150717-1330.jpg<\/pre>\n<p>For some reason this wouldn&#8217;t work calling \/usr\/bin\/raspistill directly from cron<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sticking a Raspberry Pi camera exposed to the elements doesn&#8217;t do it any good over time, resulting in the hazy crazed lens problem. The solution is to put some glass in front of the lens &#8211; and indeed this is exactly what this commercial outdoor spec little lipstick CCTV camera does I discovered this when &hellip; <a href=\"https:\/\/www.richardmudhar.com\/blog\/2015\/07\/weatherizing-a-raspberry-pi-camera-with-a-microscope-slide\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Weatherizing a Raspberry Pi Camera with a Microscope slide&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[10],"tags":[20],"class_list":["post-2315","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","tag-camera"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5aOO7-Bl","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/posts\/2315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/comments?post=2315"}],"version-history":[{"count":6,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/posts\/2315\/revisions"}],"predecessor-version":[{"id":2350,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/posts\/2315\/revisions\/2350"}],"wp:attachment":[{"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/media?parent=2315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/categories?post=2315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.richardmudhar.com\/blog\/wp-json\/wp\/v2\/tags?post=2315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}