{"id":4404,"date":"2020-06-03T16:43:50","date_gmt":"2020-06-03T15:43:50","guid":{"rendered":"http:\/\/www.hyam.net\/blog\/?p=4404"},"modified":"2020-06-03T16:56:35","modified_gmt":"2020-06-03T15:56:35","slug":"bbc-microbit-shutter-timer","status":"publish","type":"post","link":"https:\/\/www.hyam.net\/blog\/archives\/4404","title":{"rendered":"BBC micro:bit Shutter Timer"},"content":{"rendered":"\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"BBC micro:bit Shutter Timer\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/XODxLiduKVg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The mechanical shutters found in many analogue cameras, especially those before the 1980s, are amazing pieces of engineering. Many still work accurately but alas many others do not.  One solution is to pay to have them professionally serviced but often the camera simply isn&#8217;t worth the expense. Also a shutter will sometimes be inaccurate but reliably <strong>and therefore totally useable<\/strong>. <\/p>\n\n\n\n<p>To discover the actual exposures your shutter is giving you you need some kind of timer. There are a few alternatives. In the past I have used the slow motion video on my phone to film the shutter opening and closing. It is a chore to do but works for slower shutter speeds. You can record the sound of the shutter opening and closing and use audio software like <a href=\"https:\/\/www.audacityteam.org\/\">Audacity<\/a> to measure the time between the clicks of the shutter blades. Again this is doable but tricky. There is an app available to help you do it on your phone. You can also use a simple circuit to turn changes in light into audio clicks.<\/p>\n\n\n\n<p>All these approaches are quite labour intensive so I thought I&#8217;d see if I could make a stand alone device that would measure shutter speeds based on the <a href=\"https:\/\/microbit.org\/\">BBC micro:bit<\/a>. If you haven&#8217;t come across a micro:bit they are little, embedded systems created to encourage school children to learn to program. You can buy them for about \u00a313 or you could steal one from a passing pupil. They have a simple display, a couple of buttons, some sensors and some I\/O pins. You can program them using a graphical block language or Python.<\/p>\n\n\n\n<p>I took a micro:bit and added a BPW43 photodiode, a 10 k\u03a9 resistor and a 330 \u03a9 resistor in a simple circuit that reverse biased the photodiode so it acts like a switch. This maxed out my electronics knowledge but works. I then wrote a simple Python program to measure the duration the diode was on for and convert that into something useful for a photographer. I&#8217;m more comfortable with the programming than the wiring. The result is demonstrated in the video above. The whole project cost me less than \u00a325 which included a <a href=\"https:\/\/thepihut.com\/products\/mi-power-board-for-the-bbc-micro-bit?variant=19935511812\">MI:power board<\/a> so the micro:bit ran off a little battery rather than needing USB power.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200603_161411-1024x768.jpg\" alt=\"\" class=\"wp-image-4408\" srcset=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200603_161411-1024x768.jpg 1024w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200603_161411-640x480.jpg 640w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200603_161411-768x576.jpg 768w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200603_161411-1536x1152.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Design skills! I&#8217;m not sure I have the diode the right way round. If it doesn&#8217;t work just switch it. The 330\u03a9 resistor may not be needed and the 10k\u03a9 just needs to be big. These are just the ones I had to hand.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-1024x683.jpg\" alt=\"\" class=\"wp-image-4406\" srcset=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-1024x683.jpg 1024w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-640x427.jpg 640w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-768x512.jpg 768w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-1536x1025.jpg 1536w, https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/IMG_20200528_180757-2048x1366.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Check out my soldering skills!<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/main.py_.zip\">This is the Python code to run on the micro:bit<\/a><a href=\"https:\/\/www.hyam.net\/blog\/wp-content\/uploads\/2020\/06\/main.py_.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p>The way I turn microseconds into photographic time is as follows.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the microseconds are within 10% of a standard time (like 1\/30th of a second) I count that as being correct.<\/li><li>If the microsecond time is greater than the standard time by more than 10% but less than half way to the next stop I add a + to the time e.g. 1\/30+<\/li><li>If the microsecond time is less the standard time by more  than 10% but greater than half way to the next stop I add a &#8211; to the time e.g. 1\/30-<\/li><\/ul>\n\n\n\n<p>This is the way I think when I&#8217;m looking at a light meter and gets to within a third of a stop. i.e. &#8220;A bit more than 30th or a bit less than 60th&#8221;. If you want timing closer than a third of a stop you really need to use electronic shutters. For print film it really doesn&#8217;t matter once you are this close. If you can afford reversal film you can pay to have your shutter serviced!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where next?<\/h2>\n\n\n\n<p>I have this working as well as I need it to for my purposes but I&#8217;d love it if someone else wanted to make one or maybe take it to the next level. For starters it would be good to have it working reliably for speeds up to 1\/1000th. If people want to collaborate we could put the code in Github. I can&#8217;t guarantee I&#8217;ll be able to put too much time in as I&#8217;m back to the day job from tomorrow.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The mechanical shutters found in many analogue cameras, especially those before the 1980s, are amazing pieces of engineering. Many still work accurately but alas many others do not. One solution is to pay to have them professionally serviced but often the camera simply isn&#8217;t worth the expense. Also a shutter&#8230;<\/p>\n","protected":false},"author":3,"featured_media":4412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-4404","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-photography"],"_links":{"self":[{"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/posts\/4404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/comments?post=4404"}],"version-history":[{"count":6,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/posts\/4404\/revisions"}],"predecessor-version":[{"id":4414,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/posts\/4404\/revisions\/4414"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/media\/4412"}],"wp:attachment":[{"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/media?parent=4404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/categories?post=4404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hyam.net\/blog\/wp-json\/wp\/v2\/tags?post=4404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}