{"id":240,"date":"2017-02-22T23:18:03","date_gmt":"2017-02-23T07:18:03","guid":{"rendered":"http:\/\/www.anirama.com\/1000leds\/?p=240"},"modified":"2017-12-01T01:26:43","modified_gmt":"2017-12-01T09:26:43","slug":"light-trigger-test-circuit","status":"publish","type":"post","link":"https:\/\/www.anirama.com\/1000leds\/light-trigger-test-circuit\/","title":{"rendered":"Light Trigger Test Circuit"},"content":{"rendered":"<p>The Hand Controllers will be attached to bats or rackets that the players will swing to hit the &#8220;light ball&#8221;<strong>*<\/strong>. The accelerometer on the Hand Controller will tell me how fast (read: powerful) their swing is, but I still need to know if they timed it right. My original design involved actually hitting something (like a pillow or post), but I decided against that for many reasons. The current design has a vertical laser beam that the bat will pass through, sending a pulse to the Hand Controller&#8217;s Arduino to signal the timing of the swing. I&#8217;m using a phototransistor and a 555 monostable circuit to generate a long enough pulse for the Arduino to see on a cycle through the code.<\/p>\n<p>(I decided not to use the phototransistor signal to generate an interrupt on the Arduino because I want the player to be able to bunt by holding the bat still in the beam. An interrupt wouldn&#8217;t let me know if this was happening, but the 555 circuit will keep it&#8217;s output low as long as the beam is blocked.)<\/p>\n<p><a href=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/555-monostable-pulse-extender_schem.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-243\" src=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/555-monostable-pulse-extender_schem-278x300.png\" alt=\"\" width=\"278\" height=\"300\" srcset=\"https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/555-monostable-pulse-extender_schem-278x300.png 278w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/555-monostable-pulse-extender_schem.png 561w\" sizes=\"(max-width: 278px) 100vw, 278px\" \/><\/a><\/p>\n<p>The basic circuit is very simple. I went to TechShop last night and built the breadboard version. TechShop has oscilloscopes so I could debug and look at the timing of the pulse. The potentiometer (R3) was added there to allow me to adjust the sensitivity of the phototransistor based on ambient lighting.<\/p>\n<figure id=\"attachment_244\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 658px\"><a href=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716.jpg\"><img decoding=\"async\" class=\"wp-image-244 size-large\" src=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716-1024x683.jpg\" width=\"648\" height=\"432\" srcset=\"https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716-300x200.jpg 300w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716-330x220.jpg 330w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716-768x512.jpg 768w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716-1024x683.jpg 1024w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716.jpg 4060w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption class=\"caption wp-caption-text\">Working breadboard design.<\/figcaption><\/figure>\n<p>Worked like a charm. The pulse width is about 110 mSec. When I designed the PCBs I thought I&#8217;d just be using the phototransistor to generate the pulse so I didn&#8217;t design a board for this. I&#8217;m going to solder it together on a protoboard and probably won&#8217;t bother to do a PCB version.<\/p>\n<p>As an aside, I bought a few organizing boxes so I can easily manage all my components. It has the extra benefit of making the whole project extremely portable between my garage, my home office, and TechShop.<\/p>\n<figure id=\"attachment_245\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 658px\"><a href=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524.jpg\"><img decoding=\"async\" class=\"wp-image-245 size-large\" src=\"http:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524-1024x605.jpg\" width=\"648\" height=\"383\" srcset=\"https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524-300x177.jpg 300w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524-768x454.jpg 768w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524-1024x605.jpg 1024w, https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170221_085524.jpg 4783w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><\/a><figcaption class=\"caption wp-caption-text\">Stanley 014725 25-Removable Compartment Professional Organizer <a href=\"https:\/\/www.amazon.com\/gp\/product\/B00005QWYF\">amazon.com<\/a><\/figcaption><\/figure>\n<hr \/>\n<p>* Light ball? I really need a better name than that. It might be a Blaster Beam. I&#8217;m open to any suggestions!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Hand Controllers will be attached to bats or rackets that the players will swing to hit the &#8220;light ball&#8221;*. The accelerometer on the Hand Controller will tell me how fast (read: powerful) their swing is, but I still need to know if they timed it right. My original design involved actually hitting something (like  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":244,"comment_status":"closed","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":""},"categories":[9,5],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hand-controller","category-hardware"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/www.anirama.com\/1000leds\/wp-content\/uploads\/2017\/02\/20170223_220716.jpg","jetpack_shortlink":"https:\/\/wp.me\/p8pDaO-3S","_links":{"self":[{"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":2,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/posts\/240\/revisions\/246"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/media\/244"}],"wp:attachment":[{"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anirama.com\/1000leds\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}