{"id":567,"date":"2015-03-28T12:49:24","date_gmt":"2015-03-28T12:49:24","guid":{"rendered":"http:\/\/interactingobjects.com\/?p=567"},"modified":"2015-03-28T12:49:24","modified_gmt":"2015-03-28T12:49:24","slug":"noes-juke-box-main-components-and-schematics","status":"publish","type":"post","link":"https:\/\/interactingobjects.com\/?p=567","title":{"rendered":"Noe&#8217;s Juke Box | Main components and schematics"},"content":{"rendered":"<h1>Main parts<\/h1>\n<p>Juke\u00a0Box showed <a title=\"Sound Box | Introduction\" href=\"http:\/\/interactingobjects.com\/sound-box-introduction\/\">here <\/a>is based on the following main components :<\/p>\n<p><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/components-photo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-573\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/components-photo.png\" alt=\"components photo\" width=\"640\" height=\"480\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/components-photo.png 640w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/components-photo-300x225.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/components-photo-400x300.png 400w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<ul>\n<li>an Arduino Mega (here a clone from DF Robot) as the &#8220;brain&#8221;<\/li>\n<li>an Adafruit Music Maker for music &amp; midi player<\/li>\n<li>a Sparkfun&#8217;s button par and associated PCB (need to get leds separately)<\/li>\n<li>some simple illuminated push buttons from found at Adafruit<\/li>\n<li>a rotary encoder. Strangely enough, the RGB one I found at Sparkfun is the only which has a threaded shaft with a bolt and then\u00a0can be mounted on a chassis<\/li>\n<li>and last but not least an accellerometer breakout board just for fun also from Sparkfun<\/li>\n<\/ul>\n<h1>Connecting the button pad<\/h1>\n<p>Connecting the Arduino to the button pad is not complex but there are quite a bit of wires between them&#8230; I already went through this <a title=\"Sparkfun\u2019s 4\u00d74 Button &amp; LED Matrix \u2013 Part 2 \u2013 Connecting to an Arduino Mega\" href=\"http:\/\/interactingobjects.com\/sparkfuns-4x4-button-led-matrix-part-2-connecting-to-an-arduino-mega\/\">here<\/a>. But I changed the pins I used in the first place. Just that I thought it would simplify soldering later on by keeping related pins together as much as possible. Not sure it did simplify though&#8230;<\/p>\n<p><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/final-button-pad-connection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-576\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/final-button-pad-connection.png\" alt=\"final button pad connection\" width=\"640\" height=\"399\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/final-button-pad-connection.png 640w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/final-button-pad-connection-300x187.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/final-button-pad-connection-481x300.png 481w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>And PWM pins have been chosen precisely because you don&#8217;t want to use pins 4 and 13&#8230; More on this <a title=\"Sparkfun\u2019s 4\u00d74 Button &amp; LED Matrix \u2013 Part 3 \u2013 Playing with the pad\" href=\"http:\/\/interactingobjects.com\/sparkfuns-4x4-button-led-matrix-part-3-playing-with-the-pad\/\">here<\/a>.<\/p>\n<p>And last, resistors for the leds are 150\u03a9, 100\u03a9 and 100\u03a9 for red, green and blue pins.<\/p>\n<h1>\u00a0Now, the Music Maker<\/h1>\n<p>The Adafruit&#8217;s Music Maker is based on the VS1053 chip which has 2 main functions : MP3\/WAV\/OGG&#8230; player and MIDI synth. It comes with a handy SD card connector from which it can read files to play. It comes in several flavors :<\/p>\n<ul>\n<li><a href=\"http:\/\/www.adafruit.com\/products\/1381\">simple breakout board<\/a><\/li>\n<li><a href=\"http:\/\/www.adafruit.com\/products\/1790\">Arduino shield<\/a><\/li>\n<li><a href=\"http:\/\/www.adafruit.com\/products\/1788\">Arduino shield with 3W amp<\/a><\/li>\n<\/ul>\n<p>I chose the latter for two reasons : I liked the idea of having an onboard amp so it would simplifiy cabling and I thought I could stack it onto the Mega. But&#8230; as it is using by default PWM pins I desperately need for controlling the leds, I had to re-cable everything to new pins. In addition, I could not stack it anyway because I needed all the space on the Mega proto shield as you&#8217;ll see later on.<\/p>\n<p>So, in the end, if I had to do it again, I would probably get the breakout board (smaller, much smaller) and the <a href=\"http:\/\/www.adafruit.com\/products\/1552\">3W amp<\/a> separately.<\/p>\n<p>Here are the connections<\/p>\n<div id=\"attachment_578\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/music-maker-connection.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-578\" class=\"wp-image-578 size-full\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/music-maker-connection.png\" alt=\"music maker connection\" width=\"640\" height=\"429\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/music-maker-connection.png 640w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/music-maker-connection-300x201.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/music-maker-connection-447x300.png 447w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-578\" class=\"wp-caption-text\">Schematic\u00a0based on Adafruit&#8217;s Music Maker catalog product photo<\/p><\/div>\n<p>Note the little voltage divider to feed GPIO 1 on the VS1052 : the VS is a 3.3V device so feeding directly with Arduino&#8217;s 5V may (will) damage it.<\/p>\n<h1>\u00a0Then the accellerometer<\/h1>\n<p>I choose a cheap 3-axis, I2C capable accellerometer breakout : the <a href=\"https:\/\/www.sparkfun.com\/products\/12756\">Sparkfun&#8217;s MMA8452 breakout board<\/a>.<\/p>\n<p>It has some nice features and can make use of 2 interrupts&#8230; but I only have one available&#8230; So the other one won&#8217;t be connected for now. My first version of arduino code won&#8217;t make use of any of it for now. So it does not matter. I did connect one&#8230; just in case I have an idea on how I could use it !<\/p>\n<div id=\"attachment_580\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/mma8452.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-580\" class=\"wp-image-580 size-medium\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/mma8452-300x180.png\" alt=\"mma8452\" width=\"300\" height=\"180\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/mma8452-300x180.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/mma8452-500x300.png 500w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/mma8452.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-580\" class=\"wp-caption-text\">Schematic\u00a0based on Sparkfun&#8217;s catalog product photo<\/p><\/div>\n<h1>Let&#8217;s continue with the encoder<\/h1>\n<p>The <a href=\"https:\/\/www.sparkfun.com\/products\/10982\">Sparkfun&#8217;s encoder<\/a> is a bit tricky because documentation is not quite clear but in the end&#8230; it works !<\/p>\n<p><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2015\/03\/encoder-connection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-648\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2015\/03\/encoder-connection.png\" alt=\"encoder connection\" width=\"640\" height=\"341\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2015\/03\/encoder-connection.png 640w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2015\/03\/encoder-connection-300x160.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2015\/03\/encoder-connection-500x266.png 500w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Note that it is a common anode RGB led. Setting pins D12, D13 or D14 to 0 means ON and 255 means OFF !<\/p>\n<p>And last, resistors for the leds are 150\u03a9, 100\u03a9 and 100\u03a9 for red, green and blue pins. Also, pull-down resistor for the switch is 10k\u03a9<\/p>\n<h1>Let&#8217;s finish with the buttons<\/h1>\n<p>And now the very last thing : the <a href=\"http:\/\/www.adafruit.com\/product\/1477\">illuminated buttons<\/a>.<\/p>\n<div id=\"attachment_588\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/button-rear-connection.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-588\" class=\"wp-image-588 size-medium\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/button-rear-connection-300x225.png\" alt=\"button rear connection\" width=\"300\" height=\"225\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/button-rear-connection-300x225.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/button-rear-connection-400x300.png 400w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/button-rear-connection.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-588\" class=\"wp-caption-text\">Schematic based on Adafruit&#8217;s catalog product photo<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Have 3 of them. Quite straight forward&#8230; just don&#8217;t forget 150\u03a9 led resistors.<\/p>\n<h1>Wrap up<\/h1>\n<p>Ok&#8230; all parts have been connected one by one, here is the full picture !<\/p>\n<p><a href=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-634\" src=\"http:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500.png\" alt=\"schematic 1500\" width=\"1500\" height=\"1009\" srcset=\"https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500.png 1500w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500-300x202.png 300w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500-1024x689.png 1024w, https:\/\/interactingobjects.com\/wp-content\/uploads\/2014\/12\/schematic-1500-446x300.png 446w\" sizes=\"auto, (max-width: 1500px) 100vw, 1500px\" \/><\/a><\/p>\n<h1>\u00a0And what about Arduino code<\/h1>\n<p>All is here on GitHub :\u00a0<a href=\"https:\/\/github.com\/jsiobj\/NoeSoundBox\/\">https:\/\/github.com\/jsiobj\/NoeSoundBox\/<\/a><\/p>\n<h1>What&#8217;s next<\/h1>\n<p>In next posts, I will sho how I did assemble all that stuff and build a nice enclosure for it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Main parts Juke\u00a0Box showed here is based on the following main components : an Arduino Mega (here a clone from DF Robot) as the &#8220;brain&#8221; an Adafruit Music Maker for music &amp; midi player a Sparkfun&#8217;s button par and associated &hellip; <a href=\"https:\/\/interactingobjects.com\/?p=567\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[114,88,115,121,96,120],"class_list":["post-567","post","type-post","status-publish","format-standard","hentry","category-juke-box","tag-adafruits-music-maker","tag-arduino-mega","tag-mma8452","tag-rotary-encoder","tag-sparkfuns-button-pad","tag-vs1053"],"_links":{"self":[{"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=567"}],"version-history":[{"count":15,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/interactingobjects.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interactingobjects.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}