{"id":716,"date":"2017-04-08T18:41:13","date_gmt":"2017-04-08T18:41:13","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=716"},"modified":"2020-10-12T16:31:28","modified_gmt":"2020-10-12T16:31:28","slug":"how-to-build-a-bluetooth-controlled-photogate-for-high-speed-photography","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=716","title":{"rendered":"How to build a Bluetooth controlled Photogate for high Speed photography"},"content":{"rendered":"<h1><\/h1>\n<h1>This tutorial will show you how to build a automated Bluetooth controlled trigger for high speed photography.<\/h1>\n<p><iframe loading=\"lazy\" title=\"How to build a Bluetooth controlled Photogate for high Speed photography\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/3ZRga30AYZo?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><\/p>\n<h2>Parts List:<\/h2>\n<p>#affiliate links#<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=pvc pipe&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d5e5798c9573585ad2939150de2edc15\">PVC Pipe<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=Conduit Body&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d6fa4b95fd888622872816e10705f558\">Conduit Body<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=e7b57928a96ac35620f522978b7121a6\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=lm7805&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=a72d3664d9ed60f686947ee0e6176458\" target=\"_blank\" rel=\"noopener noreferrer\">5 volt regulator<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=pc817&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=991d2e9c3da5dbd2cf138cf9c2189329\" target=\"_blank\" rel=\"noopener noreferrer\">optocouplers<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=photo interrupter&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=5bae8ee9277f5816859c2e14dc2cee2e\">photo interrupter<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ir diode&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=24258b2cf6ecfe6537c5a39e908ca304\" target=\"_blank\" rel=\"noopener noreferrer\">IR led<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ir diode&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=24258b2cf6ecfe6537c5a39e908ca304\" target=\"_blank\" rel=\"noopener noreferrer\">IR transistor<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=led flashlight&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=f8b00a11bd9d97ce28b1cfe2ac9e4d58\">led&#8217;s or flashlight<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=2n2222&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=1857de7d6853fdc66d284c736af5a105\" target=\"_blank\" rel=\"noopener noreferrer\">2N2222 transistors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=resistor&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=2fb6c949bb1ebb473d0f70fab48726f5\" target=\"_blank\" rel=\"noopener noreferrer\">resistors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino speaker&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=ed82d0020fad540aecf4c85cc08fc039\" target=\"_blank\" rel=\"noopener noreferrer\">speaker<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=capacitors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=becdf5c2c9dc99e630601d74dec5e048\" target=\"_blank\" rel=\"noopener noreferrer\">capacitors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=hc-06&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=47145a91cb03390239467c101c3c2dc6\" target=\"_blank\" rel=\"noopener noreferrer\">HC-06<\/a> or<a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=hc-05&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=b6148d8c6c092b6186c05403caddd98a\" target=\"_blank\" rel=\"noopener noreferrer\"> HC05<\/a> Bluetooth board<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino bread board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=8b61b6017b1d6ff3c27a0e0aec587aa0\" target=\"_blank\" rel=\"noopener noreferrer\">breadboard<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=b9d06adf6791ce68ddeb630afdee379e\" target=\"_blank\" rel=\"noopener noreferrer\">jumper wires<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=dc power connector&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=1d4f1e5fb39268cecf43426d4a5eabab\">power connector<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=rca plugs&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=4d7fe4dc3b0dfd420db9dc4852714958\" target=\"_blank\" rel=\"noopener noreferrer\">RCA plugs<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=rca wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=f66dde15a905ac604114839f1e057464\" target=\"_blank\" rel=\"noopener noreferrer\">RCA wires<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=camera flash cables&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=32564214651b7cc484fe6470e506aac5\">camera and flash cables<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=camera handlebar mount&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=5d2fa95d2cee53883c0bba87757d5aa5\" target=\"_blank\" rel=\"noopener noreferrer\">camera handlebar mount<\/a><\/p>\n<h2>Schematic:<\/h2>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-719\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate.jpg?w=300\" alt=\"\" width=\"639\" height=\"392\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate.jpg 2010w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate-300x184.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate-768x471.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2017\/04\/new_photogate-1024x628.jpg 1024w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<h2>The APP:<\/h2>\n<p><a href=\"https:\/\/drive.google.com\/open?id=0B0ZYw2jO5Q3DLWNKWUkxLUNIVXc\" target=\"_blank\" rel=\"noopener noreferrer\">Click here to download the app<\/a><\/p>\n<h2>ARDUINO Code:<\/h2>\n<p>int fdel = 0; \/\/flash trigger delay<br \/>\nint camb = 0; \/\/camera bulb time<br \/>\n#define camt 10 \/\/camera trigger pin<br \/>\n#define flash 8 \/\/flash trigger pin<br \/>\n#define irLed 12 \/\/ir led<br \/>\nint x = 0; \/\/while loop hold<br \/>\nint irt; \/\/ir transistor value<br \/>\nint irTrigger = 0; \/\/ flash trigger threshold<br \/>\n#define relay 9<\/p>\n<p>void setup() {<\/p>\n<p>Serial.begin(9600);<br \/>\npinMode(irLed, OUTPUT);<br \/>\npinMode(camt, OUTPUT);<br \/>\npinMode(flash, OUTPUT);<br \/>\ndigitalWrite(irLed, HIGH);<br \/>\npinMode(relay, OUTPUT);<\/p>\n<p>}<\/p>\n<p>void loop()<\/p>\n<p>{<br \/>\ndigitalWrite(camt, LOW);<br \/>\ndigitalWrite(relay, HIGH);<br \/>\n\/\/\/\/\/\/\/\/\/\/check for input\/\/\/\/\/\/\/\/\/\/<br \/>\nif (Serial.available() &gt;= 2 )<br \/>\n{<br \/>\nunsigned int a = Serial.read();<br \/>\nunsigned int b = Serial.read();<br \/>\nunsigned int val = (b * 256) + a;<\/p>\n<p>\/\/\/\/\/\/camera triger stage\/\/\/\/\/\/<br \/>\nif (val == 99)<br \/>\n{<br \/>\nint camb1 = camb * 475;<br \/>\ndigitalWrite(relay, LOW);<br \/>\ndelay(500);<br \/>\ndigitalWrite(camt, HIGH); \/\/open camera shutter<br \/>\ndelay(250);<br \/>\ntone(3, 500, 1000);<br \/>\nfor (int x = 0; x &lt; camb1; x++) \/\/ hold for ir threshold to be triggered<br \/>\n{<br \/>\ndelay(2);<br \/>\nirt = analogRead(A0); \/\/read ir transistor<br \/>\nif (irt &lt; irTrigger) \/\/ triger the flash<br \/>\n{<br \/>\ndelay(fdel);<br \/>\ndigitalWrite(flash, HIGH);<br \/>\ndelay(5);<br \/>\ndigitalWrite(flash, LOW);<br \/>\ndelay(100);<br \/>\ndigitalWrite(camt, LOW);<br \/>\ndelay(1000);<br \/>\ndigitalWrite(relay, HIGH);<br \/>\nreturn;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/ changing variables\/\/\/\/\/\/\/\/\/\/<br \/>\n\/\/\/\/\/flash delay\/\/\/\/\/<br \/>\nelse if (val &lt;= 3000 &amp;&amp; val &gt;= 2000)<br \/>\n{<br \/>\nfdel = val &#8211; 2000;<\/p>\n<p>}<\/p>\n<p>\/\/\/\/\/camera bulb time\/\/\/\/\/<br \/>\nelse if (val &gt;= 10 &amp;&amp; val &lt;= 60)<br \/>\n{<\/p>\n<p>camb = val;<br \/>\n}<br \/>\n\/\/\/\/\/IR TRIGGER\/\/\/\/\/<br \/>\nelse if (val &gt;= 100 &amp;&amp; val &lt;= 999)<br \/>\n{<br \/>\nirTrigger = val;<\/p>\n<p>}<br \/>\n\/\/\/\/ir trigger monitor\/\/\/\/<br \/>\nelse if (val == 95)<br \/>\n{<br \/>\nx = 0;<br \/>\nwhile (x == 0)<br \/>\n{<br \/>\nif (Serial.available() &gt;= 2 )<\/p>\n<p>{<br \/>\nunsigned int a = Serial.read();<br \/>\nunsigned int b = Serial.read();<br \/>\nunsigned int val = (b * 256) + a;<br \/>\nif (val == 90)<br \/>\n{<\/p>\n<p>x = 1;<br \/>\n}<br \/>\n}<br \/>\nirt = analogRead(A0); \/\/read ir transistor<br \/>\nSerial.println(irt);<br \/>\ndelay(250);<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to build a automated Bluetooth controlled trigger for high speed photography. Parts List: #affiliate links# PVC Pipe Conduit Body ARDUINO 5 volt regulator optocouplers photo interrupter IR led IR transistor led&#8217;s or flashlight 2N2222 &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=716\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-716","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=716"}],"version-history":[{"count":2,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/716\/revisions"}],"predecessor-version":[{"id":1596,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/716\/revisions\/1596"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}