tag:blogger.com,1999:blog-45770618743386773692024-03-13T10:28:01.150-04:00Hardware by design Make something that works by designing it right. A DIY hardware page on analog/power supply/digital circuits, microcontrollers.Unknownnoreply@blogger.comBlogger178125tag:blogger.com,1999:blog-4577061874338677369.post-71900562825062326592024-03-13T07:56:00.004-04:002024-03-13T10:27:29.798-04:00The dreaded KB5034441 - what actually worked for me<p>Normally I don't talk much about fixing Windows problems as the tech blogs are a dime a dozen. However, I have yet to find one that fixes the "<span face=""Segoe UI", "Segoe UI Web", wf_segoe-ui_normal, "Helvetica Neue", "BBAlpha Sans", "S60 Sans", Arial, sans-serif" style="background-color: white; color: #1e1e1e; font-size: 16px; font-weight: 700;">0x80070643 - ERROR_INSTALL_FAILURE"</span><span face=""Segoe UI", "Segoe UI Web", wf_segoe-ui_normal, "Helvetica Neue", "BBAlpha Sans", "S60 Sans", Arial, sans-serif" style="background-color: white; color: #1e1e1e; font-size: 16px;"> with</span><span face=""Segoe UI", "Segoe UI Web", wf_segoe-ui_normal, "Helvetica Neue", "BBAlpha Sans", "S60 Sans", Arial, sans-serif" style="background-color: white; color: #1e1e1e; font-size: 16px; font-weight: 700;"> </span><a href="https://support.microsoft.com/en-us/topic/kb5034441-windows-recovery-environment-update-for-windows-10-version-21h2-and-22h2-january-9-2024-62c04204-aaa5-4fee-a02a-2fdea17075a8" target="_blank">KB5034441</a>. They seem all point to the WinRE partition wasn't sized sufficiently and each of them parroting the same stuff. </p><p>I have resize the partition, but it still fails the update. I have tried the <a href="http://PatchWinREScript_2004plus.ps1" target="_blank">PatchWinREScript_2004plus.ps1</a> from Microsoft, but it returned with a bunch of errors. Obviously isn't fool proof enough for the end users. I even ask Microsoft Copilot AI for a detail step by step instructions and it still isn't enough as there were errors in some of the steps.</p><p>I tried a whole bunch of things unsuccessfully and my WinRe was disabled. I went through the usual long list of instructions trying to restore it manually e.g. extracting install.wim etc, but given up before I would do more damages. It is like a never ending quest like 50+ hours RPG with each quest requiring completing additional subtasks and no one have any up to date info.</p><p>What actually worked for me was to simply reinstall Windows. Obviously this is with the increased WinRe partition to 800MB and the install option of preserving the data and apps. This is the one with the least user interaction required, but no one else suggested this.</p><p>I let it install all the updates again and finally the dreaded KB installed properly. Whatever prerequisites that was broken along the way is now back to what they expect. Don't forget to do a disk clean up for the old windows install and change back all your preferences that Windows like to muck with.</p><p>When in doubt, reinstall Windows. :P</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECn6DCJzG19qW5cjpf0eVUMoXwzw3mcdN0Qu3lH5OS88s1QrVDoqjDgHBY4VHf4X-9Vs0ASFm7HnFj8uWk56wHGk8k8ABTtnRGbHJoWRMiU9d6j_MUa1pF6IrZTfUFYfMQ5M2JRvTKV2_qpAufdrXs9G_Fyi2wcD47NKhIJlL6Es2JkRnV92hYIM0GkY5/s748/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="748" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiECn6DCJzG19qW5cjpf0eVUMoXwzw3mcdN0Qu3lH5OS88s1QrVDoqjDgHBY4VHf4X-9Vs0ASFm7HnFj8uWk56wHGk8k8ABTtnRGbHJoWRMiU9d6j_MUa1pF6IrZTfUFYfMQ5M2JRvTKV2_qpAufdrXs9G_Fyi2wcD47NKhIJlL6Es2JkRnV92hYIM0GkY5/s16000/Clipboard02.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-1765064336398988352024-01-21T08:01:00.000-05:002024-01-21T08:01:40.106-05:00CH341A Pro Serial PROM Programmer mods<p>The CH341A Pro Serial PROM Programmer is low cost programmer based on the <a href="https://www.wch-ic.com/products/CH341.html" rel="nofollow" target="_blank">CH341 USB Serial chip</a> with special protocol modes for I2C and SPI. A good source for the hardware info for the programmer is <a href="https://github.com/Upcycle-Electronics/CH341A-Pro/tree/master" rel="nofollow" target="_blank">here</a>. </p><p>Some of the modifications are well documented on the <a href="https://www.eevblog.com/forum/repair/ch341a-serial-memory-programmer-power-supply-fix/?PHPSESSID=3mqomh1ebbn6ergvu1n672fqd3" rel="nofollow" target="_blank">eevblog</a>. I cleaned up the mods and added a few.</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/AVvXsEijWfo6mO2YuoH_xGuMzPRYVNmlMBZMu7bYtURylxQ9vZ6isSbsieToMDxK88IePSWC60LFtaf6Z-wRskD77Sd22s7ImonF649PVm6VtaKKk55F0yI_XpgqwNYMBFUFYjG1YRINiK61ih5tETLNziEbTmlpK9K42tVvaOkRI44t2s_Ln4Hr01DHGAYKMQ2u/s1146/IMG_3287.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="358" data-original-width="1146" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijWfo6mO2YuoH_xGuMzPRYVNmlMBZMu7bYtURylxQ9vZ6isSbsieToMDxK88IePSWC60LFtaf6Z-wRskD77Sd22s7ImonF649PVm6VtaKKk55F0yI_XpgqwNYMBFUFYjG1YRINiK61ih5tETLNziEbTmlpK9K42tVvaOkRI44t2s_Ln4Hr01DHGAYKMQ2u/w640-h200/IMG_3287.JPG" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Programmer modified for 3.3V</td></tr></tbody></table><br />The programmer is modified for 3.3V I/O voltages as the ZIF socket is wired for 3.3V (see J3).<div><br /><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzKhJcd1l69WrduMxFBVNfkSEpILb7U_U7z79FXhWvDYBc8qKqnljXCowG8Sd2L_kQzeR4it9HNtv7iK2Jrig0TV_qrUoDBG_1xBe1XLSZlSMqvO5c-7vXLv_MQKewzLKmoCYvB38h0IzH6yG4jyncHQ2mPEiS1TYf46d8SXYnMNK-eeuUf9iYMyyLAYGA/s920/Clipboard01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="531" data-original-width="920" height="370" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzKhJcd1l69WrduMxFBVNfkSEpILb7U_U7z79FXhWvDYBc8qKqnljXCowG8Sd2L_kQzeR4it9HNtv7iK2Jrig0TV_qrUoDBG_1xBe1XLSZlSMqvO5c-7vXLv_MQKewzLKmoCYvB38h0IzH6yG4jyncHQ2mPEiS1TYf46d8SXYnMNK-eeuUf9iYMyyLAYGA/w640-h370/Clipboard01.png" width="640" /></a></div><ul style="text-align: left;"><li>Vcc at pin 28 - connected to 3.3V (Required). The CH431 chip I/O rail is set to the 3.3V supply from U1.<br /><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/AVvXsEg1TfQodMnabq3hxEmDC6PAa2SbnLM3UwSsfqNku1X34VizQImPgarnOBXf1Gkj4objBjdaM3j7yEWhyUcHWV5yTmN6vnLYpDO0Ny1rOMBuZoqPcFVSwBZ-Plv4QY6Vy3vHLIkl5VAZs40Ut_4-DQqsW_tKTEW6WNwF-Mg8X8B9WMg0VJzmiS3lJrdVgab-/s912/Clipboard02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="383" data-original-width="912" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1TfQodMnabq3hxEmDC6PAa2SbnLM3UwSsfqNku1X34VizQImPgarnOBXf1Gkj4objBjdaM3j7yEWhyUcHWV5yTmN6vnLYpDO0Ny1rOMBuZoqPcFVSwBZ-Plv4QY6Vy3vHLIkl5VAZs40Ut_4-DQqsW_tKTEW6WNwF-Mg8X8B9WMg0VJzmiS3lJrdVgab-/w640-h269/Clipboard02.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Modification to PCB<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio9rpHyKI7DpQhRWKsQtV97-Z6WAxIBff59i5syY55wlibOY0dRUBjupa1Z5OTU8pXxKfA2MBmrHOjkGKPgIfZs9k2Vq5dWq67IN6IvLcKzHn_mz-vpBRWRZt38WgePhfgaMw-sSu2wttZDzpXoj6slQ8FyRRASiDWUiikdQvZib-4CGivGGBR80uow15s/s478/IMG_3287-a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="232" data-original-width="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio9rpHyKI7DpQhRWKsQtV97-Z6WAxIBff59i5syY55wlibOY0dRUBjupa1Z5OTU8pXxKfA2MBmrHOjkGKPgIfZs9k2Vq5dWq67IN6IvLcKzHn_mz-vpBRWRZt38WgePhfgaMw-sSu2wttZDzpXoj6slQ8FyRRASiDWUiikdQvZib-4CGivGGBR80uow15s/s16000/IMG_3287-a.jpg" /></a></div>Side view of the modification<br /><br /></td></tr></tbody></table></li><li>V3 at pin 9 - connected to 3.3V (Recommended by datasheet). The internal 3.3V regulator for USB should be connected to the external source if Vcc is running from 3.3V. I have measured the voltage at V3 and it is pretty closed to 3.3V, but modified it anyways as it is easy.<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/AVvXsEgkF5AH3vH5fOgjI-yy_dyNZx5ZEBGBuS-wEUHRw6GOmbAoLMF09wJ1GK-yoNgucb-FS97uDfFzorGfGMbn7rFgTvZcs6NUtDyhCtm4c6HM-VCBoghzfFPgLWe-YX1vsnHT-B0eendQwAdFvqZaRluTH5_owscqM69Dh-sv2_Ul8mh1RWjnDwH4FeCsgeW0/s611/Clipboard03.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto; text-align: center;"><img border="0" data-original-height="478" data-original-width="611" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkF5AH3vH5fOgjI-yy_dyNZx5ZEBGBuS-wEUHRw6GOmbAoLMF09wJ1GK-yoNgucb-FS97uDfFzorGfGMbn7rFgTvZcs6NUtDyhCtm4c6HM-VCBoghzfFPgLWe-YX1vsnHT-B0eendQwAdFvqZaRluTH5_owscqM69Dh-sv2_Ul8mh1RWjnDwH4FeCsgeW0/s16000/Clipboard03.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">V3 connected to metal tab of U1 - 3.3V regulator output</td></tr></tbody></table><br /><br /></li><li>RN1C - connected to 3.3V (Optional). The power LED (D1) is too bright because it is connected to 5V instead of 3.3V like D2. The power LED now has similar brightness as D2.</li></ul><br /></div><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/AVvXsEh4X0GtTudLf82OvilQIMt-pVo5O2VSjMYWXhgDOEMxkqLs2JBZb7jcMnxhUGBUmRiuE72IcZGQP_qWXO8cZAywGLjQVjRGgG-uxanoLU6JUWRZAt-GtBjf2R1-6cuSnnOINFMq3Sa0QSRevjXCTXmAEyKb1TF1W-i6DLDaT06BumTagddYc0wOb3z3uxv1/s606/Clipboard04.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="478" data-original-width="606" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4X0GtTudLf82OvilQIMt-pVo5O2VSjMYWXhgDOEMxkqLs2JBZb7jcMnxhUGBUmRiuE72IcZGQP_qWXO8cZAywGLjQVjRGgG-uxanoLU6JUWRZAt-GtBjf2R1-6cuSnnOINFMq3Sa0QSRevjXCTXmAEyKb1TF1W-i6DLDaT06BumTagddYc0wOb3z3uxv1/s16000/Clipboard04.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Top trace: Resistor pack pull up that was connected to 5V<br />Bottom trace: 3.3V from U1 regulator</td></tr></tbody></table></div><div><br /></div><div>I have made a small plug for the programming cable using a protoboard.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV3Xe_vKXkESKOaMFZmeTjwZ8nAvDs_r1xaRIHjo6eF7SApl8DsWRabUdgr3zCqOMJx0vEB1XbeYHev9Ky3qPbtlWPeL6NexTKs3eYip5Kkf6ch58ftAWL0fswZCD-p1vYrSMTGgzbAz-bk45UJ2e-shKMRvnanDGCu9Bs48ZLREY8ADjTPoMUXxxySYV2/s287/IMG_3285.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="287" data-original-width="273" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV3Xe_vKXkESKOaMFZmeTjwZ8nAvDs_r1xaRIHjo6eF7SApl8DsWRabUdgr3zCqOMJx0vEB1XbeYHev9Ky3qPbtlWPeL6NexTKs3eYip5Kkf6ch58ftAWL0fswZCD-p1vYrSMTGgzbAz-bk45UJ2e-shKMRvnanDGCu9Bs48ZLREY8ADjTPoMUXxxySYV2/s1600/IMG_3285.JPG" width="273" /></a></div><br /><div>I have replaced the spring for the clip-on programming cable as it is too strong and bent the pins on some of my chips.</div><div><br /></div><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/AVvXsEgbEAoOlCEp2rg5acw6NXw6CxttqkRF47eMzmLNPvMtWb3__NtIo0vGi85vk7WGhpL9qhw-3_oLwJtVnKDjYB27_hxqQjqQ2PiRNheH-_ALKcXHoB_WijRQRI7URW6gm8bKYzLUfvFt2Nmg55QiP9dzCcqm1S0jNAwt7kHaRWkpfUcTLKWt4WjDuxQ4O61h/s561/IMG_3284.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="561" data-original-width="517" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbEAoOlCEp2rg5acw6NXw6CxttqkRF47eMzmLNPvMtWb3__NtIo0vGi85vk7WGhpL9qhw-3_oLwJtVnKDjYB27_hxqQjqQ2PiRNheH-_ALKcXHoB_WijRQRI7URW6gm8bKYzLUfvFt2Nmg55QiP9dzCcqm1S0jNAwt7kHaRWkpfUcTLKWt4WjDuxQ4O61h/s16000/IMG_3284.JPG" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Original spring (Bottom) is replaced with a weaker spring (top) from my junk box.</td></tr></tbody></table><br /><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-28992443663786297242024-01-17T10:08:00.004-05:002024-01-17T10:22:59.407-05:00Counterfeit STM8S003<p> I went into ordering some counterfeit STM8S003 recently as the parts dried up and the prices were getting higher. I didn't think much at the time as the seller had been around for a few years and had good reviews.</p><p>Aliexpress dispute initially rejected my claim and I had to dig much deeper for additional proof. </p><p>I also did some extra digging and found out that <a href="https://www.trademarkelite.com/wipo/trademark/trademark-detail/1387023/STM8" rel="nofollow" target="_blank">STM8 is also a trademark</a>, so leaving it in the description is sufficient enough to associate the part from ST Micro. Aliexpress into real trouble if "STM8" result from their search engine shows a counterfeit part and they refused a refund sheltering guilty parties.</p><p>They have finally gave and started the refund process.</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/AVvXsEi8JoBwFgbJ-0GQaVjtZR2-hn5ef0zODk5epj6CuiRSVg6_OVy-pBfKHLaNqiDxSc8-ErSBHQeAZr7jImU-D0CylvzVqLWNsYrxt2fPDQggnTwQH-uVqDvt_ysTL3rfKzfiQOf8AbwL4EnYBmh1DbKMoq7vsJ15oFHjQpgtQaEh6sYBgw5XaXZK4dfjAHGZ/s1140/order.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="362" data-original-width="1140" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8JoBwFgbJ-0GQaVjtZR2-hn5ef0zODk5epj6CuiRSVg6_OVy-pBfKHLaNqiDxSc8-ErSBHQeAZr7jImU-D0CylvzVqLWNsYrxt2fPDQggnTwQH-uVqDvt_ysTL3rfKzfiQOf8AbwL4EnYBmh1DbKMoq7vsJ15oFHjQpgtQaEh6sYBgw5XaXZK4dfjAHGZ/w640-h203/order.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><div class="separator" style="clear: both; text-align: left;">The seller photo edit out the company logo as it is a trademark and even left their company name in the picture.</div><div class="separator" style="clear: both; text-align: left;">I found another (counterfeit???) part that has the company logo intact. The part look innocent enough except for markings on the third line..</div><div class="separator" style="clear: both; text-align: left;"><br /></div><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/AVvXsEhRrvRYsHrGiqX_1KCFgON0Kz9vxp4bb-bUHbPnlL-XC0fzPmEGG6BEULJTsmQ17GlI3YJkRBydhGr1rQ0H334OjaU8DAYr-TiMLhuvodMtcfOYDnj_Vem5M9XLKvvgAzo31cTSJ6KILCIB7jhvZ0LeFpdQeI7F1cCTnM_6t1ScxRTZEuPsezmUa5sOHeGL/s1212/fake%20part-3.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="648" data-original-width="1212" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrvRYsHrGiqX_1KCFgON0Kz9vxp4bb-bUHbPnlL-XC0fzPmEGG6BEULJTsmQ17GlI3YJkRBydhGr1rQ0H334OjaU8DAYr-TiMLhuvodMtcfOYDnj_Vem5M9XLKvvgAzo31cTSJ6KILCIB7jhvZ0LeFpdQeI7F1cCTnM_6t1ScxRTZEuPsezmUa5sOHeGL/w640-h342/fake%20part-3.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Same part with similar pin1 dimple and "e4" logo.</td></tr></tbody></table><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both;"><br /></div><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/AVvXsEhh219MyLqdh4cVJmUNFn5oo96ljAZRaq1qbEWF-h6w9Uz08g0UVlH7QdlUWbjHsANpnuROlSfBiNp_9oO6oRzwDriUOeEqqjy8S5nP1Jgvrki3XzKX8vhwPdfRdFwERyGsjsKD5P38c1oB_ol1YmEGKkj61r6w5FGmDgPDe1EAYvHka8V9mF6WzbrJS-9C/s1306/fake%20part%20-2%20text%20removed.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="877" data-original-width="1306" height="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh219MyLqdh4cVJmUNFn5oo96ljAZRaq1qbEWF-h6w9Uz08g0UVlH7QdlUWbjHsANpnuROlSfBiNp_9oO6oRzwDriUOeEqqjy8S5nP1Jgvrki3XzKX8vhwPdfRdFwERyGsjsKD5P38c1oB_ol1YmEGKkj61r6w5FGmDgPDe1EAYvHka8V9mF6WzbrJS-9C/w640-h430/fake%20part%20-2%20text%20removed.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Order page vs actual shipped parts</td></tr></tbody></table><br /></div><div class="separator" style="clear: both; text-align: left;">The actually shipped parts are actual a different batch of counterfeit that don't even look like the picture! The ST logo is replace with a thinner version that looks more like 5T and the "E4" uses a different font as the top part of '4' is now closed. The pin 1 dimple is now gone meaning that they now use a different part as the the base for the counterfeit.<br /><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">Here is another look under the microscope. The real ST part marking are engraved with a Laser while the counterfeit part is printed on. Laser are cheap enough, that isn't the sure fire way of telling these days.</div></div><div class="separator" style="clear: both; text-align: left;"><br /></div><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/AVvXsEhG2wiIvXNTJ-39Zw8fvs8xs_AIOAyybLxoRGs59x9natLoOjCBddDY9NWi0udGutogfFyOgwT7y942o2z4eTAY-wnWwyBjNxRDbewT8XVCjJSK1bj6EHNV19XOmPed4E2S91Pad7gmml2hDdza-S0i8SvhcZlXKyu33ap0NBGvgpmZuAEQL5_lLL9L8d2V/s1920/Tue%20Jan%2009%2013-13-34.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2wiIvXNTJ-39Zw8fvs8xs_AIOAyybLxoRGs59x9natLoOjCBddDY9NWi0udGutogfFyOgwT7y942o2z4eTAY-wnWwyBjNxRDbewT8XVCjJSK1bj6EHNV19XOmPed4E2S91Pad7gmml2hDdza-S0i8SvhcZlXKyu33ap0NBGvgpmZuAEQL5_lLL9L8d2V/w640-h360/Tue%20Jan%2009%2013-13-34.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Left side is the real part that I have<br />Right Side is the counterfeit parts from the order</td></tr></tbody></table><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/AVvXsEj6pwTSyUKgCBt21pg8dUL3Kr_u7FZN3kNNy7hU3RbmrDdgdyySQQPKvY0aUsaTq_oLIwhZnzNqTz8WeMZhQJhoG7RC3eJf_3pM2Cvr1h8XBm-_J5grJ2zH-gTJtuTOBAZ8YPBb-S-JCKoZ66qQHAIfUbxS7XKHBUOM90YDJHMXI0M0cEDaFWaF3MGmvIiq/s469/STM8%20drawing.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="357" data-original-width="469" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6pwTSyUKgCBt21pg8dUL3Kr_u7FZN3kNNy7hU3RbmrDdgdyySQQPKvY0aUsaTq_oLIwhZnzNqTz8WeMZhQJhoG7RC3eJf_3pM2Cvr1h8XBm-_J5grJ2zH-gTJtuTOBAZ8YPBb-S-JCKoZ66qQHAIfUbxS7XKHBUOM90YDJHMXI0M0cEDaFWaF3MGmvIiq/s16000/STM8%20drawing.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Part marking from STM8S003 datasheet</td></tr></tbody></table><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">STM8S003 marking: PHL = Philippines, Year = 4, Week = 06 and Revision = Y</div><div class="separator" style="clear: both; text-align: left;">The counterfeit part uses a slightly different format. CHN = China. The date code could be 03, 6 or 0, 36.</div><p>I have wired the part onto a protoboard. My preliminary test probing the parasitic ESD protection diodes indicate that the counterfeit base part has same Power/Ground pin locations and likely it is also a microcontroller of some kind. However unlike other simpler counterfeit parts, one can't exactly program it without knowing what it actually is.</p><p>The VCAP pin has no voltage output. There are no active I/O pins, so likely there is no bootstrap loader.</p><p>There are a few other microcontrollers that shares a similar pinout and package. e.g. Nuvoton N76E003AT20 (8051), HK32F003M (ARM M0) and possibly more.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6lylLpNpE2qpoRUiry7bVALoafVV0FI6k4LgzZmLOCB2qCc2hnb0-YWQFkQjbu_zmjjsiKKmDHsB50DSkESDzrH5tBY_A_0LnWzcO3fnm_YcFSkhAPTD7Lw5Mh7QCyUxInoaOtKZ8Q9wx69xWMjHomo9llyhPIShEqmUKnNJe5Z4ElypmHsiE2wIjP9q/s368/Clipboard03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="207" data-original-width="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga6lylLpNpE2qpoRUiry7bVALoafVV0FI6k4LgzZmLOCB2qCc2hnb0-YWQFkQjbu_zmjjsiKKmDHsB50DSkESDzrH5tBY_A_0LnWzcO3fnm_YcFSkhAPTD7Lw5Mh7QCyUxInoaOtKZ8Q9wx69xWMjHomo9llyhPIShEqmUKnNJe5Z4ElypmHsiE2wIjP9q/s16000/Clipboard03.png" /></a></div><div><br /></div>I don't have a Nu-Link to try out, so there isn't much I can do.<br /><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-22128786058768705022023-12-25T14:28:00.009-05:002024-03-13T07:59:55.024-04:00MP2307 Buck Converter Module<p>I ran into some problems with a <a href="https://www.monolithicpower.com/en/mp2307.html" rel="nofollow" target="_blank">MP2307</a> Buck converter module recently, so I did some research on my own.</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/AVvXsEi5QicmNR37E_T0kZ67oVoZDfXavzREv_cY_19RHpYsSYb_jBR2cI-NekNomCS0GaF_DuUmNeapmNiL_KKoHWDmTtHGqL2bsdOHH_mqqlCXxhAy_9XJoTOL5d3c-YH_Mtm2eGdVdmlbsD0v_bCiWElmgZcLMfBz4A_sCzYNWaHhq_KHSC9Np_coHLVZJnS1/s461/IMG_3247.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="346" data-original-width="461" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5QicmNR37E_T0kZ67oVoZDfXavzREv_cY_19RHpYsSYb_jBR2cI-NekNomCS0GaF_DuUmNeapmNiL_KKoHWDmTtHGqL2bsdOHH_mqqlCXxhAy_9XJoTOL5d3c-YH_Mtm2eGdVdmlbsD0v_bCiWElmgZcLMfBz4A_sCzYNWaHhq_KHSC9Np_coHLVZJnS1/s16000/IMG_3247.JPG" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Vertically mounted modified MH-Mini-360</td></tr></tbody></table><br /><p>Here is a copy of <a href="https://johndoe31415.github.io/mp2307calc/schematic.pdf" target="_blank">Mini-360 schematic</a> (.pdf) I found.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVN02HdG6p3GaGoD0lIZ5oRocT_gbiZfaJdX-NGZeKXwZacxhHKkoLV2v4ny-ScnO20rpm4MRoa9jaiB5MrAXwvua3f0wzZ5EFPkGTsAzsV9yaJ5b3QDvGA4rgboCzKNCJ2IddEUxFKKSViz7RUT3feu9Ld-jtUoprguNOMOKgSflqko0QUSsYVuRbd7AI/s675/Clipboard01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="675" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVN02HdG6p3GaGoD0lIZ5oRocT_gbiZfaJdX-NGZeKXwZacxhHKkoLV2v4ny-ScnO20rpm4MRoa9jaiB5MrAXwvua3f0wzZ5EFPkGTsAzsV9yaJ5b3QDvGA4rgboCzKNCJ2IddEUxFKKSViz7RUT3feu9Ld-jtUoprguNOMOKgSflqko0QUSsYVuRbd7AI/s16000/Clipboard01.png" /></a></div><br /><p>It is closed to the 3.3V output schematic in the datasheet with a few component values changed. A variable resistor R1 was added to allow for voltage adjustment.</p><p>MP2307 is a synchronous buck converter without a low power mode. The PWM still runs at a fixed frequency with a continuous inductor current about 1A peak to peak - positive and negative inductor current averages to zero. The negative current returns the energy to the power source. A large enough input capacitor could help to recycle the energy.</p><p>This is contributing to the high quiescent current that many have observed.</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/AVvXsEiHjpWJTTB4xWBr_azmeP0rByqhg7LFp-FQyAD4q6QQqmME7z4NVY-xO5pXBxVWhc7O6vZB0Wra2o7fUtub2y5VkCrKn2WsKyuKHszww2F-pC4niQrkaodPvRJQxDfo1vXM1LY70CQh0oB1GXItWcTDeSUVGDRCIwi9IkzplXHf4-kBOY9iNXVgpxrxQN20/s488/Clipboard02.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="488" data-original-width="414" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHjpWJTTB4xWBr_azmeP0rByqhg7LFp-FQyAD4q6QQqmME7z4NVY-xO5pXBxVWhc7O6vZB0Wra2o7fUtub2y5VkCrKn2WsKyuKHszww2F-pC4niQrkaodPvRJQxDfo1vXM1LY70CQh0oB1GXItWcTDeSUVGDRCIwi9IkzplXHf4-kBOY9iNXVgpxrxQN20/w271-h320/Clipboard02.png" width="271" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Datasheet shows Switching waveform at No Load</td></tr></tbody></table><br /><div><a href="https://www.richtek.com/en/Design%20Support/Technical%20Document?Keyword=an033" rel="nofollow" target="_blank">Richtek AN033_EN</a> "Buck Converter Selection Criteria" talks about PSM vs PWM at low loads.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK9wl2YbXdkJqIztDTBvqLXKEFCOhtClKX5sPoVa90r_ToQUhg3HxieC9U6dyc3OiKgmBjn1XRZ8iXYIJEGkqPSAnfbJxYa5N5lt8LcEpOz3XpsL0CS8v1PQY_d0Sq8p4EKRZXyHKCROSaGWBxv6d1DbSXcO1pWNqz4bne4mG9gQK6huEPixlztsKIfZ7y/s587/Clipboard03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="214" data-original-width="587" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK9wl2YbXdkJqIztDTBvqLXKEFCOhtClKX5sPoVa90r_ToQUhg3HxieC9U6dyc3OiKgmBjn1XRZ8iXYIJEGkqPSAnfbJxYa5N5lt8LcEpOz3XpsL0CS8v1PQY_d0Sq8p4EKRZXyHKCROSaGWBxv6d1DbSXcO1pWNqz4bne4mG9gQK6huEPixlztsKIfZ7y/s16000/Clipboard03.png" /></a></div><div><br /></div>Here is a comparison of the efficiency at low load:</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA6OCR0crsIut_oJBIG8qUK8VIRmc-LbiSCVq3unj32NtOS5LdpDVIe2-5ml9p74DbaOTF6p17iW8v8Fo7mURiuMMF9pBSXSlgbsrhGij-kNzj7Dd1gye4tSQkGBi8BAfFFT2UDXRTtN_2C5qq-04Tdr_wCySQpLH6P89hhLszOOUYYWQVOTiFNGvmAJhY/s233/Clipboard04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="204" data-original-width="233" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA6OCR0crsIut_oJBIG8qUK8VIRmc-LbiSCVq3unj32NtOS5LdpDVIe2-5ml9p74DbaOTF6p17iW8v8Fo7mURiuMMF9pBSXSlgbsrhGij-kNzj7Dd1gye4tSQkGBi8BAfFFT2UDXRTtN_2C5qq-04Tdr_wCySQpLH6P89hhLszOOUYYWQVOTiFNGvmAJhY/s1600/Clipboard04.png" width="233" /></a></div>PSM has some disadvantages:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg6bFywiCWAlCtSQVn5rn9iQuQ9yxI-g0FJPwAIHHoJl__WesqRfWKuEPOG6OTbXaGFN9eP4LT1QfsxqSe5kecls-xWzbGtg84UyY9x3pDyt5z_dbFy7wqBA1HviMCzPn6y-F76UrRxO67zw7kAxvC2BmEgt36w08ulLK4OWYseksrGQv2oHPe9RrN8zWm/s603/Clipboard05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="173" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg6bFywiCWAlCtSQVn5rn9iQuQ9yxI-g0FJPwAIHHoJl__WesqRfWKuEPOG6OTbXaGFN9eP4LT1QfsxqSe5kecls-xWzbGtg84UyY9x3pDyt5z_dbFy7wqBA1HviMCzPn6y-F76UrRxO67zw7kAxvC2BmEgt36w08ulLK4OWYseksrGQv2oHPe9RrN8zWm/s16000/Clipboard05.png" /></a></div><br /><div>I have ran into low frequency switching noise of PSM interfering with my analog circuits in one of my projects. </div><div><br /></div><div>I used the MP2307 modules in my analog circuits as the PWM even at low load makes it easier to filter the switching noise. See <a href="https://www.blogger.com/blog/post/edit/4577061874338677369/6931094181275187176" target="_blank">Audio sw - Analog power supply</a> - using as a charge pump for negative rail for analog circuits.</div><br /><div>I have modified a module as the constant voltage/constant current charger circuit recently.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSj50HOgtOt8r34YsOT79BLc1zm9DOmtsU3lzdSbwz0f7bUTcTuG7AOtKiPCrUCRxnzathkui1PE4xL7CTNyQiIIOKLghgU27K8Ucynt0TMYkZ3tSFowmCcKAptaNoEYIJI43E2WDFa-Pb_0Bnmh9QOMYI_jpqhXrZZc3B3g2CmTgaB6acA9CCf3mI2kmP/s733/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="547" data-original-width="733" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSj50HOgtOt8r34YsOT79BLc1zm9DOmtsU3lzdSbwz0f7bUTcTuG7AOtKiPCrUCRxnzathkui1PE4xL7CTNyQiIIOKLghgU27K8Ucynt0TMYkZ3tSFowmCcKAptaNoEYIJI43E2WDFa-Pb_0Bnmh9QOMYI_jpqhXrZZc3B3g2CmTgaB6acA9CCf3mI2kmP/s16000/Clipboard02.png" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;">I used D4 to block current leaking from the battery during soft-start and when the input supply is disconnected. An external feedback voltage divider is connected to the battery after D4 to compensate for the diode drop. </span></div><div><br /></div><div>Battery charging current is monitored by R28. A small DC offset of ~50mV is added so that current flowing in and out of the battery can be monitored. The charge current is controlled by the current feedback loop at U2B. As the DC offset could be switched off for power management outside of charging making U2B output positive. D7 and D11 is used to clamp the output below the 6V limit of the MP2307. D7 value was empirically determined as it is different than what LTSpice predicts - inaccuracy in my zener diode model.</div><div><br /></div><div>Everything works exactly as I designed except for the Mini-360 module was overheating. At a first glance, the MP2307 internal switch should be good enough.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOVzpIiUeg3tP9HduwpxkemZilNKHGKWWZ1l44UkMZuk09t7m3petM9hJe-dtfAQ-EqAXGkNcywuTOKG6gzGRj1bxvNlh1x1_qsiEhr7m64ihkHFac1fx35lPFnsNjO5X5mtpV4U7bXl064N4bUPVjntyRbi5-gShGjqdVUJYlLqWLXxG8WFQYzNl5Up2A/s545/Clipboard07ng.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="75" data-original-width="545" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOVzpIiUeg3tP9HduwpxkemZilNKHGKWWZ1l44UkMZuk09t7m3petM9hJe-dtfAQ-EqAXGkNcywuTOKG6gzGRj1bxvNlh1x1_qsiEhr7m64ihkHFac1fx35lPFnsNjO5X5mtpV4U7bXl064N4bUPVjntyRbi5-gShGjqdVUJYlLqWLXxG8WFQYzNl5Up2A/s16000/Clipboard07ng.png" /></a></div><br /><div>Both the inductor and the MP2307 gets very hot. The overall efficiency was around 70%. Could it be fake chips, fake inductor or something else?</div><div><br /></div><div>It turns out, the inductor value is too low for the high duty cycle in my application. For each switching cycle, the 10uH inductor have longer time to reach much higher current. Both inductor and internal switch have to operate at a higher currents and cause more conduction losses.</div><div><br /></div><div>Here is what can happen (C) when an inductor goes into saturation. The inductor current increase more rapidly and this causes even more conduction losses at the internal switches and inductor. </div><div><br /></div><div>A higher inductance would have a slower rise in current.</div><div><br /></div><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/AVvXsEhxRItKDolXbfp7rzHBNMGeFPQqRBA-vtcq-tA8XSjTtMgwL77zXvNKzSxQjOfq28x9MH1tQcY5ixRHDT9bgZTpfliocJRCR_NMz6FyEPvnpDFGWxy4vqkK1ZuzkPAUUk5tFykEOySLUUM3UeY3gfJSV2qdYgS75RzAO46Pr5Z3h92_nABeOz_Pr6kxpdaH/s455/Clipboard08.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="142" data-original-width="455" height="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxRItKDolXbfp7rzHBNMGeFPQqRBA-vtcq-tA8XSjTtMgwL77zXvNKzSxQjOfq28x9MH1tQcY5ixRHDT9bgZTpfliocJRCR_NMz6FyEPvnpDFGWxy4vqkK1ZuzkPAUUk5tFykEOySLUUM3UeY3gfJSV2qdYgS75RzAO46Pr5Z3h92_nABeOz_Pr6kxpdaH/s320/Clipboard08.png" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Current vs Time plot as an inductor goes into saturation<br />Source: http://elm-chan.org/works/lchk/report.html</td></tr></tbody></table><br /><div>The datasheet even has an equation for the needed value:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQIAsSJB-H1WAlEWAnqSMKkqp32ZBpmMvCuO065s3U-efxQ7plWlbciXDd4E7WhDo2Q3W6pkU8O8VUIPPNrMp0dKsCWgyOSz0Ucnp0Me6uslZSXJf6yJ79WsNOL1jjz4XPCpqelhLRxamwzDAxMG0zh8sBT9mP9HWEnYpQfaBN7M9zt9353xSo27Vi-yZA/s293/Clipboard09.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="80" data-original-width="293" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQIAsSJB-H1WAlEWAnqSMKkqp32ZBpmMvCuO065s3U-efxQ7plWlbciXDd4E7WhDo2Q3W6pkU8O8VUIPPNrMp0dKsCWgyOSz0Ucnp0Me6uslZSXJf6yJ79WsNOL1jjz4XPCpqelhLRxamwzDAxMG0zh8sBT9mP9HWEnYpQfaBN7M9zt9353xSo27Vi-yZA/s1600/Clipboard09.png" width="293" /></a></div><div><br /></div><div>L = 15V / (340kHz * (0.3 * 1A)) * (1 - 15V/18V) = 24.5uH, picking the next value up as 27uH.<div>Inductor rating is ~ 1.3 * I, so 1.3A is fine.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYwR8r4K4yxnBKPc1jFK-2R3Uaun0AOwd_20tnOqokdEpPD9MV6sSfQGA1a2CEQoUkturoiYFUZMylxJULNZuQOG3w8LRPhN-5j-gZKkc1s41G2od0RlkLzqdHk64u_EiRFfmmKvSRHDAnwZPbJi3MX7ROjAwrADkF0ei2mMHv68Nyp0Rr6TeRRECIgMM7/s718/Clipboard10.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="213" data-original-width="718" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYwR8r4K4yxnBKPc1jFK-2R3Uaun0AOwd_20tnOqokdEpPD9MV6sSfQGA1a2CEQoUkturoiYFUZMylxJULNZuQOG3w8LRPhN-5j-gZKkc1s41G2od0RlkLzqdHk64u_EiRFfmmKvSRHDAnwZPbJi3MX7ROjAwrADkF0ei2mMHv68Nyp0Rr6TeRRECIgMM7/s16000/Clipboard10.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>I only have CD75-100M inductor (10uH). I took off the wires and counted the turns 16T.</div><div><br /></div><div>Since L is proportional to N^2, the required turns = 16T * sqrt(27/10) = 27T. I used AWG 29 wires I got from old transformer.</div><div><br />The core can only handle so much flux before it goes into saturation. That flux is proportional to N*I<br />2.3A * 16/27 = 1.36A which agrees with the 27uH part rating which means that it is made using the same core with more windings.</div><div><br /></div><div>The overall efficiency went up to the 90% range after the inductor change..</div><div><br /><div><div>At 90% efficiency, 15V*0.8A * (100% - 90%) = 1.2W for the module to dissipate.</div><div>I might charge current 0.8A (due to previous overheating) back to 1A after some more testing.</div><div><br /></div><div>I mounted the module vertically so that its back side ground fill is also exposed. This increases the surface area for natural convection and help with the heat dissipation.</div><div><br /></div></div><div>Here are the modifications I have made.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP_J32m3ZErrofIihwoLH5mdXVREa4ceoaqpNeyo90AOg4G1k6HkrHNatsditenumVhH6-IPONu7PA3U_vzNt2qmPmiXceLVcUmJWK8Y1INS36uizewVjvJBIL2ge_N5oP1mxZ8mDOVCmtCzQ1SW4g0LUDmLTwakH-E2CVijlIE2GqrQU0ZoEVDa34Nb5L/s675/Clipboard11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="675" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP_J32m3ZErrofIihwoLH5mdXVREa4ceoaqpNeyo90AOg4G1k6HkrHNatsditenumVhH6-IPONu7PA3U_vzNt2qmPmiXceLVcUmJWK8Y1INS36uizewVjvJBIL2ge_N5oP1mxZ8mDOVCmtCzQ1SW4g0LUDmLTwakH-E2CVijlIE2GqrQU0ZoEVDa34Nb5L/s16000/Clipboard11.png" /></a></div><br /><div><br /></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-50386525927176883192023-12-19T10:10:00.001-05:002023-12-19T17:37:03.652-05:00Isolated power supply 2There are primary side sensing converters e.g. <a href="https://www.analog.com/en/products/lt3573.html" target="_blank">LT5373</a> that uses the flyback pulse during the off period to regulate the output voltage. They have an article on this: <a href="https://www.analog.com/en/technical-articles/primary-side-sensing-takes-complexity-out-of-isolated-flyback-converter-design.html" rel="nofollow" target="_blank">Primary-Side Sensing Takes Complexity out of Isolated Flyback Converter Design</a>.<div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgco55AT4vgA0OfkfCpfVejgtR1IT9nETHTr_1j5xDBaYsJwmHKdTaYp4nrhgCPWtHav7E6Od880cG8mxtasAAxT70bYiwTDqet6MFeTDnvn-Hu8DFxYVfafhUzD9WIIUulBjflTFw4SuhiPWHlXBOl3O2oHPll6Zflfh1w6ssT9ZATNTG0gJoTPfQCIn0l/s864/Clipboard03.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="425" data-original-width="864" height="314" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgco55AT4vgA0OfkfCpfVejgtR1IT9nETHTr_1j5xDBaYsJwmHKdTaYp4nrhgCPWtHav7E6Od880cG8mxtasAAxT70bYiwTDqet6MFeTDnvn-Hu8DFxYVfafhUzD9WIIUulBjflTFw4SuhiPWHlXBOl3O2oHPll6Zflfh1w6ssT9ZATNTG0gJoTPfQCIn0l/w640-h314/Clipboard03.jpg" width="640" /></a></div></div><div><br /></div><div><br /></div><div>I took a DIY approach using a regular boost converter and adding my flyback pulse sensing circuit. The flyback pulse is rectified across C2. Q1 is a current source that is used to translate the voltage to the feedback pin across resistor R2 thus regulating the voltage across C2. The current source is also a dummy to keep the boost converter running.</div><div><br /></div><div>D1, C2 and R3 looks similar to the snubber used in a typical flyback converter and also functions as one.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Qcf_gKgKMb6vTao8FIHyqsOkaJN7xhNtt2WWKL4W8RivfU145WYBd-JvKXpIW92TQhuWORiVumVw6NqcnxgJeHenn5W7Er_vD-LNa-XK0rZul90ZyNmWkGMRzDz350lIE94ZNkyUHSJslt-ER_i5q5L0cfR8ZovDaI-gnXMe0dAC6acbDpbSyBkxjwqQ/s876/Clipboard01.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="399" data-original-width="876" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-Qcf_gKgKMb6vTao8FIHyqsOkaJN7xhNtt2WWKL4W8RivfU145WYBd-JvKXpIW92TQhuWORiVumVw6NqcnxgJeHenn5W7Er_vD-LNa-XK0rZul90ZyNmWkGMRzDz350lIE94ZNkyUHSJslt-ER_i5q5L0cfR8ZovDaI-gnXMe0dAC6acbDpbSyBkxjwqQ/s16000/Clipboard01.jpg" /></a></div></div><div><br /></div>I used the LT1961 as a simulation model because of the same switching frequency to the MT3608. Value of R2 is changed for the higher reference voltage.<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimQkPTFjiTwlmAPZpDoZh89O0jMgk1fVBuBn834gy8whh2o2jeTc_6D_GPbuzpzntkNfydEp9gx36aiNPD6YTAiJObKbK2UYNUS79F8CWbyOktU6sjLoqA1CFzHIZXiwSMpENdPlDBFBLqjv06F7JnKgmExZRNwwIghUZBgVY_88c52vLwllqGS4vjE3kH/s1113/Clipboard07.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="1113" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimQkPTFjiTwlmAPZpDoZh89O0jMgk1fVBuBn834gy8whh2o2jeTc_6D_GPbuzpzntkNfydEp9gx36aiNPD6YTAiJObKbK2UYNUS79F8CWbyOktU6sjLoqA1CFzHIZXiwSMpENdPlDBFBLqjv06F7JnKgmExZRNwwIghUZBgVY_88c52vLwllqGS4vjE3kH/w640-h232/Clipboard07.jpg" width="640" /></a></div><div><br /></div><div>I noticed negative high voltage spikes during startup in LTSpice simulation. These spikes goes away as the secondary side load increases as voltage ramps up.<div><br /><div><div></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5YQIAy64BqwcGasqbcrCmvI9T2RUPNaVa7o_XBQ1WOfoXu2TXFJQfXMMlyu2agtrrJFgNLCdy3QvldOoIqyTMkwIHEOFsBr12aBYILnbZ6vnUmj8DATX8UoGaf8hBtRluqvnrXO0giDETTKp70p6kM2_0g0QSOuenC7IdHpXODLpua4ZwDHPyYWdCTFWz/s291/Clipboard04.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="291" height="285" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5YQIAy64BqwcGasqbcrCmvI9T2RUPNaVa7o_XBQ1WOfoXu2TXFJQfXMMlyu2agtrrJFgNLCdy3QvldOoIqyTMkwIHEOFsBr12aBYILnbZ6vnUmj8DATX8UoGaf8hBtRluqvnrXO0giDETTKp70p6kM2_0g0QSOuenC7IdHpXODLpua4ZwDHPyYWdCTFWz/s1600/Clipboard04.jpg" width="291" /></a></div><br /><div>I use a clamping diode on the switch pin to ground. The <a href="https://www.nexperia.com/products/diodes/switching-diodes/general-purpose-switching-diodes/BAV99.html" rel="nofollow" target="_blank">BAV99</a> diode comes with a second diode and is used for that purpose in my design.</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMO7Zka4YjnPXLKEZD2UwfGV1NJZ3QygcsC0-ABVDY0M2UzcWxImK9aTgBWsq4a18ny79Bl7phx6BjW2bPf7o9F9fQX5ygWq2_s6XiNQMUzLExFwDZKR-pnH0g1ioxHgOjmMSN3LJxsYK7goV9gEu1TgOB2fLl6p-31Wa6Rf3XzjexHRP6GTjjU0GkjtaQ/s575/Clipboard06.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="183" data-original-width="575" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMO7Zka4YjnPXLKEZD2UwfGV1NJZ3QygcsC0-ABVDY0M2UzcWxImK9aTgBWsq4a18ny79Bl7phx6BjW2bPf7o9F9fQX5ygWq2_s6XiNQMUzLExFwDZKR-pnH0g1ioxHgOjmMSN3LJxsYK7goV9gEu1TgOB2fLl6p-31Wa6Rf3XzjexHRP6GTjjU0GkjtaQ/w640-h203/Clipboard06.jpg" width="640" /></a></div><br /><div>The output has a PI filter consists of a small ceramic capacitor, a ferrite bead and a bulk tantalum capacitor. At1.2MHz switching frequency, the ferrite does a good job of filtering out these ripples.</div><div><br /></div><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/AVvXsEi7XeWEU2BqmjVB6ADuVvUN3XQc5hWgIYV_ogBgNsw9zhUaNx9OdRMY2zZeE0yTa7OLZNw3YRtbVxAdChMiKSrWguOm_EFqcEbvyeTRdk9bNDER5OgOXARjlMko5NBUBAmMswC0j5MHo0GVvJCJOfRpRcyHRo0M5FykxiF6mRuPFMpzd-EMxqMNtiPXI2ZZ/s452/Clipboard01.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="274" data-original-width="452" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7XeWEU2BqmjVB6ADuVvUN3XQc5hWgIYV_ogBgNsw9zhUaNx9OdRMY2zZeE0yTa7OLZNw3YRtbVxAdChMiKSrWguOm_EFqcEbvyeTRdk9bNDER5OgOXARjlMko5NBUBAmMswC0j5MHo0GVvJCJOfRpRcyHRo0M5FykxiF6mRuPFMpzd-EMxqMNtiPXI2ZZ/w640-h388/Clipboard01.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Green trace: voltage across ceramic capacitor before the ferrite bead<br />Red trace: voltage across tantalum capacitor after the ferrite bead</td></tr></tbody></table><div><br /></div><div>This circuit isolation is limited by the <span face="DDG_ProximaNova, DDG_ProximaNova_UI_0, DDG_ProximaNova_UI_1, DDG_ProximaNova_UI_2, DDG_ProximaNova_UI_3, DDG_ProximaNova_UI_4, DDG_ProximaNova_UI_5, DDG_ProximaNova_UI_6, "Proxima Nova", "Helvetica Neue", Helvetica, "Segoe UI", "Nimbus Sans L", "Liberation Sans", "Open Sans", FreeSans, Arial, sans-serif" style="background-color: white; color: #494949; font-size: 14.4px;"> </span><span face="DDG_ProximaNova, DDG_ProximaNova_UI_0, DDG_ProximaNova_UI_1, DDG_ProximaNova_UI_2, DDG_ProximaNova_UI_3, DDG_ProximaNova_UI_4, DDG_ProximaNova_UI_5, DDG_ProximaNova_UI_6, "Proxima Nova", "Helvetica Neue", Helvetica, "Segoe UI", "Nimbus Sans L", "Liberation Sans", "Open Sans", FreeSans, Arial, sans-serif" style="background-color: white; color: #494949; font-size: 14.4px;">PCB spacing as well as the</span> <span face="DDG_ProximaNova, DDG_ProximaNova_UI_0, DDG_ProximaNova_UI_1, DDG_ProximaNova_UI_2, DDG_ProximaNova_UI_3, DDG_ProximaNova_UI_4, DDG_ProximaNova_UI_5, DDG_ProximaNova_UI_6, "Proxima Nova", "Helvetica Neue", Helvetica, "Segoe UI", "Nimbus Sans L", "Liberation Sans", "Open Sans", FreeSans, Arial, sans-serif" style="background-color: white; color: #494949; font-size: 14.4px;">enamel on the magnetic wires between the primary and secondary side. </span> Here is the layout on a 0.8" x 0.815" (20.3mm x 20.7mm) single sided PCB.</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig9fYz3I8nJ3pAxUojVWaL4uHip3XaJpaT-htmHO5iYs8WfRyStXA93L7zmZum9XIG5oM4QfSoEkCdjlWp6OQzMYI1gUbMn1MskVGm0rgFRTTjhdyJS4S3TK9lkjCKlmxjaL7Q8XybesIjP7lcmhyphenhyphenYRbSF1jk1RBPXwzvpJf57DdN8w2BxeByOgX6KVD-H/s496/Clipboard08.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="496" data-original-width="346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig9fYz3I8nJ3pAxUojVWaL4uHip3XaJpaT-htmHO5iYs8WfRyStXA93L7zmZum9XIG5oM4QfSoEkCdjlWp6OQzMYI1gUbMn1MskVGm0rgFRTTjhdyJS4S3TK9lkjCKlmxjaL7Q8XybesIjP7lcmhyphenhyphenYRbSF1jk1RBPXwzvpJf57DdN8w2BxeByOgX6KVD-H/s16000/Clipboard08.jpg" /></a></div><div><br /></div>This circuit has good line regulation but poor load regulation unlike the LT5373. A secondary side LDO would help. <div><br /></div><div>No load voltage: 7.45V. Full load (40 ohms) voltage: 6.51V +/- 0.01V between input voltage of 12V to 18V. The wall wart that this module is replacing has a no load voltage 7.8V and 6.74V at 40 ohms load.<div><br /><div><br /></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-69601561889864094502023-04-30T09:36:00.014-04:002023-04-30T10:32:34.199-04:00USB Power Bank <p> I got one of those <a href="https://leeds.brandeditems.com/english/details_4/ul-listed-amp-power-bank_3554/" target="_blank">Leed's USB power bank</a> from my apartment building during a planned power outage. It blew up when I tried to charge it. There wasn't a whole lot I could reverse engineered from the dead parts. There was a 5-pin and a 6-pin chips and a bunch of passives. My understanding is that it uses an inverting buck boost converter for both charging and output as the VUSB pins of both the USB connectors are connected together.</p><p>I finally got around to rebuild it from scratch this weekend with what I have on hand. The parts I have were from aliexpress before the big chips shortages. I use a LTC4054 Li-ion charger chip and a MT3608 boost converter. </p><p>The charging rate is limited by heat dissipation on a tiny single sided PCB. The output current is limited by the Schottky diode, inductor and battery discharge rate to about 1A (or slightly higher) or so matching to the original power bank. </p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGMq1IH7JeShqteAZaar0aJwsbe5vUGn5AVwLGMRjUZ1OvTcQn5k7MiiLN0Sf6bYz3uvvWzwOy4DHExCF3ySzbyesJzwxAWg3P0diyzOMU-ar2IVqMUogB5xe5qi7HuX8se05By1bJqtZvdasnQsQlWnhRnxlxGf4dprSLWmE0Tjz1qFaYbLFtz7ePw/s1184/power%20bank.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="632" data-original-width="1184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlGMq1IH7JeShqteAZaar0aJwsbe5vUGn5AVwLGMRjUZ1OvTcQn5k7MiiLN0Sf6bYz3uvvWzwOy4DHExCF3ySzbyesJzwxAWg3P0diyzOMU-ar2IVqMUogB5xe5qi7HuX8se05By1bJqtZvdasnQsQlWnhRnxlxGf4dprSLWmE0Tjz1qFaYbLFtz7ePw/s16000/power%20bank.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Power bank schematic</div><br /><div class="separator" style="clear: both;">Q1 and the 1M pull down (R3) is used to invert the logic level of my switch to drive the Boost converter Enable pin. The switch is also used to connect the R2 from the voltage divider feedback to the ground. RGB LED is used as for Charging/Operating indicator. </div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcpRz9IQNKFCVPx4wLFKJnQ7enMw3Unf74xoJcSoPfG9q331r88I_7KgtcHD1JwUTo5uZLyyLtVg741JxwH_K-fnwV67CQH3Lp6LYFpV1bNNyXL2gIqjnu-lB9gAbT-YMQTi7C91D9xnJlTeCS0CrLdnZwF1SbB9lGd4kqQGJtpGlUhXv2xpjQxoh5g/s510/Clipboard01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="86" data-original-width="510" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcpRz9IQNKFCVPx4wLFKJnQ7enMw3Unf74xoJcSoPfG9q331r88I_7KgtcHD1JwUTo5uZLyyLtVg741JxwH_K-fnwV67CQH3Lp6LYFpV1bNNyXL2gIqjnu-lB9gAbT-YMQTi7C91D9xnJlTeCS0CrLdnZwF1SbB9lGd4kqQGJtpGlUhXv2xpjQxoh5g/s16000/Clipboard01.png" /></a></div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">The converter goes into a PFM (Pulse Frequency Modulation) power saving mode for low current loads.</div><div class="separator" style="clear: both;">I used Green LED as they have the highest efficiency. It is connected across the inductor to reduce idle power. It only get energized only when the boost converter is supplying current to the load. The brightness is proportional to load. Fancy!</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;"><div class="separator" style="clear: both;">Your USB power bank might have a detection circuit that shuts itself off. I could have used a low power microcontroller that wakes up every hundreds of milliseconds to detects voltage drop across the Schottky diode to turn on the converter.</div><div class="separator" style="clear: both;"><br /></div></div><div class="separator" style="clear: both;">The idle current is about 200-300uA while maintaining a 5V output when the external USB device not drawing power. That seems high, until you realize that it'll take thousands of hours before the battery is drained. </div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpEcQzGvGqZsRU6pfn5SU1DIsK4CMlYlxYG91aG96c_D6_hr_oDwhMDFQwaQ4B8DxTXAIvprzg9sjbtvOkYGwwl5jaQd5Z-zpYSYNwGd3rYZGWsOl0paf1ihYMEyvvOJJhNmyhJBxi7i0M_EuDJlk5p_IlOdBG7YUXPBH6o962NeA4C2P-Nlbp6hBZ0w/s432/pcb.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="429" data-original-width="432" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpEcQzGvGqZsRU6pfn5SU1DIsK4CMlYlxYG91aG96c_D6_hr_oDwhMDFQwaQ4B8DxTXAIvprzg9sjbtvOkYGwwl5jaQd5Z-zpYSYNwGd3rYZGWsOl0paf1ihYMEyvvOJJhNmyhJBxi7i0M_EuDJlk5p_IlOdBG7YUXPBH6o962NeA4C2P-Nlbp6hBZ0w/s320/pcb.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;">Power bank PCB</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">My PCB is taped to the existing stripped down PCB. I had to cut the VBUS trace between the USB connectors. The blue wires are for the RGB LED.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><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/AVvXsEj2FnDxj7vHJyhX6liWkQDM6qyeKqcGC9xS7r_zNQoMBYckBBdAMvFj76nJXPs8256g39kt_yBf_Yc3-T02SQeO_WTzRIuW3_umqqdeMf1chuTxcDG8suHFStkgVGofqc6zAOefyoLRETlr3g4pGBMbJHjU-DwJ4C3yI_5O8E3jQXNTzbxggtpBU5eUfQ/s304/IMG_3182.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="227" data-original-width="304" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2FnDxj7vHJyhX6liWkQDM6qyeKqcGC9xS7r_zNQoMBYckBBdAMvFj76nJXPs8256g39kt_yBf_Yc3-T02SQeO_WTzRIuW3_umqqdeMf1chuTxcDG8suHFStkgVGofqc6zAOefyoLRETlr3g4pGBMbJHjU-DwJ4C3yI_5O8E3jQXNTzbxggtpBU5eUfQ/s1600/IMG_3182.JPG" width="304" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Populated PCB (I only have 1A/20V Schottky diode.)</td></tr></tbody></table><br /><div class="separator" style="clear: both; text-align: left;">I modified the USB A connector to include a contact switch that is grounded when the USB A is plugged in. This is used to enable the boost converter circuit.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><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/AVvXsEinu6sawhq9mprJv5_guIjbaGu6C1YGWvMzjxrLwW3cKlCVGw8VBawk7awaEWJe0DIJTwrsXoc89S7tXuyD1qtsGwQhlzCVIPDIcOCk6nUZ-JCpzwObzQqzi58E84e3PuozZzpxMDuy9zwjruio-AryOSNRKH4tpJtX-4pral8b1NejOd-aRKBhWSp6eQ/s563/IMG_3183.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="337" data-original-width="563" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinu6sawhq9mprJv5_guIjbaGu6C1YGWvMzjxrLwW3cKlCVGw8VBawk7awaEWJe0DIJTwrsXoc89S7tXuyD1qtsGwQhlzCVIPDIcOCk6nUZ-JCpzwObzQqzi58E84e3PuozZzpxMDuy9zwjruio-AryOSNRKH4tpJtX-4pral8b1NejOd-aRKBhWSp6eQ/s320/IMG_3183.JPG" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Modified connector to sense presence of USB plug</td></tr></tbody></table><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/AVvXsEgWLFcrBDG_ehMZY6bERGibV3Jeopw9gtvqwoPV8NDESApfbINBTCg8oph3tr5kdvBD_jNvypeWlKeVfGS3fnNqCzt5DFAkAb3I_lOi4bqNvfoYfRyCaV3C8UBFi3ChiYoebWEpidx4SCABsFBLqn6lhGvd2MBcf29-4GVzvl9t2Luz9Rs3br6XXVfynQ/s358/IMG_3186.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="358" data-original-width="320" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWLFcrBDG_ehMZY6bERGibV3Jeopw9gtvqwoPV8NDESApfbINBTCg8oph3tr5kdvBD_jNvypeWlKeVfGS3fnNqCzt5DFAkAb3I_lOi4bqNvfoYfRyCaV3C8UBFi3ChiYoebWEpidx4SCABsFBLqn6lhGvd2MBcf29-4GVzvl9t2Luz9Rs3br6XXVfynQ/s320/IMG_3186.JPG" width="286" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Red LED = Charging</td></tr></tbody></table><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/AVvXsEjOij0Y8CXvCySw9EhekMmiYUwKlQK7MUBDMti-9SngKBJrD2yCH0_McJ4cBZTcGFfI-0g0gFH0fwPSgvBmPmt7hDkMxi9DJtD0aS5M7kl5YIqQLs8Z29_5SHCpjPBpX1Uw5HHMMrAatJwz0FbuURo4DajwQc9xQPFkWkq0BfNx2Gt4kHHCGe0neqDI-A/s427/IMG_3187.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="328" data-original-width="427" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOij0Y8CXvCySw9EhekMmiYUwKlQK7MUBDMti-9SngKBJrD2yCH0_McJ4cBZTcGFfI-0g0gFH0fwPSgvBmPmt7hDkMxi9DJtD0aS5M7kl5YIqQLs8Z29_5SHCpjPBpX1Uw5HHMMrAatJwz0FbuURo4DajwQc9xQPFkWkq0BfNx2Gt4kHHCGe0neqDI-A/s320/IMG_3187.JPG" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Green LED = Operating. Brightness proportional to load</td></tr></tbody></table><br />Yellow is when both are connected, but that doesn't usually happen as the connector spacing is too closed together.<br /><div class="separator" style="clear: both; text-align: left;"><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-22122716939312582292023-02-14T16:43:00.001-05:002023-02-15T09:48:57.132-05:00STM8 - Generating 2 phase PWM<p>A <a href="https://en.wikipedia.org/wiki/Push%E2%80%93pull_converter" rel="nofollow" target="_blank">push pull converter</a> uses two drivers that are 180 degrees out of phase.</p><p>It is possible to generate PWM on 2 channels that are 180 degrees out of phase in TIM1on a STM8S003. All the register settings are from the reference manual, but you won't find an example.</p><p style="text-align: left;">TIM1 is set up as an up/down counter in Center-aligned mode. This spaces out the 2 phase PWM signal evenly.</p><p style="text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi5ea9KzpFJpkLewZkkwROs5luOjdKEe9DqJeyqpJtFnraYB1RlxnhI-lwL8OiS4OK48esenTUdwvdvvmE8rBsbNJe_BFEL4GJUHMBkOqa5Zm01Gsn2fBtRSTlGkEB3qAPdkzaMU9wC_Nl2UzoH3dY7G4Gg4YSxX69f2KiKSyXlJPQ2wga-7txAtX-uA/s809/Clipboard01.png" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="227" data-original-width="809" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi5ea9KzpFJpkLewZkkwROs5luOjdKEe9DqJeyqpJtFnraYB1RlxnhI-lwL8OiS4OK48esenTUdwvdvvmE8rBsbNJe_BFEL4GJUHMBkOqa5Zm01Gsn2fBtRSTlGkEB3qAPdkzaMU9wC_Nl2UzoH3dY7G4Gg4YSxX69f2KiKSyXlJPQ2wga-7txAtX-uA/w640-h180/Clipboard01.png" width="640" /></a></p><p style="text-align: left;">Since the timer is counting both up and down in 1 PWM cycle, auto-reload value for TIM1 should be set as 1/2 of the value to generate PWM frequency. I used <span style="font-family: helvetica;">TIM1_FREQ </span>of 27kHz in my code.</p><blockquote><div style="text-align: left;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">#define CPU_CLOCK<span style="white-space: pre;"> </span>16000000UL<br />#define TIM1_FREQ<span style="white-space: pre;"> </span>27000L<br />#define TIM1_PSCR<span style="white-space: pre;"> </span>1<br />#define TIM1_CLK<span style="white-space: pre;"> </span>(CPU_CLOCK/TIM1_PSCR)<br />#define TIM1_ARR<span style="white-space: pre;"> </span>(TIM1_CLK/TIM1_FREQ/2)</span></div></blockquote><div style="text-align: left;"><blockquote><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">#define TIM1_PSCRH<span style="white-space: pre;"> </span>((TIM1_PSCR-1)>>8)<br />#define TIM1_PSCRL<span style="white-space: pre;"> </span>((TIM1_PSCR-1)&0xff)<br />#define TIM1_ARRH<span style="white-space: pre;"> </span>((TIM1_ARR)>>8)<br />#define TIM1_ARRL<span style="white-space: pre;"> </span>((TIM1_ARR)&0xff) </span></blockquote></div><p><span style="white-space: pre;"></span></p><blockquote><div style="text-align: left;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">// Clk = 16MHz<br />CLK->CKDIVR = 0;</span> </div></blockquote><blockquote><div style="text-align: left;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">TIM1->PSCRH = TIM1_PSCRH;<br />TIM1->PSCRL = TIM1_PSCRL;<br />TIM1->ARRH = TIM1_ARRH;<br />TIM1->ARRL = TIM1_ARRL; </span></div></blockquote><p><span style="white-space: pre;"></span></p><blockquote><div style="text-align: left;"><span style="background-color: white;"><span style="color: #2b00fe;"><span style="font-family: helvetica; font-size: x-small;">// TIM1 enable, Center-aligned mode 3<br /></span>TIM1->CR1 = TIM1_CR1_CEN|TIM1_CR1_CMS; </span></span></div></blockquote><p></p><p style="text-align: left;">Output enable (and polarity) bits of the corresponding TIM1 channels can be set in TIM1 CCERx. I use CH3 and CH4.</p><div style="text-align: left;"><span style="white-space: pre;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;"></span></span><blockquote><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">// CH3, CH4 output enable, polarity active high<br />TIM1->CCER2 = TIM1_CCER2_CC4E|TIM1_CCER2_CC3E;</span></blockquote></div><p style="text-align: left;">From the Reference Manual:</p><blockquote><p><i>110: PWM mode 1 - In up-counting, channel 1 is active as long as TIM1_CNT < TIM1_CCR1, otherwise, the channel is inactive. In down-counting, channel 1 is inactive (OC1REF = 0) as long as TIM1_CNT > TIM1_CCR1, otherwise, the channel is active (OC1REF = 1).</i></p></blockquote><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiGtmX7d2y0YJeYF__nVx2QxCZv0uCZMcpVMvPGLpcbTKpKuDDOjKxitji3zuScjDmLfyJeE7gWXlR9TgUYnxrZw7_DPJhfVcGmBCk75xQLB_7vn3m9o-Aou5Z_wTCqzBl0RWkaOrwnzL_X4lDdwohIp66-FsEywG8r9DQpuV7oV88qe2WlTYOSN4TJQ/s544/Clipboard07.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="161" data-original-width="544" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiGtmX7d2y0YJeYF__nVx2QxCZv0uCZMcpVMvPGLpcbTKpKuDDOjKxitji3zuScjDmLfyJeE7gWXlR9TgUYnxrZw7_DPJhfVcGmBCk75xQLB_7vn3m9o-Aou5Z_wTCqzBl0RWkaOrwnzL_X4lDdwohIp66-FsEywG8r9DQpuV7oV88qe2WlTYOSN4TJQ/s16000/Clipboard07.png" /></a></div><div style="text-align: center;">PWM Mode 1 when ARR =8 and CCR = 4</div><div style="text-align: left;"><br /></div><div style="text-align: left;">PWM mode 2 works similarly, but with the output polarity inverted.</div><blockquote><p><i>111: PWM mode 2 - In up-counting, channel 1 is inactive as long as TIM1_CNT < TIM1_CCR1, otherwise, the channel is active. In down-counting, channel 1 is active as long as TIM1_CNT > TIM1_CCR1, otherwise, the channel is inactive.</i> </p></blockquote><p>One can generate a PWM signal using a sawtooth wave and a comparator. </p><p style="text-align: center;"> <a href="https://electronicspost.com/generation-and-detection-of-a-pwm-signal/" rel="nofollow" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="173" data-original-width="482" height="173" src="https://electronicspost.com/wp-content/uploads/2020/06/1-20.png" width="482" /></a></p><p style="text-align: center;">PWM generation using analog circuit - Sawtooth wave and a comparator</p><p style="text-align: left;">The modulating signal level is the CCR value, the TIM1 counter is the sawtooth wave. The PWM modes 1 and 2 are just the polarity setting on the comparator.</p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCQ6tTcXiIfdwvvdH4G2jR837tejvANgmSf1os7T-faw073nznsLr3os3RadDpXZrV4Od9UrjlNuxkWm88U4phO7TpQARGPKhX-mqWKO54xYFmaBz2L0TFBYzv3aAuYRxZxGZXqXh38-c5DMjXM2lHV67g2mAhBx9nfgtXeMqOHJPPp73w9M7z6q0A2Q/s759/Clipboard08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="203" data-original-width="759" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCQ6tTcXiIfdwvvdH4G2jR837tejvANgmSf1os7T-faw073nznsLr3os3RadDpXZrV4Od9UrjlNuxkWm88U4phO7TpQARGPKhX-mqWKO54xYFmaBz2L0TFBYzv3aAuYRxZxGZXqXh38-c5DMjXM2lHV67g2mAhBx9nfgtXeMqOHJPPp73w9M7z6q0A2Q/s16000/Clipboard08.png" /></a></div></div><div style="text-align: center;"><br /></div><div style="text-align: center;">PWM generation using TIM1</div><p> One of the TIM1 channel (CH3) is set up with PWM Mode 1 while another channel (Ch4) as PWM Mode 2.</p><p><span style="white-space: pre;"></span></p><blockquote><div><span style="color: #2b00fe;"><span style="font-family: helvetica; font-size: x-small;">// CH3: PWM mode 1, preload, output<br /></span><span style="font-family: helvetica; font-size: x-small;">TIM1->CCMR3 = (6<<4)|TIM1_CCMR_OCxPE;<br /></span><span style="font-family: helvetica; font-size: x-small;">// CH4: PWM mode 2, preload, output<span style="white-space: pre;"> <br /></span></span><span style="font-family: helvetica; font-size: x-small;">TIM1->CCMR4 = (7<<4)|TIM1_CCMR_OCxPE;</span></span></div></blockquote><p style="text-align: left;">Use PWM Mode 1 for one of the channels to center an output around Timer count = 0 and Mode 2 on the other to center around Timer count = ARR. This is how you can generate the 2 phase PWM signals.</p><p></p><p>The CCR values could be set independently. In some applications, you want them to have the same PWM duty cycles. The granularity of the PWM signal is 2 TIM1 clocks. (125ns in my code)</p><blockquote><div style="text-align: left;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">void Set_PWM(uint16_t Value)<br />{<br /><span style="white-space: pre;"> </span>Value >>=1;<br /><span style="white-space: pre;"> </span>// CCR3 = n/2<br /><span style="white-space: pre;"> </span>TIM1->CCR3H = Value >>8;<br /><span style="white-space: pre;"> </span>TIM1->CCR3L = Value & 0xff;<br /><span style="white-space: pre;"> <br /></span><span style="white-space: pre;"> </span>// CCR4 = TIM1_ARR - n/2<br /><span style="white-space: pre;"> </span>Value = TIM1_ARR - Value;<br /><span style="white-space: pre;"> </span>TIM1->CCR4H = Value >>8;<br /><span style="white-space: pre;"> </span>TIM1->CCR4L = Value & 0xff;<br />}</span></div></blockquote><p></p><p style="text-align: left;">Turn on the MOE (Main Output Enable) bit in TIM1 BKR (Break Register). An external signal can be used to disable the TIM1 outputs in the case of a hardware fault. e.g. over-current or over-temperature condition</p><blockquote><div style="text-align: left;"><span style="color: #2b00fe; font-family: helvetica; font-size: x-small;">// Master output enable<br />TIM1->BKR = TIM1_BKR_MOE;</span></div></blockquote><p>This are some the output of PWM waveform at 27kHz captured on my logic analyzer.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Xd6JFf1qBElYHIkFp27O7lWXtXSylfhw-mPZsGofQiPojpK_g3_swZZsSaq7k90G9JkyhJMnd21DBnpLacTLUoiJJh1GyQu-UfA4KUREMhWQuP6AC-0pIDqTpBi_VHataWoUHnQjSVby3M_n91MzBaEgTu-1DuDt3H8aiF2Z7QMTN2ILpBMUphQBDg/s627/Clipboard06.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="257" data-original-width="627" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Xd6JFf1qBElYHIkFp27O7lWXtXSylfhw-mPZsGofQiPojpK_g3_swZZsSaq7k90G9JkyhJMnd21DBnpLacTLUoiJJh1GyQu-UfA4KUREMhWQuP6AC-0pIDqTpBi_VHataWoUHnQjSVby3M_n91MzBaEgTu-1DuDt3H8aiF2Z7QMTN2ILpBMUphQBDg/s16000/Clipboard06.png" /></a></div><div style="text-align: center;">2 phase PWM at 27kHz</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglvoktDLdqUWYbpkARzsetjCOMXaX4uhJdHIcCrY9LQt5mFh3bU0nZT9N1IIT4arSG6BrbjMBCk_Zm9jK_cSDtGdXMTj3cNU36o0PkIuT3U0wbkCqJH8r_RoCnpu9dQgPNE4rulZ-MHF5i2jKvk6IlFcb6ud94rEnjtqiCl3EDZWELqB_4krox9cRHvw/s623/Clipboard11.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="181" data-original-width="623" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglvoktDLdqUWYbpkARzsetjCOMXaX4uhJdHIcCrY9LQt5mFh3bU0nZT9N1IIT4arSG6BrbjMBCk_Zm9jK_cSDtGdXMTj3cNU36o0PkIuT3U0wbkCqJH8r_RoCnpu9dQgPNE4rulZ-MHF5i2jKvk6IlFcb6ud94rEnjtqiCl3EDZWELqB_4krox9cRHvw/s16000/Clipboard11.png" /></a></div><div class="separator" style="clear: both; text-align: center;">Set_PWM(2) - 27kHz close to 0% duty cycle</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbladwwh0XZeRiTpt5htAZjhxjhCOQKXdE3E0D0McmMmj7-Gxl3i7xKSumZq6Isb2Xmp5AAhW3u-sQU6XIC5A82cknVvHmZOMAjnL49bbbIAPtwraHFc7SoXQm4wVsUhqJUZ9GfmBzMqKx5TyyavRvIIq2xbGee0G8JtFFVv5njyQ0czBYDsQaO1G5jA/s627/Clipboard09.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="189" data-original-width="627" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbladwwh0XZeRiTpt5htAZjhxjhCOQKXdE3E0D0McmMmj7-Gxl3i7xKSumZq6Isb2Xmp5AAhW3u-sQU6XIC5A82cknVvHmZOMAjnL49bbbIAPtwraHFc7SoXQm4wVsUhqJUZ9GfmBzMqKx5TyyavRvIIq2xbGee0G8JtFFVv5njyQ0czBYDsQaO1G5jA/s16000/Clipboard09.png" /></a>2 Set_PWM(294) - 27kHz close to 50% duty cycle</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-73259941380033610592023-02-12T12:19:00.012-05:002023-02-14T12:39:11.108-05:00Optocouplers<p>Optocouplers are some of those things that are deceivingly easy to a beginner, but also hard to use correctly. If you are reading the datasheet carefully, you are in for a big surprise.</p><h4><div style="font-weight: 400;">CTR (<a href="https://toshiba.semicon-storage.com/ap-en/semiconductor/knowledge/faq/opto/opto-015.html" rel="nofollow" target="_blank">Current Transfer Ratio</a>): sensitivity of the coupler - the ratio of the transistor output current vs the LED current. e.g. for a 50% CTR, you have to drive the LED with 10mA and the transistor switches 5mA.</div><div style="font-weight: 400;"><br /></div><div class="separator" style="clear: both; font-weight: 400; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja_0wBZXCvvcR9EtqfndWRj1amH1dFaSsdLzGr6B7rZ-flKrn0desM5BGajreOBU33iBh2kO1LHz07N2F7touXuKdLvFohaJfxgNUj5IlH7d5hOiQmryAE4zUgl5L_mYF6Sm9G9eqBwgsfmpL75w9RPZE_2I9oB0HKTWLpPhzKpGbItCjHEoxmwahS2w/s559/CTR.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="113" data-original-width="559" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja_0wBZXCvvcR9EtqfndWRj1amH1dFaSsdLzGr6B7rZ-flKrn0desM5BGajreOBU33iBh2kO1LHz07N2F7touXuKdLvFohaJfxgNUj5IlH7d5hOiQmryAE4zUgl5L_mYF6Sm9G9eqBwgsfmpL75w9RPZE_2I9oB0HKTWLpPhzKpGbItCjHEoxmwahS2w/s16000/CTR.png" /></a></div></h4><h4><span style="font-weight: 400;">The CTR spec is very loose and likely this series of optocouplers are just different bins of the same parts. They don't even include a max value. </span></h4><h4><div class="separator" style="clear: both; font-weight: 400; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPAW5qwzTA8DloPMWjLygCkHwLRcB_7RdJsmtmwxj5-4OzsgL-NT3sSyjs6seeUkXxwZBNboPpZgy9SWCpyrRvINmPzMIruonEfz_ZQo8-1KooG8bSNe9bqo0WKKvVHCldNOY2Ckib6_71CN1WlQAZWjzRV0QmGJm67sJluw2sPAPUD9kLcUnpH_-CFw/s591/Clipboard01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="70" data-original-width="591" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPAW5qwzTA8DloPMWjLygCkHwLRcB_7RdJsmtmwxj5-4OzsgL-NT3sSyjs6seeUkXxwZBNboPpZgy9SWCpyrRvINmPzMIruonEfz_ZQo8-1KooG8bSNe9bqo0WKKvVHCldNOY2Ckib6_71CN1WlQAZWjzRV0QmGJm67sJluw2sPAPUD9kLcUnpH_-CFw/s16000/Clipboard01.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><span style="font-weight: normal;">This ones show both min and max value from 100% to 200%. </span><span style="font-weight: 400;">The following shows the part to part variation of a for a small samples of a (different) optocoupler.</span></div></h4><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ZUGKiueXC_kkMJaJy8eLy-rCC0NBTDa1mRyF3GZP3uui73eeVxyhgKlzMaApnKCKGk7QFbfWZ2BtXNuZ50cBJgl5_to5Tck__hcysEQzCL2Olq5lbKXPscZV03DyeevCsWEZlrP2swMuwzWoElo9VesEV8z4NCVVCQdqYc1bBePEXWP-zh79fVTN0w/s278/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="278" data-original-width="251" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ZUGKiueXC_kkMJaJy8eLy-rCC0NBTDa1mRyF3GZP3uui73eeVxyhgKlzMaApnKCKGk7QFbfWZ2BtXNuZ50cBJgl5_to5Tck__hcysEQzCL2Olq5lbKXPscZV03DyeevCsWEZlrP2swMuwzWoElo9VesEV8z4NCVVCQdqYc1bBePEXWP-zh79fVTN0w/s1600/Clipboard02.png" width="251" /></a></div><div style="text-align: center;">CTR of a small sample of PS2021 optocoupler</div></div><h4 style="text-align: left;">Analog feedback</h4><p>The optocoupler is commonly used as an analog feedback in an isolated power supply. The error voltage is pass back as a current sink or source to close a negative feedback loop of a regulator across a voltage barrier.</p><p>I played around with the isolated power supply design from previous blog with feedback from the secondary side. The voltage regulation is very tight and virtually stays at around 5V from 5mA to125mA load.</p><p>I have no idea on how well it would work with the loose CTR specs.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHxCa_bo925aR2_61CdUM2XM_UeSZMGjhS8Iu6tOFvdhJxkSCKZQJ-x6uIXuQ_zff7MTbOPA04sSBeF4tUPBN49Qcc3IuXJjy3CPozQG8vsI-FjbE8_nzVuMjTPJ6fvhRLFcc_cXNDM6a-S3txTP7yW570KA36-qyjcubUVXfSvVS63mWdCKB13oSNQ/s884/Clipboard03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="306" data-original-width="884" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxHxCa_bo925aR2_61CdUM2XM_UeSZMGjhS8Iu6tOFvdhJxkSCKZQJ-x6uIXuQ_zff7MTbOPA04sSBeF4tUPBN49Qcc3IuXJjy3CPozQG8vsI-FjbE8_nzVuMjTPJ6fvhRLFcc_cXNDM6a-S3txTP7yW570KA36-qyjcubUVXfSvVS63mWdCKB13oSNQ/w640-h222/Clipboard03.png" width="640" /></a></div><h4>Passing digital signals</h4><div>They are one of those things that was made with compromises. In order to make the device sensitive, they made a big photo-transistor at the expense of large parasitic capacitance (<a href="https://en.wikipedia.org/wiki/Miller_effect" rel="nofollow" target="_blank">Millar Capacitance</a>) and and suffers from slow speed.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNrWkJ6Rbtewnl06sq2VEDBnqw_lsQTv7Xn5tArBX2IfipvSjy1iIYIHmH-7W4FRHcGcYhsMY0ULBkGH1CWkHoug7Gu1ZrdWeAODCo-A2xEbl5RZ044bkRRVRbywJLWRuNyPqCqrNzG7QiaXA9hsmQD-UsexbkKmI3w7JkjZbwRtqAPea3c8T9HY4rmg/s560/Clipboard03.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="47" data-original-width="560" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNrWkJ6Rbtewnl06sq2VEDBnqw_lsQTv7Xn5tArBX2IfipvSjy1iIYIHmH-7W4FRHcGcYhsMY0ULBkGH1CWkHoug7Gu1ZrdWeAODCo-A2xEbl5RZ044bkRRVRbywJLWRuNyPqCqrNzG7QiaXA9hsmQD-UsexbkKmI3w7JkjZbwRtqAPea3c8T9HY4rmg/s16000/Clipboard03.png" /></a></div><div><br /></div><div>Reference: Vishay has a great app. note on <a href="https://duckduckgo.com/?q=%22Faster+Switching+from+Standard+Couplers%22&ia=web" rel="nofollow" target="_blank">Faster Switching from Standard Couplers</a>. It covers all the technical stuff.</div><div><br /></div><div>It'll be pretty sad day if I don't try to make something slow to go fast. I played around with LTSpice and came up with something that is not covered by the app. note. </div><div><br /></div><div>The values I used are determined by the optocoupler CTR.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1OUaSneLByjGwocHUwk7keiHnTt1e-R4VmltKGe141WIALcE0M3NGuyuW1k-237uuhQAbibu3kIafHrb4i4nSg8w2NPuhuxhDwLMsC9Nde_rx6KkFL54_BMee0-J2vVmCrI3N1imPTxRhgncC23JLX0D1wsPZJP1XqKM8ewEvqr5QQDx2kIsb0PwULQ/s659/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="427" data-original-width="659" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1OUaSneLByjGwocHUwk7keiHnTt1e-R4VmltKGe141WIALcE0M3NGuyuW1k-237uuhQAbibu3kIafHrb4i4nSg8w2NPuhuxhDwLMsC9Nde_rx6KkFL54_BMee0-J2vVmCrI3N1imPTxRhgncC23JLX0D1wsPZJP1XqKM8ewEvqr5QQDx2kIsb0PwULQ/s16000/Clipboard02.png" /></a></div><div class="separator" style="clear: both; text-align: center;">Optocoupler circuits: simple, medium and complex</div><div><br /></div><div>To see their performance, I put them side by side and feed each of these circuits with the same 5 pulses of 100kHz signal (200kbps data rate).</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjohkJZSMyqzwZ48H1k4xKp4TOtyxP2osKFbpyVEFHCCSCtJDhSaWl68t8t0ykDJZc0PHTfGiuzwq_S87O9TBEPVm9xEaUxxYdEzhmz3xpRbdAv_l1z1tOOJyg2IJjE4C9KnuBSWmXPT6ACN0RAAnUj_2Vj0qoekuJrhj7lDIKsmCgoLrd6NvwZsGEWFA/s709/Clipboard04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="241" data-original-width="709" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjohkJZSMyqzwZ48H1k4xKp4TOtyxP2osKFbpyVEFHCCSCtJDhSaWl68t8t0ykDJZc0PHTfGiuzwq_S87O9TBEPVm9xEaUxxYdEzhmz3xpRbdAv_l1z1tOOJyg2IJjE4C9KnuBSWmXPT6ACN0RAAnUj_2Vj0qoekuJrhj7lDIKsmCgoLrd6NvwZsGEWFA/s16000/Clipboard04.png" /></a></div><br /><div class="separator" style="clear: both; text-align: center;">Top trace: Input (cyan), bottom traces outputs from optocoupler circuits</div><div><div><br /></div><h4 style="text-align: left;">Simple coupler circuit (green)</h4><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAOVW3iWGBOTlP_oYFrbj5gdGSI-QHs0UFdlANNn4BcqpKRE3ohXbocp_3PsOcOtzfWzBgK5_Tw6ZhaLqnNRFyRWFGTs13FnCilUMPVJ-6gHK-CHkdSmRXUfSdlgYkEeo_KxaIy7zUFuum6CQU1uQeg8qhvmEI5V72h10AgfwSdO2TJd3l4gpWoImqMw/s300/Clipboard05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="293" data-original-width="300" height="293" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAOVW3iWGBOTlP_oYFrbj5gdGSI-QHs0UFdlANNn4BcqpKRE3ohXbocp_3PsOcOtzfWzBgK5_Tw6ZhaLqnNRFyRWFGTs13FnCilUMPVJ-6gHK-CHkdSmRXUfSdlgYkEeo_KxaIy7zUFuum6CQU1uQeg8qhvmEI5V72h10AgfwSdO2TJd3l4gpWoImqMw/s1600/Clipboard05.png" width="300" /></a></div><div><br /></div><div>CBC (base collector capacitance) aka <a href="https://en.wikipedia.org/wiki/Miller_effect" rel="nofollow" target="_blank">Millar Capacitance</a>. It slows down the transistor. Datasheet typically uses 10V and a load resistor of 100R as their test circuit. CBC is low at higher voltages and the small pull up value help with the rise time.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx4oEvoIHLKvVvL6WZKZC1oESOdlYUfWIbnOsRAb9abb83ho165OF46HXwpvTund9rc1VqaKODcNFhD2ougT-zMI7nkkXPO6VbJX5GH-SNJj0sQL5qTl638gIS5xxEVPO8apY0i3TFHuTK1GEoxUqPA-ZRL0XkHR7-isX0foPhsHFgkJSA7naFEKMtKA/s328/Clipboard04.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="269" data-original-width="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx4oEvoIHLKvVvL6WZKZC1oESOdlYUfWIbnOsRAb9abb83ho165OF46HXwpvTund9rc1VqaKODcNFhD2ougT-zMI7nkkXPO6VbJX5GH-SNJj0sQL5qTl638gIS5xxEVPO8apY0i3TFHuTK1GEoxUqPA-ZRL0XkHR7-isX0foPhsHFgkJSA7naFEKMtKA/s16000/Clipboard04.png" /></a></div><div class="separator" style="clear: both; text-align: center;">Note: the scale from Low to high (left in log scale) is very different from High to low (right in linear)</div><div><br /></div><div>The speed is much slower when you use a large pull up resistor and lowering the voltage. The values I picked is might be useful for low data rate may be lower tens of kilobits per second. e.g. asynchronous serial. It should only be used with a Schimtt Trigger input to clean up the slow rise and fall time.</div><h4 style="text-align: left;">The middle circuit (blue)</h4><div>The optocoupler is the first stage of inverter that drives a transistor of a second stage inverter. Its output range is clamped to a diode drop of the transistor base voltage. The operating point is not a good spot for low CBC. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl3jWtC8pXGaU67oWaAgFCD8TXdnvLWuyMJdDpOu3UnypFXXw8d_EeTGMO9Y3zQyTpDpH0BcJb-oqiwwsAAp3XygZvn-KOpP2lY80g6GDjaeqoaGC60axk3vl93CNpKQX4-iS8cWZsIiVbvn6zek-LroWEc5hL7q6NssSxNK9yaDsvUl8q3_Sr2g5ccQ/s696/Clipboard05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="208" data-original-width="696" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl3jWtC8pXGaU67oWaAgFCD8TXdnvLWuyMJdDpOu3UnypFXXw8d_EeTGMO9Y3zQyTpDpH0BcJb-oqiwwsAAp3XygZvn-KOpP2lY80g6GDjaeqoaGC60axk3vl93CNpKQX4-iS8cWZsIiVbvn6zek-LroWEc5hL7q6NssSxNK9yaDsvUl8q3_Sr2g5ccQ/s16000/Clipboard05.png" /></a></div><div style="text-align: center;">Input (Cyan), Q1 base voltage (Purple), Output (Blue)</div><div><br /></div><div>In spite of that, it only take about 100mV change in base voltage for the transistor to turn on or off. It is a good compromise to squeeze an extra bit of bandwidth out of the old optocoupler. There is a bit of inconsistency in the timing. A timing analysis should be made for setup/hold time for protocols that require coordination of multiple signals e.g. SPI.</div><h4 style="text-align: left;">The more complex circuit (Red)</h4><div>It bypasses the Miller effect as it uses the transistor junction as a photo diode. The comparator threshold is set to about mid point of the input (~100mV). The speed (propagation around 500ns) is limited by the $0.20 LM393 type of comparator that is used to amplify the signal.</div><div><br /></div><div>You can speed up the photodiode even more by using a <a href="https://www.analog.com/en/technical-articles/optimizing-precision-photodiode-sensor-circuit-design.html" rel="nofollow" target="_blank">transimpedance amplifier</a>. Because of the feedback, the voltage across the diode junction is maintained around 0V, the switch time is greatly minimized. However high speed amplifiers cost more and I don't have a whole lot of them.</div></div><div><br /></div><div>Nowadays, there are specialized devices with active circuit to make them go fast. e.g. <a href="https://www.onsemi.com/products/interfaces/high-performance-optocouplers/high-speed-logic-gate-optocouplers" rel="nofollow" target="_blank">high speed logic gate coupler</a>, <a href="https://www.onsemi.com/products/interfaces/igbt-mosfet-gate-drivers-optocouplers" rel="nofollow" target="_blank">IGBT/MOSFET gate drive coupler</a>. Some of them uses capacitor or magnet coupling. There are isolation devices for <a href="https://www.analog.com/en/product-category/usb-isolators.html" rel="nofollow" target="_blank">USB</a>, <a href="https://www.analog.com/en/product-category/i2c-isolators.html" rel="nofollow" target="_blank">I2C</a>. These are the ones that are too messy to to roll you own.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-77690220295617359632023-02-10T18:08:00.025-05:002023-02-26T12:23:21.152-05:00Isolated power supply<div style="text-align: left;">I have decided to show the train of thought into making an isolated power supply for powering up some small circuits across an isolation barrier.</div><h4 style="text-align: left;">First attempt</h4><p>After seeing the voltage feedback circuit from my last post, I am trying out some ideas of using that for an isolated power supply. Here is what I have using LTSpice simulation.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgufzRTCnLBf30HED2ngto1obS1q71lAMyVyelr78qHj9PFtQKU5202oXtu3Ms2kBszjZWlBd-5zxmMykcw4xSpajiX5KFNdIW_rOzFBEZvIQ6D7smkZ1ycfBBK3PqQ4abhf5OH8DFgDHwSgavlKcXDuoaiccqg9iu05HD9B3mYmu3f7ewa-OyZx1TePQ/s553/circuit%20blocks.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="239" data-original-width="553" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgufzRTCnLBf30HED2ngto1obS1q71lAMyVyelr78qHj9PFtQKU5202oXtu3Ms2kBszjZWlBd-5zxmMykcw4xSpajiX5KFNdIW_rOzFBEZvIQ6D7smkZ1ycfBBK3PqQ4abhf5OH8DFgDHwSgavlKcXDuoaiccqg9iu05HD9B3mYmu3f7ewa-OyZx1TePQ/s16000/circuit%20blocks.png" /></a></div><div style="text-align: center;">isolated power supply</div><p>It is an unregulated isolated power supply from 12V to around 5-6V. There are 3 windings for the transformer on a ferrite.</p><p>L1 is feedback path for the oscillator. R4 is used to limit the amount of feedback. L1 is also used as a negative feedback for the voltage across the winding.. The negative peak voltage across the winding is rectified across C4. When the voltage high enough, the 4.5V Zener diode D3 conducts and clamps the base of Q1. </p><p>As can be seen from the traces below, the voltage across C4 does not reflect on the output voltage. It regulate the peak voltage of the winding. The voltage regulation of this circuit is about as bad as those old transformer wall warts. The voltage output is about 6.6V at 5mA load and drops down to 5V at 50mA. </p><p>The regulation can probably be improved with a bit of components tweaking. A linear LDO regulator at the output can be used for tightening the regulation.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5iql87EnQm_i8HJchJ1lG5yFF_W4RbDzIM4Rv2B-j5HdDbcXEKHtcEsmKyqVZ1jlixas1S6klwOb3LN9XsW6QxCOc6tfDEzXFxfdail1E-HMdlkoUV0-sgYBaCbWGfBG-Uptdzt3TGlwVMx-bWeIGa44zbSIUxA7oxTrFzjJE25JYPl9QGko_4hCinQ/s522/isolated%20output%20vs%20feedback.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="271" data-original-width="522" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5iql87EnQm_i8HJchJ1lG5yFF_W4RbDzIM4Rv2B-j5HdDbcXEKHtcEsmKyqVZ1jlixas1S6klwOb3LN9XsW6QxCOc6tfDEzXFxfdail1E-HMdlkoUV0-sgYBaCbWGfBG-Uptdzt3TGlwVMx-bWeIGa44zbSIUxA7oxTrFzjJE25JYPl9QGko_4hCinQ/w640-h332/isolated%20output%20vs%20feedback.png" width="640" /></a></div><div style="text-align: center;">Output voltage (green) vs the feekback voltqge (blue) at C4</div><p>L2 is the primary winding for the flyback converter. I limit the inductor current with the help of Q2 and R3. Small inductor value and high supply voltage results in high di/dt. Some of these energy ends up as high voltage spikes at self resonant frequency of component parasitic.</p><p>L3 is the secondary winding for the flyback circuit. I use a ferrite bead to filter the switching noise.</p><p>I use a RCD <a href="https://eepower.com/technical-articles/snubber-network-choices-design-and-evaluation/#" rel="nofollow" target="_blank">snubber</a> in the circuit. It merely clamps the collector voltage of Q1 (rated for VCE = 40V) to a safe value. A RC snubber could eliminate the ringing by dumpling the excessive energy. It is something to think about for EMI reasons.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsDBa8ZGiSEyOgYWr_gE6E34YDBcoBE8cJJmcUb_OIXTuK9rinCL0tyug3Hq5rwoKMFhGHduWx3_OJJWYZ1_FClRscSO2lDgVykCODaCPxD79zVf3I4Z5UJhX5dfMepznYymBXOc9I-q-Gu_IYMFxYSBWz6jHPvC7VqcEIIKZVrx9JwVgluVCuKeeFUg/s903/RCD%20snubber.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="565" data-original-width="903" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsDBa8ZGiSEyOgYWr_gE6E34YDBcoBE8cJJmcUb_OIXTuK9rinCL0tyug3Hq5rwoKMFhGHduWx3_OJJWYZ1_FClRscSO2lDgVykCODaCPxD79zVf3I4Z5UJhX5dfMepznYymBXOc9I-q-Gu_IYMFxYSBWz6jHPvC7VqcEIIKZVrx9JwVgluVCuKeeFUg/w640-h400/RCD%20snubber.png" width="640" /></a></div><div style="text-align: center;">Q1 collector voltage with and without snubber</div><h4 style="text-align: left;">Update</h4><div style="text-align: left;">I played around with the simulation and tweaked a few values. It seems to me that the voltage feedback limits the power too much such that the output cannot maintain regulation at 50mA load.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">I also found some serious problem with the current LTSpice Zener diode database. There are a whole bunch of these in that picture that I didn't highlight. So I wouldn't want to use them without checking their datasheet. I used to use them a few years back without issues. I filed a support ticket with Analog.</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLhB4QniyQyxNfcJTbZTnmTlrnxZueYrBp9LBsA3f3sM8qAVH-x5Mc9EKuylyOHzzrJxtUJp93pWoRksAo2-HkGaqUl09E-4OjKacJGEqsirt6xkXNYfFrUcTk5ABkdwbE7YCmWrFNWVZrYJW7zK32mWW2iwL9hMARnKNvDbrH0q9hsFnUjRM8K0z_vA/s615/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="303" data-original-width="615" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLhB4QniyQyxNfcJTbZTnmTlrnxZueYrBp9LBsA3f3sM8qAVH-x5Mc9EKuylyOHzzrJxtUJp93pWoRksAo2-HkGaqUl09E-4OjKacJGEqsirt6xkXNYfFrUcTk5ABkdwbE7YCmWrFNWVZrYJW7zK32mWW2iwL9hMARnKNvDbrH0q9hsFnUjRM8K0z_vA/s16000/Clipboard02.png" /></a></div><div style="text-align: center;">LTSpice diode/Zener database</div><div style="text-align: left;"><br /></div><div style="text-align: left;">MMBZ6V8ALY is a <a href="https://www.rohm.com/products/diodes/transient-voltage-suppressor-diode/standard/mmbz6v8aly-product" rel="nofollow" target="_blank">4.5V, SOT-23, Dual Line, Anode Common Transient Voltage Suppressor</a></div><div style="text-align: left;">so the "4.5V" is the normal working voltage of the circuit it is supposed to protect not Zener voltage. Its Zener voltage is 6.8V.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">FTZU6.2E is a <a href="https://www.rohm.com/products/diodes/zener-diodes/standard/ftzu6.2e-product" rel="nofollow" target="_blank">6.2V Low capacitance Zener Diode</a>. Why does TDZV6_2 which is also a 6.2V Zener has Vbrkdn as 6.8V?</div><div style="text-align: left;"><br /></div><div style="text-align: left;">At first find the part number a bit funny, but didn't think much about that as the values are what I expected to see. Zener diodes tend to start conducting well before their Zener voltage and aren't very precise and harder to tweak.</div><div style="text-align: left;"><h4 style="text-align: left;">Analog feedback</h4><div>I played around with the design with feedback from the secondary side. The voltage regulation is very tight and virtually stays at around 5V from 5mA to125mA load. I don't know if I can trust the TL431 3rd party behavior model. It is nice but it has too many parts.</div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgy4h_D55vO7rI0Hd1YNnTMFX7_drmA5IV8NgpP4oUf-9AUfnuTf-6bB0QJXTURcB5WsI4HdjWEQXP8RxJZDjOO1NcKpwDNs__xdUD75Pva2zVUwtjBpt4BWG40jVwVW4An3iWbBLT_UfR4cJokvk9IEaGPBTjwvdEBlOB5LlLkLA2R9WM2XIQJUn-C5Q" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="222" data-original-width="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEgy4h_D55vO7rI0Hd1YNnTMFX7_drmA5IV8NgpP4oUf-9AUfnuTf-6bB0QJXTURcB5WsI4HdjWEQXP8RxJZDjOO1NcKpwDNs__xdUD75Pva2zVUwtjBpt4BWG40jVwVW4An3iWbBLT_UfR4cJokvk9IEaGPBTjwvdEBlOB5LlLkLA2R9WM2XIQJUn-C5Q=s16000" /></a></div><div style="text-align: center;">Adding analog feedback from across the isolation barrier</div><h4 style="text-align: left;">Simplifying the design</h4><div>So far I have been thinking like a typical analog designer adding a piece here and there and tweaking their value. A discrete design is fine to a certain point, but each piece you add increase the complexity and may also suffer from system level interaction. It is time to sit back and approach the problem in a different direction with a blank slate.</div><div><br /></div><div>I came up with an unregulated supply using the <a href="https://www.ti.com/product/MC34063A" rel="nofollow" target="_blank">MC64063A</a> switching regulator. It has BJT transistor output and slow switching, but it is a cheap switching regulator made by multiple vendors. Having learnt the lesson of chip supply outage, that's one hell of a good reason to at least give it a try.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQw6msrOzebNH6RUF5S1uID8Rx3soTC4mwjyLwg6231BWi9-5At1EuvEeFF2IJnDcdmrXoIRQxbdNGge2HiShCvsUmVk9rZLmrJ67DE5tmfKTnFzK0A-mdT51nGl14AygwRNbSnO9307yx1qYkLxPoTGoa2mewcrVsKbB6myE7SMon-7oPucwDyKxGrg/s848/MC64063.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="351" data-original-width="848" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQw6msrOzebNH6RUF5S1uID8Rx3soTC4mwjyLwg6231BWi9-5At1EuvEeFF2IJnDcdmrXoIRQxbdNGge2HiShCvsUmVk9rZLmrJ67DE5tmfKTnFzK0A-mdT51nGl14AygwRNbSnO9307yx1qYkLxPoTGoa2mewcrVsKbB6myE7SMon-7oPucwDyKxGrg/s16000/MC64063.png" /></a></div><br /><div>The MC64063A is operating as an inverting regulator driving the primary winding of the flyback inverter. L1 inductor ramps up and the energy is stored in magnetic field as the driver is on. When the driver is off, the magnetic field collapse and primary side voltage goes from +10V and changes to a negative polarity. Current drain from the inductor through D1 to charge C2. Both windings are magnetically coupled, so the primary winding voltage could be used as a rough proxy of the secondary side.</div><div><br /></div><div>Note: There are no nasty spikes on the primary side with this flyback circuit. The ringing at the secondary side can be ignored by the rectifier circuit.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rIwHIZPxlidKTNc5Hx5ye9RDch4kF_bwiCs5xikFgzClDJ-DxcXuK4vc88B58GkKT43R74y3NEweqtd7yr_hQpNLLxoWVRhd1DugAo43urXVfeNC3ED09_Pq9bt2cOUp47Rmq20MzzJstL-QnWBob_7H0uFG1iormgXML3_EDA6_dClALAC0OoPY9w/s540/voltage%20waveform.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="476" data-original-width="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8rIwHIZPxlidKTNc5Hx5ye9RDch4kF_bwiCs5xikFgzClDJ-DxcXuK4vc88B58GkKT43R74y3NEweqtd7yr_hQpNLLxoWVRhd1DugAo43urXVfeNC3ED09_Pq9bt2cOUp47Rmq20MzzJstL-QnWBob_7H0uFG1iormgXML3_EDA6_dClALAC0OoPY9w/s16000/voltage%20waveform.png" /></a></div><br /><div>However, there is a gotcha. The primary side voltage drops off to a lower point (-2.65V) than the secondary side at the beginning of the cycle that C2 is being charged. The voltage across C2 is what the MC64036 is regulating to.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_EnXIn6omdDSgHYYd0IaVH7WtSqr5SyjH3-0jxtBQmbC7SgRJn1tKIM3vI57au1Q6FmNMBobsJqsTF4kfhSCd8vimHofNUQBSA_8d-aA3VYkm815Yj4Epza7EgXqv805Q91QOiN4l13Gc5o5Oy5fKGkKZhABBY2TpdPLqhXbrxNTuDmRxCjgGx7gbKQ/s877/difference.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="243" data-original-width="877" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_EnXIn6omdDSgHYYd0IaVH7WtSqr5SyjH3-0jxtBQmbC7SgRJn1tKIM3vI57au1Q6FmNMBobsJqsTF4kfhSCd8vimHofNUQBSA_8d-aA3VYkm815Yj4Epza7EgXqv805Q91QOiN4l13Gc5o5Oy5fKGkKZhABBY2TpdPLqhXbrxNTuDmRxCjgGx7gbKQ/w640-h177/difference.png" width="640" /></a></div><div style="text-align: left;">Voltage waveforms: Primary side (Green) and Secondary side (Red)</div><div style="text-align: left;"><br /></div>The following waveform shows the rectifier currents on both sides. I use a BJT Q2 as a synchronous rectifier for the output. I have tried both a Schottky diode or a MOSFET and the BJT turns out working better. It has low drop (0.187V at the current peak), but slow enough without adding ringing from self resonant. The negative spike at the left side is also ignored by Q2.</div><div style="text-align: left;"><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPKNk5COd85kwkes8Vl7KI2QwPgmIKDZKjWi8s87aK29uJi0LZFf6nrRvoWalzYaONJd7VwEOnaC4_hBpYhc8OJ9Y1PesnNpdq6U3EVDdq_Wg7xJhgRIxesmN3o5L6oWap_eKNxMI4bnOw7DZY3LzIaLbz99WZWRgNpipOWjM8onYDGxU7DOKaYv8Yjw/s540/diodes%20current.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="438" data-original-width="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPKNk5COd85kwkes8Vl7KI2QwPgmIKDZKjWi8s87aK29uJi0LZFf6nrRvoWalzYaONJd7VwEOnaC4_hBpYhc8OJ9Y1PesnNpdq6U3EVDdq_Wg7xJhgRIxesmN3o5L6oWap_eKNxMI4bnOw7DZY3LzIaLbz99WZWRgNpipOWjM8onYDGxU7DOKaYv8Yjw/s16000/diodes%20current.png" /></a></div><div style="text-align: center;">Diodes waveforms: Primary side (Blue), Secondary side (light blue)</div><div><br /></div><div>Note: D1 conducts at the lowest point in the primary side which is a not a perfect symmetry point in the waveform.</div><div><br /></div><div>1K load: 4.85V</div><div>100R load: 4.31V</div><div><br /></div><div>Load regulation isn't great, but it is good enough to be used with a LDO.</div><div><br /></div><div>I found some decent isolation for coupled inductor. e.g. Bourns SRF0703 series with 500V RMS Hi-pot.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDuuPj6gw_v1zi8s4PEu2e5iJwhDNgVcDJXCoVz8nfg6Snl5uwAt29b-Cv82XjO189YATtoVN8-PzU_BbtBRebonf7Sc2LZ71z3YWKfVrsLAs26wLgymnbfXwn7JtWnwUPeRIUEjiXwS1zHLsteypvWQ6XRlCTYSfpgmuVctW90udLWP_c86ZU6bBSSA/s589/Clipboard02.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="289" data-original-width="589" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDuuPj6gw_v1zi8s4PEu2e5iJwhDNgVcDJXCoVz8nfg6Snl5uwAt29b-Cv82XjO189YATtoVN8-PzU_BbtBRebonf7Sc2LZ71z3YWKfVrsLAs26wLgymnbfXwn7JtWnwUPeRIUEjiXwS1zHLsteypvWQ6XRlCTYSfpgmuVctW90udLWP_c86ZU6bBSSA/s16000/Clipboard02.png" /></a></div><div><br /></div><div><span><a name='more'></a></span>I did some rethinking that simplifies the design. The part selection was a bit different than what I would normally do, but I think it works out.</div><div><br /></div><div>I found 10 or so LM2575-12 from years ago. They are the first Simple Switcher series with a switching frequency around 50kHz, so they need a large inductance value and a bit more filtering. Also the parts I got was with the non-adjustable version, so I don't really have much of use until now.</div><div><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><br /></div><div style="text-align: left;">Part of the rethinking was having to deal with insulation making my own transformers. Most of the core I have in that range was kind of small and don't have much room for additional insulations. </div><div style="text-align: left;"><br /></div><div style="text-align: left;"><div>Common mode chocks intentionally add leakage flux by placing the two windings apart. The physical distancing also helps the voltage isolation as they are used for AC power. To get to the high inductance values, they use a high permeability core. However they can be lossy at higher frequency and can saturate at a lot lower current when the currents in the windings don't cancel out. The switching frequency is low and I am going to use larger core.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj00aZzzAC22QhhmTmZeQUZzoXPOxBID8gTYCvPWY9Vf7OHMZxj-4fe-jqyoSIzdAvma45oHiNG0AF5az3qk8kEDEubSIz_Z2tlbYWQCgAxLuuR9g0W-7zP8WbvoN74ZXjgqiFIwp5w-f1pjLceElEqiwzb2DkXHHj5KYdZV4069ZcsplmJ-Xqss5mUww/s866/Clipboard01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="866" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj00aZzzAC22QhhmTmZeQUZzoXPOxBID8gTYCvPWY9Vf7OHMZxj-4fe-jqyoSIzdAvma45oHiNG0AF5az3qk8kEDEubSIz_Z2tlbYWQCgAxLuuR9g0W-7zP8WbvoN74ZXjgqiFIwp5w-f1pjLceElEqiwzb2DkXHHj5KYdZV4069ZcsplmJ-Xqss5mUww/s16000/Clipboard01.png" /></a></div><div style="text-align: center;"><br /></div><div style="text-align: center;">MC33063 (left) vs LM2575 (right)</div><div>The LM2757 uses a NPN transistor as the switch with a much smaller one for sampling the current. It has a lower drop than the MC33063 Darlington output stage in emitter follower configuration. All of the passives for setting timing, reference, current limits are integrated.</div><div><br /></div><div>My circuit is actually similar to the sample schematic. The LM2575 ground is boot strapped to -12V and feedback pin is actually at 0V. The chip draws in enough of current on the -12V rail. I reduce the Cout value because the -12V rail isn't needed elsewhere.</div></div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-54EjYLMCGFWG-tvsLZjzgd0tooOlV4c4H1r0Puz2uMSAZaAG-D8XJEdBdR2NtV0xqlEK-6Bmhq-evplaViNNQ7RNzoQ-3sdeSp0L9BFC7GLaLjOKfitBYiSyRXLHbHrhp8dHIcS3DnS6NtkBqG1miN71XhES9uGDLFPAb924zfSnRWkpuysc6GI9kQ/s269/Clipboard012.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="130" data-original-width="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-54EjYLMCGFWG-tvsLZjzgd0tooOlV4c4H1r0Puz2uMSAZaAG-D8XJEdBdR2NtV0xqlEK-6Bmhq-evplaViNNQ7RNzoQ-3sdeSp0L9BFC7GLaLjOKfitBYiSyRXLHbHrhp8dHIcS3DnS6NtkBqG1miN71XhES9uGDLFPAb924zfSnRWkpuysc6GI9kQ/s16000/Clipboard012.png" /></a></div><div style="text-align: center;">Inverting buck boost converter example from datasheet</div><div><br /></div><div>I have a couple of cores. To get to 100uH, I only need 6 turns on my core I got from my parts collection. To get to around <strike>6V</strike> 5V, the secondary winding is 3 turns at 1/4 the inductance. (L is proportional to n^2) An added bonus for the turns ratio, the amount of loading from the primary winding is also reduced.</div></div><div style="text-align: left;"><br /></div>This is the quick and dirty prototype as I don't have a LTSpice model for the LM2575 part. I added a 5.1K as a minimum load otherwise the output voltage drifts up quite a bit.<div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD5Jx1qbkmWC595vRgpl0bUudHfH1mGsT2nv1obXtR5KZK1B70eiTlpzq-REJKZzHJIcqJJNoN401TlDqiFC_mvFsg7zTz5sc3FfvFb-EfFbCVC1yFQ2e6fo06PGyqNhXUEiHVgLsXmZCc4ssxBXldiO_FW3hfTN7XV54GMDWGELdZpKj0IraBYbx6WQ/s753/IMG_3160.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="753" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD5Jx1qbkmWC595vRgpl0bUudHfH1mGsT2nv1obXtR5KZK1B70eiTlpzq-REJKZzHJIcqJJNoN401TlDqiFC_mvFsg7zTz5sc3FfvFb-EfFbCVC1yFQ2e6fo06PGyqNhXUEiHVgLsXmZCc4ssxBXldiO_FW3hfTN7XV54GMDWGELdZpKj0IraBYbx6WQ/w640-h408/IMG_3160.JPG" width="640" /></a></div><div style="text-align: center;">3D soldered prototype (4 turns, transformer mode)</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The results are a bit unexpected.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc8M1B5imuSSZUgVnQytFr-i_OT5GPfYrEz4T26-VL2JfdnY1t2gZMZYwjMfec7doEEO7z1v7uiJVSqsrp0QCrczvwBmWnD9bFH2Bmgj0gVG4NiqsW3yY6za1C3NzLAev37OkputKehJfXkJ8ibdTWSLKA1rHRA3xIXyfdF1HpUOfpqwh3yz_W639X_A/s715/Clipboard05.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="286" data-original-width="715" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc8M1B5imuSSZUgVnQytFr-i_OT5GPfYrEz4T26-VL2JfdnY1t2gZMZYwjMfec7doEEO7z1v7uiJVSqsrp0QCrczvwBmWnD9bFH2Bmgj0gVG4NiqsW3yY6za1C3NzLAev37OkputKehJfXkJ8ibdTWSLKA1rHRA3xIXyfdF1HpUOfpqwh3yz_W639X_A/s16000/Clipboard05.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORYqV2D1U5v_MSJsL4S2JmwOBVegqh7I1ljlUCSlgULIuV-s4v_aQn02rtUUeSg06dv8Qw_9KSwPADVH2eM-ZZOhA4u7wOpNRJHgCIsQbBccVz1wGToyOIQNgGnOpPbBbu8-6RDc2gv-VqPihtxFuf1Gs31lbEHR0Ae79ooaDwvMj6acqx1hJmf5QLw/s683/Clipboard01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="683" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhORYqV2D1U5v_MSJsL4S2JmwOBVegqh7I1ljlUCSlgULIuV-s4v_aQn02rtUUeSg06dv8Qw_9KSwPADVH2eM-ZZOhA4u7wOpNRJHgCIsQbBccVz1wGToyOIQNgGnOpPbBbu8-6RDc2gv-VqPihtxFuf1Gs31lbEHR0Ae79ooaDwvMj6acqx1hJmf5QLw/s16000/Clipboard01.png" /></a></div><h4 style="text-align: left;">Flyback mode</h4><div>The output load handling is reduced a lot due to the much reduced coupling as a flyback converter. The output voltage changes depending on how close the two windings are. The line regulation is very good, but the load regulation is so bad that it is not useful.</div><div><br /></div><div>It might be possible to use this configuration by finding a commercial coupled inductors with good insulation.</div><h4 style="text-align: left;">Transformer mode</h4><div>I reverse the secondary winding connection. It works like a transformer with a free running oscillator. It uses portion of the pulse that is not controlled by feedback directly. The line regulation as a result is bad, but the load regulation is good. The output voltage has very minimal changes dependent on how close the windings are.</div><div><br /></div><div>A 4 turns secondary could be used for applications that do not have a regulated input supply. A LDO regulator can be used to regulate the output for both line and load variations.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjmY8v4K9FqAul9ORzjfsJmYLP-2Bs6V1jjwRg_otNki3Iy9eTuaKFPlsmRhF03N063qOOY_-QH_UerPCaDucIAmL-HzFalIylYwlB65Gz6_Nwx0qdoJlFJKTRcjhHZDtFPmUn7FjhSij6_WlqSNaxSxbE82XUyVbybscSaXWLsvirFREFaGMEfv-M-_w" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="102" data-original-width="256" src="https://blogger.googleusercontent.com/img/a/AVvXsEjmY8v4K9FqAul9ORzjfsJmYLP-2Bs6V1jjwRg_otNki3Iy9eTuaKFPlsmRhF03N063qOOY_-QH_UerPCaDucIAmL-HzFalIylYwlB65Gz6_Nwx0qdoJlFJKTRcjhHZDtFPmUn7FjhSij6_WlqSNaxSxbE82XUyVbybscSaXWLsvirFREFaGMEfv-M-_w=s16000" /></a></div>Output voltage vs load vs turns in secondary winding</div><br />Note: 4 turns with 51R can only goes up to 3.99V when load is attached during start.</div><div><br /></div><div>Efficiency with 68R load: 4 turns: 61%, 3 turns: 47%</div><div><br /></div><div>Side note: I had a bit of problem measuring the DC voltage output on my scope. For some reasons, it thinks it was near 0V. After fumbling a bit, I realized that it was the scope ground strap acting as a pick up around the inductor. With a <a href="https://hw-by-design.blogspot.com/2018/07/scope-probe-ground-spring.html" rel="nofollow" target="_blank">ground spring</a> to minimize the ground loop, the correct DC voltage can be seen on the scope.</div><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-13062937652542821612023-02-04T22:35:00.009-05:002023-02-05T09:52:33.771-05:00Solving a few power supply cold cases<p> I spent a week or so clearing a few power supplies off my bone piles recently.</p><h3 style="text-align: left;">The case of the phone charger</h3><p>I have a flip phone USB charger that went out of regulation outputting 7V. I did the usual check on the electrolytic capacitors and found nothing wrong with their values. I left it on my bone pile for scraps.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZ4q7CVasaISJwbNIy3MhKrQ2I5s62fMCF8jg6ExMPZgk8G47ObcrSuItgWn0hXRiyZhy2VQuhi2C72HH2JdHlCvylsjM9SQAq2omtODZ5cqCaiqYuCSPoazbKtNaI-nCdg44SycpqlGG5U78sFeslSvwYstrOy06kifzVFJhGC9xZl2KojfyaLEHPw/s922/IMG_3153.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJZ4q7CVasaISJwbNIy3MhKrQ2I5s62fMCF8jg6ExMPZgk8G47ObcrSuItgWn0hXRiyZhy2VQuhi2C72HH2JdHlCvylsjM9SQAq2omtODZ5cqCaiqYuCSPoazbKtNaI-nCdg44SycpqlGG5U78sFeslSvwYstrOy06kifzVFJhGC9xZl2KojfyaLEHPw/w640-h480/IMG_3153.JPG" width="640" /></a></div><div style="text-align: center;">Top side of the PCB</div><div style="text-align: center;"><br /></div><div style="text-align: left;">In the left side of the PCB below, there is a slot (for isolation) between primary and secondary circuits. Normally you would find an optoisolator used as a feedback bridging both sides. There was a footprint for a 4-pin device, but it isn't hooked up correctly. It is probably a left over from a previous version of the design.</div><div style="text-align: left;"> </div><div style="text-align: left;">I hooked up my bench supply (max out about 63V) to the AC input of the charger. It was sufficient to get 6V at the output.. Feeling a bit brave (or foolish?), I poke around a bit with my multimeter and found another spot across the capacitor measuring 6V at the primary side. I traced the circuit and annotated in the picture below.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">There is winding for a feedback for the oscillator. There is another branch of it with a simple rectifier + capacitor. The negative voltage across is an approximation of the output voltage. A Zener diode is connected between this voltage and the base of the flyback driver transistor. At some point when the output voltage is high enough, the Zener diode conducts and pulls the base towards ground. This stops the oscillation and closes the negative feedback loop for the output voltage.</div><div style="text-align: center;"><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1oJLTDzXpHazk9yifhW7wBuDdIgQDNW8_vHzu1C42YeYlefwCXzHgURLpMk-Pr_vUEoQHNCt2AJcOHjSqB914cU7pC4QVpiZuAB5YCf95O4wEcBXOS0gRg5nB7YV1XIrs8_wXioig_QBzhH6V8XoPfzs_ddTyj66s9IbILT8zLRYyPOR76Bkp4emh-g/s656/PCB.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="656" data-original-width="644" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1oJLTDzXpHazk9yifhW7wBuDdIgQDNW8_vHzu1C42YeYlefwCXzHgURLpMk-Pr_vUEoQHNCt2AJcOHjSqB914cU7pC4QVpiZuAB5YCf95O4wEcBXOS0gRg5nB7YV1XIrs8_wXioig_QBzhH6V8XoPfzs_ddTyj66s9IbILT8zLRYyPOR76Bkp4emh-g/w628-h640/PCB.jpg" width="628" /></a></div><div style="text-align: center;">Bottom side of the PCB</div></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Funny that the old diode didn't fail completely but ended up having a higher Zener voltage. I fool around putting resistor and Zener diodes in parallel (4.7K, 10K) to see if that has an effect on the output. Yes!</div><div style="text-align: left;"><br /></div><div style="text-align: left;">I managed to find one scrap Zener diode that sets a reasonable voltage: No load: 5.2V and 4.76V at rated load of 350mA. The diode drop difference between no load to full load across the output Schottky diode would probably account for most of the droop. It is good enough for the USB specs.</div><h3 style="text-align: left;">The case of the flickering LED</h3><div style="text-align: left;">Back in 2017, I installed a LED driver (<a href="https://www.blogger.com/blog/post/edit/4577061874338677369/804142764124738600?hl=en" target="_blank">Modding 220V LED for 110V - LED rectrofitting</a>). It is the outer ring that is only switched on for extra brightness. It became the main light when the inner rings failed in 2019. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">Recently the LED starts to flicker once every few hours. The bulk capacitor has started to fail under heat. The PCB is discolored (around the driver chip) due to heat. This Chinese no-name brand capacitor was actually a quality part as it survived about 3 years of abuse under heat.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">It still have about 1/2 of its value, so the LED flickers when there is a slight dip AC . I don't have an exact replacement (400V 10uF) nor was I looking for one. I replace it with a 47uF 450V capacitor that I have in stock. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">I leave a bit of a gap between the base of the capacitor and the PCB. As the capacitor replacement has a higher value and lower ESR, I also added in a <a href="https://circuitdigest.com/electronic-circuits/inrush-current-limiter-using-ntc" rel="nofollow" target="_blank">NTC Inrush current limitor</a> to protect the tiny bridge rectifier. (There is a 0.5A fuse in series I added for protection.)</div><div style="text-align: left;"> </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjXY9RBfFp9kEY603f4ZO2SIFlRECTeeSg2zWJR1vXBjuYhdhJ8VDufL8MrKepSS0yvptjmacpbscSEMpHFj7rXGtmNCfcR_7j2NzTsZqkle_6H8hb4gntDjK1dZ61A8vruttU7Dv4dZ-dS9qIPGETGW-lSkmj-d0dM0bx6DjKGipm4RtYhyhcTMCSQ/s899/IMG_3147.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="359" data-original-width="899" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjXY9RBfFp9kEY603f4ZO2SIFlRECTeeSg2zWJR1vXBjuYhdhJ8VDufL8MrKepSS0yvptjmacpbscSEMpHFj7rXGtmNCfcR_7j2NzTsZqkle_6H8hb4gntDjK1dZ61A8vruttU7Dv4dZ-dS9qIPGETGW-lSkmj-d0dM0bx6DjKGipm4RtYhyhcTMCSQ/w640-h256/IMG_3147.JPG" width="640" /></a></div><div style="text-align: center;">LED driver PCB + defective cap (desoldered)</div><div style="text-align: left;"><br /></div><div style="text-align: left;">The case is there to cover the high voltage circuits. It is discolored over time due to the high heat. The case is mounted horizontally with standoffs. There is space above and below the case to allow for convection. I have decided to improve the cooling by drilling some holes in the case. I used an EMI shield as template for the holes.</div><div style="text-align: left;"><br /></div><div style="text-align: left;"> I kept the holes small to prevent flying insects getting into the case. Part of the case crack because it was too thin, brittle and weak. I stitched the cracks together with some dental floss.</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyr3UqmhChRNfV7fCtxumUb74jgkmig0SvF8_5q9WTMOG1hlQZqwP79pXjCILe2PvVjUUgkRZmBF81HIWDXI1DDtcqoDDtxSWZ0elJepF8rJZXqlGx-ydn_UvRJV8V-3CVQ1ok46vbfauZfvjdsvBxy9pCiZb4Nfz5GSSkXOXpDbv2QbRCRN0m8ZDxRQ/s461/IMG_3146-.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="461" data-original-width="346" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyr3UqmhChRNfV7fCtxumUb74jgkmig0SvF8_5q9WTMOG1hlQZqwP79pXjCILe2PvVjUUgkRZmBF81HIWDXI1DDtcqoDDtxSWZ0elJepF8rJZXqlGx-ydn_UvRJV8V-3CVQ1ok46vbfauZfvjdsvBxy9pCiZb4Nfz5GSSkXOXpDbv2QbRCRN0m8ZDxRQ/w300-h400/IMG_3146-.jpg" width="300" /></a></div><br /><div style="text-align: left;">I hope this would last for another few years.</div><h3 style="text-align: left;">The case of the blow input stage PSU</h3><div>This is the donor of the PSU case for my previous article. There was a bag with a blown bridge rectifier diode and two flyback transistors with it and a missing fuse. I assumed that those were the broken parts from my previous diagnostic a long time ago. I don't remember whether I blew it or it was already DOA when I picked up a few PSU from a surplus place. Scrapping it was the correct decision. </div><div><br /></div><div>I found a $20 store brand PSU in my box. It was the replacement I bought for the one that caught fire. Funny thing about that PSU as its parts still lives on in a few things.</div><div><br /></div><div>It lived long enough to its retirement. So why bother fixing the other one? When I opened it up to clean it, I realized that the bean counters have been working overtime as a lot of the EMC and filtering parts on the PCB have been jumpered off. The heatsink are about 1/3 as thick vs the your usual computer store silver box special.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_ypMPe5fp5f0buS_YRXpLZDGnuUzEZRwNBYirVzg6XqvkbW-xeWuz0KsUzNtcWOnD-5PpCmvtG-Da0aVzmUUoVxhHt1qmllGkyi3P64jqPznWkAKgcl7kxifCQmkwK9jPF_lLCGaLuwWmRIXDunG7JyW1jTERiD_mlptHzbbu8dLEWDeSWMyvh3bbg/s691/IMG_3154.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="691" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4_ypMPe5fp5f0buS_YRXpLZDGnuUzEZRwNBYirVzg6XqvkbW-xeWuz0KsUzNtcWOnD-5PpCmvtG-Da0aVzmUUoVxhHt1qmllGkyi3P64jqPznWkAKgcl7kxifCQmkwK9jPF_lLCGaLuwWmRIXDunG7JyW1jTERiD_mlptHzbbu8dLEWDeSWMyvh3bbg/w640-h480/IMG_3154.JPG" width="640" /></a></div><br /><div>So I took a chance by taking the flyback transistors from this board. In the process of removing the input filter cap from my dead PSU, I also found a loose pin in the main filter capacitor. I finally have a rough idea of what happened.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpY_wVc7obtzNt5PXiDzVYxAmMlmBSvfitwgKvGLumDwGUOHcHA3VYq5svWU7FzREEPHemMkt5Ryou6BBqYKl3oOcSYK9xBoHANkjegeeArZ4xVo7DRgIuyXVIdjTEvip3BYUz2ExTgpmztrOVfQZOvE03sOKoUzwSNv1kbisXJ6SUDoi-pPFQjR7-3w/s1053/blown%20PSU.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="343" data-original-width="1053" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpY_wVc7obtzNt5PXiDzVYxAmMlmBSvfitwgKvGLumDwGUOHcHA3VYq5svWU7FzREEPHemMkt5Ryou6BBqYKl3oOcSYK9xBoHANkjegeeArZ4xVo7DRgIuyXVIdjTEvip3BYUz2ExTgpmztrOVfQZOvE03sOKoUzwSNv1kbisXJ6SUDoi-pPFQjR7-3w/s16000/blown%20PSU.png" /></a></div><div style="text-align: center;">Simplified generic 200W PSU schematic showing the damaged parts</div><div><br /></div><div>They used a bridge rectifier rated for 2A (max) in a "250W" PSU. We use 115V here, so the part is under spec. Even in the cheap out PSU, they use larger diodes (probably 3A rated ) for the 115V.</div><div><br /></div><div>So basically what might have happen is that the diodes were overloaded and at some point they failed shorted together shorting all the AC inputs and the negative output together. This blew up the lower filter capacitor, two flyback transistors and the 5A fuse.</div><div><br /></div><div>In general, I would use all part at least rated for the fused value (5A) for the input circuit. I replaced it with a 600V 7A part that fits the mounting hole. I replaced the two filter caps with the ones from the PSU that caught fire. The two flyback transistors were from the accountant optimized PSU. They have slightly lower rating.</div><div><br /></div><div>I used the old trick of using a 40W <a href="https://antiqueradio.org/dimbulb.htm" rel="nofollow" target="_blank">incandescent light bulb in series of the AC input</a> for testing the "fixed" power supply. The light grows briefly and went out. I shorted the enable pin to ground with the "PSU tester" block that came with one of my PSU and the fan spin up. The PSU is fixed!</div><div><br /></div><div>Now the fun part of finding a case for it as I have repurposed its old one. I foolishly think that I would fit inside a Dell 200W PSU as the PCB are the same dimensions. The Dell case is nice to work with as it allows access to the trace side of the PCB. Wrong! Dell decided that they want mounting holes in a slightly different locations than the "standard" ones used in generic PSU. I leave the EMC ground pad for the high voltage as is but offset the rest of the mounting hole, drill some new ones. I have to trim off the excess metal bits so that they don't short circuit the PCB traces on the secondary side. I soldered some nuts to the frame to make life a bit easier. I clean up and redid all the wiring. I added an On/Off switch from the el Cheapo PSU.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0l6xwNw3vGRhOwRRQFvAN5onlI_VCg6ela9ZQKUYxABgCLqgYl__7yB6OKD1H-nli6wln4qt2htk3O2GqawVC3QhwHkyFUhcm2SfFWcJImC4Ny9ZdQKeNphel7GSnIGfq0zCQr2zyNYAryp8IGaVKQRKjovws0upELTfBb-ls_ufyFiEOSd_qb4Myg/s691/IMG_3155.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="691" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA0l6xwNw3vGRhOwRRQFvAN5onlI_VCg6ela9ZQKUYxABgCLqgYl__7yB6OKD1H-nli6wln4qt2htk3O2GqawVC3QhwHkyFUhcm2SfFWcJImC4Ny9ZdQKeNphel7GSnIGfq0zCQr2zyNYAryp8IGaVKQRKjovws0upELTfBb-ls_ufyFiEOSd_qb4Myg/w400-h300/IMG_3155.JPG" width="400" /></a></div><div style="text-align: center;">Fixed PCB fitted into a Dell PSU case</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvwTPKAKCYHxn6miNqtZMIfD3NbR0Wz1PpM5oacyKDavdzp8SHJPhUrbJl9JuIy42ap06RJ25mRiSmH6JkEWmhl1_r3hJb-Ld0t9XneM13urlGn_KFq8gsbZRlmB6t18VTpWl4ZH4P8CZSI8M0OB1Vx8_irADN510tdZLPEkJRFfyNDd1HWVF8WPg6w/s691/IMG_3157.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="691" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnvwTPKAKCYHxn6miNqtZMIfD3NbR0Wz1PpM5oacyKDavdzp8SHJPhUrbJl9JuIy42ap06RJ25mRiSmH6JkEWmhl1_r3hJb-Ld0t9XneM13urlGn_KFq8gsbZRlmB6t18VTpWl4ZH4P8CZSI8M0OB1Vx8_irADN510tdZLPEkJRFfyNDd1HWVF8WPg6w/w400-h300/IMG_3157.JPG" width="400" /></a></div><div style="text-align: center;">Component side of the PCB</div><h3 style="text-align: left;">The case of the leaky capacitors</h3><div>This one is build by a certain consumer electronics/entertainment corporation in Japan for another certain fruity electronics/entertainment corporation. I modified its output from 7.5V output to 5V a long time ago. I took it out of storage and it died after a few minutes.</div><div><br /></div><div>Bad leaky capacitors is not what I would expect to see here. There are 3 electrolytic capacitors that leaky and they spill oily black liquid that attacked the solder mask and cause some minor corrosion to copper traces and wires. I had to remove some of the components to clean and assess the damages.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Yoc0xSX2L7kkvUdxZkraD373X3a-iLs20ojdK2bJnvt-E_iFGKYyNuzxSpW3bvJR9T_lCNzzw9UFH0gVZk6E7rteuARE5mHTPAF91g26AkckVPoHNa2CXPipsabR1vM1C997vsoNG5DLhoJk1a5Lsr5st497hSuDcXfltXslMnPNNX_DkzETmGczmg/s648/IMG_3138.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="401" data-original-width="648" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Yoc0xSX2L7kkvUdxZkraD373X3a-iLs20ojdK2bJnvt-E_iFGKYyNuzxSpW3bvJR9T_lCNzzw9UFH0gVZk6E7rteuARE5mHTPAF91g26AkckVPoHNa2CXPipsabR1vM1C997vsoNG5DLhoJk1a5Lsr5st497hSuDcXfltXslMnPNNX_DkzETmGczmg/w640-h396/IMG_3138.JPG" width="640" /></a></div><div style="text-align: center;">Two caps and an inductor (top)</div><div style="text-align: center;"><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FejFkeT5YQFrb2sA0vahrsp206XvbFjNT2tjqhPtUpyn0r-toQHtk-4gBoeYsgO8V15CAtDbF_LdzUYFWcaTOZpG1eoEt00IaEu4XlCM9u_O2rJT_QcMw_wyMDlBn3kQ6VemBJjkC6eLEDJnQcZCJ8iuIo7Drqu9W41iWz1Yz6HYGTWV_FZU-bVbMw/s691/IMG_3137.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="691" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FejFkeT5YQFrb2sA0vahrsp206XvbFjNT2tjqhPtUpyn0r-toQHtk-4gBoeYsgO8V15CAtDbF_LdzUYFWcaTOZpG1eoEt00IaEu4XlCM9u_O2rJT_QcMw_wyMDlBn3kQ6VemBJjkC6eLEDJnQcZCJ8iuIo7Drqu9W41iWz1Yz6HYGTWV_FZU-bVbMw/w640-h480/IMG_3137.JPG" width="640" /></a></div><div style="text-align: center;">Trace side of the PCB showing corrosions and dirty build up due to the leak</div><div><br /></div><div>I have decided to use tantalum capacitors as I don't want the same part to fail again. They handle heat a lot better as they don't dry up. They cost a lot more, but I have a big pile.</div><h4 style="text-align: left;"><div style="font-weight: 400;">The three fail capacitors are located right next to the heatsink for the rectifier and heat is trapped between the subassemblies or corner of the case.</div><div style="font-weight: 400;"><br /></div><div class="separator" style="clear: both; font-weight: 400; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tnsyDHDyJEymzXtfk9shs4iCuA0Jf5Nn_COie8h1pdxKmjpHWAqPT1NXD01nE_6ghFfr0sCw74EU0L-59UIkNgQ3e79HR-OiZhTcjQbu1XKkmF5gtidz_8sux1HH0Uzvaw6GPh_oK6UTz6ySB1C8rASk-BwV6FvFbe37a5R5V2rHZxqlbcEe9oLgag/s461/IMG_3139.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="346" data-original-width="461" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tnsyDHDyJEymzXtfk9shs4iCuA0Jf5Nn_COie8h1pdxKmjpHWAqPT1NXD01nE_6ghFfr0sCw74EU0L-59UIkNgQ3e79HR-OiZhTcjQbu1XKkmF5gtidz_8sux1HH0Uzvaw6GPh_oK6UTz6ySB1C8rASk-BwV6FvFbe37a5R5V2rHZxqlbcEe9oLgag/w400-h300/IMG_3139.JPG" width="400" /></a></div><div style="font-weight: 400; text-align: center;">The 2 replacement capacitors, bad main capacitor and common mode filter PCB</div></h4><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGJVCDdawHlbiK4Ph7SDckKX3ZDdCBJ1PXwxbBtACDankAuj1wDw0rcP9b7qrLX13yJeMJ2L1il-tDXYKc0RupVBXW8LJCS3jdOwJj2ULhYFnD8rItFJ3Ni9CSttPw-5ISJhLtfD8HaqLo1-4sb3CARXehsT016vzQaqnWQNbrIOlcRNOlahAfy-laDw/s628/IMG_3145.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="628" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGJVCDdawHlbiK4Ph7SDckKX3ZDdCBJ1PXwxbBtACDankAuj1wDw0rcP9b7qrLX13yJeMJ2L1il-tDXYKc0RupVBXW8LJCS3jdOwJj2ULhYFnD8rItFJ3Ni9CSttPw-5ISJhLtfD8HaqLo1-4sb3CARXehsT016vzQaqnWQNbrIOlcRNOlahAfy-laDw/w400-h258/IMG_3145.JPG" width="400" /></a></div><div style="text-align: center;">The PSU with case with no vents = heat trap</div><h4 style="text-align: left;">82uF cap</h4><div>for feedback circuit power. It is non-critical, so I used two 22uF 25V in parallel.</div><h4 style="text-align: left;">180uF cap: Output cap after LC Pi filter. </h4><div>I used three 47uF 10V caps in parallel:: 140uF, ESR of 0.266R and ripple current of 1.3A</div><h4 style="text-align: left;">1200uF cap: Main capacitor</h4><div>This is the capacitor that I missed in my initial replacement. The capacitance value was roughly correct and I don't have the right equipment to measure its ESR. The power supply fails to reach its correct value and would fail at 50% load. It took me a few days to figure out that it might be the problem. I soldered in a 1000uF 50V caps and the output was fine.</div><div><br /></div><div>I used twenty 47uF 10V caps in parallel: 940uF, ESR of 0.04R and 8A of ripple current. I only need 2-3A or so to match the original spec. I used heat shrink around the capacitor to prevent short circuit. (Stacking caps warped in heat shrink and operating in a heat trap would likely derate the ripple current rating a lot.)</div><div><br /></div>I have some much higher value caps in parallel, but their ESR might be too low and affect the feedback circuits. I also have a lot less of them.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFaSK_AM9j34-Y8QvaRIF0Ndf-r7r9Oq1i_d1wJj3wZZt-0ORXHBlXcxVZAuRXtnp6fYvthkYwYmYASi4cFWgE3imU6qublWBplB3OcKoi80fay4vXLlr9C_Ih_OB4u4EWFZeKrzXjjHWNWENMp9AQuNdfRTeaoY2ewcPdr8zmdiyqGJLsI_iToNw4Q/s636/IMG_3149.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="213" data-original-width="636" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVFaSK_AM9j34-Y8QvaRIF0Ndf-r7r9Oq1i_d1wJj3wZZt-0ORXHBlXcxVZAuRXtnp6fYvthkYwYmYASi4cFWgE3imU6qublWBplB3OcKoi80fay4vXLlr9C_Ih_OB4u4EWFZeKrzXjjHWNWENMp9AQuNdfRTeaoY2ewcPdr8zmdiyqGJLsI_iToNw4Q/s320/IMG_3149.JPG" width="320" /></a></div><div style="text-align: center;">stack of 20 capacitors </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzExfizN7dTuwrB-DG4IxsXUS8f09nK96ZyT6Q6eGwr9Cwtl5XAxpzVBdG2HQ0dz3qllnBU78M-NG9GGGZZYsT6WSwSxOghP3JcNwGkSg6DEjTd0Fqn8E0h9pB5DfyYfhbf9EMlRiphVpir1rZ61zAKi2uS6_gomsdjYyRtnoRYUvAIXkES1By7BEXQ/s610/IMG_3151.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="610" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzExfizN7dTuwrB-DG4IxsXUS8f09nK96ZyT6Q6eGwr9Cwtl5XAxpzVBdG2HQ0dz3qllnBU78M-NG9GGGZZYsT6WSwSxOghP3JcNwGkSg6DEjTd0Fqn8E0h9pB5DfyYfhbf9EMlRiphVpir1rZ61zAKi2uS6_gomsdjYyRtnoRYUvAIXkES1By7BEXQ/w400-h258/IMG_3151.JPG" width="400" /></a></div><h4 style="text-align: left;">47uF 400V: Input filter capacitor</h4><div>It has not failed, but I replaced it anyway. Caps next to heatsink is not good. I use 47uF 450V cap from my left overs.</div></div><h4 style="text-align: left;">Testing</h4><div>5V: no load 5.2V</div><div>5V @ 1.9A (2A rated): 4.7V</div><div><br /></div><div>Verdict: poor regulation. It has same regulation as the phone charger that doesn't even have secondary feedback. I traced out the feedback circuit and it is much more complex than it needed to be. It uses 1 dual opamp, a lot of passives and a TL431 just for voltage and current feedback. All that extra junk for poor load regulation. Almost tempted to rewire the feedback circuit...</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipv4dpKn4YWnVtSis9ocs7i532h9mOf3KgoNoPmaDpkZsruRtJzx-o629oWERzr55yieujQmYMRlHi2DKlZq4tTEHXtWWGfMwlJbrT1kF47Xz5B9meXBgs1ekWLHO7LPbXajvl6kHzDwYIGt72MYwheVFYHfzcrwYQ_wZOHPtzq3R4N3j-x3L9j_E5dQ/s673/feedback.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="620" data-original-width="673" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipv4dpKn4YWnVtSis9ocs7i532h9mOf3KgoNoPmaDpkZsruRtJzx-o629oWERzr55yieujQmYMRlHi2DKlZq4tTEHXtWWGfMwlJbrT1kF47Xz5B9meXBgs1ekWLHO7LPbXajvl6kHzDwYIGt72MYwheVFYHfzcrwYQ_wZOHPtzq3R4N3j-x3L9j_E5dQ/s16000/feedback.png" /></a></div><br /><div class="separator" style="clear: both; text-align: center;">Voltage and Current Feedback circuit (daughtercard)</div><div><br /></div><div>As a point of comparison, I hacked a 12V +5V module into a 17Vcurrent limited charger/adaptor for my old laptop in my younger foolish days. It worked fine and I managed to get the proper one on ebay. So yeah, I know what I am talking about. </div><div><br /></div><div>I wounded a small current transformer, a transistor and a few resistors for the current limit. It measure the AC current from the secondary winding to trigger the transistor to fool the feedback circuit to lower the output voltage. The existing voltage feedback uses a TL431, a few passive and an optocoupler would look like circuit on the right hand side. It is very simple and work well. See TI app note <a href="https://www.ti.com/lit/pdf/sluaa66" rel="nofollow" target="_blank">sluaa66 (.pdf</a>) for how to design the circuit on the right hand side.</div><div><br /></div><div><br /></div><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-22567876998984372952023-01-17T16:20:00.000-05:002023-01-17T16:20:03.730-05:00PSU case PCB mounts<p>I played around with a dead PSU case. It turns out that I don't need a press and dies to make the screw mounts they have.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYpzDf5XkbvOInxhip_NSXR9O1-QSWoxNIYWecLwmZAhFchvGMWkm9ivN0rsdGSh47Z7TARSWFvAUsCnG2rnUksv5erj3T8tXy0M8DU1nV3axo91paxlTImqoCKbWSddWNtZuuP6a1UZg1Wswo3vuueFvRd5XT7_5IVn2pmE70be82bdRFAMbNVZD45A/s922/IMG_3136.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYpzDf5XkbvOInxhip_NSXR9O1-QSWoxNIYWecLwmZAhFchvGMWkm9ivN0rsdGSh47Z7TARSWFvAUsCnG2rnUksv5erj3T8tXy0M8DU1nV3axo91paxlTImqoCKbWSddWNtZuuP6a1UZg1Wswo3vuueFvRd5XT7_5IVn2pmE70be82bdRFAMbNVZD45A/w640-h480/IMG_3136.JPG" width="640" /></a></div><p>First I measured and drilled the mounting holes I need. I marked and used my Dremel cutting wheel for the vertical cuts on the sides of the mounting holes.</p><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEqPKW98rfoo44YGlnBkGDjjO1YvpDAGxDY_uICgSB0CbcvMRkk2rZuh0Fjs8yr99HYRi4otWX1RJYyIjXBXSmIoxYIjK0mTPVscLl_SSGTRktJAuQTXZEZJAADHQKlSHTBU5tgg1XZ_a0W5bcxqTC3YhbU-b6Kra_yYb1iS8xpf8v8P0N6Aruzonkaw/s4608/IMG_3122.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEqPKW98rfoo44YGlnBkGDjjO1YvpDAGxDY_uICgSB0CbcvMRkk2rZuh0Fjs8yr99HYRi4otWX1RJYyIjXBXSmIoxYIjK0mTPVscLl_SSGTRktJAuQTXZEZJAADHQKlSHTBU5tgg1XZ_a0W5bcxqTC3YhbU-b6Kra_yYb1iS8xpf8v8P0N6Aruzonkaw/w640-h480/IMG_3122.JPG" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I made a jig out of a piece of scrap steel angle bracket. I drilled out three 9/64" dia. holes for the 6-32 screws.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNun4R7MZZL4DWo80xZ2mbeS3ezQ8Rlo4PRmGhNFUySELXjJjb7wLCUKYcrP0EEIwkoBcmYCM45uLiw2pAcj5FcHn9Shq0RALlVNFnuEM2bKBpz-qGc9s6O9qEWBjfv4l4yE4ecMbArsjdR5-6diDd6f2_a8FiV4u06qV-jhMh15HdqcICYEQm4fA9IQ/s799/IMG_3123.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="355" data-original-width="799" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNun4R7MZZL4DWo80xZ2mbeS3ezQ8Rlo4PRmGhNFUySELXjJjb7wLCUKYcrP0EEIwkoBcmYCM45uLiw2pAcj5FcHn9Shq0RALlVNFnuEM2bKBpz-qGc9s6O9qEWBjfv4l4yE4ecMbArsjdR5-6diDd6f2_a8FiV4u06qV-jhMh15HdqcICYEQm4fA9IQ/w640-h284/IMG_3123.JPG" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">The holes on both ends are for mounting standoffs. </div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtbOGSMu5Pfe48YcO7LMT0Ln0imn7S8-BDggA6uLe-bKUGk9TkMEYYkNGN3NnicbgK3coFfDp_Q_hg1hlCz0HZBMRJOPbg3P1e5DdqkfpfqMKFSFIErzk8e4weZp9u-CH0YIanFJNrDT8ww2cjtdSxSzuzY_FMei2aMjmPPeraH57Uim3EhgH27FNxQ/s756/IMG_3124.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="311" data-original-width="756" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYtbOGSMu5Pfe48YcO7LMT0Ln0imn7S8-BDggA6uLe-bKUGk9TkMEYYkNGN3NnicbgK3coFfDp_Q_hg1hlCz0HZBMRJOPbg3P1e5DdqkfpfqMKFSFIErzk8e4weZp9u-CH0YIanFJNrDT8ww2cjtdSxSzuzY_FMei2aMjmPPeraH57Uim3EhgH27FNxQ/w640-h264/IMG_3124.JPG" width="640" /></a></div><br /><p>This jig is mounted over the drilled hole in the PSU panel. The screw in the middle is used for pulling and deforming the panel. The standoff on both side pushes against the panel as it deforms.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoU60JK6EU38z5ZW7DIPrsMrNHQlx9TAryCuR9nTVIX_XArMTBfbZxnOzmIqN84fxmtJ9VrWBChZpM39M5O5rGT4RIPT6BFQFWTKeshe5y2XYY-O43RxWT9qbnfGFkAd7HDa5d4tdNHU27QwvBZZKGBX8zZw8C8NbVzCo3CTZFQ1TuAaoX1ZRtbHWfAw/s590/IMG_3125.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="176" data-original-width="590" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoU60JK6EU38z5ZW7DIPrsMrNHQlx9TAryCuR9nTVIX_XArMTBfbZxnOzmIqN84fxmtJ9VrWBChZpM39M5O5rGT4RIPT6BFQFWTKeshe5y2XYY-O43RxWT9qbnfGFkAd7HDa5d4tdNHU27QwvBZZKGBX8zZw8C8NbVzCo3CTZFQ1TuAaoX1ZRtbHWfAw/w640-h190/IMG_3125.JPG" width="640" /></a></div><div><br /></div><div><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51Jm45ClnEDBsN4e90Blpku7btvu7Q7Fwobhl9280SLZkeiys86BtKdwuuAxfwiGX2YtzisoLnSMnEv664hn-cka5bzfOxPRwXp6LeiMyLsTfS9elkdhT-y9cL7YaxWoEwp-yQ5n2se07n0FOF7HwTasuw3JuxZe_NFHkJWS9LWMvmENtkZW7hV2Gqw/s4608/IMG_3126.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51Jm45ClnEDBsN4e90Blpku7btvu7Q7Fwobhl9280SLZkeiys86BtKdwuuAxfwiGX2YtzisoLnSMnEv664hn-cka5bzfOxPRwXp6LeiMyLsTfS9elkdhT-y9cL7YaxWoEwp-yQ5n2se07n0FOF7HwTasuw3JuxZe_NFHkJWS9LWMvmENtkZW7hV2Gqw/w640-h480/IMG_3126.JPG" width="640" /></a></div><div style="text-align: center;">Side view showing the bent area.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWe2quNemAfA-Vc1Oemh9HHiZYXChVHQ-UBBRRcDOCgv8xh0JmIu2rV5dXxC_ObykpG3jGLEw4HLs58BFKyUEQTugXp20zjcv0yripoqmArwRcgEgaHgEEy9XkH98FPoJ5oxPrkdBBJ2qnd-W-59xUWvuIWXPwG5vapgY6Dxl_XHLn9XQrPQm8oKqipA/s360/IMG_3128.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="152" data-original-width="360" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWe2quNemAfA-Vc1Oemh9HHiZYXChVHQ-UBBRRcDOCgv8xh0JmIu2rV5dXxC_ObykpG3jGLEw4HLs58BFKyUEQTugXp20zjcv0yripoqmArwRcgEgaHgEEy9XkH98FPoJ5oxPrkdBBJ2qnd-W-59xUWvuIWXPwG5vapgY6Dxl_XHLn9XQrPQm8oKqipA/w640-h270/IMG_3128.JPG" width="640" /></a></div><div style="text-align: center;">view from the back showing the bent</div><p>I didn't leave enough metal on the two sides of the drilled hole, so the metal cracked. The hole got elongated as the metal stretched.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT8TJkFsKqos4PxmDKDz9XnmfCxZT2Q_ZZRx2gDHILm475V56P4RUxfwlM8iYlRNn1HUMHZkfCZd7zWkdkLrxI74gKXdFBWdAeqTufCtcrPORUPyHFKSwrFdTZIxA6NpzICrmMSO1u8Vllj8r5OwL4FN94hhd1waMgUbaHrCWwniD7Gibl7X-k2HjX2w/s407/IMG_3129.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="162" data-original-width="407" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT8TJkFsKqos4PxmDKDz9XnmfCxZT2Q_ZZRx2gDHILm475V56P4RUxfwlM8iYlRNn1HUMHZkfCZd7zWkdkLrxI74gKXdFBWdAeqTufCtcrPORUPyHFKSwrFdTZIxA6NpzICrmMSO1u8Vllj8r5OwL4FN94hhd1waMgUbaHrCWwniD7Gibl7X-k2HjX2w/w640-h254/IMG_3129.JPG" width="640" /></a></div><p>The large nut probably caused excessive bending on the sides, so I use screw head on the panel side for the remainder of the mounts.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjelwzTFpmCA7wyJJn6VJ8fCbSKFfQYppkQIAVUFR13b_mf65l8J_6fEd_FW6OmPsm-NIcZRcpAWkwaa7kyUwN_Kq0BlCE9vvjLG-k_wy3XS-YjVccVMzS2KVmfAhc-30M28pFrhIFGlHzJQwv-ULRao8HZJl5WokR4D5Xk45Iz2Muleudt2K2Ijs3HSQ/s920/IMG_3130.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="920" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjelwzTFpmCA7wyJJn6VJ8fCbSKFfQYppkQIAVUFR13b_mf65l8J_6fEd_FW6OmPsm-NIcZRcpAWkwaa7kyUwN_Kq0BlCE9vvjLG-k_wy3XS-YjVccVMzS2KVmfAhc-30M28pFrhIFGlHzJQwv-ULRao8HZJl5WokR4D5Xk45Iz2Muleudt2K2Ijs3HSQ/w640-h178/IMG_3130.JPG" width="640" /></a></div><br /><p>The upper right corner was part of the original PSU mounts. I did a slightly better job by the time I did the last mount in the upper left hand corner.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgABhgJvAJOXu9HJADyqmqXtH1lor0o0tj6Kjg-daGSFHfMvrBwu4qwHDycmkyv7gGJA0sVLDFCWw90_opanqZdfEB_Bp49bAM_Sj-CcnSGnl6FaNhy4n6-5NBMuskpKNOkxPTkwPorsUwG2z5RbpKvBBWFCc4lx5HTPhvk1XQ13_5QKAb_s8cmOs9YKg/s922/IMG_3131.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgABhgJvAJOXu9HJADyqmqXtH1lor0o0tj6Kjg-daGSFHfMvrBwu4qwHDycmkyv7gGJA0sVLDFCWw90_opanqZdfEB_Bp49bAM_Sj-CcnSGnl6FaNhy4n6-5NBMuskpKNOkxPTkwPorsUwG2z5RbpKvBBWFCc4lx5HTPhvk1XQ13_5QKAb_s8cmOs9YKg/w640-h480/IMG_3131.JPG" width="640" /></a></div><div><br /></div><div>Now I can mount my 3"x5" open frame PSU module in the old PSU case.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsia0BNGvHzi1jvh_PxgOPWzZ_oiXpf4jhmyQMErnRF0uOpPs5SXQTx8b4CfUN9qonptjxN1_q6d2L4aC76Y_UtgsTnlcpa76ZS2dNZc_qm0qg6REMZ720H_YE6CvSGvaUI9yVE2JeGFCFE2bemGckoWLJR4N24Dh9MgzPDNHLWVvNpHlFdrw-z2qI_A/s922/IMG_3135.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsia0BNGvHzi1jvh_PxgOPWzZ_oiXpf4jhmyQMErnRF0uOpPs5SXQTx8b4CfUN9qonptjxN1_q6d2L4aC76Y_UtgsTnlcpa76ZS2dNZc_qm0qg6REMZ720H_YE6CvSGvaUI9yVE2JeGFCFE2bemGckoWLJR4N24Dh9MgzPDNHLWVvNpHlFdrw-z2qI_A/w640-h480/IMG_3135.JPG" width="640" /></a></div><br /><p><br /></p><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-82018119468395916082022-12-30T15:24:00.000-05:002022-12-30T15:25:36.478-05:00DIY Dell Dimension 3000 heatsink fan<p>As a result of my previous <a href="https://hw-by-design.blogspot.com/2021/11/boring-pc-case-mod-with-recycled.html">Boring PC case mod with recycle material</a>, the Dell motherboard was left without a heatsink fan.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSKwzVvTqiFtIWWabkuP6jsFRCId_3uLyuNRv2hAlLUUyYnAx7AZ8KQcFj-vN2b3l9XbQ9vJNymj_xDQYt1QDUxAB91-vzvIJ1lJe8G6nFskMFyw3068qwI77p-7JkXHOqYtaxvEtgaTsMNOJdPD_-ozPG3PDjJSj3HdMh02SLOaecH5hWrX1k6u6Zw/s922/IMG_3121.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSKwzVvTqiFtIWWabkuP6jsFRCId_3uLyuNRv2hAlLUUyYnAx7AZ8KQcFj-vN2b3l9XbQ9vJNymj_xDQYt1QDUxAB91-vzvIJ1lJe8G6nFskMFyw3068qwI77p-7JkXHOqYtaxvEtgaTsMNOJdPD_-ozPG3PDjJSj3HdMh02SLOaecH5hWrX1k6u6Zw/w400-h300/IMG_3121.JPG" width="400" /></a></div><div style="text-align: center;">Replacement fan for the heatsink</div><p>Dell use a "airflow shroud" to funnel airflow over their CPU heatsink via the case fan. They do so to cut their BOM cost as they control both their motherboard layout as well as their case design.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoRl4S6Q4Z4XZTR43spO2t0SzGG1q3Tg03iX6goX2RTrsgOhcUS1jCAdHJqR-rhZWsm0UgflTegBFmiOY1rBUTgy-Hr6dqbqBv75IsqcxbIOalO-xo4L2R9LM_XuIxds5BfzT5RZXfJ3E9JhSpzBEYjtU15zxY_dC58HFjEw8XM2WwSom1na2yDYwgkg/s460/Case%20fan%20hood.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="418" data-original-width="460" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoRl4S6Q4Z4XZTR43spO2t0SzGG1q3Tg03iX6goX2RTrsgOhcUS1jCAdHJqR-rhZWsm0UgflTegBFmiOY1rBUTgy-Hr6dqbqBv75IsqcxbIOalO-xo4L2R9LM_XuIxds5BfzT5RZXfJ3E9JhSpzBEYjtU15zxY_dC58HFjEw8XM2WwSom1na2yDYwgkg/s320/Case%20fan%20hood.png" width="320" /></a></div><div style="text-align: center;">Exhaust fan + airflow shroud</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8CVs3ED-b-JFIUJBJJL1nsSW0jtS7XTD3VnC_rtg1zVS68sSJSoqh5E1O6RM_QQCOUTW5fqhjoEamYmYdZiPzuYd_n9v9mInTgSWL051OExFFG0EIyA_YV7SMmKPjgsNLLKH1_8QJkBSi3j0Pj4e-OuYDsI0okL4lzjytbRkwtbYnvKis3bRiA3kZDg/s430/heatsink.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="331" data-original-width="430" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8CVs3ED-b-JFIUJBJJL1nsSW0jtS7XTD3VnC_rtg1zVS68sSJSoqh5E1O6RM_QQCOUTW5fqhjoEamYmYdZiPzuYd_n9v9mInTgSWL051OExFFG0EIyA_YV7SMmKPjgsNLLKH1_8QJkBSi3j0Pj4e-OuYDsI0okL4lzjytbRkwtbYnvKis3bRiA3kZDg/s320/heatsink.png" width="320" /></a></div><div style="text-align: center;">Heatsink + retention base</div><p>I could probably find a heatsink to replace the whole setup from the usual places from China, but I have already spent too much on an obsoleted platform.</p><p>I have decided to mount the fan for a front to back airflow as shown in my first picture to fit a 70mm fan: Cofan F-7015H12B. Here are its specs:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkqs7NCz-DOILvB9U9_5cS2kYaTr1Nks33MC7FUDJSGcG5T2TVyCYb2DC9ycSj4fNcPsylORAfU21LewWnDZ8bihV_TCDiNxoX4VMG1KGyegOVnNGy4TGuzFXNTEdBW_vRT8npMGbFlb3dH8AXhAkcSOD4zKQW45WYoyxnGtdT0zu2zhT2gX91jUyuA/s1110/Cofan%20F-7015H12B.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="58" data-original-width="1110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgkqs7NCz-DOILvB9U9_5cS2kYaTr1Nks33MC7FUDJSGcG5T2TVyCYb2DC9ycSj4fNcPsylORAfU21LewWnDZ8bihV_TCDiNxoX4VMG1KGyegOVnNGy4TGuzFXNTEdBW_vRT8npMGbFlb3dH8AXhAkcSOD4zKQW45WYoyxnGtdT0zu2zhT2gX91jUyuA/s16000/Cofan%20F-7015H12B.png" /></a></div><p>I cut a couple of blank FR4 PCB and tapped in #4-40 screw threads for mounting the fan. Originally I tried to superglue the FR4 onto the Lexan retention base, but it didn't hold. I glued it again, but reinforced with screws.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9sEjCptPffHXKxs42rrptarYHkCZm5xpW-rKYNUYL06XP9KOfhLuJ9mRfQUsTxM-5Jv6XwtBk-aEOA9QeZ6gIZBOh4oF7EZlNFHpvy5CRlZFSN7Lah9b2dzRjtepTYRf7_LV0A_ir8mKA1akucluhIBcTdLP6laCosUYBvVJwl4u9CV4qD6ikYUgcSw/s922/IMG_3104.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9sEjCptPffHXKxs42rrptarYHkCZm5xpW-rKYNUYL06XP9KOfhLuJ9mRfQUsTxM-5Jv6XwtBk-aEOA9QeZ6gIZBOh4oF7EZlNFHpvy5CRlZFSN7Lah9b2dzRjtepTYRf7_LV0A_ir8mKA1akucluhIBcTdLP6laCosUYBvVJwl4u9CV4qD6ikYUgcSw/w640-h480/IMG_3104.JPG" width="640" /></a></div><div style="text-align: center;">FR4 mounts for fan</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">I use a milling bit to the area for the screw.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhibuGiGKbkpGwtOLnaSc4sOlmCs1h46zVOyn0-geLdlNEhFI2G6JII04ND9QVgOaqxmsw4DVHTJDnS1TsNzWO7U8pc1UgUqcbhdVYeZCBHV2Psz2cov-YgxMv0s10SS8b4YjBfAioxiVp7gUU3uJgRSDrspFJCZYmy_jil5aV4_nQu9C7XwHRu_0kzCw/s379/nuts%20IMG_3105.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="179" data-original-width="379" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhibuGiGKbkpGwtOLnaSc4sOlmCs1h46zVOyn0-geLdlNEhFI2G6JII04ND9QVgOaqxmsw4DVHTJDnS1TsNzWO7U8pc1UgUqcbhdVYeZCBHV2Psz2cov-YgxMv0s10SS8b4YjBfAioxiVp7gUU3uJgRSDrspFJCZYmy_jil5aV4_nQu9C7XwHRu_0kzCw/s16000/nuts%20IMG_3105.png" /></a></div><br /><p>Here is an other view from the back. I checked to make sure that the nut isn't interfering with the base screw removal nor the heatsink.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhplzVbVWoSQXyKmPxSGEJiBB-bulr9ySTlvXNovdCznDSiT9AK6MfptOcrQdDJEBvK7Xz0jUto-NXvDwnQzirpbl0Cv1Rj2goL26DTTyjmovLUzPaUQlsHV1WlY1Slp52jIlUNY_d8LjSnPsUPAjVZWNkzady2_T539eLq_OFYnwFOjFw9bLIQUAJiJw/s950/mount%20IMG_3108.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="279" data-original-width="950" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhplzVbVWoSQXyKmPxSGEJiBB-bulr9ySTlvXNovdCznDSiT9AK6MfptOcrQdDJEBvK7Xz0jUto-NXvDwnQzirpbl0Cv1Rj2goL26DTTyjmovLUzPaUQlsHV1WlY1Slp52jIlUNY_d8LjSnPsUPAjVZWNkzady2_T539eLq_OFYnwFOjFw9bLIQUAJiJw/w640-h188/mount%20IMG_3108.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZVHdgEB8A3oBxPfPivk8GAtgnl9Z94TlKWQY9mHj39yIA3g23thEYdOh0bFG9hAwoxs7ykibE4fLAJV4VxSqgDoL4lAdzhJD47KDji_YQyG_oKfN_aqTf3M6q6vQzL5Ib6MY7cPH8bNb60PZ5gZIPln7v0G1iWWN4Ffdx7Nca8VjE_c1S3yh5tgHrg/s2304/heatsink%20IMG_3109.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="664" data-original-width="2304" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpZVHdgEB8A3oBxPfPivk8GAtgnl9Z94TlKWQY9mHj39yIA3g23thEYdOh0bFG9hAwoxs7ykibE4fLAJV4VxSqgDoL4lAdzhJD47KDji_YQyG_oKfN_aqTf3M6q6vQzL5Ib6MY7cPH8bNb60PZ5gZIPln7v0G1iWWN4Ffdx7Nca8VjE_c1S3yh5tgHrg/w640-h184/heatsink%20IMG_3109.jpg" width="640" /></a></div><br /><p>Dell use 2 pieces of extra green clips to "hold" their heatsink by the 2 opposite corners in additional to the middle. I broke one of the pieces earlier.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0nGcVM7sDUAA5DSOv9IfwvmrFiTeSiXfC603zWifKGuauCO9nSYTPRzl7ZaRXtMXPhuuFu7-l1e1WOU8qZt3c3Jx6enMiOVe-ZT6wChdVUJySAGK0Fi-wOjxnwyD15cniNqV-iyeKzon_4kSJAotg60X-9zUoetsZKVQMr4x8QXGBJqSDcUZLP3Swag/s284/forsale.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="125" data-original-width="284" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0nGcVM7sDUAA5DSOv9IfwvmrFiTeSiXfC603zWifKGuauCO9nSYTPRzl7ZaRXtMXPhuuFu7-l1e1WOU8qZt3c3Jx6enMiOVe-ZT6wChdVUJySAGK0Fi-wOjxnwyD15cniNqV-iyeKzon_4kSJAotg60X-9zUoetsZKVQMr4x8QXGBJqSDcUZLP3Swag/w640-h282/forsale.jpg" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>They use a S shaped bend so that the clips can be inserted/extracted from their slots. The S bend was where it broke. I made a crude latch with some transformer I cores. My repaired piece actually holds down the corner of the heatsink. Their S bend adds extra flexibility in the up/down direction which defeats its purpose. Just waiting for the other piece to break one of these days.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK6B6jNMG_P1w0Umg6-uXMHItCbREmvqhU9tTexjqHbpAN1_OoJipc4hLUcU1toG-QfyQbMzd55tVfgwK3J8TSF6ybyQlnDR44w0kE0btBTP3N2Sibt_C9ACrYiH9c5BLYEoj_Hy9UWp7C6sY__XiWoiTl8ftaJLeT9hL3jRXs9VkuykJ4RH6bj-5jSA/s1334/repair%20IMG_3110.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="1334" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK6B6jNMG_P1w0Umg6-uXMHItCbREmvqhU9tTexjqHbpAN1_OoJipc4hLUcU1toG-QfyQbMzd55tVfgwK3J8TSF6ybyQlnDR44w0kE0btBTP3N2Sibt_C9ACrYiH9c5BLYEoj_Hy9UWp7C6sY__XiWoiTl8ftaJLeT9hL3jRXs9VkuykJ4RH6bj-5jSA/w640-h260/repair%20IMG_3110.jpg" width="640" /></a></div><br /><p>I would try to control the speed of my fan sensing exhaust temperature too. Here is one of the fan speed controller I built in the past using Microchip <a href="https://www.microchip.com/en-us/product/TC652" rel="nofollow" target="_blank">TC652</a>.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirdDuQ8I_TBi17APSgzrMtvnEfiyj0zp0Lj6rBklHP4E6WsUGon0OrYbSljtqpWLHkR5zTI2tgWxXgF7xxuk8NFFWn-pujR7y97Svudw_tXSPC50PwpZR8ftnCZ8JDGuy-e8Pm1HEF6KNdOMl9sImEIj_bW58rLZS8rmIJCbH1vWlWfT0CLYcHU_s69g/s554/IMG_3111.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="191" data-original-width="554" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirdDuQ8I_TBi17APSgzrMtvnEfiyj0zp0Lj6rBklHP4E6WsUGon0OrYbSljtqpWLHkR5zTI2tgWxXgF7xxuk8NFFWn-pujR7y97Svudw_tXSPC50PwpZR8ftnCZ8JDGuy-e8Pm1HEF6KNdOMl9sImEIj_bW58rLZS8rmIJCbH1vWlWfT0CLYcHU_s69g/s320/IMG_3111.JPG" width="320" /></a></div><div style="text-align: center;">TC652 fan controller</div><p>Advantages:</p><p></p><ul style="text-align: left;"><li>Built-in temperature sensor</li><li>Uses PWM (~15Hz) to control fan speed</li></ul><div>Disadvantage:</div><div><ul style="text-align: left;"><li>temperature range by different part numbers of the chip, PWM % not changeable</li><li>Its PWM interferes with reading fan's speed</li></ul><div>I tried my TC652 controller, but ended up with my own discrete design.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidYWS8voXKX1Ey3G8MZb_5xB9d7sIb4uUqYlDj33qQUkP44OvSJbb-4hP-ImkP3HlOjFAUNw7qzbSqcFphe2kpCslCtB8Ukjn8u18xsBznD8d-gds04fqIMnF45EVJyMPHD80Rso5v5e5em_3XLHYBIYX5LjSWGB7XW5F2DEN1ApPjbvR4hSIpK6PpNw/s1055/fan%20curve.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="338" data-original-width="1055" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidYWS8voXKX1Ey3G8MZb_5xB9d7sIb4uUqYlDj33qQUkP44OvSJbb-4hP-ImkP3HlOjFAUNw7qzbSqcFphe2kpCslCtB8Ukjn8u18xsBznD8d-gds04fqIMnF45EVJyMPHD80Rso5v5e5em_3XLHYBIYX5LjSWGB7XW5F2DEN1ApPjbvR4hSIpK6PpNw/w640-h205/fan%20curve.png" width="640" /></a></div><br /><div>R2 = 12K(middle curve) was the right value for my particular fan. </div><div><br /></div><div>The next power is the power dissipated by the transistor. Here are the fan currents I measured at different operating voltages with the fan mounted to the heatsink.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjamGVSA1fQRsIHtJomTctZlCGH-41KiAsEFCAqorJ0VL7c43kcJ6B5z3p2hxjsIrFqG-HToC-ECghjhx9OlUVdwzNgb78NzNIsMyk3__LrH2tSEfKrAyorXRhAT5PgFd3n0Rs3oq0C8KwP0q1MffVVkiaxBHDNN9kezTc1rO4ApMNqQ-25DzPxdmHq1w/s256/fan%20power.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="195" data-original-width="256" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjamGVSA1fQRsIHtJomTctZlCGH-41KiAsEFCAqorJ0VL7c43kcJ6B5z3p2hxjsIrFqG-HToC-ECghjhx9OlUVdwzNgb78NzNIsMyk3__LrH2tSEfKrAyorXRhAT5PgFd3n0Rs3oq0C8KwP0q1MffVVkiaxBHDNN9kezTc1rO4ApMNqQ-25DzPxdmHq1w/s1600/fan%20power.png" width="256" /></a></div><div><br /></div>The worst case of the transistor power dissipation was around 0.66W, so the part I have should be fine. </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTYMbyrS_2sIPeiXAD81jhig43Uh0xmmLmos7Cc-3oU6w5TM5sr_LnhYYv0e_mgYj72OZvDzRzmFlg4G1UDkQ4TFkvZD-T1LcunWjRMJeHitpMP_3olCPbtTL176WcMydEH9_z2W5bpxdwAehJppH6MTdzQrHiGrdyVaxRg_sAvCbN4kkIb0xeM46GpA/s389/transistor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="389" data-original-width="312" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTYMbyrS_2sIPeiXAD81jhig43Uh0xmmLmos7Cc-3oU6w5TM5sr_LnhYYv0e_mgYj72OZvDzRzmFlg4G1UDkQ4TFkvZD-T1LcunWjRMJeHitpMP_3olCPbtTL176WcMydEH9_z2W5bpxdwAehJppH6MTdzQrHiGrdyVaxRg_sAvCbN4kkIb0xeM46GpA/s320/transistor.png" width="257" /></a></div><br /><div>Note: </div><div>The fan sticker as well as data specified 0.4A max. A blown transistor is the least of my issue if/when the Pentium 4 burnt because of a fan failure/stall. I would have used a LDO with its thermal protection and larger case for a more robust design.</div><div><br /></div><div>I attached fan speed controller to the bottom of the fan with double side silicone tape. </div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlQuNaPP0ifNGGpXpLv8Z2QwyKzLjQXfDfD6U2sBoHxtE53Hzs6yNwS5dk_UAjPfy9V8TTxec-C1UB_ziUsaIqNyMNxxOJH4R6t6Z4nNDYE3DW2qtcvQdEEX0VL8cbieY6ws_LToxPrDOQl4pkspPEzH1gG9lo8lifNJO2x3kU3hgcWro27N0LJDog6g/s604/IMG_3117.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="253" data-original-width="604" height="134" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlQuNaPP0ifNGGpXpLv8Z2QwyKzLjQXfDfD6U2sBoHxtE53Hzs6yNwS5dk_UAjPfy9V8TTxec-C1UB_ziUsaIqNyMNxxOJH4R6t6Z4nNDYE3DW2qtcvQdEEX0VL8cbieY6ws_LToxPrDOQl4pkspPEzH1gG9lo8lifNJO2x3kU3hgcWro27N0LJDog6g/s320/IMG_3117.JPG" width="320" /></a></div><div style="text-align: center;">Discrete fan speed controller</div><div><br /></div><div>There are black/red wires for power and a ribbon cable for thermistor. The ribbon cable is routed through the heatsink and retention base. The thermistor is hanging for sensing the exhaust air temperature near the bottom center of the heatsink.</div><div><br /></div><div>I cut a piece of 90 degrees plastic piece from a food container to block the air from the fan that is above the heatsink. Fan could have been flush, but height of capacitors was blocking the mounting screws. A piece of paper is used to prevent air leaking through the otherwise open top of the heatsink.</div><div> </div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-aXw_VqSMGgMzvWSmgAHaoY1GcjUNOfXiRK5P2AJ-F589xtN528g4-cXBgFciUchxLONoaVWXhq080eisgVcE2dgwtHKtp9rDzi0spzNPe5_sKgu88XTRX6XQTOnXdLZR-7-0Lk5x56lrD4PiY582BlEYbDYVJGb5RUsmTFyJltW_FO-PxjOAAFu7QA/s752/IMG_3119.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="579" data-original-width="752" height="492" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-aXw_VqSMGgMzvWSmgAHaoY1GcjUNOfXiRK5P2AJ-F589xtN528g4-cXBgFciUchxLONoaVWXhq080eisgVcE2dgwtHKtp9rDzi0spzNPe5_sKgu88XTRX6XQTOnXdLZR-7-0Lk5x56lrD4PiY582BlEYbDYVJGb5RUsmTFyJltW_FO-PxjOAAFu7QA/w640-h492/IMG_3119.JPG" width="640" /></a></div><div><br /></div><div>There is an unpopulated 3-pin fan connector near the back of the heatsink. It is wired on the PCB in parallel to Dell's non-standard one in the front.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwa_wx7GbBUUp9Mqfsa4zefyBmhHYYkKioMII2q5dL6wyy2vCAQjL5aTyjLsuIe-MeJlGw1WgC0kttcS4G4imnTg2S0om324H1WazZP0YkUPPbCNYK6TV39T7HqjRbMLHAWjk4U3Glgib0ioSSSrr6-93gDXVy7h1xAIRNhne45hdHndrhpCoQH03tGQ/s1323/connector%20IMG_3120.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="360" data-original-width="1323" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwa_wx7GbBUUp9Mqfsa4zefyBmhHYYkKioMII2q5dL6wyy2vCAQjL5aTyjLsuIe-MeJlGw1WgC0kttcS4G4imnTg2S0om324H1WazZP0YkUPPbCNYK6TV39T7HqjRbMLHAWjk4U3Glgib0ioSSSrr6-93gDXVy7h1xAIRNhne45hdHndrhpCoQH03tGQ/w640-h174/connector%20IMG_3120.jpg" width="640" /></a></div><br /><div>Around the time I started with my fan controller, I ran into the spec of Dell's case fan.</div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBB33WTvRdtVSwzAGHQgF0UB6_q9KEoYIjpNUtfoqBCrawT7Co0qJ-D9nB7WJx_oE6IiwzKkXPabop46xrUZ0JFSeR06JbgmljXcJ6-HxtzDe74qk3kKOP6-nkabmPXb284RzqUdtoCHtGpXegJiPvO6HRct5oadaEWuz-0dWK52jeiH-Ls0VhPh_ICQ/s707/Dell%20fan.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="303" data-original-width="707" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBB33WTvRdtVSwzAGHQgF0UB6_q9KEoYIjpNUtfoqBCrawT7Co0qJ-D9nB7WJx_oE6IiwzKkXPabop46xrUZ0JFSeR06JbgmljXcJ6-HxtzDe74qk3kKOP6-nkabmPXb284RzqUdtoCHtGpXegJiPvO6HRct5oadaEWuz-0dWK52jeiH-Ls0VhPh_ICQ/w640-h274/Dell%20fan.png" width="640" /></a></div><p>The 3rd wire of Dell's fan isn't the usual /Tach output. It is open collector/drain and asserts a logic low when the fan is up to speed. I toke the easy way out by shorting pin 1 and 3 together in my fan cable. It also mean that the cable does not need to be polarized.</p><p>I am hoping to use this motherboard for old parallel port programming dongles and other peripherals that are not supported by their vendors under newer Windows x64 OS. Sadly that list also include USB, PCI cards..</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-25685696767209107132022-10-25T17:04:00.005-04:002022-10-31T07:32:28.204-04:00RC servo PCB replacement PCBI bought some NE544N Servo Amplifier chips from a surplus place in the US a long time ago. That was long before the risk of getting fake chips from China.<div><br /><div>I haven't fixing my old servo as I can get cheap micro servos from the usual place for a few dollars. Those servos are very fast and quite strong for their size.<div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsAjHlNJjAHbyWtCyWIiKMtKRCr6Lng3ZNCb3vSCbVwyXA4rvEtTA1yX9FHH5xeQNQVd2RqV-4Cjypzy78LJtJGgcxL2bQg5vzZEWnB5gXQ-VgF_GpbgLJSwPJmJpNhaoWHiNcJDBD7hggsYXxb33iv_uvowFYPPGtOqWlS1QtmV7Q_GEcl7sBQwJhAA/s519/IMG_3103.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="519" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsAjHlNJjAHbyWtCyWIiKMtKRCr6Lng3ZNCb3vSCbVwyXA4rvEtTA1yX9FHH5xeQNQVd2RqV-4Cjypzy78LJtJGgcxL2bQg5vzZEWnB5gXQ-VgF_GpbgLJSwPJmJpNhaoWHiNcJDBD7hggsYXxb33iv_uvowFYPPGtOqWlS1QtmV7Q_GEcl7sBQwJhAA/w400-h313/IMG_3103.JPG" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: center;">Old servo vs newer Tower Pro S90</div><div style="text-align: center;"><br /></div><div style="text-align: left;">I took the 10 minutes to make a replacement Servo arm out of FR4 PCB.</div><div style="text-align: center;"><br /></div><div style="text-align: left;"> This is one reason why I don't trust scanned datasheet and inconsistent component values labelling. On the old datasheet scan I had, the critical '.' was missing. Had they use a '0' in front consistently, that wouldn't have been a problem.</div><div><br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS6zuPOGLo9UpKa2sN8DZP7n7QHtan73FbyP-Kl5Lm0DEfEQXceDrKGNotS3Lj5PGND7qjWMpljZsOC4NPJ-twcxIkDYGeCqIpc7YZacaqUM-KK3do6d69ZNCx1u6eGHR4xh9WBHyWJvCos3oL3puhIOmEGpd-POnVtZN7pZR50aTV-UXqzO0Ntqgcvg/s928/datasheet.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="347" data-original-width="928" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS6zuPOGLo9UpKa2sN8DZP7n7QHtan73FbyP-Kl5Lm0DEfEQXceDrKGNotS3Lj5PGND7qjWMpljZsOC4NPJ-twcxIkDYGeCqIpc7YZacaqUM-KK3do6d69ZNCx1u6eGHR4xh9WBHyWJvCos3oL3puhIOmEGpd-POnVtZN7pZR50aTV-UXqzO0Ntqgcvg/s16000/datasheet.jpg" /></a></div>I knew something was wrong as the motor spins for a few seconds when I applied power. Cs for the Pulse Stretching is labelled as .22uF, but the '.' was missing on one of the datasheet. I didn't know at the time that the value I put in was 2 orders of magnitude higher! </div><div><br /></div><div>I figured that Rs * Cs time constants should be on the order of 20ms (1/50Hz). 50Hz being the frequency of the control PWM. ~ 0.266uF close enough to the 0.22uF value.</div><div><br /></div><div>I still have some doubt to the actual value as they used 0.1uF else where on the datasheet with a leading '0', but without one on the .22Uf. The first value I tried was 0.56uF as it fitted the footprint I had for Cs. It was a luck of the draw as it work better than the 0.22uF. There was some rattling with the 0.22uF, but 0.56uF was fine. It might be something related to dead band setting as that servo have a lot of backlash.</div><div><br /></div><div>I just noticed that C4 filter cap for the feedback signal also has the extra '.' in front! I used 1uF as the old datasheet scan didn't have it. For my slow servo, it makes very little difference.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3P7MOFqv-hbCG8VXeCc6LrLqziy5PMjEGJ9W7e6xOq1OOnQELk4UGWSVZayME7F0YQKTIAbJjucFtSOpj0kaCidbnmbYquHLIMuh8ArqdchLML5weNyF7ZW1SqRURg2Dok7z0x0ZJVpnsZcz8ldhNzWXfvx74axUHh7MwhdKsfE9ErFZGQFRo2k42gw/s858/servo.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="400" data-original-width="858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3P7MOFqv-hbCG8VXeCc6LrLqziy5PMjEGJ9W7e6xOq1OOnQELk4UGWSVZayME7F0YQKTIAbJjucFtSOpj0kaCidbnmbYquHLIMuh8ArqdchLML5weNyF7ZW1SqRURg2Dok7z0x0ZJVpnsZcz8ldhNzWXfvx74axUHh7MwhdKsfE9ErFZGQFRo2k42gw/s16000/servo.png" /></a></div><br /><div>I had to make up the proper values of the resistors as I don't have them in my parts box.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi59yg0vX3rbInDH8qViYsYVeYKXu7jHJPs3Y0N28F-iscwudHONojjriwTHypc5IPG5xd7zuixL2xo_atDSqIFItMWid8GKDO54p1YB_3312QSx4o4q4oOVvaYD2Tkp-XQNy2hOTwNn16FIb4hwCWG3Mw8SMhS535RAmDo6ZVpaAFrm_vDdd70alv60A/s365/PCB.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="365" data-original-width="321" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi59yg0vX3rbInDH8qViYsYVeYKXu7jHJPs3Y0N28F-iscwudHONojjriwTHypc5IPG5xd7zuixL2xo_atDSqIFItMWid8GKDO54p1YB_3312QSx4o4q4oOVvaYD2Tkp-XQNy2hOTwNn16FIb4hwCWG3Mw8SMhS535RAmDo6ZVpaAFrm_vDdd70alv60A/s320/PCB.png" width="281" /></a></div><br /><div>I have enough space, so I also put in the two optional PNP transistors on the PCB for high currents motors.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxCICh83dDRUr6WHdIL-HQcXkhkLeYKx8E9x2WXZ6gh3fEpulWXwe8yqZxo_PXwiwK0bddob4xRMW4E6tSrPCjNCJNSkpQGb1L27NkRgIOX6CzlF3ykYQUvU5K-eLmU2u9JqDf272QooZXp66OeXsXpTEaEi0JzHDiRFdBmmaR2MiEnbGkzeTPwNRDA/s610/PCB%20Back-1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="280" data-original-width="610" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimxCICh83dDRUr6WHdIL-HQcXkhkLeYKx8E9x2WXZ6gh3fEpulWXwe8yqZxo_PXwiwK0bddob4xRMW4E6tSrPCjNCJNSkpQGb1L27NkRgIOX6CzlF3ykYQUvU5K-eLmU2u9JqDf272QooZXp66OeXsXpTEaEi0JzHDiRFdBmmaR2MiEnbGkzeTPwNRDA/s320/PCB%20Back-1.jpg" width="320" /></a></div><div style="text-align: center;">PCB back side</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8pMaV-L_lB4iQTE-DuB5AzvXljFD3QSpdpXPblDr9A7Ztsj089-dceNyDFZSgAXn4aD4tKQr0bDfNhlpe4u2mnZfBE-s9LfGYkvbw7Kge_ESpC6okKGal1Bg1SCkp9i48l5f9NuGeOoBlrEq8XCRKIdEwvhDrM8sRRgdPhVp5VFvvFTq0UWTpmEUNA/s670/PCB%20Front.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="388" data-original-width="670" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX8pMaV-L_lB4iQTE-DuB5AzvXljFD3QSpdpXPblDr9A7Ztsj089-dceNyDFZSgAXn4aD4tKQr0bDfNhlpe4u2mnZfBE-s9LfGYkvbw7Kge_ESpC6okKGal1Bg1SCkp9i48l5f9NuGeOoBlrEq8XCRKIdEwvhDrM8sRRgdPhVp5VFvvFTq0UWTpmEUNA/s320/PCB%20Front.jpg" width="320" /></a></div><div style="text-align: center;">PCB Top side</div></div><div><br /><div>I drilled extra holes for a 1uF decoupling cap across pin 5 & 11 of the NE544 as I missed that on my PCB.</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQidnvWuDsVi_xgms3eXFG5BecB5SgtU5q12rJxKdUOD4WqZL-kn4dLBoHXbjTvXa2-1BbZPP7EE8eZUPuT07zW8-ZG34ugvDNak0lYkrfUAnDGVRNPwZlEA3uMSxVoggqtWUvZ2VzRxHPwcIuc9fh_Itaz6BgngeCgbAHJSuSIxGQtqvHaX9EdXGug/s728/servo%20test.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="637" data-original-width="728" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzQidnvWuDsVi_xgms3eXFG5BecB5SgtU5q12rJxKdUOD4WqZL-kn4dLBoHXbjTvXa2-1BbZPP7EE8eZUPuT07zW8-ZG34ugvDNak0lYkrfUAnDGVRNPwZlEA3uMSxVoggqtWUvZ2VzRxHPwcIuc9fh_Itaz6BgngeCgbAHJSuSIxGQtqvHaX9EdXGug/s320/servo%20test.jpg" width="320" /></a></div><div style="text-align: center;">Old picture with a 0.22uF decoupling cap on back side.</div><div><br /></div><div>I used my <a href="https://github.com/FPGA-Computer/component_tester" target="_blank">Component Tester</a> to generate a PWM as the test signal. The 100Hz was as low as the tester would go. The nominal PWM frequency for servos are around 50Hz. The NE544 circuit and 70% of my servos works at the faster rate of 100Hz.</div><div><br /></div><div>This PCB could be useful if I ever need to make a servo out of some random geared motor assembly.</div></div></div><span><a name='more'></a></span><div>I replaced the PCB in the smaller servo. The original PCB used a SIP part. The SMT version of the NE544 would have help, but I could only get hold of the DIP version. Obviously that won't fit without some effort.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpEHDJ4Zp6U5IWYHNsiEtd39BHyYgeSQm-n-VwPaALlBSYXdJNasP2eDpc4n1sBo64CW6UN0vGV8CwWX2OVcTRwpzTNooGyLaryFazNurDQjKt5zcbZ0QbJj4HxU3OmbFBpYk5ZBomSBVS1CLTEc6BmT2z7WhIjJWz6LKzGTgGpTuiP26wF0TTE2dObg/s269/IMG_3098.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="269" data-original-width="182" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpEHDJ4Zp6U5IWYHNsiEtd39BHyYgeSQm-n-VwPaALlBSYXdJNasP2eDpc4n1sBo64CW6UN0vGV8CwWX2OVcTRwpzTNooGyLaryFazNurDQjKt5zcbZ0QbJj4HxU3OmbFBpYk5ZBomSBVS1CLTEc6BmT2z7WhIjJWz6LKzGTgGpTuiP26wF0TTE2dObg/w217-h320/IMG_3098.JPG" width="217" /></a></div><div style="text-align: center;">Size comparison of Servo PCB vs DIP</div><div><br /></div><div>The following shows the lead frame for a DIP package before the silicon die is wire bonded and molded. The rectangle in the middle is for the silicon die.</div><div><br /></div><div>I trimmed the ends off the package (see LM393N above) and chamfered the two ends of the DIP package after it was soldered and tested.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqKyRawLZammThdzw2-rnLhLAdnmSm6lWh3xsls3RO2wBFAi35GUdKc7qkK-Y6DW-sfgnQenuWAHD3Ove-vOcloYBkxFwte-X6c0SK9KGJQ7f9GJyPXWVIVZG0qgdI-YBj8SXn3ck_ujqaNXKPDSQy_PNHo1j3ky5bTAPgP5HOXgFTqkchXpgQyPLDA/s832/lead%20frame.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="832" data-original-width="623" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBqKyRawLZammThdzw2-rnLhLAdnmSm6lWh3xsls3RO2wBFAi35GUdKc7qkK-Y6DW-sfgnQenuWAHD3Ove-vOcloYBkxFwte-X6c0SK9KGJQ7f9GJyPXWVIVZG0qgdI-YBj8SXn3ck_ujqaNXKPDSQy_PNHo1j3ky5bTAPgP5HOXgFTqkchXpgQyPLDA/s320/lead%20frame.jpg" width="240" /></a></div><div style="text-align: center;">Lead frame of a16-pin DIP for the base for the silicon chip and pins</div><div style="text-align: left;"><br /></div><div style="text-align: left;">I changed back the dead band capacitor to 0.22uF as this servo is much quicker and have less backlash. They use metal gears with very fine pitch and a ball bearing. </div><div style="text-align: left;"><br /></div><div style="text-align: left;">The servo would only work at 50Hz and has a bit more rattling. I guess I should play around with the R2 130R values at some point.</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOfkzCMyDfKg-4E5-bmzDwH9153OR9mFs9vP5DOT95qUm6N7_Y_iibwUUBu0WY1HmQGIzVJfD4flfFiLx5y0XGF9VxFXn5Mynu79DaHr0FkcZeVHzhSYZHaQQNs2p6xquhGUbMMqzg2ID1okgGMrPWCxPOwV41rv29Sdgsa7WpyJKFv5YrN-glNhA3XQ/s781/Schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="365" data-original-width="781" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOfkzCMyDfKg-4E5-bmzDwH9153OR9mFs9vP5DOT95qUm6N7_Y_iibwUUBu0WY1HmQGIzVJfD4flfFiLx5y0XGF9VxFXn5Mynu79DaHr0FkcZeVHzhSYZHaQQNs2p6xquhGUbMMqzg2ID1okgGMrPWCxPOwV41rv29Sdgsa7WpyJKFv5YrN-glNhA3XQ/s16000/Schematic.png" /></a></div><br /><div style="text-align: center;">Schematic</div><div style="text-align: left;"><br /></div><div style="text-align: left;">I leave out the optional PNP transistors as there isn't space on the PCB. I guess I could make a small daughter card with the transistors if they are needed. I have rearranged the layout so that all the parts fit within the DIP footprint and added 2 jumpers (red).</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS-G_HG_LeaXiyID9lJamDMyx3LpEP7dVQTbWyKiqL39RTiI4bZx6Nz39FzDcy36zQVjaJl_NUeGo4X9DBktckzY3e7CPEkuIqVPiZ65Ya2u_kupJhY0rmJHWVQPoU9eL3cZn9yLGwOuy37Z3-FLDC_rwcnWMCzBcNy64o5hj4trnavp88kbHKtxbslA/s341/PCB.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="341" data-original-width="280" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS-G_HG_LeaXiyID9lJamDMyx3LpEP7dVQTbWyKiqL39RTiI4bZx6Nz39FzDcy36zQVjaJl_NUeGo4X9DBktckzY3e7CPEkuIqVPiZ65Ya2u_kupJhY0rmJHWVQPoU9eL3cZn9yLGwOuy37Z3-FLDC_rwcnWMCzBcNy64o5hj4trnavp88kbHKtxbslA/s320/PCB.png" width="263" /></a></div><div style="text-align: center;">PCB layout</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImb0oHQ3SRIqdTMYgMF3jh2KPVlDV7AIpz1F5Sl-f5fjrZFrO26Vwtx3tqUnjuYJaB_UpCQ0xkN4o6zR2VDziSrUqJZpZoH9vGWCPGGWr-HrN-NVWEIn7J99PasUCNpFiRZloKRiuBUJNz0GtaQTTi206BIt8tZP5DeI7vYBZH9LB9iqkq6cqc7DWWQ/s693/IMG_3100.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="502" data-original-width="693" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImb0oHQ3SRIqdTMYgMF3jh2KPVlDV7AIpz1F5Sl-f5fjrZFrO26Vwtx3tqUnjuYJaB_UpCQ0xkN4o6zR2VDziSrUqJZpZoH9vGWCPGGWr-HrN-NVWEIn7J99PasUCNpFiRZloKRiuBUJNz0GtaQTTi206BIt8tZP5DeI7vYBZH9LB9iqkq6cqc7DWWQ/s320/IMG_3100.JPG" width="320" /></a></div><div style="text-align: center;">Replacement PCB</div><div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9sZESqj9IlGZVS6uu5ORn9n4A6JiRS2X2safx-xZwZFz-fSg4aksvbwReUYgQFLyPRu2ChCLPLkt16RdeL9uG8UZWbh7Lze4oU_LxoFhcORfocX_7qm3_HskW8tpZHkDiFZg3dvlJaUDFijdjQcfVsG3o00Smc-rGyzAaHhoJidBRLWcDfnPSFWHeVA/s492/IMG_3101.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="447" data-original-width="492" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9sZESqj9IlGZVS6uu5ORn9n4A6JiRS2X2safx-xZwZFz-fSg4aksvbwReUYgQFLyPRu2ChCLPLkt16RdeL9uG8UZWbh7Lze4oU_LxoFhcORfocX_7qm3_HskW8tpZHkDiFZg3dvlJaUDFijdjQcfVsG3o00Smc-rGyzAaHhoJidBRLWcDfnPSFWHeVA/s320/IMG_3101.JPG" width="320" /></a></div><br /><div style="text-align: center;">PCB is mounted vertically</div><div><br /></div><div>I guess someone else could have transplant the PCB from a cheap S90, but that's a bit too boring for me.</div><div><br /></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-37984172231823420542022-01-08T19:59:00.006-05:002022-01-25T20:30:16.047-05:00 Intel heatsink mounting brackets on my AM4!<p> I bought a Zalman ENPS10X Optima tower heatsink for my old FM1 a long while ago. It was overkill, but I bought it at a discount. AMD changed the mechanical spec for AM4 socket, so it couldn't be used.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjcg9jLtjGnylScCBWNucsOwGZa6by1FW8bXTGJKBRIAdL0fBifbHLS1b8y_JAw0kNyPSfBByaEwF2xSgDITyZ7S7Z8P8bdPVZUr-TAHJt2knXtOGzmVezh3gagChBufQs8uHeZwigqj5Aq3i5zI_786crfMLhn5OHsFhYZf7RfQd0R39dALETEsC4FbQ=s720" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="474" data-original-width="720" height="422" src="https://blogger.googleusercontent.com/img/a/AVvXsEjcg9jLtjGnylScCBWNucsOwGZa6by1FW8bXTGJKBRIAdL0fBifbHLS1b8y_JAw0kNyPSfBByaEwF2xSgDITyZ7S7Z8P8bdPVZUr-TAHJt2knXtOGzmVezh3gagChBufQs8uHeZwigqj5Aq3i5zI_786crfMLhn5OHsFhYZf7RfQd0R39dALETEsC4FbQ=w640-h422" width="640" /></a></div><div style="text-align: center;">AM4 vs FM1/FM2/AM3</div><div style="text-align: center;"><br /></div><div><div class="separator" style="clear: both; text-align: center;"><br /><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjsbBw_OFKl_Vy6Ne21lR0gUZne1GY6D8vcORGEAS8xuaozPhsFaqxT0LzvWCgF4D06PgmhQ1tbHZgwHcikfCtyGkN3Ad1PUbhL-H8GBpdehEx0_wjIfLVKAiZdb87881TZty8ip7qB3CCHCksRof5zJGAeujwkZX0mj4Qo8rV_z3Zw7s668vOJsvmepA=s550" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="343" data-original-width="550" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEjsbBw_OFKl_Vy6Ne21lR0gUZne1GY6D8vcORGEAS8xuaozPhsFaqxT0LzvWCgF4D06PgmhQ1tbHZgwHcikfCtyGkN3Ad1PUbhL-H8GBpdehEx0_wjIfLVKAiZdb87881TZty8ip7qB3CCHCksRof5zJGAeujwkZX0mj4Qo8rV_z3Zw7s668vOJsvmepA=w640-h400" width="640" /></a></div><div style="text-align: center;">Mounting kit for my old heatsink</div><p>Zalman updated the rev. 2 of the heatsink by changing the backplate and the 2 pieces of springs for the AM4 with both sets of mounting holes. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEi6zk5x-uLdCLnitQ42i7U6PdKX8b9NuwfijYpRCcGXoT0Lb08S50zGswu9xNuCPPtyOCSfCGs02S4oel3gOl09LUWWnOMEYMg3zRr4SLwD14ksjtvv09L1nvCgilHawlmHo_SC92Vwd2JhYoGBKbSQHFo7Pyp5yJGSWfL79FAF4cP9e_lUOJOcFAS5Ug=s833" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="201" data-original-width="833" height="154" src="https://blogger.googleusercontent.com/img/a/AVvXsEi6zk5x-uLdCLnitQ42i7U6PdKX8b9NuwfijYpRCcGXoT0Lb08S50zGswu9xNuCPPtyOCSfCGs02S4oel3gOl09LUWWnOMEYMg3zRr4SLwD14ksjtvv09L1nvCgilHawlmHo_SC92Vwd2JhYoGBKbSQHFo7Pyp5yJGSWfL79FAF4cP9e_lUOJOcFAS5Ug=w640-h154" width="640" /></a></div><div style="text-align: center;">New heatsink mounting kit</div><p>They offer an AM4 upgrade kit for some of their other heatsinks for $11, but not my old model. That's 1/2 the price of what I paid for and I'll be taking a gamble. The old springs are too narrow. I'll have a very hard time trying to drill it without good carbine drill bits and a drill press. I am using the Intel mounting kit as it leaves just the right amount of space for the extra screws holes.</p><p>I placed the heatsink on top of the AMD Wraith Spire. It turns out that the fan mounting hole lines up with the Intel 775 mounting holes. I took advantage of that for my alignments.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiPbRkfm7UwHHS_-azNt5aKlWOZirTSt7arEVcwA9n7U74XZ0d0VCwXj3oL-VEWkZSgn-0ppiVjVdDF8pNPDqaT15ROyG8lKpBomlssBvME-bqw5-paY9VBdJVmOWy3FbDETW2EpLGwkA3hK_v6POcBP64viaQhcDcEEvF3SxCFNunpNF3OUEkYYS5PIA=s832" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="491" data-original-width="832" height="378" src="https://blogger.googleusercontent.com/img/a/AVvXsEiPbRkfm7UwHHS_-azNt5aKlWOZirTSt7arEVcwA9n7U74XZ0d0VCwXj3oL-VEWkZSgn-0ppiVjVdDF8pNPDqaT15ROyG8lKpBomlssBvME-bqw5-paY9VBdJVmOWy3FbDETW2EpLGwkA3hK_v6POcBP64viaQhcDcEEvF3SxCFNunpNF3OUEkYYS5PIA=w640-h378" width="640" /></a></div><div style="text-align: center;">Zalman heatsink (with Intel mounting kit) on top of Wraith Spire</div><p>I use some scrap piece of "stiffener" 0.06" thick plated mild steel from a server card to make my adapter. I measured off 54mm spacing for the backplate mounting hole. The hole sizes are 9/64" and all the screws for this project are 6-32.</p><p>I use cooking oil as cutting oil for drilling. Once that's done, I lined it up to my set up and mark off the mounting holes for the springs. I used the first mounting bracket as a template for the second piece.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiYATa7g8A9agblEL5ZOxbSeet8FIXez3Q6g9kQwp7ozgQQd5csLFOHlNk0Ul5_sWK-Dh11htDKsHgDvR9S5S_t23mgm739BSLdcoMBPDk8C3qaQT9Zplb4f9zXPuyyH5Q3P4tEYdiJsTPG4uLemki4KMD7GTG3SOwUAALpE6fWNbKKdCcdYkM-5zCiYA=s640" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="640" height="426" src="https://blogger.googleusercontent.com/img/a/AVvXsEiYATa7g8A9agblEL5ZOxbSeet8FIXez3Q6g9kQwp7ozgQQd5csLFOHlNk0Ul5_sWK-Dh11htDKsHgDvR9S5S_t23mgm739BSLdcoMBPDk8C3qaQT9Zplb4f9zXPuyyH5Q3P4tEYdiJsTPG4uLemki4KMD7GTG3SOwUAALpE6fWNbKKdCcdYkM-5zCiYA=w640-h426" width="640" /></a></div><div style="text-align: center;">My mounting bracket</div><p>I got a bit head of myself without thinking about how to equalize the spring tensions of the four corners. The original screws (metric) have short threads. I only have the full thread screws. I made a wild guess and used some #8 nuts as thick washers that acts as a stop.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhAn0MYgrV9oj5jJuOYP7uhsOaV-jkK59sNBR190URXpBF0eiqppxSzJn-Vn-mPOxzFzP2_LcFmsJjPuWeuZ43esCIewIeMJD3G5B70iRfzu2HOw2r0G_OIBRXgDubgvj-i9327UJOFWsb8MSkOA664OjKKJU1-ATbq0B0muTiyDpsyvKd6CNNWGWaM7A=s680" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="546" data-original-width="680" height="514" src="https://blogger.googleusercontent.com/img/a/AVvXsEhAn0MYgrV9oj5jJuOYP7uhsOaV-jkK59sNBR190URXpBF0eiqppxSzJn-Vn-mPOxzFzP2_LcFmsJjPuWeuZ43esCIewIeMJD3G5B70iRfzu2HOw2r0G_OIBRXgDubgvj-i9327UJOFWsb8MSkOA664OjKKJU1-ATbq0B0muTiyDpsyvKd6CNNWGWaM7A=w640-h514" width="640" /></a></div><div style="text-align: center;">Bottom view of the finished bracket</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgvZMeTRwCwNRRxd_98oh3iT7KYgcVoqqVc6ut7BWaeick9e0RUjjEGw5-i8J7kfou5u_c2m3fZvyM6So07zUheOSAVeH-Kx_QmyeU5UVVv5cgoQjsaCQiJveYMkWm4IAyZCiisgwnGkrCNb2sgWJBG1Ghai_Bd5L4v7DeDk7caJPf1koNBwfHyNuAIhQ=s922" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgvZMeTRwCwNRRxd_98oh3iT7KYgcVoqqVc6ut7BWaeick9e0RUjjEGw5-i8J7kfou5u_c2m3fZvyM6So07zUheOSAVeH-Kx_QmyeU5UVVv5cgoQjsaCQiJveYMkWm4IAyZCiisgwnGkrCNb2sgWJBG1Ghai_Bd5L4v7DeDk7caJPf1koNBwfHyNuAIhQ=w640-h480" width="640" /></a></div><div style="text-align: center;">Heatsink mounted using the backplate that came with the motherboard.</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEipRB-7HzUdF4X6b7-8byhx-lLULIWiUoEJDVMdsDGDUZ9EnHgSL0mjbPd0e2NI0Jh2JJVutnNZXBoyrJdwe_-OdAbDVrzdeYoA2nmWpmsUD9atK0YHdkK1Zbu7A63okDxuSBiGCE5B8FWipbFEWRSqkdaq3m0MZ2gNoXcqaj7XJhoGao-2Jwdi7u7EOw=s726" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="726" height="358" src="https://blogger.googleusercontent.com/img/a/AVvXsEipRB-7HzUdF4X6b7-8byhx-lLULIWiUoEJDVMdsDGDUZ9EnHgSL0mjbPd0e2NI0Jh2JJVutnNZXBoyrJdwe_-OdAbDVrzdeYoA2nmWpmsUD9atK0YHdkK1Zbu7A63okDxuSBiGCE5B8FWipbFEWRSqkdaq3m0MZ2gNoXcqaj7XJhoGao-2Jwdi7u7EOw=w640-h358" width="640" /></a></div><div style="text-align: center;">The heatsink fits</div><p>How well does it works? I ran P95 for stress testing the set up with a 3.7GHz Overclock and 1.275V undervoltage. The CPU junction temperature is at 75.3C with CPU at around 131W when all fans are running at 100%. This is actually slightly better than the other heatsink I was using before for the same PC.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjhNL06fQWXT-J7xs4Hh9qk8ELsrkvRtwyAbw4sCB1i5EO2yee-Hsw_-Gdkx8Idy8_ivD5uZ2L9rgdMZOwmGKGA3AGTEPVIvvb7ASd63AUDgCGVs7Wi1IZ6SxfU8Fz-Z0OyKkB2Abyk2LR4oE44n7KihyeBPavIbFqPyMiBE0CRSOZ8uZragMyLtJ2TbQ=s1083" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="524" data-original-width="1083" src="https://blogger.googleusercontent.com/img/a/AVvXsEjhNL06fQWXT-J7xs4Hh9qk8ELsrkvRtwyAbw4sCB1i5EO2yee-Hsw_-Gdkx8Idy8_ivD5uZ2L9rgdMZOwmGKGA3AGTEPVIvvb7ASd63AUDgCGVs7Wi1IZ6SxfU8Fz-Z0OyKkB2Abyk2LR4oE44n7KihyeBPavIbFqPyMiBE0CRSOZ8uZragMyLtJ2TbQ=s16000" /></a></div><div style="text-align: center;">Thermal result on my Ryzen 1700</div><p>I decided to swap the old heatsink back and use this heatsink with my Ryzen 5800X PC. I did some minor clean up to replace the screws with pop rivets to make more height clearance for the motherboard components. This time I super glued the 4 nuts/spacers in place. I also have to trim off the top left bracket as it was running a bit too close to the VRM capacitors on my new motherboard (not shown).</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEglMue7pZiELAY4jZOhocCDS-ymBK0AwZIaqyoaUJ7Zn0zHDspXz8cTkWXuOxZ51zsLYUxKnByBq9WiHSnNrJ5_EgvBhCCYuysss92EVWJrYBCqiKeFh3WR0udifmo2rJnws1rWCD9zWHwCns2wEZW5pNVWHurTg1eSfNXAMwz14jsgsBER7XllbbgtdA=s619" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="540" data-original-width="619" height="558" src="https://blogger.googleusercontent.com/img/a/AVvXsEglMue7pZiELAY4jZOhocCDS-ymBK0AwZIaqyoaUJ7Zn0zHDspXz8cTkWXuOxZ51zsLYUxKnByBq9WiHSnNrJ5_EgvBhCCYuysss92EVWJrYBCqiKeFh3WR0udifmo2rJnws1rWCD9zWHwCns2wEZW5pNVWHurTg1eSfNXAMwz14jsgsBER7XllbbgtdA=w640-h558" width="640" /></a></div><div style="text-align: center;">Heatsink bracket with some minor clean up.</div><p>I ran Cinebench as a way to warm up the thermal paste before removing old heatsink. I used a 2 fans push-pill configuration trying to get the 5800X thermal under control.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhylm9K9sCF1pHnYvYr-wCF8oUr-QqGy90gqIVIHVRQLhAehs88g4SSsVf5TfRcrf5HUYeU-dBunHliYjoDfHC7RqbZT41ItksMqjEr_55O6ktHZymGRxRh5touitN7NKRHrznGL1cz4hqcfsjQAHJTjxpWqB6ZQlMwokEGrDxDORvx7OlGoTcrXR6RLQ=s1092" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="841" data-original-width="1092" height="492" src="https://blogger.googleusercontent.com/img/a/AVvXsEhylm9K9sCF1pHnYvYr-wCF8oUr-QqGy90gqIVIHVRQLhAehs88g4SSsVf5TfRcrf5HUYeU-dBunHliYjoDfHC7RqbZT41ItksMqjEr_55O6ktHZymGRxRh5touitN7NKRHrznGL1cz4hqcfsjQAHJTjxpWqB6ZQlMwokEGrDxDORvx7OlGoTcrXR6RLQ=w640-h492" width="640" /></a></div><div style="text-align: center;">The Before picture with the old heatsink (Thermaltake Contac Silent 12)</div><p>Here is the same test again with this heatsink also in a push-pull configuration.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiJwKaQlbzO5kaeVSP4p07R99eptdCNJf-c5xwkpZtevPTp_d3zHmir0fMZeuBV6U04TmzKetz6_eZwcq1P8gLSkqsp7BLq1YMAyuouleHXDOv7dq8I105AV3iz0wb6IZ0P_jHysqhQGuCuNtE_zmFe3JeCOMoLUN_8Az2tS5hfUqmlRvSVmSnIKoRNZw=s1032" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="789" data-original-width="1032" height="490" src="https://blogger.googleusercontent.com/img/a/AVvXsEiJwKaQlbzO5kaeVSP4p07R99eptdCNJf-c5xwkpZtevPTp_d3zHmir0fMZeuBV6U04TmzKetz6_eZwcq1P8gLSkqsp7BLq1YMAyuouleHXDOv7dq8I105AV3iz0wb6IZ0P_jHysqhQGuCuNtE_zmFe3JeCOMoLUN_8Az2tS5hfUqmlRvSVmSnIKoRNZw=w640-h490" width="640" /></a></div><div style="text-align: center;">The After thermal with this heatsink (<span style="text-align: left;">Zalman</span><span style="text-align: left;"> </span><span style="text-align: left;">ENPS10X Optima)</span>.</div><p>The Zalman is about 2.3C cooler and has a slight higher Cinebench R23 score (15225 vs 15133) as it has a slight higher (thermal throttle) frequency limit (4480MHz vs 4475MHz).</p><p>Thermaltake probably sourced a commodity heatsink that have the cutouts that supports a rotated orientation not used here. The bottom part (5mm or so) of the fan is not fully covered by the heatsink allowing for some airflow under the heatsink. For some reasons, they added fins on the baseplate perpendicular (instead of parallel) to the airflow. This messed up the airflow and collects dust. They also did not include a pair of clips for adding a second fan.</p><p>Zalman fan has a higher top RPM and interesting enough they didn't mill the heatpipe flush with the rest of the aluminium baseplate. The top part of their baseplate is smooth. This would probably help cool the short VRM heatsink down stream.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjY8M00EXVqB3nKeNJTUcdJfu9hGplBhQ3GW-bF0PbH07EjkExOBfvD8ML9AW7ZazMTnNWUrdAU8WXxSvnNR5V1GGuvpiGXiklfonmpFordPNnoUQIsXk0ZbhKf3vFLDOO6giNQqOtM_6y4j4C_gCrK6Qqxhcsbozllgz3Yk5gMD7K09p4bJjnvf7W2hw=s459" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="435" data-original-width="459" src="https://blogger.googleusercontent.com/img/a/AVvXsEjY8M00EXVqB3nKeNJTUcdJfu9hGplBhQ3GW-bF0PbH07EjkExOBfvD8ML9AW7ZazMTnNWUrdAU8WXxSvnNR5V1GGuvpiGXiklfonmpFordPNnoUQIsXk0ZbhKf3vFLDOO6giNQqOtM_6y4j4C_gCrK6Qqxhcsbozllgz3Yk5gMD7K09p4bJjnvf7W2hw=s16000" /></a></div><div style="text-align: center;">Thermaltake heatsink side view. Blue arrow show air flow from fan below the heatsink.</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhCf669ocJuPpWveXfDOZCYxsW57rRpizxvsxLSUQqdMsreYZKBmR2I6prJ3Ol1ytAYPp-qGN6Q8sbq8lEOKFgvs19bPtbNj-9RRuCcPKs_D1P4dTNNmY-bgXEOaIohESaCU28O5uBU8RfF6Hy8t46vcALIXb_lhdJiXrMEwD3pK6ZPY_09enhqSFFYlQ=s922" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEhCf669ocJuPpWveXfDOZCYxsW57rRpizxvsxLSUQqdMsreYZKBmR2I6prJ3Ol1ytAYPp-qGN6Q8sbq8lEOKFgvs19bPtbNj-9RRuCcPKs_D1P4dTNNmY-bgXEOaIohESaCU28O5uBU8RfF6Hy8t46vcALIXb_lhdJiXrMEwD3pK6ZPY_09enhqSFFYlQ=w640-h480" width="640" /></a></div><div style="text-align: center;">The Zalman in my Ryzen 5800X PC.</div><div style="text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgIIInZimnRO9nHXdEq3BkJP0rYZQTpvWAFllqikBUaJwGhDyWyFQlRH6wjlYEEy2jLVxBwiTJKxN9vVuyMf9WdsnK_3bJAA6HwWUfwBF0R8fEgGyH_GtiQetthwDWFzkLGDhsU_h9ulo9Mz7qUNek3j15RG2IbQ9gnSuxZVY53DeqlZ2sHLVg6Zv6QTw=s1300" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="724" data-original-width="1300" height="356" src="https://blogger.googleusercontent.com/img/a/AVvXsEgIIInZimnRO9nHXdEq3BkJP0rYZQTpvWAFllqikBUaJwGhDyWyFQlRH6wjlYEEy2jLVxBwiTJKxN9vVuyMf9WdsnK_3bJAA6HwWUfwBF0R8fEgGyH_GtiQetthwDWFzkLGDhsU_h9ulo9Mz7qUNek3j15RG2IbQ9gnSuxZVY53DeqlZ2sHLVg6Zv6QTw=w640-h356" width="640" /></a></div><div style="text-align: center;">P95 stress test at Package Power = 100W</div><p><br /></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-17296126180915993672021-12-23T18:45:00.011-05:002021-12-29T15:58:39.733-05:00Flashlight 3xAAA replacement<p style="text-align: left;">​I got a flashlight as the first ever kind gesture from my apartment management for the most recent schedule 24+hours maintenance power shutoff. It has a very nice reflector for a square LED and a smaller chip inside that controls the 3 operating modes. </p><p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEguf89nTWFrK5WexGRSxtmqDiRTZLh3_bhfAT8-BZmjjHBUQFFHw65MeG2vSftqX3CCHWECIwx_QqFtWTW9_uBtZEYPShQqcAUAOtV_CuCZtg5E8yUKnvQqYv3cNQzKoeVg9G0hy4V3OzhoaVKA1ujOd6Ej54Xiq8XoyU5bZApxrtrX_Qtf8e0g61LqEA=s4165" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1249" data-original-width="4165" height="192" src="https://blogger.googleusercontent.com/img/a/AVvXsEguf89nTWFrK5WexGRSxtmqDiRTZLh3_bhfAT8-BZmjjHBUQFFHw65MeG2vSftqX3CCHWECIwx_QqFtWTW9_uBtZEYPShQqcAUAOtV_CuCZtg5E8yUKnvQqYv3cNQzKoeVg9G0hy4V3OzhoaVKA1ujOd6Ej54Xiq8XoyU5bZApxrtrX_Qtf8e0g61LqEA=w640-h192" width="640" /></a></p><p>Off course I had to open it up right away. It uses 3AAA on the usual battery holders for cheap flashlights. I smell trouble or an opportunity for some corrective active. I am not fond of using odd numbers of AAA batteries as I have been using rechargeable since NiCd days. I don't know if they use a constant current driver, so could be trouble for 3 fully charged NiMH (1.4V x 3 = 4.2V) with low internal resistance.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjtMeH29jRQdo69flGhIkdgQutL8GUpWwzEzDB-R580YmW4hxGqZItlW-fEgk9e-NORn-n-X8nWEinUc8tNjK52m64OGHeiQyeyeobnIbEzt89UtHUOqNxgMxbiaoNVcbtkrc_ivPjNjHYpxSjC5DpO-0ProXTgMEqYTG8NSs8Zvw5275qGQamnayoLLA=s675" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="642" data-original-width="675" height="608" src="https://blogger.googleusercontent.com/img/a/AVvXsEjtMeH29jRQdo69flGhIkdgQutL8GUpWwzEzDB-R580YmW4hxGqZItlW-fEgk9e-NORn-n-X8nWEinUc8tNjK52m64OGHeiQyeyeobnIbEzt89UtHUOqNxgMxbiaoNVcbtkrc_ivPjNjHYpxSjC5DpO-0ProXTgMEqYTG8NSs8Zvw5275qGQamnayoLLA=w640-h608" width="640" /></a></div><p>I used the parts from a 5V booster board I bought from the usual places, but modified the feedback divider for 3V which is just bright enough to drive LED, but low enough to not go into thermal run away.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgWcz2xf7--u2R3gpTYus6OpyKibv1eyrixmCAu4tw8v912VZsvsVdi1Tk2hbzHb6Qegi5Ahyf9ROEP6RUASS9SVBQyWkuqYvllNYcPcmt7Ljzqgvh_1QLt1mBC-yoMih4WNUoofcs4yUt8KZKY84qtQjZu2sTHzF8sGvc8DY9zqT6hWCIPZMf3Ulmbzw=s632" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="632" src="https://blogger.googleusercontent.com/img/a/AVvXsEgWcz2xf7--u2R3gpTYus6OpyKibv1eyrixmCAu4tw8v912VZsvsVdi1Tk2hbzHb6Qegi5Ahyf9ROEP6RUASS9SVBQyWkuqYvllNYcPcmt7Ljzqgvh_1QLt1mBC-yoMih4WNUoofcs4yUt8KZKY84qtQjZu2sTHzF8sGvc8DY9zqT6hWCIPZMf3Ulmbzw=s16000" /></a></div><div style="text-align: center;">U1 has the same pin out as the unknown part used on the board.</div><p>As my replacement board has 3 contacts - 3V and 2 GND, I had to move the battery off centered to avoid shorting the 3V output to the front of the PCB. </p><p>I used easily soldered and bent metal strips to form a battery guide and the hinged -ve terminal. They are used to crimp the end of plastic mesh for store bought onions and garlic. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjx_SwQliE6dTYXlOFOTcTfJvgIN_JRUHLpumbdakDBirPgKVuyKfG0pda4J4TD0OWq8Y5DKmBQVBcU1PwuItn35ECn13VLNJKSMI5ykUo1OKkq_q-a8Osq_y9WBbT0tUvfs_w4CuoEf1YHypyfpSuQY-sp9OohbNImtFWDsDWmexyoYQK4OdZxYEd3zA=s443" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="443" data-original-width="368" src="https://blogger.googleusercontent.com/img/a/AVvXsEjx_SwQliE6dTYXlOFOTcTfJvgIN_JRUHLpumbdakDBirPgKVuyKfG0pda4J4TD0OWq8Y5DKmBQVBcU1PwuItn35ECn13VLNJKSMI5ykUo1OKkq_q-a8Osq_y9WBbT0tUvfs_w4CuoEf1YHypyfpSuQY-sp9OohbNImtFWDsDWmexyoYQK4OdZxYEd3zA=s16000" /></a></div><p>My battery terminal help to make better connection between the offset battery and the spring loaded terminal the of the flashlight cap to the right side of the picture below.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgNs6b540rWoarCT7B9zyK7fzbKhqDtJMw2d57rVPqYPmhgq1Kr6z0AzQoirsVo28ve6nLEe-cnDUaI_0bD7fd0mRQrKxqxFOcC62tZF-FqnVh3ZgmS0ktdrKZeFWn6Kz4Gi0w2FRy37rjvPNCqcWCE8jNOf33scHNaIyKEeAINuVeqFx0Be2PCOFGZ6Q=s510" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="426" data-original-width="510" height="534" src="https://blogger.googleusercontent.com/img/a/AVvXsEgNs6b540rWoarCT7B9zyK7fzbKhqDtJMw2d57rVPqYPmhgq1Kr6z0AzQoirsVo28ve6nLEe-cnDUaI_0bD7fd0mRQrKxqxFOcC62tZF-FqnVh3ZgmS0ktdrKZeFWn6Kz4Gi0w2FRy37rjvPNCqcWCE8jNOf33scHNaIyKEeAINuVeqFx0Be2PCOFGZ6Q=w640-h534" width="640" /></a></div><br /><p>It also acts as a pull tab for the PCB assembly when it is time for replacing battery.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg4pZfWfSVCJ3V9S5dmEQDwVOiep_Zalj7son1dPJvqx7yKPEhIu16oXGLzFQXjYbWqKIn5CelHoMsksDG_D_MUsVR1LNoK9JeZmByZNZvukGXeiwh1ZmpbbcqSxY5TA9rOfzfDHi1xi19BJlGY4UUh6AsXkr8gbNRLOgLaCYipsFNuU9mH55D9yMYaFg=s565" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="565" height="456" src="https://blogger.googleusercontent.com/img/a/AVvXsEg4pZfWfSVCJ3V9S5dmEQDwVOiep_Zalj7son1dPJvqx7yKPEhIu16oXGLzFQXjYbWqKIn5CelHoMsksDG_D_MUsVR1LNoK9JeZmByZNZvukGXeiwh1ZmpbbcqSxY5TA9rOfzfDHi1xi19BJlGY4UUh6AsXkr8gbNRLOgLaCYipsFNuU9mH55D9yMYaFg=w640-h456" width="640" /></a></div><br /><h4 style="text-align: left;">Attack of the blinking dimming flashlight</h4><div>I would never have thought that the blinking dimming light movie tropes is being kept alive by poorly made flashlight clicky switches.</div><div><br /></div><div>I managed to extract the mechanism that was pressed fitted into the end cap of the flashlight. They use some iron strips as part of the contact. There are 2 such contacts in series and they gets even worse as I use the switch for the boost supply with about 3X currents.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgjNfjC1Ea6x43HJQWwibVf2OKPFiRGp31dS3nVBlviI3dFlhhezbjAmvtag9hOZ0bCKvxYq5ZEWW_eRZPPMayHyoGBjz5u_p4EkwtmwoEFHnl8nQ7srNmZ3z7ZA8GTwhGZDkld7fbKnTonZI4V0ir5aZhUPTraSY6o2Bc1j1Qe4t_hwL5DO6xpq6_A8A=s922" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEgjNfjC1Ea6x43HJQWwibVf2OKPFiRGp31dS3nVBlviI3dFlhhezbjAmvtag9hOZ0bCKvxYq5ZEWW_eRZPPMayHyoGBjz5u_p4EkwtmwoEFHnl8nQ7srNmZ3z7ZA8GTwhGZDkld7fbKnTonZI4V0ir5aZhUPTraSY6o2Bc1j1Qe4t_hwL5DO6xpq6_A8A=w640-h480" width="640" /></a></div><br /><div>I cut2 pieces of gold plated (15um) pin from a 2mm connector.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjfmUTTRcW-5C1nXTu33fjPYsq93YD7QC2uWZC80JtgPKtwM0Vdthf0-a9H3F1xa59GFKZocJpugBfa8AA__RnE8WRJFgPeGaurlzgs5cYYGtZJSwo8rog3YScU9kl4hLkke7_nfbJfCKnNZjz4Zv1bJBMZlJ4jkBcoPu-YUKKd6niJPEB55l9S5wjTrw=s304" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="293" data-original-width="304" height="293" src="https://blogger.googleusercontent.com/img/a/AVvXsEjfmUTTRcW-5C1nXTu33fjPYsq93YD7QC2uWZC80JtgPKtwM0Vdthf0-a9H3F1xa59GFKZocJpugBfa8AA__RnE8WRJFgPeGaurlzgs5cYYGtZJSwo8rog3YScU9kl4hLkke7_nfbJfCKnNZjz4Zv1bJBMZlJ4jkBcoPu-YUKKd6niJPEB55l9S5wjTrw" width="304" /></a></div><div><br /></div>I soldered them onto the contacts. The contacts needed to be bent flat as the pins adds extra thickness.<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgO5O6gPO2dL-mnxYw3BxE_ifo1Jvp1iq6MtsJEvP81mTTgt_dnqN22tSMno3kuI0y2zd8YzXIasXYlBQ7XczLFhQ7OgE7AdWh55uHblxQ0dqANGW9QfgoCjwcW8irz19hAv7hPalcNzOqvb_Gkj2mBEyy6C3X19gIV5IskOgeWLBzoBZj_wwRQcVVjfg=s254" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="162" data-original-width="254" height="162" src="https://blogger.googleusercontent.com/img/a/AVvXsEgO5O6gPO2dL-mnxYw3BxE_ifo1Jvp1iq6MtsJEvP81mTTgt_dnqN22tSMno3kuI0y2zd8YzXIasXYlBQ7XczLFhQ7OgE7AdWh55uHblxQ0dqANGW9QfgoCjwcW8irz19hAv7hPalcNzOqvb_Gkj2mBEyy6C3X19gIV5IskOgeWLBzoBZj_wwRQcVVjfg" width="254" /></a></div><div><br /></div><div>There is a metal piece that looks like a top in the previous picture. I had to bent the circular part down to make more clearance for the pins. I reassembled the switch and soldered a short piece of bare stranded wires. This wire helps to make better contact to the side wall of the end cap.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjgJPSUBhKtv_PDb-S4avLftJLszNhLyjF_tMQ-qOW5O3F9s8GoqU1yWdXpEV_jI_KWP_pZfW1bINwRI5M0rc7lgg0hFKmAVL3eCNx8Ur2g_0O-LpvGx-yy-hUyKRdyA_gn-aFf7rX9zEmxdR1Pykb3A1BVvc2dgopgJ9ULuFxK54A0Zhp2mGSU_n_zjg=s349" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="313" data-original-width="349" src="https://blogger.googleusercontent.com/img/a/AVvXsEjgJPSUBhKtv_PDb-S4avLftJLszNhLyjF_tMQ-qOW5O3F9s8GoqU1yWdXpEV_jI_KWP_pZfW1bINwRI5M0rc7lgg0hFKmAVL3eCNx8Ur2g_0O-LpvGx-yy-hUyKRdyA_gn-aFf7rX9zEmxdR1Pykb3A1BVvc2dgopgJ9ULuFxK54A0Zhp2mGSU_n_zjg=s16000" /></a></div><br /><div>Unfortunately the plastic they used is too soft and I do not have the right jig to press it back in place. If there were a time I wish I had a 3D printer, this would be it.</div><div><br /></div><div>Anyways this fix got rid of the flimsy flickers and the light a lot brighter.</div><div><br /></div><div><br /><div><br /></div></div></div><div><br /></div><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-74764881967035442482021-12-23T10:19:00.002-05:002021-12-23T18:46:38.275-05:00 DIY Amplifier collection<p>Here are some of my DIY amplifier collections:</p><p>I built one of these back in my school days out of a pair of TI/National Semiconductor's Class A-B LM1875 20-W Audio Power Amplifier. Build straight out of their application circuits. I mounted in 2 of these amplifier into a 60W heatsink.</p><p>I recapped, cleaned up the layout and mounted it with a Transformer (33V CT 1A), rectifiers (200V/3A) and filter caps (1000uF x 4) onto a piece of board from a clementine box. It served as my TV/Computer amplifier for about a year.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgKqUdameO1948YHzz_Gbd6Y0iqYcaVgeaxlXQqs6Ua2e9Dnt3UNR2HhPZ1U_oip4jQut-faYLr_kbMrdWNPoev48Keb7JD_lccSeEVz9HGlqfHU9iPl6_YU718Wylj4fdob6J16AcW612b4S6Rp2KG-ULHl2eZNm4k5186PlZ-wwJWTyENwZpG8ytkSw=s878" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="482" data-original-width="878" height="352" src="https://blogger.googleusercontent.com/img/a/AVvXsEgKqUdameO1948YHzz_Gbd6Y0iqYcaVgeaxlXQqs6Ua2e9Dnt3UNR2HhPZ1U_oip4jQut-faYLr_kbMrdWNPoev48Keb7JD_lccSeEVz9HGlqfHU9iPl6_YU718Wylj4fdob6J16AcW612b4S6Rp2KG-ULHl2eZNm4k5186PlZ-wwJWTyENwZpG8ytkSw=w640-h352" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhXCv0AYyNrhzWP0gVgOM45i-aP3TcvagVIoiC3MrrXfNBzffKDHhka6Nq63lv8A_J54eDPNf3n4E-lJcEpKRbZJt50_AY3ajenjsPXsWjzsiJ_02j37l_5YgNMg6lLzCvt-2s6y-L9KUMFDjweyN4SYnQoscFtJx7hF-dfobD2maDIhGvy_kTojr9lzw=s916" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="416" data-original-width="916" height="290" src="https://blogger.googleusercontent.com/img/a/AVvXsEhXCv0AYyNrhzWP0gVgOM45i-aP3TcvagVIoiC3MrrXfNBzffKDHhka6Nq63lv8A_J54eDPNf3n4E-lJcEpKRbZJt50_AY3ajenjsPXsWjzsiJ_02j37l_5YgNMg6lLzCvt-2s6y-L9KUMFDjweyN4SYnQoscFtJx7hF-dfobD2maDIhGvy_kTojr9lzw=w640-h290" width="640" /></a></div><br /><p></p><p style="clear: both; text-align: left;">It was from the days of good old analog design with honest specs. Note their 20W is at the lowest THD. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiUQrOjE2v2vRzIOWz1xLj0CkihZmYSgFEakLikIQVSxcjgIxBplwE9KvgQEtcrMfUOGQniG1H3iiZGFj9_0U8Q2gotEAwayFuztXcDo1NjRRt3Xzn7YNXTgfTMwj3W1KuWtAR2uJLVcfY2D2fqYxPBri47Zyue9cUszeB4FztlUo-XUytHeDlLFTfjwg=s716" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="397" data-original-width="716" src="https://blogger.googleusercontent.com/img/a/AVvXsEiUQrOjE2v2vRzIOWz1xLj0CkihZmYSgFEakLikIQVSxcjgIxBplwE9KvgQEtcrMfUOGQniG1H3iiZGFj9_0U8Q2gotEAwayFuztXcDo1NjRRt3Xzn7YNXTgfTMwj3W1KuWtAR2uJLVcfY2D2fqYxPBri47Zyue9cUszeB4FztlUo-XUytHeDlLFTfjwg=s16000" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>They have excellent PSSR (Power Supply Rejection Ratio) around 95dB at 120Hz. I can simply run it off a full wave rectifier from a transformer. They aren't too efficient, so my choice of 60W heatsink was appropriate for continuous operation of 2 amplifier at full power.<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhj6Vgv6fx0oH2sFFCxr_UYICdzneebPf5o8RIbmPz7qvHQ3YP07wi2VM4OzviXqln7UheJ8QzbiuAt0jBdqpRi7StZDZODib4E51BeFHf5K64El2XdIkD-3eBvSsgMdCf_O5M93EIHNdNUgGErG_qVK8HKzyEgWdIRoRWxBqB0O1kVdNipP94ewrkFRw=s588" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="289" data-original-width="588" src="https://blogger.googleusercontent.com/img/a/AVvXsEhj6Vgv6fx0oH2sFFCxr_UYICdzneebPf5o8RIbmPz7qvHQ3YP07wi2VM4OzviXqln7UheJ8QzbiuAt0jBdqpRi7StZDZODib4E51BeFHf5K64El2XdIkD-3eBvSsgMdCf_O5M93EIHNdNUgGErG_qVK8HKzyEgWdIRoRWxBqB0O1kVdNipP94ewrkFRw=s16000" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><p>I later built a few of the 60W module out of a pair of TI/National Semiconductor LM3886 68W Class-AB amplifier. (I didn't have a LC meter, so the inductance value on that coil as way too low.)</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEio7LcgrVJW-CeggHULs5wN2Yf0hDLKSVj9pZIS7HHXt-VBLN6Iz7-C1-ojwmk6YFPYY7DgGr7FRwNJfpRG_O2eJQDEmnISXXPmGrLoAjz9jb1bqHylsG0pUw0OeUmfEtS2SXqqbEz1xPgK16vTcPwXf2glRk-0u2lrR2M3iMBaJEbOfoXmQ8h1GJUhDA=s649" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="615" data-original-width="649" height="379" src="https://blogger.googleusercontent.com/img/a/AVvXsEio7LcgrVJW-CeggHULs5wN2Yf0hDLKSVj9pZIS7HHXt-VBLN6Iz7-C1-ojwmk6YFPYY7DgGr7FRwNJfpRG_O2eJQDEmnISXXPmGrLoAjz9jb1bqHylsG0pUw0OeUmfEtS2SXqqbEz1xPgK16vTcPwXf2glRk-0u2lrR2M3iMBaJEbOfoXmQ8h1GJUhDA=w400-h379" width="400" /></a></div><br /><p>Sadly at that point I gave into craze and bought myself a surround sound receiver. I sworn to rip out and replace the "discrete" amplifier at the expiration date of the warranty, but didn't follow through.</p><p>They are probably one of the better if not the best chip amplifier that a lot of the DIY amplifiers designs are based on.</p><p>However you would want to use 4ohms speakers to take advantage for the full rated power at low distortion. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjIgdsbFq2XAGJsPVH2mghwZE8wDXYDc6fiaw5IAYx2KxRMAtv5aRFrfGGfQ0f9c4kyAVe7TrcA0rsAoYGiIvuKBg1EMaZfwWVu15ioaqcU-FLfj1BS72Y66wQTR3nej4ourWkP6KTvp2QMx7PgRUWUj9GPCdY8eALhpmXUaGFHxnfHSsd7CD0PqTxaNg=s594" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="594" src="https://blogger.googleusercontent.com/img/a/AVvXsEjIgdsbFq2XAGJsPVH2mghwZE8wDXYDc6fiaw5IAYx2KxRMAtv5aRFrfGGfQ0f9c4kyAVe7TrcA0rsAoYGiIvuKBg1EMaZfwWVu15ioaqcU-FLfj1BS72Y66wQTR3nej4ourWkP6KTvp2QMx7PgRUWUj9GPCdY8eALhpmXUaGFHxnfHSsd7CD0PqTxaNg=s16000" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">Recently, I started playing around with those Class D modules from China to connect to my computer surround sound analog output. I tried the $0.30 PAM8403 modules but there was a lot of noise for my rear speaker probably due to the parasitic of the longer cables. I went for the PAM8610 "10W" modules. The first one was bad as it took too much design freedom. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I then read the reviews and moved on to the "better" version of the module that did follow the reference design. I wish they break out the volume control and the balanced input.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I mounted 3 of those modules onto a extruded heatsink from an old monitor. The heatsink is probably good for up to 10W. I covered area on the bare aluminium heatsink with "Kapton" tape where I have wire connections. I used pieces of thermal conductive tape on the thermal vias under the chip to carry heat to the heat sink. The heatsink tape I used was electrically conductive, so the heatsink and the metal case was grounded because of that.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">I ran a power bus with a 1000uF electrolytic cap and a few 1uF ceramic caps near each of the power input of the amplifier blocks. There is a ferrite bead for each amplifiers to block the high frequency noise injecting back to the VCC bus rail. I didn't have the same layout for the amplifier at the bottom and it was a bit noisier. The layout in the picture below fixed that.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhCgtnoihFuYFxBXO1D9LjUbCGKG9q27fi3lFi4Sz3qPaTNXVuf1VKl-pFbyVVoIYMr-0LzWQbs4OvHb5AllrHze_4Yz34p6awUldeibGiwKXGMWizVPGrU8KYqolrBsumlSVDWn5JMT4qZ_2-2BnkWeqYB7ytpZa4dQeoI_qT6C_m0o0sPif4JG2dlLw=s582" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="463" data-original-width="582" height="510" src="https://blogger.googleusercontent.com/img/a/AVvXsEhCgtnoihFuYFxBXO1D9LjUbCGKG9q27fi3lFi4Sz3qPaTNXVuf1VKl-pFbyVVoIYMr-0LzWQbs4OvHb5AllrHze_4Yz34p6awUldeibGiwKXGMWizVPGrU8KYqolrBsumlSVDWn5JMT4qZ_2-2BnkWeqYB7ytpZa4dQeoI_qT6C_m0o0sPif4JG2dlLw=w640-h510" width="640" /></a></div><br /><div>The heatsink was mounted at the opposite to the messy wiring which helps a bit to balance the drag from the wires.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiyROvHEz0-HSt6K6RBsYZ0VWDk1wIHeXyffiyt-6ms9d5RB_5VC11Uid5Kzo8Zro-bUNXBevSYt-Nyg2rOuU8WlkKZy0Da5CAOHQdPzCeKc0yHtQDdyXMPRrtf7rq22saIsfHo3p0_K6B6JrzULqda_OfCLFfy6ThMI51XkLB9rVUWQTgQ9UZVmy8Tvw=s786" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="489" data-original-width="786" height="398" src="https://blogger.googleusercontent.com/img/a/AVvXsEiyROvHEz0-HSt6K6RBsYZ0VWDk1wIHeXyffiyt-6ms9d5RB_5VC11Uid5Kzo8Zro-bUNXBevSYt-Nyg2rOuU8WlkKZy0Da5CAOHQdPzCeKc0yHtQDdyXMPRrtf7rq22saIsfHo3p0_K6B6JrzULqda_OfCLFfy6ThMI51XkLB9rVUWQTgQ9UZVmy8Tvw=w640-h398" width="640" /></a></div><br /><div>Here is why i used air quotes on "10W" as I am using a 9V supply, so I would be happy to get 5W out of mine.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh-UrkN4xGOYBUikHPjobXNPWc9IpakySIVRG48MzW8QyODdkjPkfpZXu03sUrB2SBAqd71DY6cQEBKI-gbHo_2pn4biuj56ZHIJ7LHIIa2dCr97Ft9OVHqYAF4vcG4115hPn5sYFrwYCV1sWt7fgFhppD0HrRWewO5HF6kiyzxncuo5_ebAw2fEg6ixA=s686" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="228" data-original-width="686" src="https://blogger.googleusercontent.com/img/a/AVvXsEh-UrkN4xGOYBUikHPjobXNPWc9IpakySIVRG48MzW8QyODdkjPkfpZXu03sUrB2SBAqd71DY6cQEBKI-gbHo_2pn4biuj56ZHIJ7LHIIa2dCr97Ft9OVHqYAF4vcG4115hPn5sYFrwYCV1sWt7fgFhppD0HrRWewO5HF6kiyzxncuo5_ebAw2fEg6ixA=s16000" /></a></div><div>The PSRR isn't as good as my other amplifiers. I actually can hear 60Hz hums using AC transform + rectifier. I ended up using a good quality 9V 40W brick, so 5W per channel was the best I can hope for anyway.</div><div>Either I have insanely good ears for the hiss or the -90dB isn't quite feasible without a lot of work. I can't hear any noise from my 20W Class A-B.</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh9KIUZcYDRXScuoPNIStO0urRQ2k4z59kvPKT7lWVJbK6es592QIRBXf4fUYWbqQQ1wqGPNkGThdyjyQKxEeCQwyzmVvgJGu2Nd-MBZBrcDS3UI_3fWBM6GGiX62lD1hEkl_Gx_UEouiqT6OAe_SrlGrgAzqxTF6zXtx1S1U9MPEXPPYLnZKOAxaOySQ=s662" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="226" data-original-width="662" src="https://blogger.googleusercontent.com/img/a/AVvXsEh9KIUZcYDRXScuoPNIStO0urRQ2k4z59kvPKT7lWVJbK6es592QIRBXf4fUYWbqQQ1wqGPNkGThdyjyQKxEeCQwyzmVvgJGu2Nd-MBZBrcDS3UI_3fWBM6GGiX62lD1hEkl_Gx_UEouiqT6OAe_SrlGrgAzqxTF6zXtx1S1U9MPEXPPYLnZKOAxaOySQ=s16000" /></a></div><br /><div class="separator" style="clear: both; text-align: left;">It is not a perfect set up, but it is good enough for me for now.</div><br /><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-57192282077525955382021-12-10T12:53:00.003-05:002021-12-10T12:53:37.246-05:00NiMH Battery backup<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/a/AVvXsEjNETMwplAlW5vKMJbeq8Xw0po0L5CbUDJf9VzmBAaCZukBcfnctCeyV85MCwqPuZTVRIcdQI6xg9unNzoovzQv2uYk-S_VeOwR_A2n0NY__ICm1m5_LCh6FWXfjIJOEE8JQRi6CGc8uprvzgJ8gp4uXIv_AsokUeBXenvn21lCVW3QpvjrGSYg97rWiw=s324" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="251" data-original-width="324" src="https://blogger.googleusercontent.com/img/a/AVvXsEjNETMwplAlW5vKMJbeq8Xw0po0L5CbUDJf9VzmBAaCZukBcfnctCeyV85MCwqPuZTVRIcdQI6xg9unNzoovzQv2uYk-S_VeOwR_A2n0NY__ICm1m5_LCh6FWXfjIJOEE8JQRi6CGc8uprvzgJ8gp4uXIv_AsokUeBXenvn21lCVW3QpvjrGSYg97rWiw=s16000" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Battery compartment of my digital clock project (Caller ID case)</td></tr></tbody></table><br /><div><div>The power in my apartment used to be very reliable, but things have deteriorated in the last 10 years or so. I have experienced serval power outage and some up to 6-7 days.</div><div><br /></div><div>The Supercap I have is only good for a few minutes as the STM8 clock uses around 2mA to keep its firmware RTC working at the minimal state. It requires a minimum of 3V, so Li coin cells are out. I don't quite trust Li-ion batteries enough to be trickle charge 24/7. </div><div><br /></div><div>I use some old NiMH batteries. They lost most of their capacity, but they are still good for a few mA load. They are sitting in a compartment at the bottom of the clock, so gravity would protect the electronics from any leaks.</div><div><br /></div><div>Here is a battery backup for the digital clock. +5V is the power source (e.g. USB) that can go away and +UB is the backup rail.</div></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEivbivan6W_S9tPZb2iEf6rLO38tWdNzKr_RTqaW2uDwF5vhZnBNYjOWbbpLlcHeCuNLN1x7_SgsNzq1ripelmkDbL_mFQs54crzdFdjgjOpeSF-8HEAysU-cSIhRyyah2gULuDaSU1GGquBYG5dDmscYtsPryd6Nn22-w4LURX_hGVy3D2XdJfd9XINg=s673" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="303" data-original-width="673" src="https://blogger.googleusercontent.com/img/a/AVvXsEivbivan6W_S9tPZb2iEf6rLO38tWdNzKr_RTqaW2uDwF5vhZnBNYjOWbbpLlcHeCuNLN1x7_SgsNzq1ripelmkDbL_mFQs54crzdFdjgjOpeSF-8HEAysU-cSIhRyyah2gULuDaSU1GGquBYG5dDmscYtsPryd6Nn22-w4LURX_hGVy3D2XdJfd9XINg=s16000" /></a></div><br /><div>From Reddit: <a href="https://www.reddit.com/r/vintagecomputing/comments/a9jxrs/can_you_replace_a_nicd_backup_battery_by_nimh_in/" target="_blank">Can you replace a Ni-Cd backup battery by NiMH in a Tandy TRS-80 model 100?</a><br /></div><blockquote><div>So, NiCd's are super easy to charge. You just throw current into them at about 0.1C, and once they're full, they turn the rest into heat. Harmlessly, and forever. You can just slowly overcharge NiCd and it's fine with that. Lots of old two-way battery cradles did just that, and it's why the radios were always warm when you picked them up. </div></blockquote><blockquote><div>Do that to NiMH, and they "vent". NiMH needs charge termination, or needs to be floated at a lower voltage so it never gets quite "full". Right around 1.35 volts per cell seems happy.</div></blockquote><p>You'll notice it a bit funny as the <a href="https://www.analog.com/en/products/ltc4054-4.2.html" target="_blank">LTC4054ES5</a> is a Li-ion charger chip and I am using it for NiMH. It turns out that 3 NiMH has just around the same charge voltage as Li-ion battery. (The minimum charging current for this chip is 50mA.)</p><p>The -ES5 part has a recharge threshold of -150mV, so it would starts charging the batteries when they drop to 1.35V each. It charges the cells at 50mA to about 1.4V and stop charging when the charge current is below 5mA. </p><p>I use a P-MOSFET (Q1) as a switch for the back up rail to reduce the voltage drop vs a Schottky diode.</p><p>This has been working for close to half a year now without any leaks. It also survived a 24+ hour of back out with plenty of juice left.</p><blockquote></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-1535336990166576032021-11-26T14:02:00.009-05:002022-12-30T15:25:54.244-05:00Boring PC case mod with recycled materialsI bought a new CPU and a motherboard from a Black Friday sales. It is like a reverse hermit crabs upgrade with each of my PC downsize to an older case. The old $20 thrift store P4 Dell lost in the musical chair to my older <a href="https://en.wikipedia.org/wiki/Socket_FM1" target="_blank">FM1</a> PC. It has PCI, PCIe, Parallel, Serial port (header) and no Pesky Security Processor (<a href="https://en.wikipedia.org/wiki/AMD_Platform_Security_Processor" target="_blank">PSP</a>).<div><br /></div><div>You may think that stuffing a mini-ATX board into a mini-ATX case is straight forward, but this isn't the case here.<div><div><br /><div>One of the most annoying thing about the Dell Dimension 3000 is the missing Reset button. The Dell case has a removable cover and uses push rods for the buttons and light pipes for the LED. Their push rods are mounted from behind the front cover. Instead of a long dangling wire for a quick and dirty mod, I have decided to follow the flow as it is a bit easier for maintenance.</div></div><div><br /></div><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/a/AVvXsEhFcIp8VuqgMy5rBaLTtKiI2RQfciw-rW9trRxEmh18JGxsNyMkSnpkytGUlbJ1oXiv1eZ7yWI8EA1RcOTuzX0ZrZpUW47oklshfn1lSuwnXGD7htmC7CpFniN-cVAgzarnF7nt6jS66X_I5CgNgKYdXjlovFARu2RGTOgSFziu664vhdtyZqlKieMaKQ=s788" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="729" data-original-width="788" height="592" src="https://blogger.googleusercontent.com/img/a/AVvXsEhFcIp8VuqgMy5rBaLTtKiI2RQfciw-rW9trRxEmh18JGxsNyMkSnpkytGUlbJ1oXiv1eZ7yWI8EA1RcOTuzX0ZrZpUW47oklshfn1lSuwnXGD7htmC7CpFniN-cVAgzarnF7nt6jS66X_I5CgNgKYdXjlovFARu2RGTOgSFziu664vhdtyZqlKieMaKQ=w640-h592" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">It ain't pretty, but it does the job</td></tr></tbody></table><br /><div>I used a ball point pen for the push rod. It was one of those freebies I got from either a trade show or a vendor. It has just the right length and right push button. I used some hot glue to attach it to the middle piece behind the front case panel. I extended the other end with an empty pen cartridge cut to the right length for the push button. I used the mounted ballpoint pen part as a guide for my drill bit for the metal panel and the front cover.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgwI6HDokRrcQdURZDO9RlfuWVfF1AZX9SY_73nt4VGITBSgRheMR-gEor5fFfO6XGE6ZftM9gJDOr15aqcdNd8sTF1xchHK1Vc5DZ-I22P2l6iqtmFEek-vBanem92xCqAtByygRhjQwPqcbM7owGLuduR7nXM3xpvrR-cbJ42FvY3G8moWEtJ_u50sw=s796" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="153" data-original-width="796" height="124" src="https://blogger.googleusercontent.com/img/a/AVvXsEgwI6HDokRrcQdURZDO9RlfuWVfF1AZX9SY_73nt4VGITBSgRheMR-gEor5fFfO6XGE6ZftM9gJDOr15aqcdNd8sTF1xchHK1Vc5DZ-I22P2l6iqtmFEek-vBanem92xCqAtByygRhjQwPqcbM7owGLuduR7nXM3xpvrR-cbJ42FvY3G8moWEtJ_u50sw=w640-h124" width="640" /></a></div></div><div><br /></div><div>The diameter of this cartridge is a loose fit over the narrow part of the push button.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjSw-SzhDecghbbBFBONIJuabP_O2YtM3x_07_esaRJZ8EEKLSXRSv0J_LJ1m2UyN-YvFVqGDeovQa7m_kKDEXMENXODz4ctzS2hVSvf-CdFEP35h2fHCWBX1tWaMwxJyBZCUkcS2KvfNfeuklUwVmmdOVpEV3Q5Ss1jV4rQetsEGET_OhGsoVLF9d86A=s1152" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjSw-SzhDecghbbBFBONIJuabP_O2YtM3x_07_esaRJZ8EEKLSXRSv0J_LJ1m2UyN-YvFVqGDeovQa7m_kKDEXMENXODz4ctzS2hVSvf-CdFEP35h2fHCWBX1tWaMwxJyBZCUkcS2KvfNfeuklUwVmmdOVpEV3Q5Ss1jV4rQetsEGET_OhGsoVLF9d86A=w640-h480" width="640" /></a></div><div class="separator" style="clear: both; text-align: center;">Back side of the panel</div><div><br /></div>I use a (grey) PCV insulation from a power cord on the transparent tubing to stop the push rod from falling out the front. </div><div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgm48FZwk2yATo1nJZzPd3Q1L2EW2YPa2pG4kng7VRUUPR-vonBBDk3PZb3jdq2DhhNopFWbijHKytvVJ7ylWcmeixAwJjDQKKMMmPmea5PKamjWf6WxPrzGrzmxjUxpkYyB7v5xGOPFKpAxrWZBQx6_2Q4yAGvsOOl5dA70_Yj2LxHxGv_Jq-5RgmflA=s1143" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="711" data-original-width="1143" height="398" src="https://blogger.googleusercontent.com/img/a/AVvXsEgm48FZwk2yATo1nJZzPd3Q1L2EW2YPa2pG4kng7VRUUPR-vonBBDk3PZb3jdq2DhhNopFWbijHKytvVJ7ylWcmeixAwJjDQKKMMmPmea5PKamjWf6WxPrzGrzmxjUxpkYyB7v5xGOPFKpAxrWZBQx6_2Q4yAGvsOOl5dA70_Yj2LxHxGv_Jq-5RgmflA=w640-h398" width="640" /></a></div><div><br /></div><div>I used a nibbler to cut out a slot for the panel mount Reset switch from an old PC. I could have solder a push button onto a small PCB and mount it to the case with a spacer.</div><div><br /></div><div>I was going to use the existing hole below it, but it was a bit too closed to the On/Off button mechanism. It was probably for an optional LED illuminating the On/Off switch.</div><div><br /></div><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/a/AVvXsEhoE6oY2Fd4MVKwHH1mhuyM8w2osl3aA_j-GxzT56UJ6gsYhu4WOwQ2KzJRHqRFOBM7QB0b_Vc5Nz03UcBI7hg7bo7YTW8E6b3DymAEnXGfJW5Gkck4cTy6npxF1JSJNfVf3Dgi1uuxDYYO1ParcyXh_EvyqiVMqSTyBSb3sSXnUtVbp1hLhilMXP0VFg=s883" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="540" data-original-width="883" height="392" src="https://blogger.googleusercontent.com/img/a/AVvXsEhoE6oY2Fd4MVKwHH1mhuyM8w2osl3aA_j-GxzT56UJ6gsYhu4WOwQ2KzJRHqRFOBM7QB0b_Vc5Nz03UcBI7hg7bo7YTW8E6b3DymAEnXGfJW5Gkck4cTy6npxF1JSJNfVf3Dgi1uuxDYYO1ParcyXh_EvyqiVMqSTyBSb3sSXnUtVbp1hLhilMXP0VFg=w640-h392" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The new Reset button in the full depressed state.</td></tr></tbody></table><br /><div>Dell uses a swing out removable vertically mounting bracket for the 3.5" HDD. I made a mounting bracket for 2.5" SSD with 100% recycled DIMM PCB. I used a nibbling tool to cut the slot that was needed to clear the bracket. The bracket is mounted to the HDD screw holes.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiwIW1qm4DDJVeHxcr_KGicNQxbMslrKG61lAxFKluH5tKS57mzVZHHDnBoW3zMZPy3KKEq6YjCqjHI3Ky2A_lsqc0vnMk9VExw9wFHPKiQd9CTONQiqm7JaP-qnGHAoc2qh47CtiMk80hTYBQm2tbD87WfiURifYFZjq-HTBEd2bj_v8iN2VQilqQR_A=s841" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="841" data-original-width="633" height="640" src="https://blogger.googleusercontent.com/img/a/AVvXsEiwIW1qm4DDJVeHxcr_KGicNQxbMslrKG61lAxFKluH5tKS57mzVZHHDnBoW3zMZPy3KKEq6YjCqjHI3Ky2A_lsqc0vnMk9VExw9wFHPKiQd9CTONQiqm7JaP-qnGHAoc2qh47CtiMk80hTYBQm2tbD87WfiURifYFZjq-HTBEd2bj_v8iN2VQilqQR_A=w482-h640" width="482" /></a></div><br /><div>I have a left over AMD Ryzen 7 1700 <a href="https://www.amd.com/en/technologies/cpu-cooler-solution" target="_blank">Wraith Spire Coolers</a>. Too bad they change the mounting brackets in the AM4 socket the the old FM1 days, but doesn't stopped me from replacing the fan on the old stock cooler. The larger fan is quiet with a lot more air flow.</div><div><br /></div><div>I was going to make a two piece mounting bracket as an adapter for the larger fan, but it was too much work. It turns out that all I needed was 4 short strips of old FR4 PCB. They are mounted diagonally with 4 screw to the original heatsink mounting holes and another 4 to the larger fan. I offset the fan so that it would clear the heatsink latch mechanism.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjh-fJc58DL0_M4HJWhILxqZkxDhmMPE_83woDHVgK14mm-0NO8BgEhAP5G1uJVDBYy5I8qXKl3fXiWhclv4FDljJKFDL6FIMXlZHWKoXAItdRdOJ6cxvaygz1hgn4JREvRiB-ggiDv-QkYFASeaC26fuFcussmNaBGbj30FNeVeBk4Ti6XRKHvyqiweA=s691" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="518" data-original-width="691" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEjh-fJc58DL0_M4HJWhILxqZkxDhmMPE_83woDHVgK14mm-0NO8BgEhAP5G1uJVDBYy5I8qXKl3fXiWhclv4FDljJKFDL6FIMXlZHWKoXAItdRdOJ6cxvaygz1hgn4JREvRiB-ggiDv-QkYFASeaC26fuFcussmNaBGbj30FNeVeBk4Ti6XRKHvyqiweA=w640-h480" width="640" /></a></div><div style="text-align: center;">FR4 strips mounted to the heatsink</div><div><br /></div><div>The fan is then mounted with 4 screws onto the FR4 strips.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjKOJWF1uqeR3GUkRtwEgOpgGW2IvAU2cv50IdA9K0-BSixps2DQjZ6gC5O7cF7jSwHudOjgjT21NisQ9-g_vhsUrF6o1YIooWwzuef6ta1wCPtf3jaaXWQiVuTHtV8AiOHXDMPYQv67EV3KXmo2WhfyYHOalV-UfqxACP1J76DHYHUrhtft7wfQFQnIg=s864" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="770" data-original-width="864" height="570" src="https://blogger.googleusercontent.com/img/a/AVvXsEjKOJWF1uqeR3GUkRtwEgOpgGW2IvAU2cv50IdA9K0-BSixps2DQjZ6gC5O7cF7jSwHudOjgjT21NisQ9-g_vhsUrF6o1YIooWwzuef6ta1wCPtf3jaaXWQiVuTHtV8AiOHXDMPYQv67EV3KXmo2WhfyYHOalV-UfqxACP1J76DHYHUrhtft7wfQFQnIg=w640-h570" width="640" /></a></div><br /><div>This is what the internals looks like when the AMD logo is lit up.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEivcBe20UFdk-S5EKv16TkjoKT2AeZ_-EjmKjPbbtH2sjLNhWYE0RRJTSOj8LtkmJmS--F_TmC6yFiv9DcYZ6sBxxmsJwzwSH06HHSZpyIcsrKjxvZz5wa07HDwT75SERPxSVdMK_tSCwBrRkMZU-s9mRtN8ury8nF0La2tiEGHm7qMvKelwe_0dxtbtA=s1152" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/a/AVvXsEivcBe20UFdk-S5EKv16TkjoKT2AeZ_-EjmKjPbbtH2sjLNhWYE0RRJTSOj8LtkmJmS--F_TmC6yFiv9DcYZ6sBxxmsJwzwSH06HHSZpyIcsrKjxvZz5wa07HDwT75SERPxSVdMK_tSCwBrRkMZU-s9mRtN8ury8nF0La2tiEGHm7qMvKelwe_0dxtbtA=w640-h480" width="640" /></a></div><br /><div><br /></div><div><br /></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-71621169588379683782021-05-13T12:15:00.004-04:002021-11-27T17:12:20.313-05:00STM8 Gyrostock<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/AVvXsEgCluFqcUy_BkgF7cfVj9uwUfbd3fpPXT_EG764UT0DIeryrFyQPVz7wVb1xGWuyXv8-XKPPO5vltGdZpseua-nB8Idu525QvBmwrgunIZk5nIAplzDV5pGQxiiyTXTfYaUM8bwFhOvXKhG/s856/pcb.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="307" data-original-width="856" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCluFqcUy_BkgF7cfVj9uwUfbd3fpPXT_EG764UT0DIeryrFyQPVz7wVb1xGWuyXv8-XKPPO5vltGdZpseua-nB8Idu525QvBmwrgunIZk5nIAplzDV5pGQxiiyTXTfYaUM8bwFhOvXKhG/w640-h229/pcb.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">STM8S003 + MPU6050 module<br /></td></tr></tbody></table><p></p><p>I was inspired by <a href="https://github.com/ArsenicBismuth/Cemu-GyroStick" rel="nofollow" target="_blank">Cemu Gyro Joystick</a> project which is a way to add motion data to a regular game controller. My hardware is based on cheap <a href="http://wiki.sunfounder.cc/index.php?title=MPU6050_Module" rel="nofollow" target="_blank">MPU6050 modules</a> that was used by <a href="https://github.com/ArsenicBismuth/Arduino-Programs/tree/master/Gyro_Joystick" rel="nofollow" target="_blank">Gyro_Joystick</a> from the project. </p><p>I have ordered some USB hub chips from some dodgy supplier, but they turned out to be fake - blanks. So much for trying to squeeze it inside the controller and share the same USB connection.</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/AVvXsEhAIHTqG3lxZDotqk8Klsg8jvddl6Dfh_tp3ommbocbVfHu-bATMwgFxiOIaRyEiIVWPlTS7LU7bylWP8NRun6m6qy_B4UXccfv_tcPG3NMlVnBr8AFN2DAWeiCE4Rd-aIPZGHDxnt6ochn/s369/controller.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="276" data-original-width="369" height="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIHTqG3lxZDotqk8Klsg8jvddl6Dfh_tp3ommbocbVfHu-bATMwgFxiOIaRyEiIVWPlTS7LU7bylWP8NRun6m6qy_B4UXccfv_tcPG3NMlVnBr8AFN2DAWeiCE4Rd-aIPZGHDxnt6ochn/w400-h299/controller.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Possible mounting location<br /><br /></td></tr></tbody></table>It uses a firmware based USB library on a STM8S003 and communicates with the MPU6050 via I2C bus. The I2C peripheral comes with several errata with work arounds.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9A_73TxEat5QO8G8_ruTq5L7ApDOzKx1oJYlZisGs-AWODFJquXxpGUl29jbPh40MknJBNwhKIV4SqKPVhlybWvc9C2IZikExzD_e5fItB4QrCQiLcpyWLGHQvLsWoiX5FddekfJbkXLe/s540/I2C+errata.png" style="margin-left: 1em; margin-right: 1em;"><br /><img border="0" data-original-height="269" data-original-width="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9A_73TxEat5QO8G8_ruTq5L7ApDOzKx1oJYlZisGs-AWODFJquXxpGUl29jbPh40MknJBNwhKIV4SqKPVhlybWvc9C2IZikExzD_e5fItB4QrCQiLcpyWLGHQvLsWoiX5FddekfJbkXLe/s16000/I2C+errata.png" /></a></div><div><br /></div>All would be fine except that both the firmware only USB and now I2C drivers relies on interrupts and tight timing. I have implemented an interrupt driver based on ST's App. Note: <a href="https://www.st.com/en/embedded-software/stsw-stm8004.html" rel="nofollow" target="_blank">AN3281 - STM8 8-bit MCUs I2C optimized examples</a> It improved the reliability a bit over some other I2C drivers I was trying but it still hangs under load.<br /><p>I looked at the USB traces and found that the I2C started in the middle of USB communication and cause it to hang eventually. </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/AVvXsEhCMh-I7DgtrlmNjAr5MnbeJlE4CE0RSrBNKeduCGjt3pCydznxh0tJHGzzgRA1mBPeJUU8WR57O3crZoamIEpJ_k4izpqL5BF2VnJsSWUu-4n9adn8jaOMIhfc2N-7DpRpy2zSLNkBCiJv/s836/I2C+fix.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="193" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCMh-I7DgtrlmNjAr5MnbeJlE4CE0RSrBNKeduCGjt3pCydznxh0tJHGzzgRA1mBPeJUU8WR57O3crZoamIEpJ_k4izpqL5BF2VnJsSWUu-4n9adn8jaOMIhfc2N-7DpRpy2zSLNkBCiJv/s16000/I2C+fix.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Time delay</td></tr></tbody></table><p>By adding a bit of time delay before the I2C transfer, I was able to fix the issue. Now each of them gets their undivided attention from the CPU.</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/AVvXsEgop1PfMx5m8ySk_ZMUUELbphu2i26yGM4GXM_2vQuyBFySMUWZtZVmh_J6mlvhEr0XQ6AVOTsx4_lb521BfftV1hgx2feW_bX3VvLRhmNB7JSAe96L6MC4ulAW0nLy_gyvFtUDKcCoBTH4/s1087/USB+%252B+I2C+waveform.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="231" data-original-width="1087" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgop1PfMx5m8ySk_ZMUUELbphu2i26yGM4GXM_2vQuyBFySMUWZtZVmh_J6mlvhEr0XQ6AVOTsx4_lb521BfftV1hgx2feW_bX3VvLRhmNB7JSAe96L6MC4ulAW0nLy_gyvFtUDKcCoBTH4/w640-h136/USB+%252B+I2C+waveform.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">USB packet followed by I2C traffic</td></tr></tbody></table><p>USB specs limits a Low Speed device to 8 bytes interrupt packets which is what's used for HID reports. </p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;">6 axis at 16-bit each is 6 x 2 bytes = 12 bytes!</p></blockquote><p>I have tried several things and failed. The only way I could send out 6 axis full 16-bit data is to logically group the Accelerometers and Gyroscopes under separate Report ID and alternating between the two reports.</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/AVvXsEg5jMmLIUOyWTngQBLnttKvhRFy0tNZz2d2fk91gbBN4WoJk52o_JgXMsQZJDggO1UNhJO9i_tabdrB-kFK_ImxO-vdW17BgYsRSefzjDq2oqw6J4sOm_aQgCwoBA4fUtxbWzdFm_5qkqxF/s562/HID+Report+Descriptors.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="445" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5jMmLIUOyWTngQBLnttKvhRFy0tNZz2d2fk91gbBN4WoJk52o_JgXMsQZJDggO1UNhJO9i_tabdrB-kFK_ImxO-vdW17BgYsRSefzjDq2oqw6J4sOm_aQgCwoBA4fUtxbWzdFm_5qkqxF/s16000/HID+Report+Descriptors.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">HID Report Descriptors</td></tr></tbody></table>Thankfully that the host side picks up the 2 reports and treats them as one set of data (at 1/2 the data rate).Windows recognize this as a 6-axis game controller - (X/Y axis + 4 sliders).<div><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/AVvXsEgmbA-2dnYAOt2nxPsKN7mmFuPlT4SYwGq3oU4egW97Nxzub_kq31ESWjbroscStwmAqBfclqrg7N2Z4YrM6Izdu_gh87VeQAbKTk2Oedqubmit6IAvPkWD85lwOUpPmfJHgvMK7MZ16z2y/s785/Game+controller+setting.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="456" data-original-width="785" height="373" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbA-2dnYAOt2nxPsKN7mmFuPlT4SYwGq3oU4egW97Nxzub_kq31ESWjbroscStwmAqBfclqrg7N2Z4YrM6Izdu_gh87VeQAbKTk2Oedqubmit6IAvPkWD85lwOUpPmfJHgvMK7MZ16z2y/w640-h373/Game+controller+setting.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Windows Game controller setting</td></tr></tbody></table><br /></div><div>The next part is to figure how to compile the <a href="https://github.com/ArsenicBismuth/Cemu-GyroStick" rel="nofollow" target="_blank">Cemu Gyro Joystick</a> project as they didn't have a pre-compiled version and I haven't got a clue on NodeJS.</div><h4 style="text-align: left;">Mechanicals</h4><div>I have added Sketchup model for people who have fancy 3D printer(s). I on the other hand tried to make a mount with simple hand tools. </div><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/AVvXsEia1cEC549FNoT2viA4BhITqfjPW9bCDsKZplGLg-IRGYzXbF17GlG74MgsPox_vS3asn4BW86W0zzqY6YZQlCvy14uvbRtR9WNXccEWPkrrOXvwdkYZ6mjSjIZduhrc6YdPI87gLO2XP-t/s581/stm8-accelerometer+%2528sketchup+3D+model%2529.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="287" data-original-width="581" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia1cEC549FNoT2viA4BhITqfjPW9bCDsKZplGLg-IRGYzXbF17GlG74MgsPox_vS3asn4BW86W0zzqY6YZQlCvy14uvbRtR9WNXccEWPkrrOXvwdkYZ6mjSjIZduhrc6YdPI87gLO2XP-t/s16000/stm8-accelerometer+%2528sketchup+3D+model%2529.png" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Sketchup 3D model</td></tr></tbody></table><div><br /></div><div>It is a home made captured M3 nut on a piece of PCB. I drill an undersized hole and hand filed a hexagon hole. With the help of a pier and some applied force, I pressed it into the hole. The nut bites into the slightly under sized hole and held in place. </div><div><br /></div><div>I cut a small piece of plexiglass with a saw blade attached to a Dremel tool. I used a hand drill to drilled 2 holes - one for the screw and a larger one the nut.</div><div><br /></div><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/AVvXsEi2-noEiUoM4RUZcHXX07WIF6zlON6Tyfl7gnpdr0naQl1u_BHbcLVfTPlZmL-YBsGbQ3pZQOMx0cs815qObKmmwjziLcMK10F1B6VJ477Y16l0fkz7gyGhQDGoo9d3dvEaGwmErqf2Hp-1/s743/IMG_2918.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="435" data-original-width="743" height="375" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2-noEiUoM4RUZcHXX07WIF6zlON6Tyfl7gnpdr0naQl1u_BHbcLVfTPlZmL-YBsGbQ3pZQOMx0cs815qObKmmwjziLcMK10F1B6VJ477Y16l0fkz7gyGhQDGoo9d3dvEaGwmErqf2Hp-1/w640-h375/IMG_2918.JPG" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PCB assembly, plexiglass spacer, captured nut + M3 screw</td></tr></tbody></table><br /><div>Note the edge of the plexiglass is flush with the module and this helps to prevent the PCB assembly from spinning.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhYjhlHpsVYM4n8wBzARVRaGT3ZVTU_5VFm97w5wFwxxq6HRdo0b2H3RPeXv2fqUjTbsmY7qdKGlMo1JzSmNFoZyFs6I7FCTKDm-91i_6k_p8n0yRrr9FFyQji1VKhrzuKsu_a0UQO_Yte/s545/IMG_2920.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="223" data-original-width="545" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhYjhlHpsVYM4n8wBzARVRaGT3ZVTU_5VFm97w5wFwxxq6HRdo0b2H3RPeXv2fqUjTbsmY7qdKGlMo1JzSmNFoZyFs6I7FCTKDm-91i_6k_p8n0yRrr9FFyQji1VKhrzuKsu_a0UQO_Yte/w640-h262/IMG_2920.JPG" width="640" /></a></div><br /><div>The plexiglass is then superglued to the captured nut PCB to form a mount. I screwed in the PCB assembly to show how things fitted together. Notice the white stress points on the FR4 at the corner of the nut. That's what holding the nut in place (along with the superglue). FR4 can handle stress a lot better than plexiglass. The thickness is just right for the M3 screw and clears the PCB assembly. :)</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim24o7Ro-H4hjGMmVyR7czGmdQt9jzof_XKR-WOLJlnynlgEBLGwyIrV4qGEIJ7H6g1q4wauWs0jgmgMJaZegaGGXkZi67LI2jwFpvLOmJoX0Nw6rI_EVuXz1csW1o1Vrp9M90R1m55Nl7/s563/IMG_2921.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="290" data-original-width="563" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim24o7Ro-H4hjGMmVyR7czGmdQt9jzof_XKR-WOLJlnynlgEBLGwyIrV4qGEIJ7H6g1q4wauWs0jgmgMJaZegaGGXkZi67LI2jwFpvLOmJoX0Nw6rI_EVuXz1csW1o1Vrp9M90R1m55Nl7/w640-h330/IMG_2921.JPG" width="640" /></a></div><br /><div>The base can then be superglued to a controller. My has a label area.</div><div><br /></div><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/AVvXsEhIKia_JZwxApaLgFsPBDMXnRHSz2hjtdkUMFZm2T2uHzAhmbrq7qlSlIKwM9jQ2cMON_9OE8trh_fqX7aNdaetXJdQhDoPNDQG-Ln1Oa9drxaynzHIzGCdCUEVvUoB2cLgmmXDj9TaIx78/s922/IMG_2922.JPG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="366" data-original-width="922" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIKia_JZwxApaLgFsPBDMXnRHSz2hjtdkUMFZm2T2uHzAhmbrq7qlSlIKwM9jQ2cMON_9OE8trh_fqX7aNdaetXJdQhDoPNDQG-Ln1Oa9drxaynzHIzGCdCUEVvUoB2cLgmmXDj9TaIx78/w640-h254/IMG_2922.JPG" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Homemade mount that can be glued to game controller</td></tr></tbody></table><br /><div>Here is what it looks like with everything in place. The PCB components are protected by the back side. The PCB assembly can be easily removed for easy access.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKJkk27Y0FlBH-4bHsDcO36ijfSnqE_RZI9Ph2Ibnj9qz1BibUFNvDLpFoXstdvAtA9es6q4DQXZEPDOwZRFOv3WO7zQp4sxeimbAcErDBsjDSOs_V_U0S4yXcuUC8z_zfSk0ZpVdwuuDs/s884/IMG_2924.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="379" data-original-width="884" height="274" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKJkk27Y0FlBH-4bHsDcO36ijfSnqE_RZI9Ph2Ibnj9qz1BibUFNvDLpFoXstdvAtA9es6q4DQXZEPDOwZRFOv3WO7zQp4sxeimbAcErDBsjDSOs_V_U0S4yXcuUC8z_zfSk0ZpVdwuuDs/w640-h274/IMG_2924.JPG" width="640" /></a></div><div><br /><p><a href="https://github.com/FPGA-Computer/STM8-Gyrostick" rel="nofollow" target="_blank">Github files</a></p><h4 style="text-align: left;">Conclusion</h4><p>It would seem that this project is a partial failure as I have failed the objective. It is not compatible with <a href="https://github.com/ArsenicBismuth/Cemu-GyroStick" rel="nofollow" target="_blank">Cemu Gyro Joystick</a> as it is limited by USB Low Speed to 8-byte interrupt packets size. Node.JS is a mess to work with especially with the whole ball of wax of imported dependency. Chances of fixing it is NIL.I have toyed with the idea of writing a program from scratch, but lost interest.</p><p>I have integrated an Interrupt driven I2C host with VUSB. I have tested the idea of using multiple ReportID as a way to bypass the 8-byte packet limit.</p><p><br /></p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-829120367169480812021-03-08T21:34:00.005-05:002021-11-27T17:12:32.400-05:00STM8 Timer V2<p> Go to <a href="https://hw-by-design.blogspot.com/2018/10/stm8-timer.html" rel="nofollow">Timer V1</a></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://github.com/FPGA-Computer/Timer/blob/master/V2/hardware/PCB%20+%20LCD.jpg?raw=true" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="396" data-original-width="800" height="317" src="https://github.com/FPGA-Computer/Timer/blob/master/V2/hardware/PCB%20+%20LCD.jpg?raw=true" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Timer V2<br /></td></tr></tbody></table><p>There were a few changes to the <a href="https://hw-by-design.blogspot.com/2018/10/stm8-timer.html" rel="nofollow">V1 design</a>.</p><ul style="background-color: white; box-sizing: border-box; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">Supercap backup power</p></li><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">Connectors for LED/sensor and Servo connector</p></li><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">Switcher module</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">LCD and buttons I/O changes. LCD backlight on/off control by ambient light</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">I2C connector</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;">expansion connector for nRF24 (no firmware support)</p></li></ul><h4 style="text-align: left;"><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;">Supercap backup power</span></h4><div><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/AVvXsEhiSxUA8g2gEM3eERs8m0dRz4azTUuthLIe-miPvU_LhxtzYnHMBMyVnHKwThE8VTE-nsorM-PiiydooFk7QTESZFQLPmWZRM-3sF5y83JzN5LhFz1z87jmMPfMH3AjZuaz3emEBcSSKzMq/s299/backup.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="299" data-original-width="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiSxUA8g2gEM3eERs8m0dRz4azTUuthLIe-miPvU_LhxtzYnHMBMyVnHKwThE8VTE-nsorM-PiiydooFk7QTESZFQLPmWZRM-3sF5y83JzN5LhFz1z87jmMPfMH3AjZuaz3emEBcSSKzMq/s16000/backup.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Supercap backup</td></tr></tbody></table><br /></div><div>The backup circuit is similar to the one I have been using in my digital clocks. I added the option of using a constant current source for charging the low ESR supercap. The resistor is simpler and have one less diode drop.</div><div><div><h4><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">Servo connector</span></h4></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">It turns out that the water pump I originally used wasn't reliable, so I have been using a <a href="https://hw-by-design.blogspot.com/2020/03/stm8-timer-servo-controlled-water-valve.html" rel="nofollow">servo driven valve</a>. I had to rerouted the control line for power supply the servo. </span></div></div><h4 style="text-align: left;"><span style="background-color: white; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px;">Switcher module</span></h4><div><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/AVvXsEirHmt-kBvgIM0ELXmMYNyNn75PTSzaf78nZf80pcfegTvzU1ixBnngwmRy0CLx9bdWPji2EWq-BViuiMwODPfG6vbpbq0JcrT4GA86dmhtIdHrezqE8afAeELx1T9RSJf9WbzVUJKT0vQ5/s507/power.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="181" data-original-width="507" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirHmt-kBvgIM0ELXmMYNyNn75PTSzaf78nZf80pcfegTvzU1ixBnngwmRy0CLx9bdWPji2EWq-BViuiMwODPfG6vbpbq0JcrT4GA86dmhtIdHrezqE8afAeELx1T9RSJf9WbzVUJKT0vQ5/s16000/power.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">5V supply</td></tr></tbody></table><br /><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;">A DC-DC converter module is used for converting the 12V to 5V for the timer and servo. I used a 10K resistor to set the output of the KIS-3R33 module to 5V.</span><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";"> </span><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">Other modules can be used.</span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;"><br /></span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">I am using power supply grade Tantalum capacitors as they take up less heights and offers a longer lifetime than electrolytic capacitors.</span><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;"> </span><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">The DC-DC module operates at 340kHz which helps to reduce the capacitance.</span></div><div><h4 style="text-align: left;"><span style="background-color: white; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px;">LCD and buttons I/O changes</span></h4><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;">I have decided to use time delay instead of polling for Busy Flag for the LCD. This frees up 1 GPIO pin and simplifies the sharing of the LCD I/O signals for multiple functions.</span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;"><br /></span></div><div><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/AVvXsEhn52dgPG38EUVGbGLzA51zuTMWLYJaRep_dDhd6EJi8kPPq6WBi_mPw5YGWxQSVUIFSTOHNc_-Mh1VjVQaj-PfSElGMCE96M1gzjPpcxVazC-IhiV5J2zcnY2xMsXIZYPDvDNxm9pnufS9/s202/buttons.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="202" data-original-width="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn52dgPG38EUVGbGLzA51zuTMWLYJaRep_dDhd6EJi8kPPq6WBi_mPw5YGWxQSVUIFSTOHNc_-Mh1VjVQaj-PfSElGMCE96M1gzjPpcxVazC-IhiV5J2zcnY2xMsXIZYPDvDNxm9pnufS9/s16000/buttons.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Buttons</td></tr></tbody></table><br /></div><div>In the V1 design, an ADC channel is used for sensing the buttons. T<span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">he LCD data lines now are used for polling the buttons.</span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";"><br /></span></div><div><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/AVvXsEjq1p7xUpKxQc_9PvE3_jbxx9aagCjLLErVF9v6Z_i0U7JSaSSQHpgi-fAomZBPYcsWDWJHOyigU8gmVIcGHicQWKlChUIq5IkU_8wYVJVLuQK2TeJ3wZ7HjY8PU_Am23ooxmzNdaeRBSQz/s304/nRF24.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="215" data-original-width="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq1p7xUpKxQc_9PvE3_jbxx9aagCjLLErVF9v6Z_i0U7JSaSSQHpgi-fAomZBPYcsWDWJHOyigU8gmVIcGHicQWKlChUIq5IkU_8wYVJVLuQK2TeJ3wZ7HjY8PU_Am23ooxmzNdaeRBSQz/s0/nRF24.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">nRF24 module</td></tr></tbody></table><br /><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">Also new in this version is a connector for a nRF24 module. The module uses SPI which shares the same data lines with the LCD. </span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";"><br /></span></div><div><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://github.com/FPGA-Computer/Timer/blob/master/V2/hardware/PCB%20with%20nRF24%20module.jpg?raw=true" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="343" data-original-width="800" height="275" src="https://github.com/FPGA-Computer/Timer/blob/master/V2/hardware/PCB%20with%20nRF24%20module.jpg?raw=true" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Timer with the nRF24 module</td></tr></tbody></table><br /><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">A bottom entry connector is used for flush mounting the nRF24 module.</span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";"><br /></span></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://www.gradconn.com/images/products/entry_types.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="230" data-original-width="467" src="https://www.gradconn.com/images/products/entry_types.jpg" /></a></div></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";"><br /></span></div><div><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";">github: </span><span style="color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;">https://github.com/FPGA-Computer/Timer</span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-26941821909326012642021-03-08T20:03:00.003-05:002021-11-27T17:12:44.065-05:00STM8 LED Clock - Part 3<div>Go to <a href="https://hw-by-design.blogspot.com/2020/01/stm8-led-clock-part-2.html" rel="nofollow">Part2</a></div><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://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/alarm%20clock.jpg?raw=true" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="362" data-original-width="800" height="290" src="https://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/alarm%20clock.jpg?raw=true" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">My old alarm clock retrofitted with a STM8</td></tr></tbody></table><div><br /></div><div>This design is very similar to my other digital clock in <a href="https://hw-by-design.blogspot.com/2019/11/stm8-led-clock-part-1.html" rel="nofollow">Part 1</a>. This one uses larger common anode displays and requires higher currents (50mA vs 20mA). Each of the common anode digits is driven by a PNP transistor as they require more current than what the STM8 can source.</div><div><br /></div><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/AVvXsEjARzZAOVEvn7QK61Gfqoc-egfcSdC6Ol0xsW_R_5staXNtP9PsIQpgEDgAkmKV1U2CkHnwybllbt8LGN59MQ7EfgM-Ylxvjxoup1E6bcjj1umdLaW_5ZmZxAZowLQPtoj14KWSPPHx-GYd/s648/display.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="304" data-original-width="648" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjARzZAOVEvn7QK61Gfqoc-egfcSdC6Ol0xsW_R_5staXNtP9PsIQpgEDgAkmKV1U2CkHnwybllbt8LGN59MQ7EfgM-Ylxvjxoup1E6bcjj1umdLaW_5ZmZxAZowLQPtoj14KWSPPHx-GYd/s16000/display.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Display</td></tr></tbody></table><div><div><br /></div><div>The driver and display are constructed on a protoboard using point to point wiring. I change their duty cycle via TIM4->ARR on the fly to balance the brightness for the last 2 digits.</div><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://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/uC%20breakout%20+%20display%20PCB%20+%20Supercap%20backup.jpg?raw=true" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="237" data-original-width="686" height="221" src="https://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/uC%20breakout%20+%20display%20PCB%20+%20Supercap%20backup.jpg?raw=true" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">STM8 breakout PCB + display drivers</td></tr></tbody></table><br />The alarm clock is power from a small 12VCT transformer. I have decided not to use the AC frequency for timing as the short term <a href="http://www.leapsecond.com/pages/mains/" rel="nofollow" target="_blank">accuracy</a> is worse than a calibrated crystal.</div><div><br /></div><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/AVvXsEhTZPaHb3kuaE546wYfGUN8VGnEFXfrzCw8KH_N7gDzJq49OGz2_u_H2jQ9FlauZJnmy2onAnJO_bTU1H4-vKytvlRv0eN5p6Td9URK7EH5akzOkn8AADeTcE8IsnJdpiVOnXaf4JMvmqJk/s381/backup.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="381" data-original-width="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTZPaHb3kuaE546wYfGUN8VGnEFXfrzCw8KH_N7gDzJq49OGz2_u_H2jQ9FlauZJnmy2onAnJO_bTU1H4-vKytvlRv0eN5p6Td9URK7EH5akzOkn8AADeTcE8IsnJdpiVOnXaf4JMvmqJk/s16000/backup.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Supercap backup</td></tr></tbody></table><br /><div>A low ESR SuperCap is used to kept the time for a few minutes during a power failure or when I move the clock to a different AC outlet. The STM8 I use isn't a low power part. It draws around 2mA just to keep the RTC alive.</div><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/AVvXsEhvOLA9a0IoT4_dNVVW5oEuw4c7OsAmkqB1o11qY7TvR849XsNKlQCPWQzyTxpKIgiG_-F8gH8bADlT2sh1OFrr-wEqFxrFHkCrubHfvOvPlpOmlgZ5zcY6tEvOhDohsIeMUebHwmv-qJsx/s248/piezo.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="138" data-original-width="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvOLA9a0IoT4_dNVVW5oEuw4c7OsAmkqB1o11qY7TvR849XsNKlQCPWQzyTxpKIgiG_-F8gH8bADlT2sh1OFrr-wEqFxrFHkCrubHfvOvPlpOmlgZ5zcY6tEvOhDohsIeMUebHwmv-qJsx/s16000/piezo.jpg" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Piezo driver</td></tr></tbody></table><br /><div>The alarm is a 1kHz tone from the Beeper peripheral with a simple circuit for driving the piezo buzzer.<br /><div><br /></div><div><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://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/alarm%20clock%20PCB%20assemblies.jpg?raw=true" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="760" data-original-width="621" height="640" src="https://github.com/FPGA-Computer/LED-Clock/blob/master/Common%20anode/alarm%20clock%20PCB%20assemblies.jpg?raw=true" width="523" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Alarm clock assemblies</td></tr></tbody></table><br /></div></div><div><span style="background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px;">Files: </span><a href="https://github.com/FPGA-Computer/LED-Clock" style="background-color: white; color: #4495ff; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-decoration-line: none;">https://github.com/FPGA-Computer/LED-Clock</a></div><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-17509456524562186332020-04-08T21:07:00.001-04:002021-11-27T17:13:13.329-05:00Virus outbreak life hacks<h3>
Vegetables in 4-6 days, just add water</h3>
<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/AVvXsEioIzBzLI7rf5tO2rIQaOdCicjY_P3n0AY77NlziV2XPfEVud0Y8mX442lKroveNRSP-6zE80hICMKTAehAGvHlhF3OQmWVBm607BCIyg1PasuWECmooT8XYq0pel71H84q6yc0LamtSB5D/s1600/IMG_2688.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="680" data-original-width="653" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioIzBzLI7rf5tO2rIQaOdCicjY_P3n0AY77NlziV2XPfEVud0Y8mX442lKroveNRSP-6zE80hICMKTAehAGvHlhF3OQmWVBm607BCIyg1PasuWECmooT8XYq0pel71H84q6yc0LamtSB5D/s640/IMG_2688.JPG" width="614" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Growing bean sprout</td></tr>
</tbody></table>
While doing an inventory of my food supply, I came across some <a href="https://en.wikipedia.org/wiki/Mung_bean" rel="nofollow" target="_blank">mung beans</a> I bought about 10 years ago. So I grew some bean sprouts from following this <a href="https://www.attainable-sustainable.net/grow-bean-sprouts/" target="_blank">website</a>. It is very <a href="https://en.wikipedia.org/wiki/Sprouting#Nutrition" rel="nofollow" target="_blank">nutritional</a> and a low effort alternative for fresh vegetable during a food shortage. I use the webbing from a pack of garlic to use as the mesh and tie it to the bottle with some solid wires. I soaked the beans overnight and then rinse it twice a day. Other than that, it requires very little efforts. I had to stop after 4 days when the bottle was getting too full.<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/AVvXsEjiiTO46t4L16soomv4-bmJQiAVPkWC86w-08nxWiFUkt3VD7VkOya_bb_TNdPxUhb4kaA-xvwds7YrqDoHwukhOPpoaE0wfH-QSrCXkWuoue39Hv2NbBxNZKSZGlY0P8S2CmOYm1EH1az6/s1600/IMG_2689.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="599" data-original-width="812" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiiTO46t4L16soomv4-bmJQiAVPkWC86w-08nxWiFUkt3VD7VkOya_bb_TNdPxUhb4kaA-xvwds7YrqDoHwukhOPpoaE0wfH-QSrCXkWuoue39Hv2NbBxNZKSZGlY0P8S2CmOYm1EH1az6/s640/IMG_2689.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Stir fried noodles with bean sprouts</td></tr>
</tbody></table>
Here is one <a href="https://www.bbcgoodfood.com/recipes/stir-fried-noodles-beansprouts" rel="nofollow" target="_blank">recipe</a> for a stir fried noodle.<br />
<h3>
Egg noodles from scratch</h3>
<b>Ingredients:</b> 1 egg, 1/2 teaspoon of sodium carbonate, flour and water.<br />
<b>Tools:</b> hands, pasta machine, measuring cup, flat surface e.g. baking pan.<br />
<br />
Sodium carbonate (Na2CO3) can be made by heating sodium bicarbonate (NaHCO3). It is also available as washing soda, however I don't know if they are food grade.<br />
<br />
<a href="https://cooking.stackexchange.com/questions/9072/what-flour-and-technique-do-i-need-for-hand-pulled-noodles">https://cooking.stackexchange.com/questions/9072/what-flour-and-technique-do-i-need-for-hand-pulled-noodles</a><br />
<blockquote class="tr_bq">
<i>Without sodium carbonate it's possible to have hand-pulled noodles with any flour. The downside is you will have to knead the dough for 45 minutes and leave to rest for 2 hours until you can start pulling your noodle strands.</i></blockquote>
<br />
The alkaline dough also help to <a href="https://www.sciencedirect.com/topics/food-science/salmonella" rel="nofollow" target="_blank">discourage Salmonella</a>, but hey you are going to boil the noodles at some point anyway.<br />
<br />
1. Add 1 large egg, fill water to 1/2 mark, add 1/3 teaspoon of sodium carbonate.<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/AVvXsEiG9YMAS22P9Fuozvw2a4I_Llj8J00k2C_u8a87sC4DXovF9bJMOJ1ss5yzlLxDKwdSIon42ao5K3aYKy36WOTn0er2ov-_-nIerni7m6TFy_vdvkl7y2GhvHvM-zDfm7l621gbgCwMOScF/s1600/IMG_2695.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG9YMAS22P9Fuozvw2a4I_Llj8J00k2C_u8a87sC4DXovF9bJMOJ1ss5yzlLxDKwdSIon42ao5K3aYKy36WOTn0er2ov-_-nIerni7m6TFy_vdvkl7y2GhvHvM-zDfm7l621gbgCwMOScF/s640/IMG_2695.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Egg,, water and some sodium carbonate</td></tr>
</tbody></table>
2. Top it up the same measuring cup with white general purpose flour to a bit above the 2 cups mark. Why wash when you could use the same cup?<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/AVvXsEhr1v9SZUm2jOvw4JDOyDKVbgGiCN_jgyx2KebKQH9nRdk9NdgUu98vR5v_xwMHNd5V3rge2St1U7i9E-O9rfm5lU60RVEXFLBSbIYpQ6SjppaynA2ijLbRisLf9v06c8Yd7Cy0RmeLi7hj/s1600/IMG_2696.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr1v9SZUm2jOvw4JDOyDKVbgGiCN_jgyx2KebKQH9nRdk9NdgUu98vR5v_xwMHNd5V3rge2St1U7i9E-O9rfm5lU60RVEXFLBSbIYpQ6SjppaynA2ijLbRisLf9v06c8Yd7Cy0RmeLi7hj/s640/IMG_2696.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Add flour to same cup</td></tr>
</tbody></table>
3. Stir it around with a spoon until all the liquid is absorbed.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<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/AVvXsEgPZSGQxnVOqXZvy97y1q-L2Cm5Z7oeqYKSh1yezEd3K8Y-2AvpZnjCatpo1KbDpXlEe6zWGWul5Hykl-18Oy57m6WsUtmpEfZ1llRZxIIY_PWxiEADWLzkiEU2a_YJ2h8iMt6nyLFcmugI/s1600/IMG_2698.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><span style="color: black;"><img border="0" data-original-height="630" data-original-width="856" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPZSGQxnVOqXZvy97y1q-L2Cm5Z7oeqYKSh1yezEd3K8Y-2AvpZnjCatpo1KbDpXlEe6zWGWul5Hykl-18Oy57m6WsUtmpEfZ1llRZxIIY_PWxiEADWLzkiEU2a_YJ2h8iMt6nyLFcmugI/s640/IMG_2698.JPG" width="640" /></span></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Stir a bit</span></td></tr>
</tbody></table>
4. Pour contents into a surface. I use a baking pan to contain spills. <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/AVvXsEg6dONNe5UNxfZDJua-5MiBOLJtB_ll7217En-rfIO08ptjplMFU7abrn6Ynw8S1ds9Y6KaZ9WbtM0yQoS30RwaBKecFhOWMqFZVYj6L146rYMEPP9J1BMKVnPQqkoa7CsfDh-eAVHuthVd/s1600/IMG_2699.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6dONNe5UNxfZDJua-5MiBOLJtB_ll7217En-rfIO08ptjplMFU7abrn6Ynw8S1ds9Y6KaZ9WbtM0yQoS30RwaBKecFhOWMqFZVYj6L146rYMEPP9J1BMKVnPQqkoa7CsfDh-eAVHuthVd/s640/IMG_2699.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Lumpy mix from cup</td></tr>
</tbody></table>
<h3>
<span style="font-weight: normal;"><span style="font-size: small;">5. Knead the dough until your hands are clean. It is a very tough dough, but it is a good exercise.</span></span><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/AVvXsEiAFDF7RjrD0VWQEa-WNEzfAhcfpoBlsrd-vOvWUPuRMwUSzKDNEtAg5P73Wa7j3P6TNQ-vjWEfmHHitiBKNP6GdOCBDG8-NnHa4naXfmfMGIRUs1t82mHIPHo9MfQWaVlWoS57yphIGCqD/s1600/IMG_2700.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="554" data-original-width="910" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAFDF7RjrD0VWQEa-WNEzfAhcfpoBlsrd-vOvWUPuRMwUSzKDNEtAg5P73Wa7j3P6TNQ-vjWEfmHHitiBKNP6GdOCBDG8-NnHa4naXfmfMGIRUs1t82mHIPHo9MfQWaVlWoS57yphIGCqD/s640/IMG_2700.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">This is the time to stop</td></tr>
</tbody></table>
<span style="font-weight: normal;"><span style="font-size: small;">The clean up isn't too bad. Leave the pan for now as you'll need it later.</span></span><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/AVvXsEgb0rhi4xsX3EDw6xTy93MLD1aqawP4jCwOzZtjpaUsxi34LFfo1p-GwI15_0-rHqvjEkiSYunxzPnDaubGEAo8NhyrYSQpVugz0yuMbTYux4T-XcQ_8aYM2fYkvbsqmQq6jmK_39xOJjdJ/s1600/IMG_2701.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="641" data-original-width="856" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb0rhi4xsX3EDw6xTy93MLD1aqawP4jCwOzZtjpaUsxi34LFfo1p-GwI15_0-rHqvjEkiSYunxzPnDaubGEAo8NhyrYSQpVugz0yuMbTYux4T-XcQ_8aYM2fYkvbsqmQq6jmK_39xOJjdJ/s640/IMG_2701.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Now it is time to clean the cup</td></tr>
</tbody></table>
<span style="font-weight: normal;"><span style="font-size: small;">6. Store the dough in a container and keep it in the fridge for about 3 hours and let it "rest". Make sure you wash your hands after this as the dough is alkaline. </span></span><br />
<span style="font-weight: normal;"><span style="font-size: small;"><br /></span></span>
<span style="font-weight: normal;"><span style="font-size: small;">7. I roll the dough with my manual pasta machine starting from the thickest setting. I also trim the rugged edges and patch up holes in the dough. Go one setting at a time to reduce the thickness of the dough sheets. Trim the length when the sheets gets too long.</span></span><br />
<span style="font-weight: normal;"><span style="font-size: small;"><br /></span></span>
<span style="font-weight: normal;"><span style="font-size: small;">This dough can be used for making wonton wrapping.</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_aPbw9Ct8hEldcAtvd-wsmekriFTrba3qX7u-Xq1HOtxzn_Rhozr_c26lrDuoHInX5zklPiFE3z5PsPE3czGBYcaJbsJpWAhdG5088ES4zYgu6ddYRchWLfCSV44yNjSyGqPXwRxnJC_A/s1600/IMG_2702.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_aPbw9Ct8hEldcAtvd-wsmekriFTrba3qX7u-Xq1HOtxzn_Rhozr_c26lrDuoHInX5zklPiFE3z5PsPE3czGBYcaJbsJpWAhdG5088ES4zYgu6ddYRchWLfCSV44yNjSyGqPXwRxnJC_A/s640/IMG_2702.JPG" width="640" /></a></div>
</h3>
<span style="font-weight: normal;">8. Cut the dough with the attachment. Here is the finished product.</span><span style="font-weight: normal;">I don't bother adding dry flour as the noodle is not sticky.</span><br />
<h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3sV8yVJH17vSQeW8IWUSN6-Xi3-9vBBC9QI8fs95uvWHSWON71mw-L23S2QHz6uVDqMnH_UgGQXQFMBR_D_VJQUax-u0MbnIzi_reCkD6PpEJqGVLa2itUpxI62kspwM-G5loWFZWZT0/s1600/IMG_2703.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="728" data-original-width="686" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY3sV8yVJH17vSQeW8IWUSN6-Xi3-9vBBC9QI8fs95uvWHSWON71mw-L23S2QHz6uVDqMnH_UgGQXQFMBR_D_VJQUax-u0MbnIzi_reCkD6PpEJqGVLa2itUpxI62kspwM-G5loWFZWZT0/s640/IMG_2703.JPG" width="602" /></a></div>
</h3>
9. At this point you can put it in boiling water and it cooks in a minute. Rinse under cold water to stops the cooking. The noodle is very chewy. Serves 4-6. The s<span style="text-align: center;">tir fried noodles</span> was done with 1/4 of the dough.<br />
<br />10. I put it in a plastic container and freeze it. I put a layer of food wrap between servings so that they don't freeze into one lump. It take less than 2 minutes to cook in boiling water from frozen as there is no need for defrosting. <br />
<h3>
Flat hook for DIY mask</h3>
<div>
I made a <a href="https://diymask.site/" rel="nofollow" target="_blank">HKMask</a> for <a href="https://medium.com/@Cancerwarrior/covid-19-why-we-should-all-wear-masks-there-is-new-scientific-rationale-280e08ceee71" target="_blank">personal protection</a>. I am not a arts and craft person, so I had to make do with what I have. I modified the design as I don't have any thin elastic bands. I do have a lot of fat ones from my grocery.</div>
<div>
<br /></div>
<div>
I use the I core from old transformer to make a <a href="https://www.mcmaster.com/flat-hooks/" rel="nofollow" target="_blank">flat hook</a> and a AWG10 solid wire (household wiring) for the loop. The rubber band is very strong, so it is important to have the right cord lengths for comfort and fit. I crimped the 2mm paracord gently during length adjustment. Once the adjustment is done, I crimped tightly to hold it in place.</div>
<div>
<br /></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/AVvXsEj_1FsaiuVc40yXQLnjpW8g8eceHsD8Vn68WAw_AKb8OHcHUBDgoT_FEkcfxqGJSAzlheuZX49A_qkHlbUQr7PTPWSpvIfSvd4GFjFyI9Oc6NYBtdC3cJgLMwZ27-nZ9csbquAWX7ALBt9w/s1600/IMG_2692.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_1FsaiuVc40yXQLnjpW8g8eceHsD8Vn68WAw_AKb8OHcHUBDgoT_FEkcfxqGJSAzlheuZX49A_qkHlbUQr7PTPWSpvIfSvd4GFjFyI9Oc6NYBtdC3cJgLMwZ27-nZ9csbquAWX7ALBt9w/s640/IMG_2692.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">DIY flat hook</td></tr>
</tbody></table>
<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/AVvXsEg6csEfC4F6CLzxRW2fGjB3Pkp_z1QiPKC-lZ7ca_g_Jluaon1bdPtvY9j-oC_UOR4nM-cC2OL44xK5uBfOHLIFS0pmXGGAhq_hX8a2V_irq7rbmz85maOpD1_ZZ5Fxq3q7C8plN9IBAYMD/s1600/IMG_2693.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="561" data-original-width="875" height="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6csEfC4F6CLzxRW2fGjB3Pkp_z1QiPKC-lZ7ca_g_Jluaon1bdPtvY9j-oC_UOR4nM-cC2OL44xK5uBfOHLIFS0pmXGGAhq_hX8a2V_irq7rbmz85maOpD1_ZZ5Fxq3q7C8plN9IBAYMD/s640/IMG_2693.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small; text-align: start;">Hook material: stamped I/O bracket cover for a cheap PC case or transformer cores</span></td></tr>
</tbody></table>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-6350095215485693102020-03-16T19:54:00.001-04:002021-11-27T17:13:51.318-05:00STM8 Timer - servo controlled water valveThe motor in the submersible pump I was using has started to rusting after a year and a few months. The rust stops the motor from spinning until I hit it with a high enough voltage which eventually exceeded the power supply I was using.<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/AVvXsEg2rQCD1aHEx2mI8WvjJCy3J4H0Ws2WbWQWlTX8V0HvlUfrJ7mq19doNupvyVW7yZFw-GnaNm-OQLe1P1Kw-ah068sqwE2zuOfWSIhCtY0pK3P4S2osSOgyjn1hfMz1hNSSLShVFwXcA-Lx/s1600/IMG_2682.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="691" data-original-width="922" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2rQCD1aHEx2mI8WvjJCy3J4H0Ws2WbWQWlTX8V0HvlUfrJ7mq19doNupvyVW7yZFw-GnaNm-OQLe1P1Kw-ah068sqwE2zuOfWSIhCtY0pK3P4S2osSOgyjn1hfMz1hNSSLShVFwXcA-Lx/s640/IMG_2682.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pump motor is rusting</td></tr>
</tbody></table>
I ordered a couple of replacement pumps, but they are probably stopped somewhere between China and the post office due to the virus. I have decided to go for a different approach.<br />
<br />
I made a servo controlled valve to control the water flow from a <a href="https://en.wikipedia.org/wiki/Siphon" rel="nofollow" target="_blank">siphon</a>. This simplifies the overall design by removing the pump at the source and reduced the wring needed.<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/AVvXsEjkk-nQOyPp19M5SoK9swmo2S1tfU2ZdWyegmG2Y-1vCXiRer9cGNGeSTdySnzUwB5JKbqK4IESOLXMSilrj2DTGv-GyWyLP9GF6G65tA_FhBg7aVNfD7bHYwigjuS21Ez5B4h31GzkVVEU/s1600/IMG_2683.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="647" data-original-width="915" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkk-nQOyPp19M5SoK9swmo2S1tfU2ZdWyegmG2Y-1vCXiRer9cGNGeSTdySnzUwB5JKbqK4IESOLXMSilrj2DTGv-GyWyLP9GF6G65tA_FhBg7aVNfD7bHYwigjuS21Ez5B4h31GzkVVEU/s640/IMG_2683.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Top view of assembly</td></tr>
</tbody></table>
I used a <a href="http://www.towerpro.com.tw/product/sg90-360-degree-continuous-rotation-servo/" rel="nofollow" target="_blank">Tower S9 micro servo</a> mounted in a cut out dental floss case with a couple of M2 screws. I used a cheap <a href="https://www.aliexpress.com/item/32889420764.html" rel="nofollow" target="_blank">metal air valve</a>, but it seems to work okay so far for water. It is held down with 3 L shaped bracket with a couple of screws. The brackets are made out of the left over bits from the case. The servo arm is coupled to the handle with a 'g' shaped metal strip from a transformer. The valve side is loose enough to allowed it to move to accommodate for minor misalignment.<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/AVvXsEig9Mr5ND60jcCxn5kccq8u0SoBfJBaj-hk9SK6LWEyy9B4XWAbdNYO_jbEwWIuqh4TRu_5t6jagDzE8rNmzWGKPNXhW6goIomv5GxIUDjWk_YtqnVtvyFNHHgBzp1dRIKLVLIP040GW2ql/s1600/IMG_2684.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="696" data-original-width="1110" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEig9Mr5ND60jcCxn5kccq8u0SoBfJBaj-hk9SK6LWEyy9B4XWAbdNYO_jbEwWIuqh4TRu_5t6jagDzE8rNmzWGKPNXhW6goIomv5GxIUDjWk_YtqnVtvyFNHHgBzp1dRIKLVLIP040GW2ql/s640/IMG_2684.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Side view of the assembly</td></tr>
</tbody></table>
Two large holes are drill on the side of the case for connecting the tubing.<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/AVvXsEj251E1pgzOyll8XheOmW6RwPNOWDWUlW3TIwrDxqIERM9AbfaWqPl06QmVw26kzIyNvEERqaIHNWDZyJq7KZUc-6XxRbeyx5iSY5JFzF-0AsA20-SrRd9aeadFSg4t13sL-5QRt9pLD2mt/s1600/Clipboard01.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="395" data-original-width="1112" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj251E1pgzOyll8XheOmW6RwPNOWDWUlW3TIwrDxqIERM9AbfaWqPl06QmVw26kzIyNvEERqaIHNWDZyJq7KZUc-6XxRbeyx5iSY5JFzF-0AsA20-SrRd9aeadFSg4t13sL-5QRt9pLD2mt/s640/Clipboard01.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Timer Aux power supply </td></tr>
</tbody></table>
There are a few modifications needed on my <a href="https://hw-by-design.blogspot.com/2018/10/stm8-timer.html" target="_blank">timer project</a> for driving the servo.<br />
<br />
<ul>
<li>R2 is replaced by 2.7K while R7 is replaced by 8.2K. This sets the output to 5V</li>
<li>D3 is removed. The 5V output on J4B is now always on.</li>
<li>J6 is installed. The /EN signal is used for driving the servo</li>
</ul>
<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/AVvXsEgFOCpiVP-sGMcRpzs7E4u7FqZw6Vn5PvgIASrHuy2HDtiVk_j3vkDzJSz3WjzLpWPRms7YeCrHBQgmkXmt6orOgn1LbMF6pBeVTqJ14h18YCxysbqVtclJTEY2oZlu_koOKXw6sz7lpPve/s1600/Clipboard02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="370" data-original-width="838" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFOCpiVP-sGMcRpzs7E4u7FqZw6Vn5PvgIASrHuy2HDtiVk_j3vkDzJSz3WjzLpWPRms7YeCrHBQgmkXmt6orOgn1LbMF6pBeVTqJ14h18YCxysbqVtclJTEY2oZlu_koOKXw6sz7lpPve/s640/Clipboard02.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">/EN (PD3) is used as PWM for driving the servo</td></tr>
</tbody></table>
<div>
The 5V, GND, PWM signal are routed to a 3-pin connector for the servo.</div>
<div>
<br /></div>
<div>
I used TIM2 for generating a 50Hz PWM signal for controlling the servo. TIM2 is disabled after 1 second when the servo is in the "Off" position. This powers down the servo and prevents the annoying rattling in some cheap servos.</div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-91712625866697305772020-01-27T16:35:00.000-05:002020-01-27T16:50:52.224-05:00Fixing my Weller WESD51 soldering iron - quality not foundI went to the only local electronic part store eons ago to buy replacement part for my older soldering iron. It was a decent iron that lasted such a long time that the store no longer carry the replacement parts. I bought the WESD51 as it was on a back to school sale and Wellers parts and accessories was easier to find. It was a lemon. Ironically the serial number happens to be 0404 (Quality not found!?)<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/AVvXsEgKeCxaSBH6ZzhEZIqVHEUqbgYKizfUPsFrf4zglwzXgcZzt3mJ1Zr1HfB2QCUSMhmYzuKyRJCo7ouAsDcqZ6gmbGXqbWEWVKe_3H1H_xtSU19DbLdGB0UfrTRXC20yDCnpF3kKa-sQj9FP/s1600/IMG_2662.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKeCxaSBH6ZzhEZIqVHEUqbgYKizfUPsFrf4zglwzXgcZzt3mJ1Zr1HfB2QCUSMhmYzuKyRJCo7ouAsDcqZ6gmbGXqbWEWVKe_3H1H_xtSU19DbLdGB0UfrTRXC20yDCnpF3kKa-sQj9FP/s320/IMG_2662.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">4 hidden screws under the rubber feet</td></tr>
</tbody></table>
Right from the start I had a lot of issues with the iron not reading its temperatures correctly. I thought it was a connector issue, but later I found that it was a manufacturing quality problem. They change a PTC fuse into a larger package (green 2X2 at top of PCB) but didn't do a good job of touching up the soldering on the mismatched footprint. So I had to fix it up in the first few months.<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/AVvXsEj4h1qutSiF4DVOGgm2GVTFzeqJeEwgbjyCYi4_8B_MmxurDSSGFsluskHITIKn7iIXjVYQAjvHLAtDDrPBp61CRgwGso_Tnk_zROfFmofFtiNanNcSN3YiYsfNqWHbT82siyrj9ilCWqeW/s1600/IMG_2665.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4h1qutSiF4DVOGgm2GVTFzeqJeEwgbjyCYi4_8B_MmxurDSSGFsluskHITIKn7iIXjVYQAjvHLAtDDrPBp61CRgwGso_Tnk_zROfFmofFtiNanNcSN3YiYsfNqWHbT82siyrj9ilCWqeW/s640/IMG_2665.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Control PCB</td></tr>
</tbody></table>
A trimpot has limited cycles, so personally I wouldn't use it for a temperature control knob. It did last a very long time, but obviously not long enough vs the rest of the iron. A few months ago, the temperature setting started jumping beyond my set point due to wiper contact issues. I knew I had to repair 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/AVvXsEiuhsSXwHcJnGHWBWhbPR1Qx97UurqtiELVV4FlDBJVXi8d8_Hl6HDsdZPmJI-3O9Jp2A7ZZ51gf5YrFutasIsEh6uxbD7vtRB9BHyDX9c-m4R4y55nmgqDlcujM1WL_okktmFWKxPDIB1X/s1600/IMG_2663.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuhsSXwHcJnGHWBWhbPR1Qx97UurqtiELVV4FlDBJVXi8d8_Hl6HDsdZPmJI-3O9Jp2A7ZZ51gf5YrFutasIsEh6uxbD7vtRB9BHyDX9c-m4R4y55nmgqDlcujM1WL_okktmFWKxPDIB1X/s640/IMG_2663.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">PCB back side</td></tr>
</tbody></table>
<span style="text-align: center;">As I was opening it up, I found out that they didn't do a proper crimping job on the AC leads of the power transformer as they tried to crimp a tinned wire instead of bare wires!? Solder is soft, so eventually the wire came loose.</span><br />
<div style="text-align: center;">
<br /></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/AVvXsEj3Ny7z0aOLe9ISMgjjilYTgk1qkwclgz7y1RIKpwkQXtG_tw7E2bIZdC-pdvAKUuTeSr9cnOVrckuZUZ22ts7_nWB9o2DfpeuFin8cAawoMB8nQLwwzORW8_X1pq4iJEFgOXpaH6fuuuO4/s1600/IMG_2664.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Ny7z0aOLe9ISMgjjilYTgk1qkwclgz7y1RIKpwkQXtG_tw7E2bIZdC-pdvAKUuTeSr9cnOVrckuZUZ22ts7_nWB9o2DfpeuFin8cAawoMB8nQLwwzORW8_X1pq4iJEFgOXpaH6fuuuO4/s640/IMG_2664.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Poor crimp job</td></tr>
</tbody></table>
<div style="text-align: left;">
Here is the cheese knob for the trimpot. It was held together with a self tapping screw. I had to put in some hot glue to hold the screw.</div>
<div style="text-align: center;">
<br /></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/AVvXsEhzXExyALDQTpvdhnXZpKQbfWeVxeG3fv7DfTMpyMW6V3yv3vvauQMYIH_6237nUITzb8JLMHYESLpNDEy6LWHqxVFi7TUjD8IIDopZucRlpWjnjzNtguIH0o6hUBDAvpIoNUIpRJeMTixR/s1600/IMG_2666.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="438" data-original-width="571" height="488" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzXExyALDQTpvdhnXZpKQbfWeVxeG3fv7DfTMpyMW6V3yv3vvauQMYIH_6237nUITzb8JLMHYESLpNDEy6LWHqxVFi7TUjD8IIDopZucRlpWjnjzNtguIH0o6hUBDAvpIoNUIpRJeMTixR/s640/IMG_2666.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cheap plastic knob for the temperature control</td></tr>
</tbody></table>
<div style="text-align: left;">
I ordered the smallest <a href="https://www.aliexpress.com/item/33011592013.html" rel="nofollow" target="_blank">10K linear potentiometer</a> I can find and they arrived today. I couldn't find any 2K pots. Since it is to provide a 0V to Vcc to the ADC. The increase in source impedance could affect the ADC result. One way to fix it it to wire a 0.1uF cap from wiper to Gnd, but that is not needed here.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
They are not the greatest quality, but I got a bag of 5 for cheap. They came with washer and a nut. I use a pencil to trace the outline of the washer on the PCB and milled out a notch for the locating pin.</div>
<div style="text-align: center;">
<br /></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/AVvXsEifORJPDMd2nP1stcmUhHJjdfBNhLhuI0BfBxuD-BWDPq6JLWeDZyF3XuxgO-c736yemn71X221joQu7YxVP4Agb6VNCd1lD2SIrqRtYDaUtv7NpqhSv-rxBN1pZixlknxInMLh5YofxZmR/s1600/IMG_2667.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifORJPDMd2nP1stcmUhHJjdfBNhLhuI0BfBxuD-BWDPq6JLWeDZyF3XuxgO-c736yemn71X221joQu7YxVP4Agb6VNCd1lD2SIrqRtYDaUtv7NpqhSv-rxBN1pZixlknxInMLh5YofxZmR/s640/IMG_2667.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Modification to the PCB</td></tr>
</tbody></table>
<div style="text-align: left;">
I mounted the pot onto the PCB and soldered the pins to the existing pads with wires.</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/AVvXsEik3mgCb8CxlvCiZZtdYUbeRiEnFBP6m7dmZXq8i4jd5P17val5rOgBt2Oa0t4MK-E0ngBOMpUGzhS_EL1XvhmhWVvEz6obIDuPx2P2yrZ7gpdpe0J-Ad4N54GhVp7w36i2P3xuPWkdJrir/s1600/IMG_2675.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik3mgCb8CxlvCiZZtdYUbeRiEnFBP6m7dmZXq8i4jd5P17val5rOgBt2Oa0t4MK-E0ngBOMpUGzhS_EL1XvhmhWVvEz6obIDuPx2P2yrZ7gpdpe0J-Ad4N54GhVp7w36i2P3xuPWkdJrir/s640/IMG_2675.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Pot connections</td></tr>
</tbody></table>
<div style="text-align: left;">
I had to remove a bit of the material in front case to clear the mounting hardware for the pot.</div>
<div style="text-align: center;">
<br /></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/AVvXsEimpHn17TnNJnAj8G9jEffjWqoXtV5rtEnabcWPscUoY5QM0rUS-lvl7IcU6YsR0oKWuTCCtDf4QLI3ukkdBoiRhVW5AiSv_a8gXmNhAjiEVgb9IPoBJUQLIzjUyWNV-NaLM6xJpMVdRuoH/s1600/IMG_2668.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="627" data-original-width="1065" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimpHn17TnNJnAj8G9jEffjWqoXtV5rtEnabcWPscUoY5QM0rUS-lvl7IcU6YsR0oKWuTCCtDf4QLI3ukkdBoiRhVW5AiSv_a8gXmNhAjiEVgb9IPoBJUQLIzjUyWNV-NaLM6xJpMVdRuoH/s640/IMG_2668.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Making room for the mounting hardware</td></tr>
</tbody></table>
<div style="text-align: left;">
I use a reamer to enlarge the hole, so that the PCB can be mounted flush.</div>
<div style="text-align: center;">
<br /></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/AVvXsEjEeSELyTKeWLaBk_59f2lZ-xvSI7AbsZYGuDof0LY0FOgbytzFzIocbi798wC7wPEMEu7_-3QxjCc4kfnRTzq2DS8AdsZF66NAXZ9FDxnossCBt4cUPJNN5YB0VgF3sw-bvcgl_ELrq-w_/s1600/IMG_2669.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="648" data-original-width="983" height="420" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEeSELyTKeWLaBk_59f2lZ-xvSI7AbsZYGuDof0LY0FOgbytzFzIocbi798wC7wPEMEu7_-3QxjCc4kfnRTzq2DS8AdsZF66NAXZ9FDxnossCBt4cUPJNN5YB0VgF3sw-bvcgl_ELrq-w_/s640/IMG_2669.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Old Radio Shack reamer</td></tr>
</tbody></table>
<div style="text-align: left;">
It ain't pretty as it is soft plastic. The hole is hidden away by the knob. The shaft is barely long enough.</div>
<div style="text-align: center;">
<br /></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/AVvXsEijYFodK_VuLb1AidIdRlinYdOkRUdZ1rdxRcgbTkca-bvPDbTa-0rn81zwPEIWL7YENa1OJvolH-ZeJM-ZzAGf5LN8UsArNl_n6n3oX95k51R_A6H_ah8hQOT-S3jfsW4kUdpfviN9s1Xd/s1600/IMG_2676.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="864" data-original-width="1152" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijYFodK_VuLb1AidIdRlinYdOkRUdZ1rdxRcgbTkca-bvPDbTa-0rn81zwPEIWL7YENa1OJvolH-ZeJM-ZzAGf5LN8UsArNl_n6n3oX95k51R_A6H_ah8hQOT-S3jfsW4kUdpfviN9s1Xd/s640/IMG_2676.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The big hole I made</td></tr>
</tbody></table>
<div style="text-align: left;">
I broke off the cheesy plastic off the knob. I got some cheap <a href="https://www.aliexpress.com/item/32608693397.html" target="_blank">plastic knob</a> from China that is small enough to fit inside the cavity.</div>
<div style="text-align: center;">
<br /></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/AVvXsEgyR5rBR0q9d8f9egjIjexgz3qq-8LiLqe9-RVytESGNYy1s6tNitsY_ACwGYREe_1GVcS0nS63SmCfOXc4VOVU4EeZ0qC3bRTVk8Z3h8fwC5I6E8vRmXhEa7wN2l0TjIAC0YQds-Rc2j4Q/s1600/IMG_2670.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="471" data-original-width="950" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyR5rBR0q9d8f9egjIjexgz3qq-8LiLqe9-RVytESGNYy1s6tNitsY_ACwGYREe_1GVcS0nS63SmCfOXc4VOVU4EeZ0qC3bRTVk8Z3h8fwC5I6E8vRmXhEa7wN2l0TjIAC0YQds-Rc2j4Q/s640/IMG_2670.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Temperature control knob</td></tr>
</tbody></table>
<div style="text-align: left;">
It wasn't tall enough nor wide enough, so I had to improvise. I melted about 1/2" of hot glue stick with my hot air tool set at 120C in the cavity.</div>
<div style="text-align: center;">
<br /></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/AVvXsEim2dNgZ-xjSz2di5m9AeClQXNaepX8sFoUagGvecb7KywB6JqBV2waz4vtFvaS_zFYs9DaDZ1JF2ufjhAn-p52ta0X3BwLjLKFcvHwGxaRX0SzCmXVUa95gH8OYPGlrXdwFcPU9e2TLidk/s1600/IMG_2672.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="642" data-original-width="869" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim2dNgZ-xjSz2di5m9AeClQXNaepX8sFoUagGvecb7KywB6JqBV2waz4vtFvaS_zFYs9DaDZ1JF2ufjhAn-p52ta0X3BwLjLKFcvHwGxaRX0SzCmXVUa95gH8OYPGlrXdwFcPU9e2TLidk/s640/IMG_2672.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Hot glue to the rescue</td></tr>
</tbody></table>
<div style="text-align: left;">
I pushed the plastic knob into the molten hot glue and wait for it to set. I filed down the knob so that it is flush. I added some extra hot glue for support on the sides as well.</div>
<div style="text-align: center;">
<br /></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/AVvXsEgbiF5G-S6FEV9oFH044vEY1u7vpUAeVvUPxForz9_E4MdnN0yb8LYJUCQQoVEArYMbzHlIGm-XMJEycY_vQJ2CJCjN0cA8ErIAqjHwbtglKFeNSOdrGWjXEH7j2kTsK3zouE1qNark06ye/s1600/IMG_2673.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="464" data-original-width="517" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbiF5G-S6FEV9oFH044vEY1u7vpUAeVvUPxForz9_E4MdnN0yb8LYJUCQQoVEArYMbzHlIGm-XMJEycY_vQJ2CJCjN0cA8ErIAqjHwbtglKFeNSOdrGWjXEH7j2kTsK3zouE1qNark06ye/s1600/IMG_2673.JPG" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Improvised knob</td></tr>
</tbody></table>
<div style="text-align: left;">
One of the things I did to prevent the plastic mounting post from splitting was to use a piece of cable around it. I wish they would use threaded inserts.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDpFZtoYEjZBcr9XIPP1ZzHIMVud-aJqjxu6dh4bhvfz_a_AxtMiWyTSvoFW0FaYjUpPvWeguRFnLbGpaevZJwmBoUi9R3dfenxHRYrJEetSJucbYuZA2-nC0F6yXs4M_1JZAJMPU2ZcJD/s1600/IMG_2674.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="575" data-original-width="812" height="452" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDpFZtoYEjZBcr9XIPP1ZzHIMVud-aJqjxu6dh4bhvfz_a_AxtMiWyTSvoFW0FaYjUpPvWeguRFnLbGpaevZJwmBoUi9R3dfenxHRYrJEetSJucbYuZA2-nC0F6yXs4M_1JZAJMPU2ZcJD/s640/IMG_2674.JPG" width="640" /></a></div>
<div style="text-align: center;">
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4577061874338677369.post-36140319202601740362020-01-12T21:02:00.001-05:002021-03-08T20:07:03.941-05:00STM8 LED Clock - Part 2Go to <a href="https://hw-by-design.blogspot.com/2019/11/stm8-led-clock-part-1.html">Part 1</a><br />
<br />
The regular <a href="http://www.txccrystal.com/term.html" rel="nofollow" target="_blank">AT-cut crystal</a> has a temperature variation that can be modeled by a cubic equation. Variations from the ideal angle produces the following curves centered around 25C.<br />
<br />
<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/AVvXsEgUACTXA8UYrMlzpDOi27YdBESmyrTj3dLx5YsUqU8lx8pEZWMFgiN9zwdTnhAtWjPu4ljZBf-lGJ9AM3hx_yjvSRSYJ1MNXRtNEZPjLns5Ym6q98a5MOOKR7X0pYaQNzUP3YIwQkWjEBOR/s1600/d-7.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="335" data-original-width="505" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUACTXA8UYrMlzpDOi27YdBESmyrTj3dLx5YsUqU8lx8pEZWMFgiN9zwdTnhAtWjPu4ljZBf-lGJ9AM3hx_yjvSRSYJ1MNXRtNEZPjLns5Ym6q98a5MOOKR7X0pYaQNzUP3YIwQkWjEBOR/s1600/d-7.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span face=""arial" , "helvetica" , sans-serif" style="background-color: white; font-size: 12px;">AT - cut frequency-temperature characteristics.</span></td></tr>
</tbody></table>
If the temperature variation is small enough, then a regular AT-cut crystal might be good enough.</div>
<div>
e.g. home with heater during the winter set to 21C and air conditioner set to 25C for the summer. The temperature variation is roughly 4C.</div>
<div>
<br /></div>
<div>
For a wide temperature range or lower temperature dependency, you might want to use a <a href="https://en.wikipedia.org/wiki/Crystal_oscillator#Temperature" target="_blank">TCXO</a> (Temperature compensated crystal oscillator).</div>
<br />
There are a few ways of making an accurate clock out of an oscillator:<br />
<ol>
<li>Use an external accurate clock source and/or resync. the time e.g. GPS or internet time</li>
<li>Try to adjust the clock frequency of the oscillator by changing the <a href="https://www.electronicdesign.com/technologies/analog/article/21795717/fundamentals-of-crystal-oscillator-design" target="_blank">load capacitance</a>. This is difficult and the adjustable range might not be enough.</li>
<li>Try to compensate for the tolerance by changing the frequency divider.</li>
</ol>
<div>
I am using the last approach as it is the least expensive and provide a finer repeatable adjustment than what is possible a trimmer capacitor. The CPU clock is divided down to generate IRQ for the software real time clock.</div>
<div>
<br /></div>
<div>
In my <a href="https://hw-by-design.blogspot.com/2018/10/stm8-timer.html" target="_blank">Timer</a> project, I used a hardware timer set to overflow every 60,000. By changing this value, I can tweak the IRQ by ~ 1/60000 which should be good enough for +/-0.72 sec/day accuracy after calibration. </div>
<div>
<br /></div>
<div>
This time, I generate a 20Hz IRQ and further divide down the frequency to 10Hz for the RTC using a 24-bit Numerically Controlled Oscillator (<a href="https://en.wikipedia.org/wiki/Numerically-controlled_oscillator" target="_blank">NCO</a>). The NCO allows for very fine frequency.adjustments.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
The 3 lines NCO code is actually much simpler than the firmware that would be required to extend the hardware timer divider beyond 16 bits.</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/AVvXsEgjPQ2g563KEDqpQE-xL30p4iUZ_UfvQ11cAZ2uUFrOXqdPLWujA8uERpQUHKFvsj7vuTrcrC5h6q9xxSKr4RDuUfZsl7kXVDGQ6F4pfmDpQZu6RM-Id9sclIRWXZaYGxjR8kAtfW4gYlXf/s1600/Clipboard01.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="123" data-original-width="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjPQ2g563KEDqpQE-xL30p4iUZ_UfvQ11cAZ2uUFrOXqdPLWujA8uERpQUHKFvsj7vuTrcrC5h6q9xxSKr4RDuUfZsl7kXVDGQ6F4pfmDpQZu6RM-Id9sclIRWXZaYGxjR8kAtfW4gYlXf/s1600/Clipboard01.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">DDS Code</td></tr>
</tbody></table>
<div>
So far I have calibrated the clock by simply comparing when the clock changes vs <a href="https://time.is/">https://time.is/</a> - whether it is faster or slow and by using a <a href="https://en.wikipedia.org/wiki/Binary_search_algorithm" target="_blank">binary search algorithm</a> to find the value. This doesn't require any additional coding or equipment, but it takes a bit of time.</div>
<div>
<br /></div>
<div>
The latest calibration is less than +/-1 sec/month after 7-8 turns of such adjustments. I measured 1 second difference after 4 weeks 6 days.</div>
<br />
<div>
Additional Reference:<br />
<ul>
<li><a href="https://www.electronicdesign.com/technologies/analog/article/21795717/fundamentals-of-crystal-oscillator-design">https://www.electronicdesign.com/technologies/analog/article/21795717/fundamentals-of-crystal-oscillator-design</a></li>
<li><a href="https://blog.dan.drown.org/rtc-comparison/">https://blog.dan.drown.org/rtc-comparison/</a></li>
</ul>
<div>
User Interface</div>
<div>
<div style="box-sizing: border-box; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; margin-bottom: 10px; overflow-wrap: break-word; padding: 0px;">
The clock and display time:</div>
<figure style="box-sizing: border-box; clear: both; color: white; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 16px; outline: 0px; padding: 0px; position: relative;"><img class="lazy" src="https://cdn.hackaday.io/images/1243751579203319354.jpg" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 1em auto; max-width: 100%; vertical-align: middle;" /></figure><div style="box-sizing: border-box; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; margin-bottom: 10px; overflow-wrap: break-word; padding: 0px;">
The arrows key switches between the time and date display. The date display uses a different format to distinguish the modes. The 7 segment LED can only show a limited set of characters and have to make the closest approximations. </div>
<figure style="box-sizing: border-box; clear: both; color: white; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 16px; outline: 0px; padding: 0px; position: relative;"><img data-image="1579434068852" src="https://cdn.hackaday.io/images/6703021579434068472.png" style="border: 0px; box-sizing: border-box; display: block; height: auto; margin: 1em auto; max-width: 100%; vertical-align: middle;" /></figure><div style="box-sizing: border-box; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; margin-bottom: 10px; overflow-wrap: break-word; padding: 0px;">
e.g. Th(ursday) 16 Jan is shown below.</div>
<figure style="box-sizing: border-box; clear: both; font-family: Proxima-Nova, "Proxima Nova", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; margin: 0px 0px 16px; outline: 0px; padding: 0px; position: relative;"><img class="lazy" src="https://cdn.hackaday.io/images/8033841579203237194.JPG" style="border: 0px; box-sizing: border-box; cursor: pointer; display: block; height: auto; margin: 1em auto; max-width: 100%; vertical-align: middle;" /></figure>The user interface is still work in progress as the display is very limited. Here is how to set the time.</div>
</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/AVvXsEg5blx55c2UAA3ExFS1vC7CGSI-pUSjJgXzIWAigx6irwhi5soFD959KDc7OP-Ytk89B1dXoUIdJI6PofBCnmIvmxUDSAtwLab7kWHlAgb6wvXNh6zegkFhOgRDaGJsyxgqivwkwFP3jHc1/s1600/set+time.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="317" data-original-width="571" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5blx55c2UAA3ExFS1vC7CGSI-pUSjJgXzIWAigx6irwhi5soFD959KDc7OP-Ytk89B1dXoUIdJI6PofBCnmIvmxUDSAtwLab7kWHlAgb6wvXNh6zegkFhOgRDaGJsyxgqivwkwFP3jHc1/s1600/set+time.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">How to set time</td></tr>
</tbody></table>
<div>
Alternately, Hold the Menu for ~1 second to exit the setting mode.</div>
<div>
<br /></div><div>Go to <a href="https://hw-by-design.blogspot.com/2021/03/stm8-led-clock-part-3.html" rel="nofollow">Part 3</a> for my new alarm clock.</div>
Unknownnoreply@blogger.com0