tag:blogger.com,1999:blog-58513328001282563082024-03-23T03:13:58.876-07:00The Unremarkable Adventures of an ElectronThis is merely a record of stumbling attempts to solve various problems. Some worked well; most are inelegant half-assed clusterfucks. It is the observed rarity of concern or applicable solutions in web searches which ultimately drove me to the kind of madness as would precipitate a blog of my own meager conclusions. Somebody take these damn ideas and use them. Unknownnoreply@blogger.comBlogger51125tag:blogger.com,1999:blog-5851332800128256308.post-7792927618011997812024-02-14T22:17:00.000-08:002024-02-15T16:15:56.206-08:00A 410 shotshell in a 44 Magnum rifle<p>I regularly use a 22LR pistol at close range for certain utilitarian purposes. It's convenient and in theory, it should be adequate. Let's be realistic though. It's always at night, and I permanently suck with a pistol. Something with more energy and better tolerance on shot placement would be nice, but a long 20ga is the other extreme. It's prohibitively awkward in a doorway, and at close range, it's a bit excessive. A short 410 would be nice, but that's not what's at hand here. I do have a Marlin 1894 in 44 Magnum. So the wheels start turning. </p><p><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ-DAE65T77POdG5zaNIMKtwauSySTbSwOQus3tqxOch4eUS4oiabbokmMgkxe_E9JRm132xRObhZPNFWYiMSpF6fb26zFrODNcjyoFpX0ebCySNYv9do9YAWQmYADWq5i4qf-4ufhNIT7eaqDStLLg-FGtUZqxexaR-rx5izBxZt9ympJyL7zWorVZLY/s3164/IMG_20240214_231251516.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2028" data-original-width="3164" height="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ-DAE65T77POdG5zaNIMKtwauSySTbSwOQus3tqxOch4eUS4oiabbokmMgkxe_E9JRm132xRObhZPNFWYiMSpF6fb26zFrODNcjyoFpX0ebCySNYv9do9YAWQmYADWq5i4qf-4ufhNIT7eaqDStLLg-FGtUZqxexaR-rx5izBxZt9ympJyL7zWorVZLY/w640-h410/IMG_20240214_231251516.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Oh, it'll fit. Okay, maybe not a 3" load.<br /></td></tr></tbody></table><p>
</p><p></p><p></p><p><br /></p><h2 style="text-align: left;">The Shot Capsule </h2><p>Now, I know they make shotshells in pistol cartridges, but they're expensive, the payload is miniscule, and the shot size is small. Supposedly you can even buy the caps to reload yourself, but they're also miniscule, expensive, and I have not witnessed them ever being in stock at any time I looked. So I think it's clear that those aren't what I want, so what do I want? I want to somehow find a simple and convenient way to load 44 SPL/MAG cartridges that will roughly duplicate a standard 410 load: 1/2 ounce of shot at 1100-1200 fps. It has to fit in this particular rifle, and its fitness for revolvers or other rifles is irrelevant. I tend to single-load cartridges anyway, so it doesn't need to actually feed through the magazine.
</p><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0lyhbr-zU9CHY9JRX7JTVDXVwzA30x3fcIlm_miUqI0qvo3kSu_RY_1oAlHA9pidgPzmHzY4Smpwf11ZCzNecXVmYy7c7rA0to3wq6aXduUGzeG_JGFV3NcHYqspi8qHXMpZcNYim31dw5CKioF_04oH1PEEXRJJOAfH3cu7_rJUckcH-79xS-lJXOWU/s1200/factorycaps.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1200" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0lyhbr-zU9CHY9JRX7JTVDXVwzA30x3fcIlm_miUqI0qvo3kSu_RY_1oAlHA9pidgPzmHzY4Smpwf11ZCzNecXVmYy7c7rA0to3wq6aXduUGzeG_JGFV3NcHYqspi8qHXMpZcNYim31dw5CKioF_04oH1PEEXRJJOAfH3cu7_rJUckcH-79xS-lJXOWU/s320/factorycaps.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">No. Just ... no.<br /></td></tr></tbody></table><p>
<br />
Now, I hope it's obvious that a half-ounce shot load won't fit into the SAAMI spec OAL for either 44 SPL/MAG. What's the actual OAL we have to work with? With this specific rifle, the maximum OAL which can be single-loaded into the chamber is about 2.15". At this length, an unfired cartridge cannot be ejected, striking the ejector before the cartridge fully clears the chamber. It needs to be manually unhooked from the extractor and tipped out of the action. At 1.75" OAL, the cartridge can be manually fed and loaded cartridges can be ejected. The longest OAL which can be reliably fed through the magazine is about 1.63", which is close to the SAAMI spec for 44 Magnum (1.610"). The payload constraint means that magazines and revolvers are simply not an option. The cartridge will actually have to extend well into the bore when chambered, and ejection is going to be slightly inconvenient. </p><p><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbMHus6_ggYfFmmFOdsun0DZ6dlI65BvG18HPS0tjRFENK87Et0Kw_YpMXi24xVcvk-zVu6qGLFGIEIxhZkZAJJHeoBqdWK14F-U1zzqdoSZBgwB0rVdhFHP6x6Pcpq0p-fFeck2Ohi0oN1_bTn-Dy7SpPmXJr8GBoxOh_Edc9XMdRc3FLaBSwaphrHS0/s4160/IMG_20240214_173134770.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbMHus6_ggYfFmmFOdsun0DZ6dlI65BvG18HPS0tjRFENK87Et0Kw_YpMXi24xVcvk-zVu6qGLFGIEIxhZkZAJJHeoBqdWK14F-U1zzqdoSZBgwB0rVdhFHP6x6Pcpq0p-fFeck2Ohi0oN1_bTn-Dy7SpPmXJr8GBoxOh_Edc9XMdRc3FLaBSwaphrHS0/w640-h480/IMG_20240214_173134770.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A long cartridge strikes the ejector before it clears the chamber.<br /></td></tr></tbody></table><br />
The first thing that crossed my mind was to make a paper shot capsule. While I tried several variations of this, they were consistently inconsistent. It's a difficult balance trying to get something that will stay intact while handling, but will open up quickly, uniformly, and consistently. Rolling too many layers, using glue or tape, or tucking the ends too tightly would often delay the capsule from opening for about 2-3 yards. Considering that the target distance is about 3 yards, that's not acceptable. When the paper opened earlier, it would tend to unroll instead of tearing or breaking apart, creating a strongly asymmetric pattern. The paper patch/capsule idea still has some appeal and might be solvable. It has its simplicity and it's potentially a very accessible option. Who doesn't have a sheet of paper lying around? While the paper cartridges aren't terribly robust and are prone to spilling and getting kinked, that physical flexibility is a minor advantage. Since the paper capsule bends just a bit, you can snake a slightly longer cartridge into the chamber than you otherwise could with any rigid capsule. That might not seem like much, but bear in mind how pressed we are for volume with that payload constraint.
<br /> </p><p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWR190qwmdG9oQj-InuzT6hLZPrfrTA9aSyWv9YmU8Z5w5BYUpcSoA_9UKmdYk0DSN2wRNcnjp394zzH65r15NiBIRzeykZnsWS-Qe1PnKw1F8W4eZta_ghaG-2Cby3iqHLbjRFbnB77IeXheWkCrUmgh_PRSJGu4elMV-1QcQdXj2pjuv3PcTeOwbwLk/s1500/IMG_20230808_190307679.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1006" data-original-width="1500" height="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWR190qwmdG9oQj-InuzT6hLZPrfrTA9aSyWv9YmU8Z5w5BYUpcSoA_9UKmdYk0DSN2wRNcnjp394zzH65r15NiBIRzeykZnsWS-Qe1PnKw1F8W4eZta_ghaG-2Cby3iqHLbjRFbnB77IeXheWkCrUmgh_PRSJGu4elMV-1QcQdXj2pjuv3PcTeOwbwLk/w640-h430/IMG_20230808_190307679.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A paper cap in 44 SPL brass.<br /></td></tr></tbody></table><br />
That brings us to the solution. I had a small second-hand SLA 3D printer sitting on the shelf for nearly a year untouched because I didn't want to deal with figuring out the shitty OEM windows-only webapp-on-the-desktop slicer application for the poorly-documented and widely-unsupported unofficial design revision of the particular model I had (a late-model "original" AnyCubic Photon). I've used FDM 3D printers before, but I've always seen 3D printing as a severe compromise in terms of accuracy, surface finish, and material properties. Consequently, I rarely found a good reason to bother with the printer. While I hadn't used SLA printers before, I did expect the acrylic parts to be relatively brittle. I had some old expired clear resin that I got with the printer, so maybe this would actually be an appropriate use for it. After all, how else would I easily make a bunch of thin, brittle plastic cups? </p><p><br /><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDq0IucUVTOKdD5gXoExElZpHHYIqkvztxDmSlson0mQhA0kyy9l9ysDiMQkY0qe76l5Fbsl8CDkgFvKmbVr4DqopDn7XTQOeFrHgNGl5JdYcMkLivUvEf-Ie5oCbngNX0Q1axLqig97g_qJduqoraJW8gP29z398Rp7VbGCndQzV5AXnScXeDbOPnpg/s4160/IMG_20240214_172244984.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4160" data-original-width="3120" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLDq0IucUVTOKdD5gXoExElZpHHYIqkvztxDmSlson0mQhA0kyy9l9ysDiMQkY0qe76l5Fbsl8CDkgFvKmbVr4DqopDn7XTQOeFrHgNGl5JdYcMkLivUvEf-Ie5oCbngNX0Q1axLqig97g_qJduqoraJW8gP29z398Rp7VbGCndQzV5AXnScXeDbOPnpg/w480-h640/IMG_20240214_172244984.jpg" width="480" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"> Why do you assholes have to <a href="http://epicbeardquest.blogspot.com/2019/10/resolving-tanfoglio-witness-magazine.html" target="_blank">call every product model the same thing</a>? </td></tr></tbody></table><br />
Working off the dimensions gathered in earlier attempts with paper and other materials, I spent some time in OpenSCAD coming up with a cap geometry that would work. Since we're not injection molding these parts, there are a number of features we can afford that commercial caps can't. To ensure unifom breakup and resin drainage during printing, I slotted the parts. The caps can also have a uniform wall thickness with reentrant features like a base taper and cannelure. This gives us a few advantages: The base taper makes them easier to assemble into the case and it stiffens the mouth of the cap. The cannelure gives a bit better retention with less risk of cap breakage when crimping. The lack of mold draft means that the cap nose is less likely to survive intact and cause a defect in the shot pattern. Other than the hassle and mess of dealing with SLA printing, I think these features make the printed caps <i>better</i> than the commercially available caps. At the very least, they're available and customizable.
<br />
<br />
After a lot of trial and error, I had something that could be assembled, handled, and chambered with little risk of breakage, but would still reliably break up and pattern uniformly -- or at least as uniformly as you can expect from a shot pattern coming out of a fully-rifled bore. The design file is parametric, so features and geometry can be configured for calibers and applications other than my own. The nose geometry can be adjusted, whether you need a taper for easier insertion at max OAL, or whether you want a square nose for maximum capacity in a revolver. The zipper slots can be configured depending on how stiff you want the cap to be, though they do serve a purpose as drain vents during printing, and they aid in nose breakup, so it's probably not a good idea to eliminate them. The SCAD file optionally generates the parts on a raft. This helps with removing the fragile uncured parts from the build plate, and the attached label tag aids in incremental design refinement. The parts can be snipped off the raft with a pair of fine nippers.
<br /> <p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAlFOolcg_S0fWWUBR0R5h4nUABrYfm6f65LR2AwCZ1aYdntYly47ERyubl_IhxJ7JUtvwxGTFZ3BP3iICSBaySQnPLBuhywDJg_HWkszs9rOLiSCKOy7Xp32m4nXLHtLDp2TXeIuQJ9OC2-lB_ljVPwStgnQTAb1a51UiDD_0rmYinGjXYz-JHHFdPhE/w640-h480/IMG_20240214_173007539.jpg" style="margin-left: auto; margin-right: auto;" width="640" /></td></tr><tr><td class="tr-caption" style="text-align: center;">Rafted parts and nippers<br /></td></tr></tbody></table><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6E9jzyRI09rC8_Pzdm9BHP5jxmnYVJ0XgIXKt0OiDj30xsaJbB1Sm2x0VJEyDyDIulf-RTwgJdKGMSA3OAZxy-ViyzhkIPdujhLb0k2emKv2fyzvC6dwhb3njz4f3nOP9pnmh_l2iDJ8oKKv-rtmapH1_0t69_4T3hG4NiURv1wLl4geIr4FwR-McC3Y/s1500/IMG_20230906_200711008.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1094" data-original-width="1500" height="466" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6E9jzyRI09rC8_Pzdm9BHP5jxmnYVJ0XgIXKt0OiDj30xsaJbB1Sm2x0VJEyDyDIulf-RTwgJdKGMSA3OAZxy-ViyzhkIPdujhLb0k2emKv2fyzvC6dwhb3njz4f3nOP9pnmh_l2iDJ8oKKv-rtmapH1_0t69_4T3hG4NiURv1wLl4geIr4FwR-McC3Y/w640-h466/IMG_20230906_200711008.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Different size caps<br /></td></tr></tbody></table><br /> <br />
A word on the resin. Unlike nearly every other application, this is one case where we actually want our resin prints to be brittle. As time goes by, even the cheap resins will likely have improved toughness, so bear that in mind. It's preferable to stick with cheap, standard clear SLA resins. I'm currently using SUNLU standard clear green, though the original bottle I started with was a much older ERYONE standard clear that expired around 2019. There seem to be fairly wide margins on how tough the material can be before it causes breakup problems, but I'd stick with clear resins and thoroughly overcure them.
<br />
<br />
I should note that these clear resins can be dyed in a heated bath, so if you want to color-code your shotcaps (e.g. to denote the shot size or loading), you don't necessarily need multiple resins. I used my stock of old RIT dyes, though modern reformulated RIT will probably not work. You should be able to use iDye Poly without much issue.
<br /> <p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilbO7jTdOT3JgxdvdoSeXHT-Ux0kAY6UrquPZ6OfisgZF0lsOZREpu2hqOAFvqpx6rmXX8E2hRvf04SYMSv6vmqi6iGqrDKBQG_0FChTP0gysgNaJPjrXuOw5WiNHLdDJxczS2_CD2Zk3JxM7PWhS8RWx7hTMhA-m1141_DNd5MMgDOJyFyvOenGxaLiY/s4160/IMG_20230905_185146330.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilbO7jTdOT3JgxdvdoSeXHT-Ux0kAY6UrquPZ6OfisgZF0lsOZREpu2hqOAFvqpx6rmXX8E2hRvf04SYMSv6vmqi6iGqrDKBQG_0FChTP0gysgNaJPjrXuOw5WiNHLdDJxczS2_CD2Zk3JxM7PWhS8RWx7hTMhA-m1141_DNd5MMgDOJyFyvOenGxaLiY/w640-h480/IMG_20230905_185146330.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Dyed caps<br /></td></tr></tbody></table><p>
<br />
Can these caps be printed with an FDM printer? Maybe, but I wouldn't bother. The design is more or less a nightmare stringing test for an FDM printer. You're trying to print a series of tall cylindrical and conical arc segments that are approximately one nozzle-width thick, with tiny gaps that are even smaller. Maintaining dimensional accuracy and stripping heat are going to be challenges. You could easily configure the SCAD file to produce a slotless cap and print it with a single wall. That might be easier, but it might not break up like we want. In the end, you'll get a part that's probably tougher than what you really want, and will likely smear and coat the bore due to friction and the relatively low melting temperature. The desire to make a brittle cap suggests that we should use something like PLA. You're free to try it, but I'm not interested in trying to find out how to remove a thin coating of solvent-resistant plastic from a rifle bore. Maybe there are exotic filaments that would work, but that's out of my capabilities. The acrylic resins are surprisingly resistant to heat, so SLA printed caps don't seem to be at significant risk.
<br />
<br />
<br /></p><h2 style="text-align: left;">
The Wads</h2><p>
Now I haven't mentioned what goes under the shot column. That's because the wad is where everything starts becoming less ... satisfying. When I was originally playing around with paper caps, I was using something that I've used several times before -- starch packing peanuts. Not styrofoam peanuts, but the water-soluble packing peanuts. They compress into a tough, heat-resistant wad that will conform to the cartridge and bore with little issue. I have found them to be surprisingly effective for doing dumbass weird shit like this. That said, they're tedious to install and compress, they need to be fairly thick to work, they're limited in the amount of heat and pressure they can take, and they're inherently inconsistent. With a rigid cap, the maximum allowable powder+wad stack height demands a dense powder and a short wad. While moderate for the rifle, the developed pressures are still too much to reliably withstand at an appropriately short wad thickness.
<br /> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQPe27W6ixg6PbYNUgUnHI3TgHWZCuiacbLI1WK4lJRXfHalVX3CULPWlQUZD4JbNAKu2BMFhJ3LdUeRKwo_fzAqotRGBYaDTRpYh9Q99edRQDzyIUthiDMpVyRhXIX5tFoY8_Y0n9R0a6jpRN1ma_rAYMZ_g2MmbF3e0WlAan4Lb0URi-dtsr0YOCfY/s4160/IMG_20230906_214818676.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQPe27W6ixg6PbYNUgUnHI3TgHWZCuiacbLI1WK4lJRXfHalVX3CULPWlQUZD4JbNAKu2BMFhJ3LdUeRKwo_fzAqotRGBYaDTRpYh9Q99edRQDzyIUthiDMpVyRhXIX5tFoY8_Y0n9R0a6jpRN1ma_rAYMZ_g2MmbF3e0WlAan4Lb0URi-dtsr0YOCfY/w640-h480/IMG_20230906_214818676.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Fired peanut wads<br /></td></tr></tbody></table><p style="text-align: left;">
<br />
I thought about printing plastic wads, but considering the brittleness of the material, and the fact that I didn't want a bunch of significant chunks of plastic trash all over the place, I didn't pursue the idea. I also wasn't really too keen on having powder stored in contact with questionably-cured SLA resin and potentially turning all sweaty and weird. The long-term compatibility of powder and resin is something I'd want to test experimentally before I'd use it, and that would take a long time to test.
<br />
<br />
Instead, I just made a primitive punch and die out of scrap from the trash pile, just to see if paper wads would work or not -- a proof of concept. I'm using 0.058" thick card stock (some used presentation boards). Call that 500lb cardstock or a 60pt mat board. Translating that into the conventional ill-standard "ply" units is pure guesswork, so good luck shopping. With a die diameter of 0.425" and a concave punch face, the wads come out around 0.429-0.430", which is a nice snug fit in sized brass. For most loads, I use 3 cards for a wad height of 0.175". With this heavy card stock, I can get by with 2-card wads, but I wouldn't try to replicate such a thin wad with more layers of thinner stock.
<br /> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizC5Nkn-mhJBeOxUFDltN7QNw8iIOzEECKTz_Wsm4aymdLB7wMj5BHPF80Hn8xG-z36W1Wrdo20qiZVRFwBhOXZoJAAu88zRotJlmvXtESpxwPJrDwrTBsvbc1moPkVL76xgGzwkqTVX2CDyyzY2ehH56KrkB9lBhcTA1gROVslfq23Eww_n0lym3K0EI/s2928/IMG_20240214_171200348.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1896" data-original-width="2928" height="414" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizC5Nkn-mhJBeOxUFDltN7QNw8iIOzEECKTz_Wsm4aymdLB7wMj5BHPF80Hn8xG-z36W1Wrdo20qiZVRFwBhOXZoJAAu88zRotJlmvXtESpxwPJrDwrTBsvbc1moPkVL76xgGzwkqTVX2CDyyzY2ehH56KrkB9lBhcTA1gROVslfq23Eww_n0lym3K0EI/w640-h414/IMG_20240214_171200348.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Using the lathe tailstock as a simple screw press<br /></td></tr></tbody></table><p style="text-align: center;"><br /></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhflskiR_4ygzI6RZ-wg_2G4ZE_LVQlYzedcu127bkTApvfBRKb3Mr925mSPkQoGj-VM6baU7mhQQb-JOxF6JWGibiHkVoSYJmajB6jBAkXAy2xTho3MTvk7Y8zkuHyb1x5KklxKfHZ_TF6s0suxAc1g1npG4bk9EtJTepjIhroOVPuXmkaYwghEN-h2GQ/s4160/IMG_20240214_172153150.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhflskiR_4ygzI6RZ-wg_2G4ZE_LVQlYzedcu127bkTApvfBRKb3Mr925mSPkQoGj-VM6baU7mhQQb-JOxF6JWGibiHkVoSYJmajB6jBAkXAy2xTho3MTvk7Y8zkuHyb1x5KklxKfHZ_TF6s0suxAc1g1npG4bk9EtJTepjIhroOVPuXmkaYwghEN-h2GQ/w640-h480/IMG_20240214_172153150.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Wads, wad insertion tool<br /></td></tr></tbody></table><p>
<br />
The cardstock wads work well, though I dislike the fact that the wads or punch aren't something that can be easily obtained. They aren't a standard size, so you're not going to be able to buy a tool set or precut wads. Even the rudimentary die set I made required a lathe to make. A press-mounted punch would be more complicated, and like most practical problems, it's well out of the capabilities of pedestrian 3D printing, so maybe it's not as accessible as I would have liked.
<br />
<br />
<br /></p><h2 style="text-align: left;">The Powder</h2><p>
I also haven't mentioned what powder I used. Well, that's where things are even less ideal -- at least for me. It's fair to say that this entire project is not something you're going to find load data on in any book, but we could always look at the nearest neighbors. I use Herco for 44 SPL plinking loads: 240gr @ ~1030 fps with 7.0gr, or 1125 fps with 7.5gr. That's not too far off-target, considering that 1/2oz is roughly 220gr. Surely the slightly lighter payload would push us a bit higher in the velocity? There's a couple problems with thinking that these pistol powder loads are going to be comparable or usable. First off, Unique and Herco are just too bulky to be viable. Second, there's no tight crimp, neck tension, or engraving force, so early pressures are low and the actual powder efficiency is low. The same charge that gets over 1100 fps out of a 240gr bullet barely makes over 900 fps with a lighter payload, leaving behind lots of sticky unburned residue.
<br />
<br />
What else is on the shelf? Circa 15gr of H110 might be appropriate for an actual 410 load, so what's wrong with that? It's really the same story. That large charge of H110 eats up the available stack height really fast, and is still on the borderline of being underpressured. It seems that 410 loads are probably at the lower end of the pressures that H110 likes to burn properly. The shift to a slightly larger bore diameter is probably just enough to push us close to the hairy edge of having occasional poppers and barrels full of yellow unburned powder grains. H110 is simply inappropriate for lighter (i.e. SAAMI spec-length) loads, though perhaps those could work with the pistol powders.
<br />
<br />
I don't have a lot of powders on hand, and my LGS hasn't had much of any powder (or anything) on the shelf in the last three years. I'm sure there's something that's more dense than Herco, while being able to perform at relatively low chamber pressures. I could throw a dart at a burn rate chart and try something blindly, but I hate gambling on components if I know I don't have an alternative application for whatever I'm buying. Besides, I do have this ancient can of Alcan AL-7.
<br /> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShJVbvkLBrpJF3x59WORrVXwfop-etar5vDZ29Fgh2R11JvasyFK1xuLirDaIVkwt4szM7h6S8FaqkoEqyiElD6XHUrZ2DVMie6HeLlPJw5U4tZ-DMieB86KrWxP9t-OYkgc-glycxJmfR5lTvuy4FYHRKFjpzk01S-WPdalP98gdP-1A4H0i77PNfcA/s4160/IMG_20240214_174044502.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgShJVbvkLBrpJF3x59WORrVXwfop-etar5vDZ29Fgh2R11JvasyFK1xuLirDaIVkwt4szM7h6S8FaqkoEqyiElD6XHUrZ2DVMie6HeLlPJw5U4tZ-DMieB86KrWxP9t-OYkgc-glycxJmfR5lTvuy4FYHRKFjpzk01S-WPdalP98gdP-1A4H0i77PNfcA/w640-h480/IMG_20240214_174044502.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Sketchy? Pff. It'll be fiiine. That rust is just part of the <i>aesthetic</i>.
</td></tr></tbody></table><p>
<br />
With 12.0gr of AL-7, 2 card wads, I can barely fit everything within 2.15" OAL. The result is 220gr of shot at 1215 fps. A 10gr charge puts us just under 1100 fps, which at 3-5 yards isn't really that much of a loss, but it gives us more wiggle room on stack height. I've settled on 10.5gr and 3 card wads. That's a bit on the low end of what I'd call a 410-equivalent load, but considering how severely the rifling limits the effective range, there really isn't much point in pushing the velocity too far anyway.
<br />
<br />
So AL-7 works great. It's dense enough and tolerates the low pressures just fine, but nobody will be able to use this load data because AL-7 hasn't been on the shelves in 40 years. It's going to really suck when I run out of AL-7, but maybe if you're more familiar with powders in this part of the spectrum, you'll be able to use this suggestion as a data point in finding a suitable replacement. </p><br /><h2 style="text-align: left;">Conclusion </h2><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwlFJApvRq-ek6QRnmdMm0XLJCDxlPKywZwMDi9KTpRhE4_T-Le66sDsPdhaz8fxy4ufYBsSw0aamUU0KWnf9IZjJlZZvnQA21kqLGP9SDoV0Nr80TkC46ZBJmOdkzp9MVMEymRxJxeQerCXBgw6bjPMcoXVfmWGcX73Fijbu4v6yJdgi76QZM487PNYE/s4160/IMG_20240214_173400725.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwlFJApvRq-ek6QRnmdMm0XLJCDxlPKywZwMDi9KTpRhE4_T-Le66sDsPdhaz8fxy4ufYBsSw0aamUU0KWnf9IZjJlZZvnQA21kqLGP9SDoV0Nr80TkC46ZBJmOdkzp9MVMEymRxJxeQerCXBgw6bjPMcoXVfmWGcX73Fijbu4v6yJdgi76QZM487PNYE/w640-h480/IMG_20240214_173400725.jpg" width="640" /> </a><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjifasZuWflHX2OYdbiz6JZslDcy1l2-7Xeg-DXrJri6dzkj7vR119Ka1usemmKBZvlnw0xzrIPCl6FCNA7VYd4ORbTCPfZjbctbge7FD2mRxZAjaryNX6KUPTDKICEZcjRj8RMhp9f4gxGDNpzRiDyi1_zFqzCPYfgSZqC-SJ1cDsSoclr5NetvmlvzlA/s4160/IMG_20230916_071705808.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjifasZuWflHX2OYdbiz6JZslDcy1l2-7Xeg-DXrJri6dzkj7vR119Ka1usemmKBZvlnw0xzrIPCl6FCNA7VYd4ORbTCPfZjbctbge7FD2mRxZAjaryNX6KUPTDKICEZcjRj8RMhp9f4gxGDNpzRiDyi1_zFqzCPYfgSZqC-SJ1cDsSoclr5NetvmlvzlA/w640-h480/IMG_20230916_071705808.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Obligatory glamour shots<br /></td></tr></tbody></table></div><p> <br /></p><p>So in the end, I have what I think is about all I really need from the cartridge. It's roughly equivalent to a moderate 2-1/2" 410 load, but I can use it in a short, handy rifle that's also usable for other things. They sound good, feel good, and I'm getting fond of the smell of AL-7. They produce about a 6" pattern at 3 yards, and the cap breakup is uniform. Setback dictates that the nose of the cap is never really subjected to any hoop stress as the shot column is upset, so the largest cap fragments tend to be from the nose. Since the cap is slotted, those fragments are never large enough to disturb the patterning (at least not with the #6 shot I'm using).
<br /> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh956R8TESFbIrscZyhBO5VmUBvYdEmXno5e_talkEmBuVc66is8HF2IDs1g0DUwEDFg3PzS_OSY8aofrrzcyYceKb-XgCHSbHxMGZJKHc3GJP4hb-CU2iL31scD_AV4R1p00OmhUCsGf_CE66Wta4ubZEDQ13nyKnYTzSmQMLcoSFjUA77rPeRsNfkxgs/s4160/IMG_20230906_214228967_HDR.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh956R8TESFbIrscZyhBO5VmUBvYdEmXno5e_talkEmBuVc66is8HF2IDs1g0DUwEDFg3PzS_OSY8aofrrzcyYceKb-XgCHSbHxMGZJKHc3GJP4hb-CU2iL31scD_AV4R1p00OmhUCsGf_CE66Wta4ubZEDQ13nyKnYTzSmQMLcoSFjUA77rPeRsNfkxgs/w640-h480/IMG_20230906_214228967_HDR.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Cap fragments captured in a deep box of loose paper<br /></td></tr></tbody></table><p>
<br />
While the loaded cartridges are durable enough to handle or put in a pocket, they aren't a 410 hull. If you drop them on concrete, they'll likely break and spill. It's easy enough to pick the rest of the cap out of the case mouth, expand the neck, and install a new shotcap without wasting the other components. I don't know if that's even practical with commercial caps, since they use a snap-in plastic base wad.
<br />
<br />
<b><u>Preferred:
</u></b><br />
Remington LP primers
<br />
10.5gr AL-7
<br />
3 card wad (0.175")
<br />
one 215L cap full of shot (approx 220-230gr)
<br />
a bit over 1100 fps
<br />
<br />
<b><u>Full power:
</u></b><br />
Remington LP primers
<br />
12gr AL-7
<br />
2 card wad (0.117")
<br />
one 215L cap full of shot (approx 220-230gr)
<br />
a bit over 1200 fps </p><p>Size and prime, expand the mouth if desired, charge the cases, and ram the wads. Fill a shot cap like a cup and gently press the loaded case on top. Crimping just requires the removal of the bullet seater (if you use a seat+crimp die). Contrary to what I've read about the blue caps, I don't ever have issues with breakage during crimping, only during seating. Work over a pan, because you'll probably break a few caps along the way. Shot spilled in a pan is a lot less of a mess than shot spilled in the press.<br />
<br />
If you want to play around with different powders, you might need to adjust the cannelure position or cap length as necessary for your stack height. For perspective, 10.5gr AL-7 is approximately the same compressed volume as 9.0gr of Unique or 8.3gr of 700x. All of these loads will work with the same wad stack and shot cap, so if you want to play around with unsuitable pistol powders, that's one place to start. For what it's worth, both of those charges do work. The Unique load runs about 1100+ fps, but burns poorly. I forget the velocity for the 700x load, but it's hard on wads and the shot column, so expect pattern degradation. On the bright side, at least there's plenty of margin on max pressure when working in 44 magnum.</p><p>The SCAD files are up on <a href="https://www.thingiverse.com/thing:6486381">Thingiverse</a>.</p><p><br />
</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvApSGkGK4MPYLh8LEa8EeAOZM2y2hD2u2ZMhe8_IcLWFja5TbVWxkGpj1GVhR2ugo8T9sK2FI1_EyQ3j3jc_EdoNfq1BaXpW2UBFhaYfc-vNXc_Ge-lDz8PpPHDfxRgzb1cdCRFEF2hAQ_oJeDrT_WYx8BJejtncF9C-_7k2wdsWsFzW0z3SXxOGa5yo/s1022/cappreviews.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1022" data-original-width="806" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvApSGkGK4MPYLh8LEa8EeAOZM2y2hD2u2ZMhe8_IcLWFja5TbVWxkGpj1GVhR2ugo8T9sK2FI1_EyQ3j3jc_EdoNfq1BaXpW2UBFhaYfc-vNXc_Ge-lDz8PpPHDfxRgzb1cdCRFEF2hAQ_oJeDrT_WYx8BJejtncF9C-_7k2wdsWsFzW0z3SXxOGa5yo/w504-h640/cappreviews.png" width="504" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">All of these shot caps will fit on top of the same powder+wad stack.<br /></td></tr></tbody></table><br /><p><br />
</p><p></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-11837454051704569832020-03-20T08:34:00.002-07:002020-03-27T10:58:08.990-07:00Improving a Laptop Keyboard with Custom Keycap VeneersI admit that I'm picky about the keyboards I use. I'm accustomed to the general ergonomics of classic keyboards and have become spoiled by a Model M for the last 20 years. While I can hardly expect to get a comparable experience from a laptop keyboard, I do feel that some desirable aspects of design are painstakingly avoided for the sake of petty fashion. The keyboard on my laptop has been one of the most frustrating I have ever attempted to use. At some point, I decided that there must be something I could do to turn it into a more comfortable and efficient keyboard.<br />
<br />
Since full-size keyboards are where I find the most comfort, perhaps it's worth describing what aspects of their design I feel are important to address in my efforts. While that discussion is likely going to suggest a mechanical keyboard as a central ideal, I don't think that any particular mechanism is as important as what properties it can impart to the product. Bear in mind that much of this is merely my preference.<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><br /></td></tr>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4v1OF3YjMzBM00XEiMlPSLHWO0wT_XM38bWFvGeM48nCVu2wql17KlxTc294Q8Aoui8_Rl0cHSjARkYrTRjITTd4AB4ATxadxq7HIrk6wPuO80aHXaru1eD57rY9GKO-W4PT51SYiwQ/s1600/IMG_20200320_090933_760.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge4v1OF3YjMzBM00XEiMlPSLHWO0wT_XM38bWFvGeM48nCVu2wql17KlxTc294Q8Aoui8_Rl0cHSjARkYrTRjITTd4AB4ATxadxq7HIrk6wPuO80aHXaru1eD57rY9GKO-W4PT51SYiwQ/s320/IMG_20200320_090933_760.jpg" width="320" /></a></div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxE7BiI555Xz6f6Blr9DvGSs95QY4cDMLDad86ilYXWF6qIGCe15fB9kKP7NQ68FpEVnWBnBmt94zy8p3uOZ45Hs-strnpRIDaEmQ_AYYT6t6jF1svxLTZyKa4P-upI96rr6SktzqPrxs/s1600/IMG_20200320_090958_245.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxE7BiI555Xz6f6Blr9DvGSs95QY4cDMLDad86ilYXWF6qIGCe15fB9kKP7NQ68FpEVnWBnBmt94zy8p3uOZ45Hs-strnpRIDaEmQ_AYYT6t6jF1svxLTZyKa4P-upI96rr6SktzqPrxs/s320/IMG_20200320_090958_245.jpg" width="320" /></a></div>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">An old XT keyboard, showing cylindrical crowns and overall contour.
</td></tr>
</tbody></table>
The most commonly noted aspects in which laptop and typical desktop keyboards differ have to do with the key stroke. The mechanical characteristics of the key stroke are primarily a comfort concern, though they may also provide forms of feedback which promote speed -- or at least confidence in motion at speed. Hysteretic mechanisms can provide tactile feedback, higher actuation force makes the motions assertive, and long stroke length allows for natural follow-through. While users of discrete mechanical keyboards may have a broad range of stroke characteristics to explore, it's reasonable to expect that any practical laptop keyboard is going to necessarily have a restricted range of possible characteristics. <br />
<br />
While an unfamiliar laptop key layout may certainly conflict with motor memory, even a familiar layout becomes difficult to use without some form of orienting information. It is the physical geometry of the keyboard which provides spatial cues to reinforce and maintain the accuracy of learned motions when moving from key to key. Consider a similar sensorimotor task; it's easy to walk through a familiar room in darkness if you can occasionally touch known surfaces along the way. Doing the same without any references is an exercise in error accumulation. In terms of a continuous process, these forms of feedback facilitate the error determination necessary for error <i>correction</i> to be possible; they allow the control loop to be closed. <br />
<br />
The most obvious and universal orienting features are identifier bumps. They are usually only located on the F and J keys, as well as the numpad 5 key (on keyboards with a numpad). Bumps are one of the few physical features of keycaps that people can easily customize. While self-adhesive bumps can be bought for this purpose, other methods such as glue are common. Custom bumps are especially useful in emphasizing keys associated with certain keyboard commands.<br />
<br />
While the typical keyboard bumps are a mechanism to orient hand position within a general area of the keyboard, it is the feedback provided by the shape of the keycaps and the overall contour of the keyboard itself which reinforces the discreteness of all keys. The center of each key can be emphasized by making the crown of the keycap slightly concave, or by making the crown smaller than the pitch distance between key centers. Providing strong centering cues helps maintain spatial awareness and helps to reduce the tendency for edge strikes and two-key strikes. Many keyboards have the rows laid out in either a curved or linear stairstep fashion, a feature which both adds to the distinctness of the rows and aids in comfortably reaching the upper rows.<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/AVvXsEirnPl3f42P-TdS5_I78AjWsKF6xnlITAsYJlnao5ARptA_vbFY5-MpGpl664i7z7NwK5ZG6N-C85NtCT6JiFoqGjOIfNhyphenhyphenkpwf-TY3lncH9gXIEmHf96LT2g6xEQlUb9CZMMCe5BSGQyw/s1600/IMG_20200316_024227_111.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirnPl3f42P-TdS5_I78AjWsKF6xnlITAsYJlnao5ARptA_vbFY5-MpGpl664i7z7NwK5ZG6N-C85NtCT6JiFoqGjOIfNhyphenhyphenkpwf-TY3lncH9gXIEmHf96LT2g6xEQlUb9CZMMCe5BSGQyw/s640/IMG_20200316_024227_111.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">You could at least pretend that ergonomics matter.</td></tr>
</tbody></table>
The keyboard on this old laptop (Acer 7736z) had none of that going for it. Being a laptop, the keyboard is flat (planar); that much is a necessity, though it isn't exactly helping. The level of the keyboard is actually slightly lower than the body of the laptop, which makes the hand positions uncomfortably low, turning the overly-sensitve trackpad into an even worse nuisance. The keystroke is light, short, and ambiguous. Every keystroke is like the experience of stomping at the top of a long flight of stairs when you thought there was still one more step to go. The keycaps are perfectly flat, with no crown and no functional centering cues. The key identifiers (bumps) are tiny and barely noticeable with dry hands. Just trying to find home row after using the mouse is a tedious routine of sliding fingers around in a broad expanse of flat slippery plastic, all the while trying to maintain the lightest of touch to avoid errant keystrokes. Once my hands move away from a known position, the lack of any discernable spatial references is immediately disorienting. Combine that with the lack of feedback, and the whole experience becomes both tedious and precarious, like trying to touch-type with chopsticks. Keyboard commands and programming both involve broader reaching motions than writing in simple prose, and are the most tiring of all. The only way a keyboard could be ergonomically worse is if it were entirely featureless and truly devoid of feedback, like a touchscreen OSK or projection keyboard. <br />
<br />
In all the time I've spent using this laptop, nearly every minute has been steeped in the thought that there must be a way to improve its keyboard. As per the mentioned limits of practicality, there is little I can do to alter the keystroke or overall contour. While I can't alter the layout, perhaps I can add some extra identifiers. Adding various forms of spatial cues to the keycaps should be possible, though there are some limitations. Of course, there's the limitation of the distance between the keyboard and screen when the laptop is closed. It might also be desirable to make sure any alterations are removable; after all, this is likely to require some experimentation. <br />
<br />
<h3>
The First Attempt at a Solution</h3>
My first thought was to use adhesive to add identifier bumps to certain keys. After some thought, I came to the prior conclusions regarding more general spatial awareness reinforcement, ultimately deciding that a centering mark of some sort should be added to the most-used keys. My thought was to simulate the effect of a concave keycap crown by adding a circular ridge on each key. I could add ancillary bumps or ridges either for location, identification, or for avoidance. <br />
<br />
While a finalized design could be implemented using epoxy, I opted to prototype my ideas using a conformal coating made from clear Dap Sidewinder thinned with xylene. This can be thinned to an appropriate consistency and provides a smooth, self-leveling finish. It can also be completely removed once dry by simply redissolving in xylene; though in this case, sound material could be picked/peeled off cleanly without solvent. It may also be possible to use something like E6000 if thinned appropriately. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKSHU4da5qb7dH8QBdzb6U2BPZqlOadbF1oYkj484GY8Q9I89pjpctOa6FWSnJMOQ2lznoZAx-ZhQje4bm2mpbd4tqLoXo3gv4b7a7Lf0jocZHjXxt9kcQI6R8cDgoY3LwWTq4ezRRQyM/s1600/IMG_20200320_090508_580.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKSHU4da5qb7dH8QBdzb6U2BPZqlOadbF1oYkj484GY8Q9I89pjpctOa6FWSnJMOQ2lznoZAx-ZhQje4bm2mpbd4tqLoXo3gv4b7a7Lf0jocZHjXxt9kcQI6R8cDgoY3LwWTq4ezRRQyM/s640/IMG_20200320_090508_580.jpg" width="640" /></a></div>
I applied the coating with a 1mL syringe and a 25ga dispensing needle bent to a comfortable angle. There are a couple of important things that need to be considered in that effort. Dispensing a viscous material through a fine needle requires a lot of pressure. The pressure requirements can be lowered by reducing the viscosity or by using a shorter needle or one of larger diameter. I chose a 1mL syringe because it allowed me to generate relatively high pressures, but care must be taken to avoid making a mess on the keyboard. With firm hand strength, a 1mL syringe can produce upwards of 200 PSI -- more than enough to eject the needle and blurt a wad of glue across your work. If you can use a syringe with a luer-lok type spigot, do so. If all you can get are syringes with plain tapered spigots, pay attention to keep the taper clean and tight. Practice first.<br />
<br />
One also should consider the materials used. Many adhesives and coatings will degrade when in constant contact with skin oils. While I chose this coating for prototyping, it is wholly unsuited for long-term use. After a week or so, it will begin to become sticky and will eventually get smeared everywhere. Other products like E6000 will likely do the same on a longer timeframe, and I would expect the same of almost every common adhesive other than epoxy.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt-Zz9EYe19XAuSlzsagIkBbjfwm5oqvy1ijt8j5SXRhMeua9T2xuNQLkp1VlljweF-VfZCNAGLNVpWii_lLqUUuXUU1MXiGJ_eYyx3DOxU5iEnDKFr2vKTtE03hXF4IRW_7r1bGU5-MI/s1600/IMG_20191222_205021_452.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt-Zz9EYe19XAuSlzsagIkBbjfwm5oqvy1ijt8j5SXRhMeua9T2xuNQLkp1VlljweF-VfZCNAGLNVpWii_lLqUUuXUU1MXiGJ_eYyx3DOxU5iEnDKFr2vKTtE03hXF4IRW_7r1bGU5-MI/s640/IMG_20191222_205021_452.jpg" width="640" /></a></div>
While I found it helpful to have more noticeable identifier bumps, the circular ridges left me relatively disappointed. The rings were certainly better than nothing, but they were still a poor simulant of a key crown. The fact that the keycap is the same height inside and outside the ring makes them fairly ineffective at suggesting a boundary. With this effect in mind and considering the low height of the glue ridge, the ring diameter needed to be fairly small to present an unambiguous shape to the fingertip. The smaller the rings are, the more awkward they feel, and the more often they're escaped. <br />
<br />
Placing my hands in the rings on home row felt awkward -- as if they're too straight. Certainly, the wear marks on my main keyboard suggest that my fingertips naturally rest in an arc across the keys. It followed that the landing points were generally centered laterally, but otherwise varied depending on what was most comfortable for a given finger. I switched the circular glue rings out for elongated rectangular glue rings and noted a marginal improvement. I felt that it was ultimately impractical to achieve much more with such a low-profile method. <br />
<br />
<h3>
The Development of Keycap Veneers</h3>
Finding myself idle on my laptop away from home, I dared to spend some time on what I'd presumed would surely be a huge waste of time. I figured I'd whip up a parametric model for 3D-printed keycaps. The idea was to print some caps (if they would print flat and thin), clean them up (easier said than done), and glue them like veneers on top of the existing keys. The modelling was done in OpenSCAD, a simple and enjoyable script-based parametric 3D CAD tool. I conjured up several different variations on crown geometry, printing and testing along the way. <br />
<br />
<pre class="brush:openscad;">// //////////////////////////////////////////////////////
// keycap veneers for shitty flat laptop keyboards
// cylinder cuts only strongly enforce x-positioning
// this allows fingertips to rest in a more natural arc across home row
// and may be more comfortable on keys which require more reaching or are otherwise habitually struck off-center
// they're also easier to make smooth (easier to print without fuzz, also easier to scrape/sand by hand)
// spherical cuts reinforce y-pos more than cylinder cuts do (important on flat kb)
// elliptical cuts are a compromise especially suited to flat profile kb
// proportions aren't fixed. some things require manual adjusting
// //////////////////////////////////////////////////////
// RENDERING & MULTIPART LAYOUT
nf=100; // facet number (~50 for speed; ~200 for printing)
Nx=4; // number of caps to tile along X-axis
Ny=2; // number of caps to tile along Y-axis
tilegap=2; // gap between tiles
// //////////////////////////////////////////////////////
// BASIC KEYCAP GEOMETRY
h=17; // keycap height (in key plane)
w=17; // keycap width (in key plane)
th=1.7; // maximum cap thickness (limited by kb-screen gap)
th_min=0.3; // minimum cap thickness (limited by print strength)
draftx=45; // draft angle (vertical taper on R,L faces)
drafty=45; // draft angle (vertical taper on T,B faces)
cr=3; // corner radius
// //////////////////////////////////////////////////////
// PRIMARY RELIEF CUTS
// sphere & cylinder mimic legacy alpha key designs
// lcylinder is the transverse version of 'cylinder', for wide keys
// wcylinder is a double-cylindrical hull, for wide keys
// sausage is a double-spherical hull, for wide/tall keys
// ysausage is the same as 'sausage', but each sphere location can be independently offset
// bumps is a series of spherical bumps (used as an avoidance indicator)
// using 'none' will produce a flat keycap
style="sphere";
// these parameters may need tweaked when geometry is changed significantly
drc=20; // relief cut radius for cylinder styles
drs=20; // relief cut radius for sphere & sausage styles
// the following options only apply to spherical cuts
osx=0; // offset x
osy=0; // offset y
osz=0; // offset z
scaley=1.3; // stretch factor (elliptical cut)
// the following options only apply to ysausage cuts
os1=-.5; // y-offset for top sphere
os2=-3; // y-offset for bottom sphere
// the following options only apply to 'bumps'
brad=1; // bump radius
bdepth=0.7; // bump depth
blayout=[3,4]; // number of bumps [x,y]
// //////////////////////////////////////////////////////
// ADDITIONAL FEATURES
// bevel produces a single beveled edge (e.g. for bottom-row keys)
// multiple bevels can be specified (e.g. ["top","bottom"])
bevel="none"; // bottom top left right or none
bevangle=10; // angle of beveled face
bevhos=0.6; // height offset of bottom edge of bevel
// cuts can be made asymmetric so that a single cut spans multiple keys
// this allows certain keys to be grouped by touch (e.g. groups of four F-keys)
lowside="none"; // right left both or none
// identifier position may be in the center or bottom edge
identifier="none"; // center edge or none
idw=0.5; // identifier width
idl=5; // identifier length
idh=0.95; // identifier height WRT cap height (used for 'edge')
idhc=0.5; // height used for "center"
// //////////////////////////////////////////////////////
// //////////////////////////////////////////////////////
// THE MAGIC
module cap(){
color("dimgray")
render(){
linear_extrude(height=th,scale=[1-2*th*tan(drafty)/w,1-2*th*tan(drafty)/h]){
hull(){
translate([(w/2-cr),(h/2-cr),0])
circle(r=cr,center=true,$fn=nf/5);
translate([-(w/2-cr),-(h/2-cr),0])
circle(r=cr,center=true,$fn=nf/5);
translate([(w/2-cr),-(h/2-cr),0])
circle(r=cr,center=true,$fn=nf/5);
translate([-(w/2-cr),(h/2-cr),0])
circle(r=cr,center=true,$fn=nf/5);
}
}
}
}
module relief_bumps(){
render(){
difference(){
translate([-0.6*w,-0.6*h,th-bdepth])
cube(1.2*[w,h,brad]);
union(){
for (m=[1:blayout[1]]){
for (n=[1:blayout[0]]){
translate([-(w-w/blayout[0])/2+w/blayout[0]*(n-1),-(h-h/blayout[1])/2+h/blayout[1]*(m-1),th-brad])
sphere(r=brad,center=true,$fn=nf/5);
}
}
}
}
}
}
module relief_spherical(){
render(){
translate([osx,osy,drs+th_min+osz]){
sphere(r=drs,center=true,$fn=nf);
if (lowside=="right" || lowside=="both")
translate([h/2+osx,osy,0])
rotate([90,0,90])
cylinder(r=drs,h=h,center=true,$fn=nf);
if (lowside=="left" || lowside=="both")
translate([-h/2+osx,osy,0])
rotate([90,0,90])
cylinder(r=drs,h=h,center=true,$fn=nf);
}
}
}
module relief_cylindrical(){
render(){
translate([0,0,drc+th_min]){
rotate([90,0,0])
cylinder(r=drc,h=h+1,center=true,$fn=nf);
if (lowside=="right" || lowside=="both")
translate([h/2,0,0])
rotate([90,0,90])
cube([drc*2,drc*2,h],center=true);
if (lowside=="left" || lowside=="both")
translate([-h/2,0,0])
rotate([90,0,90])
cube([drc*2,drc*2,h],center=true);
}
}
}
module relief_cylindrical_long(){
render(){
translate([0,0,drc+th_min]){
rotate([90,0,90])
cylinder(r=drc,h=w+1,center=true,$fn=nf);
}
}
}
module relief_cylindrical_wide(){
render(){
translate([0,0,drc+th_min]){
rotate([90,0,0])
hull(){
translate([(w-h)/2,0,0])
cylinder(r=drc,h=h+1,center=true,$fn=nf);
translate([-(w-h)/2,0,0])
cylinder(r=drc,h=h+1,center=true,$fn=nf);
}
if (lowside=="right" || lowside=="both")
translate([h/2,0,0])
rotate([90,0,90])
cube([drc*2,drc*2,h],center=true);
if (lowside=="left" || lowside=="both")
translate([-h/2,0,0])
rotate([90,0,90])
cube([drc*2,drc*2,h],center=true);
}
}
}
module relief_sausage(){
render(){
translate([0,0,drs+th_min]){
hull(){
translate([(w-h)/2,0,0])
sphere(r=drs,center=true,$fn=nf);
translate([-(w-h)/2,0,0])
sphere(r=drs,center=true,$fn=nf);
}
if (lowside=="right" || lowside=="both")
translate([h/2,0,0])
rotate([90,0,90])
cylinder(r=drs,h=h,center=true,$fn=nf);
if (lowside=="left" || lowside=="both")
translate([-h/2,0,0])
rotate([90,0,90])
cylinder(r=drs,h=h,center=true,$fn=nf);
}
}
}
module relief_ysausage(){
render(){
translate([0,0,drs+th_min]){
hull(){
translate([0,os1,0])
sphere(r=drs,center=true,$fn=nf);
translate([0,os2,0])
sphere(r=drs,center=true,$fn=nf);
}
if (lowside=="right" || lowside=="both")
translate([0,w/2,0])
rotate([90,0,0])
cylinder(r=drs,h=h,center=true,$fn=nf);
if (lowside=="left" || lowside=="both")
translate([0,-w/2,0])
rotate([90,0,0])
cylinder(r=drs,h=h,center=true,$fn=nf);
}
}
}
module relief_bevel(){
union(){
for (i=bevel){
if (i=="top")
translate([0,h/2,th_min+bevhos])
rotate([bevangle,0,180])
translate([0,h/4,w/2])
rotate([90,0,0])
cube([w,w,h/2],center=true);
if (i=="bottom")
translate([0,-h/2,th_min+bevhos])
rotate([bevangle,0,0])
translate([0,h/4,w/2])
rotate([90,0,0])
cube([w,w,h/2],center=true);
if (i=="right")
translate([w/2,0,th_min+bevhos])
rotate([bevangle,0,90])
translate([0,w/4,h/2])
rotate([90,0,0])
cube([h,h,w/2],center=true);
if (i=="left")
translate([-w/2,0,th_min+bevhos])
rotate([bevangle,0,-90])
translate([0,w/4,h/2])
rotate([90,0,0])
cube([h,h,w/2],center=true);
}
}
}
module drawcap(){
difference(){
cap();
if (style=="sphere")
if (scaley!=1)
scale([1,scaley,1])
relief_spherical();
else
relief_spherical();
if (style=="cylinder")
relief_cylindrical();
if (style=="lcylinder")
relief_cylindrical_long();
if (style=="wcylinder")
relief_cylindrical_wide();
if (style=="sausage")
relief_sausage();
if (style=="ysausage")
relief_ysausage();
if (style=="bumps")
relief_bumps();
if (bevel!="none")
relief_bevel();
}
if (identifier=="edge")
translate([-idl/2,-idw/2-h*0.34,th_min])
cube([idl,idw,th*idh-th_min+0.001]);
else if (identifier=="center")
translate([-idl/2,-idw/2,th_min])
cube([idl,idw,th*idhc-th_min+0.001]);
}
module tilecaps(){
color("dimgray"){
for (m=[1:Ny]){
translate([0,(m-1)*(h+tilegap),0]){
for (n=[1:Nx]){
translate([(n-1)*(w+tilegap),0,0]){
drawcap();
}
}
}
}
}
}
tilecaps();
</pre>
<br />
Much of the core focus of these experiments stems from the lessons of the glue ring experiment; that is, finding the balance between the axial components of the crown geometry. The equivalent analog for the circular glue ring is of course a spherically concave crown. By contrast, many keyboards such as the Model M have cylindrically concave crowns. While the spherical crowns provide constraint cues both laterally (side to side) and transversely (across the rows), cylindrical crowns only provide strong constraint laterally. Much like using elongated glue rings, this allows for more variation of finger placement in the transverse direction without affecting comfort. While the cylindrical shapes are certainly easier to deburr and finish than spherical ones, the overall flatness of the keyboard and the tendency to use the laptop in awkward positions without a desk left me wanting more transverse constraint than they could provide. After all, while the Model M uses cylindrical crowns, it also has a significant and unambiguous height difference between rows. The solution was simply a deep ellipsoidal crown contour. Using atypically deep crowns helps compensate for the flatness inherent to a laptop keyboard, and generally provides more constraint overall. A few quick tweaks were required to find what I felt was a good balance. Compared to either spherical or cylindrical reliefs of a similar depth, the final ellipsoidal crown allowed a dramatic improvement in speed, accuracy, and comfort within the alpha keys. <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/AVvXsEgFMBPNGrIEcJ-TE304JrpJAUijo9kTnr2nPp6JdpDMDB8OrQjABS41LxB_OBlL2ttI5ujb8vG-Hs-YcXN9BrsBj2ABBsBe0P6TrvrTOOgTO_dLiRSBZ6YhZcc_u4rY_6xINQ6wqyXGiNE/s1600/standard+keys.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFMBPNGrIEcJ-TE304JrpJAUijo9kTnr2nPp6JdpDMDB8OrQjABS41LxB_OBlL2ttI5ujb8vG-Hs-YcXN9BrsBj2ABBsBe0P6TrvrTOOgTO_dLiRSBZ6YhZcc_u4rY_6xINQ6wqyXGiNE/s640/standard+keys.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Caps with spherical, cylindrical, and ellipsoidal crowns (and an identifier bump)</td></tr>
</tbody></table>
Wary of losing track of home row (something that was easy to do on the original keyboard), I decided to use different caps for the numeric row. In order to provide a sense of overall contour, I opted to reduce the degree to which these cap crowns were contoured themselves. In other words, any concave relief should be shallower, allowing the cap to be effectively thicker in the strike location. Again, I used wear marks on a well-worn keyboard to locate the crown features.<br />
<br />
The F-keys are grouped into blocks of four, with each group sharing an elongated concave relief. This addresses the fact that the keys are not spaced or located as they are on a standard keyboard. Only ESC and DEL have their own spherical relief. <br />
<br />
Keys which I rarely use, or keys which are otherwise hit accidentally need some sort of avoidance identifier. I opted for a lower-profile cap with a grid of bumps. While it makes for frustrating print cleanup, it's an effective solution. <br />
<br />
Other keys were given either shallow concave reliefs or simple bevels. In this way, they are brought up to a comparable height with the other modified keys, even if they otherwise do not require any particular improvement.<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/AVvXsEj3vMFg8-HOlQXspTGmziDwcKiDoO8cxfKiwkGefQ9ufMwYXT9IMaV2xVzWJlpJIpqk63a4yWXlWOdpoXc78oXXDpqdZt8MwNkhKGdrYZtjHMII4vBVcCdMZnuv-d5uVzPWHs8dlFewdfE/s1600/misc+keys.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="986" data-original-width="1600" height="394" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3vMFg8-HOlQXspTGmziDwcKiDoO8cxfKiwkGefQ9ufMwYXT9IMaV2xVzWJlpJIpqk63a4yWXlWOdpoXc78oXXDpqdZt8MwNkhKGdrYZtjHMII4vBVcCdMZnuv-d5uVzPWHs8dlFewdfE/s640/misc+keys.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Other cap types for function-row and numeric-row keys</td></tr>
</tbody></table>
The caps were printed in PLA, though this makes them difficult to clean up and finish. The surfaces require quite a bit of burr removal or "defuzzing". Most of this can be done by scraping, though the shapes of the parts often makes it awkward and the process is generally tedious. Sanding is likewise very tedious, especially corners and edges. Cylindrical-relief keys can be printed in rows and sanded in a comfortable motion, though spherical or ellipsoidal reliefs don't allow this. Sanding tends to leave more fine fuzz.<br />
<br />
Improving the finish beyond that is difficult. As the parts are very thin, heat polishing (flame or hot air) doesn't really work. The features are either destroyed, or the part curls and requires restraint -- leading to more marring. Solvent polishing PLA is not really a thing. No, acetone, MEK, and ethyl acetate don't work. They might slightly soften and deglaze the part, but they will not dissolve the surface enough to allow it to reflow. I do not know of any other solvents that would, but if there were one, I have a feeling that the parts would be so thin that they would tend to curl anyway.<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/AVvXsEjfUvIZapXlyi0-CK947bDxwzpHAhN29A-QG-lf9sbENX1pIBiQkwLaTTIWqsXX1C9Aw108_793BZF3ZCBziSdm3Vy9KPNN-sjcDIrDlbXgWuj1zHVZBGlrAg9nyMw2DSFZGlj2R2KBZv0/s1600/IMG_20191225_115705_952.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfUvIZapXlyi0-CK947bDxwzpHAhN29A-QG-lf9sbENX1pIBiQkwLaTTIWqsXX1C9Aw108_793BZF3ZCBziSdm3Vy9KPNN-sjcDIrDlbXgWuj1zHVZBGlrAg9nyMw2DSFZGlj2R2KBZv0/s640/IMG_20191225_115705_952.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sanded, fuzzy caps temporarily affixed during fitting</td></tr>
</tbody></table>
Using a rotary tool to buff or burnish the surface is fairly counterproductive. The tool needs to run much slower than they can, otherwise the heat generated by friction melts and smears the material due to its very low melting point. Wool buffs, brushes, cratex points, and scotch brite bobs all ended up just making a mess. In practice, the first thing they do is erase edges and corners. <br />
<br />
I ended up opting to just coat the caps, though I know that coatings on a keyboard are likely going to eventually fail. I figured that my best bet was either polyurethane or a good clear acrylic. I didn't feel like applying the poly with a brush or sprayer, so I just used an aerosol acrylic spray. No, I did not just spray the keys in-situ. I used double-sided tape to hold them down to a waste board when spraying. <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><br /></td></tr>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjzFBvWWST_KrShZaVX_8LSF_H_O2GY0nOt4JG_j2tXOclY78ZdeZICV7OR7_8flyKLb9eHBQQ4DWtoqbmKdj7vt93VGe_JbNA-Sv2kP_HezgipbeqtWEHBW5mu4BON2mRDBq4KsQw_8A/s1600/IMG_20200316_203145_666.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjzFBvWWST_KrShZaVX_8LSF_H_O2GY0nOt4JG_j2tXOclY78ZdeZICV7OR7_8flyKLb9eHBQQ4DWtoqbmKdj7vt93VGe_JbNA-Sv2kP_HezgipbeqtWEHBW5mu4BON2mRDBq4KsQw_8A/s320/IMG_20200316_203145_666.jpg" width="180" /></a></div>
</td><td style="text-align: center;"><table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL9BNbyt-CosURyjdFBdvyYcl8jw3WZZy26jSb_K5XA4-GkgkT9VIxwB6__q5U9gsyz2nOhMX-dtYZQrjCPx5Mz3i654s8mvt_1Dn3DkzIz3Ct3aPQdv-tH9ZVu8VlTyBgKMEKu8XwS-o/s1600/IMG_20200320_091638_770.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL9BNbyt-CosURyjdFBdvyYcl8jw3WZZy26jSb_K5XA4-GkgkT9VIxwB6__q5U9gsyz2nOhMX-dtYZQrjCPx5Mz3i654s8mvt_1Dn3DkzIz3Ct3aPQdv-tH9ZVu8VlTyBgKMEKu8XwS-o/s320/IMG_20200320_091638_770.jpg" width="320" /></a></div>
</td></tr>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSq_WWsuY5BEwH9lX4N1T_IF3MzQuZo-dIoN6hOMFBx5Qbi5enYhHGuI39IWyaXMFOws6tnnE0gmU-l-ZDtfSumps1z559Ac3UJUSDPTDMI98P89bY_kKzbWOJctTYWcAXwAD6bwv_he0/s1600/IMG_20200316_203116_025.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSq_WWsuY5BEwH9lX4N1T_IF3MzQuZo-dIoN6hOMFBx5Qbi5enYhHGuI39IWyaXMFOws6tnnE0gmU-l-ZDtfSumps1z559Ac3UJUSDPTDMI98P89bY_kKzbWOJctTYWcAXwAD6bwv_he0/s320/IMG_20200316_203116_025.jpg" width="320" /></a></div>
</td></tr>
</tbody></table>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">The keycaps after a sloppy spray job. It feels better than it looks.
</td></tr>
</tbody></table>
The caps were originally prototyped using simple craft rubber cement for adhesion. This allowed them to easily be removed with a knife, and the residual glue simply rolled off the surfaces cleanly. For final reassembly, I used a more proper polychloroprene contact cement (e.g. Weldwood, Barge). Removal may now be more difficult, but possible. Instead of brushing the cement on, I used a syringe to dispense a small amount on each key. There are plenty of other adhesives that could be used here. I figured that replacement keyboards are cheap enough that I don't really need to worry about removing the caps once I've settled on the design. <br />
<br />
<h3>
Final Thoughts</h3>
The keyboard as modified has proven to be about as good as a laptop keyboard can possibly be. The height is much more comfortable, the alpha keys are distinct from surrounding keys. The identifier bumps are distinct, and I added a couple extra where I wanted them. The finish isn't very pretty, but beauty isn't necessary here. <br />
<br />
If you read all that blather without losing interest or the will to live, I should congratulate you. Even I had a hard time enduring it. Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-5851332800128256308.post-25077640931718337372020-03-13T00:10:00.002-07:002020-03-14T16:26:35.046-07:00Addressing the Minimum COL Limit for the Marlin 1894 ActionAs is typical of the remainder of this blog, I am writing this following an experience with a problem about which I found frustratingly little clear information online. That is not to say that I found little information; rather, I found a great wealth of conflicting, inaccurate, or at least confusing information obfuscating simple, but perhaps nonobvious truths. <br />
<br />
Let's start where the experience starts -- a rifle owner buys some new boxes of 44 Special (240gr LSWC) ammunition to use in his ca. 1971 Marlin 1894 chambered for 44 magnum. While the first few rounds worked, the rims eventually start jamming between the lifter and the mouth of the magazine tube. This was unexpected; all the prior boxes of old 246gr LRN 44 Special ammunition worked fine, and still do. Why is the rifle jamming with the new ammunition? My eyes see an obvious suspect, but let's get a second opinion.<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/AVvXsEiOMl-WYwy8rpxK5ZKNVCs_Kygmmh_Jq5fwz7yfiHMnBzGzun-9dXaX2WW0n5jQGe4FvYsuzlMTME0a19xFAhOWUGMoqCOaMwOzcSAAzm4uMiDvKnYpcdmb2gCKpRmVPrkDPSS60XhnxHM/s1600/cart+samples.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOMl-WYwy8rpxK5ZKNVCs_Kygmmh_Jq5fwz7yfiHMnBzGzun-9dXaX2WW0n5jQGe4FvYsuzlMTME0a19xFAhOWUGMoqCOaMwOzcSAAzm4uMiDvKnYpcdmb2gCKpRmVPrkDPSS60XhnxHM/s400/cart+samples.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">HSM 44SPL (240gr LSWC), Winchester 44SPL (246gr LRN), Winchester 44MAG (240gr JSP)</td></tr>
</tbody></table>
<br />
If one immediately googles a relevant query, forums across the web will authoritatively dispense the answer with certainty. It's the "dreaded Marlin Jam", which is variously described as:<br />
<ul>
<li><a href="https://www.levergunscommunity.org/viewtopic.php?p=234791&sid=f5d9cd97a02365846f67753371744916#p234791">not a thing</a></li>
<li><a href="https://www.levergunscommunity.org/viewtopic.php?p=234804&sid=f5d9cd97a02365846f67753371744916#p234804">very much a thing</a></li>
<li>being caused by <a href="https://www.thehighroad.org/index.php?threads/will-a-357-magnum-marlin-1894-levergun-shoot-38-specials-reliably.219187/#post-2673049">nothing other than short-stroking or holding the <strike>phone</strike> rifle wrong</a></li>
<li>being caused by <a href="https://www.levergunscommunity.org/viewtopic.php?p=234795&sid=f5d9cd97a02365846f67753371744916#p234795">nothing other than extreme wear or abuse</a></li>
<li>being caused by certain ammunition/gun combinations</li>
<li>all Marlin's fault and they should have fixed this a hundred years ago</li>
</ul>
There are grains of truth spread nonuniformly throughout those discussions, but there are also a lot of misunderstandings and conflations going on as well. It's easy to see how that happens. The 1894 action is definitely susceptible to feeding problems, whether it is a consequence of the lack of controlled feed or the weaknesses of the simple mechanical logic going on inside. It's also frustratingly difficult to visualize what exactly <i>is</i> going on inside. There isn't a good way to see or measure the part clearances and timing as the action cycles, and the critical limits of those hidden details are fairly subtle. It's easy to presume the causes incorrectly.<br />
<br />
To narrow the subject, I am not talking about misfeeds caused by holding the rifle at an extreme angle or on its side, resulting in jams involving the bolt, breech, or ejector. Those are a consequence of gravity and the uncontrolled feed. I'm not talking about double-feeds caused by short-stroking or similar incomplete cycling motions. That's just a consequence of the fact that magazine interruption mechanism is reversible, while the feeding of the current round is not. What I am talking about is the minimum reliable cartridge length for the 1894 action and jams caused by short cartridges in otherwise unworn rifles. <br />
<br />
<h3>
The Existence and Specifics of the Minimum COL Limit</h3>
But wait, the lifter automatically acts as a magazine interrupter. Does the 1894 even have a minimum COL limitation? Well, if you ask around, you will amusingly find people who will tell you that the design of the mechanism cleverly ensures it does not. This is incorrect. There most definitely is a minimum COL limitation. If you would like a quick proof that a lower bound exists, load a full magazine with empty cases (easier said than done) and see if you can get the action to lift a round without jamming on the next.<br />
<br />
What that length is depends on the cartridge. While the lessons of this study should also apply to other chamberings, 44 Remington magnum provides an illustrative complication as its chamber can also accept 44 S&W special. The <a href="https://saami.org/technical-information/cartridge-chamber-drawings/">SAAMI COL spec</a> for 44 Magnum is 1.535-1.610 inches. On the other hand, the spec for 44 special is 1.415-1.615 inches. It's conceivable that a firearm designed around the magnum cartridge spec might not accomodate the wider spectrum of 44 special cartridge lengths. Certainly, the first page of the <a href="http://helmuthofmann.de/pdf/manuals/mfc_centerfire_1894.pdf">manual</a> for the Marlin 1894 states the acceptable range of cartridge OAL echoing the SAAMI spec for 44 magnum. The case with 357 magnum and 38 special is similar. These new boxes of ammunition are approximately 1.475" long -- well outside the limits recommended by the manual.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFYVnAjNwwdQR_oBBgA6OrRK8h9ulKUAtkapkDEAVC8Qwmyil_HC4kTNTG5PV6gipPrvNRbg_8zLboG9rR2D4l5WpMrm0S_6fDSHa323_Ay0bBRIWOfUpihBMrHZc7T_87nlJ5KKcuLQA/s1600/cart+specs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1044" data-original-width="1234" height="539" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFYVnAjNwwdQR_oBBgA6OrRK8h9ulKUAtkapkDEAVC8Qwmyil_HC4kTNTG5PV6gipPrvNRbg_8zLboG9rR2D4l5WpMrm0S_6fDSHa323_Ay0bBRIWOfUpihBMrHZc7T_87nlJ5KKcuLQA/s640/cart+specs.jpg" width="640" /></a></div>
<span id="goog_894296977"></span><span id="goog_894296978"></span><br />
While the spec on paper is merely an assertion, it is the design of the mechanism and the particulars of its geometry which ultimately determine the actual practical range of cartridge lengths. When the lever is closed, the current round is captured at an angle between the loading gate, the right-hand face of the lever arm, and the next round in the magazine. As the lever is opened, its arm clears the rim of the current round, allowing it to slip off the front edge of the loading gate. At this point, the cartridge is captured between the forward face of the lever arm and the subsequent cartridge. The cam surface on the lever begins to raise the lifter, shearing the stack of cartridges as they follow the motion of the lever rearward. In order to function correctly, the lifter must rise high enough to block the next cartridge before its rim clears the mouth of the magazine tube. If the cam-lifter timing is retarded by some defect, or if the cartridges are too short, the lifter will not be in a position to fully block the next round before its rim clears the magazine mouth and a jam will occur. It is this geometry of the lever arm and cam surfaces, as well as the lifter and magazine mouth which determine minimum cartridge length. <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/AVvXsEji5yuVXw-IGGu5cyViXGgtKjXFQ6vjR9tM-aGpfEqQUhUBnr0khp1NS3ecvTJo-QggvFGXkRPIzXrteL6N9p1Y090az3vzs2jw7K0n8phsSuEy4WTU0pu4kFseS0OTSrNTSMG5bWIEwkk/s1600/closed.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="855" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji5yuVXw-IGGu5cyViXGgtKjXFQ6vjR9tM-aGpfEqQUhUBnr0khp1NS3ecvTJo-QggvFGXkRPIzXrteL6N9p1Y090az3vzs2jw7K0n8phsSuEy4WTU0pu4kFseS0OTSrNTSMG5bWIEwkk/s640/closed.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Lever closed; cartridge offset and held on loading gate</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/AVvXsEgRnyo9LLpGgj1m9uBA-JlIbQF7LrTiXOgbcZlCmIvXmmfuvoASDKLp7pJxXLcsKxxZWak5yRICtga3Y86d17KuQPLcXIjGmMNHWP_z9eGGfQlZI4ZphqD0x1Hf9q4ndSGWhidLbLNTCrU/s1600/open+1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="855" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRnyo9LLpGgj1m9uBA-JlIbQF7LrTiXOgbcZlCmIvXmmfuvoASDKLp7pJxXLcsKxxZWak5yRICtga3Y86d17KuQPLcXIjGmMNHWP_z9eGGfQlZI4ZphqD0x1Hf9q4ndSGWhidLbLNTCrU/s640/open+1.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Lever open; cartridges following lever arm</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/AVvXsEhV6aQx-NSnS705O7HgIn10HM4ZPezKJj4-Nb_X466DtQrwLOl5WRrp9AAw28cGRszTIp_LfEtNkXwtWR5NV3WuPbDTjTZ4lbqm6jxF2y4u4XPyXzi8GiVmfDXOa3_yzRWfKoUMf5sVm4I/s1600/open+3.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="855" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV6aQx-NSnS705O7HgIn10HM4ZPezKJj4-Nb_X466DtQrwLOl5WRrp9AAw28cGRszTIp_LfEtNkXwtWR5NV3WuPbDTjTZ4lbqm6jxF2y4u4XPyXzi8GiVmfDXOa3_yzRWfKoUMf5sVm4I/s640/open+3.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Magazine interrupted; cartridge uncontrolled</td></tr>
</tbody></table>
<br />
You should now be experiencing a creeping doubt regarding the invariability of the effective minimum COL requirement. Not only is it an issue of timing between moving surfaces, the mechanical advantage of the cam/lifter system means that feed reliability is going to be significantly sensitive to small geometry changes caused by wear or receiver alignment. There's enough tolerance in the screw holes that reassembling the rifle in a slightly different manner may significantly change its reliability with marginal-length ammunition. If the receiver halves are tightly-fitted, the front screw may not pull them together completely with reasonable torque; a few taps with a hammer may be necessary to seat them completely. It's easy to think it's assembled correctly, and still have a 0.005" change in alignment make the reliability go from 95% down to 10%. The same can happen if there are burrs or any debris between the receiver halves near the front screw. The "Marlin jam" fixes addressing seemingly miniscule lifter peening should now start to make sense.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><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/AVvXsEiVJnbNzRpm-9vhYMSbcmbHovoEO70usvbjBejnYCtK9gJoWfjX26sn3OaTv8Zj_gF4stD0eyRLYk3UEks5G5uHMwmUzMmHKUIrMBKD6MW-xEkpw2zEerOvjGQAeNP5X7PE5PD_fNBlgvY/s1600/full+jam.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="855" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVJnbNzRpm-9vhYMSbcmbHovoEO70usvbjBejnYCtK9gJoWfjX26sn3OaTv8Zj_gF4stD0eyRLYk3UEks5G5uHMwmUzMmHKUIrMBKD6MW-xEkpw2zEerOvjGQAeNP5X7PE5PD_fNBlgvY/s320/full+jam.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Very short COL resulting in jam on cartridge body</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
</td><td style="text-align: center;"><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/AVvXsEhqmionAR_uLU4QCZMEAWojQv_G8ivR9wC2rpfAL_wOEYoLuibPFEatEGtPRnqS4yHtB6Sb2EBI6U3CiJiuGg2bSYkn2oUaU7qDZyGZDfLcWQrSwbee1ns4Qp_3jqRKd7uZo8YaxZDjM8U/s1600/rim+jam.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="500" data-original-width="855" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqmionAR_uLU4QCZMEAWojQv_G8ivR9wC2rpfAL_wOEYoLuibPFEatEGtPRnqS4yHtB6Sb2EBI6U3CiJiuGg2bSYkn2oUaU7qDZyGZDfLcWQrSwbee1ns4Qp_3jqRKd7uZo8YaxZDjM8U/s320/rim+jam.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Marginal COL resulting in jam on rim</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
</td></tr>
</tbody></table>
<br />
The form of the jam may vary depending on the scenario, leading people to mistakenly assume that the causes are necessarily different, perhaps misattributing them to other causes which produce identical end-conditions. In the case of a very short cartridge, the next round is entirely trapped between the magazine mouth and the top face of the lifter. In the case of a marginally-short cartridge, the rim of the next round may protrude only far enough to hook edge of the magazine mouth, becoming wedged against the front face of the lifter nose. Bear in mind that the front edge of the lifter is not always close to
the magazine mouth; neither is it moving in a straight line. It moves
in an arc, and presents a considerable gap when it is only beginning to
interrupt the magazine. The exact contouring of the front edge of the lifter nose, caused by wear or intent otherwise, may further contribute to inconsistent behavior in marginal conditions.<br />
<br />
Of course, this is just my insight from having spent a few hours trying to get a single rifle to run with two boxes of a specific brand and loading of cartridge. I don't own 50 Marlin rifles. I haven't fired 1E5 rounds of every kind of ammunition ever made without a single jam. I haven't shot Marlins professionally for the last 90 years, uphill both ways in the snow. I don't even hang out on the forums with all the people who assuredly did, so what do I know? <br />
<br />
<h3>
Toward a Remedy</h3>
While this particular case is an issue of short ammunition, the effect is the same as the lifter wear with which other owners contend. As mentioned, I'm <a href="http://marauder.homestead.com/files/Marlin_1894_Carrier.htm">not</a> <a href="http://marauder.homestead.com/files/marlin94fix.html#1">the</a> <a href="https://www.photo.net/photo/9470539">first</a> <a href="https://www.levergunscommunity.org/viewtopic.php?p=234855&sid=f5d9cd97a02365846f67753371744916#p234855">person</a> to try solving the problem; there are plenty of proposed fixes. The bottom surface of the lifter which mates with the cam may be built up by welding or using an epoxy-bonded shim. The lifter itself could be bent slightly. Generally, these solutions amount to a timing advance to shift the range of allowable COL down. I don't know whether it's possible to effectively reduce the <i>maximum</i> COL by doing this; that limitation may be determined elsewhere in the mechanism (distance from magazine to cartridge stop surface) or loading cycle (chance of stumping on the breech face). I'm not worried about overly-long cartridges at the moment.<br />
<br />
The cam surface on this lifter is different than that of other (newer?) rifles I've seen. Its curvature precludes the easy use of spring steel shims. I simply elected to shape a brass shim from 0.015" shim stock and adhere it with JB-Weld. This may prove to have a relatively short longevity, but it is more than adequate for this application. With only a 0.015" shim, the lifter nose is advanced roughly 0.030", and the interruption occurs about 0.150" earlier (depending on where you assume the cartridge contacts the lever arm at that moment). Again, the point is that small changes in the cam interface cause a large change in the effective minimum COL.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivHa1l_lZ_64j367NcpLwLAjyXsl3DCruzj3a-MpIcSnCZS1QJ15j8ztfHHNCDbZMq0Zbm3m0uFOtqMrJp-5qZ-tZKb0RIhEZN6APOUqY9_35HaBTnAjO3gtGITFtdrHZTklGWUqVc9_c/s1600/shim+photo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivHa1l_lZ_64j367NcpLwLAjyXsl3DCruzj3a-MpIcSnCZS1QJ15j8ztfHHNCDbZMq0Zbm3m0uFOtqMrJp-5qZ-tZKb0RIhEZN6APOUqY9_35HaBTnAjO3gtGITFtdrHZTklGWUqVc9_c/s640/shim+photo.jpg" width="640" /></a></div>
<br />
For my own purposes, I am content with the potentially temporary shim. I don't want to weld or bend anything permanent; the shim can easily be removed without harm. All it needs to do is allow the rifle to function with this particular lot of ammunition -- which it does excellently. Once they are consumed, the rifle can simply be fed with a more appropriate choice of ammunition. The long-term solution is merely an applied understanding of the mechanical nuance -- and/or perhaps some handloading.<br />
<br />
<h3>
Afterthoughts and a Helpful Gesture</h3>
It might just be me, but these 240gr SWC bullets almost look more at home in 44 magnum brass. They would produce a good COL in that combination. It might simply be an issue of the difference in demand between the cartridges and a desire to consolidate production components. If everyone likes their Keith-style SWC's in the magnum cartridge, why not just stick the same bullets in the 44 special offerings too? After all, 1.475" is well within the SAAMI spec for 44 special, and it's probably a fair assumption that most of them wind up in revolvers anyway. <br />
<br />
As for those who want to run lighter loads in their 44 magnum 1894's without dealing with tweaking the rifle, there are probably some factory loads available with more appropriate COL. Of course, nobody states that metric on the box or the web. I guess you can always bring your calipers to the store or do some approximation from image analysis. The alternative is to handload. Again, SWC bullets with high cannelures seem to be the most popular. It may simply be easiest to use those with magnum brass to get a more reliable COL, loading down to 44 special ballistics. At least at Brownell's, the price is identical for magnum or special brass -- for both Starline and Winchester. That's probably of little comfort if you're sitting on a pile of special brass. I suppose if casting is desired or acceptable, the Lyman Cast Bullet Handbook linked below lists the COL for cartridges assembled with various bullets from Lyman molds. For example, a comfortable 1.571" COL can be achieved with a 245gr bullet from the #429421 mold. There are always plenty of other <a href="http://www.leverguns.com/articles/fryxell/marlin_1894.htm">recommendations</a> around the web.<br />
<br />
Toward that end, these pdfs may be useful. Sometimes the older books are actually favorable if you have stock of discontinued powders, or if you want pressure data for legacy loads as a reference for comparison. If you want newer editions, just hit up Amazon or AbeBooks, or the relevant manufacturer's site. <br />
<br />
<a href="https://archive.org/details/LymanCastBulletHandbook3rdEdition1980Ocr/page/n1/mode/2up">Lyman Cast Bullet Handbook - 3rd Edition - 1980</a><br />
<a href="https://archive.org/details/LymanReloadingHandbook48thEdition2002Ocr_201902/page/n2/mode/2up">Lyman Reloading Handbook - 48th Edition - 2002</a><br />
<a href="https://archive.org/details/Modern_Reloading_1st_Edition_by_Richard_Lee/mode/2up">Modern Reloading - Richard Lee - First Edition - 2000</a><br />
<a href="https://archive.org/details/HornadyHandbookOfCartridgeReloading3rdEdition1980?autoplay=1&playset=1">Hornady Handbook of Cartridge Reloading - 3rd Edition - 1980</a><br />
<a href="https://archive.org/details/HornadyHandbookOfCartridgeReloading4thEditionVolume1/page/n15/mode/2up">Hornady Handbook of Cartridge Reloading - 4th Edition - Part 1 - 1996</a><br />
<a href="https://archive.org/details/HornadyHandbookOfCartridgeReloading4thEditionVolume21996/page/n2/mode/2up">Hornady Handbook of Cartridge Reloading - 4th Edition - Part 2 - 1996</a><br />
<a href="https://archive.org/details/CartridgesOfTheWorld8thEdition1997/page/n2/mode/2up">Cartridges of the World - Barnes - 8th Edition - 1997</a><br />
<a href="https://archive.org/details/ABCreloadingDeanGrennell/page/n1/mode/2up">ABC's of Reloading - RCBS - Dean Grennell - 1985</a><br />
<a href="https://archive.org/details/TheGunDigestBookOfHandgunReloadingDeanAGrennell1987/page/n2/mode/2up">The Gun Digest Book of Handgun Reloading - Dean A Grennell - 1987</a><br />
<a href="https://archive.org/details/GunDigestSpecialShootersGuideToReloading2014PhilipP.Massaro/page/n1/mode/2up">Gun Digest - Shooter's Guide to Reloading - Philip P. Massaro - 2014</a><br />
<a href="https://archive.org/details/PrecisionHandloading1985/page/n1/mode/2up">Precision Handloading - John Withers - 1985</a><br />
<a href="http://www.reloading.org.uk/Introduction%20to%20BPCR%20Loading.pdf">Introduction to BPCR Loading - Chuck Raithel 2001</a><br />
<a href="http://www.lasc.us/Fryxell_Book_textonly2.pdf">A Cast Bullet Guide for Handgunners - Fryxell - Applegate</a><br />
<a href="https://archive.org/details/americanrifletre00whel/page/n1/mode/2up">The American Rifle - Whelen - 1918</a><br />
<a href="https://archive.org/details/Complete_Guide_to_Handloading_Sharpe_1937/page/n1/mode/2up">Complete Guide to Handloading - Sharpe - 1937</a><br />
<a href="https://archive.org/details/HandloadersManualEarlNaramore1943/mode/2up">Handloaders Manual - Earl Naramore - 1943</a><br />
<a href="https://archive.org/details/alliantreloadingmanual/mode/2up">Alliant Reloaders Guide - 2009</a><br />
<a href="http://wapenkamer.nl/wp-content/uploads/2015/11/Hodgdon_Basic_Reloading_Manual_2015.pdf">Hodgdon Basic Reloading Manual - 2015</a><br />
<a href="http://www.reloading.davidshangout.com/wp-content/uploads/2015/04/Winchester-Reloaders-Manual.pdf">Winchester Reloaders Manual - 15th Edition - 1997</a><br />
<a href="http://www.accuratepowder.com/wp-content/uploads/2010/09/WesternLoadGuide1-2016_Web-1.pdf">Western Load Guide - 6.0 - 2016</a><br />
<a href="http://www.tacticoolproducts.com/powder.pdf">Powder Bulk Density Chart - 2007</a><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-72978173239663878782019-10-22T02:47:00.001-07:002019-10-24T07:20:32.380-07:00Resolving Tanfoglio Witness Magazine IssuesThis post is in regards to my own observations and my particular model pistol, a Tanfoglio Witness P-S imported by EAA circa 2012. If you're reading this because you're troubleshooting or looking for magazines or a review, consider that we might be thinking about vastly different pistols. Let's take a moment to paint a more appropriately muddied picture.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<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/AVvXsEiUSUkohWWvLJWe0znrce0dBBpP5ytbMNjZaqPyTnFSj6UHdpFo6AkU3Ah3efajaZmij73axAIHgBex1x7eCPRELxiGNQWQ5YKviKcJPSbisBRdYpU9wtT7HuMbldITaJKEH1B2r21N87A/s1600/fswitnessp2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1152" data-original-width="1382" height="532" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUSUkohWWvLJWe0znrce0dBBpP5ytbMNjZaqPyTnFSj6UHdpFo6AkU3Ah3efajaZmij73axAIHgBex1x7eCPRELxiGNQWQ5YKviKcJPSbisBRdYpU9wtT7HuMbldITaJKEH1B2r21N87A/s640/fswitnessp2.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">These both are full-size polymer-frame EAA/Tanfoglio Witness pistols in 9mm </td></tr>
</tbody></table>
It is a rather common occurrence there may be many different unique products associated with an overarching product family name. Figuring out which specific model you actually have and searching for parts is made difficult by the reluctance of manufacturers, marketers, and retailers to make differentiating information (i.e. unique model numbers or names) prominently available. Just as "Motorola Razr" might be a smart phone or a flip phone, a "Tanfoglio Witness 9mm" might be one of several different things. The Witness family covers steel frame and polymer frame pistols in different frame sizes depending on caliber and manufacture date. They're also subdivided into compact and full-size variants within that distinction. While most of the Witness models are based on the CZ-75 design, there are also M1911 clones under the same name. As far as magazines go, EAA does provide a serial number <a href="http://eaacorp.com/magazine-lookup">lookup tool </a>to help owners identify their model and the requsite magazine. Adhering to time-honored tradition, this tool only works on some browsers. Bear in mind though, if a large fraction of retailers don't provide any compatibility information more specific than a model family, confidently searching for parts might still be difficult even if you know the specifics of your product and the desired part. <br />
<br />
Walking back toward those specifics, my pistol is a post-2005 full-size polymer frame variant (<a href="http://eaacorp.com/guns/handguns/witness-polymer-full-size-tanfoglio-59">SKU: 999044</a>). This is described as "New Frame Special", which appears to be a variant of what is more often simply referred to as the "small frame" pistol. This seems to make sense, as it is a Witness P-S (polymer, small frame) as opposed to a Witness P, which is (to my knowledge) an earlier larger frame model. To be appropriately confusing to the incautious, the frame is marked "Witness P-S", while the slide is marked "Witness P". Again, this information is useless since almost every retailer uses "Witness P" and "Witness P-S" interchangably if they mention it at all. The magazines which are compatible with my pistol are <a href="http://eaacorp.com/gun_accessories/index.php/9mm-16rds-full-size-small-frame-101900.html">#101900</a> (16 round), <a href="http://eaacorp.com/gun_accessories/index.php/one-ea9m10-steel-wit-ps-101920-1.html#myModal">#101920</a> (10 round blocked), <a href="http://eaacorp.com/gun_accessories/index.php/ea9m200525rds-25rd-101921.html">#101921</a> (25 round). The magazine which shipped with mine is #101900. <br />
<br />
<h3>
Original Magazine #101900</h3>
I have had this pistol for several years and have put 300-400 rounds through it. While I'm comfortable with it and generally satisfied with its performance in comparison to what it replaced, it has always had a tendency to occasionally misfeed within the first few rounds out of a full magazine. With round nose FMJ, the issue is rare, but with flat-nose or JHP ammunition, this tendency can be frustrating. The misfeeds take various forms depending on the bullet geometry and cartridge OAL. Flat-nose and JHP rounds may get stumped against the bottom edge of the feed ramp. Round-nose ammunition may do complete nosedives if the OAL is short. When the problem manifests, it will tend to persist for the next 3-4 rounds before disappearing. Until recently, I had never used anything other than round-nose FMJ. At the time, I simply attributed this very occasional fault to either my loading of the magazine or perhaps the need for some break-in. <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/AVvXsEjkV8Tl4M8AUDS8YFGkxPGTf9YTBUMTkdoDhgs_gH4W5Z8mwYDiVJvoa47IeWNUU9Tp-OKX5HTwYSZwnY35uliuqQeBdn_n_Ta0rlpVpSyujgaCbHXwtz8V6W-eKgeVG9E1Ihre9yAhyphenhyphenGw/s1600/stumped_example.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkV8Tl4M8AUDS8YFGkxPGTf9YTBUMTkdoDhgs_gH4W5Z8mwYDiVJvoa47IeWNUU9Tp-OKX5HTwYSZwnY35uliuqQeBdn_n_Ta0rlpVpSyujgaCbHXwtz8V6W-eKgeVG9E1Ihre9yAhyphenhyphenGw/s640/stumped_example.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Hornady JHP with short OAL stumped into feedramp</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/AVvXsEiWk8BG3Yi7jNNm23Zodf0Hl2AM4Vh_CVnwor1DPoBGFS99XhaPK3HBnVE7Ol5oWPNgFnN-VdfCJiMuFkGLm0DnQGVI4kqGNJSh8Twm7KWugsUfP2_17PWKZfMPTR4B18BZgJdHE80FjWE/s1600/nosedive_example.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWk8BG3Yi7jNNm23Zodf0Hl2AM4Vh_CVnwor1DPoBGFS99XhaPK3HBnVE7Ol5oWPNgFnN-VdfCJiMuFkGLm0DnQGVI4kqGNJSh8Twm7KWugsUfP2_17PWKZfMPTR4B18BZgJdHE80FjWE/s640/nosedive_example.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Complete nosedive with Remington UMC round-nose FMJ</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
In response to a partial-feed issue which arose when changing ammunition, I used Cratex and a wool buff to ease and polish the edge and bottom corner of the extractor to keep it from biting into case rims. I polished the feed ramp, breech face and the side of the breech opposite the extractor. In all, this reduces the amount of force required for a round to slide under the extractor. This solved the particular ammo-sensitivity I was having, and I wondered if I had just solved the more longstanding misfeed issue at the same time. On the second magazine after my polishing work, I wound up with a handful of complete nosedives using both Remington UMC and PMC Bronze 115gr FMJ. It seems I had solved one of two unrelated faults contributing to the misfeeding tendency; the prime suspect was now the magazine.<br />
<br />
With a bit of fiddling and observation, I had a handle on what was happening. The problem seems to be an issue of magazine geometry more than anything else. With only a few rounds in the magazine, the rounds in the tapered section seem to be well constrained and will reliably stack against each other with the top round tightly against the feed lips. When there are >10 rounds or so in the magazine, the rounds in the tapered section of the magazine may not stack uniformly. They tend to pivot around the wrong side of the ribs, allowing the top several rounds to fan out vertically. One way to induce this mis-stacking is to push down on the nose of the top round. You may feel the stack shift as you depress, and when you let go, the top round will be held only by its rim. The front of the case will be unsupported and ready to nosedive when stripped. The placement of the retention dimples in the feed lips seems to exacerbate the problem by giving the round something to pivot against. <br />
<br />
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><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/AVvXsEhHC4PE1btOKMmYcduTfT7QiyLP8qbPc_wsbZHbqI74I-_1ZVfGTPKtIqVBnvmpJ4Ax5-pOD0eQirZZm3kMM7btlr-rdg9lHSB0OQb6rqFUS_HT5wH3tf-kqyHDIVnHZD2FRNDYWV13VCc/s1600/tight_stacked.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1400" data-original-width="1600" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHC4PE1btOKMmYcduTfT7QiyLP8qbPc_wsbZHbqI74I-_1ZVfGTPKtIqVBnvmpJ4Ax5-pOD0eQirZZm3kMM7btlr-rdg9lHSB0OQb6rqFUS_HT5wH3tf-kqyHDIVnHZD2FRNDYWV13VCc/s320/tight_stacked.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Tight stacking with only 3 rounds</td></tr>
</tbody></table>
</td><td style="text-align: center;"><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/AVvXsEhvw9UkPs26FQnDHkTtWDfiSMh_7OS2TCxXGk9D9U8TKB5xh8JSeI4KsJqaQATw-_TDi0lhKCwSe641HdNVmhyphenhyphenSjowH-tgGCU-Sxb1lo7PvZ0l1c-oG2l_5_RqK-GgctNwXWl-e38IeuRU/s1600/misstacked.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1400" data-original-width="1600" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvw9UkPs26FQnDHkTtWDfiSMh_7OS2TCxXGk9D9U8TKB5xh8JSeI4KsJqaQATw-_TDi0lhKCwSe641HdNVmhyphenhyphenSjowH-tgGCU-Sxb1lo7PvZ0l1c-oG2l_5_RqK-GgctNwXWl-e38IeuRU/s320/misstacked.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Splayed stacking with 13 rounds</td></tr>
</tbody></table>
</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/AVvXsEgDVtF1y8LxjtUeMNrBn0uwRinpP8rTyNjhUzCiRK6324Zrh5fSeKU9QtFrG8Z9-oq7hQziKWWOxhOtF1IGha2PHXa14MIkaXTRuwvK7okkZfGyhuuRUKlxT_5aPWmFyrLVRaXA6qrpk4c/s1600/nosedive_demo.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1600" data-original-width="1569" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDVtF1y8LxjtUeMNrBn0uwRinpP8rTyNjhUzCiRK6324Zrh5fSeKU9QtFrG8Z9-oq7hQziKWWOxhOtF1IGha2PHXa14MIkaXTRuwvK7okkZfGyhuuRUKlxT_5aPWmFyrLVRaXA6qrpk4c/s320/nosedive_demo.jpg" width="313" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Unsupported round will easily pivot down when stripped</td></tr>
</tbody></table>
<br />
While I'm sure someone would suggest that this is all
caused by a collapsed spring, I doubt that for three reasons: The
problem has been manifest since the magazine was new. The misfeeds
never occur at the end of a magazine. Adding a filler block inside the
magazine to increase the spring force does not change the behavior, and
manually applying an excess of force to the follower with the floorplate
and spring removed will not prevent or remedy an irregular stacking
condition either.<br />
<br />
How big of a problem is this though? While it can be intentionally induced as described, the condition also seems to arise naturally during loading and handling. The fact that the slide keeps the stack depressed while closed means it can occasionally recur even if the magazine was stacked tightly when it was first inserted into the pistol. A magazine which is sluggish either due to fouling or a weak spring will probably be more prone to this mis-stacking when the slide opens. Sometimes this mis-stacking can be cured by slapping the magazine on its
side, though it often can't. A small tool or pocket knife can be used
through the magazine catch slots to push the stack back into alignment,
but that's hardly a practical solution. I think it's big enough of an issue that I am willing to write off this magazine as having a flawed design. The best fix is replacement with something different.<br />
<br />
<h3>
MEC-GAR MGWIT9SFAFC</h3>
As I mentioned, it's hard to confidently find parts when retailers don't
know what they're selling or don't care to communicate any amount of
unambiguous identifying information. As far as I know, if you want a
different magazine to replace a #101900, your only option is a Mec-Gar <a href="https://www.mec-gar.com/pistol-magazines/Witness/WITNESS-TANFOGLIO-SF-17-High-Cap">MGWIT9SFAFC</a>.
This is listed (and stamped) as a 17-round magazine, and it fits well.
The feed lip and transition geometry do significantly differ from the
original magazine. The follower is different primarily in that it
matches the narrower transition geometry; this also means they aren't
interchangeable. The spring is significantly longer and has more
turns. The end result is a magazine which reliably stacks perfectly
every time. The aforementioned method of inducing mis-stacking does not
work on the Mec-Gar magazine.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOAYuny3BLGjk4Nh5nH-aon3KPW6xlEIrlTHI_-kE7oZbT1XCwd10ffJQHqQu7ovYV7qc-9hFibCQjMHSo-Zs5rCv9dNf-BLO_yq_cjl6CCVCtvwP6QjpyRS4E1H9O3bKwhs2ukWZ66AI/s1600/magazines_side_full.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1455" data-original-width="1600" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOAYuny3BLGjk4Nh5nH-aon3KPW6xlEIrlTHI_-kE7oZbT1XCwd10ffJQHqQu7ovYV7qc-9hFibCQjMHSo-Zs5rCv9dNf-BLO_yq_cjl6CCVCtvwP6QjpyRS4E1H9O3bKwhs2ukWZ66AI/s320/magazines_side_full.jpg" width="320" /></a>
</div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ59WHlLaZUik3CBJZQD-gn3KqSxivrgtOewEhXQWtFPi0J6PcGPHke8Co0o0kzlwHzX3Gf1br1C7u-UTTi0X95tbFy1U-mNMSI3x4uTzi5V2ZKXNOlrTBz5ZumpkNvaIc_8mJLPHArZg/s1600/magazines_top_down.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1574" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ59WHlLaZUik3CBJZQD-gn3KqSxivrgtOewEhXQWtFPi0J6PcGPHke8Co0o0kzlwHzX3Gf1br1C7u-UTTi0X95tbFy1U-mNMSI3x4uTzi5V2ZKXNOlrTBz5ZumpkNvaIc_8mJLPHArZg/s320/magazines_top_down.jpg" width="314" /></a>
</div>
</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLRqU-Dggii-fQedpO7i26Y4chIevyYDbefkKFwSr54MXlP1WTnhF8pFqhACFZGtMg6LZMusydSxPpaPu-mGJSY_kAIWlQC-Vs9rToAaYP3yiKqqQHfa_p9T6wRqzjkTgMDYxg78qzkqI/s1600/magazines_disassembled.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1033" data-original-width="1600" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLRqU-Dggii-fQedpO7i26Y4chIevyYDbefkKFwSr54MXlP1WTnhF8pFqhACFZGtMg6LZMusydSxPpaPu-mGJSY_kAIWlQC-Vs9rToAaYP3yiKqqQHfa_p9T6wRqzjkTgMDYxg78qzkqI/s320/magazines_disassembled.jpg" width="320" /></a></div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX3shEy7_nnDxpBoFcG51CHcWB0iF4hKSTFE_cMGiTuhN5dA3IeJyR2VHe20D548d9l6A53IY4OZomaHNN-8VpJ3waltA1qcvdR3hZmcUy_zrf0uKJ9uCusaekqAXruYapr_FB3awoWGc/s1600/magazines_side_close.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX3shEy7_nnDxpBoFcG51CHcWB0iF4hKSTFE_cMGiTuhN5dA3IeJyR2VHe20D548d9l6A53IY4OZomaHNN-8VpJ3waltA1qcvdR3hZmcUy_zrf0uKJ9uCusaekqAXruYapr_FB3awoWGc/s320/magazines_side_close.jpg" width="320" /></a></div>
</td></tr>
</tbody></table>
<br />
So far this sounds like a perfect fix. I ran several dry-cycle drills without fault, trying to induce misfeeds with flat-nose rounds all the while. I eagerly loaded up a magazine with said problematic flat-nose FMJ and spent it on steel plates. I was a bit distracted by the satisfaction of getting the ammo to finally feed that I lost count and was a bit confused when the hammer finally dropped on an empty chamber; the slide didn't lock open when the mag was empty. I depressed the mag release, and the magazine happily stayed put. Only after a bit of wiggling would the mag come out. <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/AVvXsEg-2k-9Xm_acgYDFd8WnQZKdzaTCPNRQPH7cNZsPXT7-M0pxla7okFafaC0szo8vFMPLBkSX_pJgb_9boRmKvqifwQO2TqXW4guo0Sr9FLmlcFPNdcHBYYtbXtf7obk6hi9TsJehi6JBFM/s1600/magazines_top_front_detail.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1011" data-original-width="1086" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-2k-9Xm_acgYDFd8WnQZKdzaTCPNRQPH7cNZsPXT7-M0pxla7okFafaC0szo8vFMPLBkSX_pJgb_9boRmKvqifwQO2TqXW4guo0Sr9FLmlcFPNdcHBYYtbXtf7obk6hi9TsJehi6JBFM/s320/magazines_top_front_detail.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Follower rounded over on Mec-Gar magazine</td></tr>
</tbody></table>
The plastic follower barely catches slide lock on its edge, and after only a few dry-cycle drills and a single mag in live-fire, it had rounded off and wedged against the side of the slide lock instead of lifting it. Now it would no longer reliably catch the slide lock. Okay, I guess a LRHO is kind of a convenience, but now the mag won't drop because it wedges against the slide lock. So even though it solved the misfeeding issue brilliantly, the Mec-Gar magazine introduces a new inconvenience. Granted, I only have one magazine to base this on, but at an overall cost of $33 each, I'm not exactly going to buy enough magazines to do a statistical analysis of this failure mode. At this point, I see two options: cut off the corner of the follower so that it neither lifts the slide lock nor wedges against it. This defeats the LRHO, but it's the easiest to do. Alternatively, one could repair and reinforce the edge of the follower where it engages the slide lock. That is what I opted to attempt.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipK2Sy4bldk7NHNXea7YChxrbzYLnIZbeDo3_mwK1UFSBPhR3DeQzU0FXrPNutNftuXXKm5epR6J0Wfx4GaxMoMqoG3HovaY8r_Mm0Y7hQNehbX4Y67DLlTxUVEimIfNHx8QCGWIBm9tE/s1600/platemod_oblique.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1588" data-original-width="1600" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipK2Sy4bldk7NHNXea7YChxrbzYLnIZbeDo3_mwK1UFSBPhR3DeQzU0FXrPNutNftuXXKm5epR6J0Wfx4GaxMoMqoG3HovaY8r_Mm0Y7hQNehbX4Y67DLlTxUVEimIfNHx8QCGWIBm9tE/s200/platemod_oblique.jpg" width="200" /></a></div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOj6NMZtU1ZNyVPY1rF0aYXT58-H-Gh_sM8MZlYI1MCrnwEVZvG7chyPiIkZOKtmUKAQIomUzS-jBSV9kJ6d3ESpUPzJQOGxNw_IgA6OKpBYlr_QTB_UcWEa_ag1S4MGs-16ZYFFpO1mw/s1600/platemod_demo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOj6NMZtU1ZNyVPY1rF0aYXT58-H-Gh_sM8MZlYI1MCrnwEVZvG7chyPiIkZOKtmUKAQIomUzS-jBSV9kJ6d3ESpUPzJQOGxNw_IgA6OKpBYlr_QTB_UcWEa_ag1S4MGs-16ZYFFpO1mw/s400/platemod_demo.jpg" width="400" /></a></div>
</td></tr>
</tbody></table>
<br />
My first attempt was simply to cut a piece of spring steel strip to match the profile of the follower edge and epoxy it in place. After some final dressing, this looked fine and worked perfectly when tested manually. I loaded a single round in the magazine, shot a steel plate, and was rewarded with an open slide. I removed the magazine, and the steel reinforcement fell out on the floor. The epoxy didn't bond at all to the follower. Based on appearance and toughness, I had assumed this was glass-filled nylon, but perhaps it has a lubricant additive. After a few other attempts, I resigned to the fact that bond strength was going to be very limited. <br />
<br />
<table align="center" cellpadding="0" cellspacing="0"><tbody>
<tr><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimPZCiLo-gVFsWgPTCJzN-D8WV2IurraxTYtw42wIS3OxEQPGH9gAaNYidvXulc7unOtRYrnWxwUmcovwMWjTlqEPO33U1KKbNpf5XRriFxlpNB_AZ_tMOuqMa0tfMlN4j7JZSjEfMZKo/s1600/pinmod_side.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1590" data-original-width="1600" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimPZCiLo-gVFsWgPTCJzN-D8WV2IurraxTYtw42wIS3OxEQPGH9gAaNYidvXulc7unOtRYrnWxwUmcovwMWjTlqEPO33U1KKbNpf5XRriFxlpNB_AZ_tMOuqMa0tfMlN4j7JZSjEfMZKo/s200/pinmod_side.jpg" width="200" /></a></div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicJ1WpEH0lzY3DWfHEkEjEUpxD8yzEwseEixmIZdmZh8mmojsyylDMdEDYUwkGOaEjb2UdsQkLdok5uXUULx1nZTkQsGgNWSm5k4pMxz-DkHEPx4wCE_s9sQDre7xIFgKSnNdV60tMHLg/s1600/pinmod_demo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicJ1WpEH0lzY3DWfHEkEjEUpxD8yzEwseEixmIZdmZh8mmojsyylDMdEDYUwkGOaEjb2UdsQkLdok5uXUULx1nZTkQsGgNWSm5k4pMxz-DkHEPx4wCE_s9sQDre7xIFgKSnNdV60tMHLg/s400/pinmod_demo.jpg" width="400" /></a></div>
</td></tr>
</tbody></table>
<br />
I changed plans and came up with a reinforcement which relied more on mechanical support than the adhesive bonding. I drilled a small hole in the follower to retain a section of 3/32" steel rod. The hole is deep enough to reach the centerline of the follower, ensuring that the end of the rod is fully captured. I used ScotchWeld 2216, as this relatively flexible epoxy tends to have good adhesion to troublesome plastics. The bond strength is still relatively weak, but it's the best I had. At this point, the LRHO works correctly and the follower edge is resistant against deformation. <br />
<br />
I have no idea if the problems I've experienced are common or even repeatable. I do not know if there are other alternatives beyond the two magazines I've described. If you found any of this information useful, then I suppose that's a good thing. Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-5851332800128256308.post-46545579411812919302017-06-25T12:21:00.000-07:002017-06-25T12:21:45.300-07:00Reliable failuresA while back, I'd <a href="http://epicbeardquest.blogspot.com/2015/05/hybrid-ics-always-make-interesting.html">showcased</a> the failed cathode drive <a href="http://uploads.cq-dx.ru/pdf/MHW/MHW3528R.PDF">amplifier</a> for my main monitor. This hybrid circuit had failed due to thermal stress because the alumina substrate had detached from the thermal tab. Grey, <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-MdPm2i5FHy2Fk1BLUy7Io_e3l7FiAaReCOYxmk6_w1Y9a0r5JRZHP99y6gpmjVXtU66aEokMOFBM9lpAPS8Wgw6WGzpb5KEf1lBx4y4roNPc3jSqJqMmTYkx2ZYgT3wWtvhZd1XpUxo/s1600/2015-05-01_09-26-48_608.jpg">sandy solder</a> on full display, I'd mumbled about "metallurgical nuance".<br />
<br />
Well, I guess it happened again. Sort of.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc_DLiaEVIGJPNWjAMWXLx5KaEZk2pPbsHkC-sT6U8jnn4saJiZOOeIKIH2wFhjg06eeof32jGXKt4z7MYxbvIhyphenhyphenePDTEiOQ5279gBss3qV8gEsm3cDhH2iAR6W858idD-K3pnzlfHuQ/s1600/IMG_20170623_071940_267.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc_DLiaEVIGJPNWjAMWXLx5KaEZk2pPbsHkC-sT6U8jnn4saJiZOOeIKIH2wFhjg06eeof32jGXKt4z7MYxbvIhyphenhyphenePDTEiOQ5279gBss3qV8gEsm3cDhH2iAR6W858idD-K3pnzlfHuQ/s640/IMG_20170623_071940_267.jpg" width="640" /></a></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/AVvXsEjB_1e0KVB7jqqDq4ivoQVGg-d9SsYCmsb2G0ZW8oj_-KIKA-V3ubS4WFQNhedWIXndJUbalBuo63kDkM_GlsLdikk5lk13Ei2yLMgChiu7LkUY18dBLwqVasTpCYBG2A2IsED86w0Wr8c/s1600/IMG_20170623_072122_165.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_1e0KVB7jqqDq4ivoQVGg-d9SsYCmsb2G0ZW8oj_-KIKA-V3ubS4WFQNhedWIXndJUbalBuo63kDkM_GlsLdikk5lk13Ei2yLMgChiu7LkUY18dBLwqVasTpCYBG2A2IsED86w0Wr8c/s640/IMG_20170623_072122_165.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">boing</td></tr>
</tbody></table>
Again, the green channel failed, this time due to fractured solder between a transistor's thermal slug and the substrate. The solder is black and gritty and won't reflow at all. I ended up mangling everything just trying.<br />
<br />
And then I tried to replace the entire amplifier section with part from the last failure. <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/AVvXsEgM_sWlNVqvDKaRV4H4NnFFap39gQ2raHicI1gYGhpfrHp7ZnZfEhj6Jn2LJeo6TnGBfIZ8FKY8QMT4nPuLXqb02_6TnqzGNHlz-RiN1iSvvo5KqP9NCJ_dpvbm7kPjijTD-_wtkUmTeBM/s1600/IMG_20170623_080129_176.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="900" data-original-width="1600" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM_sWlNVqvDKaRV4H4NnFFap39gQ2raHicI1gYGhpfrHp7ZnZfEhj6Jn2LJeo6TnGBfIZ8FKY8QMT4nPuLXqb02_6TnqzGNHlz-RiN1iSvvo5KqP9NCJ_dpvbm7kPjijTD-_wtkUmTeBM/s640/IMG_20170623_080129_176.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">what are you dooooooing</td></tr>
</tbody></table>
I flowed the new amplifier into place and gently held it square with tweezers while the solder froze... and then bumped the bond wires off of one of the transistors.<br />
<br />
Wholesalers want about $90 for this stupid IC, and the only place I can find cheaper only takes orders by phone... in Polish. I guess I'll just have a bicolor monitor from now on.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-22650183825078242932016-09-25T02:05:00.001-07:002016-09-26T02:15:02.419-07:00A MFL inspection demo kitLong ago in the distant land of late-semester grad school crunch time, an expeditious self-variant thought it was a good idea to voluntarily adopt a course project requiring research and fabrication of equipment. While I can barely recall the scent of ambition, that physical device was one of its few remaining tangible products. Let us go back in time for a moment...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLFqkX-e7pPb_1VXH6PFgoQpPoXnIpp2-3Wq4lAYjqBozgCCShQxjn_FHwY9sFLgCYgFZOFszAvlxg1JpPnAU-8WXdHXok-oK-pr5IYblofaeAY9rSy6f_vWnqOfoCaYbXBklr2rAdMIs/s1600/IMG_20160925_241952_402.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLFqkX-e7pPb_1VXH6PFgoQpPoXnIpp2-3Wq4lAYjqBozgCCShQxjn_FHwY9sFLgCYgFZOFszAvlxg1JpPnAU-8WXdHXok-oK-pr5IYblofaeAY9rSy6f_vWnqOfoCaYbXBklr2rAdMIs/s640/IMG_20160925_241952_402.jpg" width="640" /></a></div>
<span id="goog_694179928"></span><span id="goog_694179929"></span><br />
With a cluster of retirements happening in the department at the time, I was in the last semesters of my MSc path with no choices for courses that would meet requirements. After talking with one of the ME professors I'd been working with on a research project, I wound up surfing in a soft overview course on NDT methods. As the only EE student in a ME course full of ME students, I felt compelled to take every opportunity to see if my own background could bring something fresh to the body of student work and discussion that took place. <br />
<br />
The last course project had quite a bit of latitude, but the basic idea involved a presentation based on a literature review, case study, or physical demonstration pertaining to a selected <a href="https://en.wikipedia.org/wiki/Nondestructive_testing">NDT/NDI</a> method. I opted to present and demonstrate a basic magnetic flux leakage (MFL) test. While it would suffice to dig up some mothballed lab equipment and then make a PPT, I intended to make my own equipment and defect samples. This was an opportunity to adopt an easy project that spanned a range of fun task areas. It had everything from experimental component characterization, magnetostatic FEA, circuit design and simulation, programming, electronics fab, and machining. I'd been burned out on project work in Excel and Simulink, and the chance at application and variety was appealing.<br />
<br />
The concept of <a href="https://en.wikipedia.org/wiki/Magnetic_flux_leakage">MFL testing</a> is simple. Local changes in the per-unit-length permeance of a sample can be detected by subjecting the workpiece to a static magnetizing field. Near-surface flux is increased local to any defect which decreases the magnetic cross-section of the flux path. All one needs is something to produce a magnetic field in the work, and something to sense the field near the surface.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCa6LMetRT3l3MrBgvxQ28GK0UyYpVWUW0PZdpaZK7w0e7JXNYacc5v1uDnSTGHv9mbvjX7eqerx-31VQyU73O6l5eQhbDadBFqdjW1CRbhLNSyxZzf3PhvdqY8sxhnMMH16heWvqCac/s1600/Screenshot+at+2016-09-25+02%253A38%253A42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCa6LMetRT3l3MrBgvxQ28GK0UyYpVWUW0PZdpaZK7w0e7JXNYacc5v1uDnSTGHv9mbvjX7eqerx-31VQyU73O6l5eQhbDadBFqdjW1CRbhLNSyxZzf3PhvdqY8sxhnMMH16heWvqCac/s640/Screenshot+at+2016-09-25+02%253A38%253A42.png" width="640" /> </a> </div>
<br />
While MFL sees more use in larger-scale applications and applications where the magnetics are purpose-built for particular surface geometry, my requirements meant I had a lot of latitude to make design choices that would otherwise make an impractical commercial product. To make the equipment low-power and simple, I opted for permanent magnet excitation. While this meant I didn't have the convenience of easily reducing excitation to ease manipulation or to suit different material thicknesses, I did incorporate the ability to incrementally add or remove magnets. This makes the probe a bit difficult to use at times, but that's acceptable.<br />
<br />
Since I'd been spending a lot of time doing magnetostatic sims in <a href="http://www.femm.info/wiki/HomePage">FEMM</a>, I figured I'd play with it and get an idea of what I should expect. With an approximate model, I could get an idea how much excitation I'd need for a given sample defect. I could decide on pole and sample dimensions and I could figure out what the flux densities to expect at the sensor for a given selection of magnets. <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/AVvXsEijA2AUiw49uvCPQfiG3l4wn2VCQ0CH3GXK-IWPPzeaGhc359E_wIV2P1CEmz1X5rIK6I5qJZCxE5R6VLTZQn-AjrvZqQF93IrwbYjs5VGzGm5vMnmtuxMxILjf-L3JoJIiCu3OOSCT-IM/s1600/Screenshot+at+2016-09-25+03%253A46%253A37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="542" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijA2AUiw49uvCPQfiG3l4wn2VCQ0CH3GXK-IWPPzeaGhc359E_wIV2P1CEmz1X5rIK6I5qJZCxE5R6VLTZQn-AjrvZqQF93IrwbYjs5VGzGm5vMnmtuxMxILjf-L3JoJIiCu3OOSCT-IM/s640/Screenshot+at+2016-09-25+03%253A46%253A37.png" width="640" /></a></div>
<br />
I figured the simplest way to sense near-surface leakage flux was to provide a shunt path through a hall effect sensor. Some small steel pole pieces could serve as my low-reluctance path, and I picked a commutation sensor out of a small BLDC motor. While I had plenty of these used sensors, they were all unidentifiable SMT parts for which I had no data. I simply looked at the application I'd taken them out of and decided on a similar method of use. In most of these 3-phase BLDC motor drive applications, the three sensors are driven in series from a fixed (5v) supply with a single series resistor. The motor drive IC has three differential sense inputs and does everything else.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHKy_0igDg_t3_LvdU6su-F3p8NMIqaBUszPPBVPgo_ePsSGrzVWCOtQDKpZnY-dDxqIxknU2djKBvT470y4OBRfzyfhKg3OKJYqzWOLkaVu5LiLzCwThrKLRaGi9McNeL0NlLMomv5fQ/s1600/IMG_1025-2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHKy_0igDg_t3_LvdU6su-F3p8NMIqaBUszPPBVPgo_ePsSGrzVWCOtQDKpZnY-dDxqIxknU2djKBvT470y4OBRfzyfhKg3OKJYqzWOLkaVu5LiLzCwThrKLRaGi9McNeL0NlLMomv5fQ/s640/IMG_1025-2.JPG" width="640" /></a></div>
<br />
To characterize the sensor response to an applied field, I borrowed a disused magnetometer from storage at the physics department and set up a test fixture using a modified transformer frame. Still using a simple series resistor and fixed voltage source, I set the sensor up with an excitation current equal to what it would have in its original application. I placed the sensor and magnetometer probe in the middle of the fixed core gap and incrementally energized the device with DC. If I hadn't been a dumbass at the time, I'd have realized that magnetoresistive effects meant that current was actually varying with flux density and possibly reducing response linearity. While a current-regulated design might have benefits, I didn't think about it at the time. I wasn't out to make absolute measurements of fields; all I needed were roughly linearized <i>relative</i> measurements. For all I know, these sensors may have never been rated beyond 50mT or 100mT. I took what I had and ran with it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH4UzLGAcGYinoKOVpXR4Ejk0isWWD3IExi4kgmycAwIaLQTsPPTYzrDpBbTbkb8PXyzeeWA6jIUPAFgV7vbUySD1VYAWXyp0QM9UzFNVhg-qgLkonz7sUxD9wXEADihHYvmTH7tMWAlI/s1600/IMG_1008-2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH4UzLGAcGYinoKOVpXR4Ejk0isWWD3IExi4kgmycAwIaLQTsPPTYzrDpBbTbkb8PXyzeeWA6jIUPAFgV7vbUySD1VYAWXyp0QM9UzFNVhg-qgLkonz7sUxD9wXEADihHYvmTH7tMWAlI/s640/IMG_1008-2.JPG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYie454kyHcACdR4Swh5icWVqZSV6G4NxhAjmO9sS86ZLDS0sJPD6YnGFnRQjQlKM5nf3YRnVQMRg1DNKoQiqB-jJP4yTnj5Si4L0goWzbQn0JIGpBocRvTK_L0Q_3Chba_4zGgCjNBg/s1600/Screenshot+at+2016-09-25+02%253A46%253A25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYie454kyHcACdR4Swh5icWVqZSV6G4NxhAjmO9sS86ZLDS0sJPD6YnGFnRQjQlKM5nf3YRnVQMRg1DNKoQiqB-jJP4yTnj5Si4L0goWzbQn0JIGpBocRvTK_L0Q_3Chba_4zGgCjNBg/s400/Screenshot+at+2016-09-25+02%253A46%253A25.png" width="400" /></a></div>
<span id="goog_694179938"></span><span id="goog_694179939"></span><br />
<span id="goog_694179938"></span><span id="goog_694179939"></span><br />
For sake of dirty simplicity, I made a LUT and configured an ATTiny25 microcontroller to sense the differential input and drive a meter via PWM. I could have used a proper differential amplifier or even built a <i>linearizing</i> differential amplifier, but I didn't. If I had used an instrumentation amplifier, I probably could have had the sensitivity to work with less magnetic excitation. The microcontroller allows absolute reading of sensor flux density or it can be set into a convenient 'relative' mode where a baseline reading can be zeroed out. This essentially stretches the scale and exaggerates meter movement when scanning an area. Although I'm pretty sure I did a board layout for it, I ended up cobbling it together on nasty old perfboard from junk components. The pot is for setting the meter range. The meter is from an old rusted tacho/dwell meter I found on a scrap pile. While the original face marked in RPM was coincidentally correct for reading in Gauss, I kept forgetting which of the multiple scales to use. Also, fuck CGS units. I simply <a href="http://epicbeardquest.blogspot.com/2015/03/create-accurate-custom-meter-legends.html">made a new scale</a> with tiny ass text so that I'd have something to squint at.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqxqQX9mWOIHXDBLxYnjYhaE-xqN0JHD1ak8RZd9IgYZ0R5QoGtshQ4vQoUk-n5yS1xHV95eC1mUtyS5SWBv1dhlEaAWSpn4Fdx6HG5Nk37TSQwfWInML-uPnu1oK2Sxl4AdlHdYIYxCU/s1600/IMG_1023.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqxqQX9mWOIHXDBLxYnjYhaE-xqN0JHD1ak8RZd9IgYZ0R5QoGtshQ4vQoUk-n5yS1xHV95eC1mUtyS5SWBv1dhlEaAWSpn4Fdx6HG5Nk37TSQwfWInML-uPnu1oK2Sxl4AdlHdYIYxCU/s640/IMG_1023.JPG" width="640" /></a></div>
<br />
The probe was fabricated out of cold-rolled 1018 flat stock. The straps are aluminum, and the shanks of the tie-bolts are unthreaded so as to help maintain total yoke permeance. The sensor is soldered to a small bit of FR4 with a notch cut in it so that the narrow faces of the pole pieces can abut the sensor package directly. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnD54hsFPzyMMPWKeAZ9YnVMhWn_b6V9T3EefcX3qIdvm_2kIzkKZ4sRrSbFPO0daEjONHRN0UMRKc8PgmRaFk5jtcbaA4GCgmXz-Sr2YfUvJ9vMsDnk7nvAZ8MFSixXV0ks-O6hrbRfs/s1600/IMG_1012.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnD54hsFPzyMMPWKeAZ9YnVMhWn_b6V9T3EefcX3qIdvm_2kIzkKZ4sRrSbFPO0daEjONHRN0UMRKc8PgmRaFk5jtcbaA4GCgmXz-Sr2YfUvJ9vMsDnk7nvAZ8MFSixXV0ks-O6hrbRfs/s640/IMG_1012.JPG" width="640" /></a></div>
<br />
The sensor assembly is encapsulated in epoxy resin. One of the yoke poles was lined with kapton tape so that it could be freed from the cured epoxy. In this way, it can be pulled into alignment when the magnets are installed. Yes, that's an old PS/2 cord.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoa5L7eeVsg8dGHpC8UvpTgve1Be_mhuberr-fO7G-5-f5UaMkJTrtMEgXNYgxLa61p3Fqo-IVrqkRBfIAsu200CSk2rZWI75Si2rfEgipU7v7S6fC4UzYwJ9CWGrGwDQCXHtjQAI6kA/s1600/IMG_1013.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOoa5L7eeVsg8dGHpC8UvpTgve1Be_mhuberr-fO7G-5-f5UaMkJTrtMEgXNYgxLa61p3Fqo-IVrqkRBfIAsu200CSk2rZWI75Si2rfEgipU7v7S6fC4UzYwJ9CWGrGwDQCXHtjQAI6kA/s640/IMG_1013.JPG" width="640" /></a></div>
<br />
The operating faces of the yoke and sensor poles were all ground coplanar and then hand-lapped. Although it was really unnecessary, I also dressed the top faces of the yoke poles and the shunt bar. Everything is square with little chamfer, which makes it very uncomfortable to use considering how ridiculously strong it is. Due to their much higher intrinsic coercivity, NdFeB magnets don't really need a keeper shunt for the same reason an AlNiCo magnet would; still, it is needed to keep the probe's stray field from being a hazard to other equipment when it's not in use. When dealing with thick plates, placing the probe or removing it from work surface can be made easier if the shunt is kept in place temporarily. A design utilizing a diametrically-polarized cylinder magnet as in a switchable test indicator mount would obviate the need for a loose shunt bar, but It would complicate pole geometry, and i wasn't trying to make a marketable product.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidpAfC2G47jFCDY82zW9KHMADOs2WhYULd3m6CTjzpTMytUFdIRhAQ6sbuI61K9jCddv_pifw5qnBPBQrC4D6P1g7Wn0g4rgqPBuzVs_IA4kCG15-MG6IYh7O7-u0cX8xYuuV-GeJLXm4/s1600/IMG_1016.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidpAfC2G47jFCDY82zW9KHMADOs2WhYULd3m6CTjzpTMytUFdIRhAQ6sbuI61K9jCddv_pifw5qnBPBQrC4D6P1g7Wn0g4rgqPBuzVs_IA4kCG15-MG6IYh7O7-u0cX8xYuuV-GeJLXm4/s640/IMG_1016.JPG" width="640" /></a></div>
<br />
The test sample was made from 1x1/4" 1018 bar and includes a slot, a set of flat-bottom holes, and simulated crack features made using rod to plug cross-drilled holes. All these features are easily detected with the probe on the unmodified face of the bar. Even the 1/16" deep FBH is clear as day when probed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi01VKkVwWvrCJL4DwnxVaU7c8Bx4yVceRICurJw6J8q9fXUFiuXutGnNmXRuUPTT_kOgbrt2HEYTYPF0aAjhdSxaTJRVY3Q_1BAwA8DMmW_Ss13rfVR6HnhBywnODPYUrPdya8x1CvrXM/s1600/IMG_1978-2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi01VKkVwWvrCJL4DwnxVaU7c8Bx4yVceRICurJw6J8q9fXUFiuXutGnNmXRuUPTT_kOgbrt2HEYTYPF0aAjhdSxaTJRVY3Q_1BAwA8DMmW_Ss13rfVR6HnhBywnODPYUrPdya8x1CvrXM/s640/IMG_1978-2.JPG" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
After presentation, I really had no use for the thing. While I probably should have just donated it for class use, I ended up keeping it. Occasionally, I'll use it to check the air compressor tank or something. It's not really suited for measuring against curved surfaces, but it works well enough. Probably the biggest issue is that I can't expect work geometries to be known or consistent. Every test subject will be unique, and the most I can hope to find is a variation in permeance. Without a chance to calibrate the process to a particular application profile and geometry, I can't really quantify much.<br />
<br />
For sake of this blog post, I dragged an old air compressor tank off the scrap pile and mapped the bottom of the tank. The paper acts as a positioning guide and it also allows the probe to slide more easily over surfaces without abrasion on rust or stiction against paint. The map only covers one side of the tank because there's a weld seam on the other side of the centerline. It's enough to make the point. There's a 4" wide band of corrosion inside the tank, beyond which the leakage readings are almost constant save for variation caused by seating against a curved surface.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIF_njjjWHvknSyTViucNxx8Gu-bXEmtAU-5ZEoytLEfW7pEu_XnaP1Xe2113_q40IpWMr3dnozTGYQYF7G3eAQZFGG4VLcQB6i-YLgZGC4jljek7r7WYQXJ0VMXufXcDgK2brHstD0nE/s1600/IMG_20160925_240235_878.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIF_njjjWHvknSyTViucNxx8Gu-bXEmtAU-5ZEoytLEfW7pEu_XnaP1Xe2113_q40IpWMr3dnozTGYQYF7G3eAQZFGG4VLcQB6i-YLgZGC4jljek7r7WYQXJ0VMXufXcDgK2brHstD0nE/s640/IMG_20160925_240235_878.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsw5Vpa2R8S6-glMUJwBopF3nK3lxRyI9flSyRg1xfZwLaYIrjtIlEvGWXY-DJX-smun3vax0gv4YxDV14UQfH_8BHuUCE3B3cDjh3-CI27UMOe7ZZScQb3iAKMuGJ3Tma4nxbHe0tBNY/s1600/MFL_test_case.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsw5Vpa2R8S6-glMUJwBopF3nK3lxRyI9flSyRg1xfZwLaYIrjtIlEvGWXY-DJX-smun3vax0gv4YxDV14UQfH_8BHuUCE3B3cDjh3-CI27UMOe7ZZScQb3iAKMuGJ3Tma4nxbHe0tBNY/s640/MFL_test_case.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Of course, there are other ways to detect tank damage that's this bad. In fact, the change in permeance is large enough that it can be detected by sliding a similarly strong magnet along the surface and feeling the change in attraction force. Of course, it would have to be a strong pot magnet or something designed to make a closed low-reluctance flux path.<br />
<br />
Maybe someday I'll come up with a cool job for it to do. Until then, I guess this is about all the glory it'll get.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-75713133752636419662016-09-21T20:07:00.000-07:002016-09-22T00:43:26.647-07:00TV, LAN, & intercom over one cableThe buildings on this property have shared a single MATV system installed several years ago. This consists of two long RG11 drops and sundry splitters, taps, and amplifiers. Over the years, the system structure has changed several times. For many years before DTV conversion, music and security camera feeds were inserted into the network with modulators. Slowly, the modulators and processors were removed and all that remained was a simple antenna distribution system.<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/AVvXsEgx1YxQJZjniEg2MTb6c11F4SwU4rtzXd7ctzHuTII0ycsm-OqOs15Gb_anvHtRVQzfAVzXWJAKpbpvyRUzpoRB8797raCzIbS_DteRvZKkZsmASFRPLlMvpJ1q-kYz4HamklQp9NsX-J0/s1600/aaa.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="309" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx1YxQJZjniEg2MTb6c11F4SwU4rtzXd7ctzHuTII0ycsm-OqOs15Gb_anvHtRVQzfAVzXWJAKpbpvyRUzpoRB8797raCzIbS_DteRvZKkZsmASFRPLlMvpJ1q-kYz4HamklQp9NsX-J0/s640/aaa.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Property & Drop Map</td></tr>
</tbody></table>
<br />
The off-air TV/FM signal isn't the only thing shared between the buildings in the diagram. While the antenna is distributed from building A, the WAN connection is at building B. For years, building A has been linked to the computer network over wifi with the aid of directional antennas. Furthermore, buildings B and C share a voice intercom I'd discussed in a <a href="http://epicbeardquest.blogspot.com/2015/12/my-take-on-spare-phone-intercom.html">previous post</a>. This intercom was realized using a parallel drop of twisted pair cable. The recent goals were to extend the computer network to point C and to replace the deteriorated UTP cable used by the intercom.<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/AVvXsEisvbBNj6ByS755tme-_qbB35TQ1xKVWYL4j2vz9GwK3zqZrsTpxG205HQ-b6H23K3GpwZtJd_SQvqewL9IX0ud78HWOJUGhQvJlSFjmCGVm-mgtS5g_Xqo1wozW5CEbGyqftsPWAjyEUw/s1600/sdfne.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisvbBNj6ByS755tme-_qbB35TQ1xKVWYL4j2vz9GwK3zqZrsTpxG205HQ-b6H23K3GpwZtJd_SQvqewL9IX0ud78HWOJUGhQvJlSFjmCGVm-mgtS5g_Xqo1wozW5CEbGyqftsPWAjyEUw/s640/sdfne.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Network schematic between buildings B and C</td></tr>
</tbody></table>
<br />
While the wireless bridge to A works well enough, reaching C via wifi is difficult. There is restricted line of sight and the obstacles in the signal path are all large metal structures. While the 500' link can be established with makeshift waveguide antennas, I opted to try running it over the coaxial cable instead. While I'm sure there are legitimate solutions for running ethernet over coax, the products I saw were either too expensive or appeared to be misrepresented Thinnet adapters.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.asus.com/us/Networking/RTN12_D1/"><img alt="https://www.asus.com/us/Networking/RTN12_D1/" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJHdHC_qdL35qT9P379bh04KOVf2NWyIdmDsEYwiuBix3VQOw-wn4kuMr-ivKf7qerV8xquFAYIFsKrCxypCjvdv3wjz7VUulgC-mH5NIoVBEr-95SqZSqe5OzmH8o1SF2mTTucnsxir8/s320/3duPf7rV88XK2Gk3_500.jpg" width="320" /></a> </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.hollandelectronics.com/catalog/upload_file/DPD2.pdf"><img alt="http://www.hollandelectronics.com/catalog/upload_file/DPD2.pdf" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOJTvuMVfra9har2ft1w64AIrhMrxhIMIC9s0Ag0crHdoomVKdjOOdVIW_1xkox5v0Dyi_RNICWcXtsYRmuv7o_8GIRGF_BvHw7aGKO7xibe845HcfWI74TSgP4exiWsFXbdZwB9GjshY/s1600/4133fVAie-L.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Like usual, I used a low-cost and <a href="http://wifiovercoax.mcleodnet.com/">low-risk approach</a>. Parts should be inexpensive, common, and should have some secondary utility should plans change. Using two ASUS RT-N12/D1 router/repeater/AP devices, a 802.11g/n link was made over the coax. Satellite <a href="http://www.hollandelectronics.com/catalog/upload_file/DPD2.pdf">diplexers</a> are used to combine/split the 2.4GHz signal from the MATV signal. I made a simple adapter to connect the RP-SMA antenna port on the AP to the 75 ohm network. The adapter serves to adapt the dissimilar connectors, but it also uses a simple L-pad impedance matching network and a single capacitor as a DC block. The odd resistor values shown in the schematic are a product of convenience given my limited stock of SMD resistors. Simply put, 100R || 1K = 91R; 75R || 100R = 43R. I gutted some old CATV channel traps to use as enclosures. The RG316 cables with RP-SMA connector were stripped from old equipment. Signal strength at C is about -57dBm, which is about on par with what can be expected of the drop. The free antenna on the access point at B provides extended coverage to the shop and outdoor area. The free antenna on the access point at C provides wireless coverage for any mobile devices in the area. <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/AVvXsEibs2Vs5IcI3VxIgs7jMVGHWfW8A0_cHlBX4bxlHsOEPc6S2WRzfMzrrSxkIGxcr3xJdr4GD5va1ABOuCBXFPy8CJR6AEW_fp39SrshpibdzNBKhkgi23rxaCCXSxmEkjS0GDEsYpRiRkI/s1600/IMG_20160916_172707_882.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibs2Vs5IcI3VxIgs7jMVGHWfW8A0_cHlBX4bxlHsOEPc6S2WRzfMzrrSxkIGxcr3xJdr4GD5va1ABOuCBXFPy8CJR6AEW_fp39SrshpibdzNBKhkgi23rxaCCXSxmEkjS0GDEsYpRiRkI/s640/IMG_20160916_172707_882.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Inner strand damage caused by jacket cracking in UTP cable</td></tr>
</tbody></table>
<br />
The UTP drop used by the intercom was originally a bundle of scrap indoor cable pulled from a PBX somewhere. It was never expected to last outdoors for as long as it did. Eventually, the jacket deteriorated and the cable would become waterlogged. Due to the way the intercom is arranged, shunt conductance in the line does more than attenuate the voice signal; it causes the intercom to ring incessantly when on-hook. Numerous modifications were made to the previously detailed intercom in order to make it robust against these faults, but ultimately it's difficult to work with a line that has roughly 1 ohm shunt resistance when it rains<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://sonorastore.com/500.html"><img alt="http://sonorastore.com/500.html" border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfNOsXGfjudctKxEiTBv1aXFOeotFvd2yoSUJtacUNm5c3htYCsupR-zMq8zxrXbBgQsVG1kshtjDFkkjcfkbrKvRPdmGhrUutwno8C_vLGi_xX7Dn-0XPs8VtS3nJnJjlJWr2jTLYJf4/s320/hrfpi-2.gif" width="320" /></a></div>
<br />
The voice intercom project followed a similar course. Two <a href="http://sonorastore.com/500.html">power inserters</a> were used as diplexers to couple the voice and DC from the intercom. Again, as a matter of physical and electrical interfacing, I made a pair of low-pass filters with screw terminals to attach to the indoor portion of the intercom network. I felt that adding the LPF was prudent, as the DC path of the power inserters has a cutoff frequency of a few MHz. I didn't want stray RF interfering with anything. The LPF knee is set at about 20kHz, but in reality, it doesn't really matter so long as it encompasses the ~3.5kHz voice band allowed by the old telephone hardware. There are versions of these power inserters with additional DC port LPF filtering, but I have no idea what the cutoff frequency actually is. These may be an option and may avoid the need for external filters, but as with most things, if you're out to apply a product for an off-label use, you're going to have to perform some experiments. <br />
<br />
<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/AVvXsEgC-ZTEjOPJwijDXn6d6gW4UUx2XGPdxW2HA7OUOTVFyECDdnaBf-PNP-hNhP4sVCY-NzM_3XOGQUtf15Our6ZbUN8_qyQQsZv5C6awembE-I7LXGr67VaH89-1zAlCRUlQjPOINCmJ5Aw/s1600/IMG_20160830_203813_005.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC-ZTEjOPJwijDXn6d6gW4UUx2XGPdxW2HA7OUOTVFyECDdnaBf-PNP-hNhP4sVCY-NzM_3XOGQUtf15Our6ZbUN8_qyQQsZv5C6awembE-I7LXGr67VaH89-1zAlCRUlQjPOINCmJ5Aw/s640/IMG_20160830_203813_005.jpg" width="562" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LPF filters for intercom connection</td></tr>
</tbody></table>
<br />
It's worth noting that this change means that the intercom signal path is now sensitive to ground loops, whereas before the remote end of the UTP was floating. Attention has to be paid to grounding within the intercom base station and on the coax drop. In my installation, the DC side of the base station's power supply is floating. The coaxial drop has a hard ground at only one end. The far end at C is grounded through a TVSS diode. This breaks the ground loop created by the shield, but allows any surge currents to shunt to ground. I imagine two antiparallel diodes would work just fine as well. When all ground loops are opened, the intercom is remarkably clearer over the coaxial drop than it ever was over UTP. <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/AVvXsEi0QRvveBPFfzWJ42lNSgdAxp4y9vh4EV460v925H2AndTx7zoDhbxdAtCZ9QckmBddDEMTLxXgIEe4mkTm8h6GTk-_hdHb2iSehA-izuRhL5Fwt7BTEyJ5xgRMLMy24_Ka2Kb54bJEGVA/s1600/IMG_20160919_163231_757.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0QRvveBPFfzWJ42lNSgdAxp4y9vh4EV460v925H2AndTx7zoDhbxdAtCZ9QckmBddDEMTLxXgIEe4mkTm8h6GTk-_hdHb2iSehA-izuRhL5Fwt7BTEyJ5xgRMLMy24_Ka2Kb54bJEGVA/s640/IMG_20160919_163231_757.jpg" width="360" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Drop feed at B showing diplexers, fabricated adapters, and ground block</td></tr>
</tbody></table>
While the power inserters and diplexers are being used marginally beyond their specified bandwidth, they work well enough; after all, most of the fittings in the 2.4GHz path were only rated to 1GHz until the last few days. The components for this approach are inexpensive and easily obtainable. The details of the adapter construction are not terribly critical. It all works with an ugly simplicity that impresses me.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-26008681790591841422016-09-10T08:50:00.000-07:002016-09-10T08:50:12.471-07:00Casual Amusement With a RSN311W64While I was waiting on parts to <a href="http://epicbeardquest.blogspot.com/2016/09/exploring-sanyo-stk3122-iii.html">repair my Marantz</a>, I decided to scrap out a number of accumulated bits of equipment and loose PCB's. One of these items was a 2000-era Panasonic surround receiver with DVD player. I'd pulled it from service after it had slowly lost all audio output.<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/AVvXsEhw4lUQ6BXW2DRnntFYP2-vSQWZjVkW_91WdrOQ0DdNjQf9T6cdELO0oQpPmn7UF2FYULdHRyMNKNca4n37_168u4hrALI-nd6vj9A6y8vqXp-QbAsDb109R95sPTR0fP6ZnUmMeoZMlrQ/s1600/soniplay5vcd-01.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="218" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw4lUQ6BXW2DRnntFYP2-vSQWZjVkW_91WdrOQ0DdNjQf9T6cdELO0oQpPmn7UF2FYULdHRyMNKNca4n37_168u4hrALI-nd6vj9A6y8vqXp-QbAsDb109R95sPTR0fP6ZnUmMeoZMlrQ/s400/soniplay5vcd-01.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Panasonic SA-HT80</td></tr>
</tbody></table>
<br />
When I had first pulled it, I had intended to repair it. Upon opening the case and seeing heat damage to the paper-phenolic PCB around essentially every semiconductor, I decided it wasn't going to be worth the effort. I never bothered taking photos at the time, but disassembly was no longer possible without destroying things. The board interconnects were so stiff that the damaged PCB's broke apart like crackers. I amused myself by nudging transistors out of their fractured solder joints or peeling traces. I pulled a large selection of capacitors from the board. Out of about 50 capacitors, about 4 or 5 were not bad. Almost all were less than half their original capacitance or had ESR > 50 ohms. This included small electrolytics in areas of the chassis that were never abnormally hot. I don't think I've ever run across a piece of equipment that managed to degrade so completely and uniformly without any catastrophic failure.<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/AVvXsEgDuD95-3je2PYPo5wNnS-E3hh3AcLPQ1RRDqrvDZbjt6-d86fipX9kVr42WfRFzSni2d4HAg9wrH3xaE-Zo7vd-l_Y-ec4HPVtPIxJaeYwpPg_I3ySckQTEmKdYQO-2_LV7RWl1cum0F0/s1600/rsn311w64-panasonic%257E232441.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDuD95-3je2PYPo5wNnS-E3hh3AcLPQ1RRDqrvDZbjt6-d86fipX9kVr42WfRFzSni2d4HAg9wrH3xaE-Zo7vd-l_Y-ec4HPVtPIxJaeYwpPg_I3ySckQTEmKdYQO-2_LV7RWl1cum0F0/s320/rsn311w64-panasonic%257E232441.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Totally not my photo</td></tr>
</tbody></table>
<br />
I kept the transformer and I pulled the generic-looking RSN311W64 amplifier hybrid for later. That was then, so I guess this is later. Since I was pleased with my attempts to photograph the STK3122 in the last post, I figured I'd pull out the phone and fight autofocus for a half hour and get some half-blurry pictures.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsgIcb7SiGjFxI1WI294xqGJZ1GqGeLjyGB-FQ5qx-ZaoLVuVW4kPH0ClRSpy06byU6dqYzX9lBrF8m8tXh1m7fRFlI6gGlrSJi_02mzxRuKPqRF-VqPjdKt0XOa7O2_JKczm5Q0hOeZQ/s1600/IMG_20160909_084923_162.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsgIcb7SiGjFxI1WI294xqGJZ1GqGeLjyGB-FQ5qx-ZaoLVuVW4kPH0ClRSpy06byU6dqYzX9lBrF8m8tXh1m7fRFlI6gGlrSJi_02mzxRuKPqRF-VqPjdKt0XOa7O2_JKczm5Q0hOeZQ/s640/IMG_20160909_084923_162.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbDJVZpYqePcEC47geRYyoNoAycX2kEf_e2TvleinZCFRkV8cFs8gmnSsTnS8kLufjUKlIRMnppg_BIJ-ZQVwubszqST_mPsttv5jS8hsRSARhjpa6cq00Vrv8Jvcyuh8hPYnA3ge6RY/s1600/IMG_20160909_085134_215.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbDJVZpYqePcEC47geRYyoNoAycX2kEf_e2TvleinZCFRkV8cFs8gmnSsTnS8kLufjUKlIRMnppg_BIJ-ZQVwubszqST_mPsttv5jS8hsRSARhjpa6cq00Vrv8Jvcyuh8hPYnA3ge6RY/s640/IMG_20160909_085134_215.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim8UQ_-5d7Lhm3DODRc_aawtSvpBEiPHhqJ7nnu33CKl3K_9dmTvpVYuqrz-GaxQjlpx-xWO7mq-E4ueI2i8CzU5Cs577nfioQXlSU28LhZODjClFX0QAhO8L4-7kWWTXux4RNqtnI4H4/s1600/IMG_20160909_085159_057.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim8UQ_-5d7Lhm3DODRc_aawtSvpBEiPHhqJ7nnu33CKl3K_9dmTvpVYuqrz-GaxQjlpx-xWO7mq-E4ueI2i8CzU5Cs577nfioQXlSU28LhZODjClFX0QAhO8L4-7kWWTXux4RNqtnI4H4/s640/IMG_20160909_085159_057.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheNj2Jr2PcAMztG6M9rnUuj_XVAUK0Tg6im7F2kXOBpq-V1lmG1DwFTtvw01PpgU6D7oHMWW34KDcqv-emjIIXznXfICrHfsbFCxDrAjULNF3j7yIz5askSURlPsUqTkfd7g5Ehp-DPjM/s1600/IMG_20160909_085352_799.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheNj2Jr2PcAMztG6M9rnUuj_XVAUK0Tg6im7F2kXOBpq-V1lmG1DwFTtvw01PpgU6D7oHMWW34KDcqv-emjIIXznXfICrHfsbFCxDrAjULNF3j7yIz5askSURlPsUqTkfd7g5Ehp-DPjM/s640/IMG_20160909_085352_799.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvGrin8VyR5h04jBBS3PpbcSctRAOMty2rMhTKxs23Ya1CsrjD-NPaKjPOA2KkxaflGysHkIeiKgsRqSMbX4uLdWR5e_07IcEoEVLVS4q5bk0f6X3jHzhgJsZYiU28tOxsS7X6mdE7VK4/s1600/IMG_20160909_085516_680.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvGrin8VyR5h04jBBS3PpbcSctRAOMty2rMhTKxs23Ya1CsrjD-NPaKjPOA2KkxaflGysHkIeiKgsRqSMbX4uLdWR5e_07IcEoEVLVS4q5bk0f6X3jHzhgJsZYiU28tOxsS7X6mdE7VK4/s640/IMG_20160909_085516_680.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_65ZIH34ABkvBdhIY_Eic6d-pBCy02irTo-aJ70dNYFsjHu5cnE_vSarOVQneHpCIBf_5wnBibvPBf4RnfE1HdNE4V_OCStj27pvU8UNMdPmVe4iGkwdoPabwHoIm0wZIEiiwG5sIiGI/s1600/IMG_20160909_085528_267.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_65ZIH34ABkvBdhIY_Eic6d-pBCy02irTo-aJ70dNYFsjHu5cnE_vSarOVQneHpCIBf_5wnBibvPBf4RnfE1HdNE4V_OCStj27pvU8UNMdPmVe4iGkwdoPabwHoIm0wZIEiiwG5sIiGI/s640/IMG_20160909_085528_267.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyTYsYQzuOuI05ldkMef6aSyzrydClvj4sfjHkrswpflu2RFoAkxDjBd_pQkusiIOk_DJBpSiosgJ9MkMyechQv0wnq4zNDMWQa81YRm4LyAY_HnjY8nJtrv3VFezagW98KD0WS8r_ao/s1600/IMG_20160909_085547_553.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWyTYsYQzuOuI05ldkMef6aSyzrydClvj4sfjHkrswpflu2RFoAkxDjBd_pQkusiIOk_DJBpSiosgJ9MkMyechQv0wnq4zNDMWQa81YRm4LyAY_HnjY8nJtrv3VFezagW98KD0WS8r_ao/s640/IMG_20160909_085547_553.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhJMVwK56r0op2oiSfbtQNE1kGyiyfha70wEJFJMtXVLr1Lmd3Rynt0V7WDwHC2CdOZDR5dFyDwOiFD33PDUhAcTWEUUZnam0HkFZe0qXz6ca-J6Qvj7Ex_pK3gixv4Ktwmf1fd_OCQA/s1600/IMG_20160910_025349_874.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhJMVwK56r0op2oiSfbtQNE1kGyiyfha70wEJFJMtXVLr1Lmd3Rynt0V7WDwHC2CdOZDR5dFyDwOiFD33PDUhAcTWEUUZnam0HkFZe0qXz6ca-J6Qvj7Ex_pK3gixv4Ktwmf1fd_OCQA/s640/IMG_20160910_025349_874.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYxKanghRgc2QGAzXbusbeYOKoAxso7KkdMiydyHxB_B_UmpFlkhSrvo0lbQiMqO3ByHhT9hzzxZVKsKzbTBSqJ0tHh_C1wi8fYKzTZuyv8YTPXEV3Vg-O_Je99vrvEpgDiGB7qMLFmxI/s1600/IMG_20160910_025522_094.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYxKanghRgc2QGAzXbusbeYOKoAxso7KkdMiydyHxB_B_UmpFlkhSrvo0lbQiMqO3ByHhT9hzzxZVKsKzbTBSqJ0tHh_C1wi8fYKzTZuyv8YTPXEV3Vg-O_Je99vrvEpgDiGB7qMLFmxI/s640/IMG_20160910_025522_094.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRl8KzrmST7YUOK3lM_q1-csKX55Ly4m2E-I4hLvKQZhARXmyDLmSYXz_gZxrsG8gnmf5e54o87WFHgXd-7q9Io3cO2TH2OljrnK2b2BZJy-wOzrDCaZrHLSBKaFYj5PtbDQqt2dkQ_xQ/s1600/IMG_20160910_025757_208.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRl8KzrmST7YUOK3lM_q1-csKX55Ly4m2E-I4hLvKQZhARXmyDLmSYXz_gZxrsG8gnmf5e54o87WFHgXd-7q9Io3cO2TH2OljrnK2b2BZJy-wOzrDCaZrHLSBKaFYj5PtbDQqt2dkQ_xQ/s640/IMG_20160910_025757_208.jpg" width="640" /></a></div>
<br />
Let's pretend it's artistic. If you aren't afraid of translating things, there are <a href="http://www.155la3.ru/rsn311w64.htm">other dissections</a> out there that had the benefit of more suitable tools.<br />
<br />
As a bonus, I disassembled a Motorola SRF397 transistor and took a couple pictures. It's not terrible considering it's handheld photography with a phone.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2bceR1-SuJ7xow7gyKiEyz99HuR6nPJcakSKCqAvNlT05z8ZTDjuWsZiyfo8UX4JkeJWYAV2pkt78fa8O16c0XHhwh8EFTGldk-XkLxRwlb86xZwE1N6GITAmFV_nZPkjsFuaKtv93CA/s1600/IMG_20160910_031314_839.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2bceR1-SuJ7xow7gyKiEyz99HuR6nPJcakSKCqAvNlT05z8ZTDjuWsZiyfo8UX4JkeJWYAV2pkt78fa8O16c0XHhwh8EFTGldk-XkLxRwlb86xZwE1N6GITAmFV_nZPkjsFuaKtv93CA/s640/IMG_20160910_031314_839.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PciG4Vv3d4UJkL1klJY8lE9Jkvg6fT-u5IuXfkqp2nG9yuKuvKYLDTdz9Y98e-EYDHJsYUKO5ENmTUroFmlqzzJSCU2tr6p2F2tGkJ1uP0_FWhA-XgFNmhjnh0gQ7gyMz6nZKwvZhRU/s1600/IMG_20160910_033418_785.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PciG4Vv3d4UJkL1klJY8lE9Jkvg6fT-u5IuXfkqp2nG9yuKuvKYLDTdz9Y98e-EYDHJsYUKO5ENmTUroFmlqzzJSCU2tr6p2F2tGkJ1uP0_FWhA-XgFNmhjnh0gQ7gyMz6nZKwvZhRU/s640/IMG_20160910_033418_785.jpg" width="640" /></a></div>
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-27579571696773278112016-09-01T08:05:00.001-07:002016-09-02T14:34:50.723-07:00Exploring the Sanyo STK3122-IIIAs part of my routine management of perpetually failing appliances, I once again found myself repairing my <a href="http://www.chrisinmotion.com/MyFavoriteReceivers2.htm">Marantz TA170AV</a>. Fully suspecting the failure, and recalling that I'd mentioned it in passing once before, I figured I would approach the repair with a mind to be a bit more analytical.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcuwryhETnRDox-BtuX6X9ZxXoJsPH5YauZJvzDIyPRulgfHxOFpP7avo30ojfAXsUy7-aLLJwDJqjP3DcxvZpLxxlqTD5YrzTXOVIRoOL-SE-oPfIcTy95DybXW2kNEjsoQB_lDYlo_Y/s1600/IMG_20160901_093439_100.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcuwryhETnRDox-BtuX6X9ZxXoJsPH5YauZJvzDIyPRulgfHxOFpP7avo30ojfAXsUy7-aLLJwDJqjP3DcxvZpLxxlqTD5YrzTXOVIRoOL-SE-oPfIcTy95DybXW2kNEjsoQB_lDYlo_Y/s640/IMG_20160901_093439_100.jpg" width="430" /></a></div>
<span id="goog_482362677"></span><br />
<br />
This receiver came to me years ago after suffering a slow degradation of output power over the course of months. The original owner endured the loss of one channel and then the next before gifting it to me in the traditional manner. What better way to reduce the regret of discarding a failed investment in equipment than to let it disappear into the life of that techno-hobo friend of yours? At the time, I merely traced out the signal path and found that the STK3122 amplifier module was dead. I replaced it with a part from a repair shop, and all was well.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiwihlr6m1OqWowWqd9BCYqe_FEwTcWJnPipw_bt27r8VXLoKBEebENmEOE5LA2R8Tr3-04xF-3xFQvpZ7fClsoabyCDTTFbwvlNOKxddCfUPAu9RH55M2HiHiylzTxXI_2BarzhUt1TA/s1600/s-l1600.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiwihlr6m1OqWowWqd9BCYqe_FEwTcWJnPipw_bt27r8VXLoKBEebENmEOE5LA2R8Tr3-04xF-3xFQvpZ7fClsoabyCDTTFbwvlNOKxddCfUPAu9RH55M2HiHiylzTxXI_2BarzhUt1TA/s320/s-l1600.jpg" width="320" /></a></div>
<br />
The unit sat unused for nearly a decade before I dragged it out and put it into service. After about a year or so of mild use, I began to get noise in one channel intermittently. The noise would follow in the wake of salient bass excursions, almost like a bad volume pot, speaker switch or other poor connection. I frustrated myself with trying to fix connections before I noticed the crossover distortion getting significantly worse. At that point, I pulled the unit apart and checked the biasing. Sure enough, the STK3122 was at fault again.<br />
<br />
In the course of looking for a replacement, I began to question what I should expect. I know that counterfeit parts exist, and I had bought the replacement from a domestic brick & mortar store, so I assumed I was in possession of two vintage modules which had failed in nominal operation. Was there some issue with <a href="http://epicbeardquest.blogspot.com/2015/05/hybrid-ics-always-make-interesting.html">device degradation</a> over time (metallurgical, thermomechanical, or environmental factors) which would make vintage parts inclined to be less reliable? I bought two replacements: one was a used vintage part, and one appears to be a NOS vintage part. Once more, I replaced the module and everything worked.<br />
<br />
Out of curiosity, I decided to see if there was anything to be seen inside the module packaging. The <a href="http://www.alldatasheet.com/datasheet-pdf/pdf/89810/SANYO/STK3122.html">datasheet</a> provides an internal schematic, so maybe if there were indications of a failure cause, there may be an indication of what to expect of replacement part reliability. <br />
<br />
<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/AVvXsEiJqQOGFxsPOcF0SuR8z-pbf7kGpfuB3wrOvp87A1798RxOpcsEQzMttYSBbZvyyyoGQYNrG6cRy1StaYOxEaL13wrshoeK0igADDbHh1osgomy2EupEc1Rb0_kSsJZe81ODBIdvXG37VU/s1600/stk3122-orig1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="584" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJqQOGFxsPOcF0SuR8z-pbf7kGpfuB3wrOvp87A1798RxOpcsEQzMttYSBbZvyyyoGQYNrG6cRy1StaYOxEaL13wrshoeK0igADDbHh1osgomy2EupEc1Rb0_kSsJZe81ODBIdvXG37VU/s640/stk3122-orig1.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Note lead width and exposed substrate insulation near pin 16</td></tr>
</tbody></table>
<br />
Starting with the original part I'd stripped from the unit years ago, I simply used a spudger and a lacquer thinner bath to remove the nylon device cover and reveal a beautiful hybrid circuit consisting of wire-bonded bare dice and printed film resistors. I traced out the circuit and matched it to the schematic. It's interesting to note that this layout includes the 470 ohm resistors and pads for capacitors which would allow the external compensation networks described in the datasheet test circuit to be built internally. I'm not sure if there was ever a family of part cousins which made use of these internal features. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj14qefDJMTLQj29FuRmAMJPY-e9z2hDnO4ltGiwrSAYFUMaZn6F30C_tZScW89qLaqhKVWM1QqPS9InzMHu7roUGs1G9e0V8qW1fBnMFcPD4KMMF5YJWiC7ej-XnC3mQpxCZYa_hNy4go/s1600/stk3122-layout.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj14qefDJMTLQj29FuRmAMJPY-e9z2hDnO4ltGiwrSAYFUMaZn6F30C_tZScW89qLaqhKVWM1QqPS9InzMHu7roUGs1G9e0V8qW1fBnMFcPD4KMMF5YJWiC7ej-XnC3mQpxCZYa_hNy4go/s640/stk3122-layout.jpg" width="532" /></a></div>
<br />
As can be seen, the bias resistors R9/R18 appear to be scratched. On closer inspection, both resistors were open-circuit. The top silkscreen layer over the resistive material has multiple fine cracks across it, and the conductive material is broken along two narrow cracks which show evidence of local heating. Assuming no external circuit factors could induce this within the scope of its rated bias point, this suggests any number of things that could be at play. Quiescent power dissipation of the package is on the order of 3W. These things run fairly hot without a heat sink. The observed cracks could merely be a cumulative effect of heat causing material shrinkage or degradation in a static sense. The dynamic effect of substrate expansion could also <a href="http://www.seas.harvard.edu/hutchinson/papers/462-5.pdf">stress these resistors</a>. Once cracks begin to form in the conductive printing, current crowding at the partial connection will only result in localization of resistor power dissipation and further localization of its degradation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYucKsTkZ7uMO28r5W3DfiNVP0LGqnZojJUZG4p48GiHmFKFI6bN5z3iM0GtswKKaLBoUwrJR_u7h7WSXVPTwPfwMkfIXYWURNhjuNutXfgErE_Knh2Qv-aHJNJ-yRs5Dhv7r-ZPdmyaY/s1600/IMG_20160901_244553_799.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYucKsTkZ7uMO28r5W3DfiNVP0LGqnZojJUZG4p48GiHmFKFI6bN5z3iM0GtswKKaLBoUwrJR_u7h7WSXVPTwPfwMkfIXYWURNhjuNutXfgErE_Knh2Qv-aHJNJ-yRs5Dhv7r-ZPdmyaY/s640/IMG_20160901_244553_799.jpg" width="640" /></a></div>
<br />
That's my theory anyway. I still had a second part to dissect. Unlike the first one which had two completely dead channels, the recent failure had one good channel and a partially failed channel. I was hoping to be able to compare the results and see if I could determine the original value of R9 and R18. Maybe I could even demonstrate a repair!<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/AVvXsEhi6333LlpSBhJ2Ryhyphenhyphen31AAlFpjfkJmLY-e6p7lY_s2D7KxSI7U9jPlvM42iJoL_LSB-RJMAoJGbl4Bdl4P3ZZEnDS1Wfj_FuCxDBpGEXND2adIZni4I-Iaw663XSq619RtHT09uqNGmLU/s1600/stk3122-fake1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="512" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6333LlpSBhJ2Ryhyphenhyphen31AAlFpjfkJmLY-e6p7lY_s2D7KxSI7U9jPlvM42iJoL_LSB-RJMAoJGbl4Bdl4P3ZZEnDS1Wfj_FuCxDBpGEXND2adIZni4I-Iaw663XSq619RtHT09uqNGmLU/s640/stk3122-fake1.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Note lead profiles and lack of substrate connection</td></tr>
</tbody></table>
After some soaking and picking and prying, I eventually got the second module apart. Much to my surprise, it had been a counterfeit part all along. The entire module is constructed from SMT chip resistors and SOT-23-3 parts. Obviously, none of this will help us determine part values in a legitimate Sanyo part. In the process of disassembly, I had noticed that the leads seemed terribly easy to bend. When I had tested this module in a breakout board, I had similar issues. Before long, the leads started peeling off, revealing the dark copper underneath. Most of the leads on the part show similar signs of plating/solder failure. I am not sure that this isn't the only thing wrong with the part. The part had demonstrated faulty output bias when in-circuit, but my tests with the part on a breakout board were varied. If I weren't lazy and worried about abusing the receiver's PCB, I'd fix the leads and reinstall it for a test. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ktsMn5HHcXvMySi-6OeqFhUmYvveMtH7JunKNYM86dZIZKRNvWo0VGDcZ2v7ldDsdVGgaQQDLTgxlzubaanbyHBjILHRkdbLNhGCIlloD-IC60dGPf6QAnEuM5tQZ1C9lS49u8NNMr8/s1600/IMG_20160901_244412_721.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ktsMn5HHcXvMySi-6OeqFhUmYvveMtH7JunKNYM86dZIZKRNvWo0VGDcZ2v7ldDsdVGgaQQDLTgxlzubaanbyHBjILHRkdbLNhGCIlloD-IC60dGPf6QAnEuM5tQZ1C9lS49u8NNMr8/s640/IMG_20160901_244412_721.jpg" width="640" /></a></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/AVvXsEgKzrLfranABbWl_8ceEssIxeT467G9qwao_4teTuYhe8nk5zZgYE_aU5t3rlSQaiwP2YXRfrOyCRLJC0qCHNhKcS_XbS67wCEF6F-pQszruxn8-nvPrdLg9k1HD4tYZ9XkCxq7HU38chE/s1600/IMG_20160901_010423_386.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKzrLfranABbWl_8ceEssIxeT467G9qwao_4teTuYhe8nk5zZgYE_aU5t3rlSQaiwP2YXRfrOyCRLJC0qCHNhKcS_XbS67wCEF6F-pQszruxn8-nvPrdLg9k1HD4tYZ9XkCxq7HU38chE/s640/IMG_20160901_010423_386.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">More delaminated leads</td></tr>
</tbody></table>
I need to emphasize what pictures like this reveal. What you're looking at are copper leads which are mechanically socketed into form-fitting solder fillets, but not necessarily electrically connected to them. The electrical continuity between the soldered areas on the PCB and the component MCPCB may be made via intermittent semiconductive contact between copper oxides and/or intermetallics, or it may be relying on the cross sectional area of the plating alone. Just because the leads don't wiggle around and fall off doesn't mean a reliable electrical connection exists.<br />
<br />
The schematic of the fake is identical to that shown in the original datasheet,
though all the values are different. All PNP transistors are MMBT5401
parts; all NPN transistors are MMBT5551 parts. These are rather common
general purpose 160v transistors. The diode pairs are BAV99 parts.
It's noteworthy that all the parts in the counterfeit could easily be
replaced.<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/AVvXsEj54J5BZqadOl0KQxI3m-noElDZTWGHPtFkh9HnDibYxcPfuEN2SPle5cEOL2t0U12c0TQdp4w_rP3hlWPN0GQXO6mxqjobIUXmYyFUsJpiFyXDuO96trFkEJfxUJNvgKQ7DzSqqNenWSA/s1600/boardmap.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj54J5BZqadOl0KQxI3m-noElDZTWGHPtFkh9HnDibYxcPfuEN2SPle5cEOL2t0U12c0TQdp4w_rP3hlWPN0GQXO6mxqjobIUXmYyFUsJpiFyXDuO96trFkEJfxUJNvgKQ7DzSqqNenWSA/s640/boardmap.jpg" width="640" /></a></div>
<br />
I had to
question how this handful of 0805 chips and SOT23 packages can
comfortably dissipate a total of 3W. For the moment, let's disregard the MCPCB and try a sanity check. Assuming a limiting dissipation of 200mW per part, the module could dissipate >7W. Of course, power isn't dissipated across all components equally. I decided to take a look at the circuit and see if I couldn't come up with a better idea of the distribution of power in steady state.<br />
<br />
I recreated a single channel in LTSpice and set an approximate bias point by adjustment of a dummy load with null input. When the dummy load sets the output differential voltage to match the application schematic, the total channel dissipation matches the observed dissipation of the module. Checking the estimated component dissipation, a few things of note stick out. Q1, Q2, and their counterparts in the other channel are operating around 80mW. Output transistors Q7, Q8 and the counterparts are operating at around 400mW. R9 and R18 are dissipating about 300mW each.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEialEVzrvZzUywopMb2XD-YGKgXrmYGIdBZwYv0SfOzvp3hs8OWTx3HIKjH4eYvgvG3s3eMXsOnSSaQwkLr8uvVXcfaHFppXwlxkoo2MVaSEryqBLtLZ5CbncqUYYJRnSMkmceuuFzRDx8/s1600/simulation.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEialEVzrvZzUywopMb2XD-YGKgXrmYGIdBZwYv0SfOzvp3hs8OWTx3HIKjH4eYvgvG3s3eMXsOnSSaQwkLr8uvVXcfaHFppXwlxkoo2MVaSEryqBLtLZ5CbncqUYYJRnSMkmceuuFzRDx8/s640/simulation.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Keep in mind that this is just a halfass simulation with a simplified equivalent external circuit. I fully accept that this could be inaccurate, but it falls in line with what would be expected. Q7, Q8, and their counterparts will be the transistors with the highest dissipation. The physical construction of the genuine hybrid part suggests this, and it's not like we can expect transistors like Q3, Q4 to contribute any significant fraction to the observed module power.<br />
<br />
Considering Rth(j-s) values published for 0805 chips on multilayer PCB's with ground planes, 300mW on R9 and R18 doesn't seem too terrible. The MCPCB should give these parts a lot more headroom than the worst-case values (~125mW) on a datasheet. Then again, we have no idea what sort of value drift will occur. The parts on the disassembled module are well within tolerance still.<br />
<br />
Assuming it's an accurate estimation, the high dissipation on the output transistors might be of more concern. Nominal power rating for these devices is going to be somewhere around 350mW. This assumes minimal traces and pcb thermal conductivity. Without a thermal resistance model for devices on a MCPCB, I simply assumed the substrate temperature is constant at 70dC. This is higher than the observed temperature when operating without a heat sink. Using a figure of 130K/W for Rj-c and a handwavy 10K/W for Rc-b, maximum allowable power within a 150dC junction temperature limit is somewhere around 600mW. This is only a bit more than the highest figures for allowable package dissipation on multilayer boards. These parts may be fine operating at 400mW, especially if the substrate has a heat sink attached. <br />
<br />
Of course, the thermal analysis says nothing about whether the counterfeit circuit can meet its specs in terms of noise, distortion, etc. Although I may revisit it, I haven't bothered with much component-level testing of the fake. I could put together a power supply and see if the quiescent dissipation follows the estimation. I could pull the transistors in question and test them off-board to make sure they haven't been destroyed. I may update this if I do anything more, but I'm inclined to believe that the fake was simply suffering from contact issues at the lead terminations. <br />
<br />
While dissecting the fake doesn't help us better understand the original Sanyo part's internals, it does offer some information that will help make counterfeits identifiable. There may be more than one breed of counterfeit out there, but I have been able to identify current Ebay listings which match this particular type. Also, <a href="http://www.diyaudio.com/forums/parts/268473-fake-stk3152-stk3102.html">this forum thread</a> features the dissection of a fake STK3102 which matches these indicators.<br />
<ul>
<li>The counterfeit appears to have a facility to allow pin 8 to be bonded to the aluminum substrate, although in the example I have, there is no substrate connection at all. Counterfeit parts may lack continuity between pin 8 and the aluminum substrate.</li>
<li>The leads of the original Sanyo part are an iron alloy (magnetic), whereas the counterfeit leads are nonmagnetic. </li>
<li>The original leads also have a sheared shoulder near the package connection. In the photos, it's easy to see that the leads are slightly wider near the bend. The leads on the counterfeit are formed differently and have a uniform width. </li>
<li>It's also worth noting that any legitimately NOS parts will likely have heavily tarnished lead plating. It's not a sure thing, but shiny beautiful leads are an indicator. If you're buying a pulled part, who knows what kind of shape the leads will be in.</li>
<li>The orange substrate insulation of the genuine part is visible through the lead apertures in the molded plastic shell. This is particularly easy to see in the empty opening for pin 16. The counterfeit part is just a MCPCB and simply shows bright green solder mask everywhere. </li>
<li>Finally, the easy way to spot some fakes is as simple as looking at the date/lot code on the front of the part. The counterfeit part I disassembled has a code 5302. Checking Ebay, I can find at least two "Genuine Vintage NOS" parts which have green solder mask, shiny leads, and a 5302 date code.</li>
</ul>
Ultimately, it's up to you whether the counterfeit parts are worthwhile. Like I've commented <a href="http://epicbeardquest.blogspot.com/2014/10/how-to-destroy-fake-fotek-ssr.html">before</a>, I'm not against inexpensive <a href="http://epicbeardquest.blogspot.com/2015/06/the-journey-never-ends.html">parts</a> in general, but if the part can't be trusted to meet its implicit specifications, its utility is severely limited. I'm wary of the allowable power dissipation of the MCPCBA-type counterfeits, but I'm also worried about thermomechanical stresses in genuine hybrid parts. In either case, I do suggest using a <i>mechanically-supported</i> heat sink on these parts. Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-5851332800128256308.post-12524564712038800752015-12-09T09:57:00.000-08:002015-12-19T14:55:26.762-08:00My take on the spare phone intercomThere are <a href="https://www.google.com/search?q=telephone+intercom&gws_rd=ssl">numerous</a> tutorials online outlining methods of using landline telephones to make simple <a href="http://www.epanorama.net/documents/telecom/telephone_intercom.html">intercom</a> systems. While all that's really necessary to provide a talk current is a 9v battery and a resistor, ringing or otherwise signaling a call prompt to a remote station is often beyond the scope of simple designs. About a decade ago, I put together an intercom system between the shop and the house; since I had to do some service to it recently, I figured I'll write a thing about it. <br />
<br />
The design is similar to the second circuit described <a href="http://www.epanorama.net/documents/telecom/telephone_intercom.html">here</a>. Picking up one phone causes the buzzer at the opposite station to sound. Once both phones are off-hook, the buzzer stops. My design changes are based around a lower voltage power supply, demonstrating that the design is certainly flexible. The station phones can be any sort of landline phone: cordless, electronic, or just an old dumb rotary made 80 years ago. Use twisted pair for the link cable. Length is not likely limited in your application. I'm using about 200 yards of cable between stations. Any attenuation can be compensated by adjusting R3 to compensate (trim to about 25mA off-hook).<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/AVvXsEiVxtmQBc90AyfE1d-7fi28PDpj_SsxRz_z4ZYp_O4et8NfT27rrp5tp5fkWE3JntDiaP-5-yKh4E2y8ep6GchQ1CRgrHANsQaKRKsMyuU8z7Ml0Al3XeqgjEIg_0FWcc4IWGzGfeysEYQ/s1600/batphone.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="450" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVxtmQBc90AyfE1d-7fi28PDpj_SsxRz_z4ZYp_O4et8NfT27rrp5tp5fkWE3JntDiaP-5-yKh4E2y8ep6GchQ1CRgrHANsQaKRKsMyuU8z7Ml0Al3XeqgjEIg_0FWcc4IWGzGfeysEYQ/s640/batphone.png" width="640" /></a></div>
<br />
The buzzers are self-oscillating <a href="http://www.ebay.com/itm/Set-of-6-Continuous-Sound-Piezo-Buzzers-IC-Alarm-12V-/201481555495?hash=item2ee93c8e27:g:tHMAAOSwkZhWRrg5">piezo buzzers</a>. The ones I'm using begin oscillating at about 1.5v, and as with many buzzers of this type, they can be tuned by placing a reflector of some sort at an adjustable distance in front of the aperture (I just used a tab of thin aluminum sheet). This improves buzzer volumes at low voltages. With higher supply voltages (24v), this may be less necessary.<br />
<br />
Resistors R2 and R4 are used to reduce sensitivity to leakage currents or induced voltage in a long or heavily weathered link cable. Without these bleeder resistors, a waterlogged outdoor cable or a long run of untwisted cable may result in the local station occasionally beeping weakly when both phones are on-hook. To see why, note that the two station networks form a series voltage divider. Any shunt conductance in the line tends to bias this voltage divider such that the local station is closer to its zener voltage than the remote station. Since a telephone is essentially open circuit when on-hook, the divider network is very sensitive to even small shunt conductances. Adding bleeder resistors diminishes the influence of such system defects. For short indoor runs, they are likely unnecessary. <br />
<br />
Switches S1 and S2 allow the station phones to function as regular landline phones. Leaving the phone switched to the phone line does not prevent an intercom call prompt from being received. This connection can be omitted if no landline service is desired.<br />
<br />
Capacitors C1 and C3 allow the remote buzzer tone to be heard from the calling station. C2 is for supply bypass. The LED can be omitted if undesired. Use whatever power supply is handy; talk current is only 20-30 mA. I simply used the power supply that was already in the equipment I stripped for the enclosure.<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/AVvXsEiOrFqq9SxTEobXjoOJ0nVsfwNYZ2TyJ7p2XLTxckRZZwE6P9zn6lGNVRWTZpg61T2xlA5zpjyH5SnGwJb9D3gBQzy_7hziVBhpIkJD3Z1ZCYWUifww04tuCPrVwR3oTmMePX5_np91GOA/s1600/2015-12-09_11-50-39_793.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOrFqq9SxTEobXjoOJ0nVsfwNYZ2TyJ7p2XLTxckRZZwE6P9zn6lGNVRWTZpg61T2xlA5zpjyH5SnGwJb9D3gBQzy_7hziVBhpIkJD3Z1ZCYWUifww04tuCPrVwR3oTmMePX5_np91GOA/s640/2015-12-09_11-50-39_793.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The local station in a repurposed <a href="http://www.d-co.com/Qingen%20Manual.pdf">QINGEN</a> enclosure (and a 1941 <a href="https://www.oldphoneworks.com/no.-2-wall-phone-brown-version.html">Uniphone</a>)</td></tr>
</tbody></table>
<br />
Again, this article is not unique. Perhaps the one thing I can offer is the fact that this as-built design does function over long distances, with various phones, and for over a decade. That's more than a 9v battery design will provide.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-49651342450230608262015-11-14T05:49:00.000-08:002020-03-27T12:01:19.930-07:00The problem with finding boundary chroma in CIELABPreviously I had mentioned the use of CIELCHab and <a href="https://www.hsluv.org/">HuSL</a> for <a href="http://epicbeardquest.blogspot.com/2015/11/exploring-color-blend-mode.html">image blending</a> and adjustment. Whether using LCH or a HuSL method, my approach to these operations requires the knowledge of the maximum chroma of the sRGB gamut as a function of L and H. This isn't a simple task in CIELAB.<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/AVvXsEh6PVjYnjhBXOEz7NoGH86MJiekalkUZRHKcfRDPHYYg1-KOfsdxkv8e_s7YIEsAPMY-Q-r1s6AAjxXkB23VBA139c0nK5MMrWTSaTHK3FxnfYdl5-OfdbzAxd8xJbvi1KxFt4e5adtclQ/s1600/volumes.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6PVjYnjhBXOEz7NoGH86MJiekalkUZRHKcfRDPHYYg1-KOfsdxkv8e_s7YIEsAPMY-Q-r1s6AAjxXkB23VBA139c0nK5MMrWTSaTHK3FxnfYdl5-OfdbzAxd8xJbvi1KxFt4e5adtclQ/s640/volumes.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The extent of sRGB in CIELUV (left) and CIELAB (right)</td></tr>
</tbody></table>
<br />
To see why it's problematic, let's start with an existing method. The reference implementation of HuSL uses LCHuv (CIELUV) as the parent space instead of LCHab. The idea is the same. For the L and H of a given pixel, we can calculate the maximum chroma for the purpose of normalization and clamping. The approach used here is to simply calculate six boundary curves representing the intersection of the RGB gamut faces with the plane of constant L containing the given pixel. The rest is the calculations of line-line intersections and distance minimization.<br />
<br />
<pre class="brush:matlab;">function Cout=luvboundcalc(L,H)
% this function uses the method used by the other implementations
% of HuSL in LUV
Axyz=[3.240454162114103 -1.537138512797715 -0.49853140955601; ...
-0.96926603050518 1.876010845446694 0.041556017530349; ...
0.055643430959114 -0.20402591351675 1.057225188223179];
ka=903.2962962962963;
ep=0.0088564516790356308;
ref=[0 1];
Cout=ones(size(L))*realmax;
Hradians=H*pi/180;
sinH=sin(Hradians);
cosH=cos(Hradians);
sub1=(L+16).^3/1560896;
mask=(sub1>ep);
sub2=sub1;
sub2(~mask)=L(~mask)/ka;
for r=1:3;
row=Axyz(r,:);
a1=row(1);
a2=row(2);
a3=row(3);
top=(11120499*a1 + 11700000*a2 + 12739311*a3)*sub2;
rbot=9608480*a3 - 1921696*a2;
lbot=1441272*a3 - 4323816*a1;
bot=(rbot.*sinH + lbot.*cosH).*sub2;
for k=1:2;
C=L.*(top - 11700000*ref(k))./(bot + 1921696*sinH*ref(k));
mask=(C>0 & C<Cout);
Cout(mask)=C(mask);
end
end
Cout=min(Cout,175.2);
end
</pre>
<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/AVvXsEga647KvOrrWCvlPForQ-cpGqmMV-eRdpqadojZzuCh11aFyZt_k_wQJMhBjXPPeac_3LrH1WfGtn_PhzmIzYNK_1YJ9wNJYZMONufqiLWX6A-N-Em5FYrElLZXxLZ8OnK3SAHZJ8CWqm8/s1600/luvslice.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga647KvOrrWCvlPForQ-cpGqmMV-eRdpqadojZzuCh11aFyZt_k_wQJMhBjXPPeac_3LrH1WfGtn_PhzmIzYNK_1YJ9wNJYZMONufqiLWX6A-N-Em5FYrElLZXxLZ8OnK3SAHZJ8CWqm8/s640/luvslice.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Chroma map for CIELUV at L=75 showing linear boundary curves</td></tr>
</tbody></table>
Although one might not suspect it at first glance, the level curves of this odd shape are indeed straight lines, and the described method works well. We can calculate the maximal chroma for every pixel and use it to normalize or truncate an image in whole, or we can precalculate a lookup table if it makes things quicker.<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/AVvXsEickPnHfLaQNzcp5XpjKIBDCvYV5YnBbNsXcuOW7W6LrGnrjZsQXHcBhICgvRMjhv2e7g3u8x4rcHyf9EgraZuE_2KUxi_t-uqRftDwgRbJyvsw6vWnBOvVAki4McAKV5oO-HarSOAjv7o/s1600/luvlut.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEickPnHfLaQNzcp5XpjKIBDCvYV5YnBbNsXcuOW7W6LrGnrjZsQXHcBhICgvRMjhv2e7g3u8x4rcHyf9EgraZuE_2KUxi_t-uqRftDwgRbJyvsw6vWnBOvVAki4McAKV5oO-HarSOAjv7o/s640/luvlut.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The lookup table data for CIELCHuv</td></tr>
</tbody></table>
Discussion of HuSL <a href="https://news.ycombinator.com/item?id=9711236">elsewhere</a>, and my own idle curiosity had to question why there was no implementation in LCHab. Maybe I don't know enough about why it would be a dumb idea, but I like the symmetry of having both options. Besides, if I want to do LCHab>RGB conversions, I'd want such a bounding method for the purposes of truncation anyway; again, maybe I just don't know enough.<br />
<br />
Very quickly after trying to produce my own HuSL method in LAB, I had to wonder if the choice of LUV was in part a matter of convenience. Unlike LUV, the level curves and meridians of the projected RGB cube are not linear. Could we break this problem up by angle intervals and create a piecewise solution? That's a bit problematic, as the face intersections don't lie neatly on a curve of constant H. It would be a game of finding interval endpoints which straddle the face intersections, calculating an excess of data and then minimizing. I start to question whether this will be costly. <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/AVvXsEhOCC4TnZzrvLX4qSKD3WbPkkcjwvdVmDrET-JLshC37dj6K27eiUIYEibnF_QLFetuGl97W5l_HU9rOnKz7Kpm1uqR511a4_p2nWMZtOqlv7zk4xwVJ-8s5Zyfou1o1OcSGjvhASF1n6c/s1600/labslice.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOCC4TnZzrvLX4qSKD3WbPkkcjwvdVmDrET-JLshC37dj6K27eiUIYEibnF_QLFetuGl97W5l_HU9rOnKz7Kpm1uqR511a4_p2nWMZtOqlv7zk4xwVJ-8s5Zyfou1o1OcSGjvhASF1n6c/s640/labslice.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Chroma map for CIELAB at L=75, showing nonlinear boundary curves</td></tr>
</tbody></table>
In the process of trying to shove the LAB>RGB conversions through a solver to find a boundary curve equation, I noticed something. At points near the yellow corner, the boundary function can't be solved as a simple function of H and L. In simple terms, at these points there exist multiple solutions for the R=1 curve, and contrary to the required solver behavior when handling solutions from multiple curves, we want the <i>maximum</i> solution.<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/AVvXsEizWsshQn_xDr3o1cq0OfNK2u3GZuqkkyu5KgMcgrQJtDWLaOVXWG0UHopVy_eg4hArO2OackJXvcUGciH8U1rIGsTJbGl43e97ac7s2mnVRR2AVLyh7OCBcihlx65c3gH_3zU3pJ9rH8c/s1600/labprobslice.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizWsshQn_xDr3o1cq0OfNK2u3GZuqkkyu5KgMcgrQJtDWLaOVXWG0UHopVy_eg4hArO2OackJXvcUGciH8U1rIGsTJbGl43e97ac7s2mnVRR2AVLyh7OCBcihlx65c3gH_3zU3pJ9rH8c/s640/labprobslice.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Chroma map for CIELAB at L=97.14, corresponding to the yellow corner</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/AVvXsEhl8d7QRrIOWA83MoIbHLeo3e-PVOuw_oRRwDsR2iHg3crzQnVXBV0_FP4MrQrdmA5uLo_jQCpOQZzeQe45hPRbL3ROhMaVhFYx5PpBc-AaYrp0XnpXcR8zCNrG-_hFdONg5ui9DBlAOSo/s1600/labproblocal.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl8d7QRrIOWA83MoIbHLeo3e-PVOuw_oRRwDsR2iHg3crzQnVXBV0_FP4MrQrdmA5uLo_jQCpOQZzeQe45hPRbL3ROhMaVhFYx5PpBc-AaYrp0XnpXcR8zCNrG-_hFdONg5ui9DBlAOSo/s400/labproblocal.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Detail of the above map, for H=90-120 degrees</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/AVvXsEjskxofUi7mCXvBmha280V5N8T_g6okYDC2uqU4sf6-Dp0fyNQnVMm9GBSx9Reg3yQrnEIK_XMBKTlfzLN8GEgaoxciOvvZupw_h27xPHE7Mj4OBVwGd-ssNOSRQ2QxUZVds7mGQqf2dNw/s1600/csviewex2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="488" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjskxofUi7mCXvBmha280V5N8T_g6okYDC2uqU4sf6-Dp0fyNQnVMm9GBSx9Reg3yQrnEIK_XMBKTlfzLN8GEgaoxciOvvZupw_h27xPHE7Mj4OBVwGd-ssNOSRQ2QxUZVds7mGQqf2dNw/s640/csviewex2.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Radials cast from the neutral axis to the primary-secondary edges intersect the R=1 face</td></tr>
</tbody></table>
I have yet to come up with even a conditional piecewise analytic solution. Looking around, I have not found any other approach involving an analytic solution of this bounding problem. I ended up using a bisection solver to calculate the boundary chroma, though this approach is still very slow and a naive approach has issues converging to the apex. Due to the undercut, convergence at the very edge would require a infinitesimally small initial step size.<br />
<br />
I ended up performing additional calculations in the ROI near the corner, solving the R=1, G=1, and B=0 faces independently and forming a logical combination to locate the exact edge. By this method, the numeric solver can converge to the very edge even with a large initial step size.<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/AVvXsEjFpAkQIEteSjsCxJ88aKftWqVv-vpbDjUC3SD6YSjcOolqChkVaVQDFKzBDt98xPe7Xag-1hQikcx5Z_cxAchHFNSlawxunaG5Iy9VKW6gtfmdH3-IqtaOp_iYi3aUP6FNcNcDn6O3KZc/s1600/lablut.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFpAkQIEteSjsCxJ88aKftWqVv-vpbDjUC3SD6YSjcOolqChkVaVQDFKzBDt98xPe7Xag-1hQikcx5Z_cxAchHFNSlawxunaG5Iy9VKW6gtfmdH3-IqtaOp_iYi3aUP6FNcNcDn6O3KZc/s640/lablut.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The lookup table data for CIELCHab, note vertical face near the problem area</td></tr>
</tbody></table>
<br />
<pre class="brush:matlab;">function Cout=labboundcalc(L,H)
% LUV approach won't be simple in LAB, since level curves and meridians are all nonlinear
% furthermore, yellow corner is actually undercut and convergence at the edge
broadroi=H>85 & H<114 & L>85;
pastcorner=(H-5)<L;
ROI=(broadroi & ~pastcorner);
% find boundary for entire area
% then calculate logical combination of faces near ROI
tic
Cout=labsolver(L,H,1);
if any(ROI)
Cbg=labsolver(L(ROI),H(ROI),2);
Cr=labsolver(L(ROI),H(ROI),3);
edge=(Cbg>=Cr);
Croi=Cout(ROI);
Croi(edge)=Cbg(edge);
Cout(ROI)=Croi;
end
toc
end
function Cout=labsolver(L,H,mode)
% adapted bisection solver for LAB
% initial boundary generation for LAB
Lc0=[0 5 33 61 67 88 98 100];
Cc0=[30 60 135 115 95 119 97 15]+5;
Lc=linspace(0,100);
Cc=interp1(Lc0,Cc0,Lc);
ind=L/100*(length(Lc)-1);
Lp=round(ind)+1;
s=size(H);
C=Cc(Lp);
C=reshape(C,s);
% initial step sizes
cstep=10;
stepsize=-ones(s)*cstep;
limitdelta=1E-7*prod(s);
lastCsum=abs(sum(sum(C)));
unmatched=true;
out=true(s);
first=true;
while unmatched
% CONVERSION MUST PASS OOG VALUES
% bypass gamma correction for speed (results converge at the faces)
rgb=lch2rgb(cat(3,L,C,H),'lab','nogc');
% is point in-gamut?
wasout=out;
switch mode
case 1
out=(any(rgb<0,3) | any(rgb>1,3));
case 2
out=rgb(:,:,3)<0 | rgb(:,:,2)>1;
case 3
out=rgb(:,:,1)>1 | C<cstep;
if first
fout=out;
first=false;
end
end
neg=C<0;
big=C>140;
out=out & ~neg;
change=xor(wasout,out);
stepsize(change)=-stepsize(change)/2;
stepsize(big)=-abs(stepsize(big));
stepsize(neg)=abs(stepsize(neg));
C=C+stepsize;
Csum=abs(sum(sum(C)));
dC=abs(Csum-lastCsum)
lastCsum=Csum;
if dC<limitdelta
unmatched=false;
end
end
Cout=max(C,0);
if mode==3
Cout(fout)=150;
end
end
</pre>
<br />
This is the approach used by the function <a href="http://myplace.frontier.com/~chooks9592/manual/html/maxchroma.html">maxchroma(</a>) in my <a href="http://kr.mathworks.com/matlabcentral/fileexchange/53786-image-manipulation-toolbox">Matlab image mangling toolbox</a>. As mentioned, the HuSL and LCH conversion tools are based on this function.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-53162566861023497132015-11-06T01:29:00.001-08:002015-11-23T14:55:13.026-08:00Create a uniform colormap for plots in MatlabThis is just a quick one, and I know that there are plenty of other methods for doing this. I figured that if I'm going to demonstrate that the symmetric normalized <a href="http://www.mathworks.com/matlabcentral/fileexchange/53423-husl-%3C-%3E-rgb-image-conversion-tools">HuSLp</a> and <a href="http://www.mathworks.com/matlabcentral/fileexchange/53572-hsy-%3C-%3E-rgb-image-conversion-tools">HSYp</a> color models can be used for image editing, I might as well show other uses as well.<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/AVvXsEhAwee7DftmLFh6KowOVWNaFK2hL0VsgbMYUr3CwcUmNGOwFdGafZQ6ymUINr2hMuu2HqVDRxtGwngKEkvtqKl3OYk9usuqVvFitsvyKvH4wuqvFYZRCc5Jd-WGffc3ClxB4wd7xUzrxe8/s1600/sym.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAwee7DftmLFh6KowOVWNaFK2hL0VsgbMYUr3CwcUmNGOwFdGafZQ6ymUINr2hMuu2HqVDRxtGwngKEkvtqKl3OYk9usuqVvFitsvyKvH4wuqvFYZRCc5Jd-WGffc3ClxB4wd7xUzrxe8/s640/sym.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The symmetric models HuSLp (CIELUV and CIELAB) and HSYp (YPbPr)</td></tr>
</tbody></table>
<a href="http://epicbeardquest.blogspot.com/2015/11/more-thoughts-on-color-blend-mode.html">Recall</a> the nonuniformity addressed by the rotationally-symmetric normalization of HuSLp and HSYp. While HuSL and HSY are attempts to bring the convenience of models like HSL and HSV to other, more uniform color spaces (e.g. CIELAB, CIELUV), their normalization method distorts the relationship between S and C. A path of constant normalized saturation now has a radius dependent on hue. To regain the uniformity of the parent space, HuSLp and HSYp are normalized to the maximal rotationally symmetric subset of the projected RGB space. This means that HuSLp and HSYp retain visual uniformity, but at the expense of maximum chroma range.<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/AVvXsEiTXTXyal8sWyEZoOyEpz9fkdg4JoIxLZ0ckpPq1Jse1T9KForDrf1g4cwkgQaqNNI7y1O321cGgD-SLNrk4f9kpXo-xIsI5GEiHws0g1YvWhEVxaVQZM5DXCoXdVzmdYLMWCFB_I6zXzo/s1600/hsx.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTXTXyal8sWyEZoOyEpz9fkdg4JoIxLZ0ckpPq1Jse1T9KForDrf1g4cwkgQaqNNI7y1O321cGgD-SLNrk4f9kpXo-xIsI5GEiHws0g1YvWhEVxaVQZM5DXCoXdVzmdYLMWCFB_I6zXzo/s640/hsx.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Surfaces of maximum S: HSL (top); HuSLab, HSY (middle); HuSLpab, HSYp (bottom)</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Comparing HuSL and HSY to HSL, we see the difficulty of naive color selection by simply varying hue alone. The low resolution of these gradients makes the brightness variation much easier to notice. The HuSLp and HSYp maps appear as a series of uniform rows. Color selection in these maps is limited, but greatly simplified. While care can be taken to make colormaps of higher chroma from discontinuous paths in CIELAB or YPbPr, these generic image conversion methods can be used quite easily with adequate results.<br />
<br />
In this example, we create three colormaps corresponding to the hue angles of the primary and secondary colors. Note the brightness variation in HSL; anyone who has spent any time making plots in Matlab has probably found themselves avoiding certain named line colors due to their poor visibility ('b' on black, 'y' on white). While notably less saturated, the HSYp and HuSLp colormaps yield lines which are all equally visible. Here, the HuSLp method uses CIELUV simply because the saturated corners of the RGB space are not 60 degrees apart in CIELAB. Also, take note that I'm inverting colors in the plot() call and in the imwrite() call because I'm operating with an <a href="http://epicbeardquest.blogspot.com/2014/09/in-my-recent-experiences-dealing-with_11.html">inverted X display</a>.<br />
<br />
<pre class="brush:matlab;">steps=6;
H=0:360/steps:(360-360/steps);
K=ones(size(H));
hslset=permute(colorspace('<hsl',cat(3,H,K,K*0.5)),[2 3 1]);
hsypset=permute(hsy2rgb(cat(3,H,K,K*0.6),'pastel'),[2 3 1]);
huslpset=permute(husl2rgb(cat(3,H,K*100,K*65),'luvp','aligned'),[2 3 1]);
lw=2;
x=0:0.01:1.4;
os=2;
d=9;
sl=1.2;
subplot_tight(1,1,1);
for n=1:1:steps;
plot(x, (atan(x/(n/d))-sl*x),'color',1-hslset(n,:),'linewidth',lw); hold on;
plot(x, -(atan(x/(n/d))-sl*x),'color',1-hslset(n,:),'linewidth',lw); hold on;
plot(x,1*os+(atan(x/(n/d))-sl*x),'color',1-hsypset(n,:),'linewidth',lw); hold on;
plot(x,1*os-(atan(x/(n/d))-sl*x),'color',1-hsypset(n,:),'linewidth',lw); hold on;
plot(x,2*os+(atan(x/(n/d))-sl*x),'color',1-huslpset(n,:),'linewidth',lw); hold on;
plot(x,2*os-(atan(x/(n/d))-sl*x),'color',1-huslpset(n,:),'linewidth',lw); hold on;
end
view(-90, 90);
set(gca,'ydir','reverse');
to=-0.45;
text(1,-to ,'HSL','fontsize',16,'fontweight','bold');
text(1,-to+1*os,'HSYp','fontsize',16,'fontweight','bold');
text(1,-to+2*os,'HuSLpuv','fontsize',16,'fontweight','bold');
frame=getframe;
imwrite(255-frame.cdata,'blogshit/colormaps1.png','png');
</pre>
<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/AVvXsEgTefMeA8xj0SbAgTRZc4c0t8KfoEQnEgwZk8m926dfLVYAZsk9G2ipiXGS5h92GaKZcIx1jSxb_jw8HAPTDpe7kPUvWjvb2r8WlI1bVTAb64K6Hwtmr1My4pUbFi8ECpt3w0YJrzoDsYo/s1600/colormaps1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTefMeA8xj0SbAgTRZc4c0t8KfoEQnEgwZk8m926dfLVYAZsk9G2ipiXGS5h92GaKZcIx1jSxb_jw8HAPTDpe7kPUvWjvb2r8WlI1bVTAb64K6Hwtmr1My4pUbFi8ECpt3w0YJrzoDsYo/s640/colormaps1.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Plots using colormaps generated in HSL, HSYp, HuSLp</td></tr>
</tbody></table>
Certainly one has to weigh uniformity against the ability to discriminate plot colors. Strategic selection of colors based on adjacency of plot objects is often unavoidable, and at some point, one has to ask how many things should even be in a plot before a different approach to visualization is more appropriate. Perhaps these HuSLp/HSYp palettes would be even more appropriate for creating color themes for your favorite terminal emulator.<br />
<br />
Maybe I'll do more to extend these <a href="http://www.mathworks.com/matlabcentral/fileexchange/53786-image-manipulation-toolbox">tools</a> toward making discontinuous color sets at higher chroma, but I think there are plenty of people working on that already. Then again, it's not like I'm unaccustomed to reinventing wheels. It's not like I have anything better to do, either.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-72630283032619786362015-11-05T04:19:00.001-08:002020-03-27T12:02:44.307-07:00More thoughts on the 'color' blend modeIn the previous post, I <a href="http://epicbeardquest.blogspot.com/2015/11/exploring-color-blend-mode.html">discussed</a> the 'color' image blend mode as used by GIMP and my efforts in <a href="http://www.mathworks.com/matlabcentral/fileexchange/52513-image-blending-functions">Matlab</a> to make a more useful variation. To recap, methods such as HSV, HSI, and HSL in general offer poor separation of color and brightness information. Of these methods, HSL tends to be the most useful for color adjustment and blending due to the symmetry of its saturation space, despite the fact that L is a poorer representation of image brightness than I. Unconstrained operation in other color spaces (LAB, LUV, YPbPr) leaves us with the problem of how to deal with out-of-gamut conditions on conversion back to RGB. Calculating boundary chroma and performing data truncation prior to RGB conversion can solve the problems caused by out-of-gamut points, resulting in good retention of background brightness.<br />
<br />
When I had originally approached the use of LCH for image blending operations, I began by using a constrained and normalized version of LCH known originally as <a href="https://www.hsluv.org/">HuSL</a> (now called HSLuv). For a speed increase I also used a normalized polar version of YPbPr I refer to as <a href="http://www.mathworks.com/matlabcentral/fileexchange/53572-hsy-%3C-%3E-rgb-image-conversion-tools">HSY</a>. In these variations, saturation is normalized to the chroma range of the projected RGB space. This is convenient and solves most of the same issues which a constrained LCH method solves. It offers a few conveniences and features, but it has some weaknesses as well. The normalization of C causes colors of constant S to no longer have a uniformity of appearance, but repeated hue adjustments do not cause chroma compression as with LCH truncation. <br />
<br />
<table 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/AVvXsEiWNRFXWf9vZ4sLxHJpEdmtjqhBiCxedzmzi1uASccUn40P5PJQSvsKn5wfOTRO4h-1sZhSqqC7ICJu0hW6j6rHv_UvFlRbvOxJ93qMohnTUHzcV9tTFHhyphenhyphenME82AtZ-lUfcu35_8ZbLi1g/s1600/trajectories.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWNRFXWf9vZ4sLxHJpEdmtjqhBiCxedzmzi1uASccUn40P5PJQSvsKn5wfOTRO4h-1sZhSqqC7ICJu0hW6j6rHv_UvFlRbvOxJ93qMohnTUHzcV9tTFHhyphenhyphenME82AtZ-lUfcu35_8ZbLi1g/s640/trajectories.png" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The projection of RGB in CIELAB and YPbPr as the extent of HuSLab and HSY</td></tr>
</tbody></table>
One of the drawbacks of normalizing or bounding chroma to the extent of the projected RGB space in LCH is that only a fraction of the projected RGB space lies on continuous locus of constant chroma. There exists only a small subset of the RGB space wherein color points can be subject to arbitrary hue rotation without leaving the gamut and having their chroma changed by truncation. This maximal rotationally-symmetric boundary defines the normalizing chroma used for HuSLp, a variation of HuSL wherein the uniformity of the parent space (LAB or LUV) is retained. As HuSLp and HSYp are subsets of the projected RGB space, they obviously
cannot specify the full range of RGB colors. Specifically, they are
restricted to colors near the neutral axis, hence the suffix denoting <i>pastel</i>.
Compared to HuSLp, HSYp is not as uniform, but it has access to a
greater fraction of the RGB space than HuSLp in either CIELAB or CIELUV
modes. <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/AVvXsEiOGwqOTCnn8E8sm2RlzmEXqVuQs3krMpNCkTg4K_NeJsBYdgTpNCGkxWFhKrHJvvPOQRIvNPAOj7CBGgJ2BlPwG-sQo0HqprZ8uUSsdd2v7MdxGBk1qcUFzd2dSA9txbONSlwJKbogsoc/s1600/sym.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOGwqOTCnn8E8sm2RlzmEXqVuQs3krMpNCkTg4K_NeJsBYdgTpNCGkxWFhKrHJvvPOQRIvNPAOj7CBGgJ2BlPwG-sQo0HqprZ8uUSsdd2v7MdxGBk1qcUFzd2dSA9txbONSlwJKbogsoc/s640/sym.png" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Maximal biconic subsets of RGB in CIELUV, CIELAB, YPbPr</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/AVvXsEgU3ime7xA1WGgrI_Ktv07BDZhgdsmGE4Izv1J3q1jizFd4KC_daVr07fyKP_KEn85tLxvA91Qm4TX5iicafzmTDeLXA-58vdB8nKAj2G-nM4-JNmbXtqQj6sylk4Q2RQaZYr6d4Q7lSv8/s1600/huslp_map.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU3ime7xA1WGgrI_Ktv07BDZhgdsmGE4Izv1J3q1jizFd4KC_daVr07fyKP_KEn85tLxvA91Qm4TX5iicafzmTDeLXA-58vdB8nKAj2G-nM4-JNmbXtqQj6sylk4Q2RQaZYr6d4Q7lSv8/s640/huslp_map.jpg" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Uniformity in HuSLp (LAB): surfaces of 100% S and 50% L</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/AVvXsEhN54X7wcrC3Ild5-54W5Zeb54xMSs4HeLVKt_XcBNx4rslFpb9Q9jiXCXN1ZzRT-HgPXC1ZH27sKz-Djdi39Iu5zhYpl5E9NXKYJlOyH7BnqgZ9tf_Xi9-Q8eEdpTw7vNclrGCvtlVhKM/s1600/hsyp_map.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN54X7wcrC3Ild5-54W5Zeb54xMSs4HeLVKt_XcBNx4rslFpb9Q9jiXCXN1ZzRT-HgPXC1ZH27sKz-Djdi39Iu5zhYpl5E9NXKYJlOyH7BnqgZ9tf_Xi9-Q8eEdpTw7vNclrGCvtlVhKM/s640/hsyp_map.jpg" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Uniformity in HSYp: surfaces of 100% S and 50% Y</td></tr>
</tbody></table>
While this makes HuSLp and HSYp useful for color selection tasks, they
are also useful for <a href="http://ferreusveritas.com/mimt/manual/html/imtweak.html">image editing</a> so long as the chroma limiting is
acceptable. Consider a color blending task with highly saturated
foreground. With its larger color range, let us compare a color blend
in HSYp and LCHab.<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/AVvXsEgBhx5mlA5LYXDz8ynk0tMQA7akWUSR8QtwoD_ZuM6NECBW_VxJ9tQaIzv0mN9fkVY0IK5ir6l9I-rJkzyKrllGBivwHBIC0PTxaWsM2-sj36i1PDGQm7qMlD_Xs2wxzaS-q2kxS5-txrU/s1600/fgbg.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhx5mlA5LYXDz8ynk0tMQA7akWUSR8QtwoD_ZuM6NECBW_VxJ9tQaIzv0mN9fkVY0IK5ir6l9I-rJkzyKrllGBivwHBIC0PTxaWsM2-sj36i1PDGQm7qMlD_Xs2wxzaS-q2kxS5-txrU/s640/fgbg.jpg" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Extreme test foreground and background</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/AVvXsEgXihGjOBatrCBnTykHZTVM8uENSimTwk8x7jAkSHmU9u7xSPN5BXL13s03cAYJkmkuU-xNkQb1hC64U1s799r0ZgYH-vKNBCUXtZxbZR5EN196mUKnNUW7bSQpArOiy1kAXUyQ2OgUbq4/s1600/lch%252Bhsypcolor.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXihGjOBatrCBnTykHZTVM8uENSimTwk8x7jAkSHmU9u7xSPN5BXL13s03cAYJkmkuU-xNkQb1hC64U1s799r0ZgYH-vKNBCUXtZxbZR5EN196mUKnNUW7bSQpArOiy1kAXUyQ2OgUbq4/s640/lch%252Bhsypcolor.jpg" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blends in CIELCHab and HSYp</td></tr>
</tbody></table>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
While the limitations of HSYp are noticeable, the benefits are far more striking in this case. The blue, red, and green stripes are moderated and the image regains its depth. <br />
<br />
To be realistic, this use-case is impractical but for testing. A foreground with moderated colors would be less influenced by the limited range of HSYp. For a sufficiently desaturated foreground, HSYp blending would produce results similar to a LCH blend, but it may still be quite a bit faster. The major convenience of HSYp color blending is simply that the chroma is always compressed to the maximal uniform boundary. There is no need to tweak foreground saturation to prevent uneven results. <br />
<br />
Obviously, using stripes makes it difficult to produce a pleasing blend in any case, but that's kind of the point when testing. In general, image editing operations need to consider content as much as method. Blending a broad range of saturated hues with a photographic scene tends to create results which defy a viewer's expectations of reality. Seeing a person with a purple face or a wood table lit with rainbow light doesn't make any sense to a pattern-recognition machine built on earth.<br />
<br />
The image manipulation <a href="http://www.mathworks.com/matlabcentral/fileexchange/53786-image-manipulation-toolbox">toolbox</a> I've posted contains HSYp and HuSLp conversion tools, as well as support for these methods in the related image blending function (imblend) and the color adjustment function (imtweak). Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-83971896101567910052015-11-01T01:22:00.000-07:002020-01-10T23:35:27.882-08:00Exploring the 'color' blend modeIn my ongoing adventures in creating<a href="http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A676876" target="_blank"> image manipulation tools</a> for Matlab, I have spent quite a bit of time getting desirable behavior from <a href="http://ferreusveritas.com/mimt/manual/html/imblend.html">blending</a> and <a href="http://ferreusveritas.com/mimt/manual/html/imtweak.html">adjustment</a> tools. Although most of these problems share a common set of core difficulties, perhaps one of the more intuitive ways to explore the issue is through the common "color" layer blending mode.<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/AVvXsEiPhck8NcValqB9FWuFKEi2cMeGf0OUScduSFmqRp_mxV0TPvfelKhuJhx2FS-xMk8sEzHNZHJcNem9_U5VIWA93LF5PakuWBYJmkonnwTaCUjs2KuBFDKnm5KpNTf9p8szV-q-EUw9gVc/s1600/menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPhck8NcValqB9FWuFKEi2cMeGf0OUScduSFmqRp_mxV0TPvfelKhuJhx2FS-xMk8sEzHNZHJcNem9_U5VIWA93LF5PakuWBYJmkonnwTaCUjs2KuBFDKnm5KpNTf9p8szV-q-EUw9gVc/s320/menu.png" width="295"></a></div>
<br />
In image editing tools such as GIMP and Photoshop, image layers can be combined or <i>blended</i> using different pixel blending modes. While modes such as the contrast enhancing modes don't suggest their operating methods so directly, certainly the component and arithmetic modes do. Addition and division modes suggest the underlying math. Hue and saturation suggest the channels to be transferred between foreground and background. The detail-oriented observer might begin to raise questions at this point. Hue? Saturation? In what model are we working?<br />
<br />
What about the 'color' mode? Mere observation suggests that it's a combination of hue and saturation information being transferred, but again, the details are critically important. Various sources online suggest that this mode performs a HS transfer in HSV... or HSB... or HSL... or HSY? One begins to wonder if anybody knows what they're talking about.<br />
<br />
As my experience lies with GIMP, I based my expectations on its behavior. Certainly, I can't test my blending algo against software I don't have; however, it might be worth keeping in mind that other suites may use different approaches. The passing impression of online resources suggests that GIMP uses HSV or HSL, Photoshop uses CIELAB, and according to <a href="http://www.simplefilter.de/en/basics/mixmods.html">simplefilter.de</a>, PaintShopPro uses some bastard HSL/HSY swap that has people so baffled that they ask <a href="http://stackoverflow.com/questions/12121393/please-explain-this-color-blending-mode-formula-so-i-can-replicate-it-in-php-ima">questions</a> of forums only to get more nonsensical guidance. Let's sort this out as best we can by simple experiment.<br />
<br />
I assume at this point a few things about what is desired. Forgive my loose language hereon, but in this pixel blending mode, what should be transferred is the chroma information independent of the luminosity-related information. In other words, the hue and colorfulness should change, but not the perceived brightness. White should remain white, black should remain black. Acronyms make it sound like a simple task, don't they?<br />
<br />
Let's start with HSV, HSL, and HSI. These are <a href="https://en.wikipedia.org/wiki/HSL_and_HSV">polar models</a> used to express the content of the <a href="https://en.wikipedia.org/wiki/SRGB">sRGB</a> color space. The convenience of these familiar models is simply the manner in which their polar format allows intuitive selection and adjustment of colors.<br />
<br />
HSV is commonly visualized as a hexagonal cone or prism defined by piecewise math. HSI is expressed as a cylinder or cone defined by simple trigonometry. HSL is often described as a hexagonal bicone. What's with all the different geometry? All we want to do is separate HS from L/V/I, right? Feel free to look at the math, but I think it's more valuable to the novice (me) to see how the isosurfaces associated with these models are projected into the sRGB space.<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/AVvXsEhbyfiFRypDEM1mq5NcDaN8I7YNL3NfyJqmzkYd5CCcUvc64YoLxG27vG2-IQbE9u6CUfpifWxR642FubQC8VqyEZ2CTLMZc_wZ3zPhGVzK9XxegnobeW4RUPBNUib25NbajnQbQDQ-afo/s1600/v_iso.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbyfiFRypDEM1mq5NcDaN8I7YNL3NfyJqmzkYd5CCcUvc64YoLxG27vG2-IQbE9u6CUfpifWxR642FubQC8VqyEZ2CTLMZc_wZ3zPhGVzK9XxegnobeW4RUPBNUib25NbajnQbQDQ-afo/s640/v_iso.png" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Isosurfaces of Value and Intensity as projected into the RGB cube</td></tr>
</tbody></table>
<br />
Value, the V in HSV, is defined as the the maximum of the RGB channels. This means that the isosurfaces of V are cube shells in RGB. Intensity (I in HSI) is the simple average of the channels. This translates to planar isosurfaces. At this point, it might start to look like HSI would provide more meaningful separation of color information from brightness information. Does it make sense that [1 1 1] and [1 0 0] have the same brightness metric as they do in HSV? Let's try to do an HS swap in these models and see what happens.<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/AVvXsEjM7uP0DYNLEs2gpJuEa_wtQfTooXT8dhVBQNzMNY58hV5EGo96j501rnuiFLeQbvqxgnuyb5r3oU6kOCDEmTz0CMf4smjKxOdR01IVmky-WJp8avd8tVWBGsSor8jNi_KxQz_lWKft1P4/s1600/fg.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM7uP0DYNLEs2gpJuEa_wtQfTooXT8dhVBQNzMNY58hV5EGo96j501rnuiFLeQbvqxgnuyb5r3oU6kOCDEmTz0CMf4smjKxOdR01IVmky-WJp8avd8tVWBGsSor8jNi_KxQz_lWKft1P4/s400/fg.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Foreground image</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/AVvXsEiOz57j5iWArVKhsRPXaf1vDQjH2rVcJpSY4CKZdUJ_ifO3Np_XUQZKFthmhse8JJenJB8mFdeyhO3_d0ZYyXwS_zhMT1saizlromWqvWHEjwfzfNlMfK2QGwXw7Td6-HMWvbrilqIOLTc/s1600/table.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOz57j5iWArVKhsRPXaf1vDQjH2rVcJpSY4CKZdUJ_ifO3Np_XUQZKFthmhse8JJenJB8mFdeyhO3_d0ZYyXwS_zhMT1saizlromWqvWHEjwfzfNlMfK2QGwXw7Td6-HMWvbrilqIOLTc/s400/table.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Background Image</td><td class="tr-caption" style="text-align: center;"><br /></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/AVvXsEjA01L1dHykoeXTBeRLiqzge6db_2P9dBDfaj-GkqLV4whjrjvEYxZgJTrphn1CTQMoFfQLZ77IfJTNYpQikj0b63YWcKrjoCOH5fJUFCuHccFgpMcAJekqjRzUZHkmtr6-l9nisQudQjA/s1600/colorhsv.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA01L1dHykoeXTBeRLiqzge6db_2P9dBDfaj-GkqLV4whjrjvEYxZgJTrphn1CTQMoFfQLZ77IfJTNYpQikj0b63YWcKrjoCOH5fJUFCuHccFgpMcAJekqjRzUZHkmtr6-l9nisQudQjA/s400/colorhsv.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in HSV</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/AVvXsEhLj4Dv8jEq29U2lYd-jR7grD_vfiyrVO5Md_ou0atbWDk7pUESNHbQHKfG_icnMrVmAK1xFMcvi6xSHSUFs7nQBFLIXUFuVQWVJCf9LRzsaL2QYeIQI4tUj77C-DY8O_n2FBbVJw-MA4k/s1600/colorhsi.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLj4Dv8jEq29U2lYd-jR7grD_vfiyrVO5Md_ou0atbWDk7pUESNHbQHKfG_icnMrVmAK1xFMcvi6xSHSUFs7nQBFLIXUFuVQWVJCf9LRzsaL2QYeIQI4tUj77C-DY8O_n2FBbVJw-MA4k/s400/colorhsi.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in HSI</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
Well, those look terrible. White background content is not retained, and the image brightness is severely altered. What happens with HSL?<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/AVvXsEh-pWxMAk_KHDWnlsy9bqyp1cWXz573dQzaN9dR2L30c4saGUhEAzhzpVK7o46XYnFPzjHe1RtEool9Yff9wGwDRVNTcMN3mtTnihq1JPCU-JkFKva5yI5zHEjDzceZ72XIAIenc4-sK9w/s1600/colorhsl.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-pWxMAk_KHDWnlsy9bqyp1cWXz573dQzaN9dR2L30c4saGUhEAzhzpVK7o46XYnFPzjHe1RtEool9Yff9wGwDRVNTcMN3mtTnihq1JPCU-JkFKva5yI5zHEjDzceZ72XIAIenc4-sK9w/s400/colorhsl.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in HSL</td></tr>
</tbody></table>
Well that looks better. In fact, that looks exactly like GIMP behaves. Checking the source code for GIMP 2.8.14, this <i>is</i> exactly how GIMP behaves. Let's look for a moment at why the white content is preserved. While I previously compared the projected brightness isosurfaces to mislead the reader as I had misled myself, the answer lies in the projection of the saturation isosurfaces. Simply put, it is the conditional nature of the calculation of S in HSL which creates its bicone geometry and allows comparable S resolution near both the black and white corners of the RGB cube.<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/AVvXsEj78znhGI0ijs5stqdwH0BZ4SE2tAgDn2wt-NdSqvEGjlEv1A4kPxwMwp5DnSOWQyumU4cjOnsje_ek5ztnufyeqcNszxKgcUO85uK-zGdVw0ehnyu_MrXL09Tu1oEBn8FPsfdoLPK989k/s1600/s_iso.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj78znhGI0ijs5stqdwH0BZ4SE2tAgDn2wt-NdSqvEGjlEv1A4kPxwMwp5DnSOWQyumU4cjOnsje_ek5ztnufyeqcNszxKgcUO85uK-zGdVw0ehnyu_MrXL09Tu1oEBn8FPsfdoLPK989k/s640/s_iso.png" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Saturation isosurfaces as projected into the RGB cube from HSV, HSI, HSL</td></tr>
</tbody></table>
So we know how GIMP does it. What are better ways? While HSL helps prevent the loss of white image regions, the overall brightness still suffers. Let's start with the vague suggestion that Photoshop uses <a href="https://en.wikipedia.org/wiki/Lab_color_space">CIELAB</a>. At this point, I can only make educated guesses at the internals, but intuition would suggest that we might try using <a href="https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC">CIELCHab</a>, the polar expression of CIELAB. In naivety, I perform a CH swap to obtain the following.<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/AVvXsEgAZe18DAQ4pWHD_aOFoYAi7SHixmDL9O17mSqwGlabKVrlwcdUi628Cp3z2aUUHeLFrjcU1prqZoB2ZOM_GJ-Ls_5GytO68DNfpEChhrKgm4ouWc1Vb3cm4JHag4ORkJbAbnOVdn_xPeI/s1600/colorlchab.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAZe18DAQ4pWHD_aOFoYAi7SHixmDL9O17mSqwGlabKVrlwcdUi628Cp3z2aUUHeLFrjcU1prqZoB2ZOM_GJ-Ls_5GytO68DNfpEChhrKgm4ouWc1Vb3cm4JHag4ORkJbAbnOVdn_xPeI/s400/colorlchab.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in CIELCHab</td></tr>
</tbody></table>
Now things are actually worse. Both black and white regions are lost. To understand why, I put together a<a href="http://ferreusveritas.com/mimt/manual/html/csview.html"> tool for visualizing</a> the projection of sRGB into other color spaces such as CIELAB. <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/AVvXsEiAYtl7ee0i0Wgrj1cC5UYz6lo1B6WtdZBZbmMiObPDzudyTltLeJcZpyB_wGW0qDRHOB0J2s4FvqXB6Noc3tsF78LyTHEX7SLS0sbm4Pispxqfp2gByIlTCUej2pk98U2vRLQ0SuF5Rn0/s1600/LABtrajectories.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYtl7ee0i0Wgrj1cC5UYz6lo1B6WtdZBZbmMiObPDzudyTltLeJcZpyB_wGW0qDRHOB0J2s4FvqXB6Noc3tsF78LyTHEX7SLS0sbm4Pispxqfp2gByIlTCUej2pk98U2vRLQ0SuF5Rn0/s640/LABtrajectories.png" width="640"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The trajectory of an out-of-gamut point in unconstrained LCHab and HuSLab</td><td class="tr-caption" style="text-align: center;"></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
Here, we see the volume containing all RGB triplets whose values lie within standard data ranges (e.g. 0-255 for uint8). Unlike the case with HSV, HSL, and HSI, the sRGB space is a subset of the CIELAB space. A color point which lies outside the depicted volume would have pixel values that are either negative or larger than allowed by the datatype. Upon conversion back to RGB, these values would be truncated to the standard range. In this manner, color points outside the cube will be mapped to points on its surface. Since the truncation occurs <i>after</i> conversion to RGB, the trajectory of out-of-gamut color points will be parallel to the axes of the cube. It then stands to reason that the orientation of the neutral axis means that out-of-gamut points tend to be mapped away from the white and black corners of the cube and toward the primary-secondary edges.<br />
<br />
If the goal remains to isolate the effects of color manipulation and image brightness, the geometry of this projection poses an issue. To transfer the radial position of a primary or secondary corner to a pixel which is near the extent of the L axis would be to push the pixel outside the cube. If we were to rotate the hue of a pixel which lies on a primary or secondary corner, it would again move outside the cube. How can we manage the existence and graceful conversion of these points? To be honest, I'm not sure I know the best methods. All I can offer are my current approaches.<br />
<br />
One approach would be to do data truncation prior to RGB conversion. Of course, the maximum chroma for a given L and H is not simple to calculate, but this would keep the trajectories of out-of-gamut points in a plane of
constant L. This produces good results, but reveals an issue with working methods.<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/AVvXsEhvp0SONiBfp9Fh-_rJFMAeKavotH6db_pmhrMFbJ5kzG-okrJyQUDGXh-MCo5THC1fbuyocwkz6IkHzCx8TZgKQZRnLrJtlljxXRlVJQRtB2k0UN9MMs6kiRbJ6Xr0TDowHfFD6Ruu-Ms/s1600/lchblend.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvp0SONiBfp9Fh-_rJFMAeKavotH6db_pmhrMFbJ5kzG-okrJyQUDGXh-MCo5THC1fbuyocwkz6IkHzCx8TZgKQZRnLrJtlljxXRlVJQRtB2k0UN9MMs6kiRbJ6Xr0TDowHfFD6Ruu-Ms/s400/lchblend.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in CIELCHab</td></tr>
</tbody></table>
Ideally, we would try to do all our image operations in the uniform space (LAB/LUV) and only perform the conversion to RGB for final output or screen display. At the very least, we could convert to RGB with no data truncation, allowing for negative and supramaximal pixel values to retain the information stored by OOG points. For my efforts in creating standalone tools with RGB input and output, this best approach seems terribly impractical. When constrained by compatibility with Matlab's image viewer and other image handling functions, we're forced to decide whether it's appropriate to lose chroma information by truncating in LCH. Even though it causes no ill effects for a single operation, it means that successive operations will tend to compress the chroma content of the image to a small subset of the projected RGB space.<br />
<br />
This is more of a problem for image and color adjustment than for a single channel swapping blend operation, but it's something to keep in mind. I'll probably come back to the topic of normalized versions of LCH at a later date.<br />
<br />
If implementing a constrained color model like this is beyond the realm of practical effort-costs, consider this simple dirty method to retain brightness in a color blend. Simply copy the background luma, perform a HS channel swap in HSL, then re-establish the original luma using your favorite luma-chroma transformation. This might seem like it would waste a lot of time with converting twice, but it's often the fastest method among those I've described. The results are similar to the normalized methods, and existing conversion tools can typically be used.<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/AVvXsEjsIxuK-xb0dWEtcrSBA4DNFa3E6URpcLNi3Tau4dKFZCW7LV0JfE2jxeJcZt11uUJHjF4nWCmAmblS1KRSXhe9lg56mfGoKN3VAYz0QgY_f91nkM5cYVD8NK3Zhbjx2pBWpTiBa_tmCs8/s1600/color.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsIxuK-xb0dWEtcrSBA4DNFa3E6URpcLNi3Tau4dKFZCW7LV0JfE2jxeJcZt11uUJHjF4nWCmAmblS1KRSXhe9lg56mfGoKN3VAYz0QgY_f91nkM5cYVD8NK3Zhbjx2pBWpTiBa_tmCs8/s400/color.jpg" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Color blend in HSL with Y preservation</td></tr>
</tbody></table>
For an example of the methods, feel free to check out the <a href="http://www.mathworks.com/matlabcentral/fileexchange/52513-image-blending-functions/content/blendtools/imblend.m">image blending function</a> I've posted on the Mathworks file exchange. The conversion tools for LCHab, LCHuv, HuSLab, HuSLuv, and HSY are included in the parent submission.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-48197390126025315132015-09-12T08:40:00.001-07:002015-09-12T08:55:18.414-07:00Remove unwanted garbage from YouTube sidebarNothing much to say about this one, really. Eliminate useless clickbait bullshit from the related videos sidebar in YouTube. Why are there 20 videos for preschool kids in the sidebar when I'm watching a video about running a lathe? I don't want to see that shit ever again.<br />
<br />
The way I look at it, there are at least three classes of video links that can be identified as disposable:<br />
<ul>
<li>Videos from certain channels</li>
<li>Videos with an astronomical number of views</li>
<li>Videos that are "Recommended"</li>
</ul>
I eliminate these targets with <a href="https://addons.mozilla.org/en-us/firefox/addon/yarip/" target="_blank">YARIP</a>. It might be desired to blacklist more things, but I got tired of stabbing blindly at other attempts while exploring the limited functions of XPATH 1.0.<br />
<br />
<pre class="consoleblock">//li[child::div/a/span[@class="stat attribution"]/span[contains(.,'Busy Beavers')]]
//li[child::div/a/span[@class="stat attribution"]/span[contains(.,'BuzzFeed')]]
//li[child::div/a/span[@class="stat attribution"]/span[contains(.,'Danger Dolan')]]
//li[child::div/a/span[@class="stat view-count" and number(translate(substring-before(.," "),',','')) > 3000000]]
//li[child::div/a/span[@class="stat view-count" and contains(., 'Recommended')]]
</pre>
<br />
The particular channel names and limiting views count can be tailored for your experience and taste. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-35401747182926588552015-07-29T16:24:00.004-07:002020-03-16T06:17:20.479-07:00Read and write animated gifs with MATLAB<b>UPDATE: These scripts have been vastly improved. Find the current versions <a href="http://www.mathworks.com/matlabcentral/fileexchange/52514-tools-to-read-and-write-animated-gif-files">here</a>.</b>
<br />
<br />
In the process of developing my own image mangling toolbox for Matlab, I had routine need for generating animated gif files from image sequences. It then follows that said .gif files might need to be read back again. Matlab's inbuilt functions imread() and imwrite() don't make this trivial. There are some suggestions floating around the internet, and there are some unanswered reports of unexpected behavior. Not everything worked simply, but I came up with my own ways.<br />
<br />
First, writing the image was fairly simple. I had originally been using imagemagick to do the heavy lifting, but decided to go for a more direct route. As mentioned, the imagemagick method does seem to have better output, but it's quite a bit slower in my experience.<br />
<pre class="brush:matlab;">
function gifwrite(inarray,filepath,delay,method)
% GIFWRITE(INARRAY, FILEPATH, {DELAY}, {METHOD})
% write image stack to an animated gif
%
% INARRAY: 4-D image array (rgb, uint8)
% FILEPATH: full name and path of output animation
% DELAY: frame delay in seconds (default = 0.05)
% METHOD: animation method, 'native' or 'imagemagick' (default = 'native')
% 'imagemagick' may have better quality, but is much slower
if nargin<4;
method='native';
end
if nargin<3;
delay=0.05;
end
numframes=size(inarray,4);
if strcmpi(method,'native');
disp('creating animation')
for n=1:1:numframes;
[imind,cm]=rgb2ind(inarray(:,:,:,n),256);
if n==1;
imwrite(imind,cm,filepath,'gif','DelayTime',delay,'Loopcount',inf);
else
imwrite(imind,cm,filepath,'gif','DelayTime',delay,'WriteMode','append');
end
end
else
disp('creating frames')
for n=1:1:numframes;
imwrite(inarray(:,:,:,n),sprintf('/dev/shm/%03dgifwritetemp.png',n),'png');
end
disp('creating animation')
system(sprintf('convert -delay %d -loop 0 /dev/shm/*gifwritetemp.png %s',delay*100,filepath));
disp('cleaning up')
system('rm /dev/shm/*gifwritetemp.png');
end
return
</pre>
Reading the image back wasn't straightforward at all. The naive approach suggested by the documentation and posts online does not result in correct output. Imread(...'frames','all') returns only a single colormap corresponding to the global color table in the file. Any file containing multiple images with local color tables will turn into a pile of garbage. <br />
<pre class="brush:matlab;">function outpict=gifreadcrap(filepath)
% GIFREADCRAP(FILEPATH)
% reads all frames of an animated gif into a 4-D RGB image array
% seems imread() cannot correctly read animated gifs
[images map]=imread(filepath, 'gif','Frames','all');
s=size(images);
numframes=s(4);
outpict=zeros([s(1:2) 3 numframes],'uint8');
for n=1:1:numframes;
outpict(:,:,:,n)=ind2rgb8(images(:,:,:,n),map);
end
return
</pre>
<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;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZ6JSrnt6tUGqNK4rrN9_C7tcuLeDhHB64Q7d_8rqUIazN1tNVGDiBzdo8ocUrEWxiOzYca5cp8J3UIkVN9PKnM0tKYHIFPq3qCpbE2_io0tp4E3K9VY37pVe9et0_Ra2S8EPa2HU12E/s320/drift.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" onmouseout="this.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7BRyc2ILS4A5NrZbxwc8huXRU1jgUW1Zv8iu3XzBBXrCIRBNc3R_rxHmLDlgBspLrU1rpNawtAq3oRoWfQZJT-Uo2hX4hzNzTRd060WTTRzwEx_pjG7sPGSjbqlamIYWAGS54TRTJHrM/s320/driftfr2.gif'" onmouseover="this.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikZ6JSrnt6tUGqNK4rrN9_C7tcuLeDhHB64Q7d_8rqUIazN1tNVGDiBzdo8ocUrEWxiOzYca5cp8J3UIkVN9PKnM0tKYHIFPq3qCpbE2_io0tp4E3K9VY37pVe9et0_Ra2S8EPa2HU12E/s320/drift.gif'" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7BRyc2ILS4A5NrZbxwc8huXRU1jgUW1Zv8iu3XzBBXrCIRBNc3R_rxHmLDlgBspLrU1rpNawtAq3oRoWfQZJT-Uo2hX4hzNzTRd060WTTRzwEx_pjG7sPGSjbqlamIYWAGS54TRTJHrM/s320/driftfr2.gif" width="288" /></a>
</div>
</td><td style="text-align: center;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMIOHH2pZOK_W2ru_ZBYdcWp-6qs4uFYVnzCrSRjGgBIYS8dhASPBtQJv2uHpGHIpFV_AfhSFzQYpzAVBwLb70Sjy0EX7066j8CH1NT5QaUOdwc26oB8h7e_duLShVn4xMT5-euUQIqzA/s1600/drift3.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="512" onmouseout="this.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk79zr3UbZiMcKpFIRg3ere_8QBNNUFhGWSY4MHKSFcLFEiVVXuRF9JLmDBx9OPEo8c1PIr5dj1SHQVduPl7BkwXdbBYubYoIUI_sgi5x1J4kz0xJVLQguuisU5XtgIKJHEwLQeVcdOs0/s1600/driftfr1.gif'" onmouseover="this.src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMIOHH2pZOK_W2ru_ZBYdcWp-6qs4uFYVnzCrSRjGgBIYS8dhASPBtQJv2uHpGHIpFV_AfhSFzQYpzAVBwLb70Sjy0EX7066j8CH1NT5QaUOdwc26oB8h7e_duLShVn4xMT5-euUQIqzA/s1600/drift3.gif'" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk79zr3UbZiMcKpFIRg3ere_8QBNNUFhGWSY4MHKSFcLFEiVVXuRF9JLmDBx9OPEo8c1PIr5dj1SHQVduPl7BkwXdbBYubYoIUI_sgi5x1J4kz0xJVLQguuisU5XtgIKJHEwLQeVcdOs0/s1600/driftfr1.gif" width="288" /></a>
</div>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">Original image written with gifwrite() and results as returned by gifreadcrap()
</td></tr>
</tbody></table>
Using imread() to read single frames in the hope of perhaps getting correct color information produced the exact same results. Imfinfo() can be used to fetch file information, and certainly, it returns color tables which should correspond to the LCTs in the file. This is where things get ugly.
<br /><br />
I spent some time with a hex editor and the file standards documentation to verify what I suspected was a bug. While imfinfo() returned the LCT data, they were all shifted by exactly one byte. The immediately adjacent bytes were being read correctly, though. Sounds like an OBOE to me!
<br /><br />
At this point, I discover that yes, indeed it is a <a href="https://www.mathworks.com/support/bugreports/813126">bug</a> in versions R14-2012a. A patch exists, but for the sake of anyone who doesn't care, I decided to integrate both the native solution and my own imagemagick workaround.
<br /><br />
Keep in mind that it may still be necessary to coalesce the animation before opening it, depending on what you want to do in Matlab. If you're trying to import an optimized gif, you can use the included option to coalesce the image. This optional mode is similar to the other optional modes in these two functions in that it requires external tools and assumes a linux environment. All temporary file operations utilize /dev/shm for marginal speed improvement. Altering this temporary path for your own environment should be trivial. Both functions should work in default modes on other systems, but I have no intention of testing that.<br />
<pre class="brush:matlab;">
function outpict=gifread(filepath,method,coalesce)
% GIFREAD(FILEPATH, {METHOD}, {COALESCE})
% reads all frames of an animated gif into a 4-D RGB image array
%
% FILEPATH: full path and filename
% METHOD: file read method, 'native' or 'imagemagick' (default = 'native')
% 'imagemagick' method is a workaround for bug 813126 present in
% R14SP3-2012a versions. Bug consists of an OBOE in reading LCT data.
% A patch does exist for these versions:
% https://www.mathworks.com/support/bugreports/813126
% COALESCE: 0 or 1, Specifies whether to coalesce the image sequence prior to
% importing. Used when loading optimized gifs. Requires imagemagick.
% (optional, default 0)
if nargin<3;
coalesce=0;
end
if nargin<2;
method='native';
end
if coalesce==1
system(sprintf('convert %s -layers coalesce /dev/shm/gifreadcoalescetemp.gif',filepath));
filepath='/dev/shm/gifreadcoalescetemp.gif';
end
if strcmpi(method,'native')
% use imread() directly (requires patched imgifinfo.m)
[images map]=imread(filepath, 'gif','Frames','all');
infostruct=imfinfo(filepath);
s=size(images);
numframes=s(4);
outpict=zeros([s(1:2) 3 numframes],'uint8');
for n=1:1:numframes;
LCT=infostruct(1,n).ColorTable;
outpict(:,:,:,n)=ind2rgb8(images(:,:,:,n),LCT);
end
else
% split the gif using imagemagick instead
system(sprintf('convert %s /dev/shm/%%03d_gifreadtemp.gif',filepath));
[~,numframes]=system('ls -1 /dev/shm/*gifreadtemp.gif | wc -l');
numframes=str2num(numframes);
[image map]=imread('/dev/shm/000_gifreadtemp.gif', 'gif');
s=size(image);
outpict=zeros([s(1:2) 3 numframes],'uint8');
for n=1:1:numframes;
[image map]=imread(sprintf('/dev/shm/%03d_gifreadtemp.gif',n-1), 'gif');
outpict(:,:,:,n)=ind2rgb8(image,map);
end
system('rm /dev/shm/*gifreadtemp.gif');
end
if coalesce==1
system(sprintf('rm %s',filepath));
end
return
</pre>
While all of this works, the native reading method does require either a patched copy of imgifinfo.m or Matlab version 2012b or later. Of course, once the existence of the bug was known, fixing things was simple. All the hours over the last day and a half that I spent digging for answers online and with a hex editor were to only rediscover something that was already known but hidden behind MathWorks' member login. It kind of pisses me off enough that finding the solution does not resolve my focus. What possible purpose does restricting access to bug reports serve? <br />
<br />
If there's one thing I should have learned from my experiences with asking things of forums, it's to never ask forums. The internet is littered with the evidence of my inability to learn this simple lesson. This very blog was an angry reaction to the previous spectacularly infuriating experience. If I'm bound to ask questions of a silent screen -- if I'm bound to carve my own conclusions and place them on them complete on someone else's mantle in the meager hope that I can help the next person avoid my fate, then I might as well do it in a squalor of my own crafting, without the unrealistic expectations of interaction tugging at my attention.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-63845073208757633812015-07-20T01:38:00.002-07:002020-03-20T09:17:19.277-07:00Toward a useful vision aidEver since cataract surgery, I've been struggling with being able to see well. Part of the issue is a gradual increase in astigmatism since surgery (I just need to get my prescription updated), but the biggest hurdle is the loss of visual accommodation.<br />
<br />
With the extraction of the eye's natural lens, goes the ability to adjust focus to accommodate for distance. While corrective lenses can bring things into focus for any fixed distance (e.g. reading glasses), a fixed correction can't work over a broad range of distances. As depth of field increases as a function of distance to subject, it stands to reason that most accommodation issues occur when working with nearby objects. An older person feeling the effects of presbyopia can probably say a thing or two about the gradual frustration of needing bifocals.<br />
<br />
This isn't about age-related problems or old people things. This is about my dumb broke ass trying to find a means to get by with my pointless daily existence. Anyone else would probably just buy some magnifier lamps or something, but those cost double-digits kind of money. If you've been paying attention, you'll know that I'll end up cobbling shit out of $0.99 Ebay garbage and then sitting in the dark at midnight writing rambling stories to myself about an experience that even I can barely care about. That's what I did. That's what I'm doing. Let us continue.<br />
<br />
Presbyopia is common though. Where do most people start? Bifocals and reading glasses simply offer an increased optical power (increased lens convexity) so that focusing on near objects is possible. While bifocals are convenient in that they're always at hand, their use requires a strong downward gaze which I can't effectively accomplish -- a consequence of an entirely separate ailment.<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/AVvXsEhlXKJqXPrFiLgrXN3zAkkk31-cTGPFtmIn5k8gjYSTLWIWwALlwxhex2V23eQUdAqwftYhYkFw_G83IDHYAneFpJ4C4S_fg9gGvgN_KHJvmhbhIAmgpgdYKdgtFlL_5OhdC-0No6MvR7I/s1600/2015-07-19_23-32-05_721.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXKJqXPrFiLgrXN3zAkkk31-cTGPFtmIn5k8gjYSTLWIWwALlwxhex2V23eQUdAqwftYhYkFw_G83IDHYAneFpJ4C4S_fg9gGvgN_KHJvmhbhIAmgpgdYKdgtFlL_5OhdC-0No6MvR7I/s640/2015-07-19_23-32-05_721.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A drift of reading glasses and very uncomfortable Optivisor clone</td></tr>
</tbody></table>
<br />
Drug store reading glasses aren't meant to be used with prescription glasses, though it's ... possible. Prescription reading glasses are a simple addition to the SPH portion of the prescription (or specification of a +ADD). Of course, if you know your prescription and can use cheap readers to get an idea how much correction you need for a particular distance, you can do the math yourself and order any sort of odd double-reader bifocals or "computer glasses" you want.<br />
<br />
For instance, let's say I wear plain single-vision glasses and I pick up a pair of +2.5 readers and slap them over the top. "Hooray!" I say as I can again read my own handwriting at 12". I can either add 2.5 to the SPH portion of both OD and OS lines on my prescription, or if it's appropriate, I can just use the +ADD entry on the order form. In this way, you can order your own readers or bifocals online without dealing with extra expense. <br />
<br />
Say I have an existing bifocal prescription and I want to make computer glasses that can focus at 30", but without changing the power of the secondary lens I normally use for reading at 15". If I can determine that a +1.50 correction allows me to see at 30", I can just add that to the SPH section of the prescription and then subtract it from the existing +ADD which specified the original bifocals. Zenni Optical actually covers these sorts of prescription adjustments in their FAQ <a href="http://www.zennioptical.com/faq/how-do-i-order-reading-glasses?count=5&subcount=7#faqTopic" target="_blank">here</a> and <a href="http://www.zennioptical.com/faq/can-i-order-bifocals-that-are-computer-distance-on-top-and-reading-on-bottom?count=5&subcount=8#faqTopic" target="_blank">here</a>. <br />
<br />
Granted, buying glasses from Zenni beats paying $200 for glasses, but I'm not made of money. Not only that, but like I mentioned, depth of field is a function of distance. With glasses configured to focus at 20', you can focus at 200', but with glasses configured to focus at 2', you probably won't be able to see much at 20'. I went though the motions I describe above when I got my glasses for the computer. In fact, I collected the optimal focusing distance for a range of positive correction powers, as well as the minimum and maximum distance I could reasonably make out detailed edges in some text samples. It seems subjective at a glance, but when plotted, the trend starts to reveal a nice rational relationship.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2nXbTJPV-cWGCTUq-K6tSEyl1EREvoFcjAM6pDOknpCrYoljfS1UTxLkG2GXPgVO5KAkpUZvQbdRse7mRuCp1W6yoIj_wIRQTgD6gOMJVSRRoTcz26g6edvIH9WW67is_7PK2jdEFEA8/s1600/readers.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2nXbTJPV-cWGCTUq-K6tSEyl1EREvoFcjAM6pDOknpCrYoljfS1UTxLkG2GXPgVO5KAkpUZvQbdRse7mRuCp1W6yoIj_wIRQTgD6gOMJVSRRoTcz26g6edvIH9WW67is_7PK2jdEFEA8/s640/readers.png" width="640" /></a></div>
<br />
With some use-cases such as the computer where distance is fixed and repeatable, it's simple to come up with a correction that's tailored to the task. Otherwise, shop work involving operations up close (checking pitch of a bolt with a thread gage) and at a distance (finding the bolt after you drop it) is hard to correct with a single prescription. At some point one has to accept that there is no single solution, and that carrying numerous solutions around is impractical. <br />
<br />
So what's left? If I can't accommodate and I can't effectively use bifocals, I'm pretty much doomed to do half of my work in a blurry world unless I'm constantly swapping glasses or fumbling a magnifier. Some work patterns are harder to deal with than others. Automotive work requires focus between about 12" and 60", and the area of focus is typically changing regularly. On the other hand, lathe operations cover a smaller range of distances and most importantly, the critical areas of focus don't change as much. It's simpler to try coming up with task-oriented magnification tools for cases like this. ... simpler to <i>try</i>.<br />
<br />
So I embark on a journey to come up with some positionable magnetic work magnifiers that I can stick down on the lathe or drill press or vise when I need them. There are lots of options out there already if you want to spend money. Certainly, I'd like a lighted magnifier on a Noga mag base, but that's not going to happen.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf86Xe_jYSIpTDnd-MA66VkumuNz8dFBDc0cNnnsFopB_3Ms4DztlCKw02OpiPk4zWuAOReAqQT7yQmv1p88p3vwVU0NMySfuxUlBdZDHpvydHGO7yFhdYkLvzpPCJdq59CQbEDuiNl70/s1600/2015-07-19_23-16-01_33.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf86Xe_jYSIpTDnd-MA66VkumuNz8dFBDc0cNnnsFopB_3Ms4DztlCKw02OpiPk4zWuAOReAqQT7yQmv1p88p3vwVU0NMySfuxUlBdZDHpvydHGO7yFhdYkLvzpPCJdq59CQbEDuiNl70/s640/2015-07-19_23-16-01_33.jpg" width="640" /></a></div>
<br />
I found a MagniStitch magnifier that my late grandparents had purchased in the 80's. The lens is well-shaped and wide. The ball-jointed arm is much less useful than one might think. It tends to pop apart when positioning. I glued it to an old speaker magnet (because double-sided foam tape is bullshit). These can still be purchased for about $13-$20. I've considered buying others if perhaps I can CAD up a more appropriate articulated arm for it.<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/AVvXsEhg4oUbuxSy0wo6f3C1-BILf5o9XLr4HOGH1CPeHG1oJHRRX0dBvB7TAVcgZ3skGIAAZrzJDc0OwaSxrngKjnngDjkFRvDeBKngqD2TmbZv1GRWE8m70MEUQh6eWM7cPMc1fOIU-5D6qoU/s1600/2015-07-19_23-29-12_121.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg4oUbuxSy0wo6f3C1-BILf5o9XLr4HOGH1CPeHG1oJHRRX0dBvB7TAVcgZ3skGIAAZrzJDc0OwaSxrngKjnngDjkFRvDeBKngqD2TmbZv1GRWE8m70MEUQh6eWM7cPMc1fOIU-5D6qoU/s640/2015-07-19_23-29-12_121.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MagniStitch stuck on the drill press vise</td></tr>
</tbody></table>
<br />
The MagniStitch didn't work well for me on the lathe simply because the arm is too short to reach around the tool post or to reach around the cross slide to see the dial. I considered making my own from an inexpensive pocket magnifier and a flexible arm of some sort. The trouble with buying cheap magnifiers is that a lot of them are completely useless shapes. That is to say that they are neither spherical or hyperbolic lens profiles, but they're molded or ground to some freehand wavy biconic shape that makes them about as useful as a fishbowl. I found some <a href="http://www.ebay.com/itm/231540030630" target="_blank">glass pocket magnifiers</a> on Ebay that have proven to be good. I just popped the rivet out of one and made a wire arm for it. It works well enough, but it tends to wobble if it's on a machine that vibrates. It needs a stiffer wire or some dampening ... or maybe I just need to replace the bad belts in the lathe. It's a promising candidate though.<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/AVvXsEiCl34bGWbQYKseO21Sbulf_xbiK4_FV9y5-3cbsJgt75qccK5BLQZ8UbN2Lqv8KF16axzdNceiR2dCMIuVgCq5xAr_CrH2O9Y_oUdkjGCg6MGTUa9W9UECI5diBvi3zDxbFGPuQQx0pP0/s1600/2015-07-19_23-28-28_674.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCl34bGWbQYKseO21Sbulf_xbiK4_FV9y5-3cbsJgt75qccK5BLQZ8UbN2Lqv8KF16axzdNceiR2dCMIuVgCq5xAr_CrH2O9Y_oUdkjGCg6MGTUa9W9UECI5diBvi3zDxbFGPuQQx0pP0/s640/2015-07-19_23-28-28_674.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pretending to put a shear cut on some trashy porous cast aluminum bar</td></tr>
</tbody></table>
<br />
In the course of scouring china-mart for lens-shaped objects, I saw this <a href="http://www.ebay.com/itm/231001236103" target="_blank">thing</a> and thought I had a brilliant idea. Increasing illumination helps a lot, partly because pupilary contraction increases depth of field. I could slap a USB power bank of some sort onto that and have a little portable magnifier light. Well, not really. The lenses in these things are absolutely useless. Luckily, it wasn't molded directly into the lamp.<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/AVvXsEipZFhsEMRy89ctlQHgDOsrURsFv8KH_2RY5MmeOKffrXR7GQikC0Ars-B5pnAdmzNUfLns1xiJ4BixVldKMOW9UInDKHI-yZjn8EcqCXRcqFNcARqexayPDty9GfcwaLSqiY83V38IaBo/s1600/2015-07-20_03-20-16_459.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipZFhsEMRy89ctlQHgDOsrURsFv8KH_2RY5MmeOKffrXR7GQikC0Ars-B5pnAdmzNUfLns1xiJ4BixVldKMOW9UInDKHI-yZjn8EcqCXRcqFNcARqexayPDty9GfcwaLSqiY83V38IaBo/s640/2015-07-20_03-20-16_459.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Freehand wavy biconic lens-shaped object</td></tr>
</tbody></table>
<br />
I ended up taking another one of my glass pocket magnifiers and grinding the lens down to replace it. The gooseneck is barely able to hold the lamp up anyway, and the USB connector really is a lousy mechanical support. By the time I had the replacement lens fitted, I had pretty much condemned the USB power bank and the whole idea. I glued it to another magnet and figured I'll use it until I come up with something better.<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/AVvXsEgjFpZJdCvBwVBej70AK5YrvnO6-HELchnu2sZhjxnO01w7NzPHjOlccYM8D930WWPgBfZVM7lyvDCdyGY8tPsoJGl2UXdsYXYkMqNwNtyl0LN-6S73iWs3N9ymF7AaP4wqrp08iZu95V8/s1600/2015-07-19_23-30-51_221.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjFpZJdCvBwVBej70AK5YrvnO6-HELchnu2sZhjxnO01w7NzPHjOlccYM8D930WWPgBfZVM7lyvDCdyGY8tPsoJGl2UXdsYXYkMqNwNtyl0LN-6S73iWs3N9ymF7AaP4wqrp08iZu95V8/s640/2015-07-19_23-30-51_221.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">It's easy to fix the lens. Just inherit an old lapidary wet grinder...</td></tr>
</tbody></table>
<br />
These aren't the best solutions, but they'll keep me busy for now. I plan on whipping up an articulated arm system in CAD. I'd like something simple that I can machine, but it might be nice to come up with a printable modular system. <br />
<br />
If you're looking for a more substantial conclusion to this rambling post, there isn't one. These are not unique problems. Although it might be difficult for someone in good health to understand how frustrating and disempowering the experience of poor vision can be, plenty of people have it worse than I do. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-2183480713068794512015-07-18T19:10:00.006-07:002020-03-18T04:07:14.884-07:00Animate a plot in MATLABAs part of an ongoing exercise in pointlessly observing unavoidable disasters, I use a script to log the status of my internet connection via the information provided by the DSL modem. Normally, I just process this data into a pdf of daily plots of SNR and connection speed with average figures for each day. It's not too pretty, but it gets the point across easily enough. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhstIbCr5OLgHMs9qOFAHLfsa6eh9WbINcZJJauiYA4a9BcA0K-P0N2OagkmL5VJK6bFFCQ3VceiPGmJRRlnVQTddv7fEo08Gxe-CPwW2RVKhULIk_xLaVyh_mntQkdxX3WZeRkLnt9CQc/s1600/justonepage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhstIbCr5OLgHMs9qOFAHLfsa6eh9WbINcZJJauiYA4a9BcA0K-P0N2OagkmL5VJK6bFFCQ3VceiPGmJRRlnVQTddv7fEo08Gxe-CPwW2RVKhULIk_xLaVyh_mntQkdxX3WZeRkLnt9CQc/s640/justonepage.png" /></a></div>
<br />
For other aspects of the data, or maybe just to satisfy an idle whim, I thought it might be more interesting to visualize the data in motion. I had been playing with more complex figure manipulation recently, so I thought it would be a good challenge. I created a figure containing two axes which shows connection speed as well as signal and noise power. For simplicity, I used <a href="http://www.mathworks.com/matlabcentral/fileexchange/30884-controllable-tight-subplot/content/subplot_tight/subplot_tight.m" target="_blank">subplot_tight()</a>, but there are other simplified <a href="http://blogs.mathworks.com/pick/2012/12/21/figure-margins-subplot-spacings-and-more/" target="_blank">methods</a> of getting decent custom geometry out of figures with multiple axes. The background marking the days is generated simply:<br />
<br />
<pre class="brush:matlab;">% all the other data is prepared first
days=single(mod(round((t-12)/24),2)); % used to mark days
figure(1); clf;
subplot_tight(4,1,2:4,0.05)
area(t,40*days-20,-20,'facecolor',0.9*[1 1 1],'edgecolor',[1 1 1]); hold on;
plot(t,PWRfill,'r:',t,NOISEfill,'b:',t,PWR,'r',t,NOISE,'b'); grid on;
ax1=gca;
set(gca,'layer','top'); % otherwise area() hides grid
xlabel('time (hours)'); ylabel('power (dBm)');
subplot_tight(4,1,1,0.05);
area(t,1500*days,0,'facecolor',0.9*[1 1 1],'edgecolor',[1 1 1]); hold on;
plot(t,SPD); ax2=gca; set(gca,'layer','top'); grid on;
ylabel('Connection Speed kbps');
set(ax2,'XTickLabelMode', 'Manual','XTickLabel',[])
% keep subplots correlated on x when zooming
linkaxes([ax1 ax2],'x');
</pre>
<br />
In the end, I decided against using the grid lines. They clutter the animation too much in my opinion. I left them in this code example simply to demonstrate the use of the 'Layer' property when using area() plots.<br />
<br />
This also shows the overlay of duplicate datasets. The original data as logged contains thousands of gaps where the modem stopped reporting valid data, either because the connection was down or because the modem had locked up. While metrics like connection speed are only sensible to consider while the connection status is valid, things like noise power would really be most interesting at the extremes -- when the modem can't connect. I used <a href="http://www.mathworks.com/matlabcentral/fileexchange/4551-inpaint-nans" target="_blank">inpaint_nans()</a> to fill only the small gaps in the data, leaving longer gaps unfilled on the assumption that they represent modem lockups.<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/AVvXsEjMTxMsMtfIX9-Kzxj4WWl-eDjZhhQ2hkrdihYazecUCLtj00irryOIMBcdSRRwtMkEW2yqzEvXQIW-nn2b6Jr9jxKComqrDuhw3PRmwoprCkcimstJqaOEzL_AKnmLhrd-RFGCsAvqvhI/s1600/wholething.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="412" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMTxMsMtfIX9-Kzxj4WWl-eDjZhhQ2hkrdihYazecUCLtj00irryOIMBcdSRRwtMkEW2yqzEvXQIW-nn2b6Jr9jxKComqrDuhw3PRmwoprCkcimstJqaOEzL_AKnmLhrd-RFGCsAvqvhI/s640/wholething.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">3-10-15 to 7-18-15 overall plot before animation</td></tr>
</tbody></table>
<br />
Once the figure is established with linked axes and everything is as desired, the animation routine incrementally steps through the data by setting the x-axis limits and capturing a frame as a .png file on disk. Matlab has an inbuilt function for generating movies (as an array of structs) and writing them as an .avi. In practice, this is a horrible burden on both ram and disk. For a video containing roughly 1300 frames, this method required a 4.9GB memory footprint and created an even larger uncompressed .avi file. The avifile() function can't utilize any compression in a linux environment, so it's pretty much useless to me. Caching images as png keeps memory use from scaling with frame count, and it allows external tools to do the video work. For some reason, Matlab does a <i>much</i> better job of creating png files than jpg files; they're much smaller too.<br />
<br />
<pre class="brush:matlab;">%% animate a plot
% assume axes are time-coordinated and linked
% acts generically only on one axis
width=36; % window width in hours
framestep=0.5; % time step between frames
outputdir='/home/assbutt/cad_and_projects/modemplots/';
% keep axes from autoscaling
a0=gca;
a=findall(gcf,'type','axes');
for n=1:1:length(a);
axes(a(n));
axis manual
end
axes(a0); % return to original axis
nframes=ceil((max(t)-width)/framestep)
perh=length(t)/max(t); % actual number of samples per hour
xlim=[0 width];
for f=1:1:nframes;
set(gca,'xlim',xlim);
% place a date label in the middle of the figure
fdate=lineArray(round(perh*mean(xlim))); % date of center sample
h=text(-100,0,sprintf('%s',fdate{:}),'horizontalalignment','center');
set(h,'units','normalized','position',[0.5 -0.1 0],'fontsize',12);
% image height is trimmed to an even pixel for video encoding
pause(0.05); frame=getframe(gcf);
frame.cdata=255-frame.cdata; sf=size(frame.cdata);
imwrite(frame.cdata(1:end-(mod(sf(1),2)),:,:), ...
[outputdir 'frame_' sprintf('%04d',f) '.png'],'png');
xlim=xlim+framestep; delete(h);
end
</pre>
<br />
I invert the image data during write because I normally use Matlab with the <a href="http://epicbeardquest.blogspot.com/2014/09/in-my-recent-experiences-dealing-with_11.html">screen inverted</a>. It's too easy for me to create plots that are difficult to read unless they stay that way.<br />
<br />
The animation is a bit obnoxious because it grabs window focus constantly and makes it difficult to do anything else with the computer. I simply ran it on a second machine to avoid the hassle. Once everything was on disk, I compiled a video with avconv, though I suppose I could have gone directly to OpenShot with the image set. <br />
<br />
<pre class="consoleblock">avconv -r 24 -i frame_%04d.png -c:v libx264 -pix_fmt yuv420p out.mp4
</pre>
<br />
I threw some extra titles and such on the ends using OpenShot and kicked it to YouTube so that it has somewhere to sit and collect dust.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/csiYyhccChQ/0.jpg" frameborder="0" height="532" src="https://www.youtube.com/embed/csiYyhccChQ?feature=player_embedded" width="640"></iframe></div>
<br />
Overall, I think the method works and helps get a point across. It's easy to see the transition in the noise characteristics over time. It's easy to identify the mid-day instability of the connection. I should have used a thicker linewidth when plotting things; scaled down, it gets difficult to see details and read text. Apologies for the blurriness.<br />
<br />
Of course, maybe you don't want to lock axis scaling; maybe you want to change different aspects of the plot over the image sequence. The point is just to show that getframe() exists and avifile() is a fat ugly pig. Everything else is just hammering at graphics object properties in a loop. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-47928335046961755302015-07-18T05:24:00.000-07:002015-07-18T05:24:22.519-07:00I guess it's only appropriateAs I tried to explain <a href="http://epicbeardquest.blogspot.com/2015/07/blog-post.html" target="_blank">last time</a>, I consider this habit to be a unilateral affair. Until now, I'd no need to create a decoder. Out of curiosity, I decided to go ahead and make one; it was easy enough. To think all this time I hadn't known of <a href="http://www.mathworks.com/help/matlab/ref/base2dec.html" target="_blank">base2dec()</a>. I've been doing shit the hard way too many times. Oh well. Learning things is good.<br />
<br />
<pre class="brush:matlab;">%% text from unicode pictogram (arbitrary-base encoding)
clc; clear all;
format compact
instring='▄▆▂▆ ▄█▄▄ ▄▆█▂ ▄▆█▂ ▄█▂█ ▄▆▆▂ ▄▆▆▄ ▄█▄▂';
charmap='▂▄▆█'; % length(charmap)=b
space=' '; % thin space
b=length(charmap);
for n=0:1:b-1;
instring(findstr(instring,charmap(n+1)))=num2str(n);
end
instring(findstr(instring,space))=' ';
instring=str2num(instring); % simplifies indexing
outstring='';
for n=1:1:length(instring);
outstring=[outstring char(base2dec(num2str(instring(n)),b))];
end
outstring
</pre>
<br />
It works well enough. I suppose I could make it automagically find a minimal character set from the input pictogram string, but it wouldn't have any way of guessing the likely order. Granted, even a human would have to guess if the charmap used in encoding weren't conspicuously ordered. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-81086376277596953872015-07-16T03:13:00.003-07:002015-07-18T05:31:58.957-07:00▒░▒▓▓ ▒░▒▓▒ ▒▒░▓░ ▒░▓▓▓<span style="font-family: "Courier New",Courier,monospace;">
▄▂▂▄ ▄█▂█ ▂▆▂▂ ▄▆█▄ ▄█▄▄ ▄▆▂█ ▄▆▆▂ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆█▄ ▄▆▂▄ ▄█▆▄ ▂▆▂▂ ▄▆▆▂ ▄▆▂▄ ▄█▄▆ ▄▆▄▄ ▂▆▂▂ ▄▆▄▄ ▄▆█▆ ▄▆▆▆ ▄▆██ ▄█▆▄ ▄▆▄▄ ▄▆▄▂ ▂▆▂▂ ▄▆▂█ ▄▆▄▄ ▄█▂▆ ▄█▄▂ ▄▆▂▄ ▄▆▆▄ ▄▆█▆ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▄█▂█ ▂▆▂▂ ▄▆▆▄ ▄▆█▆ ▂▆▂▂ ▄█▂▂ ▄▆▂▄ ▄█▂▆ ▄█▄▂ ▄▆▆▄ ▄▆▂█ ▄█▄▄ ▄▆█▂ ▄▆▂▄ ▄█▂▆ ▂▆█▂ ▂▆▂▂ ▄▂▆▄ ▂▆▄█ ▄█▄▆ ▄▆▄▄ ▂▆▂▂ ▄▆▆▂ ▄▆▂▄ ▄▆▄▂ ▂▆▂▂ ▄▆▂▄ ▂▆▂▂ ▄▆▄█ ▄█▂▆ ▄▆██ ▄█▄█ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▄▂ ▄▆▆▄ ▄▆▄▆ ▄▆▄▆ ▄▆▆▄ ▄▆▂█ ▄█▄▄ ▄▆█▂ ▄█▄▂ ▄█▆▄ ▂▆▂▂ ▄▆▄▄ ▄▆█▆ ▄▆▆▆ ▄▆██ ▄█▆▄ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▂▄ ▄▆█▆ ▄█▆▄ ▄█▄▂ ▄▆▆▂ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▆▄ ▄▆█▆ ▂▆▂▂ ▄▆▄█ ▄▆▄▄ ▄▆█▆ ▄▆▄▄ ▄█▂▆ ▄▆▂▄ ▄▆█▂ ▂▆█▆ ▂▆▂▂ ▂▆▂▂ ▄▂▆▄ ▄█▄▂ ▂▆▂▂ ▄▆▂█ ▄█▂▆ ▄▆▄▄ ▄▆▄▄ ▄█▂▂ ▄█▂█ ▂▆▂▂ ▄▆▆▄ ▄▆█▆ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▄▄ ▄█▄▆ ▄▆▄▄ ▄█▂▆ ▄█▆▄ ▄█▄▂ ▄▆▆▂ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆█▂ ▂▆▂▂ ▄▆▄▆ ▄█▂▆ ▄▆██ ▄▆█▄ ▂▆▂▂ ▄▆█▄ ▄█▆▄ ▂▆▂▂ ▄▆▄▂ ▄█▂▆ ▄▆▄▄ ▄▆▂▄ ▄▆█▄ ▄█▂█ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆█▄ ▄▆▄▄ ▄▆█▄ ▄▆██ ▄█▂▆ ▄█▆▄ ▂▆█▆ ▂▆▂▂ ▂▆▂▂ ▄▄▄█ ▄▆▆▄ ▄█▄▂ ▄▆▆▂ ▂▆▂▂ ▄█▄█ ▄▆▂▄ ▄▆█▆ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄▆█▆ ▄▆▄▆ ▄▆▆▄ ▄▆▄▂ ▄▆▄▄ ▄▆█▆ ▄▆▂█ ▄▆▄▄ ▂▆█▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆▄▆ ▄▆▄▄ ▄▆▄▄ ▄▆█▂ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆██ ▄█▄▄ ▄▆▄█ ▄▆▆▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆▆▂ ▄▆▂▄ ▄█▄▆ ▄▆▄▄ ▄▆█▆ ▂▆▄█ ▄█▄▂ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆▂▆ ▄█▂▆ ▄▆▄▄ ▄▆▂▄ ▄█▄▂ ▄▆▆▂ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▄▄ ▄█▄▆ ▄▆▄▄ ▄▆█▆ ▂▆▂▂ ▄▆▄▄ ▄█▆▂ ▄█▂▂ ▄█▂▆ ▄▆▄▄ ▄█▂█ ▄█▂█ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▂▄ ▄█▄▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆▂█ ▄▆▂▄ ▄▆█▆ ▂▆▄█ ▄█▄▂ ▂▆▂▂ ▄▆▂█ ▄▆▂▄ ▄█▂▆ ▄▆▄▄ ▂▆▂▂ ▄▆▂▆ ▄▆▄▄ ▄█▆▄ ▄▆██ ▄▆█▆ ▄▆▄▂ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄█▂▆ ▄▆▄▄ ▄▆█▄ ▄▆▂▄ ▄▆▆▄ ▄▆█▆ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▄▂ ▄▆▆▄ ▄█▂█ ▄▆▄█ ▄█▄▄ ▄█▂█ ▄█▄▂ ▂▆▂▂ ▄▆██ ▄█▂▆ ▂▆▂▂ ▄█▂▆ ▄▆▄▄ ▄▆▄█ ▄█▂▆ ▄▆▄▄ ▄█▄▂ ▂▆█▆
<br /><br />
▄▄▂█ ▄█▄▂ ▄▆▆▄ ▄▆█▂ ▄▆█▂ ▂▆█▂ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▆▄ ▄█▂█ ▂▆▂▂ ▄▆▂▄ ▄▆█▆ ▄▆▆▄ ▄▆█▄ ▄▆▂▄ ▄▆█▂ ▂▆▂▂ ▄▆█▆ ▄▆▄▄ ▄▆▄▄ ▄▆▄▂ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄▆█▄ ▄▆█▄ ▄█▄▄ ▄▆█▆ ▄▆▆▄ ▄▆▂█ ▄▆▂▄ ▄█▄▂ ▄▆▄▄ ▂▆▂▂ ▄█▄█ ▄▆▄▄ ▄▆█▂ ▄▆█▂ ▄█▂█ ▂▆▂▂ ▄▆▄▆ ▄█▂▆ ▄▆██ ▄▆█▄ ▂▆▂▂ ▄█▄█ ▄▆▆▄ ▄█▄▂ ▄▆▆▂ ▄▆▆▄ ▄▆█▆ ▂▆█▆ ▂▆▂▂ ▂▆▂▂ ▄▂▂▄ ▄█▂█ ▂▆▂▂ ▄▆▂▄ ▂▆▂▂ ▄▆█▄ ▄▆▂▄ ▄█▂█ ▄█▄▂ ▄█▄▄ ▄█▂▆ ▄▆▂▆ ▄▆▂▄ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▂▆▂▂ ▄▆██ ▄▆▄▆ ▂▆▂▂ ▄▆█▆ ▄▆▄▄ ▄▆▂█ ▄▆▄▄ ▄█▂█ ▄█▂█ ▄▆▆▄ ▄█▄▂ ▄█▆▄ ▂▆█▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄▆█▆ ▄█▄▂ ▄▆▆▄ ▄▆█▆ ▄█▄▄ ▄▆▄▄ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▄█ ▄▆██ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄█▂▆ ▄▆██ ▄█▄▄ ▄▆▄█ ▄▆▆▂ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆█▄ ▄▆██ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▄█▂█ ▂▆█▆ ▂▆▂▂ ▂▆▂▂ ▄▂▆▄ ▄▆▄▆ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆▄▂ ▄█▂▆ ▄▆▆▄ ▄█▄▆ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄▆█▆ ▄▆▄▆ ▄▆█▂ ▄▆▆▄ ▄▆▂█ ▄█▄▂ ▂▆▂▂ ▄█▂▆ ▄▆▄▄ ▄▆█▄ ▄▆▂▄ ▄▆▆▄ ▄▆█▆ ▄█▂█ ▂▆▂▂ ▄▆▆▄ ▄▆█▆ ▄█▄▂ ▄▆▄▄ ▄█▂▆ ▄▆█▆ ▄▆▂▄ ▄▆█▂ ▂▆█▂ ▂▆▂▂ ▄▆▂▄ ▄▆█▆ ▄▆▄▂ ▂▆▂▂ ▄▆█▆ ▄▆██ ▂▆▂▂ ▄▆▄▄ ▄█▆▂ ▄█▄▂ ▄▆▄▄ ▄█▂▆ ▄▆█▆ ▄▆▂▄ ▄▆█▂ ▂▆▂▂ ▄▆▄▄ ▄█▆▂ ▄█▂▂ ▄▆▄▄ ▄▆▂█ ▄█▄▂ ▄▆▂▄ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▄█▂█ ▂▆▂▂ ▄▆▄▄ ▄█▆▂ ▄▆▆▄ ▄█▂█ ▄█▄▂ ▂▆█▂ ▂▆▂▂ ▄▆▂▄ ▄▆█▂ ▄▆█▂ ▂▆▂▂ ▄█▂▂ ▄█▂▆ ▄▆▄▄ ▄█▄▂ ▄▆▄▄ ▄▆█▆ ▄█▂█ ▄▆▄▄ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄▆█▄ ▄▆█▄ ▄█▄▄ ▄▆█▆ ▄▆▆▄ ▄▆▂█ ▄▆▂▄ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▂▆▂▂ ▄▆█▄ ▄▆▂▄ ▄█▆▄ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄█▄█ ▄▆▄▄ ▄▆█▂ ▄▆█▂ ▂▆▂▂ ▄▆▂▆ ▄▆▄▄ ▂▆▂▂ ▄▆▂▄ ▄▆▂▆ ▄▆▂▄ ▄▆█▆ ▄▆▄▂ ▄▆██ ▄▆█▆ ▄▆▄▄ ▄▆▄▂ ▂▆█▆
<br /><br />
▄▂▂▄ ▄▆█▆ ▄▆▄▂ ▂▆▂▂ ▄█▂█ ▄▆██ ▂▆▂▂ ▄▆▆▄ ▄█▄▂ ▂▆▂▂ ▄▆▄█ ▄▆██ ▄▆▄▄ ▄█▂█ ▂▆▂▂ ▄▆▂▄ ▄█▄▂ ▂▆▂▂ ▄█▄▂ ▄▆▆▄ ▄▆█▄ ▄▆▄▄ ▄█▂█ ▂█▆█ ▂▆▂▂ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄▆▄▄ ▄▆▂▄ ▄█▂█ ▄▆▆▄ ▄▆█▂ ▄█▆▄ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▂▆▂▂ ▄▆██ ▄▆█▆ ▄▆▄▄ ▂▆▂▂ ▄▆▂█ ▄▆▂▄ ▄▆█▆ ▂▆▂▂ ▄▆▆▂ ▄▆██ ▄▆█▂ ▄▆▄▂ ▂▆▂▂ ▄▆▄▂ ▄▆▆▄ ▄▆▂▄ ▄▆█▂ ▄▆██ ▄▆▄█ ▄█▄▄ ▄▆▄▄ ▂▆▂▂ ▄█▄█ ▄▆▆▄ ▄█▄▂ ▄▆▆▂ ▂▆▂▂ ▄▆▂▄ ▄▆█▆ ▂▆▂▂ ▄▆▄▄ ▄▆█▄ ▄█▂▂ ▄█▄▂ ▄█▆▄ ▂▆▂▂ ▄█▂▆ ▄▆██ ▄▆██ ▄▆█▄ ▂▆█▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄▆▂▆ ▄█▂▆ ▄█▄▄ ▄█▂█ ▄▆▆▂ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▄▆▆▄ ▄▆▄▂ ▄▆▄▄ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆▂▄ ▄█▂█ ▄█▂█ ▄█▄▄ ▄▆█▄ ▄█▂▂ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▂▄ ▄█▄▂ ▂▆▂▂ ▄▆█▄ ▄█▆▄ ▂▆▂▂ ▄█▄█ ▄▆██ ▄█▂▆ ▄▆▄▂ ▄█▂█ ▂▆▂▂ ▄█▄█ ▄▆▆▄ ▄▆█▂ ▄▆█▂ ▂▆▂▂ ▄▆▂▆ ▄▆▄▄ ▂▆▂▂ ▄█▂▆ ▄▆▄▄ ▄▆▂▄ ▄▆▄▂ ▂▆█▆ ▂▆▂▂ ▂▆▂▂ ▄▂▂▄ ▄█▂█ ▂▆▂▂ ▄▆▂▄ ▄▆█▆ ▄█▆▄ ▂▆▂▂ ▄█▂▂ ▄█▂▆ ▄▆██ ▄█▂▂ ▄▆▂▄ ▄▆▄█ ▄▆▂▄ ▄▆█▆ ▄▆▄▂ ▄▆▆▄ ▄█▂█ ▄█▄▂ ▂▆▂▂ ▄█▄█ ▄▆▆▄ ▄▆█▂ ▄▆█▂ ▂▆▂▂ ▄▆▄▂ ▄▆▄▄ ▄▆█▂ ▄▆▆▄ ▄▆▄█ ▄▆▆▂ ▄█▄▂ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▄▂ ▄▆▄▄ ▄▆█▆ ▄█▆▄ ▂▆█▂ ▂▆▂▂ ▄▆█▄ ▄▆▂▄ ▄▆▆█ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄█▂█ ▄█▄▄ ▄█▂▆ ▄▆▄▄ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▂▄ ▄█▄▂ ▂▆▂▂ ▄█▄█ ▄▆██ ▄█▂▆ ▄▆▄▂ ▄█▂█ ▂▆▂▂ ▄▆▂▄ ▄█▂▆ ▄▆▄▄ ▂▆▂▂ ▄▆█▄ ▄▆▄▄ ▄▆▂▄ ▄▆█▆ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▄▆█▂ ▄▆▄▄ ▄█▂█ ▄█▂█ ▂▆▂▂ ▄▆▆▄ ▄█▂█ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆▄▆ ▄▆▆▄ ▄█▂▆ ▄█▂█ ▄█▄▂ ▂▆▂▂ ▄█▂█ ▄█▄▂ ▄▆▄▄ ▄█▂▂ ▂▆▂▂ ▄█▄▂ ▄▆██ ▄█▄█ ▄▆▂▄ ▄█▂▆ ▄▆▄▂ ▂▆▂▂ ▄▆▄▄ ▄█▂█ ▄█▄▂ ▄▆▂▄ ▄▆▂▆ ▄▆█▂ ▄▆▆▄ ▄█▂█ ▄▆▆▂ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄▆██ ▄█▂▆ ▂▆▂▂ ▄▆▂▄ ▄▆▂█ ▄▆▆█ ▄▆█▆ ▄▆██ ▄█▄█ ▄▆█▂ ▄▆▄▄ ▄▆▄▂ ▄▆▄█ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▂▆▂▂ ▄█▄▂ ▄▆▆▂ ▄▆▄▄ ▂▆▂▂ ▄▆█▄ ▄▆▄▄ ▄▆▂▄ ▄▆█▆ ▄▆▆▄ ▄▆█▆ ▄▆▄█ ▄▆█▂ ▄▆▄▄ ▄█▂█ ▄█▂█ ▄▆█▆ ▄▆▄▄ ▄█▂█ ▄█▂█ ▂▆▂▂ ▄▆██ ▄▆▄▆ ▂▆▂▂ ▄▆▂▄ ▄▆▂█ ▄█▄▂ ▄▆▆▄ ▄▆██ ▄▆█▆ ▂▆█▆
</span><br />
<pre class="brush:matlab;">% text to unicode pictogram (arbitrary-base encoding)
clc; clear all;
format compact
instring=sprintf('And of course, I used Matlab to do it!');
charmap='▂▄▆█'; % length(charmap) determines numeric base
space=' '; % thin space
outstring='';
newchar='';
b=length(charmap);
bs=ceil(log(128)/log(b));
for n=1:1:length(instring);
nc=double(instring(n));
for m=1:1:bs;
bitstring=floor(mod(nc,b^m)/b^(m-1));
for k=0:1:bs-1;
if bitstring==k
newchar=[charmap(k+1) newchar];
end
end
end
outstring=[outstring newchar space];
newchar='';
end
outstring
</pre>
<span style="font-family: "Courier New",Courier,monospace;"><br />▄▂▂▄ ▄▆█▆ ▄▆▄▂ ▂▆▂▂ ▄▆██ ▄▆▄▆ ▂▆▂▂ ▄▆▂█ ▄▆██ ▄█▄▄ ▄█▂▆ ▄█▂█ ▄▆▄▄ ▂▆█▂ ▂▆▂▂ ▄▂▆▄ ▂▆▂▂ ▄█▄▄ ▄█▂█ ▄▆▄▄ ▄▆▄▂ ▂▆▂▂ ▄▂█▄ ▄▆▂▄ ▄█▄▂ ▄▆█▂ ▄▆▂▄ ▄▆▂▆ ▂▆▂▂ ▄█▄▂ ▄▆██ ▂▆▂▂ ▄▆▄▂ ▄▆██ ▂▆▂▂ ▄▆▆▄ ▄█▄▂ ▂▆▂▄ </span><br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-59330817763721069732015-07-11T15:11:00.002-07:002020-03-15T07:04:15.160-07:00Blend images with MATLAB<b>UPDATE: These scripts have been vastly improved. Find the current versions <a href="http://www.mathworks.com/matlabcentral/fileexchange/52513-image-blending-functions">here</a>.</b>
<br />
<br />
In the course of doing some image mutilation in Matlab, I had need to perform some blend operations. Prior to that point, I had been using GIMP to perform the task, but I'd rather be able to automate things. There are probably a number of FEX submissions that could replace this function, but like usual, I decided to reinvent the wheel and write my own. <br />
<br />
The following function makes available most of the common blend modes available in GIMP or Photoshop, but I decided to add a few extra things. Uncommon features include:<br />
<ul>
<li>Adjustable dodge/burn amount (not just opacity!) </li>
<li>Several luminance-dependent analogs of common functions</li>
<li>Lightness and Intensity modes</li>
<li>Several hue permutation modes</li>
<li>Several color permutation (hue & saturation) modes</li>
<li>Inputs can be single images or image sequences (4-D inputs!)</li>
</ul>
The ability to handle 4-D inputs is a big plus for processing animation sequences. The function can take matching 3-D or 4-D array inputs, or a mismatched input of one image and a 4-D array. In the latter case, the single image is blended with all frames of the 4-D input. This makes it possible to easily blend a static overlay onto all frames of an animation, for instance. <br />
<br />
This is probably in need of some work still; I'd like to add some sort of alpha support to things perhaps. In the meantime, it's working well. Many of the conversions use <a href="http://www.mathworks.com/matlabcentral/fileexchange/28790-colorspace-transformations" target="_blank">colorspace()</a> from <a href="http://www.mathworks.com/matlabcentral/profile/authors/869857-pascal-getreuer">Pascal Getreuer</a>.
<br />
<pre class="brush:matlab;">function outpict=imblend(FG,BG,opacity,blendmode,amount)
% IMBLEND(FG, BG, OPACITY, BLENDMODE,{AMOUNT})
% blend images or imagesets as one would blend layers in GIMP or
% Photoshop.
%
% FG, BG are RGB image arrays of same H,V dimension
% both can be single images or 4-D imagesets of equal length
% can also blend a single image with a 4-D imageset
% mismatches of dimensions 3:4 result in array expansion
% allows blending static overlays with an entire animation
% mismatches of dimensions 1:2 are not supported
% OPACITY is a scalar from 0 to 1
% defines mixing of blended result and original BG
% AMOUNT is a scalar (optional, default 1)
% used to internally scale the influence of blend calculations
% BLENDMODE is a string assignment (see list)
%
%
% MODES:
% normal
% screen
% overlay (standard method)
% softlight (GIMP overlay)
% hardlight
% vividlight
% hardmix (similar to posterization) amount:[0 1]
% posterize (stronger influence from mask)
% colordodge (similar to GIMP dodge) amount:[0 1]
% colorburn (similar to GIMP burn) amount:[0 1]
% lineardodge amount:[0 1]
% linearburn amount:[0 1]
% lighten RGB (lighten only (RGB))
% darken RGB (darken only (RGB))
% lighten Y (lighten only (luma only))
% darken Y (darken only (luma only))
% scale add (add bg to fg deviation from mean) amount:(-inf to +inf)
% scale mult (scale bg by mean-normalized fg) amount:(-inf to +inf)
% multiply
% divide
% addition
% subtraction
% difference
% exclusion
% hue
% saturation
% value
% luma1 (uses colorspace() YIQ conversion)
% luma2 (Image Processing toolbox YIQ conversion)
% lightness (approx identical to intensity)
% intensity
% color
% permute H>H (rotates hue by mask hue) amount:(-inf to +inf)
% permute dH>H (rotates hue by hue difference) amount:(-inf to +inf)
% permute Y>H (rotates hue by mask luma) amount:(-inf to +inf)
% permute dY>H (rotates hue by luma difference) amount:(-inf to +inf)
% permute H>HS (rotates color by mask hue) amount:(-inf to +inf)
% permute dH>HS (rotates color by hue difference) amount:(-inf to +inf)
% permute Y>HS (rotates color by mask luma) amount:(-inf to +inf)
% permute dY>HS (rotates color by luma difference) amount:(-inf to +inf)
%
% NOTE:
% modes which accept 'amount' argument are marked with effective range
% dH>H and dH>HS permutations are same as 'hue' when amount==-1
% color permutations combine hue rotation and saturation blending
% saturation blending is maximized when abs(amount)==1
%
% CLASS SUPPORT:
% Accepts images of 'uint8', 'double', and 'logical'
% Return type is inherited from BG
% In the case of a 'double' input, any image containing values >1
% is assumed to have a white value of 255.
% SOURCES:
% http://www.venture-ware.com/kevin/coding/lets-learn-math-photoshop-blend-modes/
% http://www.deepskycolors.com/archive/2010/04/21/formulas-for-Photoshop-blending-modes.html
% http://en.wikipedia.org/wiki/Blend_modes
% http://en.wikipedia.org/wiki/YUV
% http://www.kineticsystem.org/?q=node/13
% http://www.simplefilter.de/en/basics/mixmods.html
if nargin ~= 5
amount=1;
end
% i had intended to make this more class-insensitive, but i never need it
% output type is inherited from BG, assumes white value of either 1 or 255
inclassFG=class(FG);
inclassBG=class(BG);
if strcmp(inclassFG,'uint8')
fgmax=255;
elseif strcmp(inclassFG,'double')
if max(max(max(FG)))<=1
fgmax=1;
else
fgmax=255;
end
elseif strcmp(inclassFG,'logical')
fgmax=1;
else
disp('IMBLEND: unsupported class for FG')
return
end
if strcmp(inclassBG,'uint8')
bgmax=255;
elseif strcmp(inclassBG,'double')
if max(max(max(BG)))<=1
bgmax=1;
else
bgmax=255;
end
elseif strcmp(inclassBG,'logical')
bgmax=1;
else
disp('IMBLEND: unsupported class for BG')
return
end
% expand along dimension 3 where necessary
if size(FG,3)&ltsize(BG,3)
FG=repmat(FG,[1 1 size(BG,3) 1]);
elseif size(FG,3)&gtsize(BG,3)
BG=repmat(BG,[1 1 size(FG,3) 1]);
end
% check if height & width match
sFG=size(FG);
sBG=size(BG);
if any(sFG(1:2)~=sBG(1:2))
disp('IMBLEND: images of mismatched dimension')
return
end
% check frame count and expand as necessary
if length(sFG)~=4 && length(sBG)~=4 % two single images
images=1;
else
if length(sFG)~=4 % single FG, multiple BG
FG=repmat(FG,[1 1 1 sBG(4)]);
elseif length(sBG)~=4 % multiple FG, single BG
BG=repmat(BG,[1 1 1 sFG(4)]); sBG=size(BG);
elseif sFG(4)~=sBG(4) % two unequal imagesets
disp('IMBLEND: imagesets of unequal length')
return
end
images=sBG(4);
end
% perform blend operations
outpict=zeros(sBG);
for n=1:1:images
I=double(BG(:,:,:,n))/bgmax;
M=double(FG(:,:,:,n))/fgmax;
switch lower(blendmode)
case 'normal'
R=M;
case 'screen'
R=1-((1-M).*(1-I));
case 'overlay' % actual standard overlay mode
hi=I>0.5; lo=I&lt=0.5;
R=zeros(size(I));
R(lo)=2*I(lo).*M(lo);
R(hi)=1-2*(1-M(hi)).*(1-I(hi));
case 'softlight' % same as GIMP 'overlay' due to legacy bug
Rs=1-((1-M).*(1-I));
R=(I.*((1-I).*M+Rs));
case 'hardlight'
hi=M&gt0.5; lo=M&lt=0.5;
R=zeros(size(I));
R(lo)=2*I(lo).*M(lo);
R(hi)=1-2*(1-M(hi)).*(1-I(hi));
case 'vividlight' % test this; example formulae are inconsistent
hi=M&gt0.5; lo=M&lt=0.5;
R=zeros(size(I));
R(lo)=1-(1-I(lo))./(2*M(lo));
R(hi)=I(hi)./(1-2*(M(hi)-0.5));
case 'posterize' % actually a broken version of vividlight
hi=M&gt0.5; lo=M&lt=0.5;
R=zeros(size(I));
R(lo)=(1-I(lo))./(2*(M(lo)-0.5));
R(hi)=1-I(hi)./(1-2*M(hi));
case 'hardmix' % ps mode similar to posterization
amount=max(min(amount,1),0);
Rs=M+I;
R=Rs;
R(Rs&gt1)=1*amount;
R(Rs&lt1)=0;
% DODGES/BURNS
case'colordodge'
amount=max(min(amount,1),0);
R=I./(1-M*amount);
case 'colorburn'
amount=max(min(amount,1),0);
R=1-(1-I)./(M*amount+(1-amount));
case 'lineardodge' % addition
amount=max(min(amount,1),0);
R=M*amount+I;
case 'linearburn'
amount=max(min(amount,1),0);
R=M*amount+I-1*amount;
% SIMPLE MATH OPS
case 'lighten rgb' % lighten only (RGB, no luminance)
R=max(I,M);
case 'darken rgb' % darken only (RGB, no luminance)
R=min(I,M);
case 'lighten y' % lighten only (based on luminance)
Myiq=colorspace('RGB-&gtYIQ',M);
Iyiq=colorspace('RGB-&gtYIQ',I);
mask=Myiq(:,:,1)&gtIyiq(:,:,1);
R=double(replacepixels(255*I,mask,255*M))/255;
case 'darken y' % darken only (based on luminance)
Myiq=colorspace('RGB-&gtYIQ',M);
Iyiq=colorspace('RGB-&gtYIQ',I);
mask=Myiq(:,:,1)&ltIyiq(:,:,1);
R=double(replacepixels(255*I,mask,255*M))/255;
case 'multiply'
R=M.*I;
case 'divide'
R=I./(M+1E-3);
case 'addition' % same as lineardodge
R=M+I;
case 'subtraction'
R=I-M;
case 'difference'
R=abs(M-I);
case 'exclusion'
R=M+I-2*M.*I;
case 'hue'
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=Mhsv(:,:,1);
R=hsv2rgb(Rhsv);
case 'saturation'
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,2)=Mhsv(:,:,2);
R=hsv2rgb(Rhsv);
% V=max([R G B])
% L=mean(max([R G B]),min([R G B]))
% I=mean([R G B])
% Y=[0.299 0.587 0.114]*[R G B]'
case 'value'
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,3)=Mhsv(:,:,3);
R=hsv2rgb(Rhsv);
% all colorspace() Y-swaps produce identical results within 1 LSB
% (YUV, YIQ, YCbCr, YPbPr, YDbDr)
case 'luma1' % swaps fg bg luma
Myiq=colorspace('RGB-&gtYIQ',M);
Ryiq=colorspace('RGB-&gtYIQ',I);
Ryiq(:,:,1)=Myiq(:,:,1);
R=colorspace('RGB&lt-YIQ',Ryiq);
case 'luma2' % swaps fg bg luma (using IP toolbox)
Myiq=rgb2ntsc(M);
Ryiq=rgb2ntsc(I);
Ryiq(:,:,1)=Myiq(:,:,1);
R=ntsc2rgb(Ryiq);
% L and I swaps are calculated differently,
% but results are practically identical (within 1 LSB)
% for all available HSL and HSI conversion implementations
case 'lightness' % swaps fg bg lightness
Mhsl=colorspace('RGB-&gtHSL',M);
Rhsl=colorspace('RGB-&gtHSL',I);
Rhsl(:,:,3)=Mhsl(:,:,3);
R=colorspace('RGB&lt-HSL',Rhsl);
case 'intensity' % swaps fg bg intensity
Mhsi=colorspace('RGB-&gtHSI',M);
Rhsi=colorspace('RGB-&gtHSI',I);
Rhsi(:,:,3)=Mhsi(:,:,3);
R=colorspace('RGB&lt-HSI',Rhsi);
case 'color' % same as GIMP, swap H&S
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1:2)=Mhsv(:,:,1:2);
R=hsv2rgb(Rhsv);
% HUE PERMUTATIONS
case 'permute y>h' % permutes bg hue based on fg luma
factors=[0.299 0.587 0.114];
osize=size(M(:,:,1));
cscale=repmat(reshape(factors,1,1,3),[osize 1]);
Y=sum(M.*cscale,3);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+Y*amount,1);
R=hsv2rgb(Rhsv);
case 'permute h>h' % permutes bg hue based on fg hue
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+Mhsv(:,:,1)*amount,1);
R=hsv2rgb(Rhsv);
case 'permute dy>h' % permutes bg hue based on luma difference
factors=[0.299 0.587 0.114];
osize=size(M(:,:,1));
cscale=repmat(reshape(factors,1,1,3),[osize 1]);
Ym=sum(M.*cscale,3);
Yi=sum(I.*cscale,3);
dY=Yi-Ym;
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+dY*amount,1);
R=hsv2rgb(Rhsv);
% note that dH+H permutation is same as a hue swap when amount==-1
case 'permute dh>h' % permutes bg hue based on hue difference
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
dH=Rhsv(:,:,1)-Mhsv(:,:,1);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+dH*amount,1);
R=hsv2rgb(Rhsv);
% COLOR PERMUTATIONS (rotate hue and blend saturation)
case 'permute y>hs' % permutes bg color based on fg luma
factors=[0.299 0.587 0.114];
osize=size(M(:,:,1));
cscale=repmat(reshape(factors,1,1,3),[osize 1]);
Y=sum(M.*cscale,3);
amt=max(min(abs(amount),1),0); % needed since S-blending has limited range
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+Y*amount,1);
Rhsv(:,:,2)=amt*Mhsv(:,:,2)+(1-amt)*Rhsv(:,:,2);
R=hsv2rgb(Rhsv);
case 'permute h>hs' % permutes bg color based on fg hue
amt=max(min(abs(amount),1),0); % needed since S-blending has limited range
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+Mhsv(:,:,1)*amount,1);
Rhsv(:,:,2)=amt*Mhsv(:,:,2)+(1-amt)*Rhsv(:,:,2);
R=hsv2rgb(Rhsv);
case 'permute dy>hs' % permutes bg color based on luma difference
factors=[0.299 0.587 0.114];
osize=size(M(:,:,1));
cscale=repmat(reshape(factors,1,1,3),[osize 1]);
Ym=sum(M.*cscale,3);
Yi=sum(I.*cscale,3);
dY=Yi-Ym;
amt=max(min(abs(amount),1),0); % needed since S-blending has limited range
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+dY*amount,1);
Rhsv(:,:,2)=amt*Mhsv(:,:,2)+(1-amt)*Rhsv(:,:,2);
R=hsv2rgb(Rhsv);
% note that dH+H permutation is same as a hue swap when amount==-1
case 'permute dh>hs' % permutes bg color based on hue difference
amt=max(min(abs(amount),1),0); % needed since S-blending has limited range
Mhsv=rgb2hsv(M);
Rhsv=rgb2hsv(I);
dH=Rhsv(:,:,1)-Mhsv(:,:,1);
Rhsv(:,:,1)=mod(Rhsv(:,:,1)+dH*amount,1);
Rhsv(:,:,2)=amt*Mhsv(:,:,2)+(1-amt)*Rhsv(:,:,2);
R=hsv2rgb(Rhsv);
% SCALE ADD treats FG as an additive gain map with a null point at its mean
case 'scale add'
Mstretch=imadjust(M,stretchlim(M));
centercolor=mean(mean(Mstretch,1),2);
R=zeros(size(I));
for c=1:1:3;
R(:,:,c)=I(:,:,c)+(Mstretch(:,:,c)-centercolor(:,:,c))*amount;
end
% SCALE MULT treats FG as a gain map with a null point at its mean
case 'scale mult'
Mstretch=imadjust(M,stretchlim(M));
centercolor=mean(mean(Mstretch,1),2);
R=zeros(size(I));
for c=1:1:3;
R(:,:,c)=I(:,:,c).*(Mstretch(:,:,c)./centercolor(:,:,c))*amount;
end
otherwise
disp('IMBLEND: unknown blend mode');
return
end
R=min(R,1);
R=max(R,0);
R(isnan(R))=1;
outpict(:,:,:,n)=bgmax*(opacity*R + I*(1-opacity));
end
outpict=cast(outpict,inclassBG);
return
</pre>
<br />
I've been thinking about putting some polish on the rest of my image-garbling toolbox, so maybe I'll reveal some examples in time. I've also been toying with the idea of doing some animated plots of large datasets. That may be interesting.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-5851332800128256308.post-70082582171793628752015-07-01T06:39:00.002-07:002015-07-05T21:20:18.189-07:00Revisiting STARS-922 and Other StuffThere seems to be some skepticism and curiosity that surround STARS-922 thermal compound (aka "heat sink plaster") and some similar products. I know I've wondered for a while myself and I've run across a handful of <a href="http://club.dx.com/forums/forums.dx/threadid.621782?page=1" target="_blank">forum</a> posts that question its purpose or properties. Places like <a href="http://www.dx.com/p/adhesive-solder-heatsink-plaster-for-pc-hard-parts-5g-37514" target="_blank">DealExtreme</a> and <a href="http://www.ebay.com/itm/New-GPU-IC-PC-Thermal-Conductive-Adhesive-Heatsink-Compound-Glue-Viscous-Plaster-/261232496231?pt=LH_DefaultDomain_0&hash=item3cd2ab8e67" target="_blank">Ebay</a>
sell lots of this product along side other more common zinc-oxide
thermal pastes with limited product differentiation. The poorly
translated and dubious specifications and naming don't help to instill
confidence that it is trustworthy of any particular application. On some occasions, customer reviews boast "strong" or "excellent conductivity" although i doubt either metric had been actually evaluated beyond the emotional satisfaction associated with the completion or failure of the parent project as determined by myriad other factors. I've found few satisfactorily detailed reviews, so I figured I'd add this bit of info to augment my halfass thermal testing from the <a href="http://epicbeardquest.blogspot.com/2015/06/measuring-thermal-resistance.html" target="_blank">prior post</a>.<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/AVvXsEjmfjVwVtEtSy9LygBlwWsiOJYiCoomuVb983h-zLTXnEJk5EqNEtDMLQYQSAsnNNL6RvG6ZaZKxLDvuu1HHRCjtxVBVIpdq32QDPbmZg3As6iCZGmC2AzBVaTf3kkI66vzlpC7YrBDGBw/s1600/sku_37514_1.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmfjVwVtEtSy9LygBlwWsiOJYiCoomuVb983h-zLTXnEJk5EqNEtDMLQYQSAsnNNL6RvG6ZaZKxLDvuu1HHRCjtxVBVIpdq32QDPbmZg3As6iCZGmC2AzBVaTf3kkI66vzlpC7YrBDGBw/s320/sku_37514_1.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">What the hell do you mean "plaster"?</td></tr>
</tbody></table>
<br />
Some of the questionable property specifications are:<br />
<ul>
<li>Thermal conductivity: > 1.2W/m-K </li>
<li>Thermal Impedance: < 0.06<span style="color: red;"><b> <span style="color: orange;">(what units?)</span></b></span> </li>
<li>Clotting time: 3min (25 degree celsius) <span style="color: orange;"><b>(all of it or just the exposed stuff?)</b></span> </li>
<li>Strength of connected buildings: 25Kg <span style="color: orange;"><b>(what?)</b> </span></li>
<li>Temperature resistance: 200 degree celsius<b><span style="color: red;"></span></b></li>
</ul>
Following some of my own experience and a few comments noting that it had little adhesive capability, I figured I would try to get a better feel for the mechanical properties of the product in a way that should at least lend intuition a better handle on what's appropriate to expect.<br />
<br />
First off, this product is not a thermal grease. It is much more viscous and does indeed congeal on exposure to air. The cured product is slightly rubbery, but not as elastic as one might expect from a conventional RTV silicone caulking. The most common place I have seen this is in the bonding of the MCPCB to the radiator body of cheap LED retrofit lamps. In such an application, temperatures are low and mechanical stress is small. The MCPCB has only a small mass, and the aspect ratio ensures that it is difficult to produce a tension stress at the interface. This is all overshadowed by the advantage of being enclosed. Nothing can stress the bonded part except its own inertia. This seems to be a rather forgiving application, mechanically speaking. Will it work for larger SMT heat sinks or other things? We need to have a bit more understanding about its actual strength in shear and tension.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXnCsm5Zsfx3iqWk8OApq32PgAZC8fbNpf85rv5_01-eDkUzIGHkzhR0dryFjHmsqHYRzHVc9wEqjhlqf7vxLjrzxA_UEINTqrxXcplAtqdUXY2SCbmQ0OfBfa37Y758tLnxOx0wr7YKE/s1600/setup+for+FT+2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXnCsm5Zsfx3iqWk8OApq32PgAZC8fbNpf85rv5_01-eDkUzIGHkzhR0dryFjHmsqHYRzHVc9wEqjhlqf7vxLjrzxA_UEINTqrxXcplAtqdUXY2SCbmQ0OfBfa37Y758tLnxOx0wr7YKE/s640/setup+for+FT+2.jpg" width="640" /></a></div>
<span id="goog_1131948932"></span><span id="goog_1131948933"></span><br />
In order to test shear and tension strength, I put together a setup in the lathe consisting of various repurposed fixturing and a 1000# load cell with a selectable-gain instrumentation amplifier. Since I never finished the microcontroller DRO that was supposed to go with the amplifier I made for this load cell, I have to use the multimeter to take direct readings. Despite the extra clumsiness of operations, the results would be the same. To get the approximate peak value at break, I simply used the phone to record operations. Accepting that the periodic multimeter update is the result of an averaging operation and may lag the actual value, and forgiving my inability to produce a smooth and monotonically increasing tension by handscrew, the captured values should be acceptable for the intended purpose if averaged across a few samples.<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/AVvXsEhTZKNTImfUJKeuhkljMfyCTXGWY95hHKo3koiJRmFPyy4kIO-aplXEipNh8QVTXDOPv8yM1C9SqHJbTE8vI4MaU8y0i_VAffGQthHJeV216AiEDOwJlCQK6vZvrQGKsgzTlo2TIuxeME8/s1600/2015-07-03_05-35-54_673.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTZKNTImfUJKeuhkljMfyCTXGWY95hHKo3koiJRmFPyy4kIO-aplXEipNh8QVTXDOPv8yM1C9SqHJbTE8vI4MaU8y0i_VAffGQthHJeV216AiEDOwJlCQK6vZvrQGKsgzTlo2TIuxeME8/s640/2015-07-03_05-35-54_673.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">some assembled samples and spring clamp for alignment</td></tr>
</tbody></table>
<br />
The shear samples consist of aluminum plates cut so that they produce a lap joint with approximately one square inch of area. The tension samples are old <a href="http://www.maxilift.com/Accessories/Bolts.aspx" target="_blank">elevator bucket bolts</a> that have had their head faces ground and scoured. All samples are ground and scoured in degreaser as needed to prepare a fresh surface each time. No particular assembly fixturing was used; no clamping was performed except to gently maintain alignment with adhesives that were flowable (e.g. molten hot glue). Samples were tested with heat sink plaster, some Permatex RTV silicone products, as well as generic superglue and two unknown hot glue products. One was a soft and flexible hobby-marketed product, and the other was a harder Arrow brand carpentry-marketed product, if I recall correctly.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLt0z7ipC69zww9puAwhl99BSVniPi0PH25FXmnAN3AeccwhInwEOwXRqtIjONoJkk6Uv-Eu96jgTFuKd9E3LX93hstLwYcfrOGIjD78Pjb-DEw4OGmudxvR8jZqYn8x43hvDxQo3uvqw/s1600/tensionplot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLt0z7ipC69zww9puAwhl99BSVniPi0PH25FXmnAN3AeccwhInwEOwXRqtIjONoJkk6Uv-Eu96jgTFuKd9E3LX93hstLwYcfrOGIjD78Pjb-DEw4OGmudxvR8jZqYn8x43hvDxQo3uvqw/s640/tensionplot.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4_UpHIMVZeH8CNJRn71_ubOvv9ChCIaxKhoAcaxjtPVvbd0KMEP_Bg_32zwgM0is1hoQ-Rmv2h2CwyPnkaH3eTD0Tug-NODAg-qr06Z6YgL3HkXCo-fJJ-gj5U6dPNSWtLjYGx7V6WXk/s1600/shearplot2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4_UpHIMVZeH8CNJRn71_ubOvv9ChCIaxKhoAcaxjtPVvbd0KMEP_Bg_32zwgM0is1hoQ-Rmv2h2CwyPnkaH3eTD0Tug-NODAg-qr06Z6YgL3HkXCo-fJJ-gj5U6dPNSWtLjYGx7V6WXk/s640/shearplot2.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<span id="goog_1348583985">In approximate terms, the heat sink plaster (HSP) is about on par with a low-strength RTV silicone. As with the prior thermal resistance testing, I ran a few sample groups of <a href="http://www.permatex.com/products-2/product-categories/gasketing/gasket-makers/permatex-ultra-grey-rigid-high-torque-rtv-silicone-gasket-maker-detail" target="_blank">Permatex Ultra Grey RTV</a> and <a href="http://www.permatex.com/products-2/product-categories/gasketing/gasket-makers/permatex-sensor-safe-high-temp-rtv-silicone-gasket-detail" target="_blank">High Temp Red RTV</a></span><span id="goog_1348583986"></span> gasketing products. These represent the extremes of the product spectrum in terms of specified tensile strength and filler density. It's a fair bet to assume that if you'd be comfortable with the strength of your favorite RTV silicone, the strength of HSP will be sufficient for your task. There are a few things to consider, though.<br />
<br />
One of the primary obstacles I ran into with this setup is that I'm testing air-cured materials in thin sections. With nonporous sample substrate, the geometry of the test patch does end up becoming important. Especially with attempts to cure products at room temperature, it was not uncommon to find samples that were only cured on an annulus around the perimeter of the bond patch. Most of these partially-cured sample groups were discarded for various reasons, typically nonuniformity or large variance within a group. In the case of some samples with uniform partial curing, I made my best attempt to measure the effective cured area using image processing after the break test. While I note that my goal here is to measure strength of the cured adhesive fraction, I did not make any differentiation in the thermal testing process. It may be worth knowing if the thermal resistance is much higher when the center of the sample patch has cured completely, but I can't exactly put the thermal test fixture in the oven with all its plastic bits. I'm also far too lazy to do larger test groups over a longer natural curing interval of say a month. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rmmN0Dy-zToIkU6BczOfmoCbZYREP3QkQy74xK0Tm-t64LNzpaGcBi729dkRG0vcUHFkpEsYyeNybfSD9vgX4FNPWAdGiQy4K2rxOJs50IFWLnWELeWbmlI0lNWanwSZ8T-fRIwPr5M/s1600/wet+ug+rtv+fs+samples+mask1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3rmmN0Dy-zToIkU6BczOfmoCbZYREP3QkQy74xK0Tm-t64LNzpaGcBi729dkRG0vcUHFkpEsYyeNybfSD9vgX4FNPWAdGiQy4K2rxOJs50IFWLnWELeWbmlI0lNWanwSZ8T-fRIwPr5M/s400/wet+ug+rtv+fs+samples+mask1.jpg" width="400" /></a></div>
<br />
For what it's worth, the image processing used to calculate partial bond area is rather simple and goes to show that GIMP or Photoshop are useful for more than just <strike>meandering artfaggotry</strike> drawing and editing photos. It goes like this:<br />
<ul>
<li>Remove uncured adhesive with solvent</li>
<li>Take photos of both halves</li>
<li>Transform image areas to geometric correspondence</li>
<li>Perform threshold operation to isolate cured material</li>
<li>Multiply images to get combined coverage</li>
<li>Find average pixel value</li>
</ul>
The example shown is not a particularly well-cured sample (42% cured), but it was from a group that were uniform. <br />
<br />
In my attempts to expedite thorough curing of the samples, I tried several runs at elevated temperatures in the oven. Some of these resulted in reduced and typically inconsistent strength. In the case of the RTV, some of the extended cure times (96 hours at 70-80 °C) showed very low shear strength, and the bond patterns were not characteristic of radial curing. My guess is that as the silicone cured, it becomes increasingly difficult to outgas any remaining volatile products and pressure produced tear channels in the material near which further curing can take place.<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/AVvXsEin4rAhYOsFYo5jlRph7swNMfSQZ5jtqOPCkKNnUU_96nYkebkpLbP20EtrQrjdH7qk9np2uMR60yQdQR0zb0Ej_z-Drz-VIt3oVX6VSrX8kEErsBI3T3-B7EnIrgXrnSv4ccNOJUaYcso/s1600/2015-06-30_10-18-36_611.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin4rAhYOsFYo5jlRph7swNMfSQZ5jtqOPCkKNnUU_96nYkebkpLbP20EtrQrjdH7qk9np2uMR60yQdQR0zb0Ej_z-Drz-VIt3oVX6VSrX8kEErsBI3T3-B7EnIrgXrnSv4ccNOJUaYcso/s400/2015-06-30_10-18-36_611.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">some bad rtv shear samples</td></tr>
</tbody></table>
<br />
Some of the samples of heat sink plaster which were cured at high temperatures (100 °C) became dry and friable, taking on a tan color. These samples still exhibited normal shear strength, but had dramatically reduced tensile strength. Whether this loss of pliability and tensile strength occurs at lower temperatures over a longer time frame is unknown, but could potentially be a limiting factor in reliability. It also calls into direct question the product specifications. I doubt that the dry state is an intended condition for the product; consequently, I doubt that the 200 °C rating is realistic. The condition of samples cured at 70 °C was significantly better than those cured at only 30 °C more.<br />
<br />
Overall, the product performance is more than adequate for small heat sinks, particularly low-height heat sinks. The thermal performance is not exceptional, but for the same area, it has a similar thermal resistance compared to a grease, despite forming a relatively thick interface film. I still would hesitate to refer to it as a self-shimming type TIM, as I doubt that it's intended to serve as an electrical insulator. That said, It's important to note the limitations of these tests.<br />
<br />
All of the RTV silicone and HSP samples are very fresh and really don't represent thoroughly cured material. It may be reasonable to expect stronger bonds over a time span of a month or so, depending on the ability of the center of the bond patch to breathe. Similarly, these tests do not indicate whether strength or thermal performance will be sustained over much longer time frames at elevated temperatures. Longevity is still uncertain, and performance at temperatures beyond 100 °C is questionable. <br />
<br />
That said, there are always other products available that fill a similar role. STARS-922 is simply the cheapest option. There are other <a href="http://www.dx.com/p/fujik-silicone-thermal-glue-50ml-grease-like-4579" target="_blank">cheap options</a> out there in the realm of silicone products, and there are also <a href="http://www.mouser.com/ProductDetail/MG-Chemicals/8329TCM-6ML/?qs=sGAEpiMZZMsiS1%252bJOF5PnwpqSqy%2fOice99%2fPJ6pAwIE%3d" target="_blank">epoxies</a> for use when greater strength is desired and disassembly isn't intended. There are always the myriad products from <a href="http://www.ellsworth.com/products/by-manufacturer/henkel-loctite/thermally-conductive-materials/adhesives/henkel-loctite-output-315-thermally-conductive-adhesive-blue-25-ml-cartridge/" target="_blank">Loctite</a> and <a href="http://www.ellsworth.com/products/by-market/consumer-products/thermally-conductive-materials/adhesives/dow-corning-se4486-cv-thermally-conductive-adhesive-white-330-ml-cartridge/" target="_blank">Dow</a> for specific applications, though most of these are far too expensive for the hobbyist. <br />
<br />
One other note as an aside: the hot glue samples were not applied
with a glue gun. These, like most cases where I use hot glue, were
applied with a heat gun. This is due to the simple fact that molten
glue typically lacks the thermal capacity to heat a conductive substrate
sufficiently to allow bonding to take place before the glue
solidifies. Disregard for this simple fact appears widespread, as it
seems every time I encounter hot glue in assembled products, it simply
pops off the surfaces cleanly. So long as you can heat parts manually,
hot glue does indeed have utility outside the realm of gluing googly
eyes onto cotton balls. Even the cheap hobby products are incredibly
strong so long as the application temperatures stay low. <br />
<br />
Finally, I'll leave you with this bit of Matlab kludge that I put together to create the bar graph above. I always get so frustrated trying to use spreadsheet graphing utilities to do anyhing. It's impossible to get half the features that are desired, and the figures come out with cartoonish inelegance and poor repeatability. Granted, a configuration with proportionally-correspondent dual axes is a hassle even in Matlab, but at least Matlab provides a superabundance of flexibility. One might ask why anyone would ever need dual x or y axes, but the simple answer seems like a terribly common necessity to me: depicting one set of data in both metric and imperial units. <br />
<br />
<pre class="brush:matlab;">%% plot adhesive properties
clc; clf; clear all
format compact;
xt={'HT RTV 48h @ 70dC' 'HSP 24h @ 25dC' 'HSP 48h @ 70dC' 'UG RTV 48h @ 70dC' ...
'Super Glue (generic)' 'Hot Glue (soft clear)' 'Hot Glue (hard amber)'};
ytkpa=[1299 1366 1860 2418 2552 3354 4758];
scalefactor=690/4758;
ytpsi=ytkpa*scalefactor;
scalelabels={'kPa' 'PSI'};
titlestring='Tensile Stress at Break';
ystretch=0; % stretches bar widths for better fit
% create first axis
hl1 = barh(1:1:length(xt),ytkpa);
ax1 = gca;
set(ax1,'XColor','r','YColor','k','box','off','color','none','YTickLabel',xt,...
'XAxisLocation','bottom','YAxisLocation','left','XGrid','on',...
'TickLength',[0.015 0],'ylim',[0+ystretch length(xt)+1-ystretch])
% this hackery removes the top and right tick marks from ax1
b = axes('Position',get(ax1,'Position'),'box','on','xtick',[],'ytick',[]);
axes(ax1); linkaxes([ax1 b]);
% create second axis
ax2 = axes('Position',get(ax1,'Position'),'XColor','b','YColor','k',...
'XAxisLocation','top','YAxisLocation','right','Color','none',...
'XGrid','on','Ytick',[],'TickLength',[0.02 0],...
'xlim',get(ax1,'xlim')*scalefactor,'ylim',get(ax1,'ylim'));
hold(ax2,'on')
hl2 = barh(1:1:length(xt),ytpsi,'Parent',ax2);
set(hl2,'facecolor',[1 1 1]*0.5,'edgecolor',[1 1 1]*0);
set(get(hl2,'BaseLine'),'color','k')
% set and position the labels and titles
xl1=xlabel(ax1,scalelabels(1),'units','normalized','position',[-0.1 -0.02 0]);
xl2=xlabel(ax2,scalelabels(2),'units','normalized','position',[-0.1 1 0]);
t1=title(ax2,titlestring,'units','normalized','position',[0.5 1.09 0],'fontweight','bold');
% apply value labels on bars (not exactly robust geometry retention)
for n=1:1:length(xt)
scalemax=max(get(ax2,'xlim'));
valb=text(ytpsi(n)-0.01*scalemax,n-0.0,['\color {red}' num2str(round(ytkpa(n))) ...
' \color {blue}' num2str(round(ytpsi(n)))], ...
'horizontalalignment','right','fontweight','bold');
end
% this mess massages the plot to fit well within its container
marginoffset=[0.04 0.01];
margins=get(ax2,'tightinset'); h=[margins(1) margins(3)]; v=[margins(2) margins(4)];
set(ax1,'units','normalized','outerposition',[[h(1) v(1)]+marginoffset 1-sum(h) 1-sum(v)])
set(ax2,'units','normalized','outerposition',[[h(1) v(1)]+marginoffset 1-sum(h) 1-sum(v)])
set(b,'units','normalized','outerposition',[[h(1) v(1)]+marginoffset 1-sum(h) 1-sum(v)])
% updating axis sync without this is a bunch of shit
% similar to 'linkaxes()', but works with unequal axis limits (and 3 axes)
addlistener(ax1,'Position','PostSet',@(src,evt) updateAxis(ax1,ax2,b));
</pre>
<pre class="brush:matlab;">function updateAxes(a1,a2,a3)
% callback function for updating internal plot geometry
% to keep axis objects aligned if container geometry is altered
xLim1=get(a2,'xLim');
yLim1=get(a2,'yLim');
set(a2,'position',get(a1,'position'));
set(a3,'position',get(a1,'position'));
set(a2,'xLim',xLim1);
set(a2,'yLim',yLim1);
end
</pre>
Unknownnoreply@blogger.com10tag:blogger.com,1999:blog-5851332800128256308.post-48810057014750090202015-06-16T00:59:00.001-07:002016-09-19T19:21:39.195-07:00Digitize all those binders full of notesEver find yourself referring to your old notes and school work? Why not cram that giant stack of sketchy, error-riddled paper into a pdf or nine? Just think of all the advantages!<br />
<ul>
<li>they would be more portable - you could put them on a usb stick or a phone</li>
<li>they would be easier to reference while doing design work on the computer</li>
<li>they would take up less space and collect fewer dead bugs </li>
<li>they <i>might</i> not get damaged by the leaky roof or eaten by termites </li>
<li>they could be shared with people who want to learn that they can't read your shitty handwriting</li>
</ul>
Maybe you could even have the prescience to approach this task before you're two years past graduation!<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/AVvXsEhwcmgsJ1t1BjFdQIXwlaniuuCuOwS8-A3KUNIZldy9IU1uSz87PSgI8FSTLe6_nQifKLJpWCOAuAPWJuw93MTF4Mg4uQNrTZ_IK6nKFR5j1Pel-9CDedsHqnaMrDdKOtp73VRUvyeFm-o/s1600/2015-06-16_00-18-16_272.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwcmgsJ1t1BjFdQIXwlaniuuCuOwS8-A3KUNIZldy9IU1uSz87PSgI8FSTLe6_nQifKLJpWCOAuAPWJuw93MTF4Mg4uQNrTZ_IK6nKFR5j1Pel-9CDedsHqnaMrDdKOtp73VRUvyeFm-o/s640/2015-06-16_00-18-16_272.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Just some books and binders</td></tr>
</tbody></table>
<br />
Over my many years wasting my life with a bad drawing habit, I've learned one thing from flatbed scanners: <u>graphite pencil marks on paper are reflective</u>. This means that for particular illumination angles, scanned or photographed pencil handwriting/drawings may be washed out very effectively. Long ago, I simply abandoned scanners for drawing purposes because of this. I decided to simply use my second-hand smartphone as a camera. I grabbed some scrap metal from the pile next to the bandsaw, and after
some sawing and hammering and hot glue, I created a tripod mount for the
phone. I set up a light tent and made a staging easel out of a pizza box. After ten minutes of page flipping, I have a hundred pictures of upside-down pages that I can hardly read with my D-grade eyeballs. <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/AVvXsEj2NoxaQmml3-3nTCVLTV8e2O9WqXNbEGA-x4atw_S8IfQng0QgS0IuJBaIYlqamRfz_8eXdvjZQhxBnahO_hEX-FCtL8meo1NiX7_qOuF8_DA2NxfDBHnLSrqeaRtwMRqHHnR5wGfycmA/s1600/2015-06-05_01-51-15_649.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2NoxaQmml3-3nTCVLTV8e2O9WqXNbEGA-x4atw_S8IfQng0QgS0IuJBaIYlqamRfz_8eXdvjZQhxBnahO_hEX-FCtL8meo1NiX7_qOuF8_DA2NxfDBHnLSrqeaRtwMRqHHnR5wGfycmA/s400/2015-06-05_01-51-15_649.jpg" width="225" /></a>
</td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceK1DzUaHwO14NsyG8B87mXPYLPj74WoiuLiJ6sNGF7aQTa3PSJjjmUBivbPEu8Zr6i1cN6_k7OgkyzH9xMMPSD0EOGaYmlvyJivggiiLaDbCcca1F855jUWDSvH2KBPGX5MVdJCOxyQ/s1600/output-0016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceK1DzUaHwO14NsyG8B87mXPYLPj74WoiuLiJ6sNGF7aQTa3PSJjjmUBivbPEu8Zr6i1cN6_k7OgkyzH9xMMPSD0EOGaYmlvyJivggiiLaDbCcca1F855jUWDSvH2KBPGX5MVdJCOxyQ/s320/output-0016.jpg" width="250" /></a>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">Rectification and contrast enhancement
</td></tr>
</tbody></table>
<br />
Now, how to process the images? For most purposes, processing of scanned books or handwriting can be done with a simple procedure:<br />
<ul>
<li>desaturate original image</li>
<li>make a copy</li>
<li>blur the copy with a large kernel</li>
<li>blend the blurred mask with the original in a Divide mode</li>
<li>re-adjust levels as appropriate</li>
</ul>
This works well and produces a high-contrast image. Keep in mind though why it works. This is essentially a high-pass filter method. Only the low spatial frequency content survives the blurring operation and is removed in the blend operation. This removes the effects of uneven lighting or slight paper contours, but if the page content is not restricted to narrow lines, we'll run into problems. <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/AVvXsEjeFdDvXoXYcGgv7lZFs-BMGyqHdFZJFfiEFElzKiOpNlMOoWQUtwMyTXyoPF_xJki9Vj_aDu0dDbsGCvm_C1KiFDYzlzRQMZptRHCtH2qdF7IMtb-7_8kaXD7_nvm4eW4x8QxmruOqOk4/s1600/hicont1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeFdDvXoXYcGgv7lZFs-BMGyqHdFZJFfiEFElzKiOpNlMOoWQUtwMyTXyoPF_xJki9Vj_aDu0dDbsGCvm_C1KiFDYzlzRQMZptRHCtH2qdF7IMtb-7_8kaXD7_nvm4eW4x8QxmruOqOk4/s320/hicont1.jpg" width="248" /></a>
</td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0PdxwCqF8bgml7uYmmxbgsSFDxQ9dTueRDZJa9yLza0JIB3Rh4p8p2rNumJLE6JTTlNmIVoKbvNjWfxQuDd7xQafyvaq4gabSbYY7DJPkNscMpTyGO-hI6DVBsjH2-x6Y_yIB7zRYxQ/s1600/hicont2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0PdxwCqF8bgml7uYmmxbgsSFDxQ9dTueRDZJa9yLza0JIB3Rh4p8p2rNumJLE6JTTlNmIVoKbvNjWfxQuDd7xQafyvaq4gabSbYY7DJPkNscMpTyGO-hI6DVBsjH2-x6Y_yIB7zRYxQ/s320/hicont2.jpg" width="249" /></a>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">Excess filtering on pages with graphics
</td></tr>
</tbody></table>
<br />
Let's say some of the pages have printed figures or tables; the removal of low-frequency content will tend to leave only edges of any solid dark regions. In the binders that contained occasional printed graphics, I used a different method for processing printed pages. Since most of my handwritten notes are on yellow paper, I simply processed non-yellow pages differently. If I know there are no graphics, I can just ignore the testing routine.<br />
<br />
The color-testing routine finds the average color of an annulus of the page so as to ignore content and page placement inaccuracy. One convenience of this is that images that are processed with the high-pass filter method can be re-colorized if desired. I personally don't find this to help with visual contrast, so I didn't use it.<br />
<br />
<pre class="brush:bash;">#!/bin/bash
# process photos of coursework pages from binders
# uses slower method of contrast mask generation and overlay
#581 1773x2283+45+543 180
#487 1758x2286+54+546 180
#488 2220x1716+321+36 270
#221 1785x2325+51+531 180
#GDn 1755x2394+24+657 180
#471 1803x2319+33+540 180
#537 1779x2286+45+552 180
pdfname="ECE537_Integrated_Photonics"
cropsize="1779x2286+45+552" #the rect parameters for cropping
rotateamt="180" #how much to rotate after cropping
indir="originals" #this is the local directory name where the original images are
outdir="output" #this is the local directory name where the script will shit out the processed pages
outqual=85 #percent jpeg quality
hconly=1 #always assume pages are handwritten (used when there aren't any printed graphics pages)
retint=0 #percent retint for yellow pages
retintmode="multiply"
# ###########################################################################
if [ $hconly == 1 ]; then
echo "high contrast mode"
else
echo "auto contrast mode"
fi
page=1
for infile in $(ls -1 $indir/*.jpg); do
outfile="$outdir/output-$(printf "%04d" $page).jpg"
jpegtran -crop $cropsize -trim -copy none $infile | \
jpegtran -rotate $rotateamt -trim -outfile temp.jpg
if [ $hconly == 0 ]; then
# get average page color excluding border and content
imgstring=$(convert \( temp.jpg -threshold -1 -scale 95% \) \
\( temp.jpg -threshold 100% -scale 80% \) \
-gravity center -compose multiply -composite - | \
convert temp.jpg - -alpha off -gravity center -compose copy_opacity -composite -resize 1x1 txt:)
RGB=$(echo $imgstring | sed 's/ //g' | sed 's/(/ /g' | sed 's/)/ /g' | sed 's/,/ /g' | cut -d ' ' -f 6-8)
R=$(echo $RGB | cut -d ' ' -f 1)
G=$(echo $RGB | cut -d ' ' -f 2)
B=$(echo $RGB | cut -d ' ' -f 3)
isyel=$(echo "($R+$G)/2 > $B*1.3" | bc)
#echo $imgstring
echo $R $G $B ">> $page is yellow? >>" $isyel
fi
if [ $hconly == 1 ] || [ $isyel == 1 ]; then
# if page is yellow, do 100% contrast enhancement and partial page re-tinting
if [ $retint != 0 ]; then
convert -modulate 100,0 temp.jpg - | \
convert - \( +clone -filter Gaussian -resize 25% -define filter:sigma=25 -resize 400% \) -compose Divide_Src -composite - | \
convert -level 70%,100% -quality 100 - temp.jpg
convert temp.jpg \( +clone -background "rgb($R,$G,$B)" -compose Dst -flatten \) -compose $retintmode -composite - | \
convert temp.jpg - -compose blend -define compose:args=$retint -composite - | \
convert -quality $outqual - $outfile
else
convert -modulate 100,0 temp.jpg - | \
convert - \( +clone -filter Gaussian -resize 25% -define filter:sigma=25 -resize 400% \) -compose Divide_Src -composite - | \
convert -level 70%,100% -quality $outqual - $outfile
fi
else
# if page is not yellow, retain most color and do a 50% contrast enhancement
convert -modulate 100,80 temp.jpg - | \
convert - \( +clone -filter Gaussian -resize 25% -define filter:sigma=25 -resize 400% \) -compose Divide_Src -composite - | \
convert - temp.jpg -compose blend -define compose:args=50 -composite - | \
convert -level 25%,100% -quality $outqual - $outfile
fi
#echo $infile
page=$[$page+1]
done
rm temp.jpg
convert $outdir/*.jpg $pdfname.pdf
</pre>
<br />
The blurring method entails a size reduction and expansion. This has two purposes: First, it speeds up blurs with a large kernel (in this case, by about a factor of 3); second, it helps reduce vignetting effects that would otherwise be caused by a simple "-blur 0,100" operation. If a simple blur is used, it would help to crop the page oversize, then trim it down after contrast enhancement or after the blur itself. <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/AVvXsEiUZ9fEGfDmFhQ3X82yJZnQiBHOHma8aYi8d5fKRPHGWwAkOBvGcHQI2o2wMePdnzRMqgkn1zGIDbaTu1RRP1Q7DI-mPcWura1cASqVnLVHVu4r9i1qO7AgVvsqPSuTBSUnUFaEJWRsjIY/s1600/output-0016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="-blur 0,100" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUZ9fEGfDmFhQ3X82yJZnQiBHOHma8aYi8d5fKRPHGWwAkOBvGcHQI2o2wMePdnzRMqgkn1zGIDbaTu1RRP1Q7DI-mPcWura1cASqVnLVHVu4r9i1qO7AgVvsqPSuTBSUnUFaEJWRsjIY/s320/output-0016.jpg" title="-blur 0,100" width="250" /></a>
</td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceK1DzUaHwO14NsyG8B87mXPYLPj74WoiuLiJ6sNGF7aQTa3PSJjjmUBivbPEu8Zr6i1cN6_k7OgkyzH9xMMPSD0EOGaYmlvyJivggiiLaDbCcca1F855jUWDSvH2KBPGX5MVdJCOxyQ/s1600/output-0016.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="-filter Gaussian -resize 25% -define filter:sigma=25 -resize 400%" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhceK1DzUaHwO14NsyG8B87mXPYLPj74WoiuLiJ6sNGF7aQTa3PSJjjmUBivbPEu8Zr6i1cN6_k7OgkyzH9xMMPSD0EOGaYmlvyJivggiiLaDbCcca1F855jUWDSvH2KBPGX5MVdJCOxyQ/s320/output-0016.jpg" title="-filter Gaussian -resize 25% -define filter:sigma=25 -resize 400%" width="250" /></a>
</td></tr>
<tr><td class="tr-caption" colspan="2" style="text-align: center;">Difference between simple blur and resize+blur methods</td></tr>
</tbody></table>
<br />
Of course you can guess that I'd do this in bash. This is about as ad-hoc as they come. It's not even externally parameterized. I was thinking about doing this with Matlab, but I decided that I'd rather pull my hair out trying to do image stacks in ImageMagick. Tell it where the files are, how they should be checked and compressed, and the script will grind them into a pdf for you. I highly doubt anyone would ever actually use this ugly code, but I'm posting it anyway because I have nothing else to do. Still, I'm not dumb enough to post my horrible notes in whole.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-5851332800128256308.post-65646417935692564702015-06-15T00:40:00.003-07:002015-07-06T01:41:04.583-07:00Measuring thermal resistanceIn the course of all the dumb things I do with electronics, I have often been forced to ask if some on-hand adhesive would be adequate for mounting heat sinks. Often this is a matter of ad-hoc retrofitting rather than better design practice. An example might be putting small milled heat sinks on a Raspberry Pi or replacing a small GPU heat sink with a trashy integral fan. Maybe I need an insulating washer for a Multwatt-15 package, and all I have is mica for a TO-220. Will an aluminized mylar antistatic bag work well enough?<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/AVvXsEh2Ydnep3yBr7FmNHBjt4WNzkxSxhcZJtF0NzS0lp8E6mc-0ccaCINDTSoHPr_XUEqLHjCKtTLdBSZ1QyNYfqj4mG9wFHSBHYPnZrQs3zSNA3BH2nzTNKoz3i0iROsGzjzxK2vX_PU7Eaw/s1600/temporarymylar.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="341" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2Ydnep3yBr7FmNHBjt4WNzkxSxhcZJtF0NzS0lp8E6mc-0ccaCINDTSoHPr_XUEqLHjCKtTLdBSZ1QyNYfqj4mG9wFHSBHYPnZrQs3zSNA3BH2nzTNKoz3i0iROsGzjzxK2vX_PU7Eaw/s400/temporarymylar.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">"Don't worry, this is just temporary" --me, ca. 2009</td></tr>
</tbody></table>
<br />
Beyond that, what about more typical design guidelines? Figures for typical case-sink thermal resistance for a common TO-220 package vary widely. Whose numbers should I have confidence in using -- or should I just assume the worst numbers I can find? That hardly seems better than guessing.<br />
<br />
Asking the internet for the thermal properties of anything other than a legitimate TIM is pretty much futile. Even those figures listed for half of the common materials at the bottom of the market are probably questionable anyway. Is that $0.99 white goo from ebay <i>really</i> 1.5 W/mK? After stumbling on enough <strike>clickbait</strike> <strike>advertisements</strike> non-quantitative or questionable computer cooling articles or product reviews wherein heat flows are measured in minutes of videogame, I figured I might as well just do it myself. That's not to say my efforts were all that accurate. Consider this more as an inexpensive method in development than a set of authoritative results.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjffsWHLPg1wTaGGiWdrqUTGgMq70emyfFGazjl16bHmkMoBEEYlwni3Ms7v8VNUFMx6ywlmNtQkvG2LalNzw2ma01K4mC1bCI2RItVvcr3z7TOKJd0RDZ1L3OPWFCpHfKv5Vc9wxb6ivo/s1600/rt_test1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjffsWHLPg1wTaGGiWdrqUTGgMq70emyfFGazjl16bHmkMoBEEYlwni3Ms7v8VNUFMx6ywlmNtQkvG2LalNzw2ma01K4mC1bCI2RItVvcr3z7TOKJd0RDZ1L3OPWFCpHfKv5Vc9wxb6ivo/s640/rt_test1.jpg" width="640" /></a></div>
<br />
So how to measure thermal resistance of a TIM? There are a number of ways. A smart way might be like the above image. Say we use heated and chilled volumes of water pumped through heat exchangers. If we can measure the inlet and outlet temperatures on the heat exchangers, as well as the volume flow rates on either side, we can quantify the heat flow that actually passes through the thermal interface. Sure, heat is being being lost in the hoses and into the air, but so long as we know the temperature differentials and the mass flow rates (implied by volumetric flow), we can eliminate those unknowns. This could be a static configuration, or maybe we could switch the inlet from chilled to heated and extract the thermal resistance from the transient response.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6R5SNrO0U_3hTfLrfxlq1ChA-ZQBEiY7MYILU69f5P5fj4HTongY1xhLBk5HnXyOdaChQMcG0XHOQFd87ze6tRLsCjJ89043yqTFyGADZ3CubJu_db4aR0JF17_miNuOO9ASslddi3To/s1600/rt_test2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6R5SNrO0U_3hTfLrfxlq1ChA-ZQBEiY7MYILU69f5P5fj4HTongY1xhLBk5HnXyOdaChQMcG0XHOQFd87ze6tRLsCjJ89043yqTFyGADZ3CubJu_db4aR0JF17_miNuOO9ASslddi3To/s640/rt_test2.jpg" width="640" /></a></div>
<br />
That's a really cool idea, but I don't have a bunch of flow meters and pumps and I don't feel like putting that together just to test some goo once in a while. Certainly, there are <a href="https://en.wikipedia.org/wiki/Thermal_conductivity_measurement" target="_blank">a lot of other methods</a> that are all documented and standardized. It seems that in most cases though, fabrication of either heaters, sensors, or interface surfaces becomes difficult, expensive, or at least tedious. I don't want to have to hand-finish any more surfaces than necessary. <br />
<br />
Let's try something that's <strike>cheaper</strike> <strike>lazier</strike> simpler. Consider the above diagram involving an electric heater and a heat sink. In this configuration, it's simple enough to find the input heat flow, but how can the flux through the interface be quantified if the cold side is just a heat sink and ambient losses are unknown? My primary assumption is this: if the stray losses on the heater can be made negligible, then the input power is approximately equal to the heat flux through the TIM. Then, for the fixture area:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6V4qnZir9OeFhsb7Q8fbkUXhQQySuBT_8-JntMOKU_mXpuPXlL9cr3MCT2KlNZn0fgLP-2ZJq1FUp6X9eu4B9TDomY5xRT9OLk5ssf3svvXsXUcx2XIj-OxdScXwG-rmzP22kjMT9z8/s1600/kaboom.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR6V4qnZir9OeFhsb7Q8fbkUXhQQySuBT_8-JntMOKU_mXpuPXlL9cr3MCT2KlNZn0fgLP-2ZJq1FUp6X9eu4B9TDomY5xRT9OLk5ssf3svvXsXUcx2XIj-OxdScXwG-rmzP22kjMT9z8/s320/kaboom.jpg" width="320" /></a></div>
<br />
Maybe that's a bit too hopefully simplistic. Maybe we can try to come up with an approximate loss ratio by using a simulation model. Or better yet, if we can run the heater in the absence of the heat sink, we can get a rough figure for the heater-ambient thermal resistance, i.e. the resistance of the stray loss path. If that information were available, the resistance of the conduction path then becomes:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW1c4NXm-3gTbpxr1S1GqEpPyCwW3_QhdSrijfbe_B3eoFEfjfCaZNhM15hY0kUtusDlssphloGBaE21ok5sFTN6BNxyPVGdgcDayj_PfzZJ4AVAo6ZRdDDG3jZwuSL1DYJveIdV0kelo/s1600/expr.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="119" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW1c4NXm-3gTbpxr1S1GqEpPyCwW3_QhdSrijfbe_B3eoFEfjfCaZNhM15hY0kUtusDlssphloGBaE21ok5sFTN6BNxyPVGdgcDayj_PfzZJ4AVAo6ZRdDDG3jZwuSL1DYJveIdV0kelo/s320/expr.jpg" width="320" /></a></div>
<br />
By the time the numbers congeal in my mind, I already have visions of an assembly method. Before we bother getting out of the chair, let's see if any of this seems reasonable. With a few minutes of effort in <a href="http://www.femm.info/wiki/HomePage" target="_blank">FEMM</a>, I threw together a questionable simulation of such a fixture. The primary flaw is the fact that I didn't model any sort of convection transfer at the solid-air boundaries. I just set a fixed boundary temperature at the extremities of the heat sink. It'll be close enough. There are only a few things I want to know here:<br />
<ul>
<li>What is the temperature gradient like around the interface? </li>
<li>Will sensor placement be critical? </li>
<li>Is the flux density uniform across the interface plane? </li>
<li>What's a ballpark figure for the stray losses from the heater?</li>
</ul>
Along with the goofy boundary condition selection, the axisymmetric model often forces approximations of shapes that aren't cylinders coaxial to the z-axis. The heater resistors are modeled as a single cylinder with a geometry that approximates the degree to which cross-bored holes will occlude the cross-sectional area of the heater bar.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ6-1AjtPLc-K62vYex-un98rmwXwjloFMMbc0pbVid1WIeLEBdhQxkRM4eVnxAU-mJh6aJ__t4WfMIHaWOQB6vW0e9mvF4k9ndAqgkUE6_heC3ZdXgcP-HDuJ6M2s6pZeUC5TGTS4d0c/s1600/rhotestfemm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ6-1AjtPLc-K62vYex-un98rmwXwjloFMMbc0pbVid1WIeLEBdhQxkRM4eVnxAU-mJh6aJ__t4WfMIHaWOQB6vW0e9mvF4k9ndAqgkUE6_heC3ZdXgcP-HDuJ6M2s6pZeUC5TGTS4d0c/s640/rhotestfemm.png" width="640" /></a></div>
<br />
These quick checks suggest that for a relatively small heater power (23W), only a modest amount of insulation should be required to keep losses quite low (1-5%), even when jacket temperatures are at ambient. So long as attention is paid to geometry, sensor placement shouldn't be terribly critical either. Let's cobble together some rickety bullshit!<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/AVvXsEjBqdKIqMEo5J6T3G6VGGwg8CeUc9NobPywUGk6FqzOAsKBSeJdDqNKDiY1CNyzQz-OwTGXqvLI-6chMWhz4XImA-gnWjZQctjLi2NPokd9tvZVT18gct85GNPP99Lb8aQTBssB3ulX894/s1600/2015-05-22_03-34-23_971.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBqdKIqMEo5J6T3G6VGGwg8CeUc9NobPywUGk6FqzOAsKBSeJdDqNKDiY1CNyzQz-OwTGXqvLI-6chMWhz4XImA-gnWjZQctjLi2NPokd9tvZVT18gct85GNPP99Lb8aQTBssB3ulX894/s640/2015-05-22_03-34-23_971.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Heater bar, resistors, thermal overload, spring, scrap aluminum</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/AVvXsEgkLZLnYCDuqfc8385zyHCE83Uh2voadNcpK26xFvDhcIZ_tIkDKuGuHX2KWICkgpH34GnwktZ2NbzkKSK7di6Jefh8fRIsT9CM0P9_psDzxnFVyAIIx7oR2D6Y5qi2ZT6Y7qLkjTyxC78/s1600/2015-05-22_03-29-40_942.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkLZLnYCDuqfc8385zyHCE83Uh2voadNcpK26xFvDhcIZ_tIkDKuGuHX2KWICkgpH34GnwktZ2NbzkKSK7di6Jefh8fRIsT9CM0P9_psDzxnFVyAIIx7oR2D6Y5qi2ZT6Y7qLkjTyxC78/s640/2015-05-22_03-29-40_942.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Milled CPU heat sink</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/AVvXsEggbd7lASZrMJwA7SWzWAVA9TBKQ1H0DANwxZ7-g42kOrXOauCML8jTPpJHfUNfgOUQDo5_3G6Be0bqmeBil7I88cA_BTz2yypindfNwbS3IdKEzBNqAnq5agmCPcMzp9A70RVhwC8pPso/s1600/2015-05-22_03-37-20_41.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggbd7lASZrMJwA7SWzWAVA9TBKQ1H0DANwxZ7-g42kOrXOauCML8jTPpJHfUNfgOUQDo5_3G6Be0bqmeBil7I88cA_BTz2yypindfNwbS3IdKEzBNqAnq5agmCPcMzp9A70RVhwC8pPso/s640/2015-05-22_03-37-20_41.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Heater bar and spring guide in insulator case (nested peanut butter jars)</td></tr>
</tbody></table>
<br />
The assembly is fairly self-explanatory. The heater bar is machined from aluminum; the heat sink is fabricated by modifying a CPU heat sink. The frame is assembled from scrap aluminum. The heater has an integral spring and the compression screw uses a stop so that pressures are repeatable.<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/AVvXsEj2_5KSeI4R7Ahib3FViozrD7dhyphenhyphenmbgu9F6UIX6pAy36ZDVfr75yaAiYBvo8VhCItt440XMB0iCCJs6_LCKJtmSiT9w5cOuVSNkzP2A6KDPw3kwHHBv6O98DJcHEJpGqt3DlUWW-5jZT6w/s1600/2015-06-06_07-16-04_754.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_5KSeI4R7Ahib3FViozrD7dhyphenhyphenmbgu9F6UIX6pAy36ZDVfr75yaAiYBvo8VhCItt440XMB0iCCJs6_LCKJtmSiT9w5cOuVSNkzP2A6KDPw3kwHHBv6O98DJcHEJpGqt3DlUWW-5jZT6w/s400/2015-06-06_07-16-04_754.jpg" width="225" /></a>
</td><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYB36B4ntywMWvwbyP0x3V_4sOk2VtSOnlRwVDXZPXXBEWnBnZrtiRDWCBlkM7BzgmYoJZ9jD9t2X_tdFB8VXmHB9yUscwrgPOvhtIW5Z9Cy8uIWRUULoPBJzf8Mvm84qTCEiU_7YUR7s/s1600/2015-06-06_07-16-20_724.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYB36B4ntywMWvwbyP0x3V_4sOk2VtSOnlRwVDXZPXXBEWnBnZrtiRDWCBlkM7BzgmYoJZ9jD9t2X_tdFB8VXmHB9yUscwrgPOvhtIW5Z9Cy8uIWRUULoPBJzf8Mvm84qTCEiU_7YUR7s/s400/2015-06-06_07-16-20_724.jpg" width="225" /></a>
</td></tr>
</tbody></table>
<br />
The resistor leads are insulated with wire insulation trimmings. The resistors are bonded to the heater bar using STARS-922 <a href="https://www.google.com/search?q=heatsink+plaster&source=lnms&tbm=isch&sa=X&ved=0CAgQ_AUoAmoVChMIvOmgrIWRxgIV0I6SCh2eqAAE&biw=1067&bih=733" target="_blank">"heat sink plaster"</a>. This is a semi-setting heat sink compound. It congeals within a few minutes, but doesn't form a tough film like an RTV silicone would. This makes it easier to replace parts if necessary. At the time, I was not sure of the properties of this material, but I wanted to be able to press the resistors out if necessary. Besides, experimentally determining unknown properties was kind of the whole point behind building the fixture, wasn't it?<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/AVvXsEj46tvo68D6nL0t6q_TMDKBg_kF-rnjt0plzuv3-wNgprtcrg4KoijLlGvxZPxvs9cQlWuXLM7225rJgSjm3o4qH-cEMNPNipfqsPhw3Mo1PoM3e_o6fKvVuqkSJSIO0jlu_36BVXLY2Yk/s1600/2015-06-06_10-33-43_547.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj46tvo68D6nL0t6q_TMDKBg_kF-rnjt0plzuv3-wNgprtcrg4KoijLlGvxZPxvs9cQlWuXLM7225rJgSjm3o4qH-cEMNPNipfqsPhw3Mo1PoM3e_o6fKvVuqkSJSIO0jlu_36BVXLY2Yk/s640/2015-06-06_10-33-43_547.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">WOULD YOU LOOK AT ALL THAT <a href="https://www.youtube.com/watch?v=OLWUqW4BRl4" target="_blank">STUFF</a></td></tr>
</tbody></table>
<br />
Once things are together, there are a couple things we can try to test. The generic ebay thermocouples can be characterized to eliminate any static offsets they might cause. The heater losses can also be checked to some degree. If the exposed face of the heater is insulated, the bar can be gradually brought up to a nominal operating temperature to find its resistance to ambient. Combining this figure with preliminary TIM tests suggest that stray losses are well within 3%. For a good thermal contact such as a metal-filled grease, stray losses should constitute only about 1-2% of the input power. It's nice when simulations jive. With thermal resistance of the loss path known, the more accurate method for calculating interface resistance can be used.<br />
<br />
We can also try to figure out the spring constant and set the stop at a reasonable interface pressure. Due to a mismeasurement, I ended up adjusting this in the middle of things; not everything is measured at the same pressure. For the most part though, the differences are negligible. As a reference, typical TO-220 mounting forces from <a href="http://www.junradio.com/Discretes/TI/9701.pdf" target="_blank">Philips</a> suggest a pressure range of about 80-600 kPa. I'm testing at the low end, but I'd have to use different springs and brackets to go much higher. <br />
<br />
I've tested a few things so far, and the results are fairly expected. When translated to suit transistor packages, the resistance figures seem appropriate. What's interesting (and disconcerting) is that the areal resistance (K*m^2/W) doesn't quite jive with any of the specifications for the products used. Of course, they're generic ebay grease, so I'd sooner accept the experimental result. The kapton tape is the film alone with its adhesive removed. The grease used with the insulator films is the ZP brand white grease. Permatex Ultra Grey has the highest filler content and density of any of Permatex's RTV gasket products (afaik). The orange high-temperature product is one of the lowest-solids materials they offer. <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/AVvXsEhrH6N_IeapJeBVwGBTlT-Eeu8iLlJaVbdisSYlhhO_lw5FRgG2VAqgXiqEJipf9VdJuVbK-SiqKGzvmz2RrSWuQm4vdC6zhNegJ1m2W2hRPivkiqnmF-Rc0aDbHQFH4JB2g-bcyj_Xu0U/s1600/thermalchart.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrH6N_IeapJeBVwGBTlT-Eeu8iLlJaVbdisSYlhhO_lw5FRgG2VAqgXiqEJipf9VdJuVbK-SiqKGzvmz2RrSWuQm4vdC6zhNegJ1m2W2hRPivkiqnmF-Rc0aDbHQFH4JB2g-bcyj_Xu0U/s640/thermalchart.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I could've made a table, but nnnnope</td></tr>
</tbody></table>
<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/AVvXsEhwiyYGZ7XntyNLPEnIOzFUoptjXHA8H8JWP5xKwUdcLn0SYQ-z5g_kQYZH9jBQakUlSQuZDMvXcNsLYkUXQm-yOXIndSzoid8J3icySfxDk9I37dV1Xr7ZugAZRBN2fiGYQFJZjkbel0Q/s1600/thermalplot.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwiyYGZ7XntyNLPEnIOzFUoptjXHA8H8JWP5xKwUdcLn0SYQ-z5g_kQYZH9jBQakUlSQuZDMvXcNsLYkUXQm-yOXIndSzoid8J3icySfxDk9I37dV1Xr7ZugAZRBN2fiGYQFJZjkbel0Q/s640/thermalplot.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Thermal resistances when translated to common semiconductor packages</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
I'd like to try to work out some volumetric conductivity (W/(m*k)) figures, but I've had difficulty getting repeatable results. I need to come up with a better method of determining or enforcing TIM film thickness. I'm not that terribly concerned with volumetric conductivity, though. For most electronics applications, I feel that it makes more sense to leave the otherwise unknown film thickness buried in the metric. <br />
<br />
I'd like to try testing a bunch of other things, but these are just the common sorts that I had on hand. If anyone wants me to test something, let me know. Hah! Just kidding. I know nobody will ever read this. In case you don't exist, here are some perishable links to the materials used:<br />
<ul>
<li><a href="http://www.dx.com/p/adhesive-solder-heatsink-plaster-for-pc-hard-parts-5g-37514" target="_blank">STARS-922 Heat sink plaster</a></li>
<li><a href="http://www.ebay.com/itm/HEAT-SINK-CONDUCTIVE-SILICONE-COMPOUND-THERMAL-PASTE-GREASE-TUBE-FOR-PC-CPU-VGA-/171800562140?pt=LH_DefaultDomain_2&hash=item28001c89dc" target="_blank">ZP white grease</a></li>
<li><a href="http://www.halnziye.net/products_detail/&productId=59.html" target="_blank">HY610 grease</a></li>
<li><a href="http://www.permatex.com/products-2/product-categories/specialized-maintenance-repair/electrical-system-maintenance/permatex-dielectric-tune-up-grease-detail" target="_blank">Plain silicone grease</a></li>
<li><a href="http://www.permatex.com/products-2/product-categories/gasketing/gasket-makers/permatex-ultra-grey-rigid-high-torque-rtv-silicone-gasket-maker-detail" target="_blank">Permatex Ultra Grey</a></li>
<li><a href="http://www.permatex.com/products-2/product-categories/gasketing/gasket-makers/permatex-sensor-safe-high-temp-rtv-silicone-gasket-detail" target="_blank">Permatex High-Temp</a></li>
</ul>
It should be noted that some materials like the metal-filled greases and acetoxy-cure RTV silicones have electrically important properties that bear consideration. Some day I might show my method for testing that. I also hope to have some of the mechanical properties of the STARS-922 tested soon as well. Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-5851332800128256308.post-68229250823512915112015-06-13T23:17:00.001-07:002015-12-18T09:47:32.924-08:00The Journey Never EndsWell, that didn't take long. It seems I have validated my doubts about the longevity of the ballast resistors I used in my <a href="http://epicbeardquest.blogspot.com/2015/05/a-journey-of-thousand-failures.html">motor starter project</a>, though that is not to say that the resistors were all that had failed.<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/AVvXsEhQXL1rrq1I0vt7-MerQvAbht2emx6uCDTh3vsGJKPYt3d-Cl6sUkkVRaXVd0ZjOxp0SuOCTXhye_wGwoHOe42nvbtmLD_DWpAyx2qImQRwGiBkMP7Wddnhy8MmkyUBE_0TDKiFD22aEEM/s1600/2015-05-10_14-00-53_108.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQXL1rrq1I0vt7-MerQvAbht2emx6uCDTh3vsGJKPYt3d-Cl6sUkkVRaXVd0ZjOxp0SuOCTXhye_wGwoHOe42nvbtmLD_DWpAyx2qImQRwGiBkMP7Wddnhy8MmkyUBE_0TDKiFD22aEEM/s640/2015-05-10_14-00-53_108.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ahh, memories</td></tr>
</tbody></table>
<br />
A while after being successfully installed, the motor start ramp became noticeably shorter. At the time, I wasn't in the mood to even guess what had gone wrong, knowing that it would eventually get worse. Indeed, within a few days, the resistors open-circuited and left the motor to start hard after the timed delay. Upon inspection, two of the resistor legs were opened, and the third pair was intact ... but the corresponding SSR channel was shorted.<br />
<br />
I had mentioned building three of these SSR's to use in an undervoltage start configuration and that I had subsequently watched them get violently destroyed when a relay collision dumped the branch SCC through the nine triacs. One of those nine triacs actually survived and was re-used in the resistor starter configuration where it eventually failed. Although I still question my snubber design and whether these triacs are genuine, the resistor-start configuration of the relay involves much lower voltages and switch stresses. With no real evidence in support, I'll just assume that most recent triac failure was a product of the prior severe overcurrent.<br />
<br />
That brings us to the resistors. I clearly had little confidence in these things from the start, but they should have only been operating at about 20-25% of their allowable short-time overload rating. Did the SSR failure overstress them? My rough calculations say no; shunting one leg during start would only increase average power in the remaining resistors by about 30%. That's based on the false (but convenient) assumption that doing so did not also decrease the time required to reach steady state. The increase should be negligible in comparison to the margin.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyF38cWOfXK8CZ7-_PXS-tsfhSio9JrY0CksPi8eRf5jxwOfWQs5IHUeGs5ZtLjMR4DzlMyN-MNlalmMjbziBk2CRfM0-syosZgf64hMs4thoSvdXSGrGNKKsqD72L9fhknF_RMx5tNFg/s1600/2015-05-22_22-03-25_445.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyF38cWOfXK8CZ7-_PXS-tsfhSio9JrY0CksPi8eRf5jxwOfWQs5IHUeGs5ZtLjMR4DzlMyN-MNlalmMjbziBk2CRfM0-syosZgf64hMs4thoSvdXSGrGNKKsqD72L9fhknF_RMx5tNFg/s640/2015-05-22_22-03-25_445.jpg" width="640" /></a></div>
<br />
Let's take a closer look at the resistors. When I decided to open these up, I honestly expected to find a 3W four band metal film resistor in a silicone blob. I was surprised to find what looked like a wirewound element of decent construction. The wire is 26 AWG, approximately 3.9 ohms/m. My guess at an alloy would be alloy 294, maybe. The ceramic former, end caps and terminations are all very sturdy. The plastic end plugs are of a hard composition and are very tight in the extrusion. Much like my other experiences with some of these cheap components from china, it seems there isn't an overarching theme of inadequacy. Every bit of the part seems quite appropriate and well made -- all except one bad idea or decision made with complete disregard for part functionality. In this case, the encapsulating cement ruined what was otherwise a useful part.<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/AVvXsEhxubvK5bNoVFFgM-jFrwl1SuxndVqbCQZnyT3_sSwg7QB7jSjs1sdwpfhV2YPT0gkf93lYlmze_BZjBv94cUH2UWT2ctakKxoDwmamLSWr4GHvrMcMF4g5M_mJdoQkTGSy6Rp1_Vlj04g/s1600/2012-01-24_22-42-42_16.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxubvK5bNoVFFgM-jFrwl1SuxndVqbCQZnyT3_sSwg7QB7jSjs1sdwpfhV2YPT0gkf93lYlmze_BZjBv94cUH2UWT2ctakKxoDwmamLSWr4GHvrMcMF4g5M_mJdoQkTGSy6Rp1_Vlj04g/s640/2012-01-24_22-42-42_16.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Blurry attempt to capture the porosity and coarseness of the <strike>cement</strike> sand</td></tr>
</tbody></table>
<br />
One might expect to find a wirewound resistance element like this encapsulated in a very fine-grained alumina cement made for the purpose. The properties of interest might be its electrical conductivity (low), its thermal conductivity (high), and its maximum operating temperature. Contrary to the goal of increased thermal conductivity, the resistor is packed with a porous and friable cake of coarse sand. I honestly can't tell if there was originally any binder used or if the sand had just been weakly sintered from the heat of what must have been a yellow-hot resistance wire. The remaining material serves better as an insulator than anything else. Fetching a questionably applicable thermal conductivity for packed sand
of 0.4-0.5 W/m*K, rough calculations place the element
temperature near the melting point after the first second's delivered
energy. All of the resistors showed this pattern of overheating (scaling, sagging, shorting wires), suggesting that the failures of the resistors and the triac were unrelated after all. <br />
<br />
At this point, I'm questioning my sanity and double-checking prices on soft-start modules. No, they're still unaffordable. It's interesting how much time and failure is still cheaper than a motor starter. I guess that only works when your time is worth nothing. Working with the assumption that the part failures were merely coincidental, I figured I'd rebuild it again with parts that weren't shit. I rebuilt the relay using actual ST BTA26-800CW triacs from Mouser, and I replaced the chassis mount ballasts with three massive 6 ohm corrugated element resistors. These resistors are not only 300W, but they have a 1000% 5 second overload capacity. Compared to the prior configuration, these are so ridiculously oversized, they barely get warm. Surprisingly, I only got these because they were the cheapest option. I did have to machine some bushings and make some brackets though.<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/AVvXsEjSuJ5bezFV85DPOydVIT18MKhmM3UghVApnOo3vB81ICSUxSRZYkLsZb3g9g2CNCWv6_zyI42oUyXM0HeIrxjsiy8Bbq1VJ3WyVzZupy6MmIG56lnZlhTfFTLFb4przJblakyVInk9vug/s1600/2015-06-13_13-53-33_879.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSuJ5bezFV85DPOydVIT18MKhmM3UghVApnOo3vB81ICSUxSRZYkLsZb3g9g2CNCWv6_zyI42oUyXM0HeIrxjsiy8Bbq1VJ3WyVzZupy6MmIG56lnZlhTfFTLFb4przJblakyVInk9vug/s640/2015-06-13_13-53-33_879.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The resistor equivalent of a bigger hammer</td></tr>
</tbody></table>
<br />
With a few tweaks to the relay (I added a contact state indicator and adjusted trigger currents), everything seems to be working fine again. I have no reason to think that the new ballast will be an issue. Hopefully everything stays working. Unknownnoreply@blogger.com0