{"id":879,"date":"2014-11-24T12:38:18","date_gmt":"2014-11-24T12:38:18","guid":{"rendered":"http:\/\/markdavidscott.com\/?p=879"},"modified":"2014-11-30T23:19:15","modified_gmt":"2014-11-30T23:19:15","slug":"still-ugly-but-now-cheaper","status":"publish","type":"post","link":"https:\/\/markdavidscott.com\/?p=879","title":{"rendered":"Still Ugly, But Now Cheaper"},"content":{"rendered":"<p>I&#8217;d <a title=\"Audio Interoperability\" href=\"http:\/\/markdavidscott.com\/?p=868\">previously described<\/a> my system for playing music via Chromecast on legacy equipment that includes amps and speakers from the 80s and 90s, which are highly inefficient with power. \u00a0A custom ugly box to automatically power my amp on and off was the main missing component of that system, and which has since made it much easier to play music whenever we feel like it.<\/p>\n<p>The main issue with that box, besides its appearance, was the cost of making it &#8211; about $125. This was driven largely by the use of the $96 RDL ST-ACR2, which still required a separate external relay, and which mandated the use of a 24v power supply. \u00a0I&#8217;d commented that it must be possible to do build a vastly cheaper yet otherwise equivalent device. \u00a0Largely out of curiosity about whether I could still do anything beyond plugging in a power cord, I decided to build a much more cost efficient version!<\/p>\n<p>This time, the starting point was a <a href=\"http:\/\/sound.westhost.com\/project38.htm\">design for an audio-controlled relay<\/a>\u00a0that I found via Google search.\u00a0It provided a relatively straightforward design that seemed quite appropriate; the author of the design was kind enough to describe it&#8217;s operation in detail, and to suggest possible modifications. \u00a0Image and circuit are owned by the author, and link there:<\/p>\n<p><a href=\"http:\/\/sound.westhost.com\/project38.htm\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/sound.westhost.com\/p38-fig1.gif\" alt=\"\" width=\"640\" height=\"320\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>After a rather sad amount of time just refreshing myself to the point of being able to understand the operation of the circuit, I went ahead and purchased the necessary parts. I made two modifications to the circuit; the first was replacing R6 with a 20k variable resistor to adjust sensitivity, and the other was to reduce R11 from 10M to 1M to drop the power-off time from 20 minutes to 2 minutes. Ignoring that several parts only come in larger quantities, and the fact that I decided to\u00a0replace the $10 Radio Shack soldering iron I&#8217;ve had since childhood, this circuit was indeed cheaper by an order of magnitude &#8211; and I was able to purchase all necessary parts via Amazon:<\/p>\n<ul>\n<li>11 resistors, various values: ~$0.22 (I bought <a href=\"http:\/\/www.amazon.com\/gp\/product\/B003UC4FSS\/ref=ox_ya_os_product\">this kit<\/a> of assorted values)<\/li>\n<li>1 20k variable resistor: ~$0.08 (I bought <a href=\"http:\/\/www.amazon.com\/gp\/product\/B00F3ZDZ2W\/ref=oh_aui_detailpage_o08_s00?ie=UTF8&amp;psc=1\">this kit<\/a> of assorted values)<\/li>\n<li>5 capacitors, various values: ~$0.20 (I bought <a href=\"http:\/\/www.amazon.com\/gp\/product\/B00CQOM1IC\/ref=ox_ya_os_product\">this kit<\/a> of assorted values)<\/li>\n<li>1 <a href=\"http:\/\/www.amazon.com\/gp\/product\/B00CL588O2\/ref=oh_aui_detailpage_o09_s00?ie=UTF8&amp;psc=1\">LM358N<\/a> op-amp: $0.35<\/li>\n<li>1 <a href=\"https:\/\/www.amazon.com\/gp\/product\/B00KLBGJL2\/ref=oh_aui_detailpage_o06_s00?ie=UTF8&amp;psc=1\">2N7000<\/a> MOSFET transistor: $0.13<\/li>\n<li>2 <a href=\"https:\/\/www.amazon.com\/gp\/product\/B008LTJOX6\/ref=oh_aui_detailpage_o07_s03?ie=UTF8&amp;psc=1\">1N4004<\/a> diodes: $0.32<\/li>\n<li>1 <a href=\"http:\/\/www.amazon.com\/gp\/product\/B008MU206C\/ref=ox_ya_os_product\">DC 12v relay<\/a> (rated for 15A @ 120VAC): $1.46<\/li>\n<li>1 <a href=\"https:\/\/www.amazon.com\/gp\/product\/B00CGV6TZG\/ref=oh_aui_detailpage_o05_s00?ie=UTF8&amp;psc=1\">4cm x 6cm generic PCB<\/a>: $0.70<\/li>\n<\/ul>\n<p><strong>Total cost? \u00a0$3.46<\/strong>. \u00a0Of course, the real cost of building just a single item was considerably higher considering that some components came in quantities of 5, 25, or even 100 &#8211; but now I&#8217;ve got a nice supply of electronic components in case I build something similar in the future. \u00a0Once everything arrived, it was time to use what I&#8217;d learned in high school electronics for the first time in more than two decades. Boy, I&#8217;m getting old! The end result was much uglier than the RDL ST-ACR2, but still vastly cheaper:<\/p>\n<p><a href=\"http:\/\/mdscott.smugmug.com\/photos\/i-mXvxGMb\/1\/O\/i-mXvxGMb.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/mdscott.smugmug.com\/photos\/i-mXvxGMb\/1\/M\/i-mXvxGMb-M.jpg\" alt=\"\" width=\"600\" height=\"401\" \/><\/a><\/p>\n<p>It&#8217;s especially ugly because I should probably have used a proto-board (in which holes are connected vertically and split in the middle, vs. being an unconnected grid), which resulted in the back of the board looking like this:<\/p>\n<p><a href=\"http:\/\/mdscott.smugmug.com\/photos\/i-tp8mqhX\/1\/O\/i-tp8mqhX.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/mdscott.smugmug.com\/photos\/i-tp8mqhX\/1\/M\/i-tp8mqhX-M.jpg\" alt=\"\" width=\"600\" height=\"401\" \/><\/a><\/p>\n<p>Now, if I&#8217;d assembled the circuit perfectly the first time, I&#8217;d have been OK with basically no electronics knowledge &#8211; the project would just have required a little soldering, and following instructions! \u00a0However, I did make at least one mistake (connecting one of the leads of the transistor), which required a few measurements to track down. I&#8217;d also naively used the only\u00a0100nF capacitor in my kit, despite that it was an electrolytic capacitor (which does not handle AC) and not a ceramic capacitor &#8211; so I had to replace this with a pair of 47nF ceramic capacitors in parallel; this eliminated a 0.5v voltage on the audio input terminal! Finally, there was an oscillation issue that caused havoc when I plugged the audio input into my Nexus 5; the screen went crazy and started registering random touch events! This was solved by connecting the negative DC output terminal to ground. This all made me very grateful for the strong electronics program my high school had, and in particular to the teacher that made it much greater than the standards called for &#8211; thanks Mr. Straumers!<\/p>\n<p>Sadly, after testing the circuit above, and starting to assemble things into the project box I chose, I discovered another issue; the nice $7.64\u00a0<a href=\"http:\/\/www.amazon.com\/gp\/product\/B002FH54L6\/ref=ox_ya_os_product\">12v power supply<\/a>\u00a0I&#8217;d ordered was too big to fit inside the project box. I didn&#8217;t want to switch to a bigger box, especially since it takes some effort with my very poor mechanical skills to make remotely reasonable holes in these hard plastic boxes (I&#8217;d already cut the box I had). Finding no smaller alternatives, I finally ordered a $6.25 <a href=\"http:\/\/www.amazon.com\/gp\/product\/B006GEPUYA\/ref=oh_aui_detailpage_o01_s00?ie=UTF8&amp;psc=1\">12v AC adapter<\/a>\u00a0which I cut apart on arrival, using just the circuit inside the plastic housing to supply the power needed by the circuit (power PCB is on the left):<\/p>\n<p><a href=\"http:\/\/mdscott.smugmug.com\/photos\/i-C3XjDv6\/1\/O\/i-C3XjDv6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/mdscott.smugmug.com\/photos\/i-C3XjDv6\/1\/M\/i-C3XjDv6-M.jpg\" alt=\"\" width=\"600\" height=\"401\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The other components you can see above that round out the box are:<\/p>\n<ul>\n<li>IEC 60320 <a href=\"http:\/\/www.amazon.com\/gp\/product\/B00917Z96S\/ref=ox_ya_os_product\">power connector<\/a> &#8211; $2.46. \u00a0This box has a real input power connector; the prior one ran a cut-off power cable directly into the box!<\/li>\n<li>Hammond 1591DSBK <a href=\"http:\/\/www.amazon.com\/gp\/product\/B0002BENMI\/ref=ox_ya_os_product\">project box<\/a>\u00a0&#8211; $7.95. \u00a0At 5&#8243; x 3&#8243; x 2&#8243;, this box is tiny compared to the one I used previously!<\/li>\n<li>AC outlet. \u00a0I used a standard AC receptacle I had lying around from some earlier house work; these can be as little was $0.50, though the flat design I used was more, I think.<\/li>\n<li>Female RCA jack. \u00a0I&#8217;ve had a bag of these for also a few decades, but I imagine they&#8217;re quite inexpensive.<\/li>\n<\/ul>\n<p>So in total, it cost $20.12 for this second version, over $100 less than the first attempt &#8211; though it was quite a bit scarier relying\u00a0on my own circuit considering that it&#8217;s connected to and controls full 120v AC mains power! A couple more pictures of the final result:<\/p>\n<p><a href=\"http:\/\/mdscott.smugmug.com\/photos\/i-CttpgtQ\/1\/O\/i-CttpgtQ.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/mdscott.smugmug.com\/photos\/i-CttpgtQ\/1\/M\/i-CttpgtQ-M.jpg\" alt=\"\" width=\"600\" height=\"401\" \/><\/a><\/p>\n<p><a href=\"http:\/\/mdscott.smugmug.com\/photos\/i-bZ9w3KZ\/0\/O\/i-bZ9w3KZ.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/mdscott.smugmug.com\/photos\/i-bZ9w3KZ\/0\/M\/i-bZ9w3KZ-M.jpg\" alt=\"\" width=\"600\" height=\"338\" \/><\/a><\/p>\n<p>The second image shows the box hooked up to a Chromecast, HDMI audio extractor, and the Emotiva Control Freak used instead of a traditional pre-amp.\u00a0The speakers and power amp are omitted, as I used a lamp\u00a0to test this with, and will hook it up to an amp\/speakers when other family members aren&#8217;t fast asleep :).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;d previously described my system for playing music via Chromecast on legacy equipment that includes amps and speakers from the 80s and 90s, which are highly inefficient with power. \u00a0A custom ugly box to automatically power my amp on and off was the main missing component of that system, and which has since made it much easier to play music whenever we feel like it. The main issue with that box, besides its appearance, was the cost of making it &#8211; about $125. This was driven largely by the use of the $96 RDL ST-ACR2, which still required a separate external relay, and which mandated the use of a 24v power supply. \u00a0I&#8217;d commented that it must be possible to do build a vastly cheaper yet otherwise equivalent device. \u00a0Largely out of curiosity about whether I could still do anything beyond plugging in a power cord, I decided to build a much more cost efficient version! This time, the starting point was a design for an audio-controlled relay\u00a0that I found via Google search.\u00a0It provided a relatively straightforward design that seemed quite appropriate; the author of the design was kind enough to describe it&#8217;s operation in detail, and to suggest possible modifications. \u00a0Image and circuit are owned by the author, and link there: &nbsp; After a rather sad amount of time just refreshing myself to the point of being able to understand the operation of the circuit, I went ahead and purchased the necessary parts. I made two modifications to the circuit; the first was replacing R6 with a 20k variable resistor to adjust sensitivity, and the other was to reduce R11 from 10M to 1M to drop the power-off time from 20 minutes to 2 minutes. Ignoring that several parts only come in larger quantities, and the fact that I decided to\u00a0replace the $10 Radio Shack soldering iron I&#8217;ve had since childhood, this circuit was indeed cheaper by an order of magnitude &#8211; and I was able to purchase all necessary parts via Amazon: 11 resistors, various values: ~$0.22 (I bought this kit of assorted values) 1 20k variable resistor: ~$0.08 (I bought this kit of assorted values) 5 capacitors, various values: ~$0.20 (I bought this kit of assorted values) 1 LM358N op-amp: $0.35 1 2N7000 MOSFET transistor: $0.13 2 1N4004 diodes: $0.32 1 DC 12v relay (rated for 15A @ 120VAC): $1.46 1 4cm x 6cm generic PCB: $0.70 Total cost? \u00a0$3.46. \u00a0Of course, the real cost of building just a single item was considerably higher considering that some components came in quantities of 5, 25, or even 100 &#8211; but now I&#8217;ve got a nice supply of electronic components in case I build something similar in the future. \u00a0Once everything arrived, it was time to use what I&#8217;d learned in high school electronics for the first time in more than two decades. Boy, I&#8217;m getting old! The end result was much uglier than the RDL ST-ACR2, but still vastly cheaper: It&#8217;s especially ugly because I should probably have used a proto-board (in which holes are connected vertically and split in the middle, vs. being an unconnected grid), which resulted in the back of the board looking like this: Now, if I&#8217;d assembled the circuit perfectly the first time, I&#8217;d have been OK with basically no electronics knowledge &#8211; the project would just have required a little soldering, and following instructions! \u00a0However, I did make at least one mistake (connecting one of the leads of the transistor), which required a few measurements to track down. I&#8217;d also naively used the only\u00a0100nF capacitor in my kit, despite that it was an electrolytic capacitor (which does not handle AC) and not a ceramic capacitor &#8211; so I had to replace this with a pair of 47nF ceramic capacitors in parallel; this eliminated a 0.5v voltage on the audio input terminal! Finally, there was an oscillation issue that caused havoc when I plugged the audio input into my Nexus 5; the screen went crazy and started registering random touch events! This was solved by connecting the negative DC output terminal to ground. This all made me very grateful for the strong electronics program my high school had, and in particular to the teacher that made it much greater than the standards called for &#8211; thanks Mr. Straumers! Sadly, after testing the circuit above, and starting to assemble things into the project box I chose, I discovered another issue; the nice $7.64\u00a012v power supply\u00a0I&#8217;d ordered was too big to fit inside the project box. I didn&#8217;t want to switch to a bigger box, especially since it takes some effort with my very poor mechanical skills to make remotely reasonable holes in these hard plastic boxes (I&#8217;d already cut the box I had). Finding no smaller alternatives, I finally ordered a $6.25 12v AC adapter\u00a0which I cut apart on arrival, using just the circuit inside the plastic housing to supply the power needed by the circuit (power PCB is on the left): &nbsp; The other components you can see above that round out the box are: IEC 60320 power connector &#8211; $2.46. \u00a0This box has a real input power connector; the prior one ran a cut-off power cable directly into the box! Hammond 1591DSBK project box\u00a0&#8211; $7.95. \u00a0At 5&#8243; x 3&#8243; x 2&#8243;, this box is tiny compared to the one I used previously! AC outlet. \u00a0I used a standard AC receptacle I had lying around from some earlier house work; these can be as little was $0.50, though the flat design I used was more, I think. Female RCA jack. \u00a0I&#8217;ve had a bag of these for also a few decades, but I imagine they&#8217;re quite inexpensive. So in total, it cost $20.12 for this second version, over $100 less than the first attempt &#8211; though it was quite a bit scarier relying\u00a0on my own circuit considering that it&#8217;s connected to and controls full 120v AC mains power! A couple more pictures of the final result: The second image shows the box hooked up to a Chromecast, HDMI audio extractor, and the Emotiva Control Freak used instead of a traditional pre-amp.\u00a0The speakers and power amp are omitted, as I used a lamp\u00a0to test this with, and will hook it up to an amp\/speakers when other family members aren&#8217;t fast asleep :).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-879","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/posts\/879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=879"}],"version-history":[{"count":3,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/posts\/879\/revisions"}],"predecessor-version":[{"id":883,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=\/wp\/v2\/posts\/879\/revisions\/883"}],"wp:attachment":[{"href":"https:\/\/markdavidscott.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/markdavidscott.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}