tag:blogger.com,1999:blog-91554301337399025472024-02-19T00:41:14.911-08:00Just Built Something:Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.comBlogger76125tag:blogger.com,1999:blog-9155430133739902547.post-39568248253699700302020-11-27T09:18:00.000-08:002020-11-27T09:18:14.558-08:00Electric Bike<p>I built this bike in the spring of 2018 to commute to work more quickly. At the time my commute was 26 miles round-trip. This bike let allowed me to travel the 13-mile one-way trip only five minutes slower than traveling by car. Here are some pictures!</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5YYm0bGHwI0OJaISyONiqKv49l2sF4Dwthszib3vuxiDKacYLji4Al7OGRfd_URoZet7bs9xNnsmTVNNIR_2Kx-2RsciExRDeOpHeGoewVFke9JoX8LjbEy8QKelooDXWKrU5CDOAlLbc/s2048/IMG_20201127_101559.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5YYm0bGHwI0OJaISyONiqKv49l2sF4Dwthszib3vuxiDKacYLji4Al7OGRfd_URoZet7bs9xNnsmTVNNIR_2Kx-2RsciExRDeOpHeGoewVFke9JoX8LjbEy8QKelooDXWKrU5CDOAlLbc/s320/IMG_20201127_101559.jpg" width="320" /></a></div><p></p><p>The build is a mid-drive BBS02 kit from Lunacycle which has a power rating of 750W. Mid drives allow the use of the bike's gear set and drive train, while keeping the weight more evenly distributed in the center when compared to hub motors. On this bike at full throttle while also pedaling, I can max out around 35 mph but usually ride around 20 to maximize battery (and human) life.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifG95O1KcD3fNLjkHNaqOKqmVw7Ey-6yc75oSDRDIeJNpZpgnv7DlCZH3WI7D0X3TcTQF6oYW2L7g2mFj7HdLVY19mww-_T7kbKEpX31-KtrMvGnfq9aL-WPVo2aPbWrvsEMGFdHAbvTXs/s2048/IMG_20201127_101637.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifG95O1KcD3fNLjkHNaqOKqmVw7Ey-6yc75oSDRDIeJNpZpgnv7DlCZH3WI7D0X3TcTQF6oYW2L7g2mFj7HdLVY19mww-_T7kbKEpX31-KtrMvGnfq9aL-WPVo2aPbWrvsEMGFdHAbvTXs/s320/IMG_20201127_101637.jpg" /></a></div><p></p><p>I rewired the motor's terminations with crimp connections to an XT90 connector because, on one of the last days I commuted on this bike before the pandemic, the previous connector shorted out on my way home and I had to pedal this enormously heavy beast without assistance that day. It took me an hour and fifteen minutes compared to the usual 35 minutes. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP8JT-yffVnAfPmJPtZOcByTJpxlfCXOq6QjzIdxn15ZIpU5FmeJUlCZED7aFRxDJ-TsS6L1q3Milqx1XnlgbWqX_Fe0zcX-DPDUm_Bwe8CQXAOtEYGAgzdVBCd0xVYHeMxvcdMmPNBFlZ/s2048/IMG_20200302_171916.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP8JT-yffVnAfPmJPtZOcByTJpxlfCXOq6QjzIdxn15ZIpU5FmeJUlCZED7aFRxDJ-TsS6L1q3Milqx1XnlgbWqX_Fe0zcX-DPDUm_Bwe8CQXAOtEYGAgzdVBCd0xVYHeMxvcdMmPNBFlZ/s320/IMG_20200302_171916.jpg" /></a></div><p>These connectors are terrible and I don't use them anymore. <br /></p><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv9VkTA7z-hm8kEdIFboA9qh_scFehPN3gN6uwATDxyKmN5gaoB3AO5KQR_sBlFDXRSGogJ5fV4MaL0ZPIlbiGm-An75wrRyCNj_nFc_OdzEuNbxJthpPZMJC0TyJ-LcD-gi1W-O2GSMkT/s2048/IMG_20201127_101732.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv9VkTA7z-hm8kEdIFboA9qh_scFehPN3gN6uwATDxyKmN5gaoB3AO5KQR_sBlFDXRSGogJ5fV4MaL0ZPIlbiGm-An75wrRyCNj_nFc_OdzEuNbxJthpPZMJC0TyJ-LcD-gi1W-O2GSMkT/s320/IMG_20201127_101732.jpg" /></a></div><p></p><p>The battery is a 52V lithium ion pack from Lunacycle. I think it's around 16 A-h. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQk2eYY79wlNST4puigl7TT-B7SzEaOBsCAkIMS1JoFnZGz4HCRwzRewxNXb9UMv81a085ek6ws6huacu44rXhJ6CnHQxtvnSYblTSKZpLGV8hzECADxbvNT5eRNipgUTBjEyxIwjCqtd-/s2048/IMG_20201127_101802.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQk2eYY79wlNST4puigl7TT-B7SzEaOBsCAkIMS1JoFnZGz4HCRwzRewxNXb9UMv81a085ek6ws6huacu44rXhJ6CnHQxtvnSYblTSKZpLGV8hzECADxbvNT5eRNipgUTBjEyxIwjCqtd-/s320/IMG_20201127_101802.jpg" width="320" /></a></div><p></p><p>The rear rack has hooks for a surfboard which allow me to get to Palm Beach without having to pay for parking. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBgEYXDN1Tc5jjP8g_Gc7uehWCbnoN1HZbp4hq0iL2A1XVlKH8y1r-wg4IMjiFtTaL_YROqnmlM3LLx2Ipu5d7YH_bXhflstHr5mg3h-UxqS5FVlJJddt85qR1r58f1WHd5lsIzDCro8lv/s2048/IMG_20201127_101859.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBgEYXDN1Tc5jjP8g_Gc7uehWCbnoN1HZbp4hq0iL2A1XVlKH8y1r-wg4IMjiFtTaL_YROqnmlM3LLx2Ipu5d7YH_bXhflstHr5mg3h-UxqS5FVlJJddt85qR1r58f1WHd5lsIzDCro8lv/s320/IMG_20201127_101859.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8XX_Tu9qYRZhOGNMQUOh1jaFrudJzEe0Y_exzKgbVULcrEY-e1-PWflfwX2r3je9vpSZC3vXojNAZwOyGAq30lYiBHaNfkelPPoq9l0B7Yvuu1PYHG4MMWaGLJM3L5S153ApkmNJ8keq/s2048/IMG_20201127_101903.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT8XX_Tu9qYRZhOGNMQUOh1jaFrudJzEe0Y_exzKgbVULcrEY-e1-PWflfwX2r3je9vpSZC3vXojNAZwOyGAq30lYiBHaNfkelPPoq9l0B7Yvuu1PYHG4MMWaGLJM3L5S153ApkmNJ8keq/s320/IMG_20201127_101903.jpg" width="320" /></a></div><p></p><p>I also have a trailer setup that I use to go fishing or to carry around other random gear. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTgtJ56-ZQPBOkjSNNrA8cqkSF7dt4Wm3xCNVXCi8DIsBvA1NBQUxtpt2Z2uCH818c5AKzSCkpfWEIIruO5MIZ4KpIT6nftz56d9R6_xstYAiCbscHwNmZrusY54d6iV4Dkf68bt-zrsv3/s2048/IMG_20190420_211053.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTgtJ56-ZQPBOkjSNNrA8cqkSF7dt4Wm3xCNVXCi8DIsBvA1NBQUxtpt2Z2uCH818c5AKzSCkpfWEIIruO5MIZ4KpIT6nftz56d9R6_xstYAiCbscHwNmZrusY54d6iV4Dkf68bt-zrsv3/s320/IMG_20190420_211053.jpg" width="320" /></a></div>This is not me, this is my friend Bradley who came to visit and go fishing. Hi Bradley!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT4A-oBPan6hhb1zDCRoXxr59ZIF6w39ehDW7VztSHbFpsd8-5yIUqs2LE0IilgMGKEOVEa41jyLd0WINSAyrSkwW8z7zG9IDYrFtu0r3mPZkiWp7QoZY9kBrkaNtPgmkUSSl3U_xTpnQU/s2048/IMG_20190423_125250.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT4A-oBPan6hhb1zDCRoXxr59ZIF6w39ehDW7VztSHbFpsd8-5yIUqs2LE0IilgMGKEOVEa41jyLd0WINSAyrSkwW8z7zG9IDYrFtu0r3mPZkiWp7QoZY9kBrkaNtPgmkUSSl3U_xTpnQU/s320/IMG_20190423_125250.jpg" width="320" /></a></div><br />Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-59981234180452982942020-10-29T11:54:00.002-07:002020-10-29T12:01:59.703-07:00Auxiliary Truck Battery<p>I used to have an old Nissan Frontier that was outfitted for off-road adventure in the southern Appalachians. One day I went offroading and almost got trapped behind a blocked trail. Getting out ended up tearing the front bumper off of my truck and as a result of that experience, I built a solar panel into that truck's electrical system to make sure that if I was ever in a worse situation, I wouldn't run out of power that I could use to call for help, either by cell phone or by radio. </p><p><a href="https://builtsomething.blogspot.com/2012/05/solar-power-for-truck.html">https://builtsomething.blogspot.com/2012/05/solar-power-for-truck.html</a></p><p>Basically I had built a solar charge controller from scratch so I wouldn't overcharge my truck's battery. Since then there have been a few developments. First, cheap solar charge controllers are about a third of the price of an Arduino, so I own a few of those now and don't really need my janky charge controller anymore. I've also sold that truck and bought a newer one, but additionally I've learned about battery isolators from the Van Dweller community and wanted to build something similar, but with some key improvements.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwPx5LSa5T8j2yYhVWQnw-tXt5e4xTuwPBrvliXGAdedj_pdDLOxx4IO3ylB4b2O2190ed8YZ1rOE27_K8EOoZJT7uW3QrRh0aX7ZeNaFYkZhGTXSLvXEbey7qDMfgcHeeXD_WzomsrQZn/s2048/IMG_20200908_193400.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwPx5LSa5T8j2yYhVWQnw-tXt5e4xTuwPBrvliXGAdedj_pdDLOxx4IO3ylB4b2O2190ed8YZ1rOE27_K8EOoZJT7uW3QrRh0aX7ZeNaFYkZhGTXSLvXEbey7qDMfgcHeeXD_WzomsrQZn/w320-h240/IMG_20200908_193400.jpg" title="New truck - 2019 Tundra SR5/TRD 4x4" width="320" /> </a></div><div class="separator" style="clear: both; text-align: center;"> Slightly larger than the Frontier: Tundra 4x4</div><p></p><p>A battery isolator is a mechanism for electrically isolating one battery from another. Usually, they are used in campers or RVs to charge up an auxiliary battery from the vehicle's alternator when driving, but then disconnect the auxiliary battery from the starter battery once the vehicle stops running. This allows energy to be used from the auxiliary battery for lighting, running refrigerators, charging laptops, etc. without fear of draining the starter battery while parked or camping. </p><p>This is a fine system to have but it's limited in a few key areas. First, if a vehicle sits for more than a few weeks, there's a non-zero chance that the starter battery dies anyway. I would like to prevent that, especially in the era of coronavirus where I might not drive for a few weeks. This build is effectively a battery isolator, but with added features for solar charging which can charge the auxiliary battery and also keep the truck's starter battery topped off. </p><p>I'll start off talking about the circuit design but if you're not really interested in that, just scroll to the end to see the auxiliary system installed in the truck's center console. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQmBTi-ggIOLMoLlID7yAGKjKtWyR_n3sAhz03YsJi7Kdebhj2rA0vucTdgX9IHxCHB5nrsUP5parGL3ZsJew7bGLrxnZRMe08j-N72gTOmo440xk989bPS6Ckmqog3ZlPkdcvkAwGgXHW/s2658/IMG_20200907_094246.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1183" data-original-width="2658" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQmBTi-ggIOLMoLlID7yAGKjKtWyR_n3sAhz03YsJi7Kdebhj2rA0vucTdgX9IHxCHB5nrsUP5parGL3ZsJew7bGLrxnZRMe08j-N72gTOmo440xk989bPS6Ckmqog3ZlPkdcvkAwGgXHW/s320/IMG_20200907_094246.jpg" width="320" /></a></div><br /><p>My original sketch for the circuit involved two relays, one of which would connect the batteries together if solar was available, and another which would connect the batteries together if the truck was running. It included a 1-ohm power resistor to limit inrush current, but my testing since then revealed that there's enough inherent resistance in the system itself to not need a resistor like this. </p><p>The major downside here is that energy from the solar panel would be wasted in the relay coil, and since the panel I am using only puts out around 30W, I didn't want to waste any energy that I didn't have to. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZLHIAAB6kM3zhhp39bv5V2AMlkd0cX4N-EC0BsSADigUWrvjQczE_D8y_O50TW6YySVptKBwioHfX8tgJZNkSSZYsm9vUbvNludQsmb6nmuzw9smk3-k4UJVa6nZbiL9dMciX4EGEtEgZ/s2048/IMG_20200907_135312.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1050" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZLHIAAB6kM3zhhp39bv5V2AMlkd0cX4N-EC0BsSADigUWrvjQczE_D8y_O50TW6YySVptKBwioHfX8tgJZNkSSZYsm9vUbvNludQsmb6nmuzw9smk3-k4UJVa6nZbiL9dMciX4EGEtEgZ/s320/IMG_20200907_135312.jpg" width="320" /></a></div><br /><p>The next iteration of the circuit allowed me to realize that I could somewhat safely remove one of the relays if I added in a pair of diodes to isolate the auxiliary battery from the starter battery. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtFtG6uIAf6ETWfBuUjnzJBh6SJ1OO6-DOV3bRXpG4dtUrARMsc2Yr7U4UrinCskSEP_etwHO_HmItaG0Q3uqClnsdyYTSJaiLO_QNlPp3RKU3zsyrmrAiiTRb-m6tkVN_5AslwwKDkIyz/s2724/IMG_20201026_092227.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1154" data-original-width="2724" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtFtG6uIAf6ETWfBuUjnzJBh6SJ1OO6-DOV3bRXpG4dtUrARMsc2Yr7U4UrinCskSEP_etwHO_HmItaG0Q3uqClnsdyYTSJaiLO_QNlPp3RKU3zsyrmrAiiTRb-m6tkVN_5AslwwKDkIyz/s320/IMG_20201026_092227.jpg" width="320" /></a></div><br /><p>Looks much better, and the diode will waste much less energy than a relay coil. At this point it's worth discussing how a cheap solar charge controller works, because this is where I had my major revelation for this project.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pZDY7HWm_NrPWMOED9HqnCquNImQjsjB8uKQIY6gISQS2VSkEvJKqGMBSQpaMG-T1LID0XRAAb8OC5YmIEuASrccbJElKmgHLRkEBaJZ6fdHIJhmQweNU-qezENy29ZfKAoJZnUn7LKU/s2048/IMG_20201003_153009.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1339" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pZDY7HWm_NrPWMOED9HqnCquNImQjsjB8uKQIY6gISQS2VSkEvJKqGMBSQpaMG-T1LID0XRAAb8OC5YmIEuASrccbJElKmgHLRkEBaJZ6fdHIJhmQweNU-qezENy29ZfKAoJZnUn7LKU/s320/IMG_20201003_153009.jpg" width="320" /></a></div><br />Solar charge controllers like this typically run $10-$20 on Amazon and
don't include MPPT but get the job done reasonably well nonetheless. The
two terminals on the left connect the solar panel, the two in the
center connect the battery, and the two on the right are supposed to be
for the load. This controller is about 10 years old though, and the red
button to turn the load on or off has long since quit working. When I'm
using this controller now I use it just to keep the solar panel from
overcharging the battery it's connected to, and then I connect the load
directly to the battery instead of using the controller as a middleman. I
used to have this charging a small battery which ran an irrigation
pump, and then I used it as a battery charge maintainer for my other car
which I drove very infrequently and would occasionally be found with a
dead battery.<p></p><p>The thing about these cheap controllers is that they don't need the input to be from a panel, they can handle charging a battery with ANY input, as long as the input voltage is above that of the battery and less than the rating of the charge controller, in this case around 20V. </p><p>This led to the idea that I could use a relay to switch between the solar panel and the alternator to charge the auxiliary battery, with the charge controller doing its thing in between. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAFqvyoNoSNNm9Id5gqjQScC-ymPwcdkgngfDpNrGnSmll3XIbhXS-MXcgFTnSTkdTewIRwSk71V7lQ7s0i0ezCKFWB0Wm4ywp8TgaAHVu2NgBrH1-_tA3nQXUA_lZmzJ83tAYOEWwUpMp/s3630/IMG_20201003_153908.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="866" data-original-width="3630" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAFqvyoNoSNNm9Id5gqjQScC-ymPwcdkgngfDpNrGnSmll3XIbhXS-MXcgFTnSTkdTewIRwSk71V7lQ7s0i0ezCKFWB0Wm4ywp8TgaAHVu2NgBrH1-_tA3nQXUA_lZmzJ83tAYOEWwUpMp/s320/IMG_20201003_153908.jpg" width="320" /></a></div><br /><p>Genius! This design only requires one relay and no diodes, and doesn't waste any precious solar energy. The only downside, I realized after a little while, is that it can't keep the truck's battery topped off with excess energy from the solar panel. So I added one diode: </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxh__MMZhkz3itwG6VVNMUoGHvJpaWeU2N9URMKlLudfZ4dcz7XCbNmqqTIyvRpFbHl1lhFCBfexwjc3j0V57YkHYh6c-QWswRcxdiaDyPlk-a17qkst83B4JQbTt6Y7fG6dhd0B-Mzgp/s3130/IMG_20201026_092232.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1005" data-original-width="3130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfxh__MMZhkz3itwG6VVNMUoGHvJpaWeU2N9URMKlLudfZ4dcz7XCbNmqqTIyvRpFbHl1lhFCBfexwjc3j0V57YkHYh6c-QWswRcxdiaDyPlk-a17qkst83B4JQbTt6Y7fG6dhd0B-Mzgp/s320/IMG_20201026_092232.jpg" width="320" /></a></div><br /><p>This might have been where the design ended, except for one major flaw in my design, which is that the solar charge controller is just a black box to me and I have no idea what it actually does or how its internal wiring is configured. Allow me to illustrate: </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitH01lLAXAEfhBMytkoiSTwKCijEUslEgZk7NRcEpCDD8fcOxOrXIyLochzoo3GQswFcslvDlngmbYba5YjnJg251eAciPoHCHiTma6K9W048UUonlSMZOslMUYDUFn69qYjnqfuV3BLWS/s2048/IMG_20201016_093817.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1126" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitH01lLAXAEfhBMytkoiSTwKCijEUslEgZk7NRcEpCDD8fcOxOrXIyLochzoo3GQswFcslvDlngmbYba5YjnJg251eAciPoHCHiTma6K9W048UUonlSMZOslMUYDUFn69qYjnqfuV3BLWS/s320/IMG_20201016_093817.jpg" width="320" /></a></div><br /><p>Do you see the problem yet? Here's a hint: </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqVvSY_BCp9adBfMQTwAwM4aXPk7FuIoSs3F9jjceF3JM0rLzAJeoyNR-HqTRXHj6z0UzssouREydrK_oAl3HInduKodOWXJ3LR8-2LDGG_PAogGS52kNJs9wS4B3lNKncZ3gQqMKEBXB2/s2048/IMG_20201016_093817-2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1126" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqVvSY_BCp9adBfMQTwAwM4aXPk7FuIoSs3F9jjceF3JM0rLzAJeoyNR-HqTRXHj6z0UzssouREydrK_oAl3HInduKodOWXJ3LR8-2LDGG_PAogGS52kNJs9wS4B3lNKncZ3gQqMKEBXB2/s320/IMG_20201016_093817-2.jpg" width="320" /></a></div><br /><p>This yellow path is known as a ground loop and is what we in the engineering world refer to as "very bad". With the relay energized, a (theoretically) zero-resistance path is created in the ground wiring which can allow for some really bizarre, unpredictable circuit behavior. These loops are typically avoided at all costs. In this specific case, it disabled the charge controller entirely because the controller itself handles isolation between the input and output by separating the negative/ground terminals of each, and when I wired it this way I unknowingly bypassed the entire charge controller. So, sadly, this design would not work. Back to the drawing board!</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_4JFZgF6MJ9Q1hHhYPWZx70WoSO3xfnlvQBOxH2y1hdobQAxFrPgiawJyRdjKem1Kqha6s3Jbyd3AcH4wQm-T987rqmzk7B4wb0dve6KdznPfh8yosi8Bt089xgNA2vSwtSRr2Pezh2uZ/s2654/IMG_20201017_134323.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1185" data-original-width="2654" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_4JFZgF6MJ9Q1hHhYPWZx70WoSO3xfnlvQBOxH2y1hdobQAxFrPgiawJyRdjKem1Kqha6s3Jbyd3AcH4wQm-T987rqmzk7B4wb0dve6KdznPfh8yosi8Bt089xgNA2vSwtSRr2Pezh2uZ/s320/IMG_20201017_134323.jpg" width="320" /></a></div><br /><p>I was running out of paper at this moment, but I scrapped all of my designs and came up with this from scratch. It uses a single relay whose sole purpose is to avoid a ground loop, and the actual battery isolation is handled entirely by diodes. It allows the truck to charge the accessory battery when the truck is running, and allows the solar panel to charge both the accessory battery and the truck battery. When the truck turns on, the relay energizes and disconnects the truck battery from the circuit which is where the ground loop would have existed.</p><p>The diodes I had on hand were 6A axial rectifier diodes which I presumed would work fine for this situation. The charge controller has a rating of 10A so I paired two diodes together for each marked location on the circuit so the diodes aren't bottlenecking the circuit. They have a thermal rating of 175C which is insane high, and a temperature rise above ambient of +30C/watt. I calculated during testing that they would dissipate somewhere around one watt of energy with their 0.48V junction drop, so this means an operating temperature around 138F which I thought was a little too high. I'll get to that later on, though. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM9mQDY7ntZlLZJlMl3wSlLiB8lIu_JsSoqZIY8JbTbhEwq-wwUHjp89lFdlGroON0wqgcc2jIorN2EbNMooO6pSnZ7LqBZWMuovS2V8H_ikRf0NJsx5xUE7onsWpZsAOFwREsQuV5vNSV/s2048/IMG_20201001_205720.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM9mQDY7ntZlLZJlMl3wSlLiB8lIu_JsSoqZIY8JbTbhEwq-wwUHjp89lFdlGroON0wqgcc2jIorN2EbNMooO6pSnZ7LqBZWMuovS2V8H_ikRf0NJsx5xUE7onsWpZsAOFwREsQuV5vNSV/s320/IMG_20201001_205720.jpg" width="320" /></a></div><p>I had four of these batteries leftover from my electric lawnmower. It uses two in series to drive a 24V motor. After around four years of ownership the first set of batteries weren't quite able to finish one lawn, so I ordered replacements. The two replacements turned out to be horrendous, so I ordered a second set. Then the company that sent me the bad batteries sent me another two good batteries. This long-winded and complicated story is how I ended up with four not-totally-terrible batteries to use for some light duty battery applications. Two sat in my garage for months, and the two that I thought were good I wired up in parallel to drive a 12V pump for an irrigation system. </p><p>I removed those batteries from the irrigation system though and had every intention of recycling the ones I thought were bad, but I figured I would run them through some tests before ditching them. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivAte3iLhgtMUGcW5XDLFpHzjU9UgURguxUTm43qAo4QdCmYQ6LELbhlS97wRNR6s7E-VSkCqF9tTOKkGD13ViURK7aGJI7TPbEjIQDqkQNH95oJTrB1LYbe2T_CUUvRoN3vEtnk3F4Ou0/s2048/IMG_20201003_161934.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivAte3iLhgtMUGcW5XDLFpHzjU9UgURguxUTm43qAo4QdCmYQ6LELbhlS97wRNR6s7E-VSkCqF9tTOKkGD13ViURK7aGJI7TPbEjIQDqkQNH95oJTrB1LYbe2T_CUUvRoN3vEtnk3F4Ou0/s320/IMG_20201003_161934.jpg" width="320" /></a></div><br /><p>As a dummy load, I hooked up this laptop to a 600W true sine wave inverter and measured the current draw to calculate the power consumption. Then I let it run until the low voltage alarm on the inverter went off, and then I calculated the energy in the batteries based on the amount of time the test lasted. The laptop didn't have a battery in it at all, and ran Folding@Home which is a very power-hungry application. I averaged 50W continuous with this setup. </p><p>I performed several tests, one with the pair of "good" batteries in parallel and one with the pair of "bad" batteries in parallel. Then I did a final test with all four batteries in parallel. I had expected the energy in this final test to be lower since I expected the "good" batteries to subsidize the "bad" batteries at lower voltage but my tests actually revealed that both pairs had almost equal capacities during this test. If there had been a dramatic difference I wouldn't have paired them all together, but since they seemed to be behaving almost identically I decided it was safe to wire them all together in parallel. Their nameplate ratings add up to about 40 Amp-hours but since they're not new anymore, my actual measurements showed that they have around 32 A-h of capacity. Not bad for essentially "free" batteries. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFs6iqLylcNkAVlq7jGxSI7BdSs4MVugj4b46P3GVamOakFN3XfBxWCUDuVFvzmNVbdjDPRPCnb2_tapHMrX-cj48n3NFa838PoTEROiHgDdtFzkqcwM1hvN4SKY_lhSWfM2qAQKfSGAQb/s2048/IMG_20201029_141357.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1993" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFs6iqLylcNkAVlq7jGxSI7BdSs4MVugj4b46P3GVamOakFN3XfBxWCUDuVFvzmNVbdjDPRPCnb2_tapHMrX-cj48n3NFa838PoTEROiHgDdtFzkqcwM1hvN4SKY_lhSWfM2qAQKfSGAQb/s320/IMG_20201029_141357.jpg" width="320" /></a></div><p>My test data shows comparisons between the batteries. I never tested each individual battery since they were always paired together, and my tests of parallel configurations didn't indicate that there would be any weak cells anywhere. Also during this testing I used a second, much larger battery bank to simulate a solar panel and determine how much current would be drawn to charge this battery bank under realistic real-world scenarios. The highest current draw I saw was under 4A, which is below the rated currents for both the charge controller and diodes, so from there I was able to move on with the build. </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1GUQ1a3QbGLV3xLDLk3ydAZYVyDXIPb6fSdTKtzCP5LPaH_je5JDPkGXoDfXJyFDiNWUub3j1Tb0BHKjZK8x2TQVjP51H2jxIXSNReXKi0Q-eAeHZ-P0eY2gJSLXnap78dAXGoqfcDU8F/s2048/IMG_20200920_114904.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1GUQ1a3QbGLV3xLDLk3ydAZYVyDXIPb6fSdTKtzCP5LPaH_je5JDPkGXoDfXJyFDiNWUub3j1Tb0BHKjZK8x2TQVjP51H2jxIXSNReXKi0Q-eAeHZ-P0eY2gJSLXnap78dAXGoqfcDU8F/s320/IMG_20200920_114904.jpg" width="320" /></a></div> <p></p><p>One test I also did was a measurement of the batteries' internal resistance. For that I have a special meter which measured from 25 to 32 milliohms for each of the four batteries. In parallel I measured 11 milliohms for the whole pack, which is pretty close to a calculated value of around 8 milliohms. This is also good for peace-of-mind since they are so close and none of the four batteries are obviously bad like I had originally suspected.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3EalZoycikQzCj_BvTPDmATA4o7ynztfFRZv_fzq3YK268N7yx5jqe-fFXnAnq6j_2w1fQnFSLAGg-RswZepg_Rvd8SpqXJc6TsSfOCnJTx_r5P14dTYx2UaskQqVj4IucJXekB-pcKA/s2581/IMG_20200922_224718.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1219" data-original-width="2581" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3EalZoycikQzCj_BvTPDmATA4o7ynztfFRZv_fzq3YK268N7yx5jqe-fFXnAnq6j_2w1fQnFSLAGg-RswZepg_Rvd8SpqXJc6TsSfOCnJTx_r5P14dTYx2UaskQqVj4IucJXekB-pcKA/s320/IMG_20200922_224718.jpg" width="320" /></a></div><br /><p></p><p></p><p>It's important when connecting batteries together that the wires be of identical lengths to ensure that the batteries are all charged to the same level. (You can also see some important wiring on the larger batteries in the picture above which ensures those batteries charge to the same level.) For that I used 12 gage wire with ring lugs at the other end, then bolted all of the ring lugs together and added a fused tap to the connection. </p><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg49HGLhuA1Cl9Dmmh9hd6wSD9aAbFc0tNAJ_WT8-qAqzPVKcJx_AcuTYQHtp4zTiYc1aRigLbUIEClFrVXy4qjFHVV9m6_Yae8zF0PsCKjg8-fzZ-oAqRdUbh2IYIdE5A3NXUCz8rLu_5t/s2048/IMG_20200922_223326.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1577" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg49HGLhuA1Cl9Dmmh9hd6wSD9aAbFc0tNAJ_WT8-qAqzPVKcJx_AcuTYQHtp4zTiYc1aRigLbUIEClFrVXy4qjFHVV9m6_Yae8zF0PsCKjg8-fzZ-oAqRdUbh2IYIdE5A3NXUCz8rLu_5t/s320/IMG_20200922_223326.jpg" /></a></div><p></p><p>From there I built a case for the batteries out of thick cardboard and a roll of duct tape that someone left on my front lawn. Then I started wiring up the circuit. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNPn6TyywPQGQsemT5ZsMiX2ynCFlaSb6vqCrNuBum8LdBYy9bfLj6t9jTORqEFZ-p5ToJy9HbPTvgcZFZuv11LnROFOdJwZrbiI3xjTzECbC4uRfQLxx562BMlkx9CMOTV4r-ax8x6JCN/s2048/IMG_20201017_142451.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1175" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNPn6TyywPQGQsemT5ZsMiX2ynCFlaSb6vqCrNuBum8LdBYy9bfLj6t9jTORqEFZ-p5ToJy9HbPTvgcZFZuv11LnROFOdJwZrbiI3xjTzECbC4uRfQLxx562BMlkx9CMOTV4r-ax8x6JCN/s320/IMG_20201017_142451.jpg" width="320" /></a></div><br /><p>This was kind of a rat's nest so once I put the circuit through some tests to verify that it would work properly, I wrote down a wiring guide so I wouldn't forget to hook anything up. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAS3B7XjooLTQu7tfpTr_O5p9dtXn4X5ysZYB4wMKuzKkETR5zuvNQF_EPYqUNn7WVZATMbmbLouBPPQwRmapK78yMe0er-OKdw6EwADCOSmPrFPf1jZTRU2IpERfkOrPHwfCJAWqD_Sqp/s2048/IMG_20201021_195118.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1192" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAS3B7XjooLTQu7tfpTr_O5p9dtXn4X5ysZYB4wMKuzKkETR5zuvNQF_EPYqUNn7WVZATMbmbLouBPPQwRmapK78yMe0er-OKdw6EwADCOSmPrFPf1jZTRU2IpERfkOrPHwfCJAWqD_Sqp/s320/IMG_20201021_195118.jpg" width="320" /></a></div><br /><p>From there it was time to start making it look more presentable.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-D-pXj3yFXSDLxmn8MGW9RaxKZx2KroTx5hmTc-ss_a2iMRFMuFZd_3BsLWviScJKMR2eEsp5fTQxrHABco7OpfS3KiKiy1nHeSIWqnD6xNbpvsVO_vaq1kDze6yVSigmoK4rupHuOsQN/s2048/IMG_20201021_121200.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-D-pXj3yFXSDLxmn8MGW9RaxKZx2KroTx5hmTc-ss_a2iMRFMuFZd_3BsLWviScJKMR2eEsp5fTQxrHABco7OpfS3KiKiy1nHeSIWqnD6xNbpvsVO_vaq1kDze6yVSigmoK4rupHuOsQN/s320/IMG_20201021_121200.jpg" width="320" /></a></div><br /><p>At this point I used an infrared thermometer to measure the temperatures of the diodes and found them to be concerningly high at around 138F. I had some cheap heat sinks around though so I installed those with some thermal compound<br /> which brought the temperature down to around 120F. Much better. </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3A3TM4y02gTxauSHdlDNfbt_SXI7AgqDF1FEYbN5CCcVnDxGc2Z4E0gth_G2H9DjeYXZfLr0P8ftq-MSF6sRFgr0FCdakklj5OHJ0_fvqONTaqlj3soNhBM8Sd62rv1BZitprQt0W3Oh/s2048/IMG_20201023_104018.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3A3TM4y02gTxauSHdlDNfbt_SXI7AgqDF1FEYbN5CCcVnDxGc2Z4E0gth_G2H9DjeYXZfLr0P8ftq-MSF6sRFgr0FCdakklj5OHJ0_fvqONTaqlj3soNhBM8Sd62rv1BZitprQt0W3Oh/s320/IMG_20201023_104018.jpg" width="320" /></a></div><p></p><p>Now it's time to actually fit it into the truck. I had originally planned to install these under the rear seats because I thought it might be easier to wire them in that location, but the Tundra has an enormously deep center console with a cigarette lighter jack already installed, which I planned to use as the part of the circuit that charges the auxiliary battery while the truck is running and also activates the relay coil. The center console fit everything perfectly. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxMHJ0CMX0eP7nX660pz9dNretD9OgBKxtmcxzlwcfSFH2ZYQbfUyfUohq_au-FTglbJi_f0YJ1-hK204SUT6UoSr03z2VdahYbOSDkfVNquV1yY8s5B4rhvbSo3uqr7EZTotbOriJWpTL/s2048/IMG_20201024_104836.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxMHJ0CMX0eP7nX660pz9dNretD9OgBKxtmcxzlwcfSFH2ZYQbfUyfUohq_au-FTglbJi_f0YJ1-hK204SUT6UoSr03z2VdahYbOSDkfVNquV1yY8s5B4rhvbSo3uqr7EZTotbOriJWpTL/s320/IMG_20201024_104836.jpg" width="320" /></a></div><br /><p>The two empty blue terminals at the top are for the connection to the truck battery, which I made by running a wire out of the top of the center console, under the driver's seat, and to an add-a-fuse that was already in the truck from installing a dash cam. This is how the truck battery receives energy from the solar panel to keep itself charged. The two cigarette lighter jacks are directly connected to the auxiliary battery. One is removable, so I can disconnect it and charge the battery directly with another battery charger if I need to, or simply install a longer wire and run 12V to the bed of the truck for camping. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz8ukBn8fIfJzqpnThAvBNBQXU8WW00PR5Uit3ITw-tSPLLFMhKKi4bCllSBydZw8iHtyZwjQH84v8AC_DrWk9ZHr5IlGMOPqyxYHjNTMI0tSTvbzl5VfmekefenKPlebVOkpq8ESiPjwt/s2048/IMG_20201029_124403.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz8ukBn8fIfJzqpnThAvBNBQXU8WW00PR5Uit3ITw-tSPLLFMhKKi4bCllSBydZw8iHtyZwjQH84v8AC_DrWk9ZHr5IlGMOPqyxYHjNTMI0tSTvbzl5VfmekefenKPlebVOkpq8ESiPjwt/s320/IMG_20201029_124403.jpg" width="320" /></a></div><br /><p>The finishing touch was to build a shelf into the center console so I can still use it to store normal things. Even with the battery taking up 75% of the space, there's still plenty of room for my hitch and some other miscellaneous stuff. This area is just way too big to be practical otherwise, I think. </p><p>I also don't currently have the solar panel wiring installed, but I plan to add a roof rack to the truck so I can carry surfboards and still camp in the bed, and I will likely bolt the solar panel to the roof rack so it's always ready to go. All that will take is some light work with a screwdriver though. For now, it works just fine charging only when the truck is running, and has enough energy to run this portable 12V fridge for around 16 hours without any extra energy inputs. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgasb1bgejNfjIxaC1m0n7KhDyGS9JG1kW0S2yInx_aGvhyphenhyphen6U1NLIhoqCkJ2KwWB5RkuzdNx4-cJYvjUUF17N_NF32LZoPNgHfwolu9zuAueEhz9sCh2ktq6T_KtijWbrwQ-i__soKaBLei/s2048/IMG_20201009_131627.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgasb1bgejNfjIxaC1m0n7KhDyGS9JG1kW0S2yInx_aGvhyphenhyphen6U1NLIhoqCkJ2KwWB5RkuzdNx4-cJYvjUUF17N_NF32LZoPNgHfwolu9zuAueEhz9sCh2ktq6T_KtijWbrwQ-i__soKaBLei/s320/IMG_20201009_131627.jpg" width="320" /></a></div><p></p><p>Time to go camping!<br /></p>Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-63715398627190012162015-09-18T20:49:00.001-07:002015-09-18T20:52:48.771-07:00Batteries!Everyone needs a project that gets them started with a new technology, but I'm a little late to the party on this one. It seems like everyone is throwing lithium batteries in their projects, but I've never really gotten around to playing with one. They have really finicky charging requirements, which can result in fire or explosion if they're not met. But the power density in them is great, and assuming the charging is going well, they last for a really long time. Anyway! I found this rechargeable flashlight laying around the house, but the battery wouldn't hold a charge for longer than a minute. Time to replace the battery!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRxBHf6D3CNK-sllDycPCwX3KcfhH9D1wTP1pAVEv79agFS7es-8ClN_d-L4GcB3Q-fKeXmgryoHDfOKObPXUancuF61etYcRAiGTrOWNYi6ltNgJ_GedMU5wjwMbQ2LGMAObPGG2hTfBL/s1600/IMG_20150914_200403.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRxBHf6D3CNK-sllDycPCwX3KcfhH9D1wTP1pAVEv79agFS7es-8ClN_d-L4GcB3Q-fKeXmgryoHDfOKObPXUancuF61etYcRAiGTrOWNYi6ltNgJ_GedMU5wjwMbQ2LGMAObPGG2hTfBL/s320/IMG_20150914_200403.jpg" width="320" /></a></div>
<br />
<div style="text-align: center;">
<br /></div>
After getting the case apart, I found this little guy in this great big enclosure:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzPJ44iNpqXWVFwIHpUqlrxSHPlwCz1wXanVmZk-DiCMGWxtG0j5mNVAbzWfjN4vMxu4omjWsXTiQKHKpg2BeuzaJ1RFl-TKuejfC9g4OBbq_fCHkALtQjxnVqJZMcbpCtYDOpNbE5Mlxn/s1600/IMG_20150914_191207.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzPJ44iNpqXWVFwIHpUqlrxSHPlwCz1wXanVmZk-DiCMGWxtG0j5mNVAbzWfjN4vMxu4omjWsXTiQKHKpg2BeuzaJ1RFl-TKuejfC9g4OBbq_fCHkALtQjxnVqJZMcbpCtYDOpNbE5Mlxn/s320/IMG_20150914_191207.jpg" width="181" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQghOqtyvhsOCMssqPJ8H6P1_JP4h_J9F2QUSGF_aQZT-SRjwaf3oMRy6u84_n_r7YPLGBxTSiSMfjsdK2mpNrzqxi8_08YNe9h6euSLV1gpXIRo9vLFAW4-fDPEDzGtaG0uBaywlHp6Tv/s1600/IMG_20150914_191213.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQghOqtyvhsOCMssqPJ8H6P1_JP4h_J9F2QUSGF_aQZT-SRjwaf3oMRy6u84_n_r7YPLGBxTSiSMfjsdK2mpNrzqxi8_08YNe9h6euSLV1gpXIRo9vLFAW4-fDPEDzGtaG0uBaywlHp6Tv/s320/IMG_20150914_191213.jpg" width="181" /></a></div>
<br />
It's a lithium ion battery, which I haven't ever worked with. But hey, how hard could it be? For this project I'll be soldering directly to some new batteries, and lithium batteries can get a little unstable so I took the necessary precautions.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga9AI7sEHk-2UuJBBxhXGx3T68DdqBYhJSFRAEzju0BBAZXYny9XL3QtnEJZlk2UrBbmzyN85ZvvpcAFMkQlCDBUcYfUxCQR6kr3r3YW6TUC_7Yk86fE8L2qUqGCfEnd0v0qN2RtaHBwwT/s1600/IMG_20150914_191227.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga9AI7sEHk-2UuJBBxhXGx3T68DdqBYhJSFRAEzju0BBAZXYny9XL3QtnEJZlk2UrBbmzyN85ZvvpcAFMkQlCDBUcYfUxCQR6kr3r3YW6TUC_7Yk86fE8L2qUqGCfEnd0v0qN2RtaHBwwT/s320/IMG_20150914_191227.jpg" width="181" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie0DV0CG2BG_ngOI27C2ME1mPsc5ysyL-WcAvSeEQMOfvaHvYBs5cNa3Ph7UJrHil9Vl29nDO7OWrFnI1hIUTh2DcDM1DJIT57BZAPvRf4PZyn1uqrwO31g_c8hlEJtSG74w429RumHr_g/s1600/IMG_20150914_191233.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie0DV0CG2BG_ngOI27C2ME1mPsc5ysyL-WcAvSeEQMOfvaHvYBs5cNa3Ph7UJrHil9Vl29nDO7OWrFnI1hIUTh2DcDM1DJIT57BZAPvRf4PZyn1uqrwO31g_c8hlEJtSG74w429RumHr_g/s320/IMG_20150914_191233.jpg" width="181" /></a></div>
<br />
It's great for use on electrical fires! Any way, the old battery was only 2200 mAh, which I decided (relatively arbitrarily) was too small. So I found some (slightly larger) 3500 mAh batteries on Amazon.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQAYlEZnjZR4GrNv22Nlglu832hYIIO7nzZjj4OG_BBl-j-oEekMCzV9r-G_Y-XQ0xfKmGMxbC4mE_g9QqwDVZB_Kx4rcgwkFaWBIzvR1mkxsJSmJCXD95_fzOfUFa_8sdVmCZb3sSznHO/s1600/IMG_20150914_191603.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQAYlEZnjZR4GrNv22Nlglu832hYIIO7nzZjj4OG_BBl-j-oEekMCzV9r-G_Y-XQ0xfKmGMxbC4mE_g9QqwDVZB_Kx4rcgwkFaWBIzvR1mkxsJSmJCXD95_fzOfUFa_8sdVmCZb3sSznHO/s320/IMG_20150914_191603.jpg" width="181" /></a></div>
<br />
I had to solder leads directly to each terminal of the batteries. This is no joke, as overheating a lithium battery can result in fire and/or explosion. I used some tape rolls to keep the batteries upright for this delicate procedure.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZPpYhYLz-k_A5AKG0z1jFgUdnSUihMCQANXjDpdyM6_b6W6hrkk0zG9Db5WeGaGskPGMXpyETqEz2e6dVjkz0LyBYtW69h2zLPThe_HgxxDRmr642Qj0Cc13-VeCTIwdUzwAPns1fCkKz/s1600/IMG_20150914_192216.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZPpYhYLz-k_A5AKG0z1jFgUdnSUihMCQANXjDpdyM6_b6W6hrkk0zG9Db5WeGaGskPGMXpyETqEz2e6dVjkz0LyBYtW69h2zLPThe_HgxxDRmr642Qj0Cc13-VeCTIwdUzwAPns1fCkKz/s320/IMG_20150914_192216.jpg" width="320" /></a></div>
<br />
Basically, I heated up a bunch of solder on the iron and let it drip onto the battery terminal. I sanded down the terminals so they were roughed up, and surprisingly this procedure worked without heating the cells and damaging them. With all the wires on the batteries taped down so they don't get loose, I tied them in to the flashlight and its internal charging circuit.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZRwo1elb-KoTpff3jxTVBZ-piwUPlqLWoIkgw9RSgfC1xHluSdZ8IMzQ7A9h-16y_bGzGjbvRFY_tNZwOgxBgG7H07Bdy7Pf9jGsldmAlLIMRl2V0BbQlDZWn1Fnu-8HiOUkI1tMOey4g/s1600/IMG_20150914_195047.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZRwo1elb-KoTpff3jxTVBZ-piwUPlqLWoIkgw9RSgfC1xHluSdZ8IMzQ7A9h-16y_bGzGjbvRFY_tNZwOgxBgG7H07Bdy7Pf9jGsldmAlLIMRl2V0BbQlDZWn1Fnu-8HiOUkI1tMOey4g/s320/IMG_20150914_195047.jpg" width="181" /></a></div>
<br />
Oh, did I mention that the package from Amazon had two batteries in it? Might as well use both and get that weak, sad 2200 mAh up to 7200 mAh. I haven't tested the charging circuit on the increased capacity yet, but I assume it will work OK. If not, it'll be on my concrete patio for the first few charging cycles. Just in case.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFqMjieiso03Ng2WxoKAVYAfvjt_YR-mN_81wUNZ46X8ysYytdnWAbJ9jyxYNp4oLQRlMu86KNAP7HLZ39-TjyWn4fsCfCVKeKR4leQ2mTDhvLoSYXlcBRcM50wQK-fxoegeKsHDhR8IMf/s1600/IMG_20150914_195904.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFqMjieiso03Ng2WxoKAVYAfvjt_YR-mN_81wUNZ46X8ysYytdnWAbJ9jyxYNp4oLQRlMu86KNAP7HLZ39-TjyWn4fsCfCVKeKR4leQ2mTDhvLoSYXlcBRcM50wQK-fxoegeKsHDhR8IMf/s320/IMG_20150914_195904.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com1tag:blogger.com,1999:blog-9155430133739902547.post-8139596290339194032015-06-08T10:34:00.001-07:002015-06-08T12:49:47.113-07:00Bluetooth in a 60s-era Record PlayerMy grandparents recently moved out of a five-bedroom split-level house into a two-bedroom apartment in a retirement community. When they moved they asked me if I wanted any furniture out of their house for my own house, and I immediately responded yes, I wanted their record player.<br />
<br />
I know, you might be thinking "a record player isn't a piece of furniture" but wait! This one is:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIytwZ3VgUJOy0RlGvPnoejmwquzF0cKR6B7sMvA0HNq6DkRLLsdhEOvwEA6CXtJEGu8TGjmelPR-VWnpS3axn6lojIrJ8OR8HmlqBGvqEV8ovl2ku8LeyR-zsbbn9Cxpy6WypmVGsvBd/s1600/IMG_20140628_215646.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIytwZ3VgUJOy0RlGvPnoejmwquzF0cKR6B7sMvA0HNq6DkRLLsdhEOvwEA6CXtJEGu8TGjmelPR-VWnpS3axn6lojIrJ8OR8HmlqBGvqEV8ovl2ku8LeyR-zsbbn9Cxpy6WypmVGsvBd/s320/IMG_20140628_215646.jpg" width="320" /></a></div>
<br />
These were called "consoles" I think. They're huge, and they're made to look like a piece of furniture during a time when a TV was also a giant piece of furniture. Growing up, my family would take trips up to Virginia to visit my grandparents, and about the time I was in middle school I realized how awesome this piece of furniture was. I used to play music on it all the time (although my dad and his sisters had already taken their awesome records, so the records that remained were slim pickins).<br />
<br />
I picked it up in winter of 2013 right after I bought my first house, and it pretty much just sat around. I have a lot of records but I don't play them <i>that </i>often, so I started thinking I could get a little more utility out of it if I could modernize it a little bit. And wouldn't you know, I had a little Bluetooth receiver in my parts drawer just waiting to be used!<br />
<br />
First of all, I had to take the back cover apart to see what I'm working with. While the woodworking on this antique is flawless, the electrical could use some modernizing as well, so in addition to adding Bluetooth I also decided to re-wire the speakers.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOvIXJRVqYi0ibpkCvJnKORbyJe1dY6eK9QnAljqL3Ih2ZF67SCBohuIaSN_QzDVWAA4NkKSfxIfeumyCMshnsdgGgGpMUAAq32kBk7xrlVv1-Ulb4JwSn06DeHUybfr7FtJVHpagGmzmk/s1600/IMG_20150125_153416.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOvIXJRVqYi0ibpkCvJnKORbyJe1dY6eK9QnAljqL3Ih2ZF67SCBohuIaSN_QzDVWAA4NkKSfxIfeumyCMshnsdgGgGpMUAAq32kBk7xrlVv1-Ulb4JwSn06DeHUybfr7FtJVHpagGmzmk/s320/IMG_20150125_153416.jpg" width="181" /></a></div>
<br />
This block, I found out, was a set of filters. The cabinet has four speakers, two for each side of the stereo. One of those two plays higher frequency sounds (the "horn") and the other one plays low frequency sounds (the "woofer"). The speakers were still in good shape (surprisingly, for being about 50 years old) so I just replaced the old 18-gauge loose wire with new 12-gauge balanced speaker wire<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiAlgpzTPjp1j8GreB2uRAkuPkIAA0X78MkCC0lWLRyZOFPEoBwfMMETOGrxciZiufhyphenhyphenXmUMrzv2P-LcRXrqGPr7SM8fuO2GwIFoMBrMJyKn4okOdMfZ74_pqyDTAXg0yFkh7Tl2Z3FcFz/s1600/IMG_20150125_190216.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiAlgpzTPjp1j8GreB2uRAkuPkIAA0X78MkCC0lWLRyZOFPEoBwfMMETOGrxciZiufhyphenhyphenXmUMrzv2P-LcRXrqGPr7SM8fuO2GwIFoMBrMJyKn4okOdMfZ74_pqyDTAXg0yFkh7Tl2Z3FcFz/s320/IMG_20150125_190216.jpg" width="320" /></a></div>
<br />
Above is some of the old wiring, but it shows the woofer on the left and the horn in the middle.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWLV91TyBzLdkonFqP-sOMX0qpc5rXwrodDFMw2fih7PcrFVMYA-qpFGa9sNdcpeSGotLsp07YvmHVgZ9j2Uqw6y8n49Kn3dWYuclOOaZJtHDonsRzb7_sR0hv_my6EBP2lXOnc4AUbPas/s1600/IMG_20150125_190225.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWLV91TyBzLdkonFqP-sOMX0qpc5rXwrodDFMw2fih7PcrFVMYA-qpFGa9sNdcpeSGotLsp07YvmHVgZ9j2Uqw6y8n49Kn3dWYuclOOaZJtHDonsRzb7_sR0hv_my6EBP2lXOnc4AUbPas/s320/IMG_20150125_190225.jpg" width="320" /></a></div>
<br />
This block was bolted to the underside of the electronics for the radio. I should also note here that I use the term "electronics" very loosely, since this was the 60s it still wasn't common to use integrated circuits or transistors for most things, so the radio is full of tubes and is very heavy, and the record player is largely controlled mechanically. This is even more of a feat, as the record player is automatic. I'm spoiled by having access to programmable, cheap microcontrollers and therefore am flabbergasted how they could do all of this without the tools that I have.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioC2dLP8TN4jovmf_JHOi9sGo1PSxAMAWSZT0zk2DEJMC96NXdgOpeN-Xm20JolYhQYEyH0isuUwIXpGRjnwH60i4OXLi-b8fn5E9OGzk0FNRTAovSAjhH7p8tF9nKKAw3wMn-hnf6pbyd/s1600/IMG_20150125_223653.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioC2dLP8TN4jovmf_JHOi9sGo1PSxAMAWSZT0zk2DEJMC96NXdgOpeN-Xm20JolYhQYEyH0isuUwIXpGRjnwH60i4OXLi-b8fn5E9OGzk0FNRTAovSAjhH7p8tF9nKKAw3wMn-hnf6pbyd/s320/IMG_20150125_223653.jpg" width="320" /></a></div>
<br />
After rewiring everything, I decided that it would be a good idea to add a second amplifier (from a car) and switch the speakers into the new amplifier with a set of relays. This is much easier than trying to figure out where the audio pathways on this antique record player are, and trying to impedance-match all of today's modern audio electronics to it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQblh6hSVdc33jx2wtfWLEewFfdFAC8uKoO_H0qEZu3TQW4DgFQz2gUhjk0gdZfc1fVG9Y-VEF2i080Ma39wHtzuy_NkI7maGr5pf7vz_Bk3e5vUj-gTguo9qQyXIdvilzoZEmJOSDdgtY/s1600/IMG_20150128_201523.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQblh6hSVdc33jx2wtfWLEewFfdFAC8uKoO_H0qEZu3TQW4DgFQz2gUhjk0gdZfc1fVG9Y-VEF2i080Ma39wHtzuy_NkI7maGr5pf7vz_Bk3e5vUj-gTguo9qQyXIdvilzoZEmJOSDdgtY/s320/IMG_20150128_201523.jpg" width="320" /></a></div>
<br />
I took this board out and cut a hole for the new amplifier, then mounted its mounting bracket. I also re-wired the switch above to turn the new amplifier on and switch the speakers over to it. When the switch is off, the record player and old radio are wired to the speakers, and when the switch is on the new amplifier is wired to the speakers. I did this via a set of double-pole single-throw relays, one for each side of the stereo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxuZadYk1rXbUzqY5vZvxYhTXl_h0xY-ZN6sGioXn7MkfuLNzZk7VAtnRqx53dQTQ-gwDm0z4pC5FTBornnPkS1OMt4Wq-NlB1kUdTEzZ2_3Tsxf-GrDZNJEsfQw_BjLYA3KGna9H6_fH_/s1600/IMG_20150129_211826.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxuZadYk1rXbUzqY5vZvxYhTXl_h0xY-ZN6sGioXn7MkfuLNzZk7VAtnRqx53dQTQ-gwDm0z4pC5FTBornnPkS1OMt4Wq-NlB1kUdTEzZ2_3Tsxf-GrDZNJEsfQw_BjLYA3KGna9H6_fH_/s320/IMG_20150129_211826.jpg" width="181" /></a></div>
<br />
New head unit/amplifier and switch installed on the left side of the cabinet. The switch originally was for selecting between internal and external speakers.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT0kBS9V3SijbV9EERjUnXJQpEKC-jEMmofjVUNLsOCpHWxBERtW68n0qAZGKxclxWSW0SJhMyFAcrZ0ctPNtI-ZjWLLm5-els_wJkjWVwycuklpOn5G3tGw2D8OkRdSYHP33s1GmxtAkz/s1600/IMG_20150129_213929.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT0kBS9V3SijbV9EERjUnXJQpEKC-jEMmofjVUNLsOCpHWxBERtW68n0qAZGKxclxWSW0SJhMyFAcrZ0ctPNtI-ZjWLLm5-els_wJkjWVwycuklpOn5G3tGw2D8OkRdSYHP33s1GmxtAkz/s320/IMG_20150129_213929.jpg" width="320" /></a></div>
<br />
At this point I could wire up the Bluetooth receiver. The new amplifier had a 1/8" stereo jack in the back that I plugged the receiver into. I installed a power strip inside the cabinet which powers the new amplifier and the Bluetooth receiver. The amplifier is plugged in using a 120V AC to 12V DC converter originally used for a printer, so it has an ampacity of around 5A, more than enough power for this old stereo. The Bluetooth receiver is powered by an old USB cell phone charger. The receiver also has a battery in it, but I just leave it on, plugged in, and charging all the time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQLwmdmPTs3zQBEhHyYlknUnauovbDMpx8iY_G6FGceAm5o0NNS5wTed_ixRnTARUVswkOMx0u8QPqSXUJF8VBEHt8BHhVKTCtOjHn7cpfStgEkXXG4JG1DAn11fn7lgrzUJRU3MiZOsM7/s1600/IMG_20150131_153319.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQLwmdmPTs3zQBEhHyYlknUnauovbDMpx8iY_G6FGceAm5o0NNS5wTed_ixRnTARUVswkOMx0u8QPqSXUJF8VBEHt8BHhVKTCtOjHn7cpfStgEkXXG4JG1DAn11fn7lgrzUJRU3MiZOsM7/s320/IMG_20150131_153319.jpg" width="320" /></a></div>
<div>
<br /></div>
I completed this project back in January and it's still going strong! As I anticipated, once I can easily hook up modern technology to it (my phone), I've been listening to music a lot more with it. It's become my primary stereo in my house now, and it has a great antique look to boot! Also, it has a front auxiliary jack in case you have an old MP3 player or something, and a CD player too! I've used all of these new features, but I'm also happy the record player still works as well!Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com6tag:blogger.com,1999:blog-9155430133739902547.post-5731850887932525262014-10-01T14:28:00.001-07:002014-10-01T14:28:30.089-07:00Sunrise Alarm ClockI usually get pretty aggravated when I get asked if I'm bored by someone who sees me yawn, especially at work. There's a major difference between being bored and being tired! To that end, I decided I'd make a sunrise alarm clock to help improve my sleeping habits. The idea here is that a gradual increase in light helps one's body wake up more naturally, instead of being jarred awake by an audio cue.<br />
<br />
The first step was to take an old Wal-Mart alarm clock I had lying around and cut all up into it! As Tim "The Tool Man" Taylor says, before there can be CONstruction there must be DEstruction. He was very wise.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyZKijzePF1VrWQaDMMpYvcs_M9t0k8qyxONmjNYoPbT3-TfvDDTC3dwtFg4oUwByQ5HvvNrSReqsjI37uO-jfUGTSM_BOrh7efVxwMG1Rv-SQwdSwZtHbcYfvUoWZSgU9k3DAk-_SuMHf/s1600/IMG_20140529_214414.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyZKijzePF1VrWQaDMMpYvcs_M9t0k8qyxONmjNYoPbT3-TfvDDTC3dwtFg4oUwByQ5HvvNrSReqsjI37uO-jfUGTSM_BOrh7efVxwMG1Rv-SQwdSwZtHbcYfvUoWZSgU9k3DAk-_SuMHf/s1600/IMG_20140529_214414.jpg" height="320" width="181" /></a></div>
<br />
There is clearly one pair of wires going to the speaker, so to keep from reinventing the wheel I used the alarm and timekeeping functionality of the clock and simply cut the speaker out of the circuit, and attached the speaker wires to some input pins on an ATtiny microcontroller. (The Arduino in the picture below is only being used to program the ATtiny.) I didn't want to program a whole clock from scratch if I didn't have to.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6K542g2tp9wErypS_ltjkYUUlniMTITGWBW2uOU2faQ5ePBpOVtRRTt8SRJ6R7ZuGtjaIOt3n9zu5pNPSdWHIYVAoYga6xyqaTnatxQUBKl9GzhAfuFxjO9GTxTPtzfn_gdn3G3UsZ-b-/s1600/IMG_20140608_193133.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6K542g2tp9wErypS_ltjkYUUlniMTITGWBW2uOU2faQ5ePBpOVtRRTt8SRJ6R7ZuGtjaIOt3n9zu5pNPSdWHIYVAoYga6xyqaTnatxQUBKl9GzhAfuFxjO9GTxTPtzfn_gdn3G3UsZ-b-/s1600/IMG_20140608_193133.jpg" height="181" width="320" /></a></div>
<br />
I really like this picture because it looks like that one scene in Contact when Ellie Arroway is about to drop through the extremely energetic center of the second machine:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij6KqJRCvtIQgbEwvt8sZjhFpiMi6ZfgLMWbA6tC5fQwCHOdD4Y7IXPKGw75FPSNKxwPWGMgKCdemghzLYciqnZtKRDC8Liq0SPKAxkTpDVXQey1tyZe_Ndi0KypKTWPNDB2dF9nxmaobc/s1600/ContactMachine.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij6KqJRCvtIQgbEwvt8sZjhFpiMi6ZfgLMWbA6tC5fQwCHOdD4Y7IXPKGw75FPSNKxwPWGMgKCdemghzLYciqnZtKRDC8Liq0SPKAxkTpDVXQey1tyZe_Ndi0KypKTWPNDB2dF9nxmaobc/s1600/ContactMachine.jpg" height="251" width="320" /></a></div>
<br />
Anyway! The theory seemed to work. When the buzzer sounds, the microcontroller in the clock would send a six volt square wave with a range of +12V to +6V. The ATtiny microcontroller I'm programming sees this signal instead and starts a PWM signal which drives an array of eight high-intensity LEDs. (The speaker is now disconnected.) The PWM increases a little less than half a percentage (1/256th to be exact) every eight seconds, which means that when the alarm starts, the LEDs gradually increase in brightness from off to full brightness over the course of about fifteen minutes. The time can be adjusted in the program if I find that this interval is too long or too short.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZCv7B7RwyXfehYKa_kqfaLnjThXPMYD4v36Zxm3ox0swD4gfrUtJ5J49NJzvypugq0rVFhDDONTn_KJ-W4DJPU1GqQXsVJ5gARlyyPj-vubYANZqrm_21FANVAE8IXxcAMkHkpGoy9lPo/s1600/IMG_20140609_201233.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZCv7B7RwyXfehYKa_kqfaLnjThXPMYD4v36Zxm3ox0swD4gfrUtJ5J49NJzvypugq0rVFhDDONTn_KJ-W4DJPU1GqQXsVJ5gARlyyPj-vubYANZqrm_21FANVAE8IXxcAMkHkpGoy9lPo/s1600/IMG_20140609_201233.jpg" height="181" width="320" /></a></div>
<br />
The clock had a 16VAC transformer in it, which I tapped off of (green wires) to get power for the ATtiny microcontroller. I built a full-wave bridge rectifier from scratch and regulated the output voltage down to +5VDC. The picture above is the rectifier part of the circuit before I soldered it all together. The red and black wires are from the speaker.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuZI6xSAhjNI8fuPSPs-TmO-aiLCu9HHpq6UAMm75yGT5vaIFH16RXJR45tc6SlCkqV3CyEuaoXZYj1KubWd9lhRZCcWf_ID0EN1vXllZq-W0XzQ5-C030rgv6XEsM4M_qpNkzZ17ZNyT1/s1600/IMG_20140609_211611.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuZI6xSAhjNI8fuPSPs-TmO-aiLCu9HHpq6UAMm75yGT5vaIFH16RXJR45tc6SlCkqV3CyEuaoXZYj1KubWd9lhRZCcWf_ID0EN1vXllZq-W0XzQ5-C030rgv6XEsM4M_qpNkzZ17ZNyT1/s1600/IMG_20140609_211611.jpg" height="181" width="320" /></a></div>
<br />
I used 8 LEDs. They draw a little over 100 mA when they're all on at full brightness. I wasn't sure if this extra current draw would overload the clock's transformer but so far everything seems to be OK.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP9GrrRNLmfZH0PF2NDhuj7HOHkX1DqAlZroVcbjdERFF2lE_sR8n-LanZEFtDU6ebTk0ZvqJiJNV8OMJCtwiljYOyob65aKTLsa5EbIycUWdkwfzOT1e2MBcqJ0hfEvhDKArvyEAGdNc9/s1600/IMG_20140609_220724.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP9GrrRNLmfZH0PF2NDhuj7HOHkX1DqAlZroVcbjdERFF2lE_sR8n-LanZEFtDU6ebTk0ZvqJiJNV8OMJCtwiljYOyob65aKTLsa5EbIycUWdkwfzOT1e2MBcqJ0hfEvhDKArvyEAGdNc9/s1600/IMG_20140609_220724.jpg" height="181" width="320" /></a></div>
<br />
I like the industrial look of exposed electrical components. My personal rule is anything over 40V is dangerous and anything under that is totally OK. (In my job I routinely work with 500 kV so this seems very reasonable!) Your mileage may vary however. Don't be an idiot. The picture above was taken with an extremely short shutter period, while the picture below I think more accurately represents how bright the LEDs are.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsMPCllvAj04rBaiTUHwHx2ltKNjjbutH_JpJPrB2Bw_MNT8pOePhkJKOPu43Okv5AVpXPHhRpsi1VOlhQqGGe7Zl3anl78zJBxIIFMYkcEBDE_A8x9SYb1t-LDaJ4VjoT_C9t9PcGtB-K/s1600/IMG_20140609_220736.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsMPCllvAj04rBaiTUHwHx2ltKNjjbutH_JpJPrB2Bw_MNT8pOePhkJKOPu43Okv5AVpXPHhRpsi1VOlhQqGGe7Zl3anl78zJBxIIFMYkcEBDE_A8x9SYb1t-LDaJ4VjoT_C9t9PcGtB-K/s1600/IMG_20140609_220736.jpg" height="181" width="320" /></a></div>
<br />
One problem I was having at first was that the LEDs would pulse very slightly. It seemed like they pulsed along with the square wave for the alarm which had about a 1 second duty cycle. It turned out that this was entirely coincidental, and they were pulsing because the rectifier I built didn't have a capacitor big enough to keep the voltage across the LEDs high enough. The LEDs would draw current, the voltage would drop, the LEDs would dim as a result, and then when the current dropped the voltage would increase again, and this cycle would repeat about every 1 second. Totally coincidence that this is how often the alarm would buzz, which had me pretty confused for a while. Once I realized they only pulsed when they got brighter (which means a higher current draw) I just threw a huge capacitor in the circuit, which is clearly visible in the picture. For the non-electrical engineers out there, it's that big cylinder on the top left. For the electrical engineers out there, this has the effect of increasing the <a href="http://en.wikipedia.org/wiki/RC_time_constant" target="_blank">RC time constant</a> of the circuit. Remember college? Fun times.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnbRLyQEXhO3QsNIgXoLVol1mi1w6L9E3lXDBgRnK1SFUMteRlaQVSK6zLnGlHmE3Ir7_qK-cp9MgxhDrMD2RVE3clXowrLTTP_T3e3sgYuunUJZxjLfpwY87ok4t4RNEZUamOPsqn-2rv/s1600/IMG_20140609_222135.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnbRLyQEXhO3QsNIgXoLVol1mi1w6L9E3lXDBgRnK1SFUMteRlaQVSK6zLnGlHmE3Ir7_qK-cp9MgxhDrMD2RVE3clXowrLTTP_T3e3sgYuunUJZxjLfpwY87ok4t4RNEZUamOPsqn-2rv/s1600/IMG_20140609_222135.jpg" height="320" width="181" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This thing is crazy bright although it doesn't do a good job of uniformly illuminating the whole room. Mostly it just blinds me when I go to hit the snooze button. But it does work and it has succesfully woken me every time I've used it. I did wire the LEDs on the board in such a way that I could easily cut into the power wire for them and splice in more lights, though, which I could theoretically put anywhere. That'll be a project for the future though. </div>
Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com3tag:blogger.com,1999:blog-9155430133739902547.post-13013127160527737342014-09-15T19:22:00.001-07:002014-09-15T19:22:40.210-07:00FAA LightA few weeks ago I got an FAA warning light to play around with. The light goes on top of tall poles or buildings to warn airplanes. As it happens I was looking for a red LED to go in my bathroom. The idea is that red won't confuse my brain into thinking it's daytime if it isn't. That's probably enough information, so here are some pictures! All I had to do was wire a three-prong plug to it so I could plug it into the wall. The only problem is that the FAA warning light is really, REALLY bright. For obvious reasons. Anyway!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBT-SSCTY4XIzO6EoabhgxXCJ9_1db8Y8staWlENn6FwOlF1P6h5ttIKzeM1pz5Lfnp5fNk2CW7RXatc75qjyrfkY3h4j2IHKK_bWhfZ5fK8XqJVLHAe-LzDSJ21ee1hpYKqoTsGGCSGQ_/s1600/IMG_20140609_173732.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBT-SSCTY4XIzO6EoabhgxXCJ9_1db8Y8staWlENn6FwOlF1P6h5ttIKzeM1pz5Lfnp5fNk2CW7RXatc75qjyrfkY3h4j2IHKK_bWhfZ5fK8XqJVLHAe-LzDSJ21ee1hpYKqoTsGGCSGQ_/s1600/IMG_20140609_173732.jpg" height="181" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZi03wlSlUQZDYDItPPad2CgGxxHBjV4OMa3kFRAKChzNG6EuGZPTEua8PpOPLdrgzzDmA8sa9ai78MT4RO3WtSnERJ7ZqjRX6WrCXlCbQLX76kFkALSHF3zN5A6tg7HpOm0hqj1ld5b5t/s1600/IMG_20140609_173726.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZi03wlSlUQZDYDItPPad2CgGxxHBjV4OMa3kFRAKChzNG6EuGZPTEua8PpOPLdrgzzDmA8sa9ai78MT4RO3WtSnERJ7ZqjRX6WrCXlCbQLX76kFkALSHF3zN5A6tg7HpOm0hqj1ld5b5t/s1600/IMG_20140609_173726.jpg" height="181" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM0bKPn9DP0S-GcC18u92B_errdWU1ughaKtZp6rxrqnEYHDYCih4bYEcAoduHxC-fLW0r5zYs7MPdEZMYhWRPmbHxAFJSVutzybAyfPWe_49vszSVpG7cR0VIiuS21KDeOOSdIhWRCwLj/s1600/IMG_20140609_173729.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM0bKPn9DP0S-GcC18u92B_errdWU1ughaKtZp6rxrqnEYHDYCih4bYEcAoduHxC-fLW0r5zYs7MPdEZMYhWRPmbHxAFJSVutzybAyfPWe_49vszSVpG7cR0VIiuS21KDeOOSdIhWRCwLj/s1600/IMG_20140609_173729.jpg" height="181" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7oLBPmp1wPrjObSaEsZG27enqZO2alt4tAXjh2nie6a8CbPAW1SmWOlmOEwfhgSp1fTpAU34yePpBFTsf9DW8o5uEpn2XtNw7tgB05VK4H-lQzkYkXSIt_IPY3p6OdSEc_2l8VWckd1n/s1600/IMG_20140609_173957.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7oLBPmp1wPrjObSaEsZG27enqZO2alt4tAXjh2nie6a8CbPAW1SmWOlmOEwfhgSp1fTpAU34yePpBFTsf9DW8o5uEpn2XtNw7tgB05VK4H-lQzkYkXSIt_IPY3p6OdSEc_2l8VWckd1n/s1600/IMG_20140609_173957.jpg" height="320" width="181" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiloOVaFujg_giJ-GEvJosaBYgKjn8uXE-3MDVxVAkJrXFNdp0-3ZfF2kzCVMLCiKFrw2OWn65PZPhooUsf8xm8aTjI-CelPjpnxaoLHEXtg_Q58MtMpTdCk1yaLs3GL_VqZ-LEpK3xny1o/s1600/IMG_20140609_174329.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiloOVaFujg_giJ-GEvJosaBYgKjn8uXE-3MDVxVAkJrXFNdp0-3ZfF2kzCVMLCiKFrw2OWn65PZPhooUsf8xm8aTjI-CelPjpnxaoLHEXtg_Q58MtMpTdCk1yaLs3GL_VqZ-LEpK3xny1o/s1600/IMG_20140609_174329.jpg" height="181" width="320" /></a></div>
<br />Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-55842703754531872742014-08-11T15:00:00.004-07:002014-08-11T15:02:34.588-07:00Pictures from the Beetle's Carburetor RebuildA lot has been going on lately. I sold a house, moved to the city, started a second job, and just started studying for the Professional Engineering exam. So putting pictures of the Beetle's carburetor (34 PICT-3) has kind of taken a back seat, so to speak. Anyway, here are some of the highlights!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaKXrLr7Xn2C6QipOatvHSHNvaBaHqQ-sYHxX5HudSqUmP5sd3E6w9vyjknraCxv35foviEbuVU0Nw-R6YM9xaCSSLEJMVkwEP4Jn1NzgnR0MxSYCbaHHuoGBTG22uFTV716Z_N1BSFdJk/s1600/IMG_20140417_182910.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaKXrLr7Xn2C6QipOatvHSHNvaBaHqQ-sYHxX5HudSqUmP5sd3E6w9vyjknraCxv35foviEbuVU0Nw-R6YM9xaCSSLEJMVkwEP4Jn1NzgnR0MxSYCbaHHuoGBTG22uFTV716Z_N1BSFdJk/s1600/IMG_20140417_182910.jpg" height="320" width="181" /></a></div>
<br />
The freshly-removed carburetor, before I removed any of the bits. It's a little dirty. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuSkAPxCaTKvy7smgnkyh_X4geyebo8WY_fmd8mDNGS7704B1zmvJJ961WgODN32RN8p5jPGJbbwdvgH2niFGlLSwwXrRjI5yrXeYjWYB6O9XK6na4LxNyQuzr2GzOGI96T6FI1xcVTIK/s1600/IMG_20140417_183048.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSuSkAPxCaTKvy7smgnkyh_X4geyebo8WY_fmd8mDNGS7704B1zmvJJ961WgODN32RN8p5jPGJbbwdvgH2niFGlLSwwXrRjI5yrXeYjWYB6O9XK6na4LxNyQuzr2GzOGI96T6FI1xcVTIK/s1600/IMG_20140417_183048.jpg" height="181" width="320" /></a></div>
<br />
I found out later that this solenoid is the "idle air cutoff". I don't really know what this means and I can't get anyone to tell me, but I found out later that the Beetle was stalling a lot when it would slow down, which was presumably caused by this little valve being loose. So after I screwed this in tightly it stopped stalling.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdqKEKO6fTL1PNS5a8Kmfc6EIwoExWuhIUq8XIKYzICwIqKKLDYYBoqF13mHFv6LwvVV2qIuJl9LoX6ckCJgcgi6eV6VQZwFB6roUA990WHlD7AGpJ5emgUPZNMUHNmx2conNsWos0qxao/s1600/IMG_20140417_183524.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdqKEKO6fTL1PNS5a8Kmfc6EIwoExWuhIUq8XIKYzICwIqKKLDYYBoqF13mHFv6LwvVV2qIuJl9LoX6ckCJgcgi6eV6VQZwFB6roUA990WHlD7AGpJ5emgUPZNMUHNmx2conNsWos0qxao/s1600/IMG_20140417_183524.jpg" height="320" width="181" /></a></div>
<br />
Automatic choke collar.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg97hGGKRTUMomZxL-JPiBEJr4RJmJLzByLsjLfvi24Uy9bKUt4OQtxbdkLhZaJQtPgF6iPHIqCINKg2OnY5iBKvqKbyJM1YIXnMTKTFLA0cowRsVkIgzu4n1C0L5fPNFwiNUL2c5o1FL-Q/s1600/IMG_20140417_183712.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg97hGGKRTUMomZxL-JPiBEJr4RJmJLzByLsjLfvi24Uy9bKUt4OQtxbdkLhZaJQtPgF6iPHIqCINKg2OnY5iBKvqKbyJM1YIXnMTKTFLA0cowRsVkIgzu4n1C0L5fPNFwiNUL2c5o1FL-Q/s1600/IMG_20140417_183712.jpg" height="320" width="181" /></a></div>
<br />
Removing the automatic choke. This had a little problem where it wasn't set properly. I had to turn the whole assembly clockwise after I reinstalled it to make sure it would actually choke the engine when it was cold.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh37FdSOApimw3rUhjOc-Pnxe71UUbZTKyZAqkBRoKRbqoRkirXuk2cTahlruT3ncRnmcoPt7s1sWjASSS1JrukO2EMbFS5ClshHdSpMmoc6b9Vh05PpOtls-wJSeEY9_MHlLBKRsiI8CIq/s1600/IMG_20140417_183819.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh37FdSOApimw3rUhjOc-Pnxe71UUbZTKyZAqkBRoKRbqoRkirXuk2cTahlruT3ncRnmcoPt7s1sWjASSS1JrukO2EMbFS5ClshHdSpMmoc6b9Vh05PpOtls-wJSeEY9_MHlLBKRsiI8CIq/s1600/IMG_20140417_183819.jpg" height="320" width="181" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVvuDTKtG09w_5CmvvdP_Stz3apHjHC6QGbUtctjD0RE4SAs1igXJ3gadfAkVkAuB6EJI1EqBXCjLYmX8erSAPFyzr6yun7oQwrut7OubxTe1PtLkegCH7DxLNVpyZSyA7txLTKHdR-ZN/s1600/IMG_20140417_184356.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhVvuDTKtG09w_5CmvvdP_Stz3apHjHC6QGbUtctjD0RE4SAs1igXJ3gadfAkVkAuB6EJI1EqBXCjLYmX8erSAPFyzr6yun7oQwrut7OubxTe1PtLkegCH7DxLNVpyZSyA7txLTKHdR-ZN/s1600/IMG_20140417_184356.jpg" height="320" width="181" /></a></div>
<br />
Automatic choke parts<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWu1scmlNCsLhQ7B18V79sKwHbMIZM2p2PL720NvgzbBga7nIVj2Tvpnh9nkT679td2jzDlVO-V0P0ONz9csGLPRlnsTCo_L8AcycYpbsLbmysMJFPkuWloJDget07eCRecKKaT3CltS5/s1600/IMG_20140417_184924.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzWu1scmlNCsLhQ7B18V79sKwHbMIZM2p2PL720NvgzbBga7nIVj2Tvpnh9nkT679td2jzDlVO-V0P0ONz9csGLPRlnsTCo_L8AcycYpbsLbmysMJFPkuWloJDget07eCRecKKaT3CltS5/s1600/IMG_20140417_184924.jpg" height="181" width="320" /></a></div>
<br />
Removing the top half<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc4g5DInx47t5spM-WZj_gsdXIvSms9TIOpzBT9mfef4uXRf6jDfTSpanSNhyphenhyphenfntayQx99Sn0haKiH0JhUZV3lEyqdQsp_2qNrCXGTOCO5rONZ5nRGYwZ8Qo0DzeGPPfatkmAHzYd1sCSj/s1600/IMG_20140417_185501.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc4g5DInx47t5spM-WZj_gsdXIvSms9TIOpzBT9mfef4uXRf6jDfTSpanSNhyphenhyphenfntayQx99Sn0haKiH0JhUZV3lEyqdQsp_2qNrCXGTOCO5rONZ5nRGYwZ8Qo0DzeGPPfatkmAHzYd1sCSj/s1600/IMG_20140417_185501.jpg" height="181" width="320" /></a></div>
<br />
I don't remember what this part is for.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxAcuVzyE8c1yY5dwh_oCEuoUGe1yhMwsPkhC1wYC8S-pPKIzUU1VYBqiEtLrB-rA3dqArYJk03AmlX3vVMXsd51hDV2BJCWWbRzwOD7upWKsrZWiIzSmtdyY746BBrSDJgN1zgVrL9-Gu/s1600/IMG_20140417_185648.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxAcuVzyE8c1yY5dwh_oCEuoUGe1yhMwsPkhC1wYC8S-pPKIzUU1VYBqiEtLrB-rA3dqArYJk03AmlX3vVMXsd51hDV2BJCWWbRzwOD7upWKsrZWiIzSmtdyY746BBrSDJgN1zgVrL9-Gu/s1600/IMG_20140417_185648.jpg" height="320" width="181" /></a></div>
<br />
Automatic choke housing.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzmeocZe7TE-1Tt6OTdFAUuZ9GGyMIJ7kS-TXIWm80PyIm0Gi3mWRa-KKxhJjMn9RZbzNCZflv4q8t7hyphenhyphenKiWjRHvkUgCL-z5-FJGok80L3mQVXVLKFETCzvp578NI9H8soW2RDk_iI3Zdo/s1600/IMG_20140417_190034.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzmeocZe7TE-1Tt6OTdFAUuZ9GGyMIJ7kS-TXIWm80PyIm0Gi3mWRa-KKxhJjMn9RZbzNCZflv4q8t7hyphenhyphenKiWjRHvkUgCL-z5-FJGok80L3mQVXVLKFETCzvp578NI9H8soW2RDk_iI3Zdo/s1600/IMG_20140417_190034.jpg" height="320" width="181" /></a></div>
<br />
Fuel inlet needle. (Controlled by the float)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh011fQifqSysaR4llSiAqwpmWIKYd9ppaJlsq-y6GEreyCwxiZmLUZVQSmIQd-HNvonzmjCqmHeEPvHi8XS48IBC9FfE1k0c6PNVt8oE5rfFno1AsjCyEkqTOWET8zkXdBL5FcILAz3nOL/s1600/IMG_20140417_190328.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh011fQifqSysaR4llSiAqwpmWIKYd9ppaJlsq-y6GEreyCwxiZmLUZVQSmIQd-HNvonzmjCqmHeEPvHi8XS48IBC9FfE1k0c6PNVt8oE5rfFno1AsjCyEkqTOWET8zkXdBL5FcILAz3nOL/s1600/IMG_20140417_190328.jpg" height="320" width="181" /></a></div>
<br />
Old float removed. I lost the pin when I put the new float in and ended up making a new one from a long screw. Then later on I found the pin right in the middle of my work bench. Murphy's Law of carburetor rebuilds.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAfpXKquJYwkE0Ka8ba13E8l4BnKPQe19PXGIoFeYaAPjWPVIV_N9mUlZU1eKqlmSazzUx4B7CB830Oy2kz1LALRJ3rLwruQULIK1pAmUCVxkgpTTxFY9bRZLMBmTLN88kVXW29aGopmBs/s1600/IMG_20140419_133436.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAfpXKquJYwkE0Ka8ba13E8l4BnKPQe19PXGIoFeYaAPjWPVIV_N9mUlZU1eKqlmSazzUx4B7CB830Oy2kz1LALRJ3rLwruQULIK1pAmUCVxkgpTTxFY9bRZLMBmTLN88kVXW29aGopmBs/s1600/IMG_20140419_133436.jpg" height="181" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgch84bZsjOimCm2ETk4s29Z0cKe-DD8_Ec8D83VnBAMdSPLKeMWBtK9jff1onXb1NTfax9bkBzJc3hAu1ayCdmy8jKuaILAT9xrF3Na1lxto2TD9E0eQLC7PE_sOSiRdCgt7pV-7x3U1FJ/s1600/IMG_20140419_133939.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgch84bZsjOimCm2ETk4s29Z0cKe-DD8_Ec8D83VnBAMdSPLKeMWBtK9jff1onXb1NTfax9bkBzJc3hAu1ayCdmy8jKuaILAT9xrF3Na1lxto2TD9E0eQLC7PE_sOSiRdCgt7pV-7x3U1FJ/s1600/IMG_20140419_133939.jpg" height="181" width="320" /></a></div>
<br />
Another valve I don't remember what it does off hand.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8KPF77timZZn50jfuDIiI-2UXjzgtp1l1TD8Jju9v_xOtWcLWRFVu7BO5gPQQTDqzmkmFggMlRWjLhD9e16y72cjq4tcyyTcmxYodh4VAw2Y3Lo1g44QLSRQ1t1mWxf1AhyU30cZe-ySR/s1600/IMG_20140419_134012.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8KPF77timZZn50jfuDIiI-2UXjzgtp1l1TD8Jju9v_xOtWcLWRFVu7BO5gPQQTDqzmkmFggMlRWjLhD9e16y72cjq4tcyyTcmxYodh4VAw2Y3Lo1g44QLSRQ1t1mWxf1AhyU30cZe-ySR/s1600/IMG_20140419_134012.jpg" height="181" width="320" /></a></div>
<br />
Replacement gaskets.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifeTthrGApforSxgwbhAEJu_2QFcZ6LS8J5lfuxh4pnovyk3Gap_Vj_ew726vajW50slz7WxfrLpFCvxqhVxZTGeU1K3bm8fVa7v0ZNdBjG8t1TctseJiOkpF3_lfEc2RBy117Qt0rwxVv/s1600/IMG_20140419_172137.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifeTthrGApforSxgwbhAEJu_2QFcZ6LS8J5lfuxh4pnovyk3Gap_Vj_ew726vajW50slz7WxfrLpFCvxqhVxZTGeU1K3bm8fVa7v0ZNdBjG8t1TctseJiOkpF3_lfEc2RBy117Qt0rwxVv/s1600/IMG_20140419_172137.jpg" height="181" width="320" /></a></div>
<br />
After I put it all back together it's pretty easy to see the color difference. The car ran amazingly after this, and even better once I figured out that that solenoid was making the car stall.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqruSyA6KHx6wPcn5Br61iWWNixYeb7B_XlccOutGvalr44nDc8978ws_0HV2vOoErUEuC9F_V0KLxrvEpam4oJVJe7bMcWlkz165Zx9DLQf4ihX_fe4GuhJuTAuMVC3pvKFa6KHrNt3KY/s1600/IMG_20140419_172144.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqruSyA6KHx6wPcn5Br61iWWNixYeb7B_XlccOutGvalr44nDc8978ws_0HV2vOoErUEuC9F_V0KLxrvEpam4oJVJe7bMcWlkz165Zx9DLQf4ihX_fe4GuhJuTAuMVC3pvKFa6KHrNt3KY/s1600/IMG_20140419_172144.jpg" height="181" width="320" /></a></div>
<span id="goog_1335064203"></span><span id="goog_1335064204"></span><br />
Don't worry, I put the air filter on after I flooded the engine and killed the battery. Learn by doing!Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-89044133730078189402014-05-22T15:57:00.002-07:002014-05-22T15:57:57.981-07:00The Beetle!So I haven't been doing a whole lot of electronics projects lately because a few months ago I decided my mechanical skills could use some work, and my latest project has tested my limits in that field! It's...<br />
<br />
A 1972 VOLKSWAGEN SUPER BEETLE! So exciting!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho0dTdmifPBPrK3yKq88OMB-GGIJzivP3VaCTSEf2_G_SdudwFw1lm31ZmFZw_tQmKAdSpSOg6MEXzCJrmX7x6WZDeM80PYnDzwusII_adHLl8E97Xx6lpRTgmwGMCYDNgeKQkVxP0bg0q/s1600/IMG_20140430_160634.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho0dTdmifPBPrK3yKq88OMB-GGIJzivP3VaCTSEf2_G_SdudwFw1lm31ZmFZw_tQmKAdSpSOg6MEXzCJrmX7x6WZDeM80PYnDzwusII_adHLl8E97Xx6lpRTgmwGMCYDNgeKQkVxP0bg0q/s1600/IMG_20140430_160634.jpg" height="180" width="320" /></a></div>
<br />
What makes it "super" is that the front suspension is a MacPherson strut assembly rather than the old style torsion bar/kingpin setup which basically just saves some space in the "<a href="http://www.getthefive.com/articles/the-eye-candy/defining-the-frunk-tesla-names-the-front-trunk-in/" target="_blank">frunk</a>" and makes replacing suspension parts a little harder, but improves ride quality and turning radius. Great!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNWB6Ltg6BefV5sKfkZUoyjs6ibSQJH7DYPWcLu1bHCoaniS_rD5gPP7p_qNMEKB3vyDYUVZCFnloa8-bCMNsJkGIQTRxS9mBbM5PFeaxyJrGzFxHfOxjpCjn611ZApuCP0fvyn_RlPe9/s1600/IMG_20140410_234816.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqNWB6Ltg6BefV5sKfkZUoyjs6ibSQJH7DYPWcLu1bHCoaniS_rD5gPP7p_qNMEKB3vyDYUVZCFnloa8-bCMNsJkGIQTRxS9mBbM5PFeaxyJrGzFxHfOxjpCjn611ZApuCP0fvyn_RlPe9/s1600/IMG_20140410_234816.jpg" height="275" width="320" /></a></div>
<br />
There are some minor problems, what with the car being 42 years old at the time of this writing, namely the four-ish oil leaks in the engine. The pushrod tubes, valve guide seals, valve cover gaskets, and some other things leak a minuscule amount of oil each that adds up to me having to put a half quart of oil in about every 200 miles.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbKEqSBCYV2SMBwnS21N8Qmj8xBjUCC3PG3Nb7-ZlG_FS0aAQSNXhcUafip6QPc1vR_5JKSFc7hQSzadbUZcUGvzn6xgFKrHFpru7Lx7thUMBMBa6Ig5EHVSuCTBH1ggnNBMbpsyeq4Utb/s1600/IMG_20140403_180328.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbKEqSBCYV2SMBwnS21N8Qmj8xBjUCC3PG3Nb7-ZlG_FS0aAQSNXhcUafip6QPc1vR_5JKSFc7hQSzadbUZcUGvzn6xgFKrHFpru7Lx7thUMBMBa6Ig5EHVSuCTBH1ggnNBMbpsyeq4Utb/s1600/IMG_20140403_180328.jpg" height="181" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDCQ7G_bYEhmrW5qqhfwzxE1-0EnEP_m9oJfH_J_sNhIPYzz7CHuWbWybrtRwxts8qdBq3ogdn0x75NuPWAiDUVsPcBc6WP2jrB6U-E8ZJ3rBR-OvHL2yUvjZKPdxqlfDohUNqCxaoAcm/s1600/IMG_20140403_180336.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDCQ7G_bYEhmrW5qqhfwzxE1-0EnEP_m9oJfH_J_sNhIPYzz7CHuWbWybrtRwxts8qdBq3ogdn0x75NuPWAiDUVsPcBc6WP2jrB6U-E8ZJ3rBR-OvHL2yUvjZKPdxqlfDohUNqCxaoAcm/s1600/IMG_20140403_180336.jpg" height="181" width="320" /></a></div>
<br />
This is ok though because from what I can tell the piston rings are still in good shape so it's a ways off from REALLY needing an engine rebuild.<br />
<br />
Also cool is that it was made in "West" Germany:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVUQ8NNrsp5iVx1c6IyRDXwQRDNMUQ6b2jrMwuDPeytdviFn3euKgKDofWz6TB1u7o5h_4lc5bdZfb5ptE41VLv1g2Ko3OTT4fzfugf344oQTOW5_geLBl_fyzsThXA8dC6lbnmYT5uWm5/s1600/IMG_20140412_224614.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVUQ8NNrsp5iVx1c6IyRDXwQRDNMUQ6b2jrMwuDPeytdviFn3euKgKDofWz6TB1u7o5h_4lc5bdZfb5ptE41VLv1g2Ko3OTT4fzfugf344oQTOW5_geLBl_fyzsThXA8dC6lbnmYT5uWm5/s1600/IMG_20140412_224614.jpg" height="320" width="181" /></a></div>
<br />
It has the <a href="http://en.wikipedia.org/wiki/Wolfsburg" target="_blank">Wolfsburg</a> crest on the steering wheel too, for further proof of its authentic German-ness:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmyICy0VgaV-NengzkdGGLVNxCoSoLsrhOw2LlG3M7sLAiixp48I7XoPpn00SzYORACzag0JaxOdf1_02R4-bMAfH4tjaPkD-16rXchjq_ETE38XXZRTVfzuZmM1NS4A0x1PpHF5bDGA5N/s1600/IMG_20140522_184517.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmyICy0VgaV-NengzkdGGLVNxCoSoLsrhOw2LlG3M7sLAiixp48I7XoPpn00SzYORACzag0JaxOdf1_02R4-bMAfH4tjaPkD-16rXchjq_ETE38XXZRTVfzuZmM1NS4A0x1PpHF5bDGA5N/s1600/IMG_20140522_184517.jpg" height="181" width="320" /></a></div>
<br />
Apparently the Nazis built Wolfsburg to start building Volkswagens. Another brief history of that car was that Ferdinand Porsche needed to build the Beetle really quickly for Hitler, and so based a lot of it on the Tatra, a car Hitler liked from Czechoslovakia. Well, Tatra sued Volkswagen over that and Porshe asks Hitler what to do, to which he replied basically "Don't worry, I'll take care of it." Then he invaded that country and shut down the Tatra plant. Tatra eventually won a lawsuit in 1968 but not before the Beetle became world famous!<br />
<br />
Also, my Beetle was made after Volkswagen acquired Audi, so it shares some of the same parts as Audis from that time:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuFROWWjN2j22EEl8_NRyQSWoDsaLwb5YvjxhUE8d7o7tfuMt6O79IkxFy9CocXVOd_h3UA3WN9wTxwzCxzdaFAVoaCHKG2FVWnA7OwkmgHHX8FEgUX_Vn68y3FN7iVQ5dU-S9Tv_4IRbL/s1600/IMG_20140415_185458.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuFROWWjN2j22EEl8_NRyQSWoDsaLwb5YvjxhUE8d7o7tfuMt6O79IkxFy9CocXVOd_h3UA3WN9wTxwzCxzdaFAVoaCHKG2FVWnA7OwkmgHHX8FEgUX_Vn68y3FN7iVQ5dU-S9Tv_4IRbL/s1600/IMG_20140415_185458.jpg" height="320" width="181" /></a></div>
<br />
All in all, this car is brilliant. It runs well but it needed to have the carburetor rebuilt (which I've done, that'll be the next post here). I've always wanted a Beetle but I was finally convinced to buy one because the ECU (computer) on my truck went bad and cost me a huge chunk of money to fix (plus the dealer had to program it), so I decided I needed a car that I could fix anything on. They're easily the simplest cars ever built. The air-cooled engine means no radiator, it's simple to remove from the engine from the car if I ever need to, plus there's no A/C or power steering or anything else to complicate things, and parts are everywhere. Plus it's just fun to drive and downright cool.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmcb0RqkCaQk4Qd5RAbZnCOmsfkVKN-XBqMx6V2A9UGLOu0OumlKka5mE6mW8xK994g2LBqOhPmSbZGTLSXPmxzUSTa8i3akWCz3xb3YgnzOVyIVfP64EebZdCPd83MaVgWdeWta3AuBGe/s1600/IMG_20140419_181219.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmcb0RqkCaQk4Qd5RAbZnCOmsfkVKN-XBqMx6V2A9UGLOu0OumlKka5mE6mW8xK994g2LBqOhPmSbZGTLSXPmxzUSTa8i3akWCz3xb3YgnzOVyIVfP64EebZdCPd83MaVgWdeWta3AuBGe/s1600/IMG_20140419_181219.jpg" height="181" width="320" /></a></div>
<br />
I was accidentally in a car show and might have been a little out of place though! <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXehx7h1b2lVp-kdB8evY4kXK78AZ-eWziFGfKcGvA-12m6qA_Fl995AkEI-m6q2jrIHvfG0jYbns49LCRtLsAH8BEepuRJM_CpDy7WiGjVx1rKgc2pEl-uZC7ZT-uHuOJvaG9K-_WgLkv/s1600/IMG_20140506_192901.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXehx7h1b2lVp-kdB8evY4kXK78AZ-eWziFGfKcGvA-12m6qA_Fl995AkEI-m6q2jrIHvfG0jYbns49LCRtLsAH8BEepuRJM_CpDy7WiGjVx1rKgc2pEl-uZC7ZT-uHuOJvaG9K-_WgLkv/s1600/IMG_20140506_192901.jpg" height="181" width="320" /></a></div>
<br />Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-64144093102906912392013-11-01T15:17:00.002-07:002013-11-01T15:19:33.406-07:00Before and After!<div class="separator" style="clear: both; text-align: left;">
After over three and a half years, I finally needed a new set of tires for my unstoppable beast of a pickup truck. My last set were 31" 10.50 BFG All-Terrains (thanks for the graduation present, Mom and Dad!) which did very well in the relatively dry mountainous South Carolina trails where I used to venture off-road. In South Florida, it's almost 100% mud, so I decided to go with a slightly different tire: </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU7_R8YRS4P5fk4BfFkciIEFURl3Jfaingz0H-SdxLjreJKLVe1gpJi5K7O_plT3EaE7h43NH-BAhvjj5gE7pxr6XW-RoOqLmM_SBc3msxrL-IGjwlftnMDm3yRJTlM1QPFpYDZsuAI2DI/s1600/Photo+Oct+31,+5+04+33+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU7_R8YRS4P5fk4BfFkciIEFURl3Jfaingz0H-SdxLjreJKLVe1gpJi5K7O_plT3EaE7h43NH-BAhvjj5gE7pxr6XW-RoOqLmM_SBc3msxrL-IGjwlftnMDm3yRJTlM1QPFpYDZsuAI2DI/s320/Photo+Oct+31,+5+04+33+PM.jpg" width="239" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
These are 32" 11.50 BFG Mud-Terrains. They are a much more aggressive tire which will hopefully help with Florida's flat swampiness. Since I have put a 3" lift on my truck since I got out of college, there was no problem fitting the new tires (except a piece of the front mud flaps had to be cut off, no big deal). </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
BEFORE:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtR8g9doBNgsPpvbyWPBAlesKsYkVv107XTvWTuXC_DxX7iRW1ec8DOI2U41SAViKIQ24Ebb4VGJa_EJqu8I9sDp1Pk6TLfBIcmGyLCjsTD53LBS5cyEcAv1A0STm9E81ihXIis5pglb4G/s1600/Photo+Oct+31,+4+54+07+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtR8g9doBNgsPpvbyWPBAlesKsYkVv107XTvWTuXC_DxX7iRW1ec8DOI2U41SAViKIQ24Ebb4VGJa_EJqu8I9sDp1Pk6TLfBIcmGyLCjsTD53LBS5cyEcAv1A0STm9E81ihXIis5pglb4G/s320/Photo+Oct+31,+4+54+07+PM.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
AFTER:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoXx_qa2k21YnI0DnLbLNLmyiTurh6dmBuWjJf-d14XlNb_2g7HTpPBaD5IiptqVvANSEfrabzRBlWsUIpqRXswGcWhnJ2kqvHE68PS-Ej0D4io2roLyAe1Bne0Xsgpmzad34o84GQZYny/s1600/Photo+Oct+31,+6+17+08+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoXx_qa2k21YnI0DnLbLNLmyiTurh6dmBuWjJf-d14XlNb_2g7HTpPBaD5IiptqVvANSEfrabzRBlWsUIpqRXswGcWhnJ2kqvHE68PS-Ej0D4io2roLyAe1Bne0Xsgpmzad34o84GQZYny/s320/Photo+Oct+31,+6+17+08+PM.jpg" width="320" /></a></div>
<br />
The only problem is that the rainy season (summer) is over and the dry season (winter everywhere else, but pretty much spring here) is starting, so all the mud holes are drying up. I'll have to give them a real test in May when it starts raining again!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdIpxahyP7UzvzgEGZcOO2jlgztKKLNhQM1iSXFSpCmKDekMXsR9JQbj9RbUZnvUyJ1_xZazATt14Fz-v5LyZiNolJRa9pp2T_06fQL82bZXVRP38T6nhRd2u8TRxQAeHJnk6EDjmdyBZS/s1600/Photo+Oct+31,+6+26+03+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdIpxahyP7UzvzgEGZcOO2jlgztKKLNhQM1iSXFSpCmKDekMXsR9JQbj9RbUZnvUyJ1_xZazATt14Fz-v5LyZiNolJRa9pp2T_06fQL82bZXVRP38T6nhRd2u8TRxQAeHJnk6EDjmdyBZS/s320/Photo+Oct+31,+6+26+03+PM.jpg" width="239" /></a></div>
<br />
PS: If anyone knows a decent body shop in South Florida somewhere that will paint my truck for a reasonable price, I think it might be about time for that.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com1tag:blogger.com,1999:blog-9155430133739902547.post-71835048309064611332013-10-27T07:26:00.001-07:002013-10-27T07:26:48.331-07:00TurntableI decided that it was about time to restore my old turntable. It's a Technics SL-D35 direct-drive turntable which I believe is a model from the late-70's or early-80's. I had to fiddle around with the motor control electronics because it was playing at a very inconsistent speed. Then I cleaned everything with electronics cleaner, lubed the motor shaft, and went to town with some Led Zeppelin. It's good to remember one's roots.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLov5o0stD0z6zSPBv6QGlgIN0vkO_eiWTFZtAluqhBj3oLIOWIMBrcoIgfYh4ZOw6rr4qa_SP40R3CBwx_kY0S74hfOJmCFOq7O8STMmg1Sqx4dM9f8qBYM-dZZaiUu3GXfW-CblAhyyb/s1600/Photo+Oct+27,+9+39+44+AM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLov5o0stD0z6zSPBv6QGlgIN0vkO_eiWTFZtAluqhBj3oLIOWIMBrcoIgfYh4ZOw6rr4qa_SP40R3CBwx_kY0S74hfOJmCFOq7O8STMmg1Sqx4dM9f8qBYM-dZZaiUu3GXfW-CblAhyyb/s320/Photo+Oct+27,+9+39+44+AM.jpg" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNEsC1mTD9TgY3UewOMjs0p76Uc-xlOLYKQsZlaLyZZBrvi-xHTAWsprqya-gpnaRWD1gLpgzKY1UiEl3J3HU3wkvmYAgndMpD9wJPH3Udh3Cyj3GiRlfw9FrzO9kYeiIfzlyKh0yMzkoN/s1600/Photo+Oct+27,+9+45+12+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNEsC1mTD9TgY3UewOMjs0p76Uc-xlOLYKQsZlaLyZZBrvi-xHTAWsprqya-gpnaRWD1gLpgzKY1UiEl3J3HU3wkvmYAgndMpD9wJPH3Udh3Cyj3GiRlfw9FrzO9kYeiIfzlyKh0yMzkoN/s320/Photo+Oct+27,+9+45+12+AM.png" width="213" /></a></div>
Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-54144551184008782702013-09-12T18:12:00.001-07:002013-09-12T18:12:12.963-07:00Entertainment Center ThermostatI use a china hutch from my grandmother's old house as my entertainment center. I never really liked displaying all of one's electronics and wires and stuff where everyone can see them, so this suits my needs quite nicely. HOWEVER! This particular piece of furniture doesn't have very good ventilation for all of my heat-producing electronics, and it has a tendency to get a bit toasty inside the cupboard unless I left a door open. I decided to fix that by putting some exhaust fans on the outside and hooking them up to an ATtiny45 microcontroller and a temperature sensor. Now, when the temperature inside the hutch rises beyond a certain level (around 95 degrees F) the fans are turned on so the Playstation 3 and Crown amplifier don't overheat in the modified entertainment center.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsX39WrGPM657FYYCH6A3KOswlPMLnhKYurZ-7V4f8kh1h34OlPfTpjyxkIQDcuqiAokPPeOTaA6MZ7uXaqg8BQysvWft9p5i4gd5QE-wmyyO7o6e9HVkhg03ET3gJjsOZSdV4vdB2oi01/s1600/Photo+Jul+21,+10+20+43+AM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsX39WrGPM657FYYCH6A3KOswlPMLnhKYurZ-7V4f8kh1h34OlPfTpjyxkIQDcuqiAokPPeOTaA6MZ7uXaqg8BQysvWft9p5i4gd5QE-wmyyO7o6e9HVkhg03ET3gJjsOZSdV4vdB2oi01/s320/Photo+Jul+21,+10+20+43+AM.jpg" width="320" /></a></div>
<br />
The first step was the prototyping! I had a HUGE problem here with what should have been a simple circuit. The output of the voltage sensor was supposed to be around 0.75V at room temperature, and it would increase linearly as the temperature increased. (I used a hair dryer to model temperature fluctuations.) I was not getting any sort of reliable data from the sensor whenever the microcontroller was attached to the power rails of the circuit, but I found out that this was due to a lack of "decoupling capacitors" that I had failed to place near the sensor and on the power rail. I'm not 100% sure how this solved my problem, but as an engineer I'm not bound by the need to find answers, but rather simply by a need to get whatever it is working.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyGXMKy7MHGHvar4cVvabB6TWzKVCYSqq18VWRCXTwLRDH9busSXHP6XyYrs5WdRQ0Do0ySfon7laRLBTM0WXjzjU-HqrZ1BeOlbwjaCgOBgzLVqz4QkGOtmVQmeU4qabSLcXVensUK26G/s1600/Photo+Jul+21,+11+56+32+AM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyGXMKy7MHGHvar4cVvabB6TWzKVCYSqq18VWRCXTwLRDH9busSXHP6XyYrs5WdRQ0Do0ySfon7laRLBTM0WXjzjU-HqrZ1BeOlbwjaCgOBgzLVqz4QkGOtmVQmeU4qabSLcXVensUK26G/s320/Photo+Jul+21,+11+56+32+AM.jpg" width="239" /></a></div>
<br />
Soldering everything together. The red/black wires sticking out of the top of the circuit go to the power supply, which I stole from an old cell phone charger. +5V from a SMPS saves me the time of building a power supply (trivial, but sometimes frustrating). The wires to the right are my dead-bug soldering of the temperature sensor and decoupling capacitor. These will be outside of the enclosure that the rest of the electronics will reside in:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTxGFMg5GALQ8ppQ-MqkUuOyz_P-b0VWxZUvTu11oiatZwb98_cmFYI5Mv37v8r4z2MDIGdN2-qAS6tdQTnVm4taJ2c8jNCIzW-Zl-y-jghHvV1Y7OT1RLzif_gkbLmqCFj5T9AsWf4Ot/s1600/Photo+Jul+21,+12+40+25+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTxGFMg5GALQ8ppQ-MqkUuOyz_P-b0VWxZUvTu11oiatZwb98_cmFYI5Mv37v8r4z2MDIGdN2-qAS6tdQTnVm4taJ2c8jNCIzW-Zl-y-jghHvV1Y7OT1RLzif_gkbLmqCFj5T9AsWf4Ot/s320/Photo+Jul+21,+12+40+25+PM.jpg" width="239" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj90rb5fc6fDuI_zA0xhE9p4_xM8Yv15sDQDGNhXeaalwjnbmyoBGJ4eGKjsrvERpzaCH4JP8fevXEJ_n9AB-cIWQ825sU7s6uUNVPHgyDR3Gfnf_PDMLTuhh-69LL_zeexBc_RmPrvJMEI/s1600/Photo+Jul+21,+12+51+56+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj90rb5fc6fDuI_zA0xhE9p4_xM8Yv15sDQDGNhXeaalwjnbmyoBGJ4eGKjsrvERpzaCH4JP8fevXEJ_n9AB-cIWQ825sU7s6uUNVPHgyDR3Gfnf_PDMLTuhh-69LL_zeexBc_RmPrvJMEI/s320/Photo+Jul+21,+12+51+56+PM.jpg" width="320" /></a></div>
<br />
I mounted the fans to the cardboard backing of the "entertainment center". The one on the bottom right blows in, and the one on the upper left blows out, for a nice circulating effect.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtJprxXItWALN4EVIJriy8mSKY6yD13xRtTNdJMZUn255Kv29wBVh1i6_LMzAdy7X8jrZunhLmSOCOA2SJq73XRB_MwEuNfxNhML5MsF50kQrxuHqjw6t_-42gUJDr2ANFgTc6EUItv_qR/s1600/Photo+Sep+12,+8+57+37+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtJprxXItWALN4EVIJriy8mSKY6yD13xRtTNdJMZUn255Kv29wBVh1i6_LMzAdy7X8jrZunhLmSOCOA2SJq73XRB_MwEuNfxNhML5MsF50kQrxuHqjw6t_-42gUJDr2ANFgTc6EUItv_qR/s320/Photo+Sep+12,+8+57+37+PM.jpg" width="320" /></a></div>
<span id="goog_301118733"></span><span id="goog_301118734"></span><br />
Everything put together! I was told that my color scheme is a little off, but at least it looks better now without the doors wide open any time I want to turn the TV on or listen to music.<br />
<br />
HERE'S THE CODE! I've had to make some changes to the temperature settings. At first the fans would kick on and off once every five to seven minutes, which I thought was too fast. Then I changed the settings and they wouldn't come on at all. I think I have it JUST RIGHT now.<br />
<br />
<span style="font-family: monospace;">/*</span><br />
<span style="font-family: monospace;">this program turns a switch on at approximately 90 degrees</span><br />
<span style="font-family: monospace;">it turns the switch off at approximately 85 degrees</span><br />
<span style="font-family: monospace;">it is designed to be used with a TMP36 temperature sensor</span><br />
<span style="font-family: monospace;">output signal on/off is ATtiny pin 5 (digital pin 0)</span><br />
<span style="font-family: monospace;">input signal from TMP36 is ATtiny pin 7 (analog pin 1)</span><br />
<span style="font-family: monospace;">*/</span><br />
<span style="font-family: monospace;"><br /></span>
<span style="font-family: monospace;">#include <avr/io.h></span><br />
<span style="font-family: monospace;">#include <util/delay.h></span><br />
<span style="font-family: monospace;">//setFlag keeps the program from continuously writing pins</span><br />
<span style="font-family: monospace;">//if it doesn't need to. this makes it one-shot and hopefully</span><br />
<span style="font-family: monospace;">//saves a few bits of energy</span><br />
<span style="font-family: monospace;">int setFlag = 0;</span><br />
<span style="font-family: monospace;"><br /></span>
<span style="font-family: monospace;">void setup() {</span><br />
<span style="font-family: monospace;"> //set pin modes</span><br />
<span style="font-family: monospace;"> pinMode(0, OUTPUT);</span><br />
<span style="font-family: monospace;"> pinMode(2, INPUT);</span><br />
<span style="font-family: monospace;"> //turn on the fans to make sure the program is working</span><br />
<span style="font-family: monospace;"> digitalWrite(0, HIGH);</span><br />
<span style="font-family: monospace;"> _delay_ms(2000);</span><br />
<span style="font-family: monospace;"> //then turn them off to allow the program to run</span><br />
<span style="font-family: monospace;"> digitalWrite(0, LOW);</span><br />
<span style="font-family: monospace;"> _delay_ms(500);</span><br />
<span style="font-family: monospace;">}</span><br />
<span style="font-family: monospace;"><br /></span>
<span style="font-family: monospace;">void loop() {</span><br />
<span style="font-family: monospace;"> //measure the voltage at pin 7:</span><br />
<span style="font-family: monospace;"> int sensorValue = analogRead(1);</span><br />
<span style="font-family: monospace;"> //calculate the voltage. at room temperature it should be around .760V</span><br />
<span style="font-family: monospace;"> float volts = sensorValue * (5.0 / 1024.0);</span><br />
<span style="font-family: monospace;"> //calculate the temperature in Celsius</span><br />
<span style="font-family: monospace;"> float degC = (100.0 * volts) - 50.0;</span><br />
<span style="font-family: monospace;"> //make a decision about whether or not to turn the fan on or off</span><br />
<span style="font-family: monospace;"> //the microcontroller effectively acts as a schmitt trigger</span><br />
<span style="font-family: monospace;"> if (degC > 32 && setFlag == 0) {</span><br />
<span style="font-family: monospace;"> digitalWrite(0, HIGH);</span><br />
<span style="font-family: monospace;"> setFlag = 1;</span><br />
<span style="font-family: monospace;"> }</span><br />
<span style="font-family: monospace;"> if (degC < 25.5 && setFlag == 1) {</span><br />
<span style="font-family: monospace;"> digitalWrite(0, LOW);</span><br />
<span style="font-family: monospace;"> setFlag = 0;</span><br />
<span style="font-family: monospace;"> }</span><br />
<span style="font-family: monospace;"> </span><br />
<span style="font-family: monospace;"> //only take a reading once every 10 seconds</span><br />
<span style="font-family: monospace;"> _delay_ms(10000);</span><br />
<span style="font-family: monospace;">}</span><br />
<div>
<br /></div>
Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com1tag:blogger.com,1999:blog-9155430133739902547.post-78280562637054054402013-09-03T17:53:00.000-07:002013-09-03T17:53:07.198-07:00Just for FunSo I decided I had had enough of practical, useful projects, and I built this:
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzj9h97JN8dV35Myhsl4EbL3y_SfyTkP4Er8NqX9c8y5W5G4SgqLmh7xUUhd73lPY6yDd0GHTTbkmPkbrkDXmjAYfCpoUUasJHZoIUiBG1x-3nD6sznPZcjL2NnlZ3knTzA3qX3rfj0GJC/s1600/Photo+Jul+17,+10+48+08+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzj9h97JN8dV35Myhsl4EbL3y_SfyTkP4Er8NqX9c8y5W5G4SgqLmh7xUUhd73lPY6yDd0GHTTbkmPkbrkDXmjAYfCpoUUasJHZoIUiBG1x-3nD6sznPZcjL2NnlZ3knTzA3qX3rfj0GJC/s320/Photo+Jul+17,+10+48+08+PM.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
The circuit is called a Slayer Exciter. It is a hand-wound air-core transformer (it took me about two hours to wind the transformer; the red cylinder in the picture is actually about 400 turns of 34-gauge magnet wire) capable of generating a high voltage and a very strong electric field capable of illuminating a fluorescent light bulb. There are lots of online how-tos floating around which go into great detail about this "poor man's Tesla coil" so I won't go into great detail here. Basically, it's a very simple oscillating circuit consisting of a transistor, two diodes, and some resistors that can turn a low voltage DC source into very high voltage AC. Here are some pictures! </div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
Some prototyping, just to make sure it all works: </div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDexkGrk1P448MOHYp6jbTTceV86CeR_SGD6G0TepgfJcfHQFlykbx6DQIxoyUMLzRWp_T59lGb8Q-EwbYt2a8zrHa0HKoP-r6wVqhi69hO3unXY5vsHn_hblTuEIJzG846yHkvZhGJR09/s1600/Photo+Jul+17,+10+46+27+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDexkGrk1P448MOHYp6jbTTceV86CeR_SGD6G0TepgfJcfHQFlykbx6DQIxoyUMLzRWp_T59lGb8Q-EwbYt2a8zrHa0HKoP-r6wVqhi69hO3unXY5vsHn_hblTuEIJzG846yHkvZhGJR09/s320/Photo+Jul+17,+10+46+27+PM.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Putting it all together on a piece of wood, as I am wont to do with electrical things:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZ2shvXDeZo7t937wKPji4SE0F4IkOw5ih3cwuwyEsokuXHG13uRBIwHq0Ch-Px3YcieCqGcaohe783A3V952fWb1OCEx7T3q0kIaKL6gSYUDBxaYHaOvQj1s0auYod7hXVjMytoqLtoK/s1600/Photo+Aug+12,+7+25+08+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZ2shvXDeZo7t937wKPji4SE0F4IkOw5ih3cwuwyEsokuXHG13uRBIwHq0Ch-Px3YcieCqGcaohe783A3V952fWb1OCEx7T3q0kIaKL6gSYUDBxaYHaOvQj1s0auYod7hXVjMytoqLtoK/s320/Photo+Aug+12,+7+25+08+PM.jpg" width="320" /></a></div>
<br />
And, on an unrelated note, perhaps the most random two things to be purchased at one time from Amazon. A 14-ounce tin of almond flour for gluten-free baking and a Lieutenant Commander Geordi Laforge action figure to make sure I have the nerdiest cubicle in the office:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFQu964rV3zWTJR8i99diH3DDylgqt9igk2yp-6YOybpbGJKBKKF43UOB1zB14X5nqvV8Lgyagzi7j5rfoRp2e18_sJgASScHr6UioIsf27yn_4hlsfgY8CesHIkH-ressamAT1h-mxLSY/s1600/Photo+Sep+03,+8+00+58+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFQu964rV3zWTJR8i99diH3DDylgqt9igk2yp-6YOybpbGJKBKKF43UOB1zB14X5nqvV8Lgyagzi7j5rfoRp2e18_sJgASScHr6UioIsf27yn_4hlsfgY8CesHIkH-ressamAT1h-mxLSY/s320/Photo+Sep+03,+8+00+58+PM.jpg" width="239" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
MY TRICORDER DETECTS NO WHEAT, CAPTAIN. IT'S A MYSTERY!</div>
Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-54853149003515937512013-08-18T14:46:00.001-07:002013-10-06T12:02:02.137-07:00Lamp Sunset TimerIt seems like I have a lot of posts devoted to lamps... anyway, my latest one involves programming a <a href="http://en.wikipedia.org/wiki/Raspberry_Pi" target="_blank">Raspberry Pi</a> to switch my living room lamp on approximately a half-hour before sunset. My previous design for switching my lamp involved using an old Pentium 3 that I have since replaced with a newer computer. The new computer doesn't have a parallel port, and isn't near the lamp any more, so I decided that the RPi's compact size suited itself to this project. Also, the old program turned the lamp on and off at the same time every day. This is problematic for two reasons: first, I could buy a simple timer to do this, and second, it required me to change the program's source code any time the lamp started turning on too late or early as the seasons changed.<br />
<br />
Another goal for this project was to familiarize myself with Python. I am fairly well-versed in C (don't ask me about pointers though), but Python seems to be a tool that more and more people are using. The script I wrote uses a python module called "pyephem" to calculate the sunset time at my location (south Florida) every 30 seconds. Then it subtracts 30 minutes from this time, and if the current time matches the calculated sunset time, it turns the lamp on.<br />
<br />
Another thing that I implemented in my Python script was random turn-off times. Importing a module called "random" allows me to call a function "random.randint". Giving it a range of values allows it to generate random numbers within this range when it is called. So "random.randint(0,59)" generates a random turn-off minute for my program, which turns the lamp off every night between 12:00 and 12:59. Hopefully this confuses anyone spying on my home!<br />
<br />
It started out on the floor just to get things rolling. I spliced into an old extension cable.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHAxY10Phhu6l2D8evVloHIbiYOBxX4un_OnzXya4TBDmyDYFJvsdYIXc_upoTQmHgiOOuD3svKLPl1hkJfsRYRP7N00ERG9YMOC6_4IhSr8JaNUZ3Ejs66UUqsJX8y9uBfgNVkrk-rqYE/s1600/Photo+Jun+05,+8+49+00+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHAxY10Phhu6l2D8evVloHIbiYOBxX4un_OnzXya4TBDmyDYFJvsdYIXc_upoTQmHgiOOuD3svKLPl1hkJfsRYRP7N00ERG9YMOC6_4IhSr8JaNUZ3Ejs66UUqsJX8y9uBfgNVkrk-rqYE/s320/Photo+Jun+05,+8+49+00+PM.jpg" width="239" /></a></div>
<br />
This wasn't a permanent solution, obviously. I opened the lamp up to get at the internal wiring to tap off of the 120. From there I used an old cell phone charger to get power for the Pi and also spliced the 120 into the relay. The relay is tied to the control electronics which get their signal to turn the relay on or off from the RPi.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCya9HNSMEujrYkaK_Inptbrfwu5xjnDOVS2L6xcE-HwT7eVtA5DA0ivtHNdj6FE5deSKV2m9akq8a0WYQT4DA7lWZEZp6JlzLlBwUPb6RNPGyA0q5qmMKTTcXqeAwjfV-FOBWXfIxed_j/s1600/Photo+Jun+16,+10+26+09+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCya9HNSMEujrYkaK_Inptbrfwu5xjnDOVS2L6xcE-HwT7eVtA5DA0ivtHNdj6FE5deSKV2m9akq8a0WYQT4DA7lWZEZp6JlzLlBwUPb6RNPGyA0q5qmMKTTcXqeAwjfV-FOBWXfIxed_j/s320/Photo+Jun+16,+10+26+09+PM.jpg" width="239" /></a></div>
<br />
Since everything's under the lamp's table, it's not noticeable at all! The one change I need to make is getting a wireless card for the RPi so it doesn't need an ethernet connection. Apparently the OS version that's on the Pi doesn't have very good wireless support, but I hear they fixed it in a more recent release.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkbuOdsTdA4snskAYlQWiFG9Pj4BMtaMb8PWVFCvZCP4IK6LWmHHxw8y89OcnORk8F5uqqH21q4IJ6vHOAv7K7v54SKd9DnYemA8dMFvt2kjwm5QLPB763DUQ6WA_DgIC1tI1xGvcoY8as/s1600/Photo+Jun+16,+10+38+57+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkbuOdsTdA4snskAYlQWiFG9Pj4BMtaMb8PWVFCvZCP4IK6LWmHHxw8y89OcnORk8F5uqqH21q4IJ6vHOAv7K7v54SKd9DnYemA8dMFvt2kjwm5QLPB763DUQ6WA_DgIC1tI1xGvcoY8as/s320/Photo+Jun+16,+10+38+57+PM.jpg" width="239" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
FYI, the other two cables have nothing to do with this project. Just ignore them!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Python script for this project:</div>
<code>
</code>
<br />
<div class="separator" style="clear: both; text-align: left;">
<code><br /></code></div>
<code>
</code>
<br />
<div class="p1">
<code># program calculates sunset each day and turns the lamp on 30 minutes before</code></div>
<code>
</code>
<br />
<div class="p1">
<code># then the program calculates a random minute to turn the lamp off within an hour after midnight.</code></div>
<code>
</code>
<br />
<div class="p2">
<code><br /></code></div>
<code>
</code>
<br />
<div class="p1">
<code># REMEMBER TO USE 24-HOUR TIME FORMAT</code></div>
<code>
</code>
<br />
<div class="p1">
<code># AND THAT PYEPHEM USES UTC/GMT AND NOT EST</code></div>
<code>
</code>
<div class="p2">
<code><br /></code></div>
<code>
<div class="p3">
import<span class="s1"> time</span></div>
<div class="p4">
<span class="s2">import</span> datetime</div>
<div class="p4">
<span class="s2">import</span> ephem</div>
<div class="p4">
<span class="s2">import</span> random</div>
<div class="p4">
<span class="s2">import</span> RPi.GPIO <span class="s2">as</span> GPIO </div>
<div class="p2">
<br /></div>
<div class="p4">
GPIO.setmode(GPIO.BOARD) </div>
<div class="p4">
GPIO.setup(<span class="s3">10</span>, GPIO.OUT) </div>
<div class="p2">
<br /></div>
<div class="p1">
# make sure "off_minutes" has a value</div>
<div class="p4">
off_minutes = <span class="s3">1</span></div>
<div class="p2">
<br /></div>
<div class="p3">
while<span class="s1"> </span><span class="s3">1</span><span class="s1">:</span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># figure out what time it is now</div>
<div class="p4">
<span class="Apple-tab-span"> </span>now = datetime.datetime.now()</div>
<div class="p4">
<span class="Apple-tab-span"> </span>now_hours = time.localtime(time.time())[<span class="s3">3</span>]</div>
<div class="p4">
<span class="Apple-tab-span"> </span>now_minutes = time.localtime(time.time())[<span class="s3">4</span>]</div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># provide the program with information about the current location:</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># HS = Hobe Sound</div>
<div class="p4">
<span class="Apple-tab-span"> </span>HS=ephem.Observer()</div>
<div class="p5">
<span class="s1"><span class="Apple-tab-span"> </span>HS.lat=</span>'27.0592'</div>
<div class="p5">
<span class="s1"><span class="Apple-tab-span"> </span>HS.lon=</span>'-80.1367'</div>
<div class="p4">
<span class="Apple-tab-span"> </span>HS.date = now</div>
<div class="p4">
<span class="Apple-tab-span"> </span>sun = ephem.Sun() </div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># figure out if it is daylight savings time or not:</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># isdst will be 1 if DST is currently enforced, 0 otherwise</div>
<div class="p4">
<span class="Apple-tab-span"> </span>isdst = time.localtime().tm_isdst</div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># figure out when sunset is:</div>
<div class="p4">
<span class="Apple-tab-span"> </span>sunset_hours = HS.next_setting(sun).tuple()[<span class="s3">3</span>]</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span>#sunset_hours will be in 24-hour GMT.</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span><span class="s2">if</span><span class="s1"> isdst == </span><span class="s3">1</span><span class="s1">: </span>#add 20 to the time for DST</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>sunset_hours = sunset_hours + <span class="s3">20</span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span><span class="s2">else</span><span class="s1">: </span>#add 19 to the time for EST</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>sunset_hours = sunset_hours + <span class="s3">19</span></div>
<div class="p4">
<span class="Apple-tab-span"> </span>sunset_minutes = HS.next_setting(sun).tuple()[<span class="s3">4</span>]</div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># subtract 30 minutes from the time since it gets dark before actual sunset</div>
<div class="p4">
<span class="Apple-tab-span"> </span>sunset_minutes = sunset_minutes - <span class="s3">30</span></div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="s2">if</span> sunset_minutes < <span class="s3">0</span>:</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>sunset_hours = sunset_hours - <span class="s3">1</span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>#sunset_mintues will be a negative number, so adding it to 60 will subtract it</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>sunset_minutes = <span class="s3">60</span> + sunset_minutes</div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># turn the light on if the hours and minutes match:</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="s2">if</span> now_hours == sunset_hours <span class="s2">and</span> now_minutes == sunset_minutes:</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>GPIO.output(<span class="s3">10</span>,True)</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>#also calculate a random time for the light to turn off</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>#this is in this "if" statement so it only calculates a random time once</div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>#every 24 hours. </div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>off_minutes = random.randint(<span class="s3">0</span>,<span class="s3">59</span>)</div>
<div class="p2">
<span class="Apple-tab-span"> </span></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># turn the light off at the randomly selected minute in the 00 (midnight-1:00 AM) hour</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="s2">if</span> now_hours == <span class="s3">0</span> <span class="s2">and</span> now_minutes == off_minutes:</div>
<div class="p4">
<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>GPIO.output(<span class="s3">10</span>,False)</div>
<div class="p2">
<br /></div>
<div class="p1">
<span class="s1"><span class="Apple-tab-span"> </span></span># run once every 30 seconds:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<br />
<div class="p4">
<span class="Apple-tab-span"> </span>time.sleep(<span class="s3">30</span>)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</code>
It also needs a script in /etc/init.d to tell the Pi to start this program at boot. <br />
<div>
<br />
<code></code></div>
<hr />
UPDATES!<br />
<br />
I added a Staples Easy Button to the lamp since there was no way to turn it off or on except by SSHing to the Pi, and then running the "off" and "on" python programs manually. I took the Easy Button apart and soldered some wires to the button. The button is powered by two AA batteries, which is about 3 volts. I thought this would be enough for the Raspberry Pi's 3.3V logic, so I hooked the button's output up to a PNP transistor's base to watch for button presses. When a button is pressed the wire connected to the transistor's base goes low (3.0 V to 0 V) and the transistor turns on. The collector pin on the transistor is connected to one of the Pi's input pins, and when it sees the button was pressed it toggles the lamp.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8UHt7xMGPdFHINYi928aHoMQTDbj9eSXmYYMTeuupgVfd0aDBbEyf_s0cQsydmaGlyZHIZBFSzmKCRB5PnMPQoKn-THf_dCiOPX7xJi9_ekPa1lL5wSSRa4WYSCPZrwuD8GiUj94k07d/s1600/Photo+Sep+22,+6+47+59+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv8UHt7xMGPdFHINYi928aHoMQTDbj9eSXmYYMTeuupgVfd0aDBbEyf_s0cQsydmaGlyZHIZBFSzmKCRB5PnMPQoKn-THf_dCiOPX7xJi9_ekPa1lL5wSSRa4WYSCPZrwuD8GiUj94k07d/s320/Photo+Sep+22,+6+47+59+PM.jpg" width="320" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJKhG2yk1TbW1FlTD09_sU6yK8px2VrMyAaP8CTDJQ83t6uJ9Wt1tmAabPx-Wao6VacPkKjWrtCjtKI1XvX3DCAooKJeeOmSn6A-yKMcOhrByCCBOQf7mmZWG-hk7IjHV-AWPkUC9oZugQ/s1600/Photo+Sep+27,+9+00+56+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJKhG2yk1TbW1FlTD09_sU6yK8px2VrMyAaP8CTDJQ83t6uJ9Wt1tmAabPx-Wao6VacPkKjWrtCjtKI1XvX3DCAooKJeeOmSn6A-yKMcOhrByCCBOQf7mmZWG-hk7IjHV-AWPkUC9oZugQ/s320/Photo+Sep+27,+9+00+56+PM.jpg" width="239" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I thought I was going to have to re-write my python sunset program to include watching for button presses. Fortunately I found that just running a second program using some of the same input/output pins as the sunset program doesn't interfere with its operation. </div>
<code>
</code>
<br />
<div class="separator" style="clear: both; text-align: left;">
<code><br /></code></div>
<code>
</code>
<br />
<div class="separator" style="clear: both;">
<code>import RPi.GPIO as GPIO</code></div>
<code>
</code>
<div class="separator" style="clear: both;">
<code>import time</code></div>
<code>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
GPIO.setwarnings(False)</div>
<div class="separator" style="clear: both;">
GPIO.setmode(GPIO.BOARD)</div>
<div class="separator" style="clear: both;">
GPIO.setup(11, GPIO.IN)</div>
<div class="separator" style="clear: both;">
GPIO.setup(10, GPIO.OUT)</div>
<div class="separator" style="clear: both;">
GPIO.setup(8, GPIO.IN)</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
#program reads pin 11 to see if the lamp is on</div>
<div class="separator" style="clear: both;">
#pin 11 is physically soldered to pin 10, the output pin</div>
<div class="separator" style="clear: both;">
#which checks if the lamp is physically on or off</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
while 1:</div>
<div class="separator" style="clear: both;">
if ( GPIO.input(8) == True and GPIO.input(11) == False ):</div>
<div class="separator" style="clear: both;">
GPIO.output(10,True)</div>
<div class="separator" style="clear: both;">
time.sleep(2)</div>
<div class="separator" style="clear: both;">
if ( GPIO.input(8) == True and GPIO.input(11) == True ):</div>
<div class="separator" style="clear: both;">
GPIO.output(10,False)</div>
<div class="separator" style="clear: both;">
time.sleep(2)</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
</div>
</code>Notice that I needed to physically bond pin 11 to pin 10. There's no way that I know of to monitor the state of an output pin like you can do by polling a microcontroller's registers. But there are plenty of input/output pins for me to waste one like this. The reason I needed to do this is because more than one program can change the state of the output pin, so the Easy Button program has to check to see if the lamp is on or off before deciding whether to turn it off or on.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-57458204306582140742013-01-13T13:27:00.003-08:002013-01-14T18:12:06.650-08:00Automatic Bathroom Fan SwitchingIt's been a long time since my last post, but I have a legitimate excuse! I bought a house and have been moving in and getting the place comfortable. Then the Christmas holiday came, and I had to move more stuff from my parents' house, then I bought a car so I'll have something to drive while I tear my truck apart. Maybe I'll have pictures of the house and the car in a later post. For now, I must document my first house-related project.<br />
<br />
What I wanted was a way to have the bathroom fans run for a set amount of time after I was done taking a shower in order to suck the humidity out and prevent mold from growing in the bathroom (a serious concern in South Florida, which is already a substantially humid area). My options were either turn the fan off when leaving the bathroom and risk high humidity levels, or leave the fan on and waste energy. I figure there was a solution for me out there.<br />
<br />
I decided I could program an ATtiny45 to do this job. My goal originally was for the microcontroller to measure how long I had the lights on, and turn the fan on and leave it on for an appreciable amount of time after I turned the light out. It took me a while to hammer out the program, but I learned all about Interrupt Service Routines and some of the registers while I was doing the coding.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtx8Ni6hI6SNyf-9ZjWIz6ZMDz0SVoa89J34oR_aGQrUqGNAMBJTlO54p13J7X3-F6vc0CHiVxv9e12TM24yjWs9iIjtT43TiYpThFHThKwfY6KoCBQIwfOARgpXiAzhpbNH1AUQJBw6H4/s1600/Photo+Jan+13,+12+39+22+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtx8Ni6hI6SNyf-9ZjWIz6ZMDz0SVoa89J34oR_aGQrUqGNAMBJTlO54p13J7X3-F6vc0CHiVxv9e12TM24yjWs9iIjtT43TiYpThFHThKwfY6KoCBQIwfOARgpXiAzhpbNH1AUQJBw6H4/s320/Photo+Jan+13,+12+39+22+PM.jpg" width="239" /></a></div>
<br />
I used an old cell phone charger to get 5V DC from the 120 AC in the gang box. Luckily the electricians who wired my house ran the neutral to the gang box as well, otherwise this project would have been shot. Without the neutral wire, this would have tripped the house-wide GFCI every time the light or the fan in the bathroom was switched on. That would have been inconvenient. Additionally, using the cell phone charger is great for power efficiency; when neither the light nor the fan is on, I do not have the tools sensitive enough to measure how much power it uses (meaning less than 5 mW are consumed when it is idling). When both are on, the whole thing uses only about 3.5 watts (but presumably saves me a lot of money over simply leaving the fan on).<br />
<br />
I used timer interrupts to crudely measure how long the light had been on, and a rising edge interrupt on one of the pins to toggle the fan (in case it was on, turn it off if you wanted, or vice versa). I decided on 90 seconds for the light to be on before the fan gets turned on (to allow for bathroom activities that are NOT showers) and an hour and a half of fan run time after the light turns off.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGGgX1paP9vc7a7aqr_GXX11DTkKq5yAKV4kLYkRsaX6wmaWn-CxlWVvRpJAqWdK8DslAWRoaFQi_Tj_rFVeX9hWuBLNo8oA41M-3_KLlwSwei-PFUQxYVk6HlIRqVln7IWkT7-ix59h0c/s1600/Photo+Jan+13,+12+50+30+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGGgX1paP9vc7a7aqr_GXX11DTkKq5yAKV4kLYkRsaX6wmaWn-CxlWVvRpJAqWdK8DslAWRoaFQi_Tj_rFVeX9hWuBLNo8oA41M-3_KLlwSwei-PFUQxYVk6HlIRqVln7IWkT7-ix59h0c/s320/Photo+Jan+13,+12+50+30+PM.jpg" width="320" /></a></div>
<br />
Trying to squeeze everything into the gang box without making too many modifications. I had to trim two of the wires down that lead to the fan, which hopefully won't be that hard to fix if I ever decide to sell the house and take this monstrosity with me.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgelkGqCv6o8ZpjnmCtux47E9fb3SYFmXS94nN_THpu0TRQg-25J8APrOdaaH_QpN2JuiMuKTSmOSxB6KJiN2ceSz7GjFP7wtmII0kevd6JuLt58GhJYQ4RikFo6CmpcLet7kZPzNQ3tFG5/s1600/Photo+Jan+13,+2+12+55+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgelkGqCv6o8ZpjnmCtux47E9fb3SYFmXS94nN_THpu0TRQg-25J8APrOdaaH_QpN2JuiMuKTSmOSxB6KJiN2ceSz7GjFP7wtmII0kevd6JuLt58GhJYQ4RikFo6CmpcLet7kZPzNQ3tFG5/s320/Photo+Jan+13,+2+12+55+PM.jpg" width="320" /></a></div>
<br />
<br />
Hooking up the switch for the light, which now no longer switches 120V AC. It now is only a logic switch for the microcontroller to tell the program to turn the relay on that is connected to the light. I wanted to use some of the original hardware though.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP1W2zoKuW8JinVuuzhFVOEk2YIurPgT-htgORY0A0hkCfldcdLXhzdh5uKjK-kLEJSU-N2ifgBqnifjkj1Y5rhQqvqUl-LB7Vo_ARMzlm9tDFJvZ3fzZzZX-OzGnc2NEj0FgRDGlcSivo/s1600/Photo+Jan+13,+2+18+01+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP1W2zoKuW8JinVuuzhFVOEk2YIurPgT-htgORY0A0hkCfldcdLXhzdh5uKjK-kLEJSU-N2ifgBqnifjkj1Y5rhQqvqUl-LB7Vo_ARMzlm9tDFJvZ3fzZzZX-OzGnc2NEj0FgRDGlcSivo/s320/Photo+Jan+13,+2+18+01+PM.jpg" width="320" /></a></div>
<br />
(Almost) finished. Those two wires will be attached to the toggle button for the fan. For now it works just fine without. I'm planning on using some bondo to modify another face plate to accept the new switch. The best part about this project is that now that I am done, I allowed myself to buy the parts from Digikey that I need to build something I've wanted to build for a long time. I had to finish this one first before starting on it though, and everyone knows how much I disapprove of programming. So I had to give myself some incentive. But hey!<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com2tag:blogger.com,1999:blog-9155430133739902547.post-64833970860197082382012-10-14T15:55:00.001-07:002012-10-28T08:49:23.857-07:00Listen to the Radio from ANYWHERESince I moved to South Florida I've noticed that there aren't any appropriate radio stations anywhere down here. They're all mindless Clear Channel-type Top 40 or country stations. Unacceptable. There weren't this many country stations when I lived in South Carolina or Tennessee. Anyway! I thought maybe I could build a radio that would get radio stations from far away, and it would let me listen to independently-owned and happily non-country stations <a href="http://1055thebridge.com/" target="_blank">105.5 The Bridge</a> from Charleston and <a href="http://lightning100.com/" target="_blank">Lightning 100</a> from Nashville.<br />
<br />
My idea was to interface a <a href="http://en.wikipedia.org/wiki/Parallel_port" target="_blank">parallel port</a> port in a computer to a set of buttons. Each button would launch Firefox which would then load the online stream of one of these stations. The computer controlling it would be headless and hidden, so the visible hardware would look and perform just like a regular radio. The only downside to this is that I can't get <a href="http://www.957theride.com/home.asp" target="_blank">95.7 The Ride</a> out of Charlotte with this build because they don't have an online stream anymore.<br />
<br />
At boot, the computer executes a script that starts a C program called "launcher". The C program is necessary to take control of the printer port, and therefore it must be run as root. To allow the computer to execute the script as root, I added the following line to the sudoer's file with the command "sudo visudo":<br />
<br />
<pre style="background-color: #eeeeee; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 0px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px 5px 5px 10px; vertical-align: baseline; width: auto; word-wrap: normal;">ALL ALL = (root) NOPASSWD: /home/bryan/programs/radio/launcher</pre>
<br />
The script is very simple:<br />
<br />
<pre style="background-color: #eeeeee; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 0px 5px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px 5px 5px 10px; vertical-align: baseline; width: auto; word-wrap: normal;"><span style="font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;"><span style="font-size: 14px; line-height: 18px;">#!/bin/bash
sudo /home/bryan/programs/radio/launcher</span></span></pre>
<br />
I also ran "chmod 755 startup.sh" on the script to make it executable. Next is the C program that will actually handle the parallel port and launch the browser when a button press is detected:<br />
<br />
<pre style="background-color: #eeeeee; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-width: 0px 0px 0px 5px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px 5px 5px 10px; vertical-align: baseline; width: auto; word-wrap: normal;"><span style="font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;"><span style="font-size: 14px; line-height: 18px;">#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/io.h>
#include <time.h>
#define base 0x378 // printer port base address
#define status 0x379 //printer port status register
//Define button push events. Status register default 0x78 = 0b01111000.
#define PUSH1 0x70 //0x70 = 0b01110000
#define PUSH2 0x68 //0x68 = 0b01101000
int A=1;
int lastA=0;
int B=1;
int lastB=0;
int regval=0;
int lastregval=1;
int main(int argc, char **argv) {
//make sure the program has access to the parallel port
if (ioperm(base,1,1))
fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);
if (ioperm(status,1,1))
fprintf(stderr, "Couldn't get the port at %x\n", status), exit(1);
//write 0b00000001 to the output lines to get +5V for the switches
outb(1, base);
while(1) { //run forever
//print status register if and only if it changes
/* regval=inb(status);
if(regval != lastregval) {
printf("%x\n",regval);
lastregval=regval;
} */
if (inb(status)==PUSH1 && A!=lastA) {
//enable other button pushes
B++;
// printf("button 1 pushed!\n");
//call script
system("/bin/bash /home/bryan/programs/radio/script1.sh");
//disable a second button 1 push event to debounce and to
//prevent closing of browser and opening the same page it was on
A=lastA;
}
if (inb(status)==PUSH2 && B!=lastB) {
//enable other button pushes
A++;
// printf("button 2 pushed!\n");
system("/bin/bash /home/bryan/programs/radio/script2.sh");
//disable a second button 2 push event to debounce and to
//prevent closing of browser and opening the same page it was on
B=lastB;
}
}
}</span></span></pre>
<br />
<br />
No problem. I complied it using "gcc -O launcher.c -o launcher". Compiling with these options is necessary for proper functionality of the parallel port.<br />
<br />
This program only handles two stations now but it could be expanded for more if 95.7 WXRC ever decided to have an online stream again. I believe the next step is to program this on my Raspberry Pi when it gets here, and install it in the radio that I have that has been the subject of <a href="http://builtsomething.blogspot.com/2011/05/everyone-remembers-my-5-radio-if-not.html" target="_blank">previous posts</a> on this blog. I think I could rewire the memory buttons on the radio to be inputs to the Pi and have the radio display "105.5" or "100.1" on its LCD. This has some potential! If anyone has some tips on how I can be a better programmer, I am open to those suggestions. I'm an engineer, not a computer scientist.<br />
<br />
<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="315" src="http://www.youtube.com/embed/Gdgrby_14XM" width="420"></iframe>
<div>
</div>
Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com1tag:blogger.com,1999:blog-9155430133739902547.post-26264193444077849332012-08-12T17:55:00.000-07:002012-09-09T14:31:00.049-07:00Halon AlarmI found this <a href="http://en.wikipedia.org/wiki/Gaseous_fire_suppression" target="_blank">halon</a> alarm in the garbage a long, long time ago and I finally have some time to goof off. Believe it or not, this relates to my ongoing solar panel build. To build a maximum power point tracking circuit will require the construction of a special switch mode power supply topology, and since I have never built even a simple <a href="http://en.wikipedia.org/wiki/Switched-mode_power_supply" target="_blank">switch mode power supply</a>, I figure I could get some experience with one before moving on to the complicated stuff.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWp92J7yFBLgpnE2QWyUiNSjGoK0tC-YG8UKGM0Yp5Agit3LfpB8owaVlXX-UTPD0Qs1ObnovHAsaw_E_u8o1pT_5P6SWlF7fbm9qmSJkIbTZ47BEVes3Q_rpvllcxCWGS6eoEDkbM3H7z/s1600/Photo+Aug+05,+10+33+05+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWp92J7yFBLgpnE2QWyUiNSjGoK0tC-YG8UKGM0Yp5Agit3LfpB8owaVlXX-UTPD0Qs1ObnovHAsaw_E_u8o1pT_5P6SWlF7fbm9qmSJkIbTZ47BEVes3Q_rpvllcxCWGS6eoEDkbM3H7z/s320/Photo+Aug+05,+10+33+05+PM.jpg" width="320" /></a></div>
<br />
The halon alarm consists of two modules, a bell and a strobe light. They are wired in parallel and accept a 24V DC power source. Since 24V systems are less common than 12V systems (and I may install this in a vehicle in the future) I attempted to build a 12V DC to 24V DC <a href="http://en.wikipedia.org/wiki/Boost_converter" target="_blank">boost converter</a>, with varying degrees of success.<br />
<br />
A brief explanation of boost converters: a transistor is used to rapidly switch power flowing through an inductor. The rapid switching action exploits an inductor's resistance to changes in current. When the current flow to an inductor is switched off, a voltage spike occurs as the inductor attempts to keep current flowing through it at the same rate. By charging a capacitor with this voltage spike, a DC voltage greater than the input voltage can be obtained. Before transistors (and before they became cost-effective to mass produce) DC-DC conversion was either expensive, impractical, unreliable, or some combination of those three. This is why the power grid is alternating current, as it is much easier to change the voltage levels using AC than with DC.<br />
<br />
The first step is actually the most difficult: creating a circuit that will switch the power transistor. For a power supply like this, the switching action must happen many thousands of times per second. PWM is often the best option for rapid transistor switching, so for this I used a 555 timer chip wired to produce a 28 kHz square wave. The output of the timer was attached to the gate of an IRF510 MOSFET. The rest of the power supply is comparatively easy to build.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTIxmhrjUb2wjhVjeNP1Zk6Fk9GIP3YitbNzg3fV-ZMdPvW4rhLzThgiFdR1yDHRxAjrAPi_FxT1NphxSO0OApcy7i_BI2yHRNKYlN2Q1FL1Q3d8UoQls81pw43rxoK-xqz7WZCGwjgCf/s1600/Photo+Aug+06,+6+25+42+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilTIxmhrjUb2wjhVjeNP1Zk6Fk9GIP3YitbNzg3fV-ZMdPvW4rhLzThgiFdR1yDHRxAjrAPi_FxT1NphxSO0OApcy7i_BI2yHRNKYlN2Q1FL1Q3d8UoQls81pw43rxoK-xqz7WZCGwjgCf/s320/Photo+Aug+06,+6+25+42+PM.jpg" width="239" /></a></div>
<br />
This is the point that I had some difficulties. Switch mode power supplies can be very particular. The duty cycle of the signal that switches the transistor must be precise, as this directly controls the output voltage. The other quirk with these circuits is that the output voltage tends to be dependent on the load that is connected to them. Without a load, the voltage (on this circuit anyway) tended to "run away", growing higher and higher until I realized something catastrophic was about to happen, at which point I turned it off. This contrasts to a linear voltage regulator, which (while it wastes about 70% of the input power) will have a relatively stable output voltage regardless of load.<br />
<br />
Another point I would like to make here is that this design does not include any feedback on the output voltage. I designed it for 12V input and 24V output but "really" what it does is double the input voltage. If I put 5V input it will output 10V, and (theoretically, although it would burn up first) a 100V input would produce a 200V output. The alarm is rated for 20-24VDC (and I'm assuming a little above that as well) so as long as the 12V source is fairly constant (a car battery, etc) then this shouldn't be a problem, and keeps the design simple.<br />
<br />
The other major difficulty is managing the power spikes inherent in the design. On computer power supplies, the electrical noise and harmonics that are produced are dramatic. Most are required to have special filters on them to prevent them from harming a power utility's power factor and voltage waveforms (compact fluorescent bulbs produce a similar amount of noise but are not required to have as strict of filtering, which causes problems). So anyway, it turns out that I melted through two ground wires because of this.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjSX20jahn5raPxn6ZS7YiIU3G2q4oK-6dnVeYK2smImv-Hv3eqhyphenhyphen-KX15vdbEf1LDgHcatQ7qmh_6B0xhDetgylOCBpCgDa6fbzawEGGHl6lOuz40U4rh2cj_8NrrwPEc_-9BZndP4sl_/s1600/Photo+Aug+06,+5+29+13+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjSX20jahn5raPxn6ZS7YiIU3G2q4oK-6dnVeYK2smImv-Hv3eqhyphenhyphen-KX15vdbEf1LDgHcatQ7qmh_6B0xhDetgylOCBpCgDa6fbzawEGGHl6lOuz40U4rh2cj_8NrrwPEc_-9BZndP4sl_/s320/Photo+Aug+06,+5+29+13+PM.jpg" width="320" /></a></div>
<br />
Notice the bubbles on the white wire. Whoops. The circuit draws 100 mA on average, but this doesn't necessarily account for the spikes that the inductor causes.<br />
<br />
Once I got everything straightened out I tested the alarm (very, very briefly) in my apartment with numerous cloths wrapped around the bell. I didn't want to remove the bell for fear that I would damage the striking mechanism. Once I was sure everything was in working order, I drove far away to test it more thoroughly.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/xYWQYXrGSUQ?feature=player_embedded' frameborder='0'></iframe></div>
<br />
If you look closely during and after the test, you will see that I melted through the orange ground wire. When I build this circuit in a permanent manner (not on the breadboard) I will be using much heavier gauge wire. I also plan on enclosing the circuit within the junction box that houses the strobe light.<br />
<br />
You will also notice that the strobe light is noticeably not strobing. I am currently working on repairing this. I'm not sure how successful I will be, but it would be nice if it worked too. Updates on that will follow.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihrUR_uBELoaEoYeYAKsgloySm_nKx8v8rbakV0-7TpaumAIfus2BRlWc_n3NlOhldB7B38VImCvE1OkHXYbAK9obX5qpbgNayRCpYiRpMFbkmprCnXrnSVwf0TVPo8p-YlvnKbQhNRIz9/s1600/Photo+Aug+12,+7+46+21+PM+(1).jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihrUR_uBELoaEoYeYAKsgloySm_nKx8v8rbakV0-7TpaumAIfus2BRlWc_n3NlOhldB7B38VImCvE1OkHXYbAK9obX5qpbgNayRCpYiRpMFbkmprCnXrnSVwf0TVPo8p-YlvnKbQhNRIz9/s320/Photo+Aug+12,+7+46+21+PM+(1).jpg" width="239" /></a></div>
<br />
<br />
MEANWHILE! I got around to repairing an old set of Pioneer headphones I commandeered from my dad when I was younger, in an effort to reduce the number of times either one of my parents accused me of listening to my CD player too loud while we were on car trips. The effort was largely in vain. But the headphones needed some TLC (and one of the ears wasn't working any way) so I finally took them all apart, soaked them in acetone to clean them up, rewired the malfunctioning speaker, and hot-glued the ear pads on (the plastic that was supposed to hold them on had broken off). Then I used some WD-40 to clean up the leftover residue from the duct tape that was holding them together. Viola! A brand new set of headphones that I can use with my piano to keep the neighbors happy.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY_DXSbF6C62mqLjNlCONuWTSSmd7w4GtOzXlJ6x-vMRBWxFAWXlDoUb6WU10R0gVqhyphenhyphenjoZKwYrPSFZf-U3vco5aWVkeElF5nvYDxYnBd_S9r-aZ20Ygvg2kVv29oBqrjZhXngq_zv7iqx/s1600/Photo+Aug+06,+11+01+11+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY_DXSbF6C62mqLjNlCONuWTSSmd7w4GtOzXlJ6x-vMRBWxFAWXlDoUb6WU10R0gVqhyphenhyphenjoZKwYrPSFZf-U3vco5aWVkeElF5nvYDxYnBd_S9r-aZ20Ygvg2kVv29oBqrjZhXngq_zv7iqx/s320/Photo+Aug+06,+11+01+11+PM.jpg" width="239" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibz2In4KFrl62jSSLJtAOZBYQVRisZDw9CaQv2qxTASXuOSfKd-zBEf_opdvvXSdSYjuv6mt0hV9vBTcJQqlm-sm3-c204ZAJpgoPdrfppB0k5b3_LR2uGtlsTqa9sTONdncqEErb_Ofr4/s1600/Photo+Aug+12,+8+48+36+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibz2In4KFrl62jSSLJtAOZBYQVRisZDw9CaQv2qxTASXuOSfKd-zBEf_opdvvXSdSYjuv6mt0hV9vBTcJQqlm-sm3-c204ZAJpgoPdrfppB0k5b3_LR2uGtlsTqa9sTONdncqEErb_Ofr4/s320/Photo+Aug+12,+8+48+36+PM.jpg" width="320" /></a></div>
<br />
Thanks for all the free stuff, Dad!<br />
<br />
UPDATES<br />
<br />
I built a permanent version of the boost converter and put it inside the strobe light housing. Pictures! The inductor is a 1mH 0.8A high-current choke that I had laying around. I believe an inductor of this size is overkill. So it goes. Also, I used a IRF530 MOSFET driven by a 555 timer. The capacitor values are not as important.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOgA6I3l8wbj8HIfmBg-nJ8uw4sb6blwX5re595_kFtgtVCTo9znAC5B_B8DmXN1KWC9_NvKgdC-Eb1CuQ_txFpnQ-Ys-j6U4UujWffMiT8hw5gF-ufCtlPZ8gxZVgkSnkjp_rzWAuYL4z/s1600/Photo+Aug+14,+7+27+53+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOgA6I3l8wbj8HIfmBg-nJ8uw4sb6blwX5re595_kFtgtVCTo9znAC5B_B8DmXN1KWC9_NvKgdC-Eb1CuQ_txFpnQ-Ys-j6U4UujWffMiT8hw5gF-ufCtlPZ8gxZVgkSnkjp_rzWAuYL4z/s320/Photo+Aug+14,+7+27+53+PM.jpg" width="320" /></a></div>
<br />
All the capacitors are there because I didn't have one that was the right value, so I paralleled them up to get the capacitance I needed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXghe8XuZZup2sZ3f6BYl8WKKCLlrUwhJAwjg-Khm9FOH8BE0Slxdxi4vxP_WAu_jxp7KIygO6XdtARq0XFK61GriEWIgptdY7oD7cfHgHW8lsEBqcvLENrhJNRR0Xi0a2XK2rHHnUnou/s1600/Photo+Aug+14,+8+03+35+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJXghe8XuZZup2sZ3f6BYl8WKKCLlrUwhJAwjg-Khm9FOH8BE0Slxdxi4vxP_WAu_jxp7KIygO6XdtARq0XFK61GriEWIgptdY7oD7cfHgHW8lsEBqcvLENrhJNRR0Xi0a2XK2rHHnUnou/s320/Photo+Aug+14,+8+03+35+PM.jpg" width="320" /></a></div>
<br />
Installed, complete with fuse. Now I just need to fix the strobe light and I'll be in business!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4mJjQiVd9Dza0JbYSFHpdOVDpdrPyGsfXMmtGTMMUxaJfyil4rY8i5AokRw-7YMMROzbJl8hWPABkNkDdP4pOKSyh1bbM4gXj1U0XcWgRVXzlO_d1NNFDoBIzQKCfZbdizN_QplC8MQN/s1600/Photo+Aug+14,+8+08+00+PM.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4mJjQiVd9Dza0JbYSFHpdOVDpdrPyGsfXMmtGTMMUxaJfyil4rY8i5AokRw-7YMMROzbJl8hWPABkNkDdP4pOKSyh1bbM4gXj1U0XcWgRVXzlO_d1NNFDoBIzQKCfZbdizN_QplC8MQN/s320/Photo+Aug+14,+8+08+00+PM.jpg" width="320" /></a></div>
<br />
This was the extent of this project's damage. The white wire I bubbled up while I was still figuring out the ins and outs of SMPS design, the orange one is the wire I melted through during the test that I recorded in the video above. You can watch it melt if you look real closely.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com1tag:blogger.com,1999:blog-9155430133739902547.post-90485091496920387372012-07-21T21:02:00.001-07:002012-07-21T21:04:01.358-07:00Holy oscilloscope, Batman!I bought an analog Hewlett-Packard oscilloscope today. It was designed in the 70s, built in 1985, and decommissioned by the US Navy in 1993. Still going strong apparently. It's about two feet long (which is not evident in the picture, but it does not fit on my recliner). I don't have any test leads yet, but this is one of the two tools I needed to start working on switch-mode power supplies. It also makes me feel like I'm back in my Circuits I class with lab equipment that rarely worked. Hopefully this will go better!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwNHtCFhrFM9rj42J7wUHA2CAah4QTJkV8f6dqagkMj1KPm_LhPPnEGNcv_7xvxRUhlVP322O8x6w2mb-S4h1fSx8m0GMOf713QXaj8CyLFJakg8yuDsypfH8V1NRXrj18Ombrg_V6M9qd/s1600/2012-07-21+21.44.51.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwNHtCFhrFM9rj42J7wUHA2CAah4QTJkV8f6dqagkMj1KPm_LhPPnEGNcv_7xvxRUhlVP322O8x6w2mb-S4h1fSx8m0GMOf713QXaj8CyLFJakg8yuDsypfH8V1NRXrj18Ombrg_V6M9qd/s320/2012-07-21+21.44.51.jpg" width="320" /></a></div>Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-45073981945416711802012-07-01T20:11:00.001-07:002012-09-21T19:07:28.824-07:00Outlet Control Pictures<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
I took some pictures while I was making a permanent enclosure for my web-controlled power outlets. These are going in the kitchen and are attached to the old Gateway that plays my fridge music and serves up my tunes. I made it work in a way that each plug on the outlet can be independently controlled.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigqokwr0oAyhCni5qkSu1muzRWk9BkLl-oxhd94UwNUrMA6XAO8DRpj2POljIt2IoCCnKRr8Q43XnyCdkKF1L8vzvNkkWDdUs2DIpnvIOSi9o__0cgRTBrmMF-LlY1BoJ2NdI4MOACsBs/s1600/2012-06-24_18-30-52_573.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgigqokwr0oAyhCni5qkSu1muzRWk9BkLl-oxhd94UwNUrMA6XAO8DRpj2POljIt2IoCCnKRr8Q43XnyCdkKF1L8vzvNkkWDdUs2DIpnvIOSi9o__0cgRTBrmMF-LlY1BoJ2NdI4MOACsBs/s320/2012-06-24_18-30-52_573.jpg" width="179" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4XgiK4DGVZfgLPPsUWfVx5WTqxy-69GQ_wkQWtwhRgLy-KBAfT1ciHA-5XkycGRzBUgr6fKyfBi_AwbsIcxxkPoJ1nkjXg5oldgaoI9kuIFyut8sNf4R_3BTehSb-W9vEyE5Z5O4JR_fb/s1600/2012-06-24_18-31-01_549.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4XgiK4DGVZfgLPPsUWfVx5WTqxy-69GQ_wkQWtwhRgLy-KBAfT1ciHA-5XkycGRzBUgr6fKyfBi_AwbsIcxxkPoJ1nkjXg5oldgaoI9kuIFyut8sNf4R_3BTehSb-W9vEyE5Z5O4JR_fb/s320/2012-06-24_18-31-01_549.jpg" width="179" /></a></div>
<br />
Oh, and I used a ton of hot glue to seal everything up...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbaEdkeHzN6tkI7lzD24MqX9-6U7NgrfNGOo0evuU38s_Xqfvzw10lQ2rIuVfR2KxlWtWRFJIZVgSWhg-GqFUTVbUpm4WJ_qwXEgub3oZwgJq8BWk6jrYSNAHNBNFfljvbQ91z1slRmI7t/s1600/2012-06-30_01-08-07_445.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbaEdkeHzN6tkI7lzD24MqX9-6U7NgrfNGOo0evuU38s_Xqfvzw10lQ2rIuVfR2KxlWtWRFJIZVgSWhg-GqFUTVbUpm4WJ_qwXEgub3oZwgJq8BWk6jrYSNAHNBNFfljvbQ91z1slRmI7t/s320/2012-06-30_01-08-07_445.jpg" width="179" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtvRVzFotXNVjifdYpdqp4NTC1TY9PfGQpCxEP4WPuU4L_EwinVFf3_k4yYxfKXvVGh2kQacGRQDZUPUzVoWXE7H-NeMjZhgYDBzw_qBuGxfo9mhTKTXFdDqfKmnDtVqHiCQSd_rrWRjnD/s1600/2012-06-30_01-08-13_937.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtvRVzFotXNVjifdYpdqp4NTC1TY9PfGQpCxEP4WPuU4L_EwinVFf3_k4yYxfKXvVGh2kQacGRQDZUPUzVoWXE7H-NeMjZhgYDBzw_qBuGxfo9mhTKTXFdDqfKmnDtVqHiCQSd_rrWRjnD/s320/2012-06-30_01-08-13_937.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt3SCDcxcF8AIEwEmbR5JBoNvLI7tTnBlMVjIIiY-EsenrEvHSJg4K9jMXbV-MyZr5iw3IhE5D3aMBmJYnGKkaUHVLAfhL7BN2jhmdF2NC0CvgJetA7VU3BCxZaUA7LusIqRuheLaJss84/s1600/2012-06-30_01-33-12_399.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt3SCDcxcF8AIEwEmbR5JBoNvLI7tTnBlMVjIIiY-EsenrEvHSJg4K9jMXbV-MyZr5iw3IhE5D3aMBmJYnGKkaUHVLAfhL7BN2jhmdF2NC0CvgJetA7VU3BCxZaUA7LusIqRuheLaJss84/s320/2012-06-30_01-33-12_399.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnzPYM8SqImhKsobbbOHa_xOY-cCyi8hSMcYfVWb2iZ9s9xqiI8eS-iGqqRcYg75zMI8VITkJ8gzYCdqt0_XpyEJtffuvezplmzH1GQz4efJ1rJ5CKwidfU7HxHR3l6lF6_OyooxusO8A/s1600/2012-06-30_11-21-37_619.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAnzPYM8SqImhKsobbbOHa_xOY-cCyi8hSMcYfVWb2iZ9s9xqiI8eS-iGqqRcYg75zMI8VITkJ8gzYCdqt0_XpyEJtffuvezplmzH1GQz4efJ1rJ5CKwidfU7HxHR3l6lF6_OyooxusO8A/s320/2012-06-30_11-21-37_619.jpg" width="179" /></a></div>
<br />
I took 12V DC control wiring from the IDE drives' power wires and ran it out of the front of the computer.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj39HTL6uojFwq98uLw9OXDJVWDrWeQY9pYdTtueAlJP4l7HYFoH1S_TLFbmweafmzICf0EM46Tpkj-dl9UPcwdjtTSSyVcPgk-SB88j80I6LKhjwmEEjmwqIdGwywnf8K0QtwCuUhP5hmL/s1600/2012-06-30_13-37-31_575.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj39HTL6uojFwq98uLw9OXDJVWDrWeQY9pYdTtueAlJP4l7HYFoH1S_TLFbmweafmzICf0EM46Tpkj-dl9UPcwdjtTSSyVcPgk-SB88j80I6LKhjwmEEjmwqIdGwywnf8K0QtwCuUhP5hmL/s320/2012-06-30_13-37-31_575.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPxTLR5Abfv7ANvEfSz-WisRVulbJjP2g-njWTWfnbNPSPve0izsD15FUJoB8mRmMypW7F1bxvqwYfvo0_cO_oLrtlTbhWGLTGUWZAg6nv96l0uWM0v5R-R4oF51QVM6FO-fvSqOhbsgf3/s1600/2012-06-30_14-06-05_907.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPxTLR5Abfv7ANvEfSz-WisRVulbJjP2g-njWTWfnbNPSPve0izsD15FUJoB8mRmMypW7F1bxvqwYfvo0_cO_oLrtlTbhWGLTGUWZAg6nv96l0uWM0v5R-R4oF51QVM6FO-fvSqOhbsgf3/s320/2012-06-30_14-06-05_907.jpg" width="320" /></a></div>
<br />
Very professional!
<br><br><hr><br><br>
New update relating to my lamp: I was successfully able to install a webcam and set it up to monitor the lamp. This is more of a temporary solution until I can learn Python.<br />
<br />
Any way! I installed a program called "streamer" which can do many things, including take a JPEG picture from a webcam. Then I wrote a script to run this program every second.<br />
<br />
<code>#!/bin/sh</code><br />
<code>while [ true ] </code><code>do </code><br />
<code> streamer -s 640x480 -f jpeg -o /var/www/images/snapshot.jpeg </code><br />
<code> sleep 1</code><br />
<code>done</code><br />
<br />
The picture gets rewritten every time it runs. That way the web server doesn't need to think about which picture to show.
Now I need to execute this program as root at boot time. I added a line to the /etc/init.d/rc.local file:<br />
<br />
<code>/home/bryan/streamer &</code><br />
<br />
Hooray! This method obviously takes quite a bit more system resources. If this was something that people would look at all the time, maybe it would be a good method, but I'll maybe use this once a week, so hopefully when I learn Python I'll figure out a way to execute the "streamer" program once when the page is requested.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-56418479216456378562012-06-23T13:04:00.003-07:002012-06-24T09:31:56.602-07:00Desk Lamp Web ControlOnce I got the web server working from the last post, it was time to get the parallel port to do something useful. As its first task, I decided to hook it up to my desk lamp so that anyone in the world could turn the light in my apartment on and off. If you would like to try it yourself (and my computer is on), go to <a href="http://108.233.132.201/">http://108.233.132.201/</a>.<br />
<br />
THIS IS IMPORTANT: I can't tell who is turning my lamp on and off yet. So! If you're going to play around with it, please let me know who you are. Phone/text/email/facebook are all acceptable, or just leave a comment below.<br />
<br />
I used an AC adaptor I had laying around (from my kitchen light switch
mod from two and a half years ago) to get 12V DC for the relay. When I
actually hook this up in the kitchen, I plan on splicing in to the old
Gateway's power supply to get the 12V. I tied the output ground from the
power supply to the 0V pins of the parallel port and put an LED in to
let me know when I had the device powered up. Next I wired up a TIP31
NPN bipolar junction transistor. The base was attached to one of the
parallel pins, the collector was attached to the relay coil (I also put
an LED here just for peace of mind), and the emitter was attached to
ground. And that's it! Once I get this in the kitchen (and wired up
properly, i.e. not with live 120AC wires taped to terminals) I'll post a
video of it in action. <br />
<br />
An overview of the setup. Parallel port on the left, electronics in the middle, AC adaptor, relay, and the lamp's plug on the upper right. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs6efRr_bWdqvxXrN6ZnnecTgFxnLw-7aaUhOyjz7b945avc0hVCN5h1i5YWf8kbta0lXRnGVx_Q6nejNy9s_FpmnFbDVf0GlTnzzuw-esXt-BppuE4RN1SKQ5A4SgSP_4xoc2qvgBPSfF/s1600/2012-06-21_21-32-41_798.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs6efRr_bWdqvxXrN6ZnnecTgFxnLw-7aaUhOyjz7b945avc0hVCN5h1i5YWf8kbta0lXRnGVx_Q6nejNy9s_FpmnFbDVf0GlTnzzuw-esXt-BppuE4RN1SKQ5A4SgSP_4xoc2qvgBPSfF/s320/2012-06-21_21-32-41_798.jpg" width="320" /></a></div>
<br />
A close-up of the electronics. The IC on the right is a 555 timer that's not being used. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqB9gqSr5JIkUS3bsdgloxgeU-fOKz7Dru3o1Q0jaNwiltqIH52S7H0_0t8jEXMc76Wk9UNoyrOuJqbs8Q1v240-aQD8h1TAW_ddjDnX8fimn0thswxpCQPXipaeqzJXRBI_aNfH90K0lH/s1600/2012-06-23_15-29-01_416.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqB9gqSr5JIkUS3bsdgloxgeU-fOKz7Dru3o1Q0jaNwiltqIH52S7H0_0t8jEXMc76Wk9UNoyrOuJqbs8Q1v240-aQD8h1TAW_ddjDnX8fimn0thswxpCQPXipaeqzJXRBI_aNfH90K0lH/s320/2012-06-23_15-29-01_416.jpg" width="320" /></a></div>
<br />
Everything together including the lamp. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlxD9l12F803kDRmypFDAGHJsXYcQLayEnkfLy2sro6liUHgenbFadux4FjzqjsKzNaWkm0gJOWnF7OLCZHBs1GFkaPocluqWOPDE9Uwtu2LP6POOObVzELZ4KehHaVmUUboPA-d8EznWR/s1600/2012-06-23_15-29-38_779.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlxD9l12F803kDRmypFDAGHJsXYcQLayEnkfLy2sro6liUHgenbFadux4FjzqjsKzNaWkm0gJOWnF7OLCZHBs1GFkaPocluqWOPDE9Uwtu2LP6POOObVzELZ4KehHaVmUUboPA-d8EznWR/s320/2012-06-23_15-29-38_779.jpg" width="320" /></a></div>
<br />
My not-quite-up-to-code wiring, which shows how I fed the 120V AC from the wall, through the adaptor, through the relay, and to the lamp. Not super safe but I won't leave it plugged in until I build a more permanent enclosure for it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy6-mKEk9Iaq2hjYLVy4D1vag3G3o22PUQh_K-58FwufMHAqUb_RtypxRnGV0tJnWeR0Ym44NCGMI7b2-5seoju5VHa9Jz9mdUPbg4GANItd7trlNH8K3V2p7wEEF3SWOaIPdltw19Dj7g/s1600/2012-06-23_15-31-11_627.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy6-mKEk9Iaq2hjYLVy4D1vag3G3o22PUQh_K-58FwufMHAqUb_RtypxRnGV0tJnWeR0Ym44NCGMI7b2-5seoju5VHa9Jz9mdUPbg4GANItd7trlNH8K3V2p7wEEF3SWOaIPdltw19Dj7g/s320/2012-06-23_15-31-11_627.jpg" width="179" /></a></div>
<br />
Also I promise I had this idea before <a href="http://www.youtube.com/watch?v=mqp8_ROAIJY" target="_blank">this episode of the Big Bang Theory</a> aired. WHAT A COINCIDENCE! This is what I felt like though. Then it was creepy when people started turning my lamp on and off.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-47476268062031552412012-06-19T17:44:00.003-07:002012-08-02T19:19:21.812-07:00Progress on the "Turing" Slow CookerI have successfully managed to control the pins on a parallel (printer) port over the internets. I now document my efforts.<br />
<br />
I already have this working on my personal desktop (which is apparently old enough to still have a parallel port in it?). For the purposes of writing this without flaws, I will be re-creating my work on the old Gateway in the kitchen, mostly using SSH. As of this writing, the computer is running Ubuntu 12.04 with LXDE. <br />
<br />
First, I installed the apache2 webserver.<br />
<br />
<code>
sudo apt-get install apache2</code>
<br />
<br />
Next, I need to modify apache to run CGI scripts. This is much easier than everyone else on the internet seems to think. First, open <code>/etc/apache2/apache2.conf</code> with your favorite text editor and add the following line above <code> </code><br />
<code>ErrorLog ${APACHE_LOG_DIR}/error.log</code>:<br />
<br />
<code>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ </code><br />
<br />
Now it is time to get dirty. I used <a href="http://www.epanorama.net/circuits/parallel_output.html">www.epanorama.net/circuits/parallel_output.html</a> as a primer. It is full of spelling and grammar mistakes (and a few coding mistakes) but it's legible and helpful. Any way, the default web page that apache serves is <code>/var/www/index.html</code>. Mine looks like this:<br />
<code>
<br />
<html><br />
<head><br />
<title>Parallel port controlling test page</title><br />
</head><br />
<body><br />
<h1>Parallel port controlling test page</h1><br />
<p><br />
<form action="/cgi-bin/lpton.cgi" method="get" name="on"><br />
<input type=submit value="Set all data pins high"><br />
</form><br />
<p><br />
<form action="/cgi-bin/lptoff.cgi" method="get" name="off"><br />
<input type=submit value="Set all data pins low"><br />
</form><br />
<p><img src="pic.png"><br />
<p><br />
</body><br />
</html><br />
<br />
<br />
</code>
The picture was to double-check to make sure apache was serving more than just index.html because at first I had problems serving the <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" target="_blank">CGI</a> scripts. Any way! Now we need to get those CGI scripts written. I use two, in this example, one to set all the data pins on the parallel port high (turn things on) and one to set them all low (turn them off). I started off in <code>~/programs</code> with two C programs.<br />
<br />
<br />
<b>lptoff.c:</b><br />
<code>
include <stdio .h=".h"><br />#include <stdlib .h=".h"><br />#include <unistd .h=".h"><br />#include <sys io.h=""><br />#include <time .h=".h"><br /><br />#define base 0x378 /* printer port base address */<br /><br />int main(int argc, char **argv)<br />{<br /> if (ioperm(base,1,1))<br /> fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);<br /><br /> outb(0, base);<br /><br /> return 0;<br />}</time></sys></unistd></stdlib></stdio></code><br />
<code><stdio .h=".h"><stdlib .h=".h"><unistd .h=".h"><sys io.h=""><time .h=".h"> </time></sys></unistd></stdlib></stdio><br />
</code><b>
lpton.c:</b><br />
<code>
#include <stdio .h=".h"><br />#include <stdlib .h=".h"><br />#include <unistd .h=".h"><br />#include <sys io.h=""><br />#include <time .h=".h"><br /><br />#define base 0x378 /* printer port base address */<br /><br />int main(int argc, char **argv)<br />{<br /> if (ioperm(base,1,1))<br /> fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);<br /><br /> outb(0b00000001, base);<br /><br /> return 0;<br />}</time></sys></unistd></stdlib></stdio></code><br />
<code><stdio .h=".h"><stdlib .h=".h"><unistd .h=".h"><sys io.h=""><time .h=".h"> </time></sys></unistd></stdlib></stdio><br />
</code>
I compiled the programs:<br />
<br />
<code>
gcc -O lptoff.c -o lptoff<br />
gcc -O lpton.c -o lpton </code>
<br />
<br />
Then I moved the programs to the <code>/usr/sbin/</code> directory and gave them root access. This means that every time these programs are called they run as root automatically, even if the user who executes the programs does not have root privileges. This may seem like bad practice, but the reason for this is that writing to the parallel port requires root. This seems unavoidable. Just make sure the program won't get stuck in an infinite loop or it will be difficult to stop it. Any way...<br />
<br />
<code>
sudo cp lptoff /usr/sbin/<br />
sudo cp lpton /usr/sbin/<br />
cd /usr/sbin<br />
sudo chmod +s lptoff<br />
sudo chmod +s lpton</code>
<br />
<br />
The next step is to write CGI scrips that tell apache to run these two programs. They will be placed in the <code>/usr/lib/cgi-bin/</code> directory. There are two buttons in this example, so there are two CGI scripts:<br />
<br />
<b>lptoff.cgi:</b><code><br />
#!/bin/sh<br /># Parallel port CGI script<br />#<br /># Send HTTP headers<br />echo Content-type: text/html;charset=ISO-8859<br />echo<br /># Do the controlling<br />/usr/sbin/lptoff<br /># Output web page data<br />echo ""<br />echo "Parallel port controlled<br />"<br />echo "<a href="http://www.blogger.com/%5C%22/index.html%5C%22">Go back to controlling page</a>"<br />echo ""<br />#</code><br />
<code><br />
</code><b>
lpton.cgi:</b><br />
<code>
#!/bin/sh<br /># Parallel port CGI script<br />#<br /># Send HTTP headers<br />echo Content-type: text/html;charset=ISO-8859<br />echo<br /># Do the controlling<br />/usr/sbin/lpton<br /># Output web page data<br />echo ""<br />echo "Parallel port controlled<br />"<br />echo "<a href="http://www.blogger.com/%5C%22/index.html%5C%22">Go back to controlling page</a>"<br />echo ""<br />#</code><br />
<br />
That's all! Again, credit where credit is due, most of the pages came from <a href="http://www.epanorama.net/circuits/parallel_output.html#webcontrol">http://www.epanorama.net/circuits/parallel_output.html#webcontrol</a>, and I modified the rest to suit my needs. This blog is primarily a way that I can keep track of what I do, and that is what I have done. Hooray science!<br />
<br />
A video of it in action:<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/cRatgWZ0W88" width="420"></iframe>
<br />
<br />
<br />
UPDATE: Actually a lot of this code is messed up because it's almost impossible to post code with this blog publisher's web software. So if anyone REALLY WANTS the files, maybe I'll make them available for download from my server. Also. You'll need to make the <code>.cgi</code> files executable! This is important otherwise you'll get a "INTERNAL SERVER ERROR!!!!!11" error when you try to run this. Do <code> sudo chmod +x</code> on the files and you'll be fine.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-58716053040641951722012-06-10T11:01:00.003-07:002012-06-10T11:05:12.998-07:00Slow Cooker + Fridge SpeakersThe iPod finally gave up all the way. The screen still works but it doesn't play audio even if it's cold. As a stop-gap in the awesomeness that is fridge speakers, I had been using the "<a href="http://builtsomething.blogspot.com/2009/04/blog-post.html" target="_blank">brypod</a>" to play the fridge music, but I wanted that back for listening to music in other places. So I took the old <a href="http://builtsomething.blogspot.com/2009/02/firewall.html" target="_blank">Gateway computer</a> I have, put a fun version of Linux on it, and made it play the music in the fridge. As a bonus: This computer also has a parallel port (a consequence of it being about 12 years old) which I will eventually use to control other things in the kitchen over the internet, such as the <a href="http://builtsomething.blogspot.com/2010/01/turing-complete-slow-cooker-part-1.html" target="_blank">slow cooker</a>. This is how I did it!<br />
<br />
First! I downloaded the Ubuntu 12.04 x86 (32-bit) alternate desktop installer and burned it to a CD-RW and used that to install Ubuntu to the Gateway. This led to a problem that is becoming worse and worse with Ubuntu: despite having an "alternate installer" for old computers that don't have enough system resources to run the GUI, it's either impossible or very difficult to boot it to a command-line interface once it is installed. To me, this seems to defeat the purpose of having an alternate installer, but I also don't claim to be any sort of Linux expert. But any way! I spent about two hours coaxing the resource hog of a GUI into a terminal window so I could do something useful.<br />
<br />
<code>
sudo apt-get install lxde</code>
<br />
<br />
This installed a new GUI called LXDE which is extremely efficient and light-weight (unlike GNOME/Unity), without being downright unusable and terrible (unlike Fluxbox). After logging out and logging in to my LXDE session, I was able to actually use the computer.<br />
<br />
<code>
sudo apt-get install ssh vlc x11vnc build-essential ubuntu-restricted-extras<br />
sudo apt-get update<br />
sudo apt-get upgrade</code>
<br />
<br />
This installed all the system updates as well as the tools I will be using on this computer:<br />
<ol>
<li>VLC, a versatile media player (easier to manipulate than my personal preference, Rhythmbox)</li>
<li>SSH, which allows me to login to the computer remotely via command-line</li>
<li>X11VNC, which gives me remote desktop control (so I don't have to have a monitor/keyboard hooked up to the computer). </li>
</ol>
I needed to configure the remote desktop software to start automatically at boot.<br />
<br />
<code>
x11vnc -storepasswd</code><br />
<br />
It is necessary to have a password. Next: I went to <code>~/.config/autostart</code> and created a shortcut named <code>X11VNC.desktop</code>. (It is necessary to create the <code>autostart</code> directory if it does not exist already.) The file should look like this:<br />
<br />
<code>
[Desktop Entry]<br />
Encoding=UTF-8<br />
Type=Application<br />
Name=X1VNC<br />
Comment=<br />
Exec=x11vnc -forever -usepw -httpport 5900<br />
StartupNotify=false<br />
Terminal=false<br />
Hidden=false</code>
<br />
<br />
The next step is to configure the login options: <br />
<ol>
</ol>
<code>
sudo nano /etc/lightdm/lightdm.conf</code>
<br />
<br />
Now I need to configure the computer to automatically log in to an LXDE session when it starts up, so I don't have to type in a user name and password. I changed the <code>lightdm.conf</code> file from this:<br />
<br />
<code>
[SeatDefaults]<br />
user-session=ubuntu<br />
greeter-session=unity-greeter</code>
<br />
<br />
to this:<br />
<br />
<code>
[SeatDefaults]<br />
user-session=lxde<br />
greeter-session=unity-greeter<br />
autologin-user=bryan<br />
autologin-user-timeout=0</code>
<br />
<br />
The next step is to install folder sharing software (samba) so I can easily drag and drop music to the computer for my refrigerator listening pleasure. I decided to share the Music folder (~/Music) over the network. (I <i>could</i> have used SSH to do this, but it's a lot easier to drag-and-drop). <br />
<br />
Once all the music I wanted was on the computer, I moved all the .mp3 files to one folder and created an .m3u playlist:<br />
<br />
<code>
ls -d * | grep .mp3 > "${PWD##*/}.m3u"</code>
<br />
<br />
This creates a file called <code>~/Music/Music.m3u</code>. The final step is to tell the computer to start VLC when it boots, AND play this playlist file when it starts the program, AND turn on repeat and shuffle. This was accomplished by making a file called <code>vlc.desktop</code> and placing it in the <code>autostart</code> folder. <br />
<br />
<br />
<code>
[Desktop Entry]<br />
Encoding=UTF-8<br />
Version=0.9.4<br />
Type=Application<br />
Name=vlc<br />
Comment=<br />
Exec=vlc /home/bryan/Music/Music.m3u --random --loop<br />
StartupNotify=false<br />
Terminal=false<br />
Hidden=false</code>
<br />
<br />
That's it! Now the computer plays fridge music, is accessible remotely by VNC, SSH, and Samba, and is ready to start controlling things in the kitchen over the internets!Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-73096873249559142162012-05-12T22:27:00.003-07:002012-05-14T18:30:21.218-07:00Solar Power for the TruckI've always wanted to play around with a solar panel large enough to do something useful. Since I occasionally drive my truck well into the middle of nowhere, running some of the electronics in it (the stereo, the radio equipment, or the inverter) off of a solar panel seemed possible, but as a secondary goal I also decided I would like for the solar panel to run the cabin fans during particularly hot days to keep the heat manageable (I live in South Florida). Most of what I have done up to this point is proof-of-concept, and I am not planning on having this particular panel permanently attached to my truck.<br />
<br />
As an electrical engineer in the power industry, I must start this with a disclaimer: my goal is NOT to offset any of the fossil fuels used in my truck with solar. From my experience, there is a pervasive belief that solar photovoltaics are much more practical than they really are. However, to put it in perspective, to even offset 20% of the power my truck's engine normally produces, the solar panel would have to be around 3,000 square feet. My engineering opinion in a nutshell is that energy from solar photovoltaic is useful in remote, sunny areas, but <a href="http://en.wikipedia.org/wiki/Solar_thermal_energy">solar thermal</a> should be used for any sort of large-scale power production.<br />
<br />
Nevertheless! I found a 50-watt panel for dirt cheap that should work pretty well for what I want to do: essentially turn my truck into a portable battery that will be able to run the electronics worry-free if it runs out of gas.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgAZTGxKc_O9oLhMw16aqirLqGakXt6n-0nyREyc7TRiz_1-fv3wMbwq0OXhos2vKGfNO6QeYWXvpGa1kD_61JgBn5TkvxXrM_cRcufh5E7rZFls5mDALPwbk8TqROYsHQKjsEBqQ4pp7/s1600/2012-02-17_19-23-08_473.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgAZTGxKc_O9oLhMw16aqirLqGakXt6n-0nyREyc7TRiz_1-fv3wMbwq0OXhos2vKGfNO6QeYWXvpGa1kD_61JgBn5TkvxXrM_cRcufh5E7rZFls5mDALPwbk8TqROYsHQKjsEBqQ4pp7/s320/2012-02-17_19-23-08_473.jpg" width="179" /></a></div>
<br />
<br />
When I first started this, I thought, "Surely I can tie a solar panel to my truck's electrical system. Shouldn't take more than a week to build a charge controller!" So here I am, two months later, with the finished product. The theme of the day is "how much I hate programming" which, as anyone who knows me will attest to, is "a lot". Sure, I could have just bought a charge controller, but what fun would that be? But I also wanted the ability to add additional functionality, and I would like for the Arduino will eventually expand its programming to include solar tracking, so it keeps my options open.<br />
<br />
Another thing that I would like to point out is that I will be wiring the panel (via the controller) essentially straight to the battery, rather than directly to individual loads in the truck. There are two main reasons for this. First, it greatly simplifies the design and the work involved. Second, many things need a very smooth, constant power flow, which a solar panel like this simply cannot provide. When all of the energy is sent to the battery first, the battery acts as a sort of capacitor, storing and smoothing out the erratic energy from the panel so it can be used safely and efficiently by any device in the truck. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYKp5DFi5s6kDi_oI1QlCvxRbWFneIUNUVq8XNcENo2el6AuF_fScj6Xnnoydbg2iv4UpoZnSn6sobo7rkmuO1qsaxqrFQr2Xu_VyeWhIUk7jeOKkcG0nfD6Hr4wEY3eyfnt9JYPsPn39d/s1600/2012-03-11_21-56-00_361.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYKp5DFi5s6kDi_oI1QlCvxRbWFneIUNUVq8XNcENo2el6AuF_fScj6Xnnoydbg2iv4UpoZnSn6sobo7rkmuO1qsaxqrFQr2Xu_VyeWhIUk7jeOKkcG0nfD6Hr4wEY3eyfnt9JYPsPn39d/s320/2012-03-11_21-56-00_361.jpg" width="320" /></a></div>
<br />
The first step, however, was to make sure that the power from the panel didn't overwhelm the controller. The panel produces 20V open-circuit, which may not harm the microcontroller immediately, but may degrade it over time. I stuck a 12V regulator (with heat sink) in the circuit to help the Arduino out a little bit. The other chip is the transistor that will drive the relay that will control when the solar panel delivers power to the battery in the truck.<br />
<br />
The battery can be damaged if it is over- or under-charged, so the general idea is to measure the voltage at the panel and at the battery, compare the two values, and then have the microcontroller decide if the battery needs help from the panel. The voltage at each point was sent through a voltage divider to get them both down from the 0-20V range they are at normally to the 0-5V range that the Arduino likes. I chose 12.4 volts as the "low" point for the battery, where the panel will send energy to the battery (provided there is enough sunlight) and 14.4 volts as the "high" point where the microcontroller will disconnect the panel to keep from damaging the battery. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcAkVUm8UVCzCV8J1jd18eRGH342wJB3at-zC77O1b4ntj-0cNhDXCDf1kUjFW2AMevoaY8W9pAv5RLxwLxjprhqI9r21qGsBQA_pNHbk9kGazBEdJizQcrJEjqQ8Ihcr7IVoKXlLG99SF/s1600/2012-03-24_14-34-25_299.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcAkVUm8UVCzCV8J1jd18eRGH342wJB3at-zC77O1b4ntj-0cNhDXCDf1kUjFW2AMevoaY8W9pAv5RLxwLxjprhqI9r21qGsBQA_pNHbk9kGazBEdJizQcrJEjqQ8Ihcr7IVoKXlLG99SF/s320/2012-03-24_14-34-25_299.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7AR0YCpEgWJ_xhLtRf7eLRgFkuGMTicrzS5BiUj2wvUojL49CZyJIN6ii9D7Nubl3eEVSqVeR-8zTNl1NVT61rjA6d7z3jQeCu_22y8BmSL3r8KYI7nZaX9Ul_T4WnQ1LmcuPEHG7iLla/s1600/2012-03-24_14-34-44_840.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7AR0YCpEgWJ_xhLtRf7eLRgFkuGMTicrzS5BiUj2wvUojL49CZyJIN6ii9D7Nubl3eEVSqVeR-8zTNl1NVT61rjA6d7z3jQeCu_22y8BmSL3r8KYI7nZaX9Ul_T4WnQ1LmcuPEHG7iLla/s320/2012-03-24_14-34-44_840.jpg" width="320" /></a></div>
<br />
That is a rental Sentra. Not because I was afraid to hook this up to my own vehicle, but because my truck decided to randomly blow its rear main seal and spew crank and gear oil all over creation. But we persevere! The tests on the Sentra were promising, but the programming needed some tweaking. I also found out that the controller behaves erratically when it is not hooked up to the battery first. <br />
<br />
This video shows some of the action from testing it on my homemade bench power supply (not pretty, but gets the job done):<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/YOeVT9SoA-s" width="420"></iframe>
<br />
<br />
Any way. On to putting it all together! Since I don't intend for this to be bulletproof or permanent, I put it together from stuff I had lying around. If you have read my blog extensively, you will notice that the enclosure is from the remote kitchen light switch I built a long time ago.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNLk5XYPCU9tgbCknat6-zBVp5CFaVMsAYIOrEAjKExoEWOQy2LlWoj9733FizFUTfqDWKWRYys1oRC1tZDn1eu1PZS275CSK0070x8pukm_uei2uKJySHEC2EGqwbHwb_ZSwyysvySink/s1600/2012-03-26_21-19-35_550.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNLk5XYPCU9tgbCknat6-zBVp5CFaVMsAYIOrEAjKExoEWOQy2LlWoj9733FizFUTfqDWKWRYys1oRC1tZDn1eu1PZS275CSK0070x8pukm_uei2uKJySHEC2EGqwbHwb_ZSwyysvySink/s320/2012-03-26_21-19-35_550.jpg" width="320" /></a></div>
<br />
Building the circuitry. The large heat sink is for a Schottky diode. This prevents the battery from discharging back into the solar panel when there isn't any sunlight. Without the diode, the panel would behave as a resistive load in low-light conditions and drain the battery (and possibly damage the cells). This was more or less just a precaution though. Since the panel provides power to the microcontroller and associated circuitry directly, in low-light conditions one would assume that there wouldn't be enough energy to drive the relay. What I actually found out was that a surprisingly low amount of light is enough to turn everything on. Plus, since I'm an electrical engineer, plopping a precautionary diode in the circuit is much easier than doing any sort of programming, or trying to predict what the Arduino will do if it gets random spurts of power with a voltage less than 5V. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ucvdrDs5eztQZJiP4CVneEMh3YRFU9JAPittLpXenrgSadtmMZ2Z6ZAq8CSNVIWFHEaxz9kMzjNzNF4W__rf_TN6dlY8sIGxQKln6xeweJooPKrjnHxefZPQfbgkyuATwBRzdWubaS-2/s1600/2012-03-27_22-20-15_843.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ucvdrDs5eztQZJiP4CVneEMh3YRFU9JAPittLpXenrgSadtmMZ2Z6ZAq8CSNVIWFHEaxz9kMzjNzNF4W__rf_TN6dlY8sIGxQKln6xeweJooPKrjnHxefZPQfbgkyuATwBRzdWubaS-2/s320/2012-03-27_22-20-15_843.jpg" width="179" /></a></div>
<br />
Addition of the relay and microcontroller, as well as a 10-amp main fuse (because I didn't have any smaller than 10 but greater than 5) and a 1-amp fuse to protect the Arduino and power transistor.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyaZYGsF9xlX-QS8Rb3r77tSY3ldDp4rJcpkLFuQIU6flneItrUg5kilWaOzX1V2I060xT9hy-tNP3jfWvJK9B9TxenhG84-iolIM5ipmbg9R9W7T5gEMEAj_qdB-hzRImxmNYPevtg9bk/s1600/2012-03-30_17-30-43_164.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyaZYGsF9xlX-QS8Rb3r77tSY3ldDp4rJcpkLFuQIU6flneItrUg5kilWaOzX1V2I060xT9hy-tNP3jfWvJK9B9TxenhG84-iolIM5ipmbg9R9W7T5gEMEAj_qdB-hzRImxmNYPevtg9bk/s320/2012-03-30_17-30-43_164.jpg" width="179" /></a></div>
<br />
Preliminary layout in the enclosure. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvO_0USriTurSSvub38qna19GYAKn5I2TQlVRQmwPsEMoG1F-zMgxLVRXk8VvDDX0rtUjD3Dgg6I1DWiDnQAvzN0BWlV8s3oXQSnE2-DPaKqwWAVp_8DXfpyerMD27El1Xvj4Noim0fdDc/s1600/2012-03-30_17-50-27_304.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvO_0USriTurSSvub38qna19GYAKn5I2TQlVRQmwPsEMoG1F-zMgxLVRXk8VvDDX0rtUjD3Dgg6I1DWiDnQAvzN0BWlV8s3oXQSnE2-DPaKqwWAVp_8DXfpyerMD27El1Xvj4Noim0fdDc/s320/2012-03-30_17-50-27_304.jpg" width="179" /></a></div>
<br />
Attached to the truck for testing. The red LED indicates that the panel has enough power to run the microcontroller but nothing else (very overcast days, dusk and dawn, etc.). The yellow LED indicates that the panel has sufficient power to charge the battery but the battery already has a full charge, and the green battery indicates that the panel is supplying power to the battery and/or the rest of the truck's electrical system. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZabE4Fy7Kc_hcVFOckirgXFXhKw92cR16wT8fH1Si6wU580UsgFJx-U4CUG-rR36WKQpDaNjP96ZG89zmhAuNekYru4drMR1SQST1fN3W6BbjOiiSooBWu4xSgN0ZeYzg_H2H-okhvKyo/s1600/2012-03-30_17-51-03_318.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZabE4Fy7Kc_hcVFOckirgXFXhKw92cR16wT8fH1Si6wU580UsgFJx-U4CUG-rR36WKQpDaNjP96ZG89zmhAuNekYru4drMR1SQST1fN3W6BbjOiiSooBWu4xSgN0ZeYzg_H2H-okhvKyo/s320/2012-03-30_17-51-03_318.jpg" width="320" /></a></div>
<br />
Testing on the truck this time. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6mI8C7exc64FIOLexs7WTTSRSAC9h7_qv-iQ-NOvoPB5ZjpvofVeL-Xk4Dj4n7HFXTRG0eL3mZUO4pNPDbrEVKEiaeLvn6mhA_1CSjqNfF-Og735fe1eJ6PDpUtCN7HoO1LktvxOxQfeC/s1600/2012-04-17_20-44-40_475.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6mI8C7exc64FIOLexs7WTTSRSAC9h7_qv-iQ-NOvoPB5ZjpvofVeL-Xk4Dj4n7HFXTRG0eL3mZUO4pNPDbrEVKEiaeLvn6mhA_1CSjqNfF-Og735fe1eJ6PDpUtCN7HoO1LktvxOxQfeC/s320/2012-04-17_20-44-40_475.jpg" width="320" /></a></div>
<br />
The second relay was added to control power delivery to the fans in the truck. It is a SPDT relay with the coil connected to the truck's ignition. When the truck turns on, the fans behave normally, and when the truck is turned off, the fans are connected directly to the panel. I was able to splice it in to the control circuitry in the truck with little issue. To further reiterate how little power solar panels produce for their size, this panel barely has enough energy to spin the cabin fans at their lowest setting in direct sunlight. <br />
<br />
A second video illustrates the panel and controller being tested on the truck. <br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/YJLTI_kp_cw" width="420"></iframe>
<br />
<br />
A rousing success! Next was to attach the LEDs somewhere where I could see them easily. I used CAT5 ethernet cable for this, and used the final twisted pair out of the set of four twisted pairs to hook up a reset button for the Arduino, just in case things got wily.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzh9qS5gfEoEEcAnfqBS-A67y6LDpw7s3_6YhRp6tm3pmYgI9lj2yAG8t4cG0W8IbFOD8UOPkZs6Wc_55rmG76nokWSSj5TDjWKaV5g1VxLCNpJ7mAa_elbFjjx1CjVPs_xgBcSH92ElMz/s1600/2012-04-22_14-27-48_249.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzh9qS5gfEoEEcAnfqBS-A67y6LDpw7s3_6YhRp6tm3pmYgI9lj2yAG8t4cG0W8IbFOD8UOPkZs6Wc_55rmG76nokWSSj5TDjWKaV5g1VxLCNpJ7mAa_elbFjjx1CjVPs_xgBcSH92ElMz/s320/2012-04-22_14-27-48_249.jpg" width="320" /></a></div>
<br />
I drilled these into the trim around the stereo's head unit and the CB radio and soldered the CAT5 cable. I used a regular ethernet jack here as well to enable the trim to be removed easily. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxWmXbxXJZigMRQjcHAMPwUV-2cdRjMjuovLt9UulY9Mxy-abM_5dDLlVUtLSe7QOWrKDQWmwFSFxI1u95caQXiBAYAtsWrpNpZ1M69BJoo4ZNBm58OnCQE0r6knS6PTGS3GAYshWi0eJL/s1600/2012-04-22_14-27-40_42.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxWmXbxXJZigMRQjcHAMPwUV-2cdRjMjuovLt9UulY9Mxy-abM_5dDLlVUtLSe7QOWrKDQWmwFSFxI1u95caQXiBAYAtsWrpNpZ1M69BJoo4ZNBm58OnCQE0r6knS6PTGS3GAYshWi0eJL/s320/2012-04-22_14-27-40_42.jpg" width="179" /></a></div>
<br />
The red button is the reset for the Arduino. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTduJmKgBiLG7i_brKmXZBlcQcaWInyHq1tzBSTMiCt0LL9aeH6E0wHb8Aof_sMyTl5sWHkMKK453UXOAzaUOZ6LMV-joBQGki-JcyjswuAoN-j-lwN7MBisM6dGAZPqovqknLAH0500-E/s1600/2012-04-22_18-23-23_933.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTduJmKgBiLG7i_brKmXZBlcQcaWInyHq1tzBSTMiCt0LL9aeH6E0wHb8Aof_sMyTl5sWHkMKK453UXOAzaUOZ6LMV-joBQGki-JcyjswuAoN-j-lwN7MBisM6dGAZPqovqknLAH0500-E/s320/2012-04-22_18-23-23_933.jpg" width="320" /></a></div>
<br />
I also used this project as an excuse to add a voltmeter to the truck. The black button turns the voltmeter on if the truck is off, otherwise it turns on automatically when the truck does via a small 12V relay I wired to the ignition. The voltmeter will also be helpful when I go off road, in the event I drive through a river and the alternator fails. Not entirely out of the question. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8tAZNcTMSKkfCFk9NlixXGbbKeFs-MuSf7qQP8EQxeC7NmRQjOcg-FWIz55RMBBaksiN70yxcD0E-kwoSaH0cp41CD_smppVPBjldZuYGUMPKdw7Pqy2FBBcx9BnfCQcL-K2q3PbcnT83/s1600/2012-04-29_12-33-58_415.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8tAZNcTMSKkfCFk9NlixXGbbKeFs-MuSf7qQP8EQxeC7NmRQjOcg-FWIz55RMBBaksiN70yxcD0E-kwoSaH0cp41CD_smppVPBjldZuYGUMPKdw7Pqy2FBBcx9BnfCQcL-K2q3PbcnT83/s320/2012-04-29_12-33-58_415.jpg" width="320" /></a></div>
<br />
I stored the unit behind the passenger seat and ran all the wires under the center console.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioc5srpSUyBth5CDaDr2fv24Kp10huoe0DCFpMsP9c2EkLRC1cSk3fu9UoEN6CMpiU-JcoUj1eLtcl3j3eLXYBYVLqilnq_J7uP9eXef-sqShinIRIAEWw3sL6Y4NgE_lwXEYu_7h5qRAI/s1600/2012-05-12_13-25-13_983.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioc5srpSUyBth5CDaDr2fv24Kp10huoe0DCFpMsP9c2EkLRC1cSk3fu9UoEN6CMpiU-JcoUj1eLtcl3j3eLXYBYVLqilnq_J7uP9eXef-sqShinIRIAEWw3sL6Y4NgE_lwXEYu_7h5qRAI/s320/2012-05-12_13-25-13_983.jpg" width="320" /></a></div>
<br />
Propped up in the bed. The tailgate can be lowered if the sun is lower in the sky. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49zgjrIo2MTC4e7QMcgvUHDd0pKUerPHxuk0B0hyGGTL7ojWKDpDviSAbWFmWywcvyOpgrt5nlIXuVIwh_3W2Acnpv8bkbMdskL7qhPRh7m3o5_Qj9arpzxoqoXJEhijL_flU9vYnOxv8/s1600/2012-05-12_13-25-20_686.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj49zgjrIo2MTC4e7QMcgvUHDd0pKUerPHxuk0B0hyGGTL7ojWKDpDviSAbWFmWywcvyOpgrt5nlIXuVIwh_3W2Acnpv8bkbMdskL7qhPRh7m3o5_Qj9arpzxoqoXJEhijL_flU9vYnOxv8/s320/2012-05-12_13-25-20_686.jpg" width="320" /></a></div>
<br />
The chain is because, as I mentioned, I live in South Florida. This also shows the special weatherproof MC4 connectors that came with the solar panel.<br />
<br />
This was installed in my truck for about two weeks and worked great! It didn't even start any fires. It does charge the battery much better than it runs the fans though, so if I want to do that better I'll have to upgrade. For the future! I plan on building a custom panel that will produce more power and mount to the top of the toolbox (so it doesn't always waste bed space). Optionally I could have both panels running in parallel for around 130 watts of solar power. The next things I am going to work on are a <a href="http://en.wikipedia.org/wiki/Maximum_power_point_tracking" target="_blank">maximum power point tracking</a> circuit and a solar tracking device. I'm worried that solar tracking will consume more power than it creates, but maybe I can think of a more efficient way to do it. We will see!Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com19tag:blogger.com,1999:blog-9155430133739902547.post-53084454506201917592012-03-25T15:36:00.004-07:002012-07-31T17:55:14.723-07:00Videos?A while back I posted a list of some of my favorite albums of all time. Notably, I left of Deja Vu by Crosby, Stills, Nash, and Young, but that's neither here nor there. Any way, in the same vein, I thought I would post my five favorite music videos to date. Just for a little fun.<br />
<br />
<span style="font-weight: bold;">Red Hot Chili Peppers - Otherside</span><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/rn_YodiJO6k" width="420"></iframe><br />
<br />
I remember being blown away by this one in middle school, and probably the fact that I still find it so mind boggling is why it makes it to #1.<br />
<br />
<span style="font-weight: bold;">Goo Goo Dolls - Broadway</span><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/kbwzPzJ6wCU" width="420"></iframe><br />
<br />
What are they trying to say? They feel like old men? Everyone is a rocker deep down inside? Whatever it is, I approve.<br />
<br />
<span style="font-weight: bold;">Coldplay - Strawberry Swing</span><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/Lb9X5jMofEo" width="560"></iframe><br />
<br />
The amount of time this probably took is mind numbing. Bonus points for the trippiness factor.<br />
<br />
<span style="font-weight: bold;">Weezer - (If You're Wondering if I Want You To) I Want You To </span><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/cDIzMGh94vo" width="560"></iframe><br />
<br />
There's a lesson in here. One we should all follow!<br />
<br />
<span style="font-weight: bold;">N.A.S.A - Gifted</span><span style="font-weight: bold;"> </span><span style="font-size: 100%; font-weight: bold;"><span class="" dir="ltr" id="eow-title" style="vertical-align: top;" title="Gifted (feat. Kanye West, Santigold & Lykke Li)">(feat. Kanye West, Santigold & Lykke Li)</span></span><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/twpLBvg03YI" width="420"></iframe><br />
<br />
Trippy. With a twist ending?<br />
<br />
<b>Jay Clifford - Know When to Walk Away</b> <br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/Hop4r4LLUmk" width="420"></iframe><br />
<br />
I forgot about this one. BONUS! Very awesome. Points if you can find all the scenes that were shot at landmarks in Charleston.
<br />
<br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/jGMYFEOR41k" frameborder="0" allowfullscreen></iframe><br />
Didn't think I forgot Third Eye Blind?Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-86100425407281921082012-03-11T12:30:00.007-07:002012-03-11T12:58:44.192-07:00Dual-channel Power SupplyI have a new project on the horizon that I think is going to be... interesting, to say the least. I won't go into that now, but I needed to build some tools before I can build what I actually want to build. This tool will be useful for much more, though.<br /><br />First thing was to build an adjustable DC power supply. I had some LM317 chips around which are essentially variable voltage regulators if they're hooked up to a potentiometer, so that's exactly what I did first.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2s19sKa9v5uXjyodOCZ9Cr7AHbCUtADbX27wh97qB3wT4i4HJuEsgL1jgKx_sGIT2Is2z53b_Admnaa2IThZTl2anJbp2rqcDDctuNweqaxSonrOJ7Y_0hva7EPI704bSS5YcAs_ELZS/s1600/2012-02-29_21-28-22_306.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk2s19sKa9v5uXjyodOCZ9Cr7AHbCUtADbX27wh97qB3wT4i4HJuEsgL1jgKx_sGIT2Is2z53b_Admnaa2IThZTl2anJbp2rqcDDctuNweqaxSonrOJ7Y_0hva7EPI704bSS5YcAs_ELZS/s320/2012-02-29_21-28-22_306.jpg" alt="" id="BLOGGER_PHOTO_ID_5718725289967851282" border="0" /></a><br />I had most of the parts lying around, I had to go to Radioshack for the 120/24V, 2A transformers and the rectifiers and some other odds and ends. Once I got this one working and made sure I could actually adjust the voltage with the potentiometer (knob) the second step was to build a second one.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdM4lMPGmPk3HLbsRYJ_IJT3HMQDmrYUlcN4nxU_5STBXkfZgKIZ5PpZqXieezHcvdIM_iqf7J_ie7OiihCbLTOXIokKpGLo80AqvjIWIbTEq0Fp5gMo0Vrdby8QP9p-RrmAbJigbkU6fF/s1600/2012-03-03_13-58-21_348.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdM4lMPGmPk3HLbsRYJ_IJT3HMQDmrYUlcN4nxU_5STBXkfZgKIZ5PpZqXieezHcvdIM_iqf7J_ie7OiihCbLTOXIokKpGLo80AqvjIWIbTEq0Fp5gMo0Vrdby8QP9p-RrmAbJigbkU6fF/s320/2012-03-03_13-58-21_348.jpg" alt="" id="BLOGGER_PHOTO_ID_5718725299174785554" border="0" /></a><br />Once the second one was built, I connected them together in series. Since they are not grounded to a common reference point, the idea was that two 0-34V adjustable DC power supplies could make one 0-72 V adjustable DC power supply, by connecting the positive rail of one power supply to the negative rail of the other. I got this idea from almost blowing apart a $300 power supply in one of my labs, thus proving the idea that if you're not making mistakes, you're not learning.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrX5CRBVNYl5_MVdL7zHd6hrzctRHOJV30qtMb3rTcxa9R6j6SjLLFYvVGsa2tUs9c4fCgneJvalviVYyOG9NaoWfmuwZKYzDjZVO-ZfZXEoBXeWO_tfo043mKbOVe0XqR7AiinOX_lrA/s1600/2012-03-04_10-14-54_926.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrX5CRBVNYl5_MVdL7zHd6hrzctRHOJV30qtMb3rTcxa9R6j6SjLLFYvVGsa2tUs9c4fCgneJvalviVYyOG9NaoWfmuwZKYzDjZVO-ZfZXEoBXeWO_tfo043mKbOVe0XqR7AiinOX_lrA/s320/2012-03-04_10-14-54_926.jpg" alt="" id="BLOGGER_PHOTO_ID_5718726619372068114" border="0" /></a><br />The next step was to solder it all together.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgncZHXpZPgyV-uU2D2d9KeQyLGQVhSY9gs_hyphenhyphen_jySkL8-VGgusK3qU5-wuvnPSsPjPPbg2Abu8B5XpJqcsd0dAo6_Dd90ITh7t0_A-DkaIhS6YjQvaZ8YHXyQOrBwUceenVQnleb46GmR/s1600/2012-03-04_10-14-12_25.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgncZHXpZPgyV-uU2D2d9KeQyLGQVhSY9gs_hyphenhyphen_jySkL8-VGgusK3qU5-wuvnPSsPjPPbg2Abu8B5XpJqcsd0dAo6_Dd90ITh7t0_A-DkaIhS6YjQvaZ8YHXyQOrBwUceenVQnleb46GmR/s320/2012-03-04_10-14-12_25.jpg" alt="" id="BLOGGER_PHOTO_ID_5718726611216583330" border="0" /></a><br />The two sets of prongs on the top are for the AC input. the red and yellow leads are the positive and negative rails for each power supply (I didn't have any black wire for ground wires so I used yellow).<br /><br />Time to start assembling it all together. I didn't need it to be pretty, it just had to work. So I got a piece of scrap plywood and started screwing down all the parts. I decided I could save space by making the transformers "legs" by mounting them to the bottom, and attaching the rest to the top.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhrHbSt-uqRr-1jq847pNNnBnGKe5hq31Kcg-Xefv6OjLGnDoAn-pRFuuuPssgUOhVSEHYjzoHdiKwAR_EO1hLYgazEonPUNQdiBT3rA-XmjyeIch7HT9XVgsVu-GuW-WzNUufNuz9SW2-/s1600/2012-03-04_19-32-58_913.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhrHbSt-uqRr-1jq847pNNnBnGKe5hq31Kcg-Xefv6OjLGnDoAn-pRFuuuPssgUOhVSEHYjzoHdiKwAR_EO1hLYgazEonPUNQdiBT3rA-XmjyeIch7HT9XVgsVu-GuW-WzNUufNuz9SW2-/s320/2012-03-04_19-32-58_913.jpg" alt="" id="BLOGGER_PHOTO_ID_5718727676072118642" border="0" /></a><br />I screwed the power supply electronics to the top next and then set out to JB weld some of the smaller pieces to the board. The two switches on the bottom turn on the power supplies (so I can run just one if I don't need both) and the switch on the top left ties the two together for the one 74V DC supply. I also added the heat sinks to the LM317 chips.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4W1pB-gfPvmIAcPoDH3Z-JZ0buSqXV7VnlzvO5xFA8gkZCQpOY0q25Qttgnp4kE4Cpl5nbClX9n_3UwJfeNQub_JvnkYSgumssUpd26pTJ9jo5m4EYx3mw_pqhmuCcbqQwIa166yeE6Ts/s1600/2012-03-06_21-04-43_384.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4W1pB-gfPvmIAcPoDH3Z-JZ0buSqXV7VnlzvO5xFA8gkZCQpOY0q25Qttgnp4kE4Cpl5nbClX9n_3UwJfeNQub_JvnkYSgumssUpd26pTJ9jo5m4EYx3mw_pqhmuCcbqQwIa166yeE6Ts/s320/2012-03-06_21-04-43_384.jpg" alt="" id="BLOGGER_PHOTO_ID_5718727681163607554" border="0" /></a><br />Next I attached the output terminal (it's a former terminal for speaker hookups for an old stereo that stopped working) and the potentiometers to the board, also using JB weld.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbpUySxS9FLN6KqwnG3AxDCzF4XKIkW7ckM6EJfpI88EMIRtWRWBvMa_9cdiiOTi4kONFexSA02QupI_JxSUfBO30bYKSKoIl2_febLewVvsqGemchHTEw7ubYd-gfw7ieRLNgsZvgWJj/s1600/2012-03-07_18-15-30_2.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQbpUySxS9FLN6KqwnG3AxDCzF4XKIkW7ckM6EJfpI88EMIRtWRWBvMa_9cdiiOTi4kONFexSA02QupI_JxSUfBO30bYKSKoIl2_febLewVvsqGemchHTEw7ubYd-gfw7ieRLNgsZvgWJj/s320/2012-03-07_18-15-30_2.jpg" alt="" id="BLOGGER_PHOTO_ID_5718727688679039186" border="0" /></a><br />The nearly finished product...<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw0SJaNa_-4ry1qnQk-g4kajpWzKP2aixVeOWzkErSy7ulxY94EqDHsr3bhoFLbDs6-Vv1o25ogHYBAb_rfEBZy4QvUPJteaqBRJvIoNVasiW7bN3CIw1NmtIJoxfqSowgaZWVESiZPE3E/s1600/2012-03-07_18-17-11_570.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw0SJaNa_-4ry1qnQk-g4kajpWzKP2aixVeOWzkErSy7ulxY94EqDHsr3bhoFLbDs6-Vv1o25ogHYBAb_rfEBZy4QvUPJteaqBRJvIoNVasiW7bN3CIw1NmtIJoxfqSowgaZWVESiZPE3E/s320/2012-03-07_18-17-11_570.jpg" alt="" id="BLOGGER_PHOTO_ID_5718727698105455506" border="0" /></a><br />Once everything was together I could make sure it all worked before going farther. This shows my voltmeter hooked up to one of the supplies, outputting about 12V...<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7RzB6MVhA-JoKhYmrHCLwRySOB7ircQjJdZJLr-K4j3DdFwAN5-ah7XVFP7c2NFKUhh6st6q3_Ic2hn1mlxJKFszoGw9wuCsKfP07H2-GBR7vI499kNvMBHOfyLWmEtFS6A8Ud-sFCk_/s1600/2012-03-07_18-18-30_392.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW7RzB6MVhA-JoKhYmrHCLwRySOB7ircQjJdZJLr-K4j3DdFwAN5-ah7XVFP7c2NFKUhh6st6q3_Ic2hn1mlxJKFszoGw9wuCsKfP07H2-GBR7vI499kNvMBHOfyLWmEtFS6A8Ud-sFCk_/s320/2012-03-07_18-18-30_392.jpg" alt="" id="BLOGGER_PHOTO_ID_5718727710208838354" border="0" /></a><br />...and, with both power supplies turned on and the tie switch on, the power supply outputs about 70V. Looks like everything checks out.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNpowi_6rcTB1fCDFj_Yreypb1NHDaQqRm8YMxNP119uil-1Cw8K0XAqvyQQsrBpSMPtYPJQdXJthiH2OMRTEo1hKbInUzhYqO4rh3380t_WUARB8yErvQ3ZiraKm-M65gtO8AXyN9XKT-/s1600/2012-03-08_20-55-51_473.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNpowi_6rcTB1fCDFj_Yreypb1NHDaQqRm8YMxNP119uil-1Cw8K0XAqvyQQsrBpSMPtYPJQdXJthiH2OMRTEo1hKbInUzhYqO4rh3380t_WUARB8yErvQ3ZiraKm-M65gtO8AXyN9XKT-/s320/2012-03-08_20-55-51_473.jpg" alt="" id="BLOGGER_PHOTO_ID_5718729547794455730" border="0" /></a><br />Time to add the finishing touches. I found these little voltmeters on a site called Adafruit and decided to take a risk. They're about as big as my thumbnail and only draw 40 mA.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-GtjJ2gCUJuD1s9lTS6GVvQp8h6bxl_WOQz-OzykGMFJOdadCFBbOSmcYLNr2HGcL8Jdu-tnBNy4ybPhbK9sj2U-RX2klgoD6lJZ4-SU6GyPE4bEs1QeN8BSZ9OReJpASWeMuvs3P_hlx/s1600/2012-03-10_20-26-02_195.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-GtjJ2gCUJuD1s9lTS6GVvQp8h6bxl_WOQz-OzykGMFJOdadCFBbOSmcYLNr2HGcL8Jdu-tnBNy4ybPhbK9sj2U-RX2klgoD6lJZ4-SU6GyPE4bEs1QeN8BSZ9OReJpASWeMuvs3P_hlx/s320/2012-03-10_20-26-02_195.jpg" alt="" id="BLOGGER_PHOTO_ID_5718729552158996786" border="0" /></a><br />I got a piece of plexiglass and a DPDT center-off switch (from a previous project involving a former bathroom of mine, actually) and attached LEDs. The switch lets the voltmeter switch between monitoring one power supply or the other, thus saving me from having to install two voltmeters (the switch is MUCH cheaper than the voltmeters are) to monitor each power supply simultaneously. The two wire nuts on the left side of the image are the 120V AC hookups. The color coding is my own scheme, but if you come over to my apartment I would recommend not touching any of it unless I'm around and you're sure it's off.<br /><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlrDnuhfKavCOg2OyVGEJQJ6ZWVTnewc12eYvStNhMel4Gw1dadAMJynTn-dsNn3d7gwuzZfZwOA2N1SNPRCLAP98q9J9xl4zvU5gD6Zxo7-DrX5v8R3F-RqdUaaZ6snNitI6aqGPSvtc2/s1600/sErDSpk3VZFhxm4u_002.jpeg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlrDnuhfKavCOg2OyVGEJQJ6ZWVTnewc12eYvStNhMel4Gw1dadAMJynTn-dsNn3d7gwuzZfZwOA2N1SNPRCLAP98q9J9xl4zvU5gD6Zxo7-DrX5v8R3F-RqdUaaZ6snNitI6aqGPSvtc2/s320/sErDSpk3VZFhxm4u_002.jpeg" alt="" id="BLOGGER_PHOTO_ID_5718729778626448130" border="0" /></a><br />That was the diagram I used for the power supplies. Pretty straightforward, I just took it slightly farther by building two and tying them together. Similar power supplies can be bought for around $300 but I decided I could build my own for a little less money. It's not as pretty but it does the same job, outputting 1.5A DC anywhere from 0-36V and 3.0A DC from 0-74V. Now that I'm done with this, I can start working on my next project, which I'm sure will be legendary.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0tag:blogger.com,1999:blog-9155430133739902547.post-25145819797911162302012-03-11T12:02:00.003-07:002012-03-11T12:12:45.030-07:00Finished with the Big TruckFinally paid to get internet in my apartment for the first time since July 2009. Since then I've been rouge, updating on my phone and various other ways. Any way! I no longer have the huge Dodge 1500. I fixed the exhaust leak which was the last thing it needed, and returned it to Alabama. Success! Here are some of the pictures of the exhaust leak getting repaired.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhgq60XBCwDISaujyJM72mTqi-mygMweC4CRlE7N-ot5xzY49g0E6yJKU3V13e4q1qdxvcUvH15drEvqvdqe22-WMet41d0xaqc0cLCfEMu5Bkzi0BfW6ouZh5QOCRgxlgdTWya9hgn2fG/s1600/2011-11-05_10-47-28_269.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhgq60XBCwDISaujyJM72mTqi-mygMweC4CRlE7N-ot5xzY49g0E6yJKU3V13e4q1qdxvcUvH15drEvqvdqe22-WMet41d0xaqc0cLCfEMu5Bkzi0BfW6ouZh5QOCRgxlgdTWya9hgn2fG/s320/2011-11-05_10-47-28_269.jpg" alt="" id="BLOGGER_PHOTO_ID_5718718081871320786" border="0" /></a><br />This was the location of the leak, right where the pipe from the cat joined the pipe going to the muffler. You could hear it really well with the truck idling but the location had to be pinpointed with a stethoscope. It's hard to see the leak because it was very small.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZoyRI2KGUnaNkpogrbb7zwf-WArU3ua3mpdYuHtWZCUACEG68KSdd_NsCRpptEeVKK-lgQNHwFsJwlrTG6uGBAlHgq7QXr3eKbsCDa4mKjpvLpWHow63blvQ5n5tPeuFJyGp57B3qJEB/s1600/2011-11-05_10-47-38_448.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmZoyRI2KGUnaNkpogrbb7zwf-WArU3ua3mpdYuHtWZCUACEG68KSdd_NsCRpptEeVKK-lgQNHwFsJwlrTG6uGBAlHgq7QXr3eKbsCDa4mKjpvLpWHow63blvQ5n5tPeuFJyGp57B3qJEB/s320/2011-11-05_10-47-38_448.jpg" alt="" id="BLOGGER_PHOTO_ID_5718718085339674226" border="0" /></a><br />This picture shows the joint a little better.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-csk-7_7hZr_WseZgxA3S8tBohjstrbN2b2UELWWD0V6tbjI7r2-GAflaYOLD4TYo0dJerZpgq3ENSck9AZbmEyq04YORkKEQ-Zp5K30VmVT0lWoiiAAuVEl9lUzFYgQbwf3b05Wc1VnM/s1600/2011-11-05_10-49-25_252.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-csk-7_7hZr_WseZgxA3S8tBohjstrbN2b2UELWWD0V6tbjI7r2-GAflaYOLD4TYo0dJerZpgq3ENSck9AZbmEyq04YORkKEQ-Zp5K30VmVT0lWoiiAAuVEl9lUzFYgQbwf3b05Wc1VnM/s320/2011-11-05_10-49-25_252.jpg" alt="" id="BLOGGER_PHOTO_ID_5718718091400946258" border="0" /></a><br />Welding the leak shut on the lift.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2rKsTONjC_5kSA-waQfAPNMlbPMeD11Osyad-kpOr4vxr2_U3kgw8BTiH_XuJmbb4tfZ5qkABfAhyphenhyphenGfWCqX9JuWtvhXmu5-GjRIy2trS4ykL43dkGWds6x9Gg36ZP4XuUXaWBs7mz2LXW/s1600/2011-12-03_14-33-44_219.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2rKsTONjC_5kSA-waQfAPNMlbPMeD11Osyad-kpOr4vxr2_U3kgw8BTiH_XuJmbb4tfZ5qkABfAhyphenhyphenGfWCqX9JuWtvhXmu5-GjRIy2trS4ykL43dkGWds6x9Gg36ZP4XuUXaWBs7mz2LXW/s320/2011-12-03_14-33-44_219.jpg" alt="" id="BLOGGER_PHOTO_ID_5718718096454944914" border="0" /></a><br />Finished product. I also removed some metal advertisements from the dealer that were on the mud flaps. Looks a whole lot cleaner I think, and no more exhaust leak ticking! Winning.<br /><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1jFV9of71yTh-4Xm_zFyrfqoRGvmJ0ltD5XffZUp2fZQ8xbBxKl1RUsibIYS2ebt2kB41whXoPxaYENb325uR4xEwxvn4vzB_tYg0TaXB5vAtUPZdgXMSf0QdLq-2H5FzsnfMFD_3KpbD/s1600/2012-01-24_11-44-44_434.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 180px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1jFV9of71yTh-4Xm_zFyrfqoRGvmJ0ltD5XffZUp2fZQ8xbBxKl1RUsibIYS2ebt2kB41whXoPxaYENb325uR4xEwxvn4vzB_tYg0TaXB5vAtUPZdgXMSf0QdLq-2H5FzsnfMFD_3KpbD/s320/2012-01-24_11-44-44_434.jpg" alt="" id="BLOGGER_PHOTO_ID_5718718108167544514" border="0" /></a><br />Also I just moved to Florida and snapped this picture in a restaurant in January in Riviera Beach. It was about 70 degrees, so we went to the marina where the birds just fly around in the rafters.Bryanhttp://www.blogger.com/profile/10973597783863137242noreply@blogger.com0