tag:blogger.com,1999:blog-64874864347165750682024-03-14T01:15:10.664-07:0040% KeyboardsA blog about small mechanical keyboards.Unknownnoreply@blogger.comBlogger330125tag:blogger.com,1999:blog-6487486434716575068.post-75122742860244425802021-10-12T13:18:00.000-07:002021-10-12T19:34:20.646-07:00PiPi Mherkin<h1 style="text-align: left;">The Micro Gherkin</h1><p>The tiniest Pi Pico powered keypad. Both the switches and the Pi Pico are surface mounted, back to back.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-yZ_6rELb_D4/YWXjEiWnU_I/AAAAAAACgpA/Pkt0qzOI78gJV1rC3XsHxrgg3o0ZMpH9gCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-yZ_6rELb_D4/YWXjEiWnU_I/AAAAAAACgpA/Pkt0qzOI78gJV1rC3XsHxrgg3o0ZMpH9gCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The 30 switches were selected from the <a href="https://jlcpcb.com/parts" target="_blank">jlcpcb.com SMT parts inventory</a>. I had 5 boards made and assembled. The <a href="https://git.40percent.club/di0ib/Misc/raw/branch/master/mherkin/BOM_PCB_merkin.csv" target="_blank">BOM</a> is only 3 parts; switches, Pi Pico and the 3 tool marks (registration holes). JLCPCB supplies and SMT assembled the switches.</p><p>When I placed the order the <a href="https://git.40percent.club/di0ib/Misc/raw/branch/master/mherkin/PickAndPlace_PCB_merkin_.csv" target="_blank">Pick and Place</a> preview looked incorrect, but after the order was placed and reviewed the preview was corrected.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SFKqG8o8HPU/YWXjEz3FnSI/AAAAAAACgpE/W-q-9z6LqvMN8CpNUoBHhvLCCeSFoumswCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-SFKqG8o8HPU/YWXjEz3FnSI/AAAAAAACgpE/W-q-9z6LqvMN8CpNUoBHhvLCCeSFoumswCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>Four of the boards. Top, bare bottom, bottom with Pi Pico soldered on, and an assembled board with 4mm M2 spacers and screws.</p><p>The board is running <a href="https://github.com/picoruby/prk_firmware" target="_blank">PRK firmware</a>. PRK is very easy to use. It mounts the board as a USB drive so you can directly edit the configuration file with a text editor, much like <a href="https://github.com/KMKfw" target="_blank">KMK firmware</a>/<a href="https://circuitpython.org/" target="_blank">CircuitPython</a>. I used the <a href="https://github.com/picoruby/prk_pipigherkin" target="_blank">prk_pipigherkin</a> configuration. The only change needed was to the <a href="https://github.com/picoruby/prk_pipigherkin/blob/master/keymap.rb#L10-L16" target="_blank">pin definitions</a>. </p><p style="margin-left: 40px; text-align: left;"><span style="background-color: #fff2cc;"><span style="font-size: x-small;"><span style="font-family: courier;">kbd.init_pins(<br /> [ 12, 13, 14 ],<br /> [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]<br />)</span></span></span><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-WWc80O1z_9Y/YWXjE4VhnyI/AAAAAAACgpI/thZ8sJ196JQlyi2GPnOwu2fY2q0XvfKRgCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-WWc80O1z_9Y/YWXjE4VhnyI/AAAAAAACgpI/thZ8sJ196JQlyi2GPnOwu2fY2q0XvfKRgCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>I had also made a top plate, but the switches are so short that they don't protrude at all and can't be pressed. Also, in 2 of the 5 boards the switches were not aligned well enough to fit the top over them.</p><p>LCSC.com has <a href="https://lcsc.com/search?q=GT-TC070B" target="_blank">variations of this switch</a> with different heights and weights, but JLCPCB only had the 2mm tall/250g version available for assembly.<br /></p><p>This is too small (64x26mm) for a practical keyboard, but it makes a decent, very compact macropad. Assembled with 4mm spacers it is only 9mm thick.</p><p>Files on <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/mherkin" target="_blank">git</a>.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-18850547525271710062021-02-12T13:07:00.000-08:002021-02-12T13:07:07.613-08:00PiPi Gherkin<h1 style="text-align: left;">Gherkin for the Raspberry Pi Pico</h1><p>Gherkin PCB built specifically for the Raspberry Pi Pico. It has the option of soldering switches directly to the PCB or use sockets. The shape of the PCB and the position of the switches and screw holes are the same as the regular <a href="https://www.40percent.club/2016/11/gherkin.html" target="_blank">Gherkin</a>, it can use the same top an bottom plates.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ke1ChbWMQLI/YCRO13iFq2I/AAAAAAACY9I/QbOpBCpFuTc-oHLnHHB9oRERyFMnK6a7QCLcBGAsYHQ/s4032/a0.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="480" src="https://1.bp.blogspot.com/-ke1ChbWMQLI/YCRO13iFq2I/AAAAAAACY9I/QbOpBCpFuTc-oHLnHHB9oRERyFMnK6a7QCLcBGAsYHQ/w640-h480/a0.jpg" width="640" /></a></div><p></p><p>I don't really like these sockets, but they are cheap and I won't have to buy as many switches. If you buy in bulk you can get them for as low as $0.08 per piece. That is 1/3 the cost of the cheapest MX switches.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-GUsgi2oWzWg/YCRO0NsphrI/AAAAAAACY9A/uSODWF_9X7UNlrgF7OQy6EZqDDm8QXwkgCLcBGAsYHQ/s797/a01.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="228" data-original-width="797" height="115" src="https://1.bp.blogspot.com/-GUsgi2oWzWg/YCRO0NsphrI/AAAAAAACY9A/uSODWF_9X7UNlrgF7OQy6EZqDDm8QXwkgCLcBGAsYHQ/w400-h115/a01.png" width="400" /></a></div><p></p><p>The PCB has the normal solder pads for MX switches in one orientation and the sockets in the other.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-AoqUZynsuqo/YCRO0R8sshI/AAAAAAACY9E/VkNlC3jaXhklB9lm-zT2Vk49Am7JKqBAACLcBGAsYHQ/s1600/a1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-AoqUZynsuqo/YCRO0R8sshI/AAAAAAACY9E/VkNlC3jaXhklB9lm-zT2Vk49Am7JKqBAACLcBGAsYHQ/w640-h480/a1.jpg" width="640" /></a></div><p></p><p>The PiPi Gherkin PCB fits in the old <a href="https://www.40percent.club/2016/12/pcb-plates.html" target="_blank">Gherkin top/bottom PCB plates</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-E6tPHQl1P8s/YCRO2BRzNTI/AAAAAAACY9M/4M16J-mikoYkvLubRga58fuky8r5Gz-XACLcBGAsYHQ/s1600/a2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-E6tPHQl1P8s/YCRO2BRzNTI/AAAAAAACY9M/4M16J-mikoYkvLubRga58fuky8r5Gz-XACLcBGAsYHQ/w640-h480/a2.jpg" width="640" /></a></div><p></p><p>M2 spacers and screws.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-U-eNnIercRA/YCRO2A9goAI/AAAAAAACY9Q/tN1TnF6cmFUBwyPBSDgHOyS6962TBa0_wCLcBGAsYHQ/s1600/a3.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-U-eNnIercRA/YCRO2A9goAI/AAAAAAACY9Q/tN1TnF6cmFUBwyPBSDgHOyS6962TBa0_wCLcBGAsYHQ/w640-h480/a3.jpg" width="640" /></a></div><p></p><p>I used 13mm M2 spacers, 12mm should also be enough to clear the USB connector on the Raspberry Pi Pico.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-79_-qgOakpM/YCRO2fwr_bI/AAAAAAACY9U/jFeh-jaRRNs0aFGszghPjS1q2Emx6xJhQCLcBGAsYHQ/s1600/a4.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-79_-qgOakpM/YCRO2fwr_bI/AAAAAAACY9U/jFeh-jaRRNs0aFGszghPjS1q2Emx6xJhQCLcBGAsYHQ/w640-h480/a4.jpg" width="640" /></a></div><p>Micro USB connector of the Raspberry Pi Pico.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-2dYRlmjDaDE/YCRO2k8FoYI/AAAAAAACY9Y/v37jW19-IWsoRhV4ZjDnz2ZU9tMIUSa6gCLcBGAsYHQ/s1600/a5.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-2dYRlmjDaDE/YCRO2k8FoYI/AAAAAAACY9Y/v37jW19-IWsoRhV4ZjDnz2ZU9tMIUSa6gCLcBGAsYHQ/w640-h480/a5.jpg" width="640" /></a></div><p></p><p>Separated, switches can now be used in something else.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-HU_wbrPlliM/YCRO29NHG2I/AAAAAAACY9c/Z3F2-l7bizYngsHGTE35UfNaSjo-AB6OwCLcBGAsYHQ/s1600/a6.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-HU_wbrPlliM/YCRO29NHG2I/AAAAAAACY9c/Z3F2-l7bizYngsHGTE35UfNaSjo-AB6OwCLcBGAsYHQ/w640-h480/a6.jpg" width="640" /></a></div><p></p><p>All of the pins on the Raspberry Pi Pico are broken out to pads. The pins used for the matrix are listed <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PiPi%20Gherkin/code.py#L10-L11" target="_blank">here</a>, the rest can be used for other things.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-LE3fbLMg8as/YCRO3AmdJ0I/AAAAAAACY9g/CEihKq3Gg50R07TrhBEf94rfhq_F83CRACLcBGAsYHQ/s1600/b1.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-LE3fbLMg8as/YCRO3AmdJ0I/AAAAAAACY9g/CEihKq3Gg50R07TrhBEf94rfhq_F83CRACLcBGAsYHQ/w640-h480/b1.jpg" width="640" /></a></div><p></p><p>It is possible to construct it plateless. The pads for the sockets come very close but do not touch regular cheap M2 spacers.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-dLl9H4dTFrg/YCRO3LVwF2I/AAAAAAACY9k/aAO3Kj3isc4KtpgbFANO0V_I95cxKLxxQCLcBGAsYHQ/s1600/b2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-dLl9H4dTFrg/YCRO3LVwF2I/AAAAAAACY9k/aAO3Kj3isc4KtpgbFANO0V_I95cxKLxxQCLcBGAsYHQ/w640-h480/b2.jpg" width="640" /></a></div><p></p><p><a href="https://www.40percent.club/2018/06/dressing-up-cheap-m2-spacers.html" target="_blank">Nylon M3 spacers fit over the M2 spacer</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-zRXQbB6sdhw/YCRO3asW_EI/AAAAAAACY9o/Q6vMtJXlJVwKDdpeakjMKnyaxUQlAxmaACLcBGAsYHQ/s1600/b3.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-zRXQbB6sdhw/YCRO3asW_EI/AAAAAAACY9o/Q6vMtJXlJVwKDdpeakjMKnyaxUQlAxmaACLcBGAsYHQ/w640-h480/b3.jpg" width="640" /></a></div><p></p><p>Plateless works with PCB mount switches. There isn't much holding the switches in place other than the friction fit of the PCB mount pins and the sockets.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-C7OOZgg_ado/YCRO3bGlY_I/AAAAAAACY9w/1aRsWZpdg-odnQ--xQ8OR863Y2YmhSWBACLcBGAsYHQ/s1600/b4.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-C7OOZgg_ado/YCRO3bGlY_I/AAAAAAACY9w/1aRsWZpdg-odnQ--xQ8OR863Y2YmhSWBACLcBGAsYHQ/w640-h480/b4.jpg" width="640" /></a></div><p></p><p>8mm spacers, 7mm should also be tall enough.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-aNXCbEzkvLg/YCRO3s4EOvI/AAAAAAACY9s/XV-z514gLC4PzxQbmhhsrbfWshlC0FSuwCLcBGAsYHQ/s1600/b5.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="480" src="https://1.bp.blogspot.com/-aNXCbEzkvLg/YCRO3s4EOvI/AAAAAAACY9s/XV-z514gLC4PzxQbmhhsrbfWshlC0FSuwCLcBGAsYHQ/w640-h480/b5.jpg" width="640" /></a></div><p></p><p>This is running KMK with this <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PiPi%20Gherkin/code.py" target="_blank">config file</a>. The current release version of KMK will need the led.py file modified as described <a href="https://www.40percent.club/2021/01/pb-gherkin-raspberry-pi-pico-kmk.html" target="_blank">here</a>.</p><p>Gerber files on <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PiPi%20Gherkin" target="_blank">git</a>. </p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-43042279832940735612021-02-03T10:15:00.003-08:002021-02-10T13:28:00.271-08:00KMK-Explorer<h1 style="text-align: left;">Carrier board for KMK experimenting</h1><p>Three different KMK compatible MCU boards can be plugged into this board with a 12x4 key matrix of 6x6mm tactile switches.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-93rIpCOk3EI/YBrmBH0TLDI/AAAAAAACY5s/Ysglj24tD3Qrc_mZf2Dj51SjSWqDkMb0wCLcBGAsYHQ/s2048/a%2Bsaola.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-93rIpCOk3EI/YBrmBH0TLDI/AAAAAAACY5s/Ysglj24tD3Qrc_mZf2Dj51SjSWqDkMb0wCLcBGAsYHQ/w640-h480/a%2Bsaola.jpg" width="640" /></a></div><p></p><p>The <a href="https://www.40percent.club/2021/01/pb-gherkin-esp32-s2-kmk.html" target="_blank">ESP32-S2 Saola</a> board was the primary reason for this board. The micro USB connector is not the USB HID interface. Pins 19/20 are USB -/+. These are connected to the mini USB connector.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Hlz3dl-lAdc/YBrmAiUn3qI/AAAAAAACY5k/4dC0bwBoJpEAitzQ-cx9vtLwQK0goGRDgCLcBGAsYHQ/s2048/b%2Bpi.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Hlz3dl-lAdc/YBrmAiUn3qI/AAAAAAACY5k/4dC0bwBoJpEAitzQ-cx9vtLwQK0goGRDgCLcBGAsYHQ/w640-h480/b%2Bpi.jpg" width="640" /></a></div><p></p><p>The narrower Raspberry Pi Pico fits inside the ESP32-S2 Saola footprint. You will need to modify the KMK led.py as described <a href="https://www.40percent.club/2021/01/pb-gherkin-raspberry-pi-pico-kmk.html" target="_blank">here</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-hVzYPinffOc/YBrmA1lgh9I/AAAAAAACY5o/4QH-UgVk8hgz7gsFCq0b8sFyy0ClhUxbwCLcBGAsYHQ/s2048/c%2Bnrf.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-hVzYPinffOc/YBrmA1lgh9I/AAAAAAACY5o/4QH-UgVk8hgz7gsFCq0b8sFyy0ClhUxbwCLcBGAsYHQ/w640-h480/c%2Bnrf.jpg" width="640" /></a></div><p></p><p>The Adafruit NRF52840 Express takes up the remaining space. The Adafruit NRF52840 also works over <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/explorer/code.py#L54-L55" target="_blank">BLE</a> if enabled (USB or BLE, not both).</p><p>All three MCU run the same <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/explorer/code.py" target="_blank">KMK script</a>. The only differences are the board pin definitions. <br /></p><p>Gerber files on <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/explorer" target="_blank">git</a>.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-85823841275430212442021-01-29T10:56:00.001-08:002021-01-29T10:56:07.132-08:00Compiling/flashing TMK on my phone<h1 style="text-align: left;">PinePhone running Mobian</h1><p><a href="https://www.pine64.org/pinephone/" target="_blank">PinePhone</a> <a href="https://wiki.pine64.org/wiki/PinePhone_v1.1_-_Braveheart" target="_blank">Braveheart edition</a> running <a href="https://mobian-project.org/" target="_blank">Mobian</a>. It's a little slower than compiling on a Raspberry Pi 3, otherwise the process is the same. The final community edition of the <a href="https://wiki.pine64.org/index.php/PinePhone#Hardware_revisions" target="_blank">PinePhone</a> is on <a href="https://www.pine64.org/2021/01/17/mobian-community-edition/" target="_blank">pre-order</a>. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-TxZTpN0ee5U/YBRXoBQZatI/AAAAAAACY4g/H4QIdTJ5JvcPQf41hpaKmCl9o6CLz9dlwCLcBGAsYHQ/s2048/pinephone.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-TxZTpN0ee5U/YBRXoBQZatI/AAAAAAACY4g/H4QIdTJ5JvcPQf41hpaKmCl9o6CLz9dlwCLcBGAsYHQ/w640-h480/pinephone.jpg" width="640" /></a></div><br /><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-13846690688057013312021-01-27T08:50:00.004-08:002021-02-14T19:48:35.297-08:00PB-GHERKIN Raspberry Pi Pico KMK<h1 style="text-align: left;">KMK running on the RP2040</h1><p>I used the same modified PB-Gherkin I used for testing the <a href="https://www.40percent.club/2021/01/pb-gherkin-esp32-s2-kmk.html" target="_blank">ESP32-S2</a> to test KMK on the new Raspberry Pi Pico. There is a <a href="https://circuitpython.org/board/raspberry_pi_pico/" target="_blank">Beta version of CircuitPython available</a>. The brand new Pico will go into bootloader mode when first plugged in. Just copy the UF2 file to the RPI-RP2 drive that shows up.</p><p>There is a detailed <a href="https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython" target="_blank">guide to CircuitPython on the Raspberry Pi Pico on Adafruit</a>. <br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-jXSXZkb1h3o/YBGX1mXLe5I/AAAAAAACY4A/sY66bP3kOAcROLcJGBLPCN9jm1vOQ9YQwCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-jXSXZkb1h3o/YBGX1mXLe5I/AAAAAAACY4A/sY66bP3kOAcROLcJGBLPCN9jm1vOQ9YQwCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a> <br /></div><p></p><p>There is one modification needed due to the <a href="https://github.com/adafruit/circuitpython/pull/3299" target="_blank">deprecation of the pulseio.PWMout</a>. Change <i>pulseio</i> to <i>pwmio</i> in these two locations in the led.py file <a href="https://github.com/KMKfw/kmk_firmware/blob/master/kmk/led.py#L1" target="_blank">1</a> <a href="https://github.com/KMKfw/kmk_firmware/blob/master/kmk/led.py#L31" target="_blank">2</a>. To do this you will need to <a href="https://github.com/KMKfw/kmk_firmware/archive/master.zip" target="_blank">download the current files</a> instead of the release file (which is compiled and not editable). Unzip the file and copy the kmk folder and the boot.py file to the root of the CIRCUITPY drive. Then edit the led.py file in the kmk folder.</p><p>I used the same config file as for the ESP32-S2, only <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_Raspberry_Pi_PICO/code.py#L11-L12" target="_blank">modifying the pin definitions</a>.</p><p><i>I made a Gherkin PCB just for the Raspberry Pi Pico, the <a href="https://www.40percent.club/2021/02/pipi-gherkin.html" target="_blank">PiPi Gherkin</a>.</i><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-83581404704692782602021-01-25T09:38:00.006-08:002021-02-10T13:27:21.714-08:00PB-GHERKIN ESP32-S2 KMK<h1 style="text-align: left;">KMK running on the ESP32-S2</h1><p>I soldered some pin headers on a PB-Gherkin so that I could connect it to a ESP32-S2 SAOLA-WROVER dev board. These boards are cheap at $8 from Amazon or Digikey. The only real downside is the physical size and the USB HID requires a separate USB pigtail. The micro USB connector on the board is only for serial, useful for the initial <a href="https://gist.github.com/askpatrickw/0a276c7e2d4f54e442b2cb6eaa0d32ea" target="_blank">flashing of CircuitPython</a>, but not much else.</p><p>I modified the <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_ESP32-S2-SAOLA/code.py" target="_blank">config file</a> for the <a href="https://www.40percent.club/2021/01/pb-gherkin-pca10059-kmk.html" target="_blank">PCA10059</a>. I had to change the <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_ESP32-S2-SAOLA/code.py#L11-L12" target="_blank">pin definitions</a> for the new board. I also commented out the section that <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_ESP32-S2-SAOLA/code.py#L21-L28">rearranges the switches</a>, this PCB is not flipped upside-down.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ZzvybiNKdeg/YA8BCS4MwfI/AAAAAAACY3k/K0KhTyO1TXgLG62elDHKvrVLtphlZj4qQCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ZzvybiNKdeg/YA8BCS4MwfI/AAAAAAACY3k/K0KhTyO1TXgLG62elDHKvrVLtphlZj4qQCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><br /><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-3744388333718346472021-01-19T09:12:00.004-08:002021-02-10T13:27:34.613-08:00PB-GHERKIN PCA10059 KMK<h1 style="text-align: left;">Gherkin running KMK on a PCA10059</h1><p>It is possible to replace the Pro Micro on a <a href="https://www.40percent.club/2019/10/pb-gherkin.html" target="_blank">PB-Gherkin</a> with a PCA10059. <a href="https://www.40percent.club/2021/01/pca10059-running-kmk-firmware.html" target="_blank">The PCA10059 is running KMK firmware.</a><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-OaAMvc3gXUs/YAcO3hbmfWI/AAAAAAACY2M/yFebv2589Ec5y1x6JXKt5-KMdUUwie_qgCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-OaAMvc3gXUs/YAcO3hbmfWI/AAAAAAACY2M/yFebv2589Ec5y1x6JXKt5-KMdUUwie_qgCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The PB-Gherkin PCB is flipped so that the "Pro Micro" would be mounted <a href="https://1.bp.blogspot.com/-UNrh0YJJo34/XbdaeoBV16I/AAAAAAACV4k/fkzkcSPsGIoIjg-mtSa-fcmyj0nxDZbzACLcBGAsYHQ/s640/b.jpg" target="_blank">face up</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ppkTwNUo0G8/YAcO3KUR6KI/AAAAAAACY2E/XgqR_2UmkcMmtzXNPZ2tnR_V45mG9-opgCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ppkTwNUo0G8/YAcO3KUR6KI/AAAAAAACY2E/XgqR_2UmkcMmtzXNPZ2tnR_V45mG9-opgCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The PCA10059 is aligned with the bottom of the Pro Micro footprint, the two ground pins are skipped. The 6 column pins and 5 row pins match up with GPIO pins on the PCA10059.</p><p>There are pins that should not be soldered to the PCB (red X). They could cause shorts on those GPIO pins.</p><p>The green arrow points to the square pad, pin 1 on the Pro Micro footprint.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-6WlWlCRbIo8/YAcO3VW81eI/AAAAAAACY2I/pXiYK2IUCNIfrxzwmbjG8GGAIxWI42dEwCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-6WlWlCRbIo8/YAcO3VW81eI/AAAAAAACY2I/pXiYK2IUCNIfrxzwmbjG8GGAIxWI42dEwCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>I had to use 14mm spacers to accommodate the thick USB extension plug. It is a tight fit, 15mm would be better.</p><h3 style="text-align: left;">KMK config <br /></h3><p>The KMK CircuitPython config file is <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_pca10059" target="_blank">here</a>. It uses the unmodified <a href="https://cdn.kmkfw.io/kmk-latest.zip" target="_blank">KMK release</a> files and only needs the <a href="https://circuitpython.org/libraries" target="_blank">Adafruit BLE library</a>. I duplicated the <a href="https://git.40percent.club/di0ib/tmk_keyboard/src/branch/master/keyboard/gherkin/actionmap_gherkin.c#L42-L67" target="_blank">original TMK Gherkin keymap</a> as much as possible.<br /></p><p>The PB-Gherkin PCB flipped the way it is (opposite of a normal Gherkin) rearranges the matrix. KMK has a method for <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_pca10059/main.py#L20-L28" target="_blank">rearrange the logical location of the switches with the physical positions</a>.</p><p>It is also possible to <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/kmk/gherkin_pca10059/main.py#L68" target="_blank">enable BLE</a>. The PCA10059 lacks any battery circuitry so this is only really useful for experimentation.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-3040160173284025992021-01-11T10:08:00.008-08:002021-02-10T13:27:48.298-08:00PCA10059 running KMK firmware<h1 style="text-align: left;">Cheap way to try out KMK firmware</h1><p>The <a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle" target="_blank">PCA10059</a> is a USB stick with the NRF52840 chip on it. <a href="https://www.digikey.com/short/4cv39t" target="_blank">Digikey</a> and <a href="https://www.mouser.com/ProductDetail/Nordic-Semiconductor/nRF52840-Dongle/?qs=gTYE2QTfZfTbdrOaMHWEZg%3D%3D" target="_blank">Mouser</a> have them in stock for $10. It is very bare bones and is designed to be powered directly from the USB port and uses the built in voltage regulator to provide the 3.3v running voltage. To run <a href="https://github.com/KMKfw/kmk_firmware#kmk-clackety-keyboards-powered-by-python" target="_blank">KMK</a> you must first install <a href="https://circuitpython.org/" target="_blank">CircuitPython</a>.</p><p style="text-align: center;"><span style="color: red;"><i><a href="https://github.com/adafruit/circuitpython/issues/3623" target="_blank">There is currently a bug in CircuitPython on the PCA10059 that causes file corruption. It is being worked on</a>. </i></span><br /></p><p>The process is fairly involved. If you have a Raspberry Pi you can do it without buying a dedicated programmer. I followed the very complete instructions <a href="https://www.rototron.info/circuitpython-nrf52840-dongle-openocd-pi-tutorial/" target="_blank">on Rototron.info</a>. The only difference is that I used an old Raspberry Pi 1 (first generation) instead of a Raspberry Pi 3 as in their example.</p><p>The only changes to the process are to the config file. I commented out the lines for Raspberry Pi 3 and uncommented the ones for Raspberry Pi 1. I also dropped the adapter_khz to 100. I don't know if this was necessary but it worked fine for me.<br /></p><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-FBoTDVewOuI/X_yLzP5vXgI/AAAAAAACYz8/VrO4PG8P1LUMysn4JjJjXkuP99Hczm4hwCLcBGAsYHQ/s497/config.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="497" data-original-width="370" height="400" src="https://1.bp.blogspot.com/-FBoTDVewOuI/X_yLzP5vXgI/AAAAAAACYz8/VrO4PG8P1LUMysn4JjJjXkuP99Hczm4hwCLcBGAsYHQ/w298-h400/config.PNG" width="298" /></a></div><p></p><p>The connections were identical to the example. I soldered header pins to the PCA10059 and inserted it into a breadboard. I used a USB extension cable to connect it to the Pi.</p><p>I ran all the commands remotely through a SSH connection. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-iuYqPRMCik8/X_yMeBF-RPI/AAAAAAACY0E/TOA1N965W2sUpDkNrgMBQR8y-L3ZGQUyQCLcBGAsYHQ/s2048/programmer.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-iuYqPRMCik8/X_yMeBF-RPI/AAAAAAACY0E/TOA1N965W2sUpDkNrgMBQR8y-L3ZGQUyQCLcBGAsYHQ/w640-h480/programmer.jpg" width="640" /></a></div><p></p><p>The Raspberry Pi 1 has a problem with resetting when a USB device is hot plugged. You should power it down before making connections.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-tGMMGaMHJIg/X_yNreWbu3I/AAAAAAACY0U/k-GrRWTiHoY_VUDWjh-cJeW30RkvqD3OgCLcBGAsYHQ/s1072/warning.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="219" data-original-width="1072" height="130" src="https://1.bp.blogspot.com/-tGMMGaMHJIg/X_yNreWbu3I/AAAAAAACY0U/k-GrRWTiHoY_VUDWjh-cJeW30RkvqD3OgCLcBGAsYHQ/w640-h130/warning.jpg" width="640" /></a></div><p></p><p></p><p>Heed the warning about resetting the PCA10059 before attempting to flash the bootloader. If you don't flash the bootloader immediately after erasing it you may lose the connection to the Pi and will need to use a level shifter to regain access to program it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-LFLXqsGZ9-M/X_yM4wmXinI/AAAAAAACY0Q/xjEhdQB8wP8u2-djZJiF9A0xQ2HMZ2RRACPcBGAYYCw/s661/openocd%2Bflash.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="418" data-original-width="661" height="253" src="https://1.bp.blogspot.com/-LFLXqsGZ9-M/X_yM4wmXinI/AAAAAAACY0Q/xjEhdQB8wP8u2-djZJiF9A0xQ2HMZ2RRACPcBGAYYCw/w400-h253/openocd%2Bflash.png" width="400" /></a></div><p></p><p>The flash process takes about 30 seconds. It will sit seeming to do nothing for most of this time. Just wait.</p><p>After you have flashed the bootloader you will need to install the latest CircuitPython for the PCA10059. <a href="https://circuitpython.org/board/pca10059/">https://circuitpython.org/board/pca10059/</a></p><p>Then install the latest KMK release. <a href="https://cdn.kmkfw.io/kmk-latest.zip">https://cdn.kmkfw.io/kmk-latest.zip</a></p><p>Instructions <a href="https://github.com/KMKfw/kmk_firmware#getting-started" target="_blank">here</a></p><h2 style="text-align: left;">KMK Setup <br /></h2>I wanted to use the built in SW1 (the white button on the top of the board) for a simple 1 key keyboard. The problem is that KMK is setup in the reverse of how most keyboard matrices are setup and it pulls the input high when pressed, instead of pulling low. The SW1 being connected to ground did not register.<p>I modified matrix.py to invert the logic. My modified matrix.py is <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/matrix.py" target="_blank">here</a>.</p><p><a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/matrix.py#L83" target="_blank">Line 83</a> pull up instead of down. <br /></p><p><a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/matrix.py#L104" target="_blank">Line 104</a> set output False instead of True.<br /></p><p><a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/matrix.py#L118" target="_blank">Line 118</a> add 'not' to invert reading of pin.</p><p><a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/matrix.py#L144" target="_blank">Line 144</a> set output True instead of False.</p><p>I made a very simple <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/code.py">code.py</a> keymap that has a single key output of the letter 'A'.</p><p>The <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/code.py#L9" target="_blank">col pins</a> don't do anything, since SW1 is connected to ground. But they do make the RGB LED light up to show the matrix scanning. There is also a limitation that you can not define a single row or column, you need at least two. So I added a <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/PCA10095/code.py#L10" target="_blank">P1_10</a> as a second non existent row. </p><p>It also wants the Adafruit BLE library, even though it does not use BLE. You can find this in the latest library archive from <a href="https://circuitpython.org/libraries" target="_blank">here</a>. Copy the entire 'adafruit_ble' folder to the lib folder on the PCA10059.</p><p>The PCA10059 has 15 GPIO pins along the edges and a few more on tiny pads on the bottom. 15 are enough for a small macropad or even a Gherkin. It lacks any battery circuitry so a wireless BLE keypad is not likely without additional circuitry.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-3323753291144556772021-01-07T13:08:00.004-08:002021-01-07T13:11:01.199-08:00Adafruit QT PY<h1 style="text-align: left;">Tiny MCU with the same footprint as the XIAO</h1><p>The <a href="https://learn.adafruit.com/adafruit-qt-py" target="_blank">Adafruit QT PY</a> is built off an ARM M0 core just like the <a href="https://www.40percent.club/2020/08/wonky.html" target="_blank">XIAO</a>. The pinout is compatible with the XIAO and most <a href="https://learn.adafruit.com/adafruit-qt-py/arduino-ide-setup" target="_blank">Arduino code</a> will run without modification.</p><p>The main difference is that the QT PY has a built in RGB LED, a reset button, and a spot for a 2MB SPI flash chip. On the XIAO you have to short two tiny pads to reset it.</p><p>The optional SPI chip makes this a much more capable <a href="https://learn.adafruit.com/adafruit-qt-py/circuitpython" target="_blank">CircuitPython</a> device. The 8 pin SOIC chip is available <span>at</span> Digikey <a href="https://www.digikey.com/short/4cfdq5" target="_blank">GD25Q16CTIGR</a>.</p><p>The QT PY is currently $6 from <a href="https://www.adafruit.com/product/4600" target="_blank">Adafruit</a> or <a href="https://www.digikey.com/short/4cfd9t" target="_blank">Digikey</a>. It is listed as a "Limited Time" price. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-UlRuHfgaBSU/X_d2w7P1fRI/AAAAAAACYzY/qhAwz1efhHIyqilF7UiZDAsYpyyZKAVVACLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-UlRuHfgaBSU/X_d2w7P1fRI/AAAAAAACYzY/qhAwz1efhHIyqilF7UiZDAsYpyyZKAVVACLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The XIAO (left) has a metal can covering the components. The QT PY (right) has an additional connector for I2C devices.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-By8Th6hMtkM/X_d2xK5BBWI/AAAAAAACYzc/9HG2qUl4GDAvUps7UM9myqT7u_cKIid7wCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-By8Th6hMtkM/X_d2xK5BBWI/AAAAAAACYzc/9HG2qUl4GDAvUps7UM9myqT7u_cKIid7wCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The bottom of the QT PY is where the optional 2MB SPI flash chip is soldered. I <a href="https://www.40percent.club/p/socketing-pro-micro.html" target="_blank">soldered diodes legs to make them socketable</a>.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-19706010906838275632020-12-18T10:01:00.003-08:002020-12-18T11:12:38.837-08:00Nice oxidation<h1 style="text-align: left;">Applied liver of sulfur to exposed copper</h1><p>As an experiment I used <a href="https://en.wikipedia.org/wiki/Liver_of_sulfur" target="_blank">liver of sulfur</a> to apply a forced patina to the <a href="https://www.40percent.club/2020/10/copper-legends.html" target="_blank">exposed copper layer</a> to highlight the legends on the <a href="https://www.40percent.club/2020/11/feegle-xs.html" target="_blank">Feegle XS</a>.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-mSosgcBUmpA/X9zsvRQmqeI/AAAAAAACYwE/T7IhTmH9p84Q0XdTpQtmMyTyz4KFZm95ACLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-mSosgcBUmpA/X9zsvRQmqeI/AAAAAAACYwE/T7IhTmH9p84Q0XdTpQtmMyTyz4KFZm95ACLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The shiny copper turned almost black. It looks very good against the white soldermask.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-gr9i_qKVvZ8/X9zsv0QI7uI/AAAAAAACYwM/gGaJsqDheF4VxZM23IDQbMzNs5GscRN3QCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-gr9i_qKVvZ8/X9zsv0QI7uI/AAAAAAACYwM/gGaJsqDheF4VxZM23IDQbMzNs5GscRN3QCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The all white PCB is what it looked like originally. I carefully sanded off the raised areas of the solder mask to expose the copper. Laying a piece of 1000+ grit sandpaper on a flat piece of glass is the quickest way to only sand off the raised areas.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-e-zMKIGnNdE/X9zsvwsg-iI/AAAAAAACYwI/-Wo4IJnFdpUahTsCy9WTuWZ_CtoMS1v-ACLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-e-zMKIGnNdE/X9zsvwsg-iI/AAAAAAACYwI/-Wo4IJnFdpUahTsCy9WTuWZ_CtoMS1v-ACLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>The forced patina compared the the naturally occurring oxidation on another Feegle XS.</p><p>I will probably spray a layer of clear lacquer over the top to protect the thin oxidized layer. <br /> <br /></p><p></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-13136274984422663292020-12-18T08:43:00.001-08:002020-12-18T08:43:31.208-08:00ROT XIAO<h1 style="text-align: left;">Rotary encoder soldered directly to a XIAO</h1><p>Small, with the encoder sitting directly on top the metal shield on the <a href="https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html" target="_blank">XIAO</a> and soldered directly to the pins.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SRq4HLasCAc/X9zWkJgVRCI/AAAAAAACYu4/-2MyS_u8nhEtb7hURqb1c5IvDHrEaIMMwCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-SRq4HLasCAc/X9zWkJgVRCI/AAAAAAACYu4/-2MyS_u8nhEtb7hURqb1c5IvDHrEaIMMwCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The encoder is connected to pins 8, 9, 10. The switch is connected to pins 3 and 5.</p><p>Pins 9 and <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/ROT-xiao.ino#L12-L13" target="_blank">5 are set as output low</a> to behave as ground pins.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Q6JcrVcgK3s/X9zWklHerbI/AAAAAAACYvA/dPeEFqrb80sBolLpbjLhhU4k1hdNHUvkQCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Q6JcrVcgK3s/X9zWklHerbI/AAAAAAACYvA/dPeEFqrb80sBolLpbjLhhU4k1hdNHUvkQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The solder lugs were bent and trimmed. I soldered this side to the metal case of the XIAO.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DcGvHy45-WE/X9zWktuYpvI/AAAAAAACYu8/8kMpsb7R_6c090IiKnlTEQjV03xtFDsSQCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-DcGvHy45-WE/X9zWktuYpvI/AAAAAAACYu8/8kMpsb7R_6c090IiKnlTEQjV03xtFDsSQCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>The other lug I soldered to the top of the USB-C connector.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/--0pk37oHS1k/X9zWk6lwW2I/AAAAAAACYvE/05CS3sigOA0TiMhm7jiVjIWFvyzF7KaKwCLcBGAsYHQ/s2048/d.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/--0pk37oHS1k/X9zWk6lwW2I/AAAAAAACYvE/05CS3sigOA0TiMhm7jiVjIWFvyzF7KaKwCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>I taped the bottom of the XIAO when soldering the pins so that solder would not flow out the bottom. This left the bottom perfectly flat.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-vUwer3V2WmU/X9zWlOIWf7I/AAAAAAACYvI/Dglt0NIIEOkBXLkrTnyH69qX-R6h-v7DgCLcBGAsYHQ/s2048/e.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-vUwer3V2WmU/X9zWlOIWf7I/AAAAAAACYvI/Dglt0NIIEOkBXLkrTnyH69qX-R6h-v7DgCLcBGAsYHQ/w640-h480/e.jpg" width="640" /></a></div><p></p><p>I added heavy duty 3M VHB tape to the bottom. I can now add an encoder anywhere.</p><p>It runs a simple <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/ROT-xiao.ino" target="_blank">Arduino script</a>. It uses the <a href="https://github.com/NicoHood/HID" target="_blank">HID-Project</a> and <a href="https://github.com/j-bellavance/CommonBusEncoders" target="_blank">CommonBusEncoders</a> libraries. </p><p>You can get 3 packs of XIAO on Amazon and <a href="https://www.digikey.com/short/z15bd0" target="_blank">Digikey</a> sometimes has them in stock. <br /></p><h1 style="text-align: left;">Pro Micro version <br /></h1><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-X_pNNceZnQ8/X9zaXC6B89I/AAAAAAACYvc/n6gzpR2feWEue9RSgSch5Bh_cMmvkau3wCLcBGAsYHQ/s2048/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-X_pNNceZnQ8/X9zaXC6B89I/AAAAAAACYvc/n6gzpR2feWEue9RSgSch5Bh_cMmvkau3wCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>I had to trim off the mounting lugs since they would short out on the components on the Pro Micro. I also used a small square of VHB tape between the encoder and the ATmega32u4.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-tto8zMXWWok/X9zaXii6l2I/AAAAAAACYvg/1p1VUBaGfZMrH-80al0909YIkH8e061EQCLcBGAsYHQ/s2048/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-tto8zMXWWok/X9zaXii6l2I/AAAAAAACYvg/1p1VUBaGfZMrH-80al0909YIkH8e061EQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>Same as the XIAO version, but the encoder is connected to pins 15, 18, 19. The switch is connected to 4 and 6. It runs the same <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/ROT-ProMicro.ino" target="_blank">Arduino script</a> as the XIAO, with only the pin definitions changed.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-1588606187147605992020-12-09T09:00:00.002-08:002020-12-09T09:02:47.249-08:00ORTHOPI rotary encoder<h1 style="text-align: left;">Rotary encoder connected and setup as volume control</h1><p>I connected the encoder to the GPIO header with the same 30awg wire I used for the other connections.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SYpwpUHlLeM/X9D_4zbt6KI/AAAAAAACYtU/lh2-C8ESDEkfri8wcgdaM4JhUvfWTCOaQCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-SYpwpUHlLeM/X9D_4zbt6KI/AAAAAAACYtU/lh2-C8ESDEkfri8wcgdaM4JhUvfWTCOaQCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>There are 4 connections, Ground (black), Encoder A (yellow), Encoder B
(orange), Switch (blue).The ground connection is shared for the encoder
and the switch.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-7RR7eg_2Eho/X9D_4jloiNI/AAAAAAACYtQ/pKq8QEFauA49ppArLNl9oq_xqqJ1GRMNQCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-7RR7eg_2Eho/X9D_4jloiNI/AAAAAAACYtQ/pKq8QEFauA49ppArLNl9oq_xqqJ1GRMNQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>I soldered directly to the GPIO header. I chose GPIO 17, 27, and 22 since they are easy to access. </p><p>I followed the instructions and modified the script I found here: <a href="https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1" target="_blank">https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1</a> <br /></p><p>Change the GPIO pin definitions in the script <a href="https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L33-L38" target="_blank">https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L33-L38</a></p><p>Also change all references to the "PCM" device to "HDMI". <a href="https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L188-L223" target="_blank">https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L188-L223</a></p><p>I had Encoder A and Encoder B swapped so had to swap GPIO 17 and 27 to get the volume to go up when turned clockwise. <br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-62253551305290539062020-12-04T09:54:00.008-08:002020-12-09T09:04:59.580-08:00ORTHOPI<h1 style="text-align: left;">Raspberry Pi 400 mechanical keyboard mod</h1><p>I integrated the ORTHOPI mechanical keyboard PCB with the Raspberry Pi 400 keyboard matrix into the top half of the Raspberry Pi 400 case. The top was gutted, completely removing the old keyboard. The connection between the Raspberry Pi 400 and the keyboard is detailed <a href="https://www.40percent.club/2020/12/raspberry-pi-400-matrix-verified.html" target="_blank">here</a>.</p><p>Works like the original. The power on/off (FN+F10), and the LEDs.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-cnDTQAcGgZI/X8pqbt61uWI/AAAAAAACYqg/DsLWyKgUYFAeaNmylaKbsATJSvIrAxaeACLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-cnDTQAcGgZI/X8pqbt61uWI/AAAAAAACYqg/DsLWyKgUYFAeaNmylaKbsATJSvIrAxaeACLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The keyboard is a grid layout. All keys on the original Pi 400 keyboard are represented. The space bar is duplicated as two 2U keys. 4U space bars are uncommon. The Return and Right Shift keys are also 2U.</p><p>I also added a rotary encoder. It is a EC12 type. EC11 should also fit.</p><p>Since there is no plate, the switches are PCB mount Gateron clears. These are light linear switches. Gateron PCB mount switches fit very snug in these PCB mount holes, other brands are much looser. The 2U PCB mount stabilizers are <a href="https://www.40percent.club/2018/08/cheap-genuine-cherry-stabilizers.html" target="_blank">standard Cherry ones</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Yd8qLX0gJvE/X8pqbaRxIHI/AAAAAAACYqc/6sAIdRIKzPsuhrtKtuMJJwjPtbs5FyySwCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Yd8qLX0gJvE/X8pqbaRxIHI/AAAAAAACYqc/6sAIdRIKzPsuhrtKtuMJJwjPtbs5FyySwCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>Most of the plastic from the center of the top part of the case was removed. Holes were drilled and notches ground to accommodate the switch pins on the top row and the clips on the stabilizers on the bottom row.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-pT2r4mpM-WA/X8pqb3S-9lI/AAAAAAACYqk/EJYs8-AglWgf0X98I0zbDjkJ4W3SnYIBgCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-pT2r4mpM-WA/X8pqb3S-9lI/AAAAAAACYqk/EJYs8-AglWgf0X98I0zbDjkJ4W3SnYIBgCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>Heavy duty, double sided 3M VHB tape was applied to the PCB. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-jYU7MQaAEB0/X8pqcLpKZQI/AAAAAAACYqo/d5zyv1sStt0wvhnyxTvvsZ-XeCjckw7JwCLcBGAsYHQ/s2048/d.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-jYU7MQaAEB0/X8pqcLpKZQI/AAAAAAACYqo/d5zyv1sStt0wvhnyxTvvsZ-XeCjckw7JwCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>PCB stuck to top plastic case. I ended up removing all the remaining plastic, leaving only the edges.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Hg2GxzwdOBs/X8pr8HCm21I/AAAAAAACYq4/uH8083r5c3ghGPleVNGtNd4QoayG2y3FQCLcBGAsYHQ/s2048/e.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Hg2GxzwdOBs/X8pr8HCm21I/AAAAAAACYq4/uH8083r5c3ghGPleVNGtNd4QoayG2y3FQCLcBGAsYHQ/w640-h480/e.jpg" width="640" /></a></div><p></p><p>Assembled. The VHB tape is very strong. It is still easy to separate the top half of the case from the bottom.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-PF-TEXTKlYU/X8pr8l8bPdI/AAAAAAACYrA/ETWL6HYoF2sseWJHPcOk0plYokninD9fACLcBGAsYHQ/s2048/f.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-PF-TEXTKlYU/X8pr8l8bPdI/AAAAAAACYrA/ETWL6HYoF2sseWJHPcOk0plYokninD9fACLcBGAsYHQ/w640-h480/f.jpg" width="640" /></a></div><p></p><p>The PCB is a little smaller than the case top.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-sSxDjbeIpLg/X8pr8eeWtoI/AAAAAAACYq8/-OZcwbOJrZgXWPlXKi0vb1NwDTOb80L2gCLcBGAsYHQ/s2048/g.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-sSxDjbeIpLg/X8pr8eeWtoI/AAAAAAACYq8/-OZcwbOJrZgXWPlXKi0vb1NwDTOb80L2gCLcBGAsYHQ/w640-h480/g.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-AMR3AudKxUI/X8pr88LdekI/AAAAAAACYrE/c49t-vuGKBA6I1yOsXAw_RE5mJr9XXYfgCLcBGAsYHQ/s2048/h.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-AMR3AudKxUI/X8pr88LdekI/AAAAAAACYrE/c49t-vuGKBA6I1yOsXAw_RE5mJr9XXYfgCLcBGAsYHQ/w640-h480/h.jpg" width="640" /></a></div><p></p><p>The PCB ended up very slightly crooked on the case. Removing the VHB tape is a major effort and not worth it to do over.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-brSYn2ZfPdg/X8ptSvsY-pI/AAAAAAACYrg/y73r6BmjJi0nS2buUKPZRTX30ehn9mrmgCLcBGAsYHQ/s2048/i.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-brSYn2ZfPdg/X8ptSvsY-pI/AAAAAAACYrg/y73r6BmjJi0nS2buUKPZRTX30ehn9mrmgCLcBGAsYHQ/w640-h480/i.jpg" width="640" /></a></div><p></p><p>DSA style keycaps from a cheap ortholinear set from Amazon. It had most of the keys needed. There were only one CTRL and ALT keycaps so I used the symbol ones for the right CTRL and right ALT. Also there was only two 2U key caps, one convex (rounded) and one concave top, I used these for the space bars. The 2U Return and right Shift are from the <a href="https://imgur.com/gallery/ZdUdd" target="_blank">Lepton</a> set I bought a long time ago.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-gE-tXTGh18Q/X8ptSIIlxOI/AAAAAAACYrY/LGhZsd268nkwcA8C2rF3_FUKGEbxxOsFQCLcBGAsYHQ/s2048/j.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-gE-tXTGh18Q/X8ptSIIlxOI/AAAAAAACYrY/LGhZsd268nkwcA8C2rF3_FUKGEbxxOsFQCLcBGAsYHQ/w640-h480/j.jpg" width="640" /></a></div><p></p><p>The switches/keycaps double the height of the Pi 400.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-lC254Yxzb2c/X8ptSsT7USI/AAAAAAACYrc/fvUKGTMXK_AW4xNtILNBthgo7SSP4Yl6QCLcBGAsYHQ/s2048/k.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-lC254Yxzb2c/X8ptSsT7USI/AAAAAAACYrc/fvUKGTMXK_AW4xNtILNBthgo7SSP4Yl6QCLcBGAsYHQ/w640-h480/k.jpg" width="640" /></a></div><p></p><p>You can see the PCB is stuck to the case slightly crooked.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/--E2m9R-eD0c/X8puebEY4FI/AAAAAAACYr8/zN7QkIM1V8Q3b2LECZSKf4tUEn21_N87ACLcBGAsYHQ/s2048/l.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/--E2m9R-eD0c/X8puebEY4FI/AAAAAAACYr8/zN7QkIM1V8Q3b2LECZSKf4tUEn21_N87ACLcBGAsYHQ/w640-h480/l.jpg" width="640" /></a></div><p></p><p>I removed the status LEDs and soldered 30awg wires to the pads. Cathode on the left, anode to the right.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-eC8vt73HBeg/X8pueLKUybI/AAAAAAACYr0/79tegbqekB4IG2KHBODgGsl4o6DqQGERQCLcBGAsYHQ/s2048/m.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-eC8vt73HBeg/X8pueLKUybI/AAAAAAACYr0/79tegbqekB4IG2KHBODgGsl4o6DqQGERQCLcBGAsYHQ/w640-h480/m.jpg" width="640" /></a></div><p></p><p>The Capslock, Numlock and Esc key switches have pads for LEDs. I soldered the 30awg wires directly to the LED pins.</p><p>The PCB footprint for those LED switches is very slightly off center from the rest of the switches. It does not make a difference with PCB mount switches, but a plate might have slight alignment problems.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-w-eQgzRWl7Y/X8pueIVl8EI/AAAAAAACYr4/BjyWoF5L15EXWImWCenAgiiKQQmojfuqQCLcBGAsYHQ/s2048/n.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-w-eQgzRWl7Y/X8pueIVl8EI/AAAAAAACYr4/BjyWoF5L15EXWImWCenAgiiKQQmojfuqQCLcBGAsYHQ/w640-h480/n.jpg" width="640" /></a></div><p></p><p>Routing the wires is the most tedious part. There is quite a lot of space between the heatsink and PCB, but there are some pinch points that you want to avoid.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-iQGJhyWWxwQ/X8puetEzxoI/AAAAAAACYsA/gmG9Y7qPoiYmnqGOCihcXwPof347IsLewCLcBGAsYHQ/s2048/o.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-iQGJhyWWxwQ/X8puetEzxoI/AAAAAAACYsA/gmG9Y7qPoiYmnqGOCihcXwPof347IsLewCLcBGAsYHQ/w640-h480/o.jpg" width="640" /></a></div><p></p><p>LEDs functioning. The Power LED is much brighter than the Capslock and Numlock. It may just be the cheap 3mm LEDs I am using.</p><p>The only thing left to do is to <a href="https://www.40percent.club/2020/12/orthopi-rotary-encoder.html" target="_blank">connect the rotary encoder to the GPIO pins</a>. These will have to be manually wired like the LEDs.</p><p>The PCB should also be grounded like the original one was (conductive foam pad near Ethernet port). The two mounting lugs on the rotary encoder are connected to the ground plane on the PCB. A drain wire from there to a suitable ground point should work.</p><p>Gerber on <a href="https://git.40percent.club/di0ib/Misc/src/branch/master/orthopi" target="_blank">git</a>.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-71755625803782107142020-12-02T09:14:00.003-08:002020-12-04T15:24:32.183-08:00Raspberry Pi 400 matrix verified<h1 style="text-align: left;">Tested with prototype PCB</h1><p>Made a simple PCB layout with all of the same key positions as the original Pi 400 keyboard. The <a href="https://www.40percent.club/2020/11/raspberry-pi-400-keyboard-matrix-keymap.html" target="_blank">matrix keymap</a> is correct.</p><p>As long as you use the available keys in the matrix you can make a replacement keyboard connected to the <a href="https://www.40percent.club/2020/11/raspberry-pi-400-keyboard-controller.html" target="_blank">Holtek controller</a>. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-RlvtbHniZhM/X8fKALkrzZI/AAAAAAACYow/eXeywwZ6pbEJtKJJQO6o9Tjfou_95xYFQCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-RlvtbHniZhM/X8fKALkrzZI/AAAAAAACYow/eXeywwZ6pbEJtKJJQO6o9Tjfou_95xYFQCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>Connections to the Pi 400 PCB were made with 30awg wires. I got these on Amazon, it is a roll of 8 different colors bundled together.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-0r0iJ0n26tk/X8fJ_zGOAXI/AAAAAAACYos/VwMhcGflMR8Z_Uzp8UstSMfFNa6xyh_hACLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-0r0iJ0n26tk/X8fJ_zGOAXI/AAAAAAACYos/VwMhcGflMR8Z_Uzp8UstSMfFNa6xyh_hACLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The keyboard end with labeled pads.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-gaWiPplzhu4/X8fKAeTW3rI/AAAAAAACYo0/18nIH73H97AFAekGrfXpLYYbIj1PrjY7gCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-gaWiPplzhu4/X8fKAeTW3rI/AAAAAAACYo0/18nIH73H97AFAekGrfXpLYYbIj1PrjY7gCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>The Pi 400 matrix pads. I labeled the pads on some masking tape.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-oJNiJSxBAAo/X8fKAUDarQI/AAAAAAACYo4/AkvmufitVaklAQXUb94p5O3YJRm7qwqlACLcBGAsYHQ/s1024/d.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="320" src="https://1.bp.blogspot.com/-oJNiJSxBAAo/X8fKAUDarQI/AAAAAAACYo4/AkvmufitVaklAQXUb94p5O3YJRm7qwqlACLcBGAsYHQ/s320/d.jpg" /></a></div><p></p><p>The 8 different wire colors in 3 sets, total of 24 connections.</p><p><a href="https://www.40percent.club/2020/12/orthopi.html" target="_blank">The completed ORTHOPI is here</a>.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-91920097560104517622020-11-30T09:13:00.000-08:002020-12-04T15:20:41.798-08:00PCB copper lead test<h1 style="text-align: left;">Lead test of exposed PCB copper layer</h1><p>I have several of the 3M Lead Check tests and used one on the exposed copper layer of a PCB. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-CquQrSW4rdA/X8UiDwZe1zI/AAAAAAACYno/VrN3HKQ1m9cJ4ej-vBfyaNv0qLRTVo7ywCLcBGAsYHQ/s2048/copper.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-CquQrSW4rdA/X8UiDwZe1zI/AAAAAAACYno/VrN3HKQ1m9cJ4ej-vBfyaNv0qLRTVo7ywCLcBGAsYHQ/w640-h480/copper.jpg" width="640" /></a></div><p>As expected there was no reaction. Which is good since I've been carrying this <a href="https://www.40percent.club/2020/11/feegle-xs.html" rel="nofollow" target="_blank">Feegle XS</a> around with me for a while now.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ETpP5iQdrOc/X8Uniugy2JI/AAAAAAACYoA/IkE2-a7Q5b4mNfolScwV73nPuc34GLUSwCLcBGAsYHQ/s2048/patina.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ETpP5iQdrOc/X8Uniugy2JI/AAAAAAACYoA/IkE2-a7Q5b4mNfolScwV73nPuc34GLUSwCLcBGAsYHQ/w640-h480/patina.jpg" width="640" /></a></div><p></p><p>A patina has formed on the copper surface. I replaced the steel screws with some brass ones, the outline of the old screws is still visible.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-52147295152048532342020-11-12T10:37:00.009-08:002021-02-13T14:09:12.076-08:00Raspberry Pi 400 keyboard matrix keymap<h1 style="text-align: left;">The diodeless matrix</h1><p>Like most rubber dome keyboards, there are no anti-ghosting diodes. Instead, the matrix is arranged in a way that it is unlikely to be able to press any combination of keys that would cause ghosting, or blocking.</p><p>The matrix on the Raspberry Pi 400 keyboard is 8x16. 24 total io pins used. The connector is 26 wide, 2 are not used (H and J in my numbering).<br /></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-EXXn2uIQQeY/X62CZslwj8I/AAAAAAACYlU/n3l0nsvpW_ELVJmyCSnq7HynA9izM8SYQCLcBGAsYHQ/s1087/keymap.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="179" data-original-width="1087" height="106" src="https://1.bp.blogspot.com/-EXXn2uIQQeY/X62CZslwj8I/AAAAAAACYlU/n3l0nsvpW_ELVJmyCSnq7HynA9izM8SYQCLcBGAsYHQ/w640-h106/keymap.jpg" width="640" /></a></div></div><p></p><p>This is for the ANSI layout keyboard. Someone with the ISO version will need to compare.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-_QelpJqlWcw/X61-QB2YZaI/AAAAAAACYlA/QYpHFzvvFDIwuzopTAu0UmYcaZcPepn5QCLcBGAsYHQ/s2048/matrix%2Bpins.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-_QelpJqlWcw/X61-QB2YZaI/AAAAAAACYlA/QYpHFzvvFDIwuzopTAu0UmYcaZcPepn5QCLcBGAsYHQ/w640-h480/matrix%2Bpins.jpg" width="640" /></a></div><p></p><p>The order of the pins on the bottom of the PCB are not in the same order as the ribbon connector.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-DfHGiOs9PZc/X61-QA0sEkI/AAAAAAACYk8/_4VtzK0IMDQvDUrxz25m3Fwyl594hWwuwCLcBGAsYHQ/s2048/ribbon.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-DfHGiOs9PZc/X61-QA0sEkI/AAAAAAACYk8/_4VtzK0IMDQvDUrxz25m3Fwyl594hWwuwCLcBGAsYHQ/w640-h480/ribbon.jpg" width="640" /></a></div><p></p><p>My original labeling using A through Z on the ribbon connector.</p><p><strike>This matrix/keymapping has not yet been verified.</strike> I have tested the matrix <a href="https://www.40percent.club/2020/12/raspberry-pi-400-matrix-verified.html" target="_blank">here</a>.</p><p><a href="https://www.40percent.club/2020/12/orthopi.html" target="_blank">ORTHOPI PCB that uses this matrix here</a>.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-42030478678102338292020-11-10T12:45:00.009-08:002020-12-04T15:21:16.976-08:00Raspberry Pi 400 keyboard controller<h1 style="text-align: left;">HOLTEK <a href="https://www.holtek.com/documents/10179/116711/HT45R0072v100.pdf" target="_blank">HT45R0072</a></h1><p>The keyboard of the Raspberry Pi 400 is connected to a dedicated <a href="https://www.holtek.com/documents/10179/116711/HT45R0072v100.pdf" target="_blank">MCU</a> that uses one of the 4 ports of the built in USB hub.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-fu-Uz6u7-kk/X6r5FOPbdZI/AAAAAAACYkA/kz206ZeBdMcRKKym5xglmbTi0STKEpORACLcBGAsYHQ/s2048/holtek.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-fu-Uz6u7-kk/X6r5FOPbdZI/AAAAAAACYkA/kz206ZeBdMcRKKym5xglmbTi0STKEpORACLcBGAsYHQ/w640-h480/holtek.jpg" width="640" /></a></div><p></p><p>D+ and D- USB data lines are circled. They go through the vias to the other side of the board and run across to the <a href="https://www.via-labs.com/product_show.php?id=48" target="_blank">VLI USB chip</a>. The large test pad is VBUS.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-MCR6gN1FteE/X6r5FKy3GpI/AAAAAAACYj8/eUmMpIFZ1xIskwpkpHjMwIXZi70IccScwCLcBGAsYHQ/s2048/usb.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-MCR6gN1FteE/X6r5FKy3GpI/AAAAAAACYj8/eUmMpIFZ1xIskwpkpHjMwIXZi70IccScwCLcBGAsYHQ/w640-h480/usb.jpg" width="640" /></a></div><p></p><p>On the other side of the board the D+ and D- lines connect to the VLI chip.<span></span><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-IoQtTgBjGDo/X6r5FV7e8oI/AAAAAAACYkE/SoXTt2uciuYOU-c_GYaM_puvF5xKAaoJwCLcBGAsYHQ/s2048/matrix.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-IoQtTgBjGDo/X6r5FV7e8oI/AAAAAAACYkE/SoXTt2uciuYOU-c_GYaM_puvF5xKAaoJwCLcBGAsYHQ/w640-h480/matrix.jpg" width="640" /></a></div><p></p><p>On the bottom of the PCB under keyboard ribbon connector the matrix pins are broken out. If you could reprogram the Holtek controller you could connect a custom keyboard matrix. Unfortunately this is a OTP (one time programmable) device, so unless you can <a href="http://www.40percent.club/2020/11/raspberry-pi-400-keyboard-controller.html" target="_blank">work with the existing matrix</a> the Holtek is not very useful.<br /></p><p>The easiest way to replace the keyboard would be to cut the traces between the USB hub and the Holtek chip. Then connect the D+ and D- to a separate controller.<br /></p><p>The keyboard has a power key (Fn+F10). This functions similarly to the <a href="https://www.40percent.club/2019/09/flirc-1-button.html" target="_blank">modification I did on the Flirc case</a>. A custom replacement keyboard could use an io pin to trigger the power on/off the same way.</p><p><a href="https://www.40percent.club/2020/12/orthopi.html" target="_blank">ORTHOPI PCB that connects to the Holtek controller here</a>. <br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-18182535388195546382020-11-05T11:11:00.003-08:002021-10-12T08:24:25.399-07:00feegle XS<h1 style="text-align: left;">SSL</h1><p>A tinier <a href="https://www.40percent.club/2020/10/feegle.html" target="_blank">Feegle</a>. This is the same design as the Feegle but using 4.5x4.5mm tactile switches instead of 6x6mm. The only functional difference is the lack of a RESET button. There is only a USBASP button. Holding the USBASP button while plugging in the USB cable will enter bootloader mode.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-xOHqwm-gbE0/X6RHdvs77NI/AAAAAAACYiE/W61x8TG5dhsMl6TgYbXPn2o9BxkPH_3DgCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-xOHqwm-gbE0/X6RHdvs77NI/AAAAAAACYiE/W61x8TG5dhsMl6TgYbXPn2o9BxkPH_3DgCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>Originally planned to use the same through hole PTC fuse I use on most V-USB boards, but with it overlapping the resistors. This turned out to be too thick and would require 6mm spacers. To keep to the 4mm spacer thickness I used a surface mount PTC fuse.</p><p>Uses the same <a href="https://www.40percent.club/2020/09/blue-leds-instead-of-zener-diodes-in-v.html" target="_blank">blue LEDs for the V-USB circuit</a> and miniature 16MHz crystal.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-sG7si6gTrkA/X6RHezMUHKI/AAAAAAACYiI/bzg3qvfOTw4pdrXUBUugTWnsvA3MIM0nQCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-sG7si6gTrkA/X6RHezMUHKI/AAAAAAACYiI/bzg3qvfOTw4pdrXUBUugTWnsvA3MIM0nQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The switches are tiny. 6mm height for the keys and 5mm for the USBASP button. I used the top plate to hold the switches in place while soldering. It would be impossible to keep them all aligned without the plate holding them in place. Since the base of the switches are shorter than most of the other components I soldered them on first, so the plate could rest against the switches firmly.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ZC6T5XpMQjU/X6RHe9iH4TI/AAAAAAACYiM/49vkcuKZcDkT0j8mc2T-wcsbSYyt8TwnQCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ZC6T5XpMQjU/X6RHe9iH4TI/AAAAAAACYiM/49vkcuKZcDkT0j8mc2T-wcsbSYyt8TwnQCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>Wookie for scale. 63x46.5mm. The holes in the top plate are 2.5mm for the switches. 3mm holes for the LEDs. Flat laptop style M2 screws.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-NXSWEwMBabk/X6RHfv7ehqI/AAAAAAACYiQ/TWeintC_hrEteiZS4l3_2_cPktXmUJnrgCLcBGAsYHQ/s2048/d.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-NXSWEwMBabk/X6RHfv7ehqI/AAAAAAACYiQ/TWeintC_hrEteiZS4l3_2_cPktXmUJnrgCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>With 4mm M2 spacers the total thickness is about 9mm. I found some aluminum M3 spacers on <a href="https://www.digikey.com/short/zdw70p" target="_blank">Digikey</a> that look much better than the transparent nylon ones and <a href="https://www.40percent.club/2018/06/dressing-up-cheap-m2-spacers.html" target="_blank">fit right over the M2 brass spacer</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-IlEVi_rBll4/X6RHgBsCF_I/AAAAAAACYiU/VKQFXmvEfNA34xXED1wkZOpKohjUxj3-wCLcBGAsYHQ/s2048/e.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-IlEVi_rBll4/X6RHgBsCF_I/AAAAAAACYiU/VKQFXmvEfNA34xXED1wkZOpKohjUxj3-wCLcBGAsYHQ/w640-h480/e.jpg" width="640" /></a></div><p></p><p>I sanded one the top plates to expose the copper layer.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-YjzAnL0U3xE/X6RHgZpGMkI/AAAAAAACYiY/blSEkaJbu44MJUeEQjquKZVnRUyR-gzdQCLcBGAsYHQ/s2048/f.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-YjzAnL0U3xE/X6RHgZpGMkI/AAAAAAACYiY/blSEkaJbu44MJUeEQjquKZVnRUyR-gzdQCLcBGAsYHQ/w640-h480/f.jpg" width="640" /></a></div><p></p><p>6mm switch on the left, 4.5mm on the right. 4.5mm through hole switches are not very common. Surface mount versions are easy to find. I found these at <a href="https://lcsc.com/product-detail/Tactile-Switches_USAKRO-UK-B0201-G6-250_C556668.html" target="_blank">lcsc.com</a>. They are available in a few different heights and in two different actuation weights (160g/250g).<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Yf7zM0CbFiA/X6RHgvvTxSI/AAAAAAACYic/iCxYRfwkx18JF4PaDi8YikIT5kK_h5yQACLcBGAsYHQ/s2048/g.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Yf7zM0CbFiA/X6RHgvvTxSI/AAAAAAACYic/iCxYRfwkx18JF4PaDi8YikIT5kK_h5yQACLcBGAsYHQ/w640-h480/g.jpg" width="640" /></a></div><p></p><p>The 4.5mm switch is only 3mm tall at the base. The mini USB connector and ATmega328 are both about 4mm tall so the board can't be made any thinner.<br /><br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-19089631738385791402020-10-26T12:11:00.001-07:002020-12-04T15:21:47.852-08:00Pogo Pin Lobot<h1 style="text-align: left;">Lobot with Pogo Pins</h1><p>For programming boards that don't have the ICSP header pins installed.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-B59KYc5Dq40/X5cbm6hwqoI/AAAAAAACYfc/rwT9rVQ6wFc8aX8WeYCYVe3NGROQrpmTACPcBGAYYCw/s3000/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2250" data-original-width="3000" height="480" src="https://1.bp.blogspot.com/-B59KYc5Dq40/X5cbm6hwqoI/AAAAAAACYfc/rwT9rVQ6wFc8aX8WeYCYVe3NGROQrpmTACPcBGAYYCw/w640-h480/a.jpg" width="640" /></a></div><p></p><p>Same <a href="https://www.40percent.club/2018/01/lobot.html" target="_blank">Lobot</a> PCB as before. Pogo pins installed in the ICSP header instead of the Pro Micro footprint. Cheap Tiny AVR ISP programmer board installed.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-r2cKXm7Bl70/X5cbkru8yxI/AAAAAAACYfY/JwXMZjgxuCcKGq7MVQ4muA_Snm_BrMcugCPcBGAYYCw/s2048/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-r2cKXm7Bl70/X5cbkru8yxI/AAAAAAACYfY/JwXMZjgxuCcKGq7MVQ4muA_Snm_BrMcugCPcBGAYYCw/w640-h480/b.jpg" width="640" /></a></div><p></p><p>Spring pressure makes contact with the unpopulated (no pin header installed) ICSP pads on the PCB.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-yCzg-C8EbuY/X5cblf1wNFI/AAAAAAACYfY/uovwvcasHDIoJDUShW__kGr6H_Oh-9M8wCPcBGAYYCw/s2048/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-yCzg-C8EbuY/X5cblf1wNFI/AAAAAAACYfY/uovwvcasHDIoJDUShW__kGr6H_Oh-9M8wCPcBGAYYCw/w640-h480/c.jpg" width="640" /></a></div><p></p><p>The pins are delicate. I store this in an Altoids tin. More info on the pogo pins can be found in the <a href="https://www.40percent.club/2018/01/lobot.html" target="_blank">Lobot post</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-l3S_7zR7HDs/X5cbnR1L29I/AAAAAAACYfg/FaW03ECtjHgVcte8FRBzYytgpMpa5VftACPcBGAYYCw/s2048/d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-l3S_7zR7HDs/X5cbnR1L29I/AAAAAAACYfg/FaW03ECtjHgVcte8FRBzYytgpMpa5VftACPcBGAYYCw/w640-h480/d.jpg" width="640" /></a></div><p></p><p>The pogo pins are soldered to the top PCB (bottom in this picture). This has to be done with the two PCBs assembled. I used a piece of kapton tape to keep the pins from falling out while soldering. Solder the back row first without the front row in place, there isn't a lot of room to work.</p><p>The pins are not soldered at all to the bottom PCB (top in this picture).<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-19977541831809243742020-10-26T11:13:00.003-07:002020-12-04T15:21:55.861-08:0060%09<h1 style="text-align: left;">Credit card sized 60%</h1><p>Using the same 3.5x6mm tactile switches as the <a href="https://www.40percent.club/2020/10/wee-gherkin.html" target="_blank">Wee Gherkin</a>. V-USB powered ATmega328, with blue LEDs for voltage regulation.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-D8i22zmZzX4/X5cPYsdHapI/AAAAAAACYeY/D8BteDcyLsQpFqWmoWLTxs1UOlm0I36KwCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-D8i22zmZzX4/X5cPYsdHapI/AAAAAAACYeY/D8BteDcyLsQpFqWmoWLTxs1UOlm0I36KwCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The ATmega328 is running at 12MHz. V-USB will run at 12, 16 and 20MHz (and a few others). The code runs most efficiently at 16 or 20MHz. There are a lot of timing adjustments running at 12MHz and the resulting code is much larger for 12MHz.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-c0R9q0ACw-Y/X5cPanajpAI/AAAAAAACYec/ALFlxU6mY-YZEAzlnnjKXVsf2WEOKNchwCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-c0R9q0ACw-Y/X5cPanajpAI/AAAAAAACYec/ALFlxU6mY-YZEAzlnnjKXVsf2WEOKNchwCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>I built 2 of these. One with the switches from black switches from Digikey and another with the terrible low quality switches I bought on Amazon. I also used a 5mm blue LED on one of them, just for the hell of it.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-6o2J55hi1ic/X5cPeI5slpI/AAAAAAACYeg/YRP8_J-PmY43A9i87gO1N1saS39Ko6l8QCLcBGAsYHQ/s2048/c.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-6o2J55hi1ic/X5cPeI5slpI/AAAAAAACYeg/YRP8_J-PmY43A9i87gO1N1saS39Ko6l8QCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>The back of the PCB. The ICSP header is on the back, under the ATmega328. I built a pogo pin version of the <a href="https://www.40percent.club/2020/10/pogo-pin-lobot.html" target="_blank">Lobot</a> to be able to connect to the ICSP pads without installing header pins.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-SxiuKfrHlFw/X5cPeQSfq6I/AAAAAAACYek/k6FgmIbwByUk4A_7uWKB_BPGnV8xzXn7QCLcBGAsYHQ/s2048/d.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-SxiuKfrHlFw/X5cPeQSfq6I/AAAAAAACYek/k6FgmIbwByUk4A_7uWKB_BPGnV8xzXn7QCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>60 percent 09.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-3h51yMaqrNw/X5cPfWfo2XI/AAAAAAACYeo/OFwNeqQ3J1gJf0C5wYrgWfh3HQCsSGc4wCLcBGAsYHQ/s2048/e.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-3h51yMaqrNw/X5cPfWfo2XI/AAAAAAACYeo/OFwNeqQ3J1gJf0C5wYrgWfh3HQCsSGc4wCLcBGAsYHQ/w640-h480/e.jpg" width="640" /></a></div><p></p><p>Next to a Wee Gherkin.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-90105092835154245752020-10-19T11:56:00.000-07:002021-10-12T08:24:37.630-07:00feegle<h1 style="text-align: left;">Tiny 40%</h1><p>A 4x12 matrix the same size as the <a href="https://www.40percent.club/2020/09/gherkin-express-th.html" target="_blank">Gherkin Express TH</a> and using the same 6x6mm tactile switches.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-svJZswXfC7U/X43dyLX5xgI/AAAAAAACYdQ/YXPGJTnpqfgmSTBj_yj82fYY8h9Flvr_QCLcBGAsYHQ/s2048/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-svJZswXfC7U/X43dyLX5xgI/AAAAAAACYdQ/YXPGJTnpqfgmSTBj_yj82fYY8h9Flvr_QCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The switches are rotated so that the through hole pins are staggered allowing the switches to be placed closer together.</p><p>The power and activity LEDs from the Gherkin Express TH are removed. Instead the <a href="https://www.40percent.club/2020/09/blue-leds-instead-of-zener-diodes-in-v.html" target="_blank">blue LEDs for V-USB voltage regulation</a> are used as a power indicator, and a flickering activity indicator. </p><p>The miniature 16MHz crystal is also used as on the second version of the <a href="https://www.40percent.club/2020/10/gherkin-express-th-2.html" target="_blank">Gherkin Express TH</a>.</p><p>There is only one decoupling capacitor instead of the usual 2. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-WIVH7bOhu84/X43dxX9uJkI/AAAAAAACYdM/Vl1L9qCJ1CYGtmyIPt-OOrHCoRtenLcaQCLcBGAsYHQ/s2048/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-WIVH7bOhu84/X43dxX9uJkI/AAAAAAACYdM/Vl1L9qCJ1CYGtmyIPt-OOrHCoRtenLcaQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The 1mm thick top PCB has legends in the copper layer.</p><p>The two blue LEDs on the corner, D- on the left and D+ to the right. D+ is always on while connected to USB. D- flickers when data is being transmitted.</p><p>The two red switches are the RESET and USBASP switches for entering the V-USB bootloader.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-XX1Riv-V330/X43dxAZ6wWI/AAAAAAACYdI/SlyLqNIEz-sEQq5ISq4jjvCbG0q9pHX5wCLcBGAsYHQ/s2048/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-XX1Riv-V330/X43dxAZ6wWI/AAAAAAACYdI/SlyLqNIEz-sEQq5ISq4jjvCbG0q9pHX5wCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p>Everything fits with 4mm M2 spacers. Construction is the same as with the Gherkin Express TH.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-i7t0f6BxoMo/X43dy-xTKjI/AAAAAAACYdU/Trnl65NzwnINkInSYCoGkIrBhyc9CB9JwCLcBGAsYHQ/s2048/d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-i7t0f6BxoMo/X43dy-xTKjI/AAAAAAACYdU/Trnl65NzwnINkInSYCoGkIrBhyc9CB9JwCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>Same credit card size as the Gherkin Express TH. It shares the same bottom PCB. Screw holes are in the same positions.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-23341491287773721022020-10-15T10:50:00.003-07:002020-12-04T15:22:22.345-08:00Wee Gherkin<h1 style="text-align: left;">No'-as-big-as-medium-sized-Gherkin-but-bigger-than-wee-Gherkin Gherkin</h1><p>Another Gherkin in a different form factor. This shares the same circuit and firmware as the <a href="http://www.40percent.club/2020/09/yin-and-yang.html" target="_blank">Gherkin32</a>. It is also powered by an ATmega32a. The main difference is the form factor and the use of 3.5x6mm tactile switches. It also uses <a href="https://www.40percent.club/2020/09/blue-leds-instead-of-zener-diodes-in-v.html" target="_blank">blue LEDs instead of zener diodes </a>in the V-USB circuit.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Jc9JqbRKxKU/X4iKnjlXm3I/AAAAAAACYbk/LGgFwF9quZI3g6ftwWeoBR09cJvn5lkGwCLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Jc9JqbRKxKU/X4iKnjlXm3I/AAAAAAACYbk/LGgFwF9quZI3g6ftwWeoBR09cJvn5lkGwCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>3.5x6mm tactile switches only come in 2 heights, 4.5 and 5mm. This is too short to make a usable top plate. The rectangular plunger also wobbles on the short axis more than the long axis. These black switch are from Digikey. There were very few options, and only black available.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Awy56RElxeo/X4iKpIxtRwI/AAAAAAACYbo/eYj3OqF27HQ4ZTiZNkEOW3jFMNMHmpWZQCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-Awy56RElxeo/X4iKpIxtRwI/AAAAAAACYbo/eYj3OqF27HQ4ZTiZNkEOW3jFMNMHmpWZQCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>These were cheap switches bought from a third party seller on Amazon. They are horrible. About a quarter of them do not click. They do work, just no click when pressed. Most sellers refer to these at 3x6mm but they are really 3.5x6mm.<br /></p><p><br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-15224259596188401692020-10-07T13:43:00.000-07:002020-12-04T15:22:32.241-08:00Gherkin Express 3<h1 style="text-align: left;">Third SMT assembly order from JLCPCB</h1><p>This version uses the same circuit as the <a href="https://www.40percent.club/2020/09/smt-assembly.html" target="_blank">Gherkin Express 2</a>, but with <a href="https://www.40percent.club/2020/09/gherkin-express-2-with-blue-leds.html" target="_blank">blue LEDs instead of the zener diodes</a>. It also uses the PCB as a USB A connector.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-BSmbdV4eGfM/X34myIkPfII/AAAAAAACYac/wmZVdZuEkNMaWO8tjNZrDwxFkxS1QbJ-gCLcBGAsYHQ/s2048/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-BSmbdV4eGfM/X34myIkPfII/AAAAAAACYac/wmZVdZuEkNMaWO8tjNZrDwxFkxS1QbJ-gCLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>All parts used were available in the JLCPCB inventory. Only the fuse and the tactile switches had the setup surcharge.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-d9L2iSMaNU8/X34mySukQhI/AAAAAAACYag/h7EryTAcBC0xy9ZDkco59-p7r1Kee9UcgCLcBGAsYHQ/s2048/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-d9L2iSMaNU8/X34mySukQhI/AAAAAAACYag/h7EryTAcBC0xy9ZDkco59-p7r1Kee9UcgCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>The board will plug directly into a USB A port, or an extension cable. The 1.6mm PCB is on the thin side. Ideally it should be 2.2mm thick to fit properly. JLCPCB has 2mm PCB as an option, but not with assembly. I'm considering haveing a 0.6mm thick blank PCB with the same outline made and laminate the two PCBs together.<br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-90907070029944612972020-10-05T13:43:00.001-07:002020-12-04T15:22:43.857-08:00Copper legends<h1 style="text-align: left;">Sanded the soldermask off to expose the copper</h1><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-V71pfvY66b8/X3t-M2MgKcI/AAAAAAACYZc/eF6F7fKhALg_6r3WkYwdokxvp9kI3jumACLcBGAsYHQ/s2048/a.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-V71pfvY66b8/X3t-M2MgKcI/AAAAAAACYZc/eF6F7fKhALg_6r3WkYwdokxvp9kI3jumACLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>I used 220 wet/dry sandpaper to carefully sand the soldermask off the copper. I also used a Scotchbrite pad to dull the surface of the remaining soldermask.</p><p>The copper is starting to oxidize and turn darker. I could spray some clear acrylic to seal it.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-ofUQBNMR5tY/X3t-QKj4HSI/AAAAAAACYZg/3uBNSTwLEWgDgOqze0v5KljCcP2AWihtwCLcBGAsYHQ/s2048/b.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-ofUQBNMR5tY/X3t-QKj4HSI/AAAAAAACYZg/3uBNSTwLEWgDgOqze0v5KljCcP2AWihtwCLcBGAsYHQ/w640-h480/b.jpg" width="640" /></a></div><p></p><p>I also sanded the bottom of the PCB. This looks neat, but is probably a bad idea. The soldermask not only protects where solder can be applied, it is an electrical insulator. They make conformal coatings specifically designed to protect PCBs, but they have highly flammable solvents and I can't find any locally. Shipping for a small bottle is very expensive. If you are using leaded solder this is a very bad idea, creating lead dust. <br /></p>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-6487486434716575068.post-9205167896578132862020-10-02T13:51:00.000-07:002020-12-04T15:22:54.174-08:00Gherkin Express TH 2<h1 style="text-align: left;">Second version of the through hole Gherkin Express</h1><p>Main changes from the <a href="https://www.40percent.club/2020/09/gherkin-express-th.html" target="_blank">original Gherkin Express TH</a> are the <a href="https://www.digikey.com/short/zwh0d0" target="_blank">miniature 16MHz crystal</a> and the mini USB connector is moved inwards to be flush with the edge of the PCB. The zener diode footprint is overlapped with one for a blue LED.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-U0LM0JPzMFE/X3ePwFQOFVI/AAAAAAACYYM/L5764SuQTVQ9357BK2mG6q-1dP9cxvJ3ACLcBGAsYHQ/s2048/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-U0LM0JPzMFE/X3ePwFQOFVI/AAAAAAACYYM/L5764SuQTVQ9357BK2mG6q-1dP9cxvJ3ACLcBGAsYHQ/w640-h480/a.jpg" width="640" /></a></div><p></p><p>The switch positions and LED cut outs are the same as the first version.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-KVSw07-KXTE/X3ePwI_pH2I/AAAAAAACYYI/certIqbCYxUDraqBjYQZhuKdKOg20XHogCLcBGAsYHQ/s1209/b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="761" data-original-width="1209" src="https://1.bp.blogspot.com/-KVSw07-KXTE/X3ePwI_pH2I/AAAAAAACYYI/certIqbCYxUDraqBjYQZhuKdKOg20XHogCLcBGAsYHQ/s320/b.png" width="320" /></a></div><p></p><p>I made a new top piece with the legend in the top copper layer instead of the silkscreen layer. The resolution of the copper layer is much higher than the silkscreen. Green, blue, red and yellow soldermask is translucent and the legends can be read through them.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-oFlRewAj5eI/X3ePwdINuGI/AAAAAAACYYQ/3ep6QiN0tyou_Le1KNjgUG1uBRtgFpc9QCLcBGAsYHQ/s2048/c.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-oFlRewAj5eI/X3ePwdINuGI/AAAAAAACYYQ/3ep6QiN0tyou_Le1KNjgUG1uBRtgFpc9QCLcBGAsYHQ/w640-h480/c.jpg" width="640" /></a></div><p></p><p><a href="https://www.40percent.club/2018/06/dressing-up-cheap-m2-spacers.html" target="_blank">M2 spacers with M3 unthreaded spacers</a>. With the shorter crystal and a smaller 3mm diameter power capacitor laid down on it's side, everything fits with 4mm spacers.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-0NJ-OrzPgoI/X3ePwtVTgFI/AAAAAAACYYU/bT0DqUD9cSo5gi4VzSI8tAwta-eZwX6owCLcBGAsYHQ/s2048/d.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-0NJ-OrzPgoI/X3ePwtVTgFI/AAAAAAACYYU/bT0DqUD9cSo5gi4VzSI8tAwta-eZwX6owCLcBGAsYHQ/w640-h480/d.jpg" width="640" /></a></div><p></p><p>The two <a href="https://www.40percent.club/2020/09/blue-leds-instead-of-zener-diodes-in-v.html" target="_blank">zener diodes were replaced with rectangular 2x3x4 (4mm tall) blue LEDs</a>. The power capacitor on this one is a 4mm diameter solid polymer capacitor. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-H0Y5V8WJXkA/X3ePxPaOoXI/AAAAAAACYYc/RUq-kmtFBEg1LaR5YABoz6TqV7rUa2tmwCLcBGAsYHQ/s2048/e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-H0Y5V8WJXkA/X3ePxPaOoXI/AAAAAAACYYc/RUq-kmtFBEg1LaR5YABoz6TqV7rUa2tmwCLcBGAsYHQ/w640-h480/e.jpg" width="640" /></a></div><p></p><p>Blue PCB top piece. This one is 1mm thick, the green one was 0.8mm thick. It is a bit stiffer but does not make that much of a difference.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-W5b6pBBxu0c/X3ePw555mUI/AAAAAAACYYY/fW0YetnukCokdltVijwNWSB_l4TYUQtqACLcBGAsYHQ/s2048/f.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" height="480" src="https://1.bp.blogspot.com/-W5b6pBBxu0c/X3ePw555mUI/AAAAAAACYYY/fW0YetnukCokdltVijwNWSB_l4TYUQtqACLcBGAsYHQ/w640-h480/f.jpg" width="640" /></a></div><p>4mm spacers and a 1mm thick nylon washer between the bottom PCB. The top screws are 3mm and the bottom 6mm.<br /></p><p><br /></p>Unknownnoreply@blogger.com