{"id":187,"date":"2015-05-25T20:28:16","date_gmt":"2015-05-26T03:28:16","guid":{"rendered":"http:\/\/www.migration.andersknelson.com\/blog\/?p=187"},"modified":"2023-11-01T00:47:26","modified_gmt":"2023-11-01T04:47:26","slug":"princess-phone","status":"publish","type":"post","link":"https:\/\/www.andersknelson.com\/blog\/?p=187","title":{"rendered":"Princess Phone"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Background<\/h3>\n\n\n\n<p>My cousin inherited a vintage Danish telephone (meets USA signal spec apparently) from our grandmother but lamented that she had no land-line to actually use it. Still, it would make a wicked cool addition to her nightstand.<\/p>\n\n\n\n<p>So&nbsp;I was all like &#8220;I can Bluetooth that ish&#8221; then she be like<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/www.migration.andersknelson.com\/blog\/wp-content\/uploads\/2015\/05\/2.jpg\" rel=\"attachment wp-att-229\"><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"365\" src=\"http:\/\/www.migration.andersknelson.com\/blog\/wp-content\/uploads\/2015\/05\/2.jpg\" alt=\"2\" class=\"wp-image-229\" srcset=\"https:\/\/www.andersknelson.com\/blog\/wp-content\/uploads\/2015\/05\/2.jpg 365w, https:\/\/www.andersknelson.com\/blog\/wp-content\/uploads\/2015\/05\/2-150x150.jpg 150w, https:\/\/www.andersknelson.com\/blog\/wp-content\/uploads\/2015\/05\/2-300x300.jpg 300w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What it does<\/h3>\n\n\n\n<p>Makes and receives phone calls via Bluetooth and a paired mobile phone. Basically a big, heavy Bluetooth headset.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What it&#8217;s made of<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Any US or UK (and probably all regions) standard telephone<\/li>\n\n\n\n<li><a href=\"http:\/\/www.silvertel.com\/products\/telecom\/19-telecom\/265-ag1170.html\">Silvertel AG1170-S5 SLIC<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.sparkfun.com\/products\/11678\">RN-52 Bluetooth Audio Module<\/a> (tested using a&nbsp;<a href=\"https:\/\/www.sparkfun.com\/products\/12849\">breakout board<\/a>)<\/li>\n\n\n\n<li><a href=\"http:\/\/www.microchip.com\/wwwproducts\/en\/PIC32MX170F256D\">PIC32MX170F256D<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/ufanders\/princessPhone\/tree\/master\/pcb\">Custom PCB<\/a>&nbsp;designed in&nbsp;<a href=\"http:\/\/www.cadsoftusa.com\/eagle-pcb-design-software\/product-overview\/?language=en\">EAGLE<\/a>&nbsp;and fabricated at&nbsp;<a href=\"http:\/\/quoting.sunstone.com\/quoteexpress.aspx\">PCBExpress<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/ufanders\/princessPhone\">Firmware<\/a>&nbsp;written in C using&nbsp;<a href=\"https:\/\/www.microchip.com\/pagehandler\/en-us\/family\/mplabx\/\">MPLABX<\/a>,&nbsp;compiled by&nbsp;<a href=\"https:\/\/www.microchip.com\/pagehandler\/en_us\/devtools\/mplabxc\/\">XC32<\/a>&nbsp;and loaded using an&nbsp;<a href=\"http:\/\/www.microchip.com\/Developmenttools\/ProductDetails.aspx?PartNO=DV164035\">ICD3<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Theory of operation<\/h3>\n\n\n\n<p>TL;DR: Works like a typical&nbsp;telephone.<\/p>\n\n\n\n<p>Plug it in and pair it with your mobile phone using the standard method &#8211; press and hold the pairing button.<\/p>\n\n\n\n<p>When a call is received, the phone rings. When you pick up the receiver the call is connected, when you put it down the call is ended. You speak and listen through the original handset.&nbsp;Furthermore, the MCU samples the rotary dial so you can initiate calls from the phone.<\/p>\n\n\n\n<p>The MCU provides:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Regionally-appropriate dialtone when you pick up the handset<\/li>\n\n\n\n<li>Regionally-appropriate busy tone<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Trials and Tribulations<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>How do I bypass the microphone gain stage to use the RN-52 with a pre-biased (1\/2 of 3.3v), line-level audio input signal? This is referenced in the usage guide and datasheet but there is no command documented to use this. Does my application require a CODEC? I sure hope not.<strong><em>&gt;&gt;&gt; The microphone gain can be changed from -3dB to 42dB in linear steps. If the gain is set to less than 24dB using the \u2018SM\u2019 command the line in mode is automatically entered.<\/em><\/strong><\/li>\n\n\n\n<li>Is the audio output intrinsically a line-level signal?<strong><em>&gt;&gt;&gt; The audio output is a speaker level signal and not line level signal.<\/em><\/strong><\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Which input channel (left or right) is used when in HFP mode? I&#8217;m making a device to turn a standard telephone into a bluetooth handset by way of a SLIC.<strong><strong><strong><em>&gt;&gt;&gt; MIC_L+\/- is used for HFP mode.<\/em><\/strong><\/strong><\/strong><\/li>\n\n\n\n<li>Is this a typo? Do they mean the &#8220;microphone gain level&#8221; can be set from 00 to 1F?<em><em><strong>&gt;&gt;&gt;&gt;Yes that is correct. It is a typo. Should be \u2018microphone gain level\u2019. I will save this as an update to be captured for document revision.<br><\/strong><\/em><\/em><\/li>\n\n\n\n<li>If the -3 to +42dB gain (45dB range) is entered from 0x00 to 0x1F, that means each increment equals a +1.4dB change. This means the default setting of 0x09 = +9.6dB gain. Is this correct? <em><strong>&gt;&gt;&gt;&gt;Yes it is a linear increment and should be an increment of 1.4dB per step. Did SM command work for your design line level input needs?<\/strong><\/em><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=GXAmMtyaZSI\">https:\/\/www.youtube.com\/watch?v=GXAmMtyaZSI<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=mBiBO86cgWM\">https:\/\/www.youtube.com\/watch?v=mBiBO86cgWM<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=syRX5Vuqba4\">https:\/\/www.youtube.com\/watch?v=syRX5Vuqba4<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Resources<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/forum.arduino.cc\/index.php?topic=69077.0\">http:\/\/forum.arduino.cc\/index.php?topic=69077.0<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.bryanzimmer.net\/Main\/Doorbell_Phone.html\">http:\/\/www.bryanzimmer.net\/Main\/Doorbell_Phone.html<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.epanorama.net\/circuits\/telephone_ringer.html\">http:\/\/www.epanorama.net\/circuits\/telephone_ringer.html<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.qsl.net\/yo5ofh\/hobby%20circuits\/telephone_circuits.htm\">http:\/\/www.qsl.net\/yo5ofh\/hobby%20circuits\/telephone_circuits.htm<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.kerrywong.com\/2010\/03\/12\/a-power-inverter-with-arduino-pulse-source\/\">http:\/\/www.kerrywong.com\/2010\/03\/12\/a-power-inverter-with-arduino-pulse-source\/<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.silabs.com\/Marcom%20Documents\/Resources\/ProSLIC-Solutions.pdf\">http:\/\/www.silabs.com\/Marcom%20Documents\/Resources\/ProSLIC-Solutions.pdf<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.sparkfun.com\/products\/12849\">https:\/\/www.sparkfun.com\/products\/12849<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.electronics-tutorials.ws\/opamp\/opamp_4.html\">http:\/\/www.electronics-tutorials.ws\/opamp\/opamp_4.html<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.epanorama.net\/circuits\/speaker_to_line.html\">http:\/\/www.epanorama.net\/circuits\/speaker_to_line.html<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/home.comcast.net\/~loudgpz\/AVSweb\/\">http:\/\/home.comcast.net\/~loudgpz\/AVSweb\/<\/a><\/li>\n\n\n\n<li>https:\/\/en.wikipedia.org\/wiki\/Ringtone<\/li>\n\n\n\n<li>https:\/\/en.wikipedia.org\/wiki\/Ringback_tone<\/li>\n\n\n\n<li>https:\/\/en.wikipedia.org\/wiki\/Busy_signal<\/li>\n\n\n\n<li>https:\/\/sites.google.com\/site\/hobbydebraj\/home\/goertzel-algorithm-dtmf-detection<\/li>\n\n\n\n<li>http:\/\/www.romanblack.com\/DTMF\/DTMF_alg.htm<\/li>\n\n\n\n<li>http:\/\/www.romanblack.com\/SG\/SG_tutorial.htm#DTMF<\/li>\n\n\n\n<li>www.atmel.com\/<b>Images<\/b>\/doc1982.pdf<\/li>\n\n\n\n<li>http:\/\/www.microchip.com\/forums\/m739194.aspx<\/li>\n\n\n\n<li>https:\/\/en.wikipedia.org\/wiki\/Precise_Tone_Plan<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Background My cousin inherited a vintage Danish telephone (meets USA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,37],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-unfinished"],"_links":{"self":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187"}],"version-history":[{"count":37,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions\/1123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/206"}],"wp:attachment":[{"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andersknelson.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}