{"id":5221,"date":"2012-05-24T10:36:23","date_gmt":"2012-05-24T15:36:23","guid":{"rendered":"http:\/\/mightyohm.com\/blog\/?p=5221"},"modified":"2015-09-26T11:10:57","modified_gmt":"2015-09-26T18:10:57","slug":"pics-video-of-my-geiger-counter-powered-ambient-music-demo-maker-faire","status":"publish","type":"post","link":"https:\/\/mightyohm.com\/blog\/2012\/05\/pics-video-of-my-geiger-counter-powered-ambient-music-demo-maker-faire\/","title":{"rendered":"Pics &#038; video of my Geiger counter powered ambient music demo @ Maker Faire"},"content":{"rendered":"<p><a href=\"http:\/\/www.flickr.com\/photos\/apg88\/7245465932\/in\/faves-mightyohm\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/live.staticflickr.com\/7071\/7245465932_594a551a64_n.jpg\" alt=\"IMG_5420.jpg\" width=\"320\" height=\"213\" \/><\/a><br \/>\n<em>(photo credit: <a href=\"http:\/\/www.flickr.com\/photos\/apg88\/\">alvaroprieto<\/a>)<br \/>\n<\/em><\/p>\n<p>This year I decided (in true last-minute fashion)  to build a couple demos to show off my <a href=\"http:\/\/mightyohm.com\/geiger\">Geiger Counter kit<\/a> at the <a href=\"http:\/\/makerfaire.com\">Maker Faire Bay Area<\/a>. One of these demos used my Geiger Counter kit to create ambient music:<\/p>\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"500\" height=\"282\" src=\"https:\/\/www.youtube.com\/embed\/Q_3SVE0CQqw?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<p>(Thanks to <a href=\"http:\/\/twitter.com\/j_jwalrus\">@j_jwalrus<\/a> for the interview and video!)<\/p>\n<p>I used a five <a href=\"http:\/\/mightyohm.com\/geiger\">MightyOhm Geiger Counter kits<\/a>, an <a href=\"http:\/\/arduino.cc\/en\/Main\/arduinoBoardUno\">Arduino Uno R3<\/a>, a Sparkfun <a href=\"http:\/\/www.sparkfun.com\/products\/10587\">Music Instrument Shield<\/a>, and an <a href=\"http:\/\/www.adafruit.com\/products\/51\">Adafruit Protoshield<\/a> to make the demo.<\/p>\n<p><a href=\"http:\/\/www.flickr.com\/photos\/mightyohm\/7211972508\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/live.staticflickr.com\/8025\/7211972508_340e765da4_n.jpg\" alt=\"Last minute project for the Maker Faire\" width=\"320\" height=\"239\" \/><\/a><\/p>\n<p>The PULSE output of each Geiger counter is connected to one input of a 74LS04 hex inverter on the Protoshield. Each time a Geiger counter detects a radioactive decay, it sends a 0.1ms 3V high pulse to one input of the inverter. The 74LS04 functions as a level shifter and outputs an (inverted) 5V pulse that is suitable for driving an ordinary (5V) Arduino.<\/p>\n<p>Five outputs of the 74LS04 are connected to input pins on the Arduino. For convenience, I used Analog inputs 0-1 as digital input pins. The rest of the gates are connected to digital pins 10-12.<\/p>\n<p>I used the <a href=\"http:\/\/arduino.cc\/playground\/Main\/PinChangeInt\">PinChangeInt<\/a> library on the Arduino to trigger an interrupt handler every time a falling edge is detected on one of the geiger inputs. This interrupt handler stores the pin number to a variable and sets a flag to tell the main() function that something has happened.<\/p>\n<p>The main() loop polls the interrupt flag and waits for something to happen.  When it detects that an interrupt has occured, it sends a &#8220;Note On&#8221; midi message to the Music Instrument Shield, using the SoftwareSerial library built in to Arduino 1.0.  I had to hack the library a bit to get it to work in conjuction with the PinChangeInt library, since the SoftwareSerial library automatically installs interrupts for all pins (<strong>bad<\/strong>, <strong>bad<\/strong> SoftwareSerial!)<\/p>\n<p>The value of the note depends on which Geiger counter triggered the interrupt. In the video I am using note &#8216;C&#8217; over five octaves, centered around middle C (midi note 60). (I am not a musician, but this seemed to provide a pleasing sound that wouldn&#8217;t annoy me or my neighbors at the Faire too much.)<\/p>\n<p>The Arduino sketch is a complete disaster right now, having been thrown together at the last minute, but I plan to clean it up and post it soon.<\/p>\n<p><strong>Things I learned while creating this demo:<\/strong><\/p>\n<ul>\n<li>Sparkfun doesn&#8217;t include stacking headers with their shields unless you buy them in retail packaging. $30 in overnight shipping fixed that.<\/li>\n<li>Arduino is still a pain to program for if you do anything moderately unusual, like try to use two libraries together that both use pin change interrupts.<\/li>\n<li>You can get away without issuing &#8220;Note Off&#8221; commands for midi instruments that fully decay. (I think the MIDI spec frowns on this, but it works on the Sparkfun shield, at least.) This greatly simplified programming the demo, so I took advantage of it!\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>(photo credit: alvaroprieto) This year I decided (in true last-minute fashion) to build a couple demos to show off my Geiger Counter kit at the Maker Faire Bay Area. One of these demos used my Geiger Counter kit to create ambient music: (Thanks to @j_jwalrus for the interview and video!) I used a five MightyOhm &hellip; <a href=\"https:\/\/mightyohm.com\/blog\/2012\/05\/pics-video-of-my-geiger-counter-powered-ambient-music-demo-maker-faire\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Pics &#038; video of my Geiger counter powered ambient music demo @ Maker Faire<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5,105],"tags":[401,18,409,76,454,45],"class_list":["post-5221","post","type-post","status-publish","format-standard","hentry","category-electronics","category-events","tag-geiger","tag-maker-faire","tag-maker-shed","tag-music","tag-sound","tag-video"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pioCd-1md","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":5268,"url":"https:\/\/mightyohm.com\/blog\/2012\/07\/geiger-counter-workshops-toorcamp\/","url_meta":{"origin":5221,"position":0},"title":"Geiger Counter Workshops @ Toorcamp","author":"Jeff","date":"July 23, 2012","format":false,"excerpt":"News flash: Hardhack is running the Hardware Hacking Area at Toorcamp this year, which takes place on the Washington coast in just under three weeks! \u00a0(The dates are August 8-12, 2012, and tickets are still available.) I'll be running two\u00a0Geiger Counter Workshops. \u00a0Come build a Geiger Counter kit! I'll have\u2026","rel":"","context":"In &quot;Announcements&quot;","block_context":{"text":"Announcements","link":"https:\/\/mightyohm.com\/blog\/category\/announcements\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2011\/12\/geiger_with_case.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5489,"url":"https:\/\/mightyohm.com\/blog\/2013\/05\/come-see-my-glowy-geiger-chimes-at-the-2013-maker-faire-bay-area\/","url_meta":{"origin":5221,"position":1},"title":"Come see my Glowy Geiger Chimes at the 2013 Maker Faire Bay Area!","author":"Jeff","date":"May 12, 2013","format":false,"excerpt":"It's that time of the year again! The 2013 Maker Faire Bay Area is next weekend (May 18-19th) in San Mateo, California. I haven't had time to post about it, but over the past few weeks I've been busy working on a special project for the Maker Faire this year.\u2026","rel":"","context":"In &quot;Events&quot;","block_context":{"text":"Events","link":"https:\/\/mightyohm.com\/blog\/category\/events\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4233,"url":"https:\/\/mightyohm.com\/blog\/2011\/10\/nothing-labs-review-of-the-mightyohm-geiger-counter-kit\/","url_meta":{"origin":5221,"position":2},"title":"Nothing Labs review of the MightyOhm Geiger Counter Kit","author":"Jeff","date":"October 6, 2011","format":false,"excerpt":"Rich Olsen, creator of the Electronic Cloud Chamber and proprietor of Nothing Labs, just posted a video review of the MightyOhm Geiger Counter kit on YouTube: If you didn't get to see Rich's cloud chamber at the NY Maker Faire, you'll definitely want to check it out. This thing is\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"Nothing Labs Cloud Chamber","src":"https:\/\/i0.wp.com\/mightyohm.com\/files\/flickr\/6167268334_50d1f87e03.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5067,"url":"https:\/\/mightyohm.com\/blog\/2012\/03\/how-to-use-geiger-bot-with-the-mightyohm-geiger-counter\/","url_meta":{"origin":5221,"position":3},"title":"How to use Geiger Bot with the MightyOhm Geiger Counter","author":"Jeff","date":"March 9, 2012","format":false,"excerpt":"Geiger Bot is an iOS application that allows you use your iPhone or iPad as a sophisticated display for an ordinary Geiger counter. It works with most Geiger counters that make an audible \"click\" for each event or count that is detected. Here's how to get your MightyOhm Geiger Counter\u2026","rel":"","context":"In &quot;Kits&quot;","block_context":{"text":"Kits","link":"https:\/\/mightyohm.com\/blog\/category\/kits\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/farm8.staticflickr.com\/7200\/6965345197_0217927f99.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4116,"url":"https:\/\/mightyohm.com\/blog\/2011\/08\/geiger-counter-kit-for-chaos-camp-2011-done\/","url_meta":{"origin":5221,"position":4},"title":"Introducing the MightyOhm Geiger Counter Kit","author":"Jeff","date":"August 6, 2011","format":false,"excerpt":"Look! \u00a0A new kit! I admit that I've been working on this one for a while. \u00a0Sorry for the lack of updates, but I have been far too busy doing everything last minute and fixing bugs to post here! I designed this Geiger Counter kit specifically so I could give\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2011\/12\/geiger_with_case.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4258,"url":"https:\/\/mightyohm.com\/blog\/2011\/10\/geiger-counter-kits-now-for-sale-in-the-maker-shed\/","url_meta":{"origin":5221,"position":5},"title":"Geiger Counter Kits are now for sale in the Maker Shed","author":"Jeff","date":"October 14, 2011","format":false,"excerpt":"I'm pleased to announce that Geiger Counter Kits are now for sale in the Maker Shed! In this video, Make's Michael Castor shows how he used the kit to find several radioactive objects around his home. Check it out! http:\/\/www.youtube.com\/watch?v=bsnkg45s5ag Resellers: If you are interested in carrying my Geiger Counter\u2026","rel":"","context":"In &quot;Announcements&quot;","block_context":{"text":"Announcements","link":"https:\/\/mightyohm.com\/blog\/category\/announcements\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2011\/10\/MKMO1-2.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/5221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/comments?post=5221"}],"version-history":[{"count":16,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/5221\/revisions"}],"predecessor-version":[{"id":7733,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/5221\/revisions\/7733"}],"wp:attachment":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/media?parent=5221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/categories?post=5221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/tags?post=5221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}