Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New keyboard - Unicomp Mini M with default keymap #12892

Merged
merged 4 commits into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions keyboards/unicomp/mini_m/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
## Unicomp Mini M with Teensy2.0++ controller & QMK Firmware
stevendlander marked this conversation as resolved.
Show resolved Hide resolved

### Overview

#### Goals

The goal of this project was to replace the stock control board of the Unicomp Mini M with a programmable one. The Mini
M was released by [Unicomp](https://www.pckeyboard.com) in Q1 of 2021 and is a re-release of The IBM Model M Space
Saving Keyboard (SSK) with some enhancements.

This guide strives to achieve the following:

* Make completely reversable changes, or in other words, no permanent modifications to the Mini M
* Allow full programmability of the Mini M via QMK
* Be able to flash firmware without having to take the board apart to hit the reset button
* Create a default keymap that works just like the stock keymap shipped from Unicomp, including the toggle-able number
pad
* Support all LEDs as normal

My guide will go a few steps further:

* Convert the wired connection from USB-A to USB-C
* Install a potentiometer to dim the LEDs if desired

#### Credits

The following resources were instrumental to the success of this project:

* Model M 101/102 write-up located in `qmk_firmware/keyboards/converter/modelm`
* [Model M Subreddit](https://modelm.reddit.com)
* Model M Discord

### Hardware

##### Parts

For a working Mini M with QMK *without* LEDs working, the following parts are necessary:

* 1 Adafruit Perma-Proto Full Sized Breadboard. Luckily, this board is a perfect fit for the Mini M case!
* 1 Teensy2.0++, with headers soldered on if you can find it
* 2 20-row x 1 column headers, if you can't find a Teensy with headers already soldered on
* 2 16-pin Ribbon connectors, PCB mount
* Hookup wire. I used 30AWG wire and while it worked, I should have used 1 gauge (or more) thicker
* A panel mount male USB-B to female USB-C extender

To get the Mini M working with LEDs, you will need:

* 3 1kOhm through-hole resistors

##### Tools

The following were absolutely critical for the project:

* Soldering iron, preferably one with a narrow tip for small connections
* Drill, preferably a hand-held rotary tool (such as a Dremel)
* Wire strippers/cutters
* A sharp knife

Optional, but worth having around:

* Helping-hands, PCB holder, preferably both
* Multi-meter for testing continuity of your connections
* Hot-glue gun for mounting the USB extender to the Perma-Proto

### Assembly

#### Solder Teensy to the Perma-Proto

1. Solder headers to Teensy
2. Solder headers to Perma-Proto

#### Solder ribbon connectors

* Rows on the Perma-Proto that line up with membrane ribbons
* Trim excess under board
* Test continuity

#### Solder in hookup wires

* Ribbon connector used for the right ribbon will need hookup wire to establish connections to the Teensy
* 12 required, 16 if you want full functionality

#### Optional: Solder in resistors

#### Caveat: D6 pin on the Teensy

There are a few ways to mount the Teensy to the Perma-Proto board. I chose to connect my 16 pin ribbon connector to the
Teensy pins starting at C7 and ending at D2. If you do this, beware that pin D6 will not work for the purposes of this
project. It is possible to modify it to make it so, but that is beyond the scope of this guide.

Bypassing D6 is necessary if you mount your ribbon connector as I have just described. Luckily, it is a simple process!
First, with a sharp knife, sever the connection between your ribbon connector pin that is connected to Teensy D6 pin. I
would recommend doing this at the closest possible point to the Teensy on the underside of the Perma-Proto board. Once
that is done, use a remaining point on the Perma-Proto bus for that ribbon connection (that was previously connected to
D6) to add a jumper wire connected to pin B7. If you are using the firmware files provided in this repository,
everything is already set for this configuration.

### Testing

### Software

#### Build firmware

See qmk documentation on getting your build environment working.

Compile the Mini M firmware files with the default keymap. It allows for the Mini M to be used with the same
functionality as shipped from the manufacturer.

```bash
$ qmk compile -kb unicomp/mini_m -km default
```

While plugged in, press the reset button on your Teensy and then:

```bash
$ qmk flash -kb unicomp/mini_m -km default
```

If everything works to this point, congratulations! You now have a programmable Mini M. If you are using the default
keymap, you can reset your Teensy by pressing Shift+Pause together, eliminating the need to take apart the case in order
to do so.

#### Keymaps

To build your own keymap, create a new directory in `keyboards/unicomp/mini_m/keymaps/<your name>`, copy the files from
`keyboards/unicomp/mini_m/default` into your new directory, and edit them as you wish. When you are ready to flash your
new keymap to the Mini M, the command will be `qmk flash -kb unicomp/mini_m -kb <your name>`.
134 changes: 134 additions & 0 deletions keyboards/unicomp/mini_m/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
Copyright 2021 stevendlander

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
#define DEVICE_VER 0x0001
#define MANUFACTURER whiskerbiskit
#define PRODUCT Unicomp Mini M

/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 16

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1 }
#define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, B7, D5, D4, D3, D2 }
#define UNUSED_PINS

#define LED_PIN_ON_STATE 0
#define LED_NUM_LOCK_PIN B6
#define LED_CAPS_LOCK_PIN B5
#define LED_SCROLL_LOCK_PIN B4

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION ROW2COL

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */
#define DEBOUNCE 5

/* The Mini M has no diodes */
#define MATRIX_HAS_GHOST

#define PREVENT_STUCK_MODIFIERS
stevendlander marked this conversation as resolved.
Show resolved Hide resolved
#define LEADER_TIMEOUT 300
#define LEADER_PER_KEY_TIMING

/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/

/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))

/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false

/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
stevendlander marked this conversation as resolved.
Show resolved Hide resolved

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
Loading