{"id":3460,"date":"2013-11-22T23:05:14","date_gmt":"2013-11-23T04:05:14","guid":{"rendered":"https:\/\/teach.alimomeni.net\/2013fall2\/?p=3460"},"modified":"2013-11-22T23:22:35","modified_gmt":"2013-11-23T04:22:35","slug":"final-project-milestone-2-ding-xu","status":"publish","type":"post","link":"https:\/\/teach.alimomeni.net\/2013fall2\/?p=3460","title":{"rendered":"Final Project Milestone 2 \u2013 Ding Xu"},"content":{"rendered":"<p>In my second milestone. I finished the following stuff:<\/p>\n<p>1. sound output amplification circuit. I first used a breadboard to test the audio output circuit using an amplifier connecting a speaker with a switch to augment the output sound and then\u00a0\u00a0finished soldering a protoboard.<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3493\" alt=\"photo_2\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_2.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_2.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_2-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_7-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3494\" alt=\"photo_7 (2)\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_7-2.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_7-2.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_7-2-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_8-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3495\" alt=\"photo_8 (2)\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_8-2.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_8-2.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_8-2-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/player.vimeo.com\/video\/80123483\" height=\"281\" width=\"500\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p>2. Sound capture device: a mic with a pre-amp connecting an usb audio card was used for sound input. However, it spent me a lot of \u00a0time to configure the parameters in the Raspberrry Pi to make it work. I referred to several <a href=\"http:\/\/computers.tutsplus.com\/tutorials\/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876\">blog posts<\/a> in the website to get asoundrc and asound.conf file well set for audio card select and alsa mixer for control. A arecord and aplay command were used to test the recording in linux. Then I revised an addon of OF\u00a0ofxLibsndFileRecorder to achieve recording. However, from the testing result, the system is not very robust, sometimes the audio input will fail and sometimes the play speed will much faster than recording speed, accompanying much noise.<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_11.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3496\" alt=\"photo_11\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_11.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_11.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_11-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/\u7167\u72472.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3505\" alt=\"\u7167\u72472\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/\u7167\u72472.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/\u7167\u72472.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/\u7167\u72472-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/alsamixer.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3503\" alt=\"alsamixer\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/alsamixer.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/alsamixer.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/alsamixer-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>3. GPIO test: in order to test control the audio input and output with \u00a0switch and button. I first used a breadboard connecting a switch with a pull-up or pull down resister as the recording\/play control.<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_22.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3500\" alt=\"photo_22\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_22.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_22.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo_22-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>4. Case building: a transparent case using laser cut was built.<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3490\" alt=\"photo(1)\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo1.jpg\" width=\"500\" height=\"375\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo1.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/photo1-300x225.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>5. Simulink test: I searched that simulink recently supported the raspberry Pi with several well developed modules. So I tried to install an image of Simulink and run some simple demos with that platform. I also tested the GPIO control for triggering the switch between two sine wave generator in Simulink.<\/p>\n<p><a href=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/gpio1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3508\" alt=\"gpio1\" src=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/gpio1.jpg\" width=\"500\" height=\"281\" srcset=\"https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/gpio1.jpg 500w, https:\/\/teach.alimomeni.net\/2013fall2\/wp-content\/uploads\/2013\/11\/gpio1-300x168.jpg 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/player.vimeo.com\/video\/80123425\" height=\"281\" width=\"500\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my second milestone. I finished the following stuff: 1. sound output amplification circuit. I first used a breadboard to test the audio output circuit using an amplifier connecting a speaker with a switch to augment the output sound and then\u00a0\u00a0finished soldering a protoboard. 2. Sound capture device: a mic with a pre-amp connecting an [&hellip;]<\/p>\n","protected":false},"author":60,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,23,12,60],"tags":[],"coauthors":[],"class_list":["post-3460","post","type-post","status-publish","format-standard","hentry","category-audio","category-final-project","category-laser-cutter-machines","category-opencv"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3460"}],"version-history":[{"count":3,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3460\/revisions"}],"predecessor-version":[{"id":3523,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=\/wp\/v2\/posts\/3460\/revisions\/3523"}],"wp:attachment":[{"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3460"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/teach.alimomeni.net\/2013fall2\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=3460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}