|
| 1 | +| title | Adding more parts! | |
| 2 | +| ----------- | ------------------ | |
| 3 | +| description | Learn how to add RGB LEDs, rotary encoders, OLED screens, and more to your hackpad. | |
| 4 | +| priority | 2 | |
| 5 | + |
| 6 | +# Adding in other components! |
| 7 | + |
| 8 | +The hackpad kit comes with more than just a few keyswitches! It comes with RGB LEDs, Rotary encoders, and a fancy 128x32 OLED screen! |
| 9 | + |
| 10 | +The Orpheuspad example I designed has examples of every single one - I would also recommend looking at other repositories for inspo! |
| 11 | + |
| 12 | +As with anything, make sure to ask in #hackpad if you ever have any questions! |
| 13 | + |
| 14 | +## 4+ keys / Matrix wiring |
| 15 | + |
| 16 | +If you're using 4+ keys, you should use [matrix wiring!](https://docs.qmk.fm/how_a_matrix_works). Check out the tutorials in the [resources](/hackpad/resources) section to get an idea of what that might look like |
| 17 | + |
| 18 | +The tl;dr is that instead of wiring each switch to a unique pin, you can set them up in a 2D grid and pinpoint the specific switch being pressed based on which 2 pins activated! |
| 19 | + |
| 20 | +For example, if you wanted to wire 16 switches, you can wire them as a 4x4 matrix and only use 8 pins instead of having 1 pin for every single switch. |
| 21 | + |
| 22 | +You'll need diodes to do this. The specific diode that comes with the kit is a 1N4148 diode from onsemi. Datasheet [here](https://www.onsemi.com/download/data-sheet/pdf/1n914-d.pdf) |
| 23 | + |
| 24 | +For the footprint, I would recommend using `Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal`. You can use longer ones if you'd like for the aesthetic, but I find this one tends to work the best when assembling - do not use anything shorter, you'll have a pretty hard time if you do. |
| 25 | + |
| 26 | +## Rotary encoders |
| 27 | + |
| 28 | +Rotary encoders are knobs like [these](https://www.adafruit.com/product/377) - they turn both ways, and have a button you can press! |
| 29 | + |
| 30 | +The specific one we're using is the EC11E with a D-shaft that's 20mm long. You can find an exact CAD model in the [GitHub repository!](https://github.com/hackclub/hackpad/tree/clean/extras) |
| 31 | + |
| 32 | +I would recommend using the symbol `RotaryEncoder_Switch` and the footprint `RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mm` - you'll have to install this as a separate library, check out the [resources](/hackpad/resources) section! |
| 33 | + |
| 34 | +You _may_ see some implementations include pull-up resistors. This is not necessary for us since our microcontroller (the rp2040) has built-in pull up resistors. |
| 35 | + |
| 36 | +Firmware implementation info can be found here: |
| 37 | + |
| 38 | +- [QMK](https://docs.qmk.fm/features/encoders) |
| 39 | +- [KMK](https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/encoder.md) |
| 40 | +- [ZMK](https://zmk.dev/docs/development/hardware-integration/encoders) |
| 41 | + |
| 42 | +## SK6812MINI-E RGB LEDs |
| 43 | + |
| 44 | +These are the RGB LEDs that come with the hackpad kit! Each one has a super tiny microcontroller inside, so you can chain them together control all of them with only 1 pin of your micrcontroller! |
| 45 | + |
| 46 | +They have 4 pins - 1 5v power (VCC), 1 ground (GND), 1 for data coming in (DIN), and 1 for data going out of the LED (DOUT). |
| 47 | + |
| 48 | +KiCAD doesn't have the library for the footprint of these by default, but it comes with the KiCAD care package you can find in the "resources" section! It's called SK6812MINI-**E**, _NOT_ SK6812MINI (make sure your symbol and both footprint both say SK6812MINI-E) |
| 49 | + |
| 50 | +**IMPORTANT**: Make sure your pinout matches the following screenshot _exactly:_ |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +Notice the small notch/cut on the bottom right corner - your LEDs _will_ not work if it's in a different orientation! |
| 55 | + |
| 56 | +## OLED Display |
| 57 | + |
| 58 | +OLED Displays are small screens that can display various pieces of info! Here's a cat animation I had earlier |
| 59 | + |
| 60 | +<video controls class="w-full max-w-full h-auto rounded"> |
| 61 | + <source src="https://cdn.hackclub.com/019c1b00-538c-7a58-a621-12ec0ac71655/pxl_20241115_191000789.mp4" type="video/mp4" /> |
| 62 | + Your browser does not support the video element. |
| 63 | +</video> |
| 64 | + |
| 65 | +For footprint, you can actually just use a 4 pin header! This is because the module uses a standard 2.54mm 4 pin header, there's no fancy external footprint needed |
| 66 | + |
| 67 | +The most important thing to note is to make sure that you make sure the pin order is correct. Some pictures you'll see online will feature the 4 pins in different orientations, make sure it is GND-VCC-SCL-SDA. |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +*the actual OLED you'll get will have a blue PCB - this picture is just to illustrate the pinout* |
| 72 | + |
| 73 | +Additionally, pull-up resistors are _not_ necessary! The microcontroller we're using is based on the [Raspberry Pi RP2040](https://www.raspberrypi.com/products/rp2040/), which has built-in pullup resistors on every pin - this means you don't need to manually add resistors. |
| 74 | + |
| 75 | +As always, make sure to ask in #hackpad if you need any help! |
0 commit comments