tag:blogger.com,1999:blog-4584287065357149732024-02-06T19:37:20.581-08:00Don's ProjectsUnknownnoreply@blogger.comBlogger14125tag:blogger.com,1999:blog-458428706535714973.post-22068202267006079652023-09-17T08:16:00.005-07:002023-09-17T09:14:32.490-07:00LED VU Meter<p style="text-align: center;">This post will be a bit different from my typical posts. I'm basically just writing documentation on a project that's just been completed. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbolWw8V5kgWg5ELESU0gm8xYf5baHxQTw2pPYRBZBJqf4XOeGHOmlJzFm7ZpfMtR7XbpFAudcgdEO2qLRiKHSU86oNavp7eKWZUI-8WISV3-9lumLctBDIeb-7PxfLKG7eomThVzLDkudJN5YWfz6Q61ddIbvbRi70K6Yff9eLb3Z4FRhwf1J660JTU/s4032/20221211_141007.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="2624" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcbolWw8V5kgWg5ELESU0gm8xYf5baHxQTw2pPYRBZBJqf4XOeGHOmlJzFm7ZpfMtR7XbpFAudcgdEO2qLRiKHSU86oNavp7eKWZUI-8WISV3-9lumLctBDIeb-7PxfLKG7eomThVzLDkudJN5YWfz6Q61ddIbvbRi70K6Yff9eLb3Z4FRhwf1J660JTU/s320/20221211_141007.jpg" width="208" /></a></div><div class="separator" style="clear: both; text-align: center;">This is the prototype device in a classroom. It was intentionally designed to show the components. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVfFPY6teTWo5RDru25dBtUIWlU3AMlvh8xlb9JeDL7YOJBX82mYPIoAeTzuxqTZ_Z6p_jqa8jqvmBjUllhqFYPJEQOleCYQYBS2qF8pKudJgI-Wehxclakl3hghL7P4l3dchkq6vy8niVwVbC4rLLIKU8Kk1HS8vu0bWb2kU0QYkKQGGz8exu9O65jPQ/s4032/20230902_162158.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVfFPY6teTWo5RDru25dBtUIWlU3AMlvh8xlb9JeDL7YOJBX82mYPIoAeTzuxqTZ_Z6p_jqa8jqvmBjUllhqFYPJEQOleCYQYBS2qF8pKudJgI-Wehxclakl3hghL7P4l3dchkq6vy8niVwVbC4rLLIKU8Kk1HS8vu0bWb2kU0QYkKQGGz8exu9O65jPQ/s320/20230902_162158.jpg" width="240" /></a></div><div class="separator" style="clear: both; text-align: center;">And this is the second revision, miniaturized and cleaned up quite a bit.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNRI6UfYrL7Z6chR4Jf81kZvvQMn_dWg6fmr2RQ4qoTphvP0SCq5ynw-ZAw9h2h71QkwwBpHp8YxX5wnpyglKMHTuo8nLfqMlh6i1kh8bzx0siWudnWvD2bi7ms5QnYFWK65QD9iao2_6n3c8acj0zet0Ct_93ARq8-HeLKDolvpnxApnQbXuwVO0FFns/s4032/20230902_160210.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNRI6UfYrL7Z6chR4Jf81kZvvQMn_dWg6fmr2RQ4qoTphvP0SCq5ynw-ZAw9h2h71QkwwBpHp8YxX5wnpyglKMHTuo8nLfqMlh6i1kh8bzx0siWudnWvD2bi7ms5QnYFWK65QD9iao2_6n3c8acj0zet0Ct_93ARq8-HeLKDolvpnxApnQbXuwVO0FFns/s320/20230902_160210.jpg" width="240" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSJFUsD1qoAFzOpZ6jEpXDl-g_6Xs_8UC2YGpro0d_IaUEdmooDb4UoYY08eI8sDMq5qaNFnipPbZ3Td-mgRQs8IfSO9UnYRUQCWiudrLmgNHqqhsvIM5Jz_juqiSrGp04tMlaImH02ahuJuCzZtut6Sv5zjm9VB-wLJxnXYQuoWdiKpFxK40LuBpa5KM/s4032/20230902_162150.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSJFUsD1qoAFzOpZ6jEpXDl-g_6Xs_8UC2YGpro0d_IaUEdmooDb4UoYY08eI8sDMq5qaNFnipPbZ3Td-mgRQs8IfSO9UnYRUQCWiudrLmgNHqqhsvIM5Jz_juqiSrGp04tMlaImH02ahuJuCzZtut6Sv5zjm9VB-wLJxnXYQuoWdiKpFxK40LuBpa5KM/s320/20230902_162150.jpg" width="240" /></a><div class="separator" style="clear: both; text-align: center;"><br /></div>Each device has an Arduino Pro Mini, Max 9814 Microphone, a momentary push button, and 50 NeoPixel LEDs.</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/AVvXsEj55vuTd7czBhx7M6TNkoc2VQbz-Nbgf-mmA1MRpKtm67OA90R4_F90zdTIEBCUij9masTMjvJz1Dk0i9r4cy5hFgFXEIeLuAfVnmo3YnE4pJDhRkieLFZ2rM4QW7YeVNZBienqXuDMn8OAd1MgCwyUzv5p67aXSC8qWd6QuM3WCguAdaiw41Q_ILTO5CQ/s1794/device_bb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="564" data-original-width="1794" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj55vuTd7czBhx7M6TNkoc2VQbz-Nbgf-mmA1MRpKtm67OA90R4_F90zdTIEBCUij9masTMjvJz1Dk0i9r4cy5hFgFXEIeLuAfVnmo3YnE4pJDhRkieLFZ2rM4QW7YeVNZBienqXuDMn8OAd1MgCwyUzv5p67aXSC8qWd6QuM3WCguAdaiw41Q_ILTO5CQ/w637-h201/device_bb.png" width="637" /></a></div><br /><div class="separator" style="clear: both; text-align: center;">The device schematic</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><span id="docs-internal-guid-6ce753b2-7fff-28c3-1abc-6392f0167273"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">What is a volume unit (VU) meter?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">A VU meter is a device that visually displays the strength of an audio signal. In this case, the LEDs light up and change colors based on how loud sounds in the environment are. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">How does it get used?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The light emitting diode (LED) strip should be attached with an adhesive on to a vertical surface. The microcontroller enclosure or “brain box” should be affixed similarly at the bottom of the LED strip. When the USB cable is plugged in, the device should start to operate. On the bottom left part of the enclosure there is a momentary push button that can pause the operation of the device and turn off the LED strip. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The lid can be removed so that the components and wiring are visible in case the user would like to see how it’s wired and better understand how it works. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The device requires standard 5 Volt USB power from a USB power supply. It draws a maximum of 1 amp so even low-end USB power supplies should be plenty to operate the device. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">What are the troubleshooting steps?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">If the LEDs do not light up when the device is plugged into a USB port, leave the device unplugged for 5 seconds and plug it in again and/or try a different USB power supply. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">How does it work?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">Let’s start with the hardware. </span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The microcontroller board contains an 8-bit ATMega328 running at 16Mhz, or 16 million cycles per second. It is connected to a component board that contains a microphone with a built-in amplifier and automatic gain control operated by a MAX9814 integrated circuit (IC). The microcontroller also drives a WS2812B LED (commonly called “Neopixels”) strip. Lastly, there is a momentary push button connected to the microcontroller to allow for user input. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">On to the software. </span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The microcontroller allows a single program to be stored and it will run that program whenever it has power. By its nature, the microcontroller runs this single program in an infinite loop. </span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The program is written in C using the Arduino development environment. Upon booting, the software initializes the microphone and LED strip.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The heart of the program is an algorithm called a fast Fourier transform (FFT). A FFT quickly computes the discrete Fourier transform (DFT) of a signal. In essence, the algorithm converts the analog audio data from the microphone into the signal’s individual spectral components which produces the signal’s frequency information. It then computes those frequencies to find the delta between the baseline and the peaks of the input signal. The practical upshot of this is that you end up with a number that represents the loudest sound picked up by the microphone at a given moment.. This input and processing cycle happens approximately 15 times per second. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The program then takes the data from the FFT and uses it to compute the signal data that will be sent to the LED strip. It does this by using the numeric result of the FFT to determine how many LEDs need to be lit up and then looks up data in a rainbow color wheel table to determine the order of colors that should be displayed leading up to the last/top LED. With this information, it sends a digital signal to the LED strip telling it to light up from 0 to the Nth LED, and to fill the intervening LEDs the colors prescribed in the color wheel table. As a bit of flair, the microcontroller will also display a “falling peak” that will appear to drop down from the maximum level of the current cycle to the maximum position of the next cycle, lighting one LED at a time.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The “pause” functionality is pretty straightforward. If the microcontroller detects a push and release of the button within 200ms, the FFT processing will be suspended and the LED strip will set each element to be off until another button press is registered or the device is otherwise restarted. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">It may be important to note that while this device measures volume from the environment, no audio data is stored and the device has no ability to connect to any data network such as WiFi. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">Where did the case come from?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The case was designed in computer-aided design (CAD) software called Fusion360. The design of the lid of the case went through about 4 iterations while the base part that holds the electronics went through about 14. The design attempted to balance aesthetics with functionality. The case’s outside edges are all filleted, including the edges of the circular extrusions for the button and wiring. The lid provides vents for airflow and full access for the microphone to pick up sounds from the environment. The base provides stand-offs for the components and space for the wiring. The components are attached inside the case with thermoplastic adhesive and the lid attaches to the base via a self-centering friction-fit mechanism. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">All of the enclosure iterations were printed on a fused deposition modeling (FDM) 3d printer using polyethylene terephthalate (PET) filament. PET is what most American beverage containers (such as 2 liter soda bottles) are made from and is 100% recyclable. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">Why make this?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The primary goal of this project was to build a tool that could be helpful in classroom management. It’s also important to show young people that STEM areas can be neat and exciting. This tool provides a way to start a conversation about electronics and technology, mathematics, programming, CAD, and other engineering-related skills. </span></p><br /><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space-collapse: preserve;"><span style="font-size: medium;">Who built this?</span></span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">My name is Don Howdeshell. I’m a software engineer/systems administrator at Missouri S&T and I’m always looking for challenging projects that also have a practical use. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">This project was started from a conversation with a 6th grade teacher looking for a way to allow students to self-monitor the volume level of their voices while working on projects within the classroom. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;">The prototype device has operated for the better part of a year and has been helpful both as a volume monitoring device and as a conversation starter with students who have a curious mind, are interested in STEM fields, and/or just think it’s interesting. </span></p><div><span face="Arial, sans-serif" style="font-size: 11pt; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space-collapse: preserve;"><br /></span></div></span><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><p style="text-align: center;"><br /></p><p style="text-align: center;"><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-8297099161253090332020-09-07T18:57:00.004-07:002020-09-07T19:03:07.091-07:00Minecraft Cube Light <p> Thingiverse has a lot of neat stuff. My son found a <a href="https://www.thingiverse.com/thing:524925" target="_blank">Minecraft Diamond Ore Lamp</a> and decided that he wanted one. I see that the creator has some links to tutorials and whatnot, but I saw them after the fact and did things a bit differently. </p><p><br /></p><p>Ultimately, I threw <a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> onto an ESP8266, added 5 Neopixels, some Vellum as a diffuser, and called it good. The neat part of this was being able to add a single IFTTT command to be able to change the colors via Google Assistant/Home. </p><p>All of my home automation stuff through Google Home goes through an external service such as IFTTT, then to a secure bridge that I've designed on the backend. The command goes from Google to IFTTT to my server to the IoT device. I was able use IFTTT's "phrase with a single text ingredient" to call multiple different states of the LED block. </p><p><br /></p><p>Here are some examples of diamond, emerald, redstone, gold, lapis, and iron. </p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhX7sBk8s-Ady4c2EwXi8tBl4P8NK2GsJV3QhUx_HKvzTwMlpaZvrXiAcHFNjmYuA9jXcyaW9L9WPoF7iW3pG_g5dARWuVSLIKRg51FVTw5lCoUhKK76rpgEZ_Pfu_thpkgV9ifE6_usc/s2048/20200905_205812.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/AVvXsEjhX7sBk8s-Ady4c2EwXi8tBl4P8NK2GsJV3QhUx_HKvzTwMlpaZvrXiAcHFNjmYuA9jXcyaW9L9WPoF7iW3pG_g5dARWuVSLIKRg51FVTw5lCoUhKK76rpgEZ_Pfu_thpkgV9ifE6_usc/s320/20200905_205812.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-PmaCLitp1y_HDQaidG1gwZQq-YcHoAOtaa-e78V2C4BblpaiEjsA7sVyBriTe9-B7krZIXl_If-w0LL8u76rxOwm3hAB1JwkNijyM_6WuqFsHn04gmSSeRhka2Oxhk-rldS2-9ghwpk/s2048/20200905_205814.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/AVvXsEi-PmaCLitp1y_HDQaidG1gwZQq-YcHoAOtaa-e78V2C4BblpaiEjsA7sVyBriTe9-B7krZIXl_If-w0LL8u76rxOwm3hAB1JwkNijyM_6WuqFsHn04gmSSeRhka2Oxhk-rldS2-9ghwpk/s320/20200905_205814.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEK7aFnPwrJDHwyNX969t0D09UeatAtcmu-g8DZmSPDQ2MD2LpVWcz6lGoo20KAensJvPj1Cpd-kojc0gvzKwgdkoBAlFzR2ieaJQctK8GeW1NN_Zm-efLvAYHuecqM6ih3VUYsk6qz6U/s2048/20200905_205817.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/AVvXsEgEK7aFnPwrJDHwyNX969t0D09UeatAtcmu-g8DZmSPDQ2MD2LpVWcz6lGoo20KAensJvPj1Cpd-kojc0gvzKwgdkoBAlFzR2ieaJQctK8GeW1NN_Zm-efLvAYHuecqM6ih3VUYsk6qz6U/s320/20200905_205817.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOR89LOfOKtL7K7u69qnafwl6D-AguAsAGBOejIwjh-MFLfvW70c_0eWn7uHqXiwUjZmG_wRylmMBRDxSuCOlqI8dC_G_vLXHPuzQ-hDeIwiMIzG2NCgJEBNxuLXchUC3j0ghvqpK9xnU/s2048/20200905_205820.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/AVvXsEhOR89LOfOKtL7K7u69qnafwl6D-AguAsAGBOejIwjh-MFLfvW70c_0eWn7uHqXiwUjZmG_wRylmMBRDxSuCOlqI8dC_G_vLXHPuzQ-hDeIwiMIzG2NCgJEBNxuLXchUC3j0ghvqpK9xnU/s320/20200905_205820.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRLZHFrycRpXQDe2bG0ZAfQSRHFCHwDrpDGsgQS_ywvk6iliW2xqmWEr1A1KGNl3xDokSd6af_5YYQOqBNFekudCRa-Q9D4RkxHl1RHhniitVU2q1EKbMtCO9s7mhzaLEuLHPPfOmjVCs/s2048/20200905_205823.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/AVvXsEjRLZHFrycRpXQDe2bG0ZAfQSRHFCHwDrpDGsgQS_ywvk6iliW2xqmWEr1A1KGNl3xDokSd6af_5YYQOqBNFekudCRa-Q9D4RkxHl1RHhniitVU2q1EKbMtCO9s7mhzaLEuLHPPfOmjVCs/s320/20200905_205823.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS-46oM2OfqJ2YVMdiKOrJOoUAKzvEl_Fttcl3l2kqY0hrbITgjYD-Jv9-hZOqnxFk7R3rhMOibRxQSuUE0Qx25m1eLq95I8JYMtowgQ13ztL4-0XLv-bTdmfzLIvmlvGkDKhImZPEHks/s2048/20200905_205826.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/AVvXsEgS-46oM2OfqJ2YVMdiKOrJOoUAKzvEl_Fttcl3l2kqY0hrbITgjYD-Jv9-hZOqnxFk7R3rhMOibRxQSuUE0Qx25m1eLq95I8JYMtowgQ13ztL4-0XLv-bTdmfzLIvmlvGkDKhImZPEHks/s320/20200905_205826.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Here are some images of the build process. First, there is the printed cube with vellum glued to the inside. <div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoQVANo6Pw5XqQNzSShu42imrsZ2lP9zFYzhwKGIsCSt36rzZJM7pnBBO8bsqXBN1FEi4OzS5Ue3zFRrd0bGOrwReQM387wAyNEwOSrtTXNb_E5oydP0Oh2geJRuHbRgz72W3JbmFRmxM/s2048/20200905_191631.jpg" style="clear: left; float: left; margin-bottom: 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/AVvXsEgoQVANo6Pw5XqQNzSShu42imrsZ2lP9zFYzhwKGIsCSt36rzZJM7pnBBO8bsqXBN1FEi4OzS5Ue3zFRrd0bGOrwReQM387wAyNEwOSrtTXNb_E5oydP0Oh2geJRuHbRgz72W3JbmFRmxM/s320/20200905_191631.jpg" /></a></div><span> </span><span> </span><span> </span><span> </span><span> <span> </span><span> </span></span><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCkeSsYmNwKtgqFJRrbxJkwqIsDgIwiTI6u9T3754SVV-plFG3mb9II86i5pN_d9wAmfiIcir-Xgco7jarzbF1NX5ysf7qoj5mz5vjVywYIReoqyNxAB5K8L95nOwklrjWwTXtoUK6EyU/s320/20200905_191646.jpg" /><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUbsHBI1Kt0RRZs8ywhb6R1U9-KR89ENOHhZ6U4Y-CJtf2K6xl3lAzGDQCAMSUbUSzZM69n0PNIxefVnzR6dnVbqha9gLtRhiLpjBcUyALipf6Lwb0LGBevMlJXwF3jwXPyqkOjCuB8vw/s320/20200905_191713.jpg" /><span> <span> </span><span> </span><span> </span><span> </span><span> </span><span> </span><span> </span></span><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOK5XDKnue2HkP3Xh8wzuK32yOMlV-6MHWTGodgo-Ss48LdM07a-hTDPq-o5cAqNeCKOY-IEWPmDUiDnkAz1ElmSIXuOX7cpr9WKU4iWREDqWRv8kONkH2ROCWQ8heyjKY0kPvoFn2hXY/s320/20200905_191732.jpg" /><br /><br /><div><br /><p>The system is run by a NodeMCU ESP8200 board. </p><p><br /></p><p>Here's a video of the system in action with the cycles sped up to show the colors.</p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/KUSUFOUvV8M" width="320" youtube-src-id="KUSUFOUvV8M"></iframe></div><br /><p><br /></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-24688398247797981882019-12-19T12:56:00.000-08:002019-12-19T18:02:01.644-08:00Hacking a cheap RGB LED light bulb in order to keep foreign, closed source firmware off of the networkGotta love Black Friday sales. This year I picked up a pair of Merkury RGB LED light bulbs for $15 to see what I could do with them. I assumed that it would be using an ESP8266 and thankfully I was ultimately right, but let's not get ahead of ourselves...<br />
<br />
<br />
When I opened the box and started searching online for information on these bulbs, I wasn't able to find much information and certainly not any write-up about it. Hopefully this helps the next guy.<br />
<br />
The bulbs are branded Merkury, but ultimately they seem to be manufactured by Tuya as most smart bulbs are. Immediately I was able to find the absolutely amazing <a href="https://github.com/ct-Open-Source/tuya-convert" target="_blank">Tuya-Convert</a> project. Using Tuya-Convert is entirely automated so understanding the nuts and bolts is not strictly necessary. To summarize the project: it uses a Linux system with WiFi (like a Raspberry Pi) to start a special Access Point SSID along with a web server, DHCP server, and DNS server so that the ESP8266 auto-connects to that AP and all DNS queries and URLs are redirected to the server so it can ultimately lie about a firmware update being available. Once the server lies to the ESP, the ESP attempts to download the firmware update which is our own custom firmware image (Tasmota & ESPurina are included, but any firmware will work.) Once the ESP flashes the firmware it is then able to be reconfigured or reflashed at will. Tuya-Convert is an incredible project and can help you flash firmware completely over the air (OTA.) Do not bother with the Geeni app in the Play Store or App Store.<br />
<br />
As amazing as Tuya-Convert is, bad things can still happen. I was able to flash one bulb and get it working 100% without opening it up. However, when I was experimenting with the second one, I got a bad flash or bad config. Which meant I needed to open it up.<br />
<br />
Let's start with the LEDs themselves:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsl8cGK0z8aZX9FkOene47eVsxCxw9RLqR1TE2CBido5AzSWp5IAJuy3mwF0lc9PO4dr4rR8-gJfOYtro1Y23eYmLMjeu3mEncLIAL-DqHcCW3C1KUveTXtv5Sr0u5vdU3obft8YIs3cc/s1600/20191128_221814.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsl8cGK0z8aZX9FkOene47eVsxCxw9RLqR1TE2CBido5AzSWp5IAJuy3mwF0lc9PO4dr4rR8-gJfOYtro1Y23eYmLMjeu3mEncLIAL-DqHcCW3C1KUveTXtv5Sr0u5vdU3obft8YIs3cc/s320/20191128_221814.jpg" width="240" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDX5QeSDPQwEv3PG0yL9FIqKvQd2ARftHMfnIA5t0qLrLZ78akYbjZy3ZVV4gLJxsrjhCKj-K-IqZmkgD6dr3_p428puWj0zmPixbnYMX8Oj1ueRcOEM8UwZfme59DDKUXMjUTGvn4EjE/s1600/20191128_221822.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDX5QeSDPQwEv3PG0yL9FIqKvQd2ARftHMfnIA5t0qLrLZ78akYbjZy3ZVV4gLJxsrjhCKj-K-IqZmkgD6dr3_p428puWj0zmPixbnYMX8Oj1ueRcOEM8UwZfme59DDKUXMjUTGvn4EjE/s320/20191128_221822.jpg" width="240" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSdK-LVtnnSXt47ssveXpZnL67oHV3nqXTTA6sMIgjc9-7A4mb6M5SCdqcWrCmE1W6KH_UyeB8tjeErrgq2UYWjPpQvXfvjLaRmnk5V6b6qI8Ey8jwBnQAgdGh7z-6pAK8sGrPg3owh5s/s1600/20191128_221830.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSdK-LVtnnSXt47ssveXpZnL67oHV3nqXTTA6sMIgjc9-7A4mb6M5SCdqcWrCmE1W6KH_UyeB8tjeErrgq2UYWjPpQvXfvjLaRmnk5V6b6qI8Ey8jwBnQAgdGh7z-6pAK8sGrPg3owh5s/s320/20191128_221830.jpg" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2GdlsXMTBlJgdsxkYhlXR4_8YGyqwXBTKXaObrGisl2FgvmP8Nvg71vwdYMxpo8kUFITVh-2fw_J3pREm7NprHCjrw9XcB_cXBu15zcn1QKA0w1gn5EGc8PjcT7HtLPGf7U2W24zY2k/s1600/20191128_221838.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK2GdlsXMTBlJgdsxkYhlXR4_8YGyqwXBTKXaObrGisl2FgvmP8Nvg71vwdYMxpo8kUFITVh-2fw_J3pREm7NprHCjrw9XcB_cXBu15zcn1QKA0w1gn5EGc8PjcT7HtLPGf7U2W24zY2k/s320/20191128_221838.jpg" width="240" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
As you can see above, there is a ring of the "white" LEDs and 6 of the RGB LEDs sitting toward the center. All of the LEDs are dimmable. This layout is an interesting design choice and it helps explain why this bulb has a rated brightness of 1080 lumens when most other bulbs are currently closer to 800 lumens.<br />
<br />
So what's inside?! After using a small cutting tool or razor blade to cut the adhesive around the diffuser globe, we can remove it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE0rTpLJYFKvSVLMaXyHcwUXHWgoHEbvxQbeUkwcASwSDcnMibPBHN3pyjZzmXfTmixTh-VMLtrOJKrN_uanx0ZfZyItmwSPS6STXb5LtdQPBcpg-E1rVEgzaPIWfnwFRmYm5y11G1N9s/s1600/20191202_192312.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE0rTpLJYFKvSVLMaXyHcwUXHWgoHEbvxQbeUkwcASwSDcnMibPBHN3pyjZzmXfTmixTh-VMLtrOJKrN_uanx0ZfZyItmwSPS6STXb5LtdQPBcpg-E1rVEgzaPIWfnwFRmYm5y11G1N9s/s320/20191202_192312.jpg" width="240" /></a></div>
<div style="text-align: center;">
<span style="font-size: x-small;">With the diffuser removed, we can now see all of the LEDs, the LED driver IC (more on this later), the ESP8266 antenna, some test pads, and the pin connector.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once the diffuser is removed, use the cutting tool to cut the white silastic-type adhesive. The aluminum plate that the LEDs are attached to will need to be gently pried out once the silastic has been cut.</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/AVvXsEhYTtB8_Vt-pv3qayW5iLMlIZKkGuGwp_yS6SFW4sobLR1G8dFakgG3C8d2qC2iOmn02_Bt9QCcS_3VhgmOl4QHLzB9mk7nybtOojNs1YnmWqOrB7YEoUpUFVDKMUBOgZBvMrhMu9VMJFQ/s1600/20191202_203104.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYTtB8_Vt-pv3qayW5iLMlIZKkGuGwp_yS6SFW4sobLR1G8dFakgG3C8d2qC2iOmn02_Bt9QCcS_3VhgmOl4QHLzB9mk7nybtOojNs1YnmWqOrB7YEoUpUFVDKMUBOgZBvMrhMu9VMJFQ/s320/20191202_203104.jpg" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikVFKO4QI1QM16lpfMAfPCEoqX4yAa2rt7AQcgX17rWVo33DmQWE2043sLUCA7PyEDvs3acJPIncb3tiTTYyGuLkMPaRYIQaUeJHxnhMiYU9ajhthWx_45dswSG3sGDcYSl0b-MI8EC_o/s1600/20191202_203136.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikVFKO4QI1QM16lpfMAfPCEoqX4yAa2rt7AQcgX17rWVo33DmQWE2043sLUCA7PyEDvs3acJPIncb3tiTTYyGuLkMPaRYIQaUeJHxnhMiYU9ajhthWx_45dswSG3sGDcYSl0b-MI8EC_o/s320/20191202_203136.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">Inside we find a double-sided PCB with some through-hole components as well as a lot of SMD components.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
At this point we can see that the PCB is double-sided. The "top" has several capacitors and an inductance coil so we can probably assume that it handles some of the AC to DC conversion and power supply aspects while the components on the "bottom" likely include the switch mode power supply regulator and, to quote Mehdi, the FULL BRIDGE RECTIFIER!! among other components. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It turns out that you can remove the cap from the tip of the base to detach one of the AC lines and the second can be popped off of the internal aluminum cup that holds the board. This will allow you to completely remove the PCB. I was able to just pop the tip back together for the hot wire, but I had to solder the neutral back to the side of the aluminum cup/case. I believe it may have been spot-welded at the factory. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Once removed you can get a good look of the "bottom" of the PCB. Unfortunately I didn't think to take a good photo of it, but you can see that this board produces 3.3V for the ESP8266 as well as 12V for driving the LEDs. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkKZKFezOQ0rcWEPSBP19hX3mVIRGxCfcnfCm4PtTujLTzKxYTZd5tFfLBrkP6LSdZTfCZPQolk64hTY-zrsG2gc1RO94xQTTjYanTfx9Nxnef_gpmdb0aMWX9UaTcIBXaq_krdtxuGek/s1600/20191203_115838.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkKZKFezOQ0rcWEPSBP19hX3mVIRGxCfcnfCm4PtTujLTzKxYTZd5tFfLBrkP6LSdZTfCZPQolk64hTY-zrsG2gc1RO94xQTTjYanTfx9Nxnef_gpmdb0aMWX9UaTcIBXaq_krdtxuGek/s320/20191203_115838.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">With the board removed, we can easily get to the RX, TX, Ground, 3v3, and GPIO 0 pads so we can flash it over serial. </span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you are better at reading than I was at around midnight when I was working on this, you'll notice that label where the blue wire is connected reads "IO0" and is actually GPIO 0, which is required to be pulled to ground in order to enter flash mode. Apparently I misread what was under that black scorch mark near the gray wire and couldn't figure out why the hell the ESP wasn't recognized by my computer. <facepalm> So we can see the RX, TX, and GPIO 0 wires connected here while 3v3 and ground are connected on the back. I hooked this up to my 3.3V capable FTDI serial board and flashed the latest version of <a href="https://github.com/arendst/Tasmota" target="_blank">Tasmota</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now, on to the board configuration once it's flashed. Tasmota won't do a whole lot of good unless you have it configured correctly. This is the step that was the most difficult because of the lack of information online. I looked up what I could about the LED driver IC that was on the LED board with virtually no luck. The part number is either SM726EB or SM276EC, depending on the version of the board. After a lot of trial and error, I finally figured out that this chip operates the same way as the SM16716 in that it needs a data and clock signal in order to function. If you are using Tasmota and are looking for the proper settings for this device, look no further. The following template should work:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: "courier new" , "courier" , monospace;">{"NAME":"Merkury Smart Bulb","GPIO":[0,0,0,0,37,38,0,0,141,142,140,0,0],"FLAG":0,"BASE":18}</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Alternatively, you can configure it manually with the following:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Device: <span style="font-family: "courier new" , "courier" , monospace;">18 (Generic)</span></div>
<div class="separator" style="clear: both; text-align: left;">
GPIO4: <span style="font-family: "courier new" , "courier" , monospace;">PWM1 (white/yellow LED temperature)</span></div>
<div class="separator" style="clear: both; text-align: left;">
GPIO5: <span style="font-family: "courier new" , "courier" , monospace;">PWM2 (white/yellow LED brightness)</span></div>
<div class="separator" style="clear: both; text-align: left;">
GPIO12: <span style="font-family: "courier new" , "courier" , monospace;">SM16716 DAT (RGB LED Driver Data; Color and Brightness)</span></div>
<div class="separator" style="clear: both; text-align: left;">
GPIO13: <span style="font-family: "courier new" , "courier" , monospace;">SM16716 PWR (RGB LED Driver Power)</span></div>
<div class="separator" style="clear: both; text-align: left;">
GPIO14: <span style="font-family: "courier new" , "courier" , monospace;">SM16716 CLK (RGB LED Driver Clock)</span></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/AVvXsEimtjrJ3nDdpVtJcYgdDokuh_vK7HmGreoKYfYk8SYsBFEu7WxvauZP7zUWq6N2w_a_rTK3GHR0U11wIAUfDwbpS9JVZnSGYt2GufvY6R2ndOimiHiGrY3xKt-LQlDev9n-faKRuvkZ5DU/s1600/tasmota_merkury_smart_bulb.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="666" data-original-width="349" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtjrJ3nDdpVtJcYgdDokuh_vK7HmGreoKYfYk8SYsBFEu7WxvauZP7zUWq6N2w_a_rTK3GHR0U11wIAUfDwbpS9JVZnSGYt2GufvY6R2ndOimiHiGrY3xKt-LQlDev9n-faKRuvkZ5DU/s1600/tasmota_merkury_smart_bulb.PNG" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYgmH7YTPqGnQLXp-B2IzETKcdX8m9LiTqyO3JNP58LeOF4fC2uLbVj3B0NXnBkKZlN-I1TT7YGu_NVRPLjgGgLDI-sOnpz7mfFFjCWe2Xtobit8aUPERfGQI6zYIZwGQlNx5s6roqxaA/s1600/tasmota_merkury_smart_bulb_1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="744" data-original-width="390" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYgmH7YTPqGnQLXp-B2IzETKcdX8m9LiTqyO3JNP58LeOF4fC2uLbVj3B0NXnBkKZlN-I1TT7YGu_NVRPLjgGgLDI-sOnpz7mfFFjCWe2Xtobit8aUPERfGQI6zYIZwGQlNx5s6roqxaA/s1600/tasmota_merkury_smart_bulb_1.PNG" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />
Once Tasmota is configured, it should have sliders for the different LEDs and the API can be configured to integrate into the desired home automation system. Now we can enjoy our smart bulb without certain governments snooping on our every move and who-knows-what-else via the apps that would otherwise need to be on our phones. Happy hacking!<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As always, if anyone has questions or sees a mistake, please don't hesitate to comment. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-458428706535714973.post-41754947953506668182019-09-30T18:47:00.000-07:002019-09-30T18:47:46.245-07:00Adding Qi wireless charging to SoundPeats Bluetooth wireless headphonesHi! It's been quite a while since I last posted. Please accept my apologies; I'm looking forward to sharing several new projects with everyone over the next couple of months.<br />
<br />
So let's get on with it.<br />
<br />
I recently purchased a set of wireless headphones from Amazon and they have turned out to be surprisingly good. Except one thing. How can a set of headphones call itself "wireless" when you have to plug them in?!<br />
<br />
The headphones in question are <a href="https://amzn.to/2nd4tFd" target="_blank">SoundPEATS TrueFree +</a>. I have no connection with Amazon or this... SoundPEATS (?) company outside of being a customer. And, so far, a reasonably happy customer at that. I've also previously purchased a Qi wireless charging kit for my old Galaxy S5 that has come and gone, but I saved the charging coil "just in case." Well, today ended up being that day.<br />
<br />
First, I used some guitar picks to open the travel/charging case of the headphones. I've not been able to find any photos of a teardown, so if someone is looking for a teardown or disassembly of SoundPEATS TrueFree + then I hope Google brings you here.<br />
<br />
The teardown showing the 800mAh battery:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQFLljH3b4ns_3bMDZUinuc3qLc8t2jf_-dMFs5gbpbbJXNPNHE4tTaRt9IoigV4dL4XDZBjucyM5IRk1OdQgJSMEV5fxIzTkKVbrrP4f1bRA1Hjpl9W_XylpzKaak4VTmlxMolRUYZ3I/s1600/20190930_153739.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQFLljH3b4ns_3bMDZUinuc3qLc8t2jf_-dMFs5gbpbbJXNPNHE4tTaRt9IoigV4dL4XDZBjucyM5IRk1OdQgJSMEV5fxIzTkKVbrrP4f1bRA1Hjpl9W_XylpzKaak4VTmlxMolRUYZ3I/s400/20190930_153739.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjspnUauaMSSWi0SLb-A9dgynpI6Vs_xMnDHMqwsqzvAqs_i5W0779HljSicgpMspjujhlZllxZEJVkqQ4CKqG_bPvAEbwsuf90elkIH9EYJ2o__kcwUjuVjXrf1iJnry1TVJXFzyKzPcI/s1600/20190930_153744.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjspnUauaMSSWi0SLb-A9dgynpI6Vs_xMnDHMqwsqzvAqs_i5W0779HljSicgpMspjujhlZllxZEJVkqQ4CKqG_bPvAEbwsuf90elkIH9EYJ2o__kcwUjuVjXrf1iJnry1TVJXFzyKzPcI/s400/20190930_153744.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyhC5-071H1lOQjbk9unuJKyjps1mSBNWR2P3BxtQ1bPSxUUBXrwJnDnZw3YkARti11rXGfJZwVB191SBsI7PLFS9kEJEjWLavNZE4IV7aKVpIMBavt8mul7bl4V3qem1gFdnteFo9qN0/s1600/20190930_153757.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyhC5-071H1lOQjbk9unuJKyjps1mSBNWR2P3BxtQ1bPSxUUBXrwJnDnZw3YkARti11rXGfJZwVB191SBsI7PLFS9kEJEjWLavNZE4IV7aKVpIMBavt8mul7bl4V3qem1gFdnteFo9qN0/s400/20190930_153757.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrwcL6XR9RFvK_uCU5UdCtzeNgeNKWMqZht2C0BG5Cd8k-t3zVdgNP_MWcQBhEJLcjVjhR-GIC8bN-XejcC68kP4mzHg75nUaNhW3TOctCbeRsSXLE_ezCaaTvaZN78aUiR5rBxP0Wv8k/s1600/20190930_153932.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrwcL6XR9RFvK_uCU5UdCtzeNgeNKWMqZht2C0BG5Cd8k-t3zVdgNP_MWcQBhEJLcjVjhR-GIC8bN-XejcC68kP4mzHg75nUaNhW3TOctCbeRsSXLE_ezCaaTvaZN78aUiR5rBxP0Wv8k/s400/20190930_153932.jpg" width="400" /></a></div>
<div style="text-align: center;">
<span style="font-family: inherit; font-size: x-small;">I've seen this battery reported as 800mAh and it appears that is accurate.</span></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
With the case open, we can start eyeing our Qi coil to make sure it's going to fit reasonably well. Here is the coil that I had on hand.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9oQ5jtx2mEBlKS86xVUSCuAigAtyk-NbYyXP9e1-zSD2w4ylIj9xe6-ViLVttmb5_SfBRLRjTwMQMt-3r0i0ZXBCc0LBxm931QaOPRfZb_1S34gt5mBDL2wfkUjriiuwHU8UUGHHf4EI/s1600/20190930_154243.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9oQ5jtx2mEBlKS86xVUSCuAigAtyk-NbYyXP9e1-zSD2w4ylIj9xe6-ViLVttmb5_SfBRLRjTwMQMt-3r0i0ZXBCc0LBxm931QaOPRfZb_1S34gt5mBDL2wfkUjriiuwHU8UUGHHf4EI/s400/20190930_154243.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">The 600mAh Qi charging coil</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZkFyoMw9zIYbzLlUYG6mqXPndwBnKrH-25fSAwojguqNQHxjFM5zH5hzdNlEHsQLp0QcJL-HFZVGPhEghegAVxOTv2WhUn0fzVU-NGMuUHeuQVbCey2yBSj6gMsU5U4zhI5N4EQJgKw0/s1600/20190930_154325.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZkFyoMw9zIYbzLlUYG6mqXPndwBnKrH-25fSAwojguqNQHxjFM5zH5hzdNlEHsQLp0QcJL-HFZVGPhEghegAVxOTv2WhUn0fzVU-NGMuUHeuQVbCey2yBSj6gMsU5U4zhI5N4EQJgKw0/s400/20190930_154325.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">It fits!!</span></div>
<br />
<br />
So the way the charging coil fit in the Galaxy S5 is that the 3 pins (actually, they are small cubes) make contact with the 3 springs inside of the battery cover.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLlzbauhpc7UuGqOGx6_tKue3-OVssLuyGOcugoh3BujKIqoPCQVW9XOgzzifcdaR5sbVFwDNmp7xp824eC4V7CYnGwoVFKVkJGKR5xl21z0uFZbHTrQV2g_zBRuMWP9gGAScnu6Hwmy0/s1600/sgs5.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="360" data-original-width="480" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLlzbauhpc7UuGqOGx6_tKue3-OVssLuyGOcugoh3BujKIqoPCQVW9XOgzzifcdaR5sbVFwDNmp7xp824eC4V7CYnGwoVFKVkJGKR5xl21z0uFZbHTrQV2g_zBRuMWP9gGAScnu6Hwmy0/s320/sgs5.jpg" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR9cBHRgDjwPBB_JQ2Gy2hLC6FG9wKbB9TC5UJVAdzhnteaiSVC0RgwmsU-X51bBq_729RKiDgJzmuwsRLe-lfSgtqxD5joqXAxas064eusEiSI96Hp-8rKbTh0AzVCRbngp45BsItkDc/s1600/20190930_155606.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR9cBHRgDjwPBB_JQ2Gy2hLC6FG9wKbB9TC5UJVAdzhnteaiSVC0RgwmsU-X51bBq_729RKiDgJzmuwsRLe-lfSgtqxD5joqXAxas064eusEiSI96Hp-8rKbTh0AzVCRbngp45BsItkDc/s320/20190930_155606.jpg" width="240" /></a><br />
<span style="font-size: x-small;">[Right] I had to remove the +5V and ground terminals from the charging coil in order to get a clean solder connection.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54J4qZdpRlAzP-HVmYwx88lngI1xTs0Ielnkpu74OfSowpvnayua4qkGMJ_te6E0KNAP50kj2BervBU2Nldyl9Wlgfl2TTNZ9mmasSRoblKTM0BCfU65RJl0Bu1Ed6Kv48ZbC8NKtIRU/s1600/20190930_155146.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg54J4qZdpRlAzP-HVmYwx88lngI1xTs0Ielnkpu74OfSowpvnayua4qkGMJ_te6E0KNAP50kj2BervBU2Nldyl9Wlgfl2TTNZ9mmasSRoblKTM0BCfU65RJl0Bu1Ed6Kv48ZbC8NKtIRU/s640/20190930_155146.jpg" width="640" /></a></div>
<div style="text-align: center;">
<span style="font-size: x-small;">The board is single sided. </span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
The next task was to examine the board and find out if there were any pads that were on the VCC and ground traces. Using my multimeter, I was able to find a ground pad next to the large IC and a VCC pad close to the MicroUSB port. These pads are circled below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsvNt-FVnQEtDpj1yMgHS1AKCBAbUxtZdkfY34ZUCf5ppJd6pdBE-gM3kiPkTcZeian2vhg_wc9Vhsagje3w5mD93RlcIZEXmTNgPZCx2KpkEnHgNlc4D1If5lhuwkOjK2VkXRaLzX8G8/s1600/pads.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsvNt-FVnQEtDpj1yMgHS1AKCBAbUxtZdkfY34ZUCf5ppJd6pdBE-gM3kiPkTcZeian2vhg_wc9Vhsagje3w5mD93RlcIZEXmTNgPZCx2KpkEnHgNlc4D1If5lhuwkOjK2VkXRaLzX8G8/s640/pads.png" width="480" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<span style="font-size: x-small;">The board is fairly well laid out and it provides 5V DC to each of the ear plugs which will have their own battery management system.</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
After attaching everything, it's time to test.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG2LghjRAXDe2V7e4tlrNzzu5oP6L3t7ls7P_p8XX8duvRRnGDu57VgwOEOtOSsAc7mRXmswsJ9mAw5XZ_7q8d7hHNIvt_xTxH3gPUUB8efMTS3NdXUDsXWcKKyRaKfHIsfRRHiwANcE/s1600/20190930_161035%25280%2529.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaG2LghjRAXDe2V7e4tlrNzzu5oP6L3t7ls7P_p8XX8duvRRnGDu57VgwOEOtOSsAc7mRXmswsJ9mAw5XZ_7q8d7hHNIvt_xTxH3gPUUB8efMTS3NdXUDsXWcKKyRaKfHIsfRRHiwANcE/s640/20190930_161035%25280%2529.jpg" width="480" /></a></div>
<div style="text-align: center;">
<span style="font-size: x-small;">It works!! The charger indicator is blue and the charging LEDs on the board are illuminated.</span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div style="text-align: left;">
Now it's time to get everything put back together. </div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN9JDkbgrdt1TCXEM583SOMpqYix2j2_TL7cKQ3KoifjS9szwEFMOxbT2ESQwOhSUYuPfEcXAwItmhYu0jBl1i9AUbmPztaCW7SK7m0838MzUzHYBaIqjTgnngYbtUtk3-HOh2XzwE3xw/s1600/20190930_162505.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN9JDkbgrdt1TCXEM583SOMpqYix2j2_TL7cKQ3KoifjS9szwEFMOxbT2ESQwOhSUYuPfEcXAwItmhYu0jBl1i9AUbmPztaCW7SK7m0838MzUzHYBaIqjTgnngYbtUtk3-HOh2XzwE3xw/s640/20190930_162505.jpg" width="480" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">I made sure to put some hot glue under the pogo pins to ensure that they stand proud on the other side and connect to the ear buds properly. </span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrn922X9kbrE5n_i_5TnRyPPHErsyLBsMpctEY4738BtyVN9xQhrORq-mF7A4Lv37lF1MuBuTf6YrQnzwPo54fUSuHIKQBUTakehYX11A1NRcl3kBFLml6Ly38f2jkwTKvzZOoKB42eLA/s1600/20190930_163142.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrn922X9kbrE5n_i_5TnRyPPHErsyLBsMpctEY4738BtyVN9xQhrORq-mF7A4Lv37lF1MuBuTf6YrQnzwPo54fUSuHIKQBUTakehYX11A1NRcl3kBFLml6Ly38f2jkwTKvzZOoKB42eLA/s320/20190930_163142.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">Carefulling...</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_IezxVQnZ9MMZ1RPTRUd0ZaNLuYCtw92wCc0_tGZj3v3YJwi_q8j6Jm-moQ9qTSgMkhZ4OSr1ID4p-hj4zkpoxqrsONgzzR_7n705BO1wbYTYfS6aH64BzG_y6oafqGWPGQp-xABztjM/s1600/20190930_163150.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_IezxVQnZ9MMZ1RPTRUd0ZaNLuYCtw92wCc0_tGZj3v3YJwi_q8j6Jm-moQ9qTSgMkhZ4OSr1ID4p-hj4zkpoxqrsONgzzR_7n705BO1wbYTYfS6aH64BzG_y6oafqGWPGQp-xABztjM/s320/20190930_163150.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">Bend it over... Still carefulling...</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Once it's in the case, I snapped everything back into place. It worked out well with only a couple of <a href="https://bumblefuckerytoenglish.com/" target="_blank">apprentice marks.</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPt4OFwDBbN0oFM3PD3XQ6cD9J_ZdN2IzB-_vC94ckNhQVOGjPy72ykOhcV9DO7B5WDRkKD8ucd65JyqDmhLqC8Hjuml5TcvEeeNka8jH-n9FkdfKarMOG-raQdEg7AOFwLM82GdpnqOQ/s1600/20190930_164225.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPt4OFwDBbN0oFM3PD3XQ6cD9J_ZdN2IzB-_vC94ckNhQVOGjPy72ykOhcV9DO7B5WDRkKD8ucd65JyqDmhLqC8Hjuml5TcvEeeNka8jH-n9FkdfKarMOG-raQdEg7AOFwLM82GdpnqOQ/s400/20190930_164225.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIVIPgNO_ZE9urJKeUxWBRC3mxdcjTVZq2A1TKeVJRJof2M_EmjOtzp2jDmONTLB-eaWCF7cqUyaiWxk4H_duQIZhfahJSnoOCZpdGbtZhtsSud55rCzWzbellp3dMzipN1d5seO3tAFA/s1600/20190930_164234.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIVIPgNO_ZE9urJKeUxWBRC3mxdcjTVZq2A1TKeVJRJof2M_EmjOtzp2jDmONTLB-eaWCF7cqUyaiWxk4H_duQIZhfahJSnoOCZpdGbtZhtsSud55rCzWzbellp3dMzipN1d5seO3tAFA/s400/20190930_164234.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsom0wFE1ScNVEWs0agmE6TeibCFF7c1ZVO0StEcv4CcP9D_urWgKnDKjqK5qt2BHFUTc7LPA89SUuzfse9z8E9aC9CDMf20sufvawd1dPYoiPpTsSOH1eJfsKovsMlr9inHDV35aD_6Y/s1600/20190930_164243.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsom0wFE1ScNVEWs0agmE6TeibCFF7c1ZVO0StEcv4CcP9D_urWgKnDKjqK5qt2BHFUTc7LPA89SUuzfse9z8E9aC9CDMf20sufvawd1dPYoiPpTsSOH1eJfsKovsMlr9inHDV35aD_6Y/s400/20190930_164243.jpg" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTMbvofLOPtc77S2-HnJjCr58mx4Bjqr4sX6uQbGIquRxSkg5e10rDXr6ZxmpV8oXR4p8zD2LSKQi-ViVEd0VLI3K4yFN68QO-sBHWYaAmQZMeAbuWg01pQblA-EkYAQaIxBza-KfxnA/s1600/20190930_164345.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlTMbvofLOPtc77S2-HnJjCr58mx4Bjqr4sX6uQbGIquRxSkg5e10rDXr6ZxmpV8oXR4p8zD2LSKQi-ViVEd0VLI3K4yFN68QO-sBHWYaAmQZMeAbuWg01pQblA-EkYAQaIxBza-KfxnA/s400/20190930_164345.jpg" width="400" /></a></div>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Now my wireless headphones are truly wireless!<br />
<br />
<div style="text-align: left;">
As always, I'm happy to answer any questions. Thanks for checking it out.</div>
<div style="text-align: center;">
<br />
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----
" />
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" />
<img alt="" border="0" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" />
</form>
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-77631210127542346342017-12-31T22:58:00.001-08:002018-01-01T18:27:38.891-08:00An updated version of my Clock for Kids<div class="separator" style="clear: both; text-align: left;">
Now that my daughter is 5 and is able to tell time, I wanted to make a new clock for my 3 year old son. Since my first prototype was green, I passed it down to my son and built a new pink clock for my daughter. Just like v1, v2 does not change any of the functionality of the clock itself, it only adds an RGB LED.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://dhowdy.blogspot.com/2015/02/building-clock-to-help-kids-tell-time.html" target="_blank">Here is the link</a> to my first version. It was powered by a Raspberry Pi Model B (not B+). Now that the Pi Zero W is out and it fits perfectly inside of these clocks, I decided to use it for v2. The clock is the same Walmart alarm clock as the first one. Here are some of the photos from the build process:</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/AVvXsEjiG4SGgHfXQJHrt-OEjuaeGAA5mHtTAtzoGf0fd_7vAFJuTugH4aprtYEfhw2KQzyHWrE-Rx5GSbIE6Ea3A8oExCw2UFbUKLY4X_hi9mp_ZFkOm08yOLHXB14BTsc8I5NO4vK8wAqS6XU/s1600/20180101_164932.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiG4SGgHfXQJHrt-OEjuaeGAA5mHtTAtzoGf0fd_7vAFJuTugH4aprtYEfhw2KQzyHWrE-Rx5GSbIE6Ea3A8oExCw2UFbUKLY4X_hi9mp_ZFkOm08yOLHXB14BTsc8I5NO4vK8wAqS6XU/s400/20180101_164932.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">Obligatory finished product image first.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZijmeHuWqCZA51o2QGb6oRgu6FamJ1VnW1JH-E4a52rKxBNcNXjZV1scKP0NTCMrDhyphenhyphenXgRxgci2N_HF4lGGYocadfIvf5xNTXDzGz-NId3_Mj2MUOK4T-5Vo7pFnKsTf7BnL5kXCCpJM/s1600/20171218_213213_001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZijmeHuWqCZA51o2QGb6oRgu6FamJ1VnW1JH-E4a52rKxBNcNXjZV1scKP0NTCMrDhyphenhyphenXgRxgci2N_HF4lGGYocadfIvf5xNTXDzGz-NId3_Mj2MUOK4T-5Vo7pFnKsTf7BnL5kXCCpJM/s320/20171218_213213_001.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">The BOM is a clock, a Pi Zero W, MicroSD card, and a Shiftbrite. </span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">A Neopixel could be used instead but the Shiftbrite is far brighter.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVFt7yOw3m1AudTQL37c7-a7oLdVV0nKg7iWrhXOFTI1V9PxW2tkVY5JCNBP-4jzajHLvOwcjsLNowWjaIujGiTeVxILKyLpZ_h-Dx9uWcRU2l5ZlUV5u78ppyQRI6an0HSEXJN6jd0CA/s1600/20171218_213909.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVFt7yOw3m1AudTQL37c7-a7oLdVV0nKg7iWrhXOFTI1V9PxW2tkVY5JCNBP-4jzajHLvOwcjsLNowWjaIujGiTeVxILKyLpZ_h-Dx9uWcRU2l5ZlUV5u78ppyQRI6an0HSEXJN6jd0CA/s320/20171218_213909.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">The opening of the "light cone" needed to be enlarged to fit the new LED. My Dremel to the rescue!</span></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;">
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGMLZytbOvPrzNIFAnSaeeydG_iPqKqpFcdFISI_NKLZP4SegcjMvo95lu_dpauJTnBDryU70m7w4yysgTdEoPXrpBDPF-NbcLShMQk4aXySWsIU2mH0swN0OnNEacUix47Akk-n3Th68/s1600/20171218_225134.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGMLZytbOvPrzNIFAnSaeeydG_iPqKqpFcdFISI_NKLZP4SegcjMvo95lu_dpauJTnBDryU70m7w4yysgTdEoPXrpBDPF-NbcLShMQk4aXySWsIU2mH0swN0OnNEacUix47Akk-n3Th68/s320/20171218_225134.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">The wiring for the Shiftbrite and the 3.3v to power the clock's internals.</span></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJay-lPL3pfjKyoGqLKz1PW1w8iMzf7aelC70cTLu_L087kvDjYUgvmWyTGK158Op8fNkF1aX1AqxnQhi7xWizTtEQDIX2WrrEuRK2dUMn_TWk-AK8QTFMixJjV-PnXz37JOz3bHyrLdU/s1600/20171218_225130.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJay-lPL3pfjKyoGqLKz1PW1w8iMzf7aelC70cTLu_L087kvDjYUgvmWyTGK158Op8fNkF1aX1AqxnQhi7xWizTtEQDIX2WrrEuRK2dUMn_TWk-AK8QTFMixJjV-PnXz37JOz3bHyrLdU/s320/20171218_225130.jpg" width="320" /></a></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/AVvXsEhzAxYB8TsUEStBS2f8qqSzbFZ-_peulCShyphenhyphenDfiRVxdp4FfzsSNCkJ_OnrB3gVObfT45bsK9hpKP91EBn1qQsitXRiZURYmveRwi8jXHEZ-gr3jOOmUj8cscxxkKNj1RQIQRjtjN3jB6NU/s1600/20171219_203503.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzAxYB8TsUEStBS2f8qqSzbFZ-_peulCShyphenhyphenDfiRVxdp4FfzsSNCkJ_OnrB3gVObfT45bsK9hpKP91EBn1qQsitXRiZURYmveRwi8jXHEZ-gr3jOOmUj8cscxxkKNj1RQIQRjtjN3jB6NU/s320/20171219_203503.jpg" width="240" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ5IQXvUGSnjUCkMnEqjytL0-CzsDxVneIdJ2-BgoI6KKRR9__oiTd5bu92erTHMQkiYUyE1ukeTILRbi4_PYgAsQsJH2plWnX_0rpbAcOJf9kToAHcs7nVNX0R7QYAo30rWcIOvE6pcI/s1600/20171219_203938.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ5IQXvUGSnjUCkMnEqjytL0-CzsDxVneIdJ2-BgoI6KKRR9__oiTd5bu92erTHMQkiYUyE1ukeTILRbi4_PYgAsQsJH2plWnX_0rpbAcOJf9kToAHcs7nVNX0R7QYAo30rWcIOvE6pcI/s320/20171219_203938.jpg" style="cursor: move;" width="320" /></a></div>
<div>
<br /></div>
<div>
I used the 3.3V line of the Pi to power the clock. The Shiftbrite works on 5V, so I had to run a lot of different wires for everything.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekVEUEh6AChGwF-Jq0oxO_M4ojbYVJgm7pE9BWHvo0z6VEgALR3GkkMrUhnOUO7lkCB46b0Ht4_N9ml4leo6VWr3zY44HFY4hKhTOq2R8PrIjK0Y28qLJs0rHTKgkvDY0ge_aRbd4ks4/s1600/20171219_203942.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekVEUEh6AChGwF-Jq0oxO_M4ojbYVJgm7pE9BWHvo0z6VEgALR3GkkMrUhnOUO7lkCB46b0Ht4_N9ml4leo6VWr3zY44HFY4hKhTOq2R8PrIjK0Y28qLJs0rHTKgkvDY0ge_aRbd4ks4/s320/20171219_203942.jpg" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSNSikG54FyAQbmxnb3zSoc5S4PQtLqAKHpwkPqAbQH1A3tstZLxdoS0xvvXdKOG8q5Ibg7BMKc8YwIqC_j5eW4anLmkBo0ZM8cfiAEL1PlD31EKXM3BxEz161sJDvrtOP8fodWXaJ27A/s1600/20171220_195658.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSNSikG54FyAQbmxnb3zSoc5S4PQtLqAKHpwkPqAbQH1A3tstZLxdoS0xvvXdKOG8q5Ibg7BMKc8YwIqC_j5eW4anLmkBo0ZM8cfiAEL1PlD31EKXM3BxEz161sJDvrtOP8fodWXaJ27A/s320/20171220_195658.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;">
The Pi Zero W fits in the clock perfectly.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_FEm2i-OFFfXLLkOrJtXwvXRHzCxJWHatP3H0iX7U87GPZ5OwPU0fYzw1JQKyHF0IgrksDLgLC2UpDozPI57RNApTUqUKN57zKu5R7zMaPE1VhwDlaXtxZ-24d1a0BMVGu-o5YjzTAr8/s1600/20171220_195852.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_FEm2i-OFFfXLLkOrJtXwvXRHzCxJWHatP3H0iX7U87GPZ5OwPU0fYzw1JQKyHF0IgrksDLgLC2UpDozPI57RNApTUqUKN57zKu5R7zMaPE1VhwDlaXtxZ-24d1a0BMVGu-o5YjzTAr8/s320/20171220_195852.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">A notch cut out of the back to power everything.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhenasTqWGBCjK7dDOkJ2PFRYUvQ0Z4YY5g_Fi7ei3v062uxIDHsk5yXDcr_IbMVD4WEyoDtfdvvX0yxzDOESOPqnpnuHwywABiDKABfFwePR5uUjs3kRn1ltiRSb1akqsleoi_r36ZJ0I/s1600/20171220_201641.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhenasTqWGBCjK7dDOkJ2PFRYUvQ0Z4YY5g_Fi7ei3v062uxIDHsk5yXDcr_IbMVD4WEyoDtfdvvX0yxzDOESOPqnpnuHwywABiDKABfFwePR5uUjs3kRn1ltiRSb1akqsleoi_r36ZJ0I/s320/20171220_201641.jpg" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXB8Qk4sjYPLrQMGq7KIVeWTo2DzEnAgFOBwSPz7_dnBYv_KNzlRaV3rJ_XILtXT7M4ntN5pSQ0AuCJGHKc6EpZelMiwUrrM_5MAlGTvBzVrwR9ec2_wmCSjPxoroqxx4_d1Jf3iCUFOc/s1600/20171220_203858.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXB8Qk4sjYPLrQMGq7KIVeWTo2DzEnAgFOBwSPz7_dnBYv_KNzlRaV3rJ_XILtXT7M4ntN5pSQ0AuCJGHKc6EpZelMiwUrrM_5MAlGTvBzVrwR9ec2_wmCSjPxoroqxx4_d1Jf3iCUFOc/s320/20171220_203858.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">The final fitting.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWm4LiUYBcQlo75I1BRCmToCuC_gp_bnrpb9R2_PQrZ2dNyCS0N153QpjqfHU18SpmMR1z758Z37Z1t8a9ZlJJEnkH9hYrqj3e_cDh7zh1f0dYli5JH0mkRXxJRnnCfYfIfRrSfZMIvOs/s1600/20171220_204220.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWm4LiUYBcQlo75I1BRCmToCuC_gp_bnrpb9R2_PQrZ2dNyCS0N153QpjqfHU18SpmMR1z758Z37Z1t8a9ZlJJEnkH9hYrqj3e_cDh7zh1f0dYli5JH0mkRXxJRnnCfYfIfRrSfZMIvOs/s320/20171220_204220.jpg" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Again, I used pretty much the exact same software from <a href="https://github.com/dhowdy/RPi-ShiftBrite" target="_blank">my GitHub repo</a>. The only real difference between v1 and v2 is in the hardware. Instead of a <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCyScTkCfBKo_5VhQmTIQ1JNiwwk0jzIfcvidJlsQTiTU2mP0mES3OoKDfYyPnEDwVny3vJbQ-ykMQsODK1hNR3P6TJe6sjArUb1otdfUO6Vr9tZ6nXec3r5Y59L8p2K5Ob1arYfuyg-E/s1600/20150221_122207.jpg" target="_blank">3.3V power supply</a> crammed into the system, I used the voltage regulator on the Pi itself so it only needs power input and does not require external wires like v1.<br />
<br />
I'll update this post with photos of the clock operating. Also, I'll be posting soon on how to integrate everything with Google Home. It's very nice to be able to tell Google Assistant to tell the kids it's time for bed.<br />
<br />
<br />
<br />
I'm happy to answer any questions that you might have. If this has helped or inspired anyone, any donations will be very appreciated and will result in more cool stuff being built and posted here. Thanks for checking out my project!<br />
<br />
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----
" />
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" />
<img alt="" border="0" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" />
</form>
<br /></div>
Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-458428706535714973.post-51753574996064984032016-12-09T21:54:00.000-08:002016-12-10T19:39:38.897-08:00DIY Ambilight version 3.1 (and 3.0)<div class="separator" style="clear: both; text-align: center;">
Hey everyone! I've updated <a href="https://dhowdy.blogspot.com/2011/09/diy-arduino-ambilight-using-shiftbrites.html" target="_blank">my DIY Ambilight</a> and wanted to share some of the details!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></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/AVvXsEg61_ptrVJcnIBaW5uLRJILNXZ4CZde830H7nudDV86p1IDXVsJYFbEFmz_yhkCPEkIICG2IvYaDeB8kgqlUYJmJ4TlkBoBxe13f6AUTk6hgmtr_7izb1NUg1XMbLh2y2h4H51NBJ8sbE4/s1600/20161123_230922.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg61_ptrVJcnIBaW5uLRJILNXZ4CZde830H7nudDV86p1IDXVsJYFbEFmz_yhkCPEkIICG2IvYaDeB8kgqlUYJmJ4TlkBoBxe13f6AUTk6hgmtr_7izb1NUg1XMbLh2y2h4H51NBJ8sbE4/s400/20161123_230922.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<div style="text-align: center;">
</div>
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: right;">
</div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/l_ZmDjTC2Qs/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/l_ZmDjTC2Qs?feature=player_embedded" width="320"></iframe><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/dLqCGiJ5l90/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/dLqCGiJ5l90?feature=player_embedded" width="320"></iframe></div>
<br />
<br />
In 2011 I published my instructions for a DIY Ambilight. This was a few months before Phillip Burgess published instructions on Adafruit's site. So while I may have been one of the first to build this, others certainly did a <b>MUCH</b> better job than me.<br />
<br />
I wanted to put instructions out for anyone that is is looking to build their first one or wanting to upgrade the one that they already have. I'm really happy with the LED mount that I was able to put together and wanted to share that as well. Now on to the tech!<br />
<br />
I recently got a new TV which made it necessary to upgrade my DIY Ambilight. I had strand of 25 LEDs, but I added another 50 which necessitated a new build. The display is 44.4" x 25.8" so I decided to make the LED mount roughly 40" x 23" to center on to the back of the display. I used choice lumber from Lowe's for its finish and light weight. The boards I used were 1x2s which are effectively 3/4" x 1 1/2". <br />
<br />
Just like practically any other project like this, we start with an Arduino sketch. I had some serious flickering issues with Adafruit's LEDStream sketch and started googling for a solution. I tried changing the timing to a lot of different values with limited success. Somewhere (and I cannot find it again) someone had posted a copy of the LEDStream sketch modified to use the FastLED library. I found that it worked flawlessly. If I track down the original author will will certainly give them credit. You can find the modified file here: <a href="https://github.com/dhowdy/diy_ambilight" target="_blank">LEDStream with FastLED lib</a>. <br />
<br />
Once you have that loaded on your Arduino, you can hook up your LED strand and start pushing values. I use boblight still and you can find an amazing <a href="http://www.tweaking4all.com/hardware/arduino/boblight-config-maker/" target="_blank">Boblight Configuration Maker here</a>. If you are on Windows, I have a setup for a friend that works amazingly well using <a href="http://lightpack.tv/downloads.php" target="_blank">Prismatik</a>. You can find a 50 LED Prismatik configuration as well as my 75 LED boblight configuration in the <a href="https://github.com/dhowdy/diy_ambilight" target="_blank">same GitLab repo as the Arduino sketch</a>.<br />
<br />
Now to the really fun part - the LED mount. Please observe my first and terrible attempt at a 75 LED mount:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgaqs_ENMArXQz3Z9WmAWb9ocFvL5hSLu6Q4Io1vjo01Da-7lpTcP9jYECDn_iHpSjj3sdDx_82kzeQqiEc_Ib2R36XErPigFV6kflQ5_V4S6Zuo8SS6WlTLtDegQ0AdlTF3SIasU_5YY/s1600/20161123_230912.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgaqs_ENMArXQz3Z9WmAWb9ocFvL5hSLu6Q4Io1vjo01Da-7lpTcP9jYECDn_iHpSjj3sdDx_82kzeQqiEc_Ib2R36XErPigFV6kflQ5_V4S6Zuo8SS6WlTLtDegQ0AdlTF3SIasU_5YY/s640/20161123_230912.jpg" width="360" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Version 3.0. I'm not happy with this at all.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
Pointing the LEDs straight at the wall "worked" but it could be a lot better. I wanted the LEDs pointing out at a 30° angle from the back of the display. After a lot of experimentation, I found that building such a setup was not obvious. I had a miter saw but not much experience with it. Then I found that <a href="http://jansson.us/jcompound.html#nsidedbox" target="_blank">a miter saw calculator existed!</a> If I cut the boards with a blade angle of 37.8° and a miter angle of 26.6°, I could make exactly what I wanted. The depth side of the frame boards came together at a 90° angle while the width of the boards is angled out at a 30°. It's hard to explain, but here are some photos.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFnDja6Puo8BWAzMyvbA3lChMXmb8Ky0trN3vT0BCIsNeYJkJZogWBXZ0pJW7f-umG0unGG5Z4MtdKGRYez8aWp1OhlJ3zpod5qPSIwkK74cQmLO5FQUMJfW4TqvlAHNTNUWgGPdmDmIY/s1600/20161203_154600.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFnDja6Puo8BWAzMyvbA3lChMXmb8Ky0trN3vT0BCIsNeYJkJZogWBXZ0pJW7f-umG0unGG5Z4MtdKGRYez8aWp1OhlJ3zpod5qPSIwkK74cQmLO5FQUMJfW4TqvlAHNTNUWgGPdmDmIY/s320/20161203_154600.jpg" width="240" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjcFWVNGGy2fbkGZr5fyY-ZvmZTRxxMOykpDeBhZLTrQWd8Qlm6aR0D_ClWKTchXXfxX-HMkKPMVZSmO4UlqCxJ4uOAPtaJpzphYby2jUYggUNHTSfx1ahf0yWcDuj5xPSXjkd3WV5nY/s1600/20161203_154540.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjcFWVNGGy2fbkGZr5fyY-ZvmZTRxxMOykpDeBhZLTrQWd8Qlm6aR0D_ClWKTchXXfxX-HMkKPMVZSmO4UlqCxJ4uOAPtaJpzphYby2jUYggUNHTSfx1ahf0yWcDuj5xPSXjkd3WV5nY/s320/20161203_154540.jpg" width="240" /></a></div>
<div class="" style="clear: both; text-align: left;">
Then I needed 2 boards to attach to those angled boards in order to attach it to the VESA mounts on the display. This required building a 60° jig.</div>
<div class="" style="clear: both; text-align: left;">
<br /></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/AVvXsEiISJjXiqxi9VJB4qf8Mwg8HkoqKz6xwh4G7b_pzlJ-_ZaAxfXIJE4r4PlDm2ZNqY9US2nDGFpNu8H61pXBTtII-wEnc4nleIU-j8ZKNxTlKJ36AP3ibPFQuS9j_9XK2ag9TeMPmFdD2Mg/s1600/20161203_171444.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /><br /><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiISJjXiqxi9VJB4qf8Mwg8HkoqKz6xwh4G7b_pzlJ-_ZaAxfXIJE4r4PlDm2ZNqY9US2nDGFpNu8H61pXBTtII-wEnc4nleIU-j8ZKNxTlKJ36AP3ibPFQuS9j_9XK2ag9TeMPmFdD2Mg/s320/20161203_171444.jpg" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Iss1FSjZRKSbnjWhwADG495wx8YlEQe_5rd1ipy2CRTzJRyJd3ap3z_mv17QEQg4dCDFKl1VKp1bQelcKxFDxQy115NK8uF7k_fv6RxWchAjdxcNcY1jbJmhK4TdGtHC7OQBgf8-qks/s1600/20161203_171413.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Iss1FSjZRKSbnjWhwADG495wx8YlEQe_5rd1ipy2CRTzJRyJd3ap3z_mv17QEQg4dCDFKl1VKp1bQelcKxFDxQy115NK8uF7k_fv6RxWchAjdxcNcY1jbJmhK4TdGtHC7OQBgf8-qks/s320/20161203_171413.jpg" width="240" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Here's how everything fits together.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4hUBjvhYtYeklQVj2JfUxBP3hD0xiDZKpJ0upijYuGSMldnYCvdnr1A1Zpu6FH4o59Ma4FIdJIbJudWIJ1vh2VIB6_2efCI4uZn9oDnweFOxDNbBiw_Me9GpLSqalx2uci5OU5YRvHvc/s1600/20161203_162410.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4hUBjvhYtYeklQVj2JfUxBP3hD0xiDZKpJ0upijYuGSMldnYCvdnr1A1Zpu6FH4o59Ma4FIdJIbJudWIJ1vh2VIB6_2efCI4uZn9oDnweFOxDNbBiw_Me9GpLSqalx2uci5OU5YRvHvc/s200/20161203_162410.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho7bqDE-g2EqHH_xNGTnFx2oU39os_5uYQLK39-aNTWK4oym7i68HtwWpQdsdYfZUqALcbYbhblOR5L2cpBAw48IpWB3ruWkXlD1j13X6EcCIhIPX2-uCvYEdQwKSxrMes9_LqLxNq0-o/s1600/20161203_162419.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho7bqDE-g2EqHH_xNGTnFx2oU39os_5uYQLK39-aNTWK4oym7i68HtwWpQdsdYfZUqALcbYbhblOR5L2cpBAw48IpWB3ruWkXlD1j13X6EcCIhIPX2-uCvYEdQwKSxrMes9_LqLxNq0-o/s200/20161203_162419.jpg" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4fEX-7Ta-JlCLI-8bem8PWWi8gN6OygXz82pNSOCy9GJLNSr_JFmWsRuc1xhbLOmbrYCYnDwRw959DhZxryka0yzBaJ8YFSFqAZm6pKxxnzVjn44y1V_TqECiQnYmk4v_WELF2ibNeK8/s1600/20161203_164157.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4fEX-7Ta-JlCLI-8bem8PWWi8gN6OygXz82pNSOCy9GJLNSr_JFmWsRuc1xhbLOmbrYCYnDwRw959DhZxryka0yzBaJ8YFSFqAZm6pKxxnzVjn44y1V_TqECiQnYmk4v_WELF2ibNeK8/s200/20161203_164157.jpg" width="150" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEdRSmWr-cRlaUPm6cJUsrmvG8ckPKzh6-41pucG4yvpOUbcF-Y38NZDRTe-GAnfxGRPOyUZrW4exNnBw91QgwiTprUvZUZxal8pJJ5ajNw2CKcKMRBNDpsVW0ZRVbEsYt6GoGvHDy_8s/s1600/20161203_164210.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEdRSmWr-cRlaUPm6cJUsrmvG8ckPKzh6-41pucG4yvpOUbcF-Y38NZDRTe-GAnfxGRPOyUZrW4exNnBw91QgwiTprUvZUZxal8pJJ5ajNw2CKcKMRBNDpsVW0ZRVbEsYt6GoGvHDy_8s/s200/20161203_164210.jpg" width="200" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Additional components needed:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>A 4+ Amp power supply. I like the <a href="https://www.amazon.com/gp/product/B019RNKIP2" target="_blank">ones from uxcell like this</a>. </li>
<li>A relay to turn the LEDs off when the TV is off. I plug it in to the USB port on the TV and the TV powers the port down when you turn it off. You can go the <a href="https://dhowdy.blogspot.com/2011/10/i-have-updated-my-diy-arduino-ambilight.html" target="_blank">homemade route</a> or <a href="https://www.amazon.com/dp/B00VRUAHLE" target="_blank">buy one</a>. The uxcell power supply whines when the DC power is cut off so I'm going to switch the relay from breaking the DC circuit to the LEDs to breaking the circuit on the AC line. Be sure your relay can handle the load you will put to it!</li>
<li>Hot glue. I really like the Gorilla Glue hot glue sticks. They are perfect for attaching the LEDs without damaging them so you can repurpose your LEDs later. You could also drill 2 small holes on each side of the LED and attach them with zip ties.</li>
<li>A way to mount the components to the frame. I like Command Strips with velcro. </li>
<li>4x metric bolts for the VESA holes in the TV</li>
</ul>
<div>
The final setup looks like this.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDeHeFCenpH-a0l6Xpc0ceTjwUHRyCXQ5BU5lnKH76YF27DgJbCVd3DUdPeSPSiISMTpq_G-kWLhUVNIx5JQD6VIZDfvUFisVmMOLdhEhuRvclHXNikcd2Cn69ekxU6G0HXh0WNoVlBKc/s1600/20161203_233450.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDeHeFCenpH-a0l6Xpc0ceTjwUHRyCXQ5BU5lnKH76YF27DgJbCVd3DUdPeSPSiISMTpq_G-kWLhUVNIx5JQD6VIZDfvUFisVmMOLdhEhuRvclHXNikcd2Cn69ekxU6G0HXh0WNoVlBKc/s640/20161203_233450.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp_oKEjaYbEAGIIsXV-nsLXmsGxSBVpEgxBSCt_2snJwCylCr1Nk_qzRArA2MoCYXKoqbY61waTQFo5Y5Cjt62g3jCOwe2Vi2QU0_S3qlDV606sEkjd1H48EFx9p0FBYGuwyZj9yuDASA/s1600/20161203_233535.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhp_oKEjaYbEAGIIsXV-nsLXmsGxSBVpEgxBSCt_2snJwCylCr1Nk_qzRArA2MoCYXKoqbY61waTQFo5Y5Cjt62g3jCOwe2Vi2QU0_S3qlDV606sEkjd1H48EFx9p0FBYGuwyZj9yuDASA/s640/20161203_233535.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgINRM-LLyU3JpCxGMNONOzSesHgYNUMUl-X2mlp5Q44nWTxwuey2bHfCWsmO3Rjt6xyWx8v-3dJKdUg_mp8E5qHOuhjr2tq1SDgge0x-L_fSJmwIoYsoaaoxhaCpLVh3EzaryJ5VQkB3Q/s1600/20161203_233553.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgINRM-LLyU3JpCxGMNONOzSesHgYNUMUl-X2mlp5Q44nWTxwuey2bHfCWsmO3Rjt6xyWx8v-3dJKdUg_mp8E5qHOuhjr2tq1SDgge0x-L_fSJmwIoYsoaaoxhaCpLVh3EzaryJ5VQkB3Q/s640/20161203_233553.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCzlvWwTooRPRrF02FeeTkL5YtYLc9DGz3ij5HAMrBf5fHFJfN_gz2JbbgmiuFvE-MQA1wyBf8vzbLqlJh1DFmQYyubAkbZECJzpremEgoJnwMrddoklZf6djce-O0yySRkuGCJEbyHxA/s1600/20161203_233600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCzlvWwTooRPRrF02FeeTkL5YtYLc9DGz3ij5HAMrBf5fHFJfN_gz2JbbgmiuFvE-MQA1wyBf8vzbLqlJh1DFmQYyubAkbZECJzpremEgoJnwMrddoklZf6djce-O0yySRkuGCJEbyHxA/s640/20161203_233600.jpg" width="640" /></a></div>
<div>
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
Thanks for checking out my project! Please post any questions and I'll do everything I can to help.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" /><input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----MIIHfwYJKoZIhvcNAQcEoIIHcDCCB2wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAR1g8G99j9JvtrZ1tkyrpCayaY11JDArPV2hdHOrY4A3h/X1J5Ll0CVbC1/WTSLWTYpdrK4mIZ776J1LYc1tegBX4/O0zFPn00eU4NZKTN6ZH7qs5MOdX+ulcVW7GIjbar0Ct4XZ43ToX7td+u877vc1QVaVAIrERy2efu3fiqiDELMAkGBSsOAwIaBQAwgfwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIHHp+QfDDl6GAgdgGcaY+gFGr7gepHVxBADKspijdet65cmnCPq6YkKoyKCSf8qWB52cxo/yx2JPjHC3uqiW25AyLyXmB5nKvRvE0j3QvFRh6LIDx7dMO5e3aPzeAsfNtOdvVB6xhPFfKB1dsIa2gEKEx9fq0A/zgZb62lMYpMEqFFivUcABQD4s2jdEb8g90NjUB/ektqdzU1YfVxf/bsGGGX2ALgumNREivJ45HTNbq8ADv/6ptrV9fMNsoGDEqGJbcQ+x2N26kSvOt3qTrPDpYyk3KwalpCGj/U2BQ4mNL4yGgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTA5MjMwMDI5MzdaMCMGCSqGSIb3DQEJBDEWBBS4wisuWKWSTx6D3chjkKbVVpkEfDANBgkqhkiG9w0BAQEFAASBgANLHwoBXjsPK2cP4ucp//n3KS06Qhg7MPvK4XP43DrmV4t+U1AxF7rVLNcUo8ht0WKS2FY4UNGFzPMXx9q9Vt2w++6H4BCKHb3m2xXVKckAVdW0qR52CGlBruAtPtacx5mqzDpyl9lqSxTfq+FeAfsgGBu9UQuJ/Lo1fUkiHZZ/-----END PKCS7-----" /><input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" /></form>
<br /></div>
Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-458428706535714973.post-81554977205123717232016-10-26T11:46:00.002-07:002016-10-26T19:49:17.775-07:00Wish you bed had LEDs that turned on when you got up so you didn't stub your toes on your dresser? <br />
<br />
Duh.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="padding-bottom: 57%; position: relative;">
<iframe allowfullscreen="" frameborder="0" height="100%" scrolling="no" src="https://gfycat.com/ifr/PointedConcernedHatchetfish" style="left: 0; position: absolute; top: 0;" width="100%"></iframe></div>
<br />
<br />
Here's how I did that.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://raw.githubusercontent.com/dhowdy/BedMotionLEDs/master/MotionDetectedBedLEDs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="410" src="https://raw.githubusercontent.com/dhowdy/BedMotionLEDs/master/MotionDetectedBedLEDs.png" width="640" /></a></div>
<div style="text-align: center;">
<span style="font-size: x-small;">A rough diagram explaining the components.</span></div>
<br />
My bill of materials<br />
<br />
<ul>
<li>Pi Zero (With USB Wifi dongle and MicroSD card)</li>
<li>2 PIR sensors</li>
<li>2 momentary push buttons </li>
<li>5v 5A power supply</li>
<li>Strip of Neopixels (150/5meters)</li>
</ul>
<div>
<br /></div>
<div>
The premise is simple. Detect motion, use math to figure out if it's dark outside, and if so, turn the lights on until there is no motion for about 5 minutes. 2 buttons have been added so you can turn it on and off on demand. </div>
<div>
<br /></div>
<div>
You can find a the code and documentation here: <a href="https://github.com/dhowdy/BedMotionLEDs" target="_blank">Dhowdy on GitHub</a></div>
<div>
<br />
<br /></div>
<div style="text-align: center;">
<div style="padding-bottom: 57%; position: relative;">
<iframe allowfullscreen="" frameborder="0" height="100%" scrolling="no" src="https://gfycat.com/ifr/ImpressiveDescriptiveJoey" style="left: 0; position: absolute; top: 0;" width="100%"></iframe></div>
</div>
<br />
<div style="text-align: center;">
<span style="text-align: start;"><span style="font-size: x-small;">And, of course, a video of the LEDs turning off</span></span></div>
<br />
<br />
<div>
Please post any questions below! Enjoy!</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-20374128927450483832016-05-23T09:24:00.001-07:002016-05-23T09:31:17.402-07:00Update to VM_URL_Passer<h2>
Adding a simple bit of authentication to the VM URL Passer scripts.</h2>
<div>
<h3>
<span style="font-size: large;">Edit: Updated code can always be found on my github: <a href="https://github.com/dhowdy/VM-URL-Passer/">https://github.com/dhowdy/VM-URL-Passer/</a></span></h3>
<br /></div>
<div>
I got tired of network scans causing my script to open new Chrome windows, so I'm adding a bit of authentication. Keep in mind that all of the data is still passed in cleartext, so this is not making it more secure to people wanting to force you to check out a website with a horrible photo but rather causing innocuous port scanners to not cause random popups. </div>
<div>
<br /></div>
<div>
The updated client and server is as follows:</div>
<div>
<br /></div>
<h3>
VM_URL_Passer_Server.pl</h3>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#!/usr/bin/perl</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">use IO::Socket::INET;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># auto-flush on socket</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">$| = 1;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># creating a listening socket</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $socket = new IO::Socket::INET (</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> LocalHost => '0.0.0.0',</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> LocalPort => '7777',</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> Proto => 'tcp',</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> Listen => 5,</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> Reuse => 1</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">die "cannot create socket $!\n" unless $socket;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">print "Running on port 7777\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">while(1)</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">{</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> # waiting for a new client connection</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> my $client_socket = $socket->accept();</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> # get information about a newly connected client</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> my $client_address = $client_socket->peerhost();</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> my $client_port = $client_socket->peerport();</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> #print "connection from $client_address:$client_port\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> # read up to 1024 characters from the connected client</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> my $data = ""; </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> $client_socket->recv($data, 4096);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> my @datastring = split('~~',$data);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> if ($datastring[0] eq "myweakasspassword"){</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> print "received data: $datastring[1]\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> system("'/usr/bin/google-chrome' \"$datastring[1]\"");</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> }else{</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> print "Wrong password.";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> } </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> # write response data to the connected client</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> $data = "ok";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> $client_socket->send($data);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> # notify client that response has been sent</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> shutdown($client_socket, 1); </span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">}</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">$socket->close();</span></div>
</div>
<div>
<br /></div>
<h3>
url_tcp_client.pl</h3>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#!/usr/bin/perl</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">use IO::Socket::INET;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># auto-flush on socket</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">$| = 1;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># create a connecting socket</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $socket = new IO::Socket::INET (</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> PeerHost => '192.168.100.100',#IP of the host machine</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> PeerPort => '7777',</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"> Proto => 'tcp',</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">die "cannot connect to the server $!\n" unless $socket;</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">print "connected to the server\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># data to send to a server</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $req = "$ARGV[0]";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $pass = "myweakasspassword";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $data = "$pass\~\~$req";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">my $size = $socket->send($data);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#print "sent data of length $size\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># notify server that request has been sent</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">shutdown($socket, 1);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># receive a response of up to 1024 characters from server</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#my $response = "";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#$socket->recv($response, 1024);</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">#print "received response: $response\n";</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">$socket->close();</span></div>
</div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span></div>
<span style="font-family: inherit;">The only real change is that the client now sends a "password" to the server separated by two tilde (~~). The server splits the string into an array on "~~" and treats the first part as a password and the second as the actual data. </span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">Again: this isn't secure, but it doesn't really need to be. Just a quick hack to make VMs a little bit more usable.</span><br />
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-82868503906775273382015-10-21T15:16:00.004-07:002015-10-21T20:32:56.805-07:00Opening a garage door from the InternetWho wouldn't want to be able to control their garage door over the Internet? No one, that's who.<br />
<div>
<br /></div>
<div>
I've recently mounted a 7" Android tablet in my wife's car to control navigation, music, realtime ODB II data, and various other tasks. My wife then asked if she could control the garage door with the tablet. "Well..... you <i>can</i>, but I have to build something to do that." "Ok, then build it."</div>
<div>
<br /></div>
<div>
The requirements of the build are as follows:</div>
<div>
<ul>
<li>It must give the status of the door (open/closed/unknown)</li>
<li>It must be able to toggle the status of the door</li>
<li>The <a href="https://en.wikipedia.org/wiki/Wife_acceptance_factor" target="_blank">WAF</a> must be very high</li>
<li>It must work with at least Android, but all platforms would be ideal </li>
<li>It must be secure since it's Internet facing</li>
<li>It must be reliable and therefore simple</li>
</ul>
<div>
<br /></div>
</div>
<div>
The obvious place for me to start is with a Raspberry Pi - it's cheap, has network connectivity, runs Linux, and I have a spare sitting around the house waiting for a project. <br />
<br />
It also seemed logical to make this as a web app instead of a native Android app so 0) it would be instantaneously up to date, 1) it wouldn't cause any battery drain from having to check the status every 30 seconds to stay up to date, and 2) for me, a web app is much easier to develop.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
My garage door (like most) has a simple mechanism to trigger opening and closing the door. Simply short two pins via a push button or, in this case, a relay. The problem is that a Pi can't activate a relay directly with GPIO. Well, not safely anyhow. So we need to a very small amount of power to trigger an NPN transistor in order to trip the relay. Since I'm using a 5V relay, I can safely pull that voltage from the 5V pin on the Pi. The diode is there to prevent damage to the Pi when the field from the relay's coil collapses. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsVBVFtdxB63X4WrKdpBMozn3ZX2g4437IQcUoQY23aG-aUHjFAHd42zrSRWf_SvcwQVFsvSvTR76mkl_i1PZRjphpvatkfkeLwbkwaRKqFO5OVaBG8xVt6nsTUMLNE6jJLskT0IUmYco/s1600/schematic.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsVBVFtdxB63X4WrKdpBMozn3ZX2g4437IQcUoQY23aG-aUHjFAHd42zrSRWf_SvcwQVFsvSvTR76mkl_i1PZRjphpvatkfkeLwbkwaRKqFO5OVaBG8xVt6nsTUMLNE6jJLskT0IUmYco/s1600/schematic.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: 12.8px;">The electronics are pretty straightforward. A transistor activates a relay to open and close the door and 2 magnetic switches report the door's status back to the Pi.</span></td></tr>
</tbody></table>
<br />
<br />
The 10K resistors are there as pull up resistors. Basically it makes GPIO pins 23 and 24 read as "high" unless the switch is activated. Once the switch is activated the voltage goes to ground and the pin goes "low". <br />
<br />
If you look at other projects on this page, you'll notice that I'm a big fan of using Cat5. It's great: it's cheap, reliable, and able to carry signals over long distances without degrading. In this case I ran 1 line of Cat5 to the garage and split 3 pairs off of it. The blue pair go to the garage door, the green pair go to the "opened" switch, and the orange pair go to the "closed" switch. <br />
<br />
I decided to use 2 different switches instead of one because "not closed" or "not open" is not good enough for this project. I wanted 2 switches to be in agreement as to the state of the door. These are cheap door switches from Amazon - about $7 for a pack of 5 but they work great.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibmU8mbfOgQ-dYVIpLEY9Ad_x-JljgOPVtCCGxpEo2ILn5tnPMlimgl0odQTpeYvvfiRWGj_nE2maNOA7g7Ah86RuAZqNvAJpVSj8R2a5XhhywLrYL-_SLns-iA3OQf8HUBJx8ru53PYI/s1600/circuit.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibmU8mbfOgQ-dYVIpLEY9Ad_x-JljgOPVtCCGxpEo2ILn5tnPMlimgl0odQTpeYvvfiRWGj_nE2maNOA7g7Ah86RuAZqNvAJpVSj8R2a5XhhywLrYL-_SLns-iA3OQf8HUBJx8ru53PYI/s400/circuit.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The activation circuit. The blue and blue/white wires go to the garage door.</td></tr>
</tbody></table>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtjR9QMcRDgyDOA1Ivn3O33P57pxu68Fn9M1wtjWG1hMBbwBloC8JQz5varytSWfl99uD76_YDK9MsEA9MQz0v7YIdBInvM_vdJnAkYxM_a9on82zWuAeL07c35b4_ne5b6_4t-iukNls/s1600/20151020_210356.jpg" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtjR9QMcRDgyDOA1Ivn3O33P57pxu68Fn9M1wtjWG1hMBbwBloC8JQz5varytSWfl99uD76_YDK9MsEA9MQz0v7YIdBInvM_vdJnAkYxM_a9on82zWuAeL07c35b4_ne5b6_4t-iukNls/s400/20151020_210356.jpg" width="223" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The switch to confirm that the door is opened</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRfuN26zvhPsTn3PSS4jJ97TraZVQTVvKHbKivkUZRv20VCr1h5jLSXXd4csV3wtpXoYGzhF0NktqLVIJmrod2ouNkMTZh2FaWhMvxLsFtj-0UFIq6QAEqFiIz7FT-oQ_B3ohatYnwJPs/s1600/20151020_205425.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRfuN26zvhPsTn3PSS4jJ97TraZVQTVvKHbKivkUZRv20VCr1h5jLSXXd4csV3wtpXoYGzhF0NktqLVIJmrod2ouNkMTZh2FaWhMvxLsFtj-0UFIq6QAEqFiIz7FT-oQ_B3ohatYnwJPs/s400/20151020_205425.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The switch to confirm that the door is closed</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQkHEIAVWh7U3vwRZP0qiiJBjFtLzENwsProWsYcvNSgfPGMBWZJuyFlwO8LlEafouOG1WQxgtJ2fdShnmNJioSxRX48frPJYeBtzBHEBZMADwc237ccR589mNpirMqv5uJeViuW023zY/s1600/20151020_203225.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQkHEIAVWh7U3vwRZP0qiiJBjFtLzENwsProWsYcvNSgfPGMBWZJuyFlwO8LlEafouOG1WQxgtJ2fdShnmNJioSxRX48frPJYeBtzBHEBZMADwc237ccR589mNpirMqv5uJeViuW023zY/s320/20151020_203225.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I simply soldered the resistors inline instead of bothering with another PCB. <br />
Heatshrink tubing is awesome.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvxvZ0okntzkaSrScde74aP2wZg3SDquHtrmfrtro2OKZvoaw3Zcd0XbS6ed2DGmJn9NiSGGTTfHzOd_kxpl9b_gnIAnm8miuEZMAFZTi-eE5xO6oTl7_2tfMRQeiEQvBv6jWjnRL7wFE/s1600/20151020_204834.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvxvZ0okntzkaSrScde74aP2wZg3SDquHtrmfrtro2OKZvoaw3Zcd0XbS6ed2DGmJn9NiSGGTTfHzOd_kxpl9b_gnIAnm8miuEZMAFZTi-eE5xO6oTl7_2tfMRQeiEQvBv6jWjnRL7wFE/s640/20151020_204834.jpg" width="360" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The finished hardware on a shelf in the basement (where no one can see it).</td></tr>
</tbody></table>
<div style="text-align: center;">
Now on to the software!</div>
</div>
<div>
<br /></div>
<div>
I used Inkscape to generate the SVG that I used to display the status of the door. This project was largely an exercise for me to learn a little about CSS and SVGs. This is the first thing like this that I've done from scratch and I know that there's room for improvement. Please share ideas in the comments section if you have any constructive insight!</div>
<div>
<br /></div>
<div>
The idea is that the SVG will have either opaque or transparent doors depending on the status of the magnetic switches when the page loads. When clicked, the SVG will have an animation of the doors either going up or down. Once the animation is complete (which gives the door plenty of time to open or close) the page will refresh showing the status of the door as a confirmation. </div>
<div>
<br /></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/AVvXsEj-mGo7xAg4Z28FX2kJGmTS5yn1n754Fw5zSRo-0ntUIN-E8F015DnFrVqy-V7e00bWItdxR2_qiKLzQVK0zS5aH1hLOqSAxHGxKbPe0gH7aWtQ5cFCjyG824jXpIw8Bwjprmw5sADSL80/s1600/animation.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-mGo7xAg4Z28FX2kJGmTS5yn1n754Fw5zSRo-0ntUIN-E8F015DnFrVqy-V7e00bWItdxR2_qiKLzQVK0zS5aH1hLOqSAxHGxKbPe0gH7aWtQ5cFCjyG824jXpIw8Bwjprmw5sADSL80/s400/animation.gif" width="397" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
The code can be found on my GitHub account here: <a href="https://github.com/dhowdy/GarageDoor" target="_blank">https://github.com/dhowdy/GarageDoor</a>.</div>
<div>
<br /></div>
<div>
Security is accomplished via Apache with ModSSL and basic authentication. The guys at <a href="http://duckdns.org/" target="_blank">DuckDNS</a> and <a href="http://portforward.com/" target="_blank">PortForward</a> have everything that you need to access your Raspberry Pi from the Internet. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Lastly, I have to say thank you to to <a href="http://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/" target="_blank">Kevin Sangeelee</a> for his great write-up on using a Pi's GPIO to activate a relay, <a href="http://www.justinmccandless.com/blog/Patching+jQuery's+Lack+of+SVG+Support" target="_blank">Justin McCandless</a> for patching jQuery's GLARING lack of SVG class support, and to <a href="http://www.natekrofft.com/" target="_blank">Nate Krofft</a> for giving me a huge hand with some of the CSS. And, since I know that I'm going to get a lot of this... I know that I'm not the first person to do this; I simply wanted to share *my* way of doing this with everyone in case it can be helpful to someone else.</div>
<div>
<br /></div>
<div>
Thanks for reading!</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div style="text-align: center;">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----
" />
<br />
<div style="text-align: center;">
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" />
</div>
</div>
</form>
<div>
</div>
<div>
<br /></div>
Unknownnoreply@blogger.com14tag:blogger.com,1999:blog-458428706535714973.post-24682024016750116902015-02-22T11:57:00.003-08:002015-02-24T20:28:14.276-08:00Building a clock to help kids tell timeMy daughter is about 2 1/2. She loves learning about colors, shapes, animals, dinosaurs, and all sorts of other things. However, she's still too young to understand how to read a clock. But now is a good time to start teaching her.<br />
<div>
<br /></div>
<div>
We wanted a clock that would change colors based on what it was time to do: play quietly, go to bed, get up and play, pick up toys, and so on. Here is the result:</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<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/AVvXsEgwsm-a08AxgdshzFfSCR4lQvymIzM6PT270FMLLWpMAIxW7_AC0cu9JoLaaHIbsEO3FP_fFJYwrEQtDXUpOgNDIXMMsufG2LC3pw9JLMsvPkGbEgyC5VVmb5yfaxg85Er6dKRYHlSJ7EE/s1600/IMG_20150221_135312nopm.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwsm-a08AxgdshzFfSCR4lQvymIzM6PT270FMLLWpMAIxW7_AC0cu9JoLaaHIbsEO3FP_fFJYwrEQtDXUpOgNDIXMMsufG2LC3pw9JLMsvPkGbEgyC5VVmb5yfaxg85Er6dKRYHlSJ7EE/s1600/IMG_20150221_135312nopm.jpg" height="180" width="320" /></a></div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/sKe8JC1x_yg/0.jpg" frameborder="0" height="266" src="http://www.youtube.com/embed/sKe8JC1x_yg?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
<span style="font-size: x-small;">Alarm clock next to the baby monitors and entertainment center.</span></div>
<br />
<div style="text-align: left;">
<br /></div>
<br />
<div>
To start, I purchased a wife-approved, battery-driven clock from a local retailer for about $10. This one was perfect for me: it has plenty of room inside, a nice, big face, some weight to it to hold it in place, and, to top it all off, it matched the wall.</div>
<div>
<br /></div>
<div>
OK, enough introduction, let's get down to it. I've got a Pi running a baby monitor (another project, another write-up, but the LEDs in the lower left corner are a super bright infrared spotlight for night vision on the cameras), so I'll be driving it from that. And I've got some ShiftBrites leftover from version 1 of my DIY Ambilight (scroll down for more info on that project). Perfect. Let's build.<br />
<br />
First, I needed a power supply. Since we have an excess of USB ports, that's what we'll use. I've already built a power supply based on the LM317T and it's been running for 7 or 8 years now. Using this basic schematic, I built the power supply to take a 5V input:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJxV227DjnyUmTxtB7QByIG_n-W5XJqJk8pQC8PUklRq7mFw2X1bXC9-AVwfJsgIwq8Bva8byuPMtD7xMKKVlrjADRZToW7PgpFGx5PRaxyYbuuQpUG3UixjDWf78n01Xr1TJ0Ka5IGQ/s1600/3.3V+regulated.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGJxV227DjnyUmTxtB7QByIG_n-W5XJqJk8pQC8PUklRq7mFw2X1bXC9-AVwfJsgIwq8Bva8byuPMtD7xMKKVlrjADRZToW7PgpFGx5PRaxyYbuuQpUG3UixjDWf78n01Xr1TJ0Ka5IGQ/s1600/3.3V+regulated.jpg" height="140" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: xx-small;">(credit to http://kb.kaminskiengineering.com/ for the picture)</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUnia2vby-tQHggatj3ZVHE1Bj509vWhwEwhMaZxdLOEImm_0dVPeFiCz0TrpMUAqR1uwNBmSXMwax8cX7dTvldETXX-_hjlPOOcKiVLrTBE5ZglatLmD6lEgrqSom2cAqWhHfY-lJneQ/s1600/20150221_122215.jpg" imageanchor="1" style="clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUnia2vby-tQHggatj3ZVHE1Bj509vWhwEwhMaZxdLOEImm_0dVPeFiCz0TrpMUAqR1uwNBmSXMwax8cX7dTvldETXX-_hjlPOOcKiVLrTBE5ZglatLmD6lEgrqSom2cAqWhHfY-lJneQ/s1600/20150221_122215.jpg" height="320" width="179" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFr9LfiY7LTH7jykXErDMKv6oOR6IBuZ7LnpTR7NNLBPqtSwtQf-DH68-ZoxfeDhKN6Yc2PzdGixcmQAh5OPKbdBj4LbRPDhRHC7gJ1hrHLFW76QVGhY3pz9BxnovBIgM6oas3Ua19pnc/s1600/20150221_112132.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFr9LfiY7LTH7jykXErDMKv6oOR6IBuZ7LnpTR7NNLBPqtSwtQf-DH68-ZoxfeDhKN6Yc2PzdGixcmQAh5OPKbdBj4LbRPDhRHC7gJ1hrHLFW76QVGhY3pz9BxnovBIgM6oas3Ua19pnc/s1600/20150221_112132.jpg" height="320" width="180" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCyScTkCfBKo_5VhQmTIQ1JNiwwk0jzIfcvidJlsQTiTU2mP0mES3OoKDfYyPnEDwVny3vJbQ-ykMQsODK1hNR3P6TJe6sjArUb1otdfUO6Vr9tZ6nXec3r5Y59L8p2K5Ob1arYfuyg-E/s1600/20150221_122207.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCyScTkCfBKo_5VhQmTIQ1JNiwwk0jzIfcvidJlsQTiTU2mP0mES3OoKDfYyPnEDwVny3vJbQ-ykMQsODK1hNR3P6TJe6sjArUb1otdfUO6Vr9tZ6nXec3r5Y59L8p2K5Ob1arYfuyg-E/s1600/20150221_122207.jpg" height="320" width="179" /></a><br />
<span style="font-size: xx-small;">(I know, my workbench is cluttered. I do a lot of work on it.)</span><br />
<div class="separator" style="clear: both; text-align: left;">
This power supply is going to supply ~3V to the clock internals and 5V to the ShiftBrite.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now we need software to test with. After I could not get <a href="http://docs.macetech.com/doku.php/raspberry_pi_with_octobrite_shiftbrite" target="_blank">this tutorial</a> to work, I found <a href="https://github.com/Hive13/RPi-ShiftBrite" target="_blank">Hive13's project on GitHub</a>. After playing with it for a bit, I compiled the C program and was getting good tests. However, I could not figure out a dead simple way to to just set certain colors and the program looped until interrupted - all of this is great for what Hive13 and likely most people want to do with a ShiftBrite on a Pi, but I needed something different. <a href="https://github.com/dhowdy/RPi-ShiftBrite" target="_blank">I forked his GitHub repo and made a few changes</a>, namely the ability to push red, green, blue, purple, yellow, and cyan from the command line and immediately exit. I also added an "install script" as well as a "crazyclock" script to cycle through the colors. It's all kind of hackish, but since the code was written for only my specific example, I don't care - but sharing that code back to the community is still the right thing to do. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Essentially, I just added 6 command line arguments so instead of only having "-c [0-255]" emitting a white color with the given intensity, I've added the following code:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -R: Set to constant color Red\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -G: Set to constant color Green\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -B: Set to constant color Blue\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -P: Set to constant color Purple\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -Y: Set to constant color Yellow\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">printf(" -C: Set to constant color Cyan\n");</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">.</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">.</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">.</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} else if (opt->mode == RED && opt->constant_value_red >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>img[0] = opt->constant_value_red;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} else if (opt->mode == GREEN && opt->constant_value_green >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>img[1] = opt->constant_value_green;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> return 0;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} else if (opt->mode == BLUE && opt->constant_value_blue >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[2] = opt->constant_value_blue;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> return 0;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} else if (opt->mode == YELLOW && opt->constant_value_yellow >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[1] = opt->constant_value_yellow;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>img[0] = opt->constant_value_yellow;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> return 0;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} else if (opt->mode == PURPLE && opt->constant_value_purple >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[2] = opt->constant_value_purple;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[0] = opt->constant_value_purple;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> return 0;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> } else if (opt->mode == CYAN && opt->constant_value_cyan >= 0) {</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[2] = opt->constant_value_cyan;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> img[1] = opt->constant_value_cyan;</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> shiftbrite_refresh();</span></div>
<div class="separator" style="clear: both;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> return 0;</span></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
All of this is on GitHub, but essentially calling the binary with "-R 255" will turn the LED red at full brightness and immediately exit. Simple and straightforward.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It's also worth mentioning that since this box is secure and I didn't want to mess with the proper permissions to grant other users the ability to use SPI, I just changed the setuid attribute of the binary to always run as root. Again, this <strike>would</strike> should never fly in a production environment but in this case it's nothing to worry about. </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/AVvXsEi-JmXKSyMSPEc2_at5IinPGybWfE9f_Vv32MoitGUXI7zsi3HHw2Xi6IIoBcIhvLJDeQxLJ4Da715gpfsWd5zhbQ_P0311PZlZ7jlo0-7pmvYBUVbLLe-tO7K_nJ0oLitSDdbGOeUh0u8/s1600/20150221_103314.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JmXKSyMSPEc2_at5IinPGybWfE9f_Vv32MoitGUXI7zsi3HHw2Xi6IIoBcIhvLJDeQxLJ4Da715gpfsWd5zhbQ_P0311PZlZ7jlo0-7pmvYBUVbLLe-tO7K_nJ0oLitSDdbGOeUh0u8/s1600/20150221_103314.jpg" height="320" width="180" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: x-small;">SPI pins on the Pi.</span> </div>
<div class="separator" style="clear: both; text-align: left;">
Next is the case mods. There was not enough room to put the ShiftBrite, so my Dremel helped me make it fit. </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/AVvXsEiy2JKb2ypUvQDvWz3iS9kjlS4VxwPXWdYlO5iQFbXiLd0A_zdZk7gCGRqhGWjeq2Ewk43lzhEPsFvA1vKoUNi2v0oKQqDY9V8VBMjQ49qu8EwhC70KMTZ-H1c4X7LnLG3XYweTPztFEv8/s1600/20150221_103327.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy2JKb2ypUvQDvWz3iS9kjlS4VxwPXWdYlO5iQFbXiLd0A_zdZk7gCGRqhGWjeq2Ewk43lzhEPsFvA1vKoUNi2v0oKQqDY9V8VBMjQ49qu8EwhC70KMTZ-H1c4X7LnLG3XYweTPztFEv8/s1600/20150221_103327.jpg" height="320" width="180" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguOSU1oVC1WyNyGFc38-kNOONU4WlTY0bdv7D873z2AAoJf5YnfMakJcvHfxVlOKgZ6ycWza9JigaBVD4Pl9esH0X3io3yaFnTOMZ0H48Tlm9uX8P6QnkMJqO0Dp2hMfUYdJCEubH7EoI/s1600/20150221_105832.jpg" imageanchor="1" style="clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguOSU1oVC1WyNyGFc38-kNOONU4WlTY0bdv7D873z2AAoJf5YnfMakJcvHfxVlOKgZ6ycWza9JigaBVD4Pl9esH0X3io3yaFnTOMZ0H48Tlm9uX8P6QnkMJqO0Dp2hMfUYdJCEubH7EoI/s1600/20150221_105832.jpg" height="320" width="180" /></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA3geOzeiJkJ3XHuC84GqivOnRROlcn4j3sPc5UBoZRBZ5EXnww_9UbP0BK5x2BkonKMN5Ge15ogfkRxQvl3G_XEOXPFI5pjkJBHCQz6APVGnX2DLInPchWPjHvr2idcLpAlkeNl8y_ZQ/s1600/20150221_105823.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA3geOzeiJkJ3XHuC84GqivOnRROlcn4j3sPc5UBoZRBZ5EXnww_9UbP0BK5x2BkonKMN5Ge15ogfkRxQvl3G_XEOXPFI5pjkJBHCQz6APVGnX2DLInPchWPjHvr2idcLpAlkeNl8y_ZQ/s1600/20150221_105823.jpg" height="320" width="180" /></a><br />
<div class="separator" style="clear: both; text-align: left;">
Essentially from here, I just hooked the Vout pin of the LM317T to the clock's battery terminal lines and attached the ShiftBrite directly to the 5V line coming off of the USB cable. Then I crammed everything as neatly back in to the case as I could. I had to cut some pins and use some hot glue to insulate some things, but it worked.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWsAjcdBm1f4ysPvoiLU8MAPt4dHrloI1py5hG36R2DHVs8l-2Jn1ChZFJdFSy6KWNeVipP_6MgDMDzOLGuNIoSKGW4TjmNYGfdAPlS6rSzKtpP1-GTJZt1K_AZINZvKN72yXR74bOsxA/s1600/20150221_133749.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWsAjcdBm1f4ysPvoiLU8MAPt4dHrloI1py5hG36R2DHVs8l-2Jn1ChZFJdFSy6KWNeVipP_6MgDMDzOLGuNIoSKGW4TjmNYGfdAPlS6rSzKtpP1-GTJZt1K_AZINZvKN72yXR74bOsxA/s1600/20150221_133749.jpg" height="400" width="225" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKXs2DFxc8Fre-LFSl3rPQXL-y06feXY-A9dXVbRUcqM0BRvEjPmHwdspR2f-6MyMzxX6TIs0QkHlxwMvIYeCSOTySdIiJq9H-bkDHXT7eK4ASpDHvdqg84mXJzhTas99cUFFztGW_GHw/s1600/20150221_133753.jpg" imageanchor="1" style="clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKXs2DFxc8Fre-LFSl3rPQXL-y06feXY-A9dXVbRUcqM0BRvEjPmHwdspR2f-6MyMzxX6TIs0QkHlxwMvIYeCSOTySdIiJq9H-bkDHXT7eK4ASpDHvdqg84mXJzhTas99cUFFztGW_GHw/s1600/20150221_133753.jpg" height="400" width="225" /></a><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There is a USB cable running in to the back for the power supply and a piece of Cat5e running out the back for data from the Pi.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ-is0o2t25qYcLnXxmSSiAtPUKWjLKKfhMVtKuYmREKFSYk7NIxKEqryafPVx0RwUnwpP1vlj_uVwZsvKOPBDKS_OZ8SsupWttk3ai5Rb7SPeefCcIVw4mqVmrqBjmrnBM9TucQ7nUko/s1600/20150221_175544.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ-is0o2t25qYcLnXxmSSiAtPUKWjLKKfhMVtKuYmREKFSYk7NIxKEqryafPVx0RwUnwpP1vlj_uVwZsvKOPBDKS_OZ8SsupWttk3ai5Rb7SPeefCcIVw4mqVmrqBjmrnBM9TucQ7nUko/s1600/20150221_175544.jpg" height="225" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg13a8EQUOMpfXP2tTt9UCDx-zAXdlXMla6tjb9DZlqRYczRceUTQ4iQ7XsECgacyCg-ur9Qd45T7Hb1jaiohx8v2fO1GFEp1GFnPbPkcKRUVkCJrngNU2uNVahbOxLTo8icniHqBrBlxY/s1600/20150221_175548.jpg" imageanchor="1" style="display: inline !important; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg13a8EQUOMpfXP2tTt9UCDx-zAXdlXMla6tjb9DZlqRYczRceUTQ4iQ7XsECgacyCg-ur9Qd45T7Hb1jaiohx8v2fO1GFEp1GFnPbPkcKRUVkCJrngNU2uNVahbOxLTo8icniHqBrBlxY/s1600/20150221_175548.jpg" height="225" width="400" /></a></div>
<div style="text-align: center;">
<span style="font-size: x-small;">The clock installed next to the baby monitor cameras.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
The last thing is setting the clock color automatically. I found a nifty little project called <a href="https://github.com/jamesrwhite/minicron" target="_blank">Minicron</a>. Essentially, it's a client/server setup that modifies your cron jobs and sends the output back to the server. It's simple, straightforward to set up, and perfect for what I need (given my lack of web development skills). I installed it on my web server and on this Pi. Then I just configure what colors I want the clock to be and when. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFJvIzsagijrBxfgx5A0DVLsedbAcaeCNhRyDJ7iekodFg0O89F9Ph4IfkU6YsBALgce9vQvBx9U5JANT1b3Wy5p3Ht1M7ZKz0pU4qaY64zvAf0SLUq8GJRKd-l4rMYeyG2sAYTfB4SI8/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFJvIzsagijrBxfgx5A0DVLsedbAcaeCNhRyDJ7iekodFg0O89F9Ph4IfkU6YsBALgce9vQvBx9U5JANT1b3Wy5p3Ht1M7ZKz0pU4qaY64zvAf0SLUq8GJRKd-l4rMYeyG2sAYTfB4SI8/s1600/Capture.PNG" height="336" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Additionally, I've configured ConnectBot on my wife's phone to have different connections that will just log in using a public key and execute "/usr/local/bin/clock -G 255" for play time or "/usr/local/bin/clock -R 75" to turn the clock red at reduced brightness for nap. The cron job will take care of almost everything, but she needed the ability to change it on demand. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So, that's pretty much it. I'll be happy to answer any questions below. </div>
<br /></div>
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----
" />
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" />
<img alt="" border="0" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" />
</form>
<br />
<br />
<div style="text-align: left;">
UPDATE: I realize that I forgot to mention that it is important to keep the clock and Pi synchronized. Since I use Raspbian on the Pi, here's how I ensure it has correct time by using a Stratum 1 time server in my home town.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">apt-get install ntpdate</span></div>
<div style="text-align: left;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">service ntp stop</span></div>
<div style="text-align: left;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">update-rc.d ntp disable</span></div>
<div style="text-align: left;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">echo -e '#!/bin/sh \n/usr/sbin/ntpdate 0.ntp.mst.edu' > /etc/cron.daily/ntpdate</span></div>
<div style="text-align: left;">
<span style="font-size: x-small;"><span style="font-family: Courier New, Courier, monospace;">chmod +x </span><span style="font-family: 'Courier New', Courier, monospace;">/etc/cron.daily/ntpdate</span></span></div>
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: x-small;">service cron restart</span></span></div>
<div style="text-align: left;">
<span style="font-family: 'Courier New', Courier, monospace;"><span style="font-size: x-small;"><br /></span></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;">This will get the Pi to update its time every day. If you notice a skew over the course of a day (since the Pis lack a realtime clock) then you can just move this script to the /etc/cron.hourly folder. If you do so, please us a different time server than this one.</span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: inherit;"><br /></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-76546387961255151642014-02-21T13:57:00.000-08:002014-02-21T13:57:03.519-08:00Making VMs play nicely with hosts (by passing URLs)I've recently moved to Linux (currently Mint) as my primary desktop at work and I need to run a Windows VM in order to use Outlook. I'm running Outlook 2013 in Unity mode and kept getting aggravated that when I clicked links it would open the link in Chrome on the VM and not in Chrome on my host OS. <br />
<br />
When VMWare Tools installed, it created a registered application named "Default Host Application" that is apparently used for VMware Fusion on OS X and is useless on a Linux or Windows host. VMware Tools would give the following error:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">Make sure the virtual machine's configuration allows the guest to open host applications.</span><br />
<br />
After searching high and low for a solution other than to make it go away, I gave up and wrote my own. Here's the idea:<br />
<br />
Set up a listener on the host OS that will just listen for a client and pass anything that it gets to Chrome so it will open a new tab. Now we'll set up a client on the VM to forward any URLs that it receives to the listener on the host. And finally, we'll configure our client on the VM to be the default for all HTTP/HTTPS URLs. Pretty simple, right? Oh, and we'll use Perl so it will work with Windows, OS X, or Linux on the host OR the guest. <br />
<br />
Let's get started by installing Perl on your Windows VM. OS X and Linux should have it already.<br />
<br />
So we'll start with the server code. I borrowed the majority of this form a few sites online and tweaked it to my requirements. <br />
<br />
VM_URL_Passer_Server.pl<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#!/usr/bin/perl</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use IO::Socket::INET;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># auto-flush on socket</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$| = 1;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># creating a listening socket to listen to port 7777 on all IP addresses.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $socket = new IO::Socket::INET (</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> LocalHost => '0.0.0.0',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> LocalPort => '7777',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Proto => 'tcp',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Listen => 5,</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Reuse => 1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">die "cannot create socket $!\n" unless $socket;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">print "Running on port 7777\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">while(1)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> # waiting for a new client connection</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> my $client_socket = $socket->accept();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> # get information about a newly connected client</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> my $client_address = $client_socket->peerhost();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> my $client_port = $client_socket->peerport();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> #print "connection from $client_address:$client_port\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> # read up to 1024 characters from the connected client</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> my $data = "";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> $client_socket->recv($data, 4096);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> #print "received data: $data\n";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> #Put your path to Chrome here!!#</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> system("'/usr/bin/google-chrome' \"$data\"");</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> # write response data to the connected client</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> $data = "ok";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> $client_socket->send($data);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> # notify client that response has been sent</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> shutdown($client_socket, 1);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$socket->close();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: inherit;">Simply change line 34 to point to Chrome.app on OS X or Chrome.exe on Windows. Running this script will invoke Perl and it will sit listening for connections.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">url_tcp_client.pl</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#!/usr/bin/perl</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">use IO::Socket::INET;</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># auto-flush on socket</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$| = 1;</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># create a connecting socket</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $socket = new IO::Socket::INET (</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> PeerHost => '255.255.255.255',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> PeerPort => '7777',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Proto => 'tcp',</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">die "cannot connect to the server $!\n" unless $socket;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">print "connected to the server\n";</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># data to send to a server</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $req = "$ARGV[0]";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">my $size = $socket->send($req);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#print "sent data of length $size\n";</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># notify server that request has been sent</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">shutdown($socket, 1);</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># receive a response of up to 1024 characters from server</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#my $response = "";</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#$socket->recv($response, 1024);</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#print "received response: $response\n";</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">$socket->close();</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
Running this script on your guest VM with any arguments will pass the string to the host and attempt to open it with Chrome. Simply replace 255.255.255.255 on line 9 with the IP address of your host and you should be in business. I've left some debugging code in there so if you have problems you can uncomment it and try again.<br />
<br />
<br />
Finally, we need to register our client script as the default HTTP, HTTPS, and FTP handler in our Windows VM. Start by saving this to install.reg, modifying it to point to the location that you've saved the client script (I used the root of the C: drive) as well as the path to Perl, and importing it. It is safe, but you should know what you are doing if you are modifying the registry. <br />
<br />
Install.reg<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Windows Registry Editor Version 5.00</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\dhowdy\VMURLPasser\Capabilities]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"ApplicationDescription"="VM URL Passer is a Perl TCP client that sends all clicked URLs to the specified TCP Server in order to open links clicked in a VM to the host."</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"ApplicationIcon"="C:\url_tcp_client.pl,0"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"ApplicationName"="VM URL Passer"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VMURLPasser\shell\open\command]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">@="\"C:\\Perl64\\bin\\perl.EXE\" \"C:\\url_tcp_client.pl\" \"%1\""</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\dhowdy\VMURLPasser\Capabilities\URLAssociations]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"ftp"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"http"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"https"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"irc"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"mailto"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"mms"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"news"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"nntp"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"sms"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"smsto"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"tel"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"urn"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"webcal"="VMURLPasser"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"VM_URL_Passer"="Software\\dhowdy\\VMURLPasser\\Capabilities"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VMURLPasser]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">@="VM URL Passer Document"</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">"URL Protocol"=""</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VMURLPasser\shell]</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VMURLPasser\shell\open]</span><br />
<br />
Now that our program is "installed" we need to tell Windows to use it. Open Control Panel > Default Programs > Set Default Programs. Find "VM URL Passer" in the list, click "Choose defaults for this program" and check the protocols you wish to have passed to Chrome on your host. I chose most of them, but the important ones are FTP, HTTP, and HTTPS.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj19DIHhaYQ0Z0aSlrOpk7X8VwbH-YFPOezSyN2qDRLlJjA4JXM246smcCX2ua0FemTqBkNuvv2rCIFqKMFVu43nO29V0h5gJ2Gwn1jBMKsME_VNe7bvuOE4HYelnvFCNikUEZ12eQGzA/s1600/Screenshot+from+2014-02-21+15:52:57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj19DIHhaYQ0Z0aSlrOpk7X8VwbH-YFPOezSyN2qDRLlJjA4JXM246smcCX2ua0FemTqBkNuvv2rCIFqKMFVu43nO29V0h5gJ2Gwn1jBMKsME_VNe7bvuOE4HYelnvFCNikUEZ12eQGzA/s1600/Screenshot+from+2014-02-21+15:52:57.png" height="435" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaLC_HrpaE8fXO6GwU-BsIiyZMCSqegAtXumYME-d1kIALfGDag8nU5FO4iWOdacedi36aUsbRLuLRk6XVMGTncL49_ORzjEJlxWBhgIGneokMzuaWY6VxJbIhfEodG7-2bBSBZeljyZ8/s1600/Screenshot+from+2014-02-21+15:53:29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaLC_HrpaE8fXO6GwU-BsIiyZMCSqegAtXumYME-d1kIALfGDag8nU5FO4iWOdacedi36aUsbRLuLRk6XVMGTncL49_ORzjEJlxWBhgIGneokMzuaWY6VxJbIhfEodG7-2bBSBZeljyZ8/s1600/Screenshot+from+2014-02-21+15:53:29.png" height="438" width="640" /></a></div>
<span id="goog_148007701"></span><span id="goog_148007702"></span><br />
Click "Save" and you should be good to go! Try clicking a link in Outlook on your guest VM or just open Start > run > type 'http://dhowdy.blogspot.com' and press enter. It should open in Chrome on your host!<br />
<br />
<br />
Disclaimer: This was a quick and dirty hack and there is no security at all. Anyone on your network can send anything to your browser if they find that you have that port open. Use this with caution and if anyone has suggestions for improvement, feel free to post below!Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-458428706535714973.post-22841207957172119872011-10-11T19:07:00.000-07:002015-02-22T19:28:31.279-08:00Updated DIY Arduino Ambilight<span style="font-size: large;">I have updated my DIY Arduino Ambilight!</span><br />
<br />
After using my DIY Ambilight for a few days I got tired of plugging in and unplugging the power supply to the ShiftBrite shield, so I finally broke down and added a switch to turn it on and off. Now that I've been using it for a few weeks, I'm tired of having to turn it on and off manually every time I want to watch TV.<br />
<br />
I noticed that my Samsung TV had a serial interface in the form of the EX-Link connector to see if I could electrically tell if the TV was on or not. No luck. I tested the USB ports next and found that when the display is off, the USB interfaces have about .15V and just over 5V when the display is on. Bingo. Now to get a relay.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaAOMjDQW5rxyFR0mdAV2_GtuMMQNg3XOc3ivM94Ec-rYcpF2bk3JUkVzYZpX422TcO3kJt4jq5bG6QN7buT8QYPyrRXkjzoiR_MkD-8gryWjs-t8tI-p-Aqm41toYpcdx8Ybx4Ga63OE/s1600/IMGP7970.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaAOMjDQW5rxyFR0mdAV2_GtuMMQNg3XOc3ivM94Ec-rYcpF2bk3JUkVzYZpX422TcO3kJt4jq5bG6QN7buT8QYPyrRXkjzoiR_MkD-8gryWjs-t8tI-p-Aqm41toYpcdx8Ybx4Ga63OE/s1600/IMGP7970.jpg" height="240" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
This relay requires 3.5V to activate and less than .25V to deactivate. </div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPZsPbp8mAIwcCt_px8SETHoTQbQ_465r7qvDsjTWsO0EapKutPADGqhbcqKCcsltcLpzObi4NYF5aME6qw8Y9YuW15sTuGsubddBJ225Orou6-3Q1aqkcHVrW4ABZFOVU0_NfjHQgwDc/s1600/shiftbriteshield_with_relay.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPZsPbp8mAIwcCt_px8SETHoTQbQ_465r7qvDsjTWsO0EapKutPADGqhbcqKCcsltcLpzObi4NYF5aME6qw8Y9YuW15sTuGsubddBJ225Orou6-3Q1aqkcHVrW4ABZFOVU0_NfjHQgwDc/s1600/shiftbriteshield_with_relay.png" height="126" 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;">
</div>
<br />
My next step was to add a relay to my ShiftBrite shield and cut an extra USB extension cable and wire the +5V wire (red) and the ground (black) wire to the coil of a relay. My DIY ShiftBrite shield is now wired as the above illustration indicates with the USB +5V & Ground lines coming from the TV. Since the coil in the relay will cause a brief voltage spike that could damage your TV's USB port, it is important to make sure that the protection diode is added. Just add it 'backwards' across your relay coil so the energy stays in the coil and doesn't go back into the USB port.<br />
<br />
<br />
<div style="text-align: center;">
Here is what my finished ShiftBrite shield looks like (the protection diode is on the bottom out of view):</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf-wErOAmzBFTYb8o1tkUgUfKnIi0tPF5B-knujNVajf40Q-jRoSiW3cbon_fpKvxn5tSU_QZEU1T2F_AYYmvamJmVFem-dJcw2_ulWNgmmw2kO2huSFjcnVSmCBXWRvxBKyaapuVhYcI/s1600/IMGP7973.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf-wErOAmzBFTYb8o1tkUgUfKnIi0tPF5B-knujNVajf40Q-jRoSiW3cbon_fpKvxn5tSU_QZEU1T2F_AYYmvamJmVFem-dJcw2_ulWNgmmw2kO2huSFjcnVSmCBXWRvxBKyaapuVhYcI/s1600/IMGP7973.jpg" height="240" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJzQBXx10VBPMintyiGeNWe0Vfcw8-wn2qfHYVl0uOhGdigLIQOCz3mifBwjjl0bWIkxsOymTFLJmYkOi0_taVvdQwZFdQtsLgW_aQ2Fro1hZ30M3sqSpLX_CesrR6hHCcyMlqkXrAnR8/s1600/IMGP7971.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJzQBXx10VBPMintyiGeNWe0Vfcw8-wn2qfHYVl0uOhGdigLIQOCz3mifBwjjl0bWIkxsOymTFLJmYkOi0_taVvdQwZFdQtsLgW_aQ2Fro1hZ30M3sqSpLX_CesrR6hHCcyMlqkXrAnR8/s1600/IMGP7971.jpg" height="240" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Since most LCD TVs now have USB ports, I figured that this build could end up helping someone else. I certainly hope so!Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-458428706535714973.post-55989826220198309002011-10-07T18:51:00.001-07:002011-10-11T08:43:30.076-07:00Field Day - Shooting a 1 lb propane tank with an AR 15.<div>Field Day Autumn 2011<br />
<br />
We try to hold Field Day at least twice a year for our Desktop Engineering students. This year Field Day was on 10/07/11. We decided to try to shoot a propane tank this time. Here is what happens when you shoot a 1 LB propane tank with an AR15 (.223) from about 35 yards. I was standing about 15 yards off to the side filming this. I'm glad Bryan is such a good shot.<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/ivL3mCALP7o?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-458428706535714973.post-75598720910892325522011-09-21T23:50:00.000-07:002015-02-22T12:28:20.751-08:00DIY Arduino Ambilight using ShiftBrites<br />
<div>
<br />
This is my DIY Ambilight for my home theater PC. In this tutorial I plan to give detailed instructions on how to build a multichannel Arduino-based Ambilight for about $40 plus the Arduino which can be reused for other projects. The bill of materials include 6+ ShiftBrites (your call, I wouldn't do less than 6 though), a printed circuit board, wire, and headers. Additionally this will require all of the components needed to get over <a href="http://docs.macetech.com/doku.php/shiftbrite">0.5 Amps at 5.5-9V DC</a> on to the board to drive the ShiftBrites; this cannot be reasonably done over USB power. My ultimate goal here is to give others some ideas on how to go about this project for less money than it would cost to essentially buy everything in a kit. I went in to this trying to be resourceful and I feel pretty good about how it turned out. If this guide has been helpful, please consider donating.<br />
<div style="text-align: center;">
<br /></div>
</div>
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" /><input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----" /><input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" /></form>
<br /></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/AVvXsEiDAnNQQRiRGDtp0TdKfcCm3-RIxI_MaDOMOqCwT4wotrRVDBhLdGaCxVkdOkxJEr5vKnKtBJbBBwHWBF6ohHTL2tUuRuUg7Mjgzi1RpxumEgeZ9VKo2C-_9N22iDGnVpKhpKTJKHQYgz8/s1600/IMGP7896.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDAnNQQRiRGDtp0TdKfcCm3-RIxI_MaDOMOqCwT4wotrRVDBhLdGaCxVkdOkxJEr5vKnKtBJbBBwHWBF6ohHTL2tUuRuUg7Mjgzi1RpxumEgeZ9VKo2C-_9N22iDGnVpKhpKTJKHQYgz8/s1600/IMGP7896.jpg" height="150" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjo6vR0wNe-nK1uG6SVNMA9e1wvKpI9itLtIHVXVGIDxeyjpDdEQWyzkf__ezRgWPVW75oHuck9HgjjB3cOYBKb6376wPNJiIsiCkqw-Rbbw1w1F3bsRSpeoOiH02n4Yl2S9rYhKVnAwc/s1600/IMGP7901.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjo6vR0wNe-nK1uG6SVNMA9e1wvKpI9itLtIHVXVGIDxeyjpDdEQWyzkf__ezRgWPVW75oHuck9HgjjB3cOYBKb6376wPNJiIsiCkqw-Rbbw1w1F3bsRSpeoOiH02n4Yl2S9rYhKVnAwc/s1600/IMGP7901.jpg" height="150" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdSf1QHJp_dzSAzlxbb31NmApYnqd30owD9BTlH5KOXyZslQA_dW4IX4CHg_iR2nG5519ZxcLAmCsNbuqZAH0SaSSI0_lPZPaD5MiKAcMBT9MkinfZjxSNQpVEONlXnyCM3kcQ41r2rPI/s1600/IMGP7897.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdSf1QHJp_dzSAzlxbb31NmApYnqd30owD9BTlH5KOXyZslQA_dW4IX4CHg_iR2nG5519ZxcLAmCsNbuqZAH0SaSSI0_lPZPaD5MiKAcMBT9MkinfZjxSNQpVEONlXnyCM3kcQ41r2rPI/s1600/IMGP7897.jpg" height="150" width="200" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiOaVG52ZuP00Y3B-iq7ZYfgl3amvnC3VY8WfcaHSr26wCHIBm6jIuq59wkKhYJAtBKPvzhBN1T80hORckTUZopPJT5sXRZSyrjrX7YNREtoPLP4K05WwK9iqebPwpTJUwplPo5tUYaRQ/s1600/IMGP7898.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiOaVG52ZuP00Y3B-iq7ZYfgl3amvnC3VY8WfcaHSr26wCHIBm6jIuq59wkKhYJAtBKPvzhBN1T80hORckTUZopPJT5sXRZSyrjrX7YNREtoPLP4K05WwK9iqebPwpTJUwplPo5tUYaRQ/s1600/IMGP7898.jpg" height="150" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwDUVNZWhcdlzleO2u0mC9_frCrCvGqmh4JFKjgeko-JuMlbglXB9UiTqLZ5-VLfENXHhTffYsvpZQzOFyjinWNqqXFXW-QphNgN4J2-ZmWUbeWjSIV23MU5ac89TSNQbjRN2zy1Ql-MQ/s1600/IMGP7899.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwDUVNZWhcdlzleO2u0mC9_frCrCvGqmh4JFKjgeko-JuMlbglXB9UiTqLZ5-VLfENXHhTffYsvpZQzOFyjinWNqqXFXW-QphNgN4J2-ZmWUbeWjSIV23MU5ac89TSNQbjRN2zy1Ql-MQ/s1600/IMGP7899.jpg" height="150" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfQyc3c9LrEdUGZx0bGRN8V8bZZSBkfXpBZMjIluNUUfIzYNa_qROyHT1Ti_tYxvnveEbUzpBrHkPBejfgoA9gjeJFd-3StHH3oxZfqdMN8ycZ5q3UJ1DM7t1XPa4-3BDK13zZNl77sN0/s1600/IMGP7900.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfQyc3c9LrEdUGZx0bGRN8V8bZZSBkfXpBZMjIluNUUfIzYNa_qROyHT1Ti_tYxvnveEbUzpBrHkPBejfgoA9gjeJFd-3StHH3oxZfqdMN8ycZ5q3UJ1DM7t1XPa4-3BDK13zZNl77sN0/s1600/IMGP7900.jpg" height="150" width="200" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwwO-PxZ2EWp7Unx3gWMnna3dXr5At_II54XCDu0-AkhQH_6L0Fwtt98f1NQnlUBrT-CIeuOy76r8gdjX8-gY6SOsa-kvOjm1HRLZY7LzvhNf9486DTjRsickTELsogCuJSnS6e0B8r7M/s1600/IMGP7905.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwwO-PxZ2EWp7Unx3gWMnna3dXr5At_II54XCDu0-AkhQH_6L0Fwtt98f1NQnlUBrT-CIeuOy76r8gdjX8-gY6SOsa-kvOjm1HRLZY7LzvhNf9486DTjRsickTELsogCuJSnS6e0B8r7M/s1600/IMGP7905.jpg" height="150" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEbXPPRaa6ApZ2LAdA1donLzAbpu2wsO6itmZ8b8ZsEy845nlxNCgLIPgHS9fS3WAKKFew2Cv8B94yfID4yOtTdFO9wiE9g-zz4XmUc5BnvrcO86_UXIWxkPLJIgM7G4SwCaKghFF5Aw/s1600/IMGP7903.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEbXPPRaa6ApZ2LAdA1donLzAbpu2wsO6itmZ8b8ZsEy845nlxNCgLIPgHS9fS3WAKKFew2Cv8B94yfID4yOtTdFO9wiE9g-zz4XmUc5BnvrcO86_UXIWxkPLJIgM7G4SwCaKghFF5Aw/s1600/IMGP7903.jpg" height="150" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghNEx5pLZpi6NyNbnDBZHzL695HKR4rAv3gHrUWiF6K5ebTgdbTLzX6nS4D8QiKT_hyphenhyphen0fXhbbxhbT71OMZm2frDnpgoqnauApnsmLgarOc5xE22yG6jLJYhLyEy1n7Knm4PgdVmlUT6QU/s1600/IMGP7935.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghNEx5pLZpi6NyNbnDBZHzL695HKR4rAv3gHrUWiF6K5ebTgdbTLzX6nS4D8QiKT_hyphenhyphen0fXhbbxhbT71OMZm2frDnpgoqnauApnsmLgarOc5xE22yG6jLJYhLyEy1n7Knm4PgdVmlUT6QU/s1600/IMGP7935.jpg" height="150" width="200" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1xNn3RTaYOP-9vhG9XRq6lwglWghdWUURYW4yL-VlIPTqpN_W4wnYPRKeEy6cy-5Iju6BxUr4HvMjPYVPOG53swnJtpbAW76FbJ6tDa3HE-6YhMZBWNdl6rsieowCbPfJ1IY_CO4GC_U/s1600/IMGP7909.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1xNn3RTaYOP-9vhG9XRq6lwglWghdWUURYW4yL-VlIPTqpN_W4wnYPRKeEy6cy-5Iju6BxUr4HvMjPYVPOG53swnJtpbAW76FbJ6tDa3HE-6YhMZBWNdl6rsieowCbPfJ1IY_CO4GC_U/s1600/IMGP7909.jpg" height="150" width="200" /></a></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://1.bp.blogspot.com/-4l5SgQGNd4M/TnrTruqjbJI/AAAAAAAABL8/sSUIC-sDt2w/s1600/IMGP7909.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a>
<br />
The first challenge was to construct my own ShiftBrite Shield. They can be purchased from <a href="http://www.macetech.com/store/">Macetech's store</a>, but I wasn't interested in spending that much money on one when I could build what I needed for a fraction of that cost. As you can see, my ShiftBrite Shield is a bit more complex than Macetech's because I didn't have a transformer that could push enough amperage at those voltages. My solution was to use a 12V 2A transformer and step the voltage down using an LM317T voltage regulator. Here is a rough design of my board. The resistors represent the total resistance of the line (ie. 2 x 470Ω in parallel = 235Ω and 1.2kΩ + 100Ω = 1.3kΩ). I've since added a power switch, but that should be simple enough to figure out. If you have a 7V 1A transformer then the voltage regulator stuff can be skipped. It is probably a really good idea to have at least a 1000µF capacitor (if not the 100µF as well) to help eliminate some line noise.<br />
<br />
<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/AVvXsEimFnJ4vpldIgSgLFSeniAAyVhXLkNwN8QuwWzT1SIz514NDkJFhlgxxhTxOwbCL0ve4oith8M880tR_aYhJNYsCfKyXdT8V4RS5pDqqPeZG-A7dN41xZMAiW2JZIYbdiI5R_g8yK1iW9s/s1600/atmo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimFnJ4vpldIgSgLFSeniAAyVhXLkNwN8QuwWzT1SIz514NDkJFhlgxxhTxOwbCL0ve4oith8M880tR_aYhJNYsCfKyXdT8V4RS5pDqqPeZG-A7dN41xZMAiW2JZIYbdiI5R_g8yK1iW9s/s1600/atmo.png" height="284" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
It may be important to point out here that the ground from the ShiftBrite Shield is connected to the ground of the Arduino. This is necessary for the clock to work. Also, make sure you don't send any voltage down an Arduino port or you could damage your device.<br />
<br />
Additionally, unless you want to write your own code to handle sending packets to the ShiftBrites, the pins of the Arduino need to be mapped to these PWM pins on the ShiftBrite. The <a href="http://code.google.com/p/arduinoatmo/">Arduinoatmo Google Code site</a> has some nice and efficient code to bitshift and use SPI to determine when to continue without using the dreaded delay function. More on the code later - just make sure you know what you are doing if you use different pins.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdWIP1iCLZIsQKOaH7xBedI76hT-YezPFYqhUIPugvD_tTjwdgoPY3KKeyj5Q7u3qGnyl8Uhf6YiPWxWwqueOpmTKcUNIoM9Z_ZwVtfaf1RFkyuMQ0ndwwFeCYcfZeR293pt176oWSgKo/s1600/IMGP7933.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdWIP1iCLZIsQKOaH7xBedI76hT-YezPFYqhUIPugvD_tTjwdgoPY3KKeyj5Q7u3qGnyl8Uhf6YiPWxWwqueOpmTKcUNIoM9Z_ZwVtfaf1RFkyuMQ0ndwwFeCYcfZeR293pt176oWSgKo/s1600/IMGP7933.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
As you can see above, you will likely need a decent heatsink for the LM317T to dissipate any heat. This fairly large heatsink gets pretty hot to the touch after a few hours of operation.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1xNn3RTaYOP-9vhG9XRq6lwglWghdWUURYW4yL-VlIPTqpN_W4wnYPRKeEy6cy-5Iju6BxUr4HvMjPYVPOG53swnJtpbAW76FbJ6tDa3HE-6YhMZBWNdl6rsieowCbPfJ1IY_CO4GC_U/s1600/IMGP7909.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1xNn3RTaYOP-9vhG9XRq6lwglWghdWUURYW4yL-VlIPTqpN_W4wnYPRKeEy6cy-5Iju6BxUr4HvMjPYVPOG53swnJtpbAW76FbJ6tDa3HE-6YhMZBWNdl6rsieowCbPfJ1IY_CO4GC_U/s1600/IMGP7909.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
Since I'm opting to use the materials that I have on hand to do this, I decided against buying cables as I have a ton of Cat5 laying around. I needed 6 pins, so I cut off the blue wires and made sure to wire everything up the same way on both ends. Once I finished wiring the ShiftBrites, I went back and applied hot glue to act as an insulator between the wires. When wiring your ShiftBrites, take note that the Data/Latch/Enable/Clock pins are labeled I and O (as in Input and Output) and not 1 and 0. Embarrassingly I did not pick up on that right away and was wondering why it would not work when I sent a signal over the D0 pins but did on the D1 pins. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghNEx5pLZpi6NyNbnDBZHzL695HKR4rAv3gHrUWiF6K5ebTgdbTLzX6nS4D8QiKT_hyphenhyphen0fXhbbxhbT71OMZm2frDnpgoqnauApnsmLgarOc5xE22yG6jLJYhLyEy1n7Knm4PgdVmlUT6QU/s1600/IMGP7935.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghNEx5pLZpi6NyNbnDBZHzL695HKR4rAv3gHrUWiF6K5ebTgdbTLzX6nS4D8QiKT_hyphenhyphen0fXhbbxhbT71OMZm2frDnpgoqnauApnsmLgarOc5xE22yG6jLJYhLyEy1n7Knm4PgdVmlUT6QU/s1600/IMGP7935.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
As you can see, I'm using ShiftBrite 1.0 because while I was building this <a href="http://macetech.com/store">version 2.0</a> came out. One of the main changes to the design was to add a power filtering capacitor to the device. As awesome as these devices are, they definitely need the capacitor. Granted this 2200µF capacitor is overkill, it is what I had on hand. I started with 2 of these capacitors on my chain, but because of noise issues that I was having, I went back and put a 220µF capacitor on every other ShiftBrite 1.0 in my chain.<br />
<br />
On to the software. For my setup, I'm using <a href="http://code.google.com/p/boblight/">boblight</a> on Fedora to capture from X11 because Mythtv does not have this functionality built in. VLC and AtmoWin work very well on Windows if you are going that route. Either way we get the same packet information to the Arduino over the serial interface. <a href="http://fun3md.blogspot.com/2009/07/atmolight-technical-post.html">Fun3 has some good technical info</a> on the Atmolight protocol. Basically we get 4 bytes and then 14 bytes of actual data per packet. The packet and protocol information is good to understand, but largely inconsequential if you are using the Arduino sketch from the <a href="http://code.google.com/p/arduinoatmo/">Arduinoatmo</a> project because it will handle things for you.<br />
<br />
The next step is to upload the software to the Arduino. It's probably a good idea to <a href="http://code.google.com/p/shiftbritehughesyarduino/">start with some sketches</a> that <a href="http://macetech.com/blog/node/54">don't require any input</a> from the computer. This will allow you to test your hardware setup on its own. Both of these sketches require you to change the pinout to what we are using.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRZqaVNVYU9SYHQGM0FtfD0Yv41o2QQap1yV3M5rgD4B2cZKgCmaRTiYWyagVLGOL-ie2wycEKxKPyviVRiD-IZyZ_AfbDvAu6Vnt9CvgN6zmjYCjTRqdpPfgDUna4BHSPqxFgp8eWLf8/s1600/1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRZqaVNVYU9SYHQGM0FtfD0Yv41o2QQap1yV3M5rgD4B2cZKgCmaRTiYWyagVLGOL-ie2wycEKxKPyviVRiD-IZyZ_AfbDvAu6Vnt9CvgN6zmjYCjTRqdpPfgDUna4BHSPqxFgp8eWLf8/s1600/1.png" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuCup_sCZG-DybmMTWuWER8L84mN44gVUaRPsTF2Vgo_DGW4wYhfA8hy_TZ3-Nyt38CL-jOU8KfqPFH0muuKhvXJw1hgYKdmW27Gjb54bZ9oSyI2aiJLrDuHJXualdPN_BcMlftNe-J2E/s1600/2.png" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuCup_sCZG-DybmMTWuWER8L84mN44gVUaRPsTF2Vgo_DGW4wYhfA8hy_TZ3-Nyt38CL-jOU8KfqPFH0muuKhvXJw1hgYKdmW27Gjb54bZ9oSyI2aiJLrDuHJXualdPN_BcMlftNe-J2E/s1600/2.png" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-kpbRWiEqyYc/TntzMOZoazI/AAAAAAAABMQ/OfqKaC7stNA/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
The former is Macetech's code, the latter is Ashley Hughes' code - both modified to use the pinout described for the DIY ShiftBrite Shield. Whichever way you go, you should be able to get the ShiftBrites to do something at this point. <br />
<br />
For this to work with your videos, you need to get boblight compiled or installed on your HTPC. I could not find an RPM for Fedora (although I'm sure they exist), but compiling it from source was pretty simple. Just follow the instructions on the <a href="http://code.google.com/p/boblight/wiki/Compiling">project wiki</a>. It wasn't any harder than installing the dependencies listed with yum (replace '<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">apt-get</span>' with '<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">yum</span></span>' on Fedora), running the ./configure script and then running make. <br />
<br />
Once that is set up, we need to configure boblight. Below is my boblightd.conf file:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: xx-small;">[global]<br />timeout 20<br />interface 127.0.0.1<br />port 19333<br />interpolation on<br />proportional 100.0<br />saturation 3.0<br />value 10.0<br />valuerange 0.0 1.0<br />use yes<br />method average<br />threshold 20<br /><br />[device]<br />name ambilight<br />type atmo<br />output "/dev/ttyACM0"<br />rate 38400<br />channels 15</span><br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: xx-small;">interval 200<br />prefix FF<br /><br />[color]<br />name red<br />rgb FF0000<br />gamma 1.0<br />adjust 1.0<br />blacklevel 0.0<br /><br />[color]<br />name green<br />rgb 00FF00<br />gamma 1.0<br />adjust 1.0<br />blacklevel 0.0<br /><br />[color]<br />name blue<br />rgb 0000FF<br />gamma 1.0<br />adjust 1.0<br />blacklevel 0.0<br /><br />[light]<br />name center<br />color red ambilight 1<br />color green ambilight 2<br />color blue ambilight 3<br />hscan 25 75<br />vscan 25 75<br /> </span></div>
<div style="font-family: "Courier New",Courier,monospace;">
<br /></div>
<span style="font-family: "Courier New",Courier,monospace; font-size: xx-small;">[light]<br />name left<br />color red ambilight 4<br />color green ambilight 5<br />color blue ambilight 6<br />hscan 0 10<br />vscan 0 100<br /><br />[light]<br />name right<br />color red ambilight 7<br />color green ambilight 8<br />color blue ambilight 9<br />hscan 90 100<br />vscan 0 100<br /><br />[light]<br />name top<br />color red ambilight 10<br />color green ambilight 11<br />color blue ambilight 12<br />hscan 0 100<br />vscan 0 15<br /><br />[light]<br />name bottom<br />color red ambilight 13<br />color green ambilight 14<br />color blue ambilight 15<br />hscan 0 100<br />vscan 85 100</span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;">This goes in the file: /etc/boblightd.conf. When boblightd gets executed, it will run in the background listening for something to tell it what to do. To break it down, boblightd talks to the serial interface on the Arduino over USB and listens for data from another program. In this case I'm using boblight-X11 - a program that will run on the current X11 session and grab images from X11, process them, and send the information to boblightd which will in turn process it into the proper protocol (atmo) and then send the data to the specified device. If you want to learn more about the protocol that you are using, it is easy enough to send the output of the boblight daemon to a text file so you can look at the data being sent; just replace /dev/ttyACM0 in my config file to the location of a file on the hard disk. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">So how can we find out what to put in the device field so boblight can talk to the Arduino? Start by running '<span style="font-family: "Courier New",Courier,monospace; font-size: x-small;">tail -f /var/log/messages</span>' from a shell. You will likely see some things scroll by as DHCP leases get renewed and whatnot. When you plug in your Arduino to a USB port, it should read something like this:</span></span><br />
<br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;">kernel: [453420.004354] usb 3-2: USB disconnect, address 7<br />kernel: [453422.904031] usb 3-2: new full speed USB device using ohci_hcd and address 8<br />kernel: [453423.052623] usb 3-2: New USB device found, idVendor=2341, idProduct=0001<br />kernel: [453423.052629] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220<br />kernel: [453423.052633] usb 3-2: Product: Arduino Uno<br />kernel: [453423.052635] usb 3-2: Manufacturer: Arduino (www.arduino.cc)<br />kernel: [453423.052638] usb 3-2: SerialNumber: 6493534363335130B041<br />kernel: [453423.054731] cdc_acm 3-2:1.0: ttyACM0: USB ACM device</span></div>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">Typically it will be something like ttyS0, ttyUSB0, or in my case, ttyACM0. Simply put the device path into the boblight config file. Once boblightd is running, the Rx light on the Arduino should be flashing pretty rapidly or on constantly. </span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;">By default boblightd does not fork, so if you want to run it from a startup script you need to call it with the -f parameter or it will die when the startup script is done. Also by default boblight-X11 only samples the screen once every .5 seconds. I call '<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">boblight-X11 -t 0.1</span></span>' so it samples it 10 times a second. The behavior of this is up to you. Be sure to use top to see how much CPU usage these two programs are using. '<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">top -d 1</span></span>' will give you one second updates. It should be using no more than 5% CPU on a reasonably new machine. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">Mounting the ShiftBrites to your television/display is going to likely be the last challenge in this project. After bouncing some ideas off of my friends, I decided to go with plexiglass mounted to the back of the TV by the wall mount holes. On my Samsung the screws were 6 mm with 1.00 threads. I used 40 mm long screws with full threads to make sure the plexiglass was far enough from the back of the display so it could vent. I used 2 washers and a nut all tightened to the head to hold the plexiglass in place and another nut that would be tightened against the TV itself to hold the whole setup securely. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqeAh4Sl8A6337UOKzUjRtYsQa721tlzAFv23VZQmOB0LYlKjchYJVjUxRKsLNbrn8jq3MA_KnJbsmrFsOvrMq3sDCjKdAtk1GT8-yLID4wCgzglSYIK4frSpRkOibtR-ceG-EK-MD9g/s1600/IMGP7945.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqeAh4Sl8A6337UOKzUjRtYsQa721tlzAFv23VZQmOB0LYlKjchYJVjUxRKsLNbrn8jq3MA_KnJbsmrFsOvrMq3sDCjKdAtk1GT8-yLID4wCgzglSYIK4frSpRkOibtR-ceG-EK-MD9g/s1600/IMGP7945.jpg" height="150" width="200" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF71vD4QCNlJrlXkZcr4bO3a9KQr7QdoLoIxE9bdf2ljatHxFVB9LzVOHTDe5diAmhK4pLwEQalmpGLYM83WDJbft3ZP4Ga_0Q1EzvkB8OzMD-I95LTGDZDW6UVizLCyt1Eu1zMU1sgPM/s1600/IMGP7946.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF71vD4QCNlJrlXkZcr4bO3a9KQr7QdoLoIxE9bdf2ljatHxFVB9LzVOHTDe5diAmhK4pLwEQalmpGLYM83WDJbft3ZP4Ga_0Q1EzvkB8OzMD-I95LTGDZDW6UVizLCyt1Eu1zMU1sgPM/s1600/IMGP7946.jpg" height="150" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22ab-hG0C6TFqur4r9jCdSiHN9I1mdx-BZ0GVpJUX5Jmb66z81hIwRSRghBcXvnfmKSDbFdt8z5z_mGc3pKxDiIjvkxs12o24Qay6Q9ph53q-h8FpdslrdbBwZjkBYITANSxNGpM_zQU/s1600/IMGP7949.jpg" imageanchor="1" style="clear: right; display: inline !important; margin-bottom: 1em; margin-left: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg22ab-hG0C6TFqur4r9jCdSiHN9I1mdx-BZ0GVpJUX5Jmb66z81hIwRSRghBcXvnfmKSDbFdt8z5z_mGc3pKxDiIjvkxs12o24Qay6Q9ph53q-h8FpdslrdbBwZjkBYITANSxNGpM_zQU/s1600/IMGP7949.jpg" height="150" width="200" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="http://1.bp.blogspot.com/-9znx_tcD50g/Tnuv2BZXVJI/AAAAAAAABMY/DZXG0AMlMB0/s1600/IMGP7946.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a>
<br />
<span style="font-size: small;"><span style="font-family: inherit;">My power cable had enough room in the spacing to be manipulated, but the input cables did not. Since I wanted a ShiftBrite at the bottom corner, I had to cut out a space for the input cables but leave a place for the LED. We won't talk about the horrible job I did cutting it, but it works.</span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmkahZvx64Q2EG8GplHvlpvmJc1zk1wz4ZRsfm4i1tRQ5yQpDHKViSnk6sSA9vS3hCnaP9bh7sGLMkj_UXxS0sPf3EL4o5WOXvOmJTFjOzHkxBoecF8EYhDaIoiyBGb4ZJtMkxJRsS-bM/s1600/IMGP7952.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmkahZvx64Q2EG8GplHvlpvmJc1zk1wz4ZRsfm4i1tRQ5yQpDHKViSnk6sSA9vS3hCnaP9bh7sGLMkj_UXxS0sPf3EL4o5WOXvOmJTFjOzHkxBoecF8EYhDaIoiyBGb4ZJtMkxJRsS-bM/s1600/IMGP7952.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;">I needed to find a way to aim the ShiftBrites once I mounted them. I didn't want to have them aimed directly back on to the wall, so again I looked for an unorthodox solution and found one in my wife's wedge-shaped makeup applicator sponges. Hot glue seemed to be a good adhesive choice since it is strong and I know I can get it off of the ShiftBrites without damaging the subcomponents. The mass of tape on the left is that 220</span></span>µF capacitor mentioned earlier.<br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNxqWaOA94236dAFnJmVPsFDjF-c2qpWOU1OpcjhAs58swua8eEXDk3u7seqIyqlzHKIOofQHETLXMaMwsaNnPn4mvwNhh6quS-zgTJvNoCVH-ymAhg02fms-ID8NNLMhvBuODuxEwI08/s1600/IMGP7953.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNxqWaOA94236dAFnJmVPsFDjF-c2qpWOU1OpcjhAs58swua8eEXDk3u7seqIyqlzHKIOofQHETLXMaMwsaNnPn4mvwNhh6quS-zgTJvNoCVH-ymAhg02fms-ID8NNLMhvBuODuxEwI08/s1600/IMGP7953.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">Here is what the back of my TV looks like with the plexiglass and all of the ShiftBrites mounted. As you can see, some of the LEDs (like the top center) need to be aimed a bit better. But this is the gist of my mounting solution. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">The last thing that I needed to do is to find a good diffuser to put over the ShiftBrites. Because of the proximity of my television to the wall I get some odd colors on the wall. For example when a ShiftBrite is shining white, I can see the green subLED pretty strongly. My solution to this was to cut up the flat sides of a plastic water jug in 2.5" squares. I stapled two together on the edge of one side and attached them to the pieces of foam. This acts as a good enough diffuser until I am able to find something better. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">Here is a sample video of what my DIY Arduino Ambilight looks like. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<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;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<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/rEVSjfAhldA?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<span style="font-size: small;"><span style="font-family: inherit;">Here are a couple of other example of what it looks like after I added the diffusers. There's not much color on the first one, but it illustrates some of the difficulty that the ShiftBrites have with displaying pure white without seeing the individual subLEDs. If you look really closely you can see some green tints in the video when there is only supposed to be white. Those tints were really well defined and annoying before the diffusers and are almost unnoticeable in person after the diffusers. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"> </span></span><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/vpVVZVRo180?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: right;">
</div>
<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/9nRAeDfyjc0?feature=player_embedded' frameborder='0'></iframe></div>
<span style="font-size: small;"><span style="font-family: inherit;"> </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"> </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;">I'd love to hear any ideas that anyone else has on this or a similar project! Please leave any comments below. If this has been helpful, please consider donating. </span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<br />
<div style="text-align: center;">
<span style="font-size: xx-small;"><span style="font-family: inherit;">Quick $10</span></span></div>
<div style="text-align: center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input name="cmd" type="hidden" value="_s-xclick" /><input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----" /><input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" /></form>
</div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div style="text-align: center;">
<input name="cmd" type="hidden" value="_s-xclick" />
<input name="encrypted" type="hidden" value="-----BEGIN PKCS7-----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-----END PKCS7-----
" />
<span style="font-size: xx-small;">Other Amount</span></div>
<div style="text-align: center;">
<input alt="PayPal - The safer, easier way to pay online!" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" type="image" />
</div>
</form>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-size: x-small;">Disclaimer: I've tried to reduce errors, exaggerations, and outright lies in this tutorial. If I missed something, something is wrong, or you have questions then please post below and I'll update the info in the post. If you build one of these devices and it burns your house down then I cannot be held liable, yet I offer my condolences. If you attempt to hold me responsible then I *will* laugh at you. This information is provided as-is with no warranty.</span></span></span><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;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-4l5SgQGNd4M/TnrTruqjbJI/AAAAAAAABL8/sSUIC-sDt2w/s1600/IMGP7909.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div style="font-family: inherit;">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="license" style="margin-left: 1em; margin-right: 1em;"><img alt="Creative Commons License" src="https://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png" style="border-width: 0pt;" /></a></div>
<br />
<span style="font-size: x-small;">This article</span><span style="font-size: x-small;"> and contents therein by <a href="http://dhowdy.blogspot.com/" property="cc:attributionName" rel="cc:attributionURL" xmlns:cc="http://creativecommons.org/ns#">Don Howdeshell</a> is licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="license">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.
</span></div>
Unknownnoreply@blogger.com19