rPico KMK powered macropad with IPS screen

Related tags

HardwareMacroPact
Overview

MacroPact

rPico KMK powered macropad with IPS screen

MacroPact Idea/Desing: Sean Yin

Build/Coding: kbjunky ( In case of any problems hit me up on Discord kbjunky#6476 or Reddit /u/kbjunky)

BOM

Item Count Example
USB-C Female Breakout 1 Link
28AWG 10 Pin Flat Ribbon cable (Rainbow) 5m Link
M2/4mm heat insert 8 Link
Raspberry Pico 1 Link
WS2812 RGB Strip min 7 diodes Link
240x240 IPS/TFT 1.3" screen 1 Link
12mm Rotary Encoder with switch 2 Link
Kailh Choc V1 Switch 17 Link
Choc V1 Keycaps 17 Link
1N4148 Fast switching diode through hole 19 Link
0.1mm copper jumper wire 1 Link
M2/4mm flat head screw 4 Link
M2/8mm flat head screw 4 Link
15x16 Knob 1 Link
25x17 Knob 1 Link
6x2 antislip pads 4 Link

On top of that you'll be needing:

  • Soldering iron
  • Rosin core solder wire (anything between 0.5mm to 1mm, preferable with lead 'Pb')
  • Sharp tool to remove supports from 3D printed parts
  • Wire stripper but a normal knife will also do the job
  • Hot glue gun
  • Soldering flux or flux marker

Remarks

Be sure to order same shaft type encoder/knob. Either Knurl or Flat(D-Type).

0.1mm copper wire is used to wire the switch matrix. It's enameled so there's no risk of shorting when crossed at the same time being very easy to solder unlike tranformer core enameled wires.

Keycaps can be ordered from Kailh Official store on Aliexpress. A better alternative is MKUltra Set.

Use flux on wires before soldering the tip.

Build guide

Setup CircuitPython

Follow this guide in order to have CircuitPython up and running on your Raspberry Pico. When it's installed correctly after plugin it in you should be able to see an additional drive named CIRCUIT_PYTHON or similar. At this point you can just copy paste the content of src directory onto the newly installed drive. This will cause rPico to reboot and keyboard firmware should be running.

3D Printing

Print the pieces in any color that you like, but best if:

  • Bottom is non shine through color (only the glow insert is meant to pass the light)
  • Glow insert is transparent filament
  • Top plate is also non shine through (if you opt for a white or similar color then you'll have to cover the bottom side with tape/paint to prevent the light from shinning through)

Top plate:

  • Infill 100%
  • Layer height 0.2
  • Print facing down to get a nice smooth surface (especially if you're printing on a mirror)

Bottom:

  • Infill 30%
  • Layer height 0.1
  • Support ON

Glow insert:

  • Infill 100%
  • Layer height 0.1

Printed bottom part should look like this. Use a sharp tool to remove supports from USB port and glow insert slot. Use glue/hot glue to fix the the glow insert in place.

Use soldering iron and push in the heat inserts into designated spots.

At this point you can also try attaching top plate. It should clip in. Check if all holes align etc.

Wiring

Start with connecting USB-C extension.

Connection diagram:

rPico USB-C
VBUS V+
TP2 D-
TP3 D+
TP1 GND

Check if wiring is correct by plugging in the rPico and checking if the internal drive has showed up. If it's OK then screw in the MCU into the bottom part of the macropad with M2/5mm screws and insert the USB-C socket into the hole at the back. Secure it with hot glue.

Insert switches, encoders into the top plate. Secure the encoders with washers and screws that came with it. Here I have used my own amoebas but you will be fine with just bare switches.

Follow the diagrams below for wiring the matrix columns.

And matrix rows.

This is how it looked like in my case.

Now is a good time to attach the IPS screen to the top plate. Follow the below diagram in order to connect the IPS with rPico (Dotted wire is white).

Once this is done it's time to test it and align it properly. After booting the keyboard it should display visual help for the first layer (I've used a different image, just a white rectangle to mark the edges of the screen, but now when firmware is all done you can use default 1st layer visual guide).

Align the display part of the screen with the slot and secure it with hot glue from he bottom. (Don't mind the diffrent colors on the photo it was a temporary connector back then).

With that out of the way we can proceed and connect our matrix with the MCU. Follow the below table and diagrams posted above for proper wiring.

Columns

Matrix MCU
COL_0 Red GP15
COL_1 Green GP14
COL_2 Yellow GP13
COL_3 Black GP12
COL_4 White GP11

Rows

Matrix MCU
Row_0 Red GP16
Row_1 Green GP17
Row_2 Black GP18
Row_3 White GP19

Last thing that is left are encoders. Clip the mounting legs on the sides, we won't be needing them (thick ones). Connect 'C' pads (the one in the middle of the side with three legs) to any GND on the MCU. Then connect pads A and B from each encoder according to this table.

Row_1 Green Encoder MCU
Pad A GP1
Pad B GP0
Row_2 Black Encoder MCU
Pad A GP2
Pad B GP3

And last but not least RGB. Cut the amount of diodes that suits you best. I would recommend anything between 7 to 9 or 11. Wiring is quite simple. Use the GND near the data pin on the MCU.

RGB MCU
VCC VBUS
Data GP28
GND GND(AGND)

And that's it. If all went well your MacroPact should be functional. Connect it and check. If it's all good secure remaining parts with hot glue (ie. encoders, LED strip). Attach the top plate to the bottom part and screw it in with the 8mm screws. Put on the keycaps and enjoy!

You can customize the layout anyway you want. You might want to check KMK Manual before you do. Check 'SVG' folder for a template for visual guide that is displayed per layer. You can use Inkscape for editing it and then export to PNG. In order to save space you can convert exported PNG files to low color BMP. Also note that the final picture has to be rotated 90 deg CCW.

You can edit the text for key/modifier(bottom left of each cell). Some modifiers are not visible because the stroke/fill is set to the background color. Change the color if you want the modifier to be visible. Use Unicode characters for the icons, there's plenty to choose from.

As a last step I recommend using rubber feet to prevent the macropad from sliding on the desk. Also a magnetic USB-C cable can come handy as it won't put this much stress on the socket and is very neat.

And this is it, hope this guide is detailed enough. Enjoy your MacroPact and please share your build on r/MK!

Create (templateable) cameras that display qr codes in homeassistant

QRCam This custom component creates cameras displaying qrcodes. The QRCodes can be static or generated from templates. If you use a template as conten

Jannes Müller 5 Oct 06, 2022
Universal Xiaomi MIoT integration for Home Assistant

Xiaomi MIoT Raw 简体中文 | English MIoT 协议是小米智能家居从 2018 年起推行的智能设备通信协议规范,此后凡是可接入米家的设备均通过此协议进行通信。此插件按照 MIoT 协议规范与设备通信,实现对设备的状态读取及控制。

1.9k Jan 02, 2023
DOS-like OS for RP2040 basic microcontroller boards

Micropython DOS-like OS for RP2040 microcontroller boards. Check out the demo video at https://www.youtube.com/watch?v=Az_oiq8GE4Y To start the OS typ

RetiredWizard 58 Dec 27, 2022
Modi2-firmware-updater - MODI+ Firmware Updater With Python

MODI+ Firmware Updater 실행 준비 python3(파이썬3.9 혹은 그 이상의 버전)를 컴퓨터에 설치 python3 -m pip

LUXROBO 1 Feb 04, 2022
♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr) 🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data) Note: Th

PawnSolo 4 Dec 19, 2022
3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

3D-printable hexagonal mirror array capable of reflecting sunlight into arbitrary patterns

Ben Bartlett 2.3k Dec 30, 2022
Used python functional programming to make this Ai assistant

Python-based-AI-Assistant I have used python functional programming to make this Ai assistant. Inspiration of project : we have seen in our daily life

Durgesh Kumar 2 Dec 26, 2021
Micropython-wifimanager-esp8266 - Simple Wifi Manager for ESP8266 using MicroPython

micropython-wifimanager-esp8266 Simple Wifi Manager for ESP8266 using MicroPytho

Abhinuv Nitin Pitale 1 Jan 04, 2022
Code for the paper "Planning with Diffusion for Flexible Behavior Synthesis"

Planning with Diffusion Training and visualizing of diffusion models from Planning with Diffusion for Flexible Behavior Synthesis. Guided sampling cod

Michael Janner 310 Jan 07, 2023
An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and display it on a FeatherS2 in an OLED display.

CircuitPython IoT Trivia ESP32-S2 OLED Version An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and

Kevin Thomas 1 Nov 27, 2021
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
Volkswagen ID component for Home Assistant

Volkswagen ID component for Home Assistant This folder contains both a generic Python 3 library for the Volkswagen ID API and a component for Home Ass

55 Jan 07, 2023
This is a python script to grab data from Zyxel NSA310 NAS and display in Home Asisstant as sensors.

Home-Assistant Python Scripts Python Scripts for Home-Assistant (http://www.home-assistant.io) Zyxel-NSA310-Home-Assistant Monitoring This is a python

6 Oct 31, 2022
Event-based hardware simulation framework

An event-based multi-device simulation framework providing configuration and orchestration of complex multi-device simulations.

Diamond Light Source Controls Group 3 Feb 01, 2022
Adafruit IO connected smart thermostat based on CircuitPython.

Adafruit IO Thermostat Adafruit IO connected smart thermostat based on CircuitPython. Background and Motivation I have a 24 V Heat-only system with a

Shubham Chaudhary 1 Jan 18, 2022
SALUS THERMOSTAT Custom component for Home-Assistant

Home-Assistant Custom Components Custom Components for Home-Assistant (http://www.home-assistant.io) Salus Thermostat Climate Component My device is R

21 Dec 18, 2022
Claussoft Personal Digital Assistant

Claussoft Personal Digital Assistant Install on Linux $ sudo apt update $ sudo apt install espeak ffmpeg libespeak1 portaudio19-dev $ pip install -r r

Christian Clauss 3 Dec 14, 2022
Python para microcontroladores com MicroPyhton

MicroPython - PyBR2021 Python para microcontroladores com MicroPyhton Repositório de exemplos para tutorial "Python para microcontroladores com MicroP

gabriel aragão 1 Oct 18, 2021
ENC28J60 Ethernet chip driver for MicroPython (RP2)

micropy-ENC28J60 ENC28J60 Ethernet chip driver for MicroPython v1.17 (RP2) Rationale ENC28J60 is a popular and cheap module for DIY projects. At the m

11 Nov 16, 2022
A modular sequencer based on Pi Pico & EuroPi

PicoSequencer A modular sequencer based on Pi Pico & EuroPi by Zeno Van Moerkerke / Keurslager Kurt For now it is 'only' a trigger sequencer, but I si

5 Oct 27, 2022