{"id":1315,"date":"2013-07-05T06:09:11","date_gmt":"2013-07-05T11:09:11","guid":{"rendered":"http:\/\/nootropicdesign.com\/projectlab\/?p=1315"},"modified":"2018-11-02T08:54:12","modified_gmt":"2018-11-02T13:54:12","slug":"battery-backup-for-audio-hacker","status":"publish","type":"post","link":"https:\/\/nootropicdesign.com\/projectlab\/2013\/07\/05\/battery-backup-for-audio-hacker\/","title":{"rendered":"Battery Backup for Audio Hacker Samples"},"content":{"rendered":"<p>When you record audio samples to the serial SRAM on the Audio Hacker, the data will be lost when power is disconnected.  However, the Audio Hacker uses SRAM chips that allow a small voltage to maintain their contents.  The Audio Hacker board has pads where you can connect a small battery.<\/p>\n<p><a href=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/closeup_battery.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/closeup_battery.jpg\" alt=\"closeup_battery\" width=\"320\" height=\"240\" class=\"alignleft size-full wp-image-1345\" srcset=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/closeup_battery.jpg 320w, https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/closeup_battery-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><br \/>\n<br clear=\"all\"\/><\/p>\n<p>A 3V coin cell battery (like a CR2032) is sufficient to maintain the contents of the memory:<\/p>\n<p><a href=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/batteryConnection.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/batteryConnection.jpg\" alt=\"batteryConnection\" width=\"640\" height=\"480\" class=\"alignleft size-full wp-image-1347\" srcset=\"https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/batteryConnection.jpg 640w, https:\/\/nootropicdesign.com\/projectlab\/wp-content\/uploads\/2013\/06\/batteryConnection-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<br clear=\"all\"><br \/>\nNow you can disconnect power without losing your awesome samples. There is one problem though: your sampling program on the Arduino was probably keeping track of which memory address your sample began\/ended at, so now your program has &#8220;forgotten&#8221; where the sample boundaries are.  One way to fix that is to write your sample address information to a header in SRAM.  Another easy approach is to store the address info in the Arduino&#8217;s EEPROM.  There is code in the <a href=\"\/projectlab\/?p=1305\">Four Sample 12-bit Sampler<\/a> project, as well as the <a href=\"\/projectlab\/?p=1307\">3-Track Looper<\/a> project.  These sketches store each sample&#8217;s end address in EEPROM whenever a sample is recorded.  At sketch startup, these addresses are read from EEPROM.  The code is simple, so just look for lines that use the EEPROM library.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you record audio samples to the serial SRAM on the Audio Hacker, the data will be lost when power is disconnected. However, the Audio Hacker uses SRAM chips that allow a small voltage to maintain their contents. The Audio Hacker board has pads where you can connect a small battery. A 3V coin cell [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[29],"tags":[],"class_list":["post-1315","post","type-post","status-publish","format-standard","hentry","category-audio"],"_links":{"self":[{"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/posts\/1315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/comments?post=1315"}],"version-history":[{"count":10,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/posts\/1315\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/posts\/1315\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/media?parent=1315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/categories?post=1315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nootropicdesign.com\/projectlab\/wp-json\/wp\/v2\/tags?post=1315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}