Minor button PCB update (so v1.11)

This commit is contained in:
whowechina 2024-05-07 09:41:52 +08:00
parent 77e5eb8bf1
commit 821d2e8d58
4 changed files with 288 additions and 288 deletions

Binary file not shown.

Binary file not shown.

280
README.md
View File

@ -1,140 +1,140 @@
# Mai Pico - Maimai Style Mini Controller
[点这里可以切换到中文版](README_CN.md)
<img src="doc/main.jpg" width="80%">
<img src="doc/assembled.jpg" width="80%">
**Features:**
* Made with a 15.6 inch portable screen.
* Arcade-like experience.
* Dual-player is possible.
* Built-in AIME support.
* All source files open.
Thanks to many respectful guys/companies who made their tools or materials free or open source (KiCad, OnShape, InkScape, Raspberry things, JLCPCB).
## Notes
This project is the most complex one among all my projects.
* It needs a custom etched ITO glass and a portable display.
* Heavily depends on 3D printing.
* Requires skills to solder tiny components.
* Requires many other DIY hands-on skills.
* The IO PCB is still in prototype state, it works, but the layout and connectors are not perfect. You may need to solder directly from Pi Pico's pins. I'm just too lazy to release a new version.
* I didn't design the housing, so it's your job to make it look nice and structually stable, follow your imagination and taste.
## Check Out My Other Projects
You can also check out my other cool projects.
<img src="https://github.com/whowechina/popn_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_teeny/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/chu_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/mai_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/diva_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/aic_pico/raw/main/doc/main.jpg" height="100px">
* Popn Pico: https://github.com/whowechina/popn_pico
* IIDX Pico: https://github.com/whowechina/iidx_pico
* IIDX Teeny: https://github.com/whowechina/iidx_teeny
* Chu Pico: https://github.com/whowechina/chu_pico
* Mai Pico: https://github.com/whowechina/mai_pico
* Diva Pico: https://github.com/whowechina/diva_pico
* AIC Pico: https://github.com/whowechina/aic_pico
## **Disclaimer** ##
I made this project in my personal time with no financial benefit or sponsorship. I will continue to improve the project. I have done my best to ensure that everything is accurate and functional, there's always a chance that mistakes may occur. I cannot be held responsible for any loss of your time or money that may result from using this open source project. Thank you for your understanding.
## About the License
It's CC-NC. So DIY for yourself and for your friend, don't make money from it.
## HOW TO BUILD
### PCB
* Go JLCPCB and make order with the gerber zip file (latest `Production\PCB\mai_io_v*.zip` and `Production\PCB\mai_button_v*.zip`), regular FR-4 board, 1.6mm thickness. You need 1x io PCB and 8x button PCBs for one Mai Pico con.
<img src="doc/pcbs.jpg" width="50%">
* 1x Rasberry Pico Pi Pico or Pico W.
https://www.raspberrypi.com/products/raspberry-pi-pico
Becareful of 3 pins that are at the other side, they're difficult to solder and may leave air bubbles.
<img src="doc/solder_usb_txrx.jpg" width="60%">
* 1x USB Type-C socket (918-418K2023S40001 or KH-TYPE-C-16P)
* 2x 0603 5.1kohm resistors (R20, R21) for USB. If you plan to use the native USB socket on the Pi Pico directly, then the Type-C socket and resistors can be omitted, making the soldering much simpler.
* 3x MPR121 modules, there're many types in the market, choose ones like this.
https://www.sparkfun.com/products/retired/9695
Before solder MP121 module to the main PCB board, remember to use a knife to **cut (unshort) the tiny trace that connects ADDR to the GND**. Please be careful not to cut more than necessary.
<img src="doc/mpr121_cut.png" width="40%">
* Leave U5, U6, U7 area discrete components empty as we're using MPR121 module, not the chip.
* 1x SN74LV1T34DBVR (SOT-23-5) level shifter (U8), if you can't find one, use a 0603 10ohm resistor (R4) as an alternative.
https://www.lcsc.com/product-detail/Buffer-Driver-Transceiver_Texas-Instruments-SN74LV1T34DBVR_C100024.html
* 4x 0603 1uF (0.1~1uF all fine) capacitors (C1, C2, C3, C7), OPTIONAL, recommended.
* 16x WS2812B-3528 RGB LEDs (each button needs two).
* 8x Kailh Choc v1 key switches, linear, 30gf to 45gf ones.
https://www.kailhswitch.com/mechanical-keyboard-switches/low-profile-key-switches/burnt-orange-switch.html
* 1x PN532 NFC module and some thin wires, only needed if you want AIME.
https://www.elechouse.com/product/pn532-nfc-rfid-module-v4/
You need to solder it to the same I2C as the MPR121 (GPIO 6 and 7).
### ITO Glass
* Find a service to make custom etching ITO coated glass. The AutoCAD file is `Production\CAD\mai_pico_ito_v*.dwg`. Use 2mm thickness, 10-20ohm sheet resistance ITO coated glass.
<img src="doc/ito_glass.jpg" width="70%">
* The ITO coated glass is connected to the IO PCB by "zebra cable" (1.6mm pitch: 0.8mm black part and 0.8mm clear part). A silicon heater head at 200°C is used to stick the zebra cable to the gold finger part of PCB and ITO coated glass. The formal name of this cable is "Heat Seal Connector".
<img src="doc/zebra_cable.jpg" width="70%">
* Custom ITO coated glass is relatively expensive, but ours is small, so it's not like arcade-size expensive. This is the shop I ordered the ITO glass. The minimal batch is around 5 pieces. But they provide service only in China as far as I know.
https://shop378788148.taobao.com/?spm=2013.1.1000126.2.305e16c4LFf1GW
### Button Ring
* Print out the 8x set of base, link, button and cover from `Production\3DPrint\mai_*.stl`.
* Buy 8x 2mm (diameter) * 40mm (length) steel shafts, they're used as the button hinge.
* Here's how to assemble them, hinge shaft and components on PCB are not shown in this rendered image.
<img src="doc/assemble.jpg" width="80%">
* Here's how I assembled the ring. Please note that wiring for the button switches is missing in these pictures.
* All discrete components ready.
<img src="doc/assemble_1.jpg" width="60%">
* Solder the button PCB first.
<img src="doc/assemble_2.jpg" width="60%">
* PCBs are daisy-chained using short and soft 4-wire cable, they're LED_GND, LED, LED_5V and BUTTON_GND. The BUTTON signal pins are not soldered yet, you can later wire them. Don't worry about the order of button GPIOs, because they can be remapped through command line interface.
<img src="doc/assemble_3.jpg" width="60%">
* You need 3M5423 UHMW film tape (or similar hard and super-smooth PTFE tape with 0.2-0.3 thickness). It is to lubricate the button surface that touches the keyswitch.
<img src="doc/button_lub.jpg" width="60%">
* Assemble the 3D printed parts together with the PCBs.
<img src="doc/assemble_4.jpg" width="60%">
* Use shaft to expand the support holes a little bit, and apply some keyboard switch lubricant such as Krytox 205G0 to make the shaft super smooth.
<img src="doc/assemble_5.jpg" width="60%">
* Each `link` needs 8x M2*4mm screws to connect two `base`s together.
<img src="doc/assemble_6.jpg" width="60%">
* Install the cover, each needs 2x M2*5mm screws.
<img src="doc/assemble_7.jpg" width="60%">
### Portable Display
* Resolution: 1920*1080, size: 15.6inch, refresh rate: 120Hz (recommended) or 60Hz, built-in speakers.
* They're easy to find. Choose cheap or even tiny-flawed ones, they're much cheaper and work just fine.
* There're 2 types of driver board, one is micro-HDMI only and the other supports type-C display (for convenient Nintendo Switch connection). They're both OK.
https://www.amazon.com/s?k=portable+display+15.6+120hz&s=price-asc-rank&crid=1CCA2EAYLZDBE&qid=1697276847&sprefix=portable+display+15.6+120hz%2Caps%2C387&ref=sr_st_price-asc-rank&ds=v1%3AqoS0mks05q225yuL8reh50fEEBkTZ583nMPEZJwjXAk
### Glue Things Together
* I use 3M VHB tape (0.5mm or 1mm thickness) to stick the button ring, the ITO glass and the monitor together.
* Only use a little tape, I use 4 small pieces to stick ITO glass to the display and another 4 small pieces to stick button ring to the ITO glass.
* Don't apply the tape on the traces of the ITO glass, you can see the traces or pads at certain angle.
### Housing
* It's your job to design it and make it look nice.
### Firmware
* UF2 file is in `Production\Firmware` folder.
* For the new build, hold the BOOTSEL button while connect the USB to a PC, there will be a disk named "RPI-RP2" showed up. Drag the UF2 firmware binary file into it. That's it.
* LED and Touch protocols are implemented following Sucareto's research at https://github.com/Sucareto/Mai2Touch.
* It has a command line to do configuration. You can use this Web Serial Terminal to connect to the USB serial port of the Mai Pico. (`?` to display help message.)
https://googlechromelabs.github.io/serial-terminal/
<img src="doc/cmd.png" width="60%">
* Please note that when you click "Connect" button, you'll actually see the name of each port.
<img src="doc/ports.png" width="60%">
* Button GPIOs can be remapped using `gpio` command. Firmware supports 8 main buttons on the ring and 4 auxiliary buttons (Test, Service, Navigate and Coin).
* Touch keys can be remapped using `touch` command. For people who's using Mai Pico to drive a custom ITO film or a ITO glass, this command will be very useful. For example:
* `touch` with no parameter is to detect touched keys.
* `touch 1 9 E6` is to set the second MPR121's electrode 9 to key "E6". Key name of "XX" means "Not Connected".
* Daisy chained RGB LED numbers for each button can be assigned using `rgb` command.
* LED brightness can be adjusted by `level` command.
* There are MPR121 parameter tuning and sensitive settings, explore them yourself.
* It implements 3 COM ports, one is for command line and the other two are for LED and Touch. By issuing `whoami` to the command line, each COM port will print their identities.
* Button signal is sent to the host by HID Joystick or HID NKRO (keyboard). There're two set of NKRO keymaps, use `hid <joy|key1|key2>` to switch between them. In NKRO mode, key mappings are:
* key1: `WEDCXZAQ`-Ring Buttons, `3`-Select
* key2 (Numpad): `89632147`-Ring Buttons, `*`-Select
* Above two sets both have: `F1`-Test `F2`-Service `F3`-Coin
* `factory` to reset to default. When there's a firmware update, the old configuration may become corrupted, you can reset configuration, then re-plug the controller.
## CAD Source File
I'm using OnShape free subscription. It's powerful but it can't archive original designs to local, so I can only share the link here. STL/DXF/DWG files are exported from this online document.
https://cad.onshape.com/documents/d8b39d27c9cb7990d9ce4d46/w/2c1baa71e391bfd1246f122b/e/f87f0f1c373fe2186ddc5c9c?renderMode=0&uiState=652a665608b4e07137e3861a
# Mai Pico - Maimai Style Mini Controller
[点这里可以切换到中文版](README_CN.md)
<img src="doc/main.jpg" width="80%">
<img src="doc/assembled.jpg" width="80%">
**Features:**
* Made with a 15.6 inch portable screen.
* Arcade-like experience.
* Dual-player is possible.
* Built-in AIME support.
* All source files open.
Thanks to many respectful guys/companies who made their tools or materials free or open source (KiCad, OnShape, InkScape, Raspberry things, JLCPCB).
## Notes
This project is the most complex one among all my projects.
* It needs a custom etched ITO glass and a portable display.
* Heavily depends on 3D printing.
* Requires skills to solder tiny components.
* Requires many other DIY hands-on skills.
* The IO PCB is still in prototype state, it works, but the layout and connectors are not perfect. You may need to solder directly from Pi Pico's pins. I'm just too lazy to release a new version.
* I didn't design the housing, so it's your job to make it look nice and structually stable, follow your imagination and taste.
## Check Out My Other Projects
You can also check out my other cool projects.
<img src="https://github.com/whowechina/popn_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_teeny/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/chu_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/mai_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/diva_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/aic_pico/raw/main/doc/main.jpg" height="100px">
* Popn Pico: https://github.com/whowechina/popn_pico
* IIDX Pico: https://github.com/whowechina/iidx_pico
* IIDX Teeny: https://github.com/whowechina/iidx_teeny
* Chu Pico: https://github.com/whowechina/chu_pico
* Mai Pico: https://github.com/whowechina/mai_pico
* Diva Pico: https://github.com/whowechina/diva_pico
* AIC Pico: https://github.com/whowechina/aic_pico
## **Disclaimer** ##
I made this project in my personal time with no financial benefit or sponsorship. I will continue to improve the project. I have done my best to ensure that everything is accurate and functional, there's always a chance that mistakes may occur. I cannot be held responsible for any loss of your time or money that may result from using this open source project. Thank you for your understanding.
## About the License
It's CC-NC. So DIY for yourself and for your friend, don't make money from it.
## HOW TO BUILD
### PCB
* Go JLCPCB and make order with the gerber zip file (latest `Production\PCB\mai_io_v*.zip` and `Production\PCB\mai_button_v*.zip`), regular FR-4 board, 1.6mm thickness. You need 1x io PCB and 8x button PCBs for one Mai Pico con.
<img src="doc/pcbs.jpg" width="50%">
* 1x Rasberry Pico Pi Pico or Pico W.
https://www.raspberrypi.com/products/raspberry-pi-pico
Becareful of 3 pins that are at the other side, they're difficult to solder and may leave air bubbles.
<img src="doc/solder_usb_txrx.jpg" width="60%">
* 1x USB Type-C socket (918-418K2023S40001 or KH-TYPE-C-16P)
* 2x 0603 5.1kohm resistors (R20, R21) for USB. If you plan to use the native USB socket on the Pi Pico directly, then the Type-C socket and resistors can be omitted, making the soldering much simpler.
* 3x MPR121 modules, there're many types in the market, choose ones like this.
https://www.sparkfun.com/products/retired/9695
Before solder MP121 module to the main PCB board, remember to use a knife to **cut (unshort) the tiny trace that connects ADDR to the GND**. Please be careful not to cut more than necessary.
<img src="doc/mpr121_cut.png" width="40%">
* Leave U5, U6, U7 area discrete components empty as we're using MPR121 module, not the chip.
* 1x SN74LV1T34DBVR (SOT-23-5) level shifter (U8), if you can't find one, use a 0603 10ohm resistor (R4) as an alternative.
https://www.lcsc.com/product-detail/Buffer-Driver-Transceiver_Texas-Instruments-SN74LV1T34DBVR_C100024.html
* 4x 0603 1uF (0.1~1uF all fine) capacitors (C1, C2, C3, C7), OPTIONAL, recommended.
* 16x WS2812B-3528 RGB LEDs (each button needs two).
* 8x Kailh Choc v1 key switches, linear, 30gf to 45gf ones.
https://www.kailhswitch.com/mechanical-keyboard-switches/low-profile-key-switches/burnt-orange-switch.html
* 1x PN532 NFC module and some thin wires, only needed if you want AIME.
https://www.elechouse.com/product/pn532-nfc-rfid-module-v4/
You need to solder it to the same I2C as the MPR121 (GPIO 6 and 7).
### ITO Glass
* Find a service to make custom etching ITO coated glass. The AutoCAD file is `Production\CAD\mai_pico_ito_v*.dwg`. Use 2mm thickness, 10-20ohm sheet resistance ITO coated glass.
<img src="doc/ito_glass.jpg" width="70%">
* The ITO coated glass is connected to the IO PCB by "zebra cable" (1.6mm pitch: 0.8mm black part and 0.8mm clear part). A silicon heater head at 200°C is used to stick the zebra cable to the gold finger part of PCB and ITO coated glass. The formal name of this cable is "Heat Seal Connector".
<img src="doc/zebra_cable.jpg" width="70%">
* Custom ITO coated glass is relatively expensive, but ours is small, so it's not like arcade-size expensive. This is the shop I ordered the ITO glass. The minimal batch is around 5 pieces. But they provide service only in China as far as I know.
https://shop378788148.taobao.com/?spm=2013.1.1000126.2.305e16c4LFf1GW
### Button Ring
* Print out the 8x set of base, link, button and cover from `Production\3DPrint\mai_*.stl`.
* Buy 8x 2mm (diameter) * 40mm (length) steel shafts, they're used as the button hinge.
* Here's how to assemble them, hinge shaft and components on PCB are not shown in this rendered image.
<img src="doc/assemble.jpg" width="80%">
* Here's how I assembled the ring. Please note that wiring for the button switches is missing in these pictures.
* All discrete components ready.
<img src="doc/assemble_1.jpg" width="60%">
* Solder the button PCB first.
<img src="doc/assemble_2.jpg" width="60%">
* Button PCBs are daisy-chained using short and soft 3-wire cable, they're G, IN/OUT, V (GND, Signal In/Out and VCC respectively). RGB signal goes in from "IN" and goes out to the next LED through "OUT". The "Btn" button signal pins are not soldered yet, you can later wire them. Don't worry about the order of button GPIOs, because they can be remapped through command line interface.
<img src="doc/assemble_3.jpg" width="60%">
* You need 3M5423 UHMW film tape (or similar hard and super-smooth PTFE tape with 0.2-0.3 thickness). It is to lubricate the button surface that touches the keyswitch.
<img src="doc/button_lub.jpg" width="60%">
* Assemble the 3D printed parts together with the PCBs.
<img src="doc/assemble_4.jpg" width="60%">
* Use shaft to expand the support holes a little bit, and apply some keyboard switch lubricant such as Krytox 205G0 to make the shaft super smooth.
<img src="doc/assemble_5.jpg" width="60%">
* Each `link` needs 8x M2*4mm screws to connect two `base`s together.
<img src="doc/assemble_6.jpg" width="60%">
* Install the cover, each needs 2x M2*5mm screws.
<img src="doc/assemble_7.jpg" width="60%">
### Portable Display
* Resolution: 1920*1080, size: 15.6inch, refresh rate: 120Hz (recommended) or 60Hz, built-in speakers.
* They're easy to find. Choose cheap or even tiny-flawed ones, they're much cheaper and work just fine.
* There're 2 types of driver board, one is micro-HDMI only and the other supports type-C display (for convenient Nintendo Switch connection). They're both OK.
https://www.amazon.com/s?k=portable+display+15.6+120hz&s=price-asc-rank&crid=1CCA2EAYLZDBE&qid=1697276847&sprefix=portable+display+15.6+120hz%2Caps%2C387&ref=sr_st_price-asc-rank&ds=v1%3AqoS0mks05q225yuL8reh50fEEBkTZ583nMPEZJwjXAk
### Glue Things Together
* I use 3M VHB tape (0.5mm or 1mm thickness) to stick the button ring, the ITO glass and the monitor together.
* Only use a little tape, I use 4 small pieces to stick ITO glass to the display and another 4 small pieces to stick button ring to the ITO glass.
* Don't apply the tape on the traces of the ITO glass, you can see the traces or pads at certain angle.
### Housing
* It's your job to design it and make it look nice.
### Firmware
* UF2 file is in `Production\Firmware` folder.
* For the new build, hold the BOOTSEL button while connect the USB to a PC, there will be a disk named "RPI-RP2" showed up. Drag the UF2 firmware binary file into it. That's it.
* LED and Touch protocols are implemented following Sucareto's research at https://github.com/Sucareto/Mai2Touch.
* It has a command line to do configuration. You can use this Web Serial Terminal to connect to the USB serial port of the Mai Pico. (`?` to display help message.)
https://googlechromelabs.github.io/serial-terminal/
<img src="doc/cmd.png" width="60%">
* Please note that when you click "Connect" button, you'll actually see the name of each port.
<img src="doc/ports.png" width="60%">
* Button GPIOs can be remapped using `gpio` command. Firmware supports 8 main buttons on the ring and 4 auxiliary buttons (Test, Service, Navigate and Coin).
* Touch keys can be remapped using `touch` command. For people who's using Mai Pico to drive a custom ITO film or a ITO glass, this command will be very useful. For example:
* `touch` with no parameter is to detect touched keys.
* `touch 1 9 E6` is to set the second MPR121's electrode 9 to key "E6". Key name of "XX" means "Not Connected".
* Daisy chained RGB LED numbers for each button can be assigned using `rgb` command.
* LED brightness can be adjusted by `level` command.
* There are MPR121 parameter tuning and sensitive settings, explore them yourself.
* It implements 3 COM ports, one is for command line and the other two are for LED and Touch. By issuing `whoami` to the command line, each COM port will print their identities.
* Button signal is sent to the host by HID Joystick or HID NKRO (keyboard). There're two set of NKRO keymaps, use `hid <joy|key1|key2>` to switch between them. In NKRO mode, key mappings are:
* key1: `WEDCXZAQ`-Ring Buttons, `3`-Select
* key2 (Numpad): `89632147`-Ring Buttons, `*`-Select
* Above two sets both have: `F1`-Test `F2`-Service `F3`-Coin
* `factory` to reset to default. When there's a firmware update, the old configuration may become corrupted, you can reset configuration, then re-plug the controller.
## CAD Source File
I'm using OnShape free subscription. It's powerful but it can't archive original designs to local, so I can only share the link here. STL/DXF/DWG files are exported from this online document.
https://cad.onshape.com/documents/d8b39d27c9cb7990d9ce4d46/w/2c1baa71e391bfd1246f122b/e/f87f0f1c373fe2186ddc5c9c?renderMode=0&uiState=652a665608b4e07137e3861a

View File

@ -1,148 +1,148 @@
# Mai Pico - Maimai 风格的迷你控制器
[Click here for the English version of this guide.](README.md)
<img src="doc/main.jpg" width="80%">
<img src="doc/assembled.jpg" width="80%">
为了省事,本文档是我从原先英文版翻译回中文的,高度依赖了 GitHub Copilot (GPT),所以语气可能怪怪的,见谅。
**特性:**
* 使用 15.6 英寸的便携式屏幕制作。
* 类似街机的体验。
* 可以双人游戏。
* 内置支持 AIME。
* 所有源文件开放。
感谢许多尊敬的爱好者和公司将他们的工具或材料免费或开源KiCadOnShapeInkScapeRaspberry 相关工具, 嘉立创)。
## 注意事项
这个项目是我众多项目里最复杂的一个。
* 它需要定制蚀刻的 ITO 玻璃和便携式显示器。
* 严重依赖 3D 打印。
* 需要焊接微小组件的技能。
* 需要许多其他 DIY 动手技能。
* IO PCB 仍处于原型状态,它可以工作,但布局和连接器并不完美。您可能需要直接从 Pi Pico 的引脚焊接。我太懒了,原型之后就没有做新版本。
* 我没有设计外壳,需要你自己来设计,让它看起来漂亮且结构稳定,发挥你的想象力,跟随你的品味。
## 查看我的其他项目
你也可以查看我其他的酷炫项目。
<img src="https://github.com/whowechina/popn_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_teeny/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/chu_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/mai_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/diva_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/aic_pico/raw/main/doc/main.jpg" height="100px">
* Popn Pico: https://github.com/whowechina/popn_pico
* IIDX Pico: https://github.com/whowechina/iidx_pico
* IIDX Teeny: https://github.com/whowechina/iidx_teeny
* Chu Pico: https://github.com/whowechina/chu_pico
* Mai Pico: https://github.com/whowechina/mai_pico
* Diva Pico: https://github.com/whowechina/diva_pico
* AIC Pico: https://github.com/whowechina/aic_pico
## **声明** ##
我在个人时间内制作了这个项目,没有任何经济利益或赞助。我将继续改进这个项目。我已尽我所能确保所有内容的准确性和功能性,但总有可能出现错误。如果你因使用这个开源项目而造成时间或金钱的损失,我不能负责。感谢你的理解。
查看我 GitHub 主页,上面有很多其他项目。
https://github.com/whowechina/
## 关于许可证
它是 CC-NC 授权。所以你只能给自己和你的朋友 DIY不能利用这个项目赚钱。
## 如何构建
### PCB
* 去 JLCPCB 并使用 gerber zip 文件(最新的 `Production\PCB\mai_io_v*.zip``Production\PCB\mai_button_v*.zip`)下单,常规 FR-4 板,厚度 1.6mm。你需要 1x io PCB 和 8x 按钮 PCBs 来构建一个 Mai Pico con。
<img src="doc/pcbs.jpg" width="50%">
* 1x Raspberry Pico Pi Pico 或 Pico W。
https://www.raspberrypi.com/products/raspberry-pi-pico
注意另一侧的 3 个引脚,它们很难焊接,可能会留下气泡。
<img src="doc/solder_usb_txrx.jpg" width="60%">
* 1x USB Type-C 插座918-418K2023S40001 或 KH-TYPE-C-16P
* 2x 0603 5.1kohm 电阻R20R21用于 USB如果你打算直接使用 Pi Pico 上面原生的 USB 插座,那么 Type-C 插座和电阻都可以省去,焊接也会简单不少。
* 3x MPR121 模块,市场上有许多类型,选择像这样的。
https://www.sparkfun.com/products/retired/9695
在将 MP121 模块焊接到主 PCB 板之前,记得用小刀**切断 ADDR 和 GND 之间的微小连线**,注意绝对不要切过头。
<img src="doc/mpr121_cut.png" width="40%">
* 因为我们使用的是 MPR121 模块,而不是芯片,所以 U5、U6、U7 区域的离散组件留空。
* 1x SN74LV1T34DBVRSOT-23-5电平转换器U8如果你找不到可以用 0603 10ohm 电阻R4替代。
https://www.lcsc.com/product-detail/Buffer-Driver-Transceiver_Texas-Instruments-SN74LV1T34DBVR_C100024.html
* 4x 0603 1uF0.1~1uF 都可以电容器C1C2C3C7可选推荐。
* 16x WS2812B-3528 RGB LED每个按钮需要两个
* 8x Kailh Choc v1 键盘开关线性的30gf 到 45gf 的。
https://www.kailhswitch.com/mechanical-keyboard-switches/low-profile-key-switches/burnt-orange-switch.html
* 1x PN532 NFC 模块和一些细电线, 只有需要 AIME 的时候才用得上.
https://www.elechouse.com/product/pn532-nfc-rfid-module-v4/
你需要把它焊接到 MPR121 所在的 I2C 总线上GPIO 6 and 7
### ITO 玻璃
* 找一个服务定制蚀刻 ITO 镀膜玻璃。AutoCAD 文件是 `Production\CAD\mai_pico_ito_v*.dwg`。使用 2mm 厚10-20ohm 平方电阻的 ITO 镀膜玻璃。
<img src="doc/ito_glass.jpg" width="70%">
* ITO 镀膜玻璃通过 "斑马线"1.6mm 间距0.8mm 黑色部分和 0.8mm 透明部分)连接到 IO PCB。使用 200°C 的硅加热头将斑马线粘贴到 PCB 的金手指部分和 ITO 镀膜玻璃上。这种线的正式名称是 "热压密封连接器"。
<img src="doc/zebra_cable.jpg" width="70%">
* 定制 ITO 镀膜玻璃相对较贵,但我们的尺寸小,所以并不像街机那么贵。这是我订购 ITO 玻璃的店铺,我订购的时候的最小批量是 5 件。据我所知,他们只在中国提供服务。我和他们店铺没有关联,此处提供链接并不表示我为他们的产品和服务负责。
https://shop378788148.taobao.com/?spm=2013.1.1000126.2.305e16c4LFf1GW
### 按键环
* 从 `Production\3DPrint\mai_*.stl` 打印出 8 套 `底座`、`连接板`、`按钮` 和 `盖子`
* 购买 8 根 2mm直径* 40mm长度的钢轴它们用作按钮铰链。
* 这是如何组装它们的方法,这个渲染图像中没有显示铰链轴和 PCB 上的组件。
<img src="doc/assemble.jpg" width="80%">
* 这是我如何组装环的方法。请注意,这些图片中缺少按钮开关的线路。
* 所有离散组件已准备好。
<img src="doc/assemble_1.jpg" width="60%">
* 首先焊接按钮 PCB。
<img src="doc/assemble_2.jpg" width="60%">
* PCB 使用短且柔软的 4 线电缆串联,它们是 LED_GND、LED、LED_5V 和 BUTTON_GND。BUTTON 信号引脚还没有焊接,你可以后面再焊接。请不用担心按钮 GPIOs 的顺序,因为它们可以通过命令行界面重新映射。
<img src="doc/assemble_3.jpg" width="60%">
* 你需要 3M5423 UHMW 胶带(或类似的硬且超滑的 PTFE 胶带,厚度 0.2-0.3)。它用来润滑触摸键开关的按钮表面。
<img src="doc/button_lub.jpg" width="60%">
* 将 3D 打印的部件和 PCBs 组装在一起。
<img src="doc/assemble_4.jpg" width="60%">
* 使用轴稍微扩大支撑孔,然后涂上一些键盘开关润滑剂,如 Krytox 205G0使轴超级光滑。
<img src="doc/assemble_5.jpg" width="60%">
* 每个 `连接板` 需要 8x M2*4mm 螺丝将两个 `底座` 连接在一起。
<img src="doc/assemble_6.jpg" width="60%">
* 安装 `盖子`,每个需要 2x M2*5mm 螺丝。
<img src="doc/assemble_7.jpg" width="60%">
### 便携显示器
* 分辨率1920*1080尺寸15.6 英寸刷新率120Hz推荐或 60Hz内置扬声器。
* 它们很容易找到。选择闲鱼上有小瑕疵的会便宜得多,也一样很好用。
* 有两种类型的驱动板,一种只有 micro-HDMI另一种支持 type-C 显示(方便连接 Nintendo Switch。两种都可以。
https://www.amazon.com/s?k=portable+display+15.6+120hz&s=price-asc-rank&crid=1CCA2EAYLZDBE&qid=1697276847&sprefix=portable+display+15.6+120hz%2Caps%2C387&ref=sr_st_price-asc-rank&ds=v1%3AqoS0mks05q225yuL8reh50fEEBkTZ583nMPEZJwjXAk
### 粘合到一起
* 我使用 3M VHB 胶带0.5mm 或 1mm 厚将按钮环、ITO 玻璃和显示器粘在一起。
* 只使用一点胶带,我使用 4 小块胶带将 ITO 玻璃粘到显示器上,另外 4 小块胶带将按钮环粘到 ITO 玻璃上。
* 不要在 ITO 玻璃的走线上贴胶带,你可以在某个角度光线下看到 ITO 的走线。
### 外壳
* 设计并使其看起来漂亮是你的工作。
### 固件
* UF2 文件在 `Production\Firmware` 文件夹中。
* 对于新的构建,连接 USB 到 PC 时按住 BOOTSEL 按钮,会出现一个名为 "RPI-RP2" 的磁盘。将 UF2 固件二进制文件拖入其中。就这样。
* LED 和 Touch 协议的实现遵循 Sucareto 在 https://github.com/Sucareto/Mai2Touch 上的研究。
* 它有一个命令行进行配置。你可以使用这个 Web Serial Terminal 连接到 Mai Pico 的 USB 串口。(注意:"?" 是帮助)
https://googlechromelabs.github.io/serial-terminal/
<img src="doc/cmd.png" width="60%">
* 当你点击这个网页的 Connect 按钮后,你能看到每个端口的名称。
<img src="doc/ports.png" width="60%">
* 可以使用 `gpio` 命令重新映射按钮 GPIOs固件支持 8 个主按钮和 4 个辅助按钮分别是Test, Service, Navigate, Coin
* 可以使用 `touch` 命令重新映射触摸键。对于用 ITO 膜手作触摸板,或者自己定制了引脚不同的 ITO 镀膜玻璃的朋友,这个命令会很有用:
* `touch` 不带参数,可以用来检测当前按下的触摸键。
* `touch 1 9 E6` 是映射第二个 MPR121 传感器的电极 9 到 “E6”注意 “XX” 表示不连接任何触摸键。
* 可以使用 `rgb` 命令为每个按钮分配串联的 RGB LED 数量。
* 可以通过 `level` 命令调整 LED 的亮度。
* 有 MPR121 参数调整和灵敏度设置,自己探索。
* 它实现了 3 个 COM 端口,一个用于命令行,另外两个用于 LED 和 Touch。通过向命令行发出 `whoami`,每个 COM 端口都会打印它们的身份。
* 按钮信号通过 HID Joystick 或 HID NKRO键盘发送到主机。有两套 NKRO 键映射,使用 `hid <joy|key1|key2>` 在它们之间切换。在 NKRO 模式下,键映射是:
* key1`WEDCXZAQ`-按键环,`3`-Select
* key2小键盘`89632147`-按键环,`*`-Select
* 上述两套都有:`F1`-Test `F2`-Service `F3`-投币
* `factory` 用来复位到默认配置。当固件升级时,老配置可能失效,这时候请复位到默认配置,然后重新插拔一下控制器。
## CAD 源文件
我正在使用 OnShape 的免费订阅。它很强大但不能将原始设计存档到本地所以我只能在这里分享链接。STL/DXF/DWG 文件是从这个在线文档导出的。
https://cad.onshape.com/documents/d8b39d27c9cb7990d9ce4d46/w/2c1baa71e391bfd1246f122b/e/f87f0f1c373fe2186ddc5c9c?renderMode=0&uiState=652a665608b4e07137e3861a
# Mai Pico - Maimai 风格的迷你控制器
[Click here for the English version of this guide.](README.md)
<img src="doc/main.jpg" width="80%">
<img src="doc/assembled.jpg" width="80%">
为了省事,本文档是我从原先英文版翻译回中文的,高度依赖了 GitHub Copilot (GPT),所以语气可能怪怪的,见谅。
**特性:**
* 使用 15.6 英寸的便携式屏幕制作。
* 类似街机的体验。
* 可以双人游戏。
* 内置支持 AIME。
* 所有源文件开放。
感谢许多尊敬的爱好者和公司将他们的工具或材料免费或开源KiCadOnShapeInkScapeRaspberry 相关工具, 嘉立创)。
## 注意事项
这个项目是我众多项目里最复杂的一个。
* 它需要定制蚀刻的 ITO 玻璃和便携式显示器。
* 严重依赖 3D 打印。
* 需要焊接微小组件的技能。
* 需要许多其他 DIY 动手技能。
* IO PCB 仍处于原型状态,它可以工作,但布局和连接器并不完美。您可能需要直接从 Pi Pico 的引脚焊接。我太懒了,原型之后就没有做新版本。
* 我没有设计外壳,需要你自己来设计,让它看起来漂亮且结构稳定,发挥你的想象力,跟随你的品味。
## 查看我的其他项目
你也可以查看我其他的酷炫项目。
<img src="https://github.com/whowechina/popn_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/iidx_teeny/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/chu_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/mai_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/diva_pico/raw/main/doc/main.jpg" height="100px"><img src="https://github.com/whowechina/aic_pico/raw/main/doc/main.jpg" height="100px">
* Popn Pico: https://github.com/whowechina/popn_pico
* IIDX Pico: https://github.com/whowechina/iidx_pico
* IIDX Teeny: https://github.com/whowechina/iidx_teeny
* Chu Pico: https://github.com/whowechina/chu_pico
* Mai Pico: https://github.com/whowechina/mai_pico
* Diva Pico: https://github.com/whowechina/diva_pico
* AIC Pico: https://github.com/whowechina/aic_pico
## **声明** ##
我在个人时间内制作了这个项目,没有任何经济利益或赞助。我将继续改进这个项目。我已尽我所能确保所有内容的准确性和功能性,但总有可能出现错误。如果你因使用这个开源项目而造成时间或金钱的损失,我不能负责。感谢你的理解。
查看我 GitHub 主页,上面有很多其他项目。
https://github.com/whowechina/
## 关于许可证
它是 CC-NC 授权。所以你只能给自己和你的朋友 DIY不能利用这个项目赚钱。
## 如何构建
### PCB
* 去 JLCPCB 并使用 gerber zip 文件(最新的 `Production\PCB\mai_io_v*.zip``Production\PCB\mai_button_v*.zip`)下单,常规 FR-4 板,厚度 1.6mm。你需要 1x io PCB 和 8x 按钮 PCBs 来构建一个 Mai Pico con。
<img src="doc/pcbs.jpg" width="50%">
* 1x Raspberry Pico Pi Pico 或 Pico W。
https://www.raspberrypi.com/products/raspberry-pi-pico
注意另一侧的 3 个引脚,它们很难焊接,可能会留下气泡。
<img src="doc/solder_usb_txrx.jpg" width="60%">
* 1x USB Type-C 插座918-418K2023S40001 或 KH-TYPE-C-16P
* 2x 0603 5.1kohm 电阻R20R21用于 USB如果你打算直接使用 Pi Pico 上面原生的 USB 插座,那么 Type-C 插座和电阻都可以省去,焊接也会简单不少。
* 3x MPR121 模块,市场上有许多类型,选择像这样的。
https://www.sparkfun.com/products/retired/9695
在将 MP121 模块焊接到主 PCB 板之前,记得用小刀**切断 ADDR 和 GND 之间的微小连线**,注意绝对不要切过头。
<img src="doc/mpr121_cut.png" width="40%">
* 因为我们使用的是 MPR121 模块,而不是芯片,所以 U5、U6、U7 区域的离散组件留空。
* 1x SN74LV1T34DBVRSOT-23-5电平转换器U8如果你找不到可以用 0603 10ohm 电阻R4替代。
https://www.lcsc.com/product-detail/Buffer-Driver-Transceiver_Texas-Instruments-SN74LV1T34DBVR_C100024.html
* 4x 0603 1uF0.1~1uF 都可以电容器C1C2C3C7可选推荐。
* 16x WS2812B-3528 RGB LED每个按钮需要两个
* 8x Kailh Choc v1 键盘开关线性的30gf 到 45gf 的。
https://www.kailhswitch.com/mechanical-keyboard-switches/low-profile-key-switches/burnt-orange-switch.html
* 1x PN532 NFC 模块和一些细电线, 只有需要 AIME 的时候才用得上.
https://www.elechouse.com/product/pn532-nfc-rfid-module-v4/
你需要把它焊接到 MPR121 所在的 I2C 总线上GPIO 6 and 7
### ITO 玻璃
* 找一个服务定制蚀刻 ITO 镀膜玻璃。AutoCAD 文件是 `Production\CAD\mai_pico_ito_v*.dwg`。使用 2mm 厚10-20ohm 平方电阻的 ITO 镀膜玻璃。
<img src="doc/ito_glass.jpg" width="70%">
* ITO 镀膜玻璃通过 "斑马线"1.6mm 间距0.8mm 黑色部分和 0.8mm 透明部分)连接到 IO PCB。使用 200°C 的硅加热头将斑马线粘贴到 PCB 的金手指部分和 ITO 镀膜玻璃上。这种线的正式名称是 "热压密封连接器"。
<img src="doc/zebra_cable.jpg" width="70%">
* 定制 ITO 镀膜玻璃相对较贵,但我们的尺寸小,所以并不像街机那么贵。这是我订购 ITO 玻璃的店铺,我订购的时候的最小批量是 5 件。据我所知,他们只在中国提供服务。我和他们店铺没有关联,此处提供链接并不表示我为他们的产品和服务负责。
https://shop378788148.taobao.com/?spm=2013.1.1000126.2.305e16c4LFf1GW
### 按键环
* 从 `Production\3DPrint\mai_*.stl` 打印出 8 套 `底座`、`连接板`、`按钮` 和 `盖子`
* 购买 8 根 2mm直径* 40mm长度的钢轴它们用作按钮铰链。
* 这是如何组装它们的方法,这个渲染图像中没有显示铰链轴和 PCB 上的组件。
<img src="doc/assemble.jpg" width="80%">
* 这是我如何组装环的方法。请注意,这些图片中缺少按钮开关的线路。
* 所有离散组件已准备好。
<img src="doc/assemble_1.jpg" width="60%">
* 首先焊接按钮 PCB。
<img src="doc/assemble_2.jpg" width="60%">
* 按键 PCB 使用细小且柔软的 3 线电缆串联,它们是 G、IN/OUT、V分别代表地、信号进/出和电源。按钮开关信号引脚还没有焊接,你可以后面再焊接。请不用担心按钮 GPIO 的顺序,因为它们可以通过命令行重新映射。
<img src="doc/assemble_3.jpg" width="60%">
* 你需要 3M5423 UHMW 胶带(或类似的硬且超滑的 PTFE 胶带,厚度 0.2-0.3)。它用来润滑触摸键开关的按钮表面。
<img src="doc/button_lub.jpg" width="60%">
* 将 3D 打印的部件和 PCBs 组装在一起。
<img src="doc/assemble_4.jpg" width="60%">
* 使用轴稍微扩大支撑孔,然后涂上一些键盘开关润滑剂,如 Krytox 205G0使轴超级光滑。
<img src="doc/assemble_5.jpg" width="60%">
* 每个 `连接板` 需要 8x M2*4mm 螺丝将两个 `底座` 连接在一起。
<img src="doc/assemble_6.jpg" width="60%">
* 安装 `盖子`,每个需要 2x M2*5mm 螺丝。
<img src="doc/assemble_7.jpg" width="60%">
### 便携显示器
* 分辨率1920*1080尺寸15.6 英寸刷新率120Hz推荐或 60Hz内置扬声器。
* 它们很容易找到。选择闲鱼上有小瑕疵的会便宜得多,也一样很好用。
* 有两种类型的驱动板,一种只有 micro-HDMI另一种支持 type-C 显示(方便连接 Nintendo Switch。两种都可以。
https://www.amazon.com/s?k=portable+display+15.6+120hz&s=price-asc-rank&crid=1CCA2EAYLZDBE&qid=1697276847&sprefix=portable+display+15.6+120hz%2Caps%2C387&ref=sr_st_price-asc-rank&ds=v1%3AqoS0mks05q225yuL8reh50fEEBkTZ583nMPEZJwjXAk
### 粘合到一起
* 我使用 3M VHB 胶带0.5mm 或 1mm 厚将按钮环、ITO 玻璃和显示器粘在一起。
* 只使用一点胶带,我使用 4 小块胶带将 ITO 玻璃粘到显示器上,另外 4 小块胶带将按钮环粘到 ITO 玻璃上。
* 不要在 ITO 玻璃的走线上贴胶带,你可以在某个角度光线下看到 ITO 的走线。
### 外壳
* 设计并使其看起来漂亮是你的工作。
### 固件
* UF2 文件在 `Production\Firmware` 文件夹中。
* 对于新的构建,连接 USB 到 PC 时按住 BOOTSEL 按钮,会出现一个名为 "RPI-RP2" 的磁盘。将 UF2 固件二进制文件拖入其中。就这样。
* LED 和 Touch 协议的实现遵循 Sucareto 在 https://github.com/Sucareto/Mai2Touch 上的研究。
* 它有一个命令行进行配置。你可以使用这个 Web Serial Terminal 连接到 Mai Pico 的 USB 串口。(注意:"?" 是帮助)
https://googlechromelabs.github.io/serial-terminal/
<img src="doc/cmd.png" width="60%">
* 当你点击这个网页的 Connect 按钮后,你能看到每个端口的名称。
<img src="doc/ports.png" width="60%">
* 可以使用 `gpio` 命令重新映射按钮 GPIOs固件支持 8 个主按钮和 4 个辅助按钮分别是Test, Service, Navigate, Coin
* 可以使用 `touch` 命令重新映射触摸键。对于用 ITO 膜手作触摸板,或者自己定制了引脚不同的 ITO 镀膜玻璃的朋友,这个命令会很有用:
* `touch` 不带参数,可以用来检测当前按下的触摸键。
* `touch 1 9 E6` 是映射第二个 MPR121 传感器的电极 9 到 “E6”注意 “XX” 表示不连接任何触摸键。
* 可以使用 `rgb` 命令为每个按钮分配串联的 RGB LED 数量。
* 可以通过 `level` 命令调整 LED 的亮度。
* 有 MPR121 参数调整和灵敏度设置,自己探索。
* 它实现了 3 个 COM 端口,一个用于命令行,另外两个用于 LED 和 Touch。通过向命令行发出 `whoami`,每个 COM 端口都会打印它们的身份。
* 按钮信号通过 HID Joystick 或 HID NKRO键盘发送到主机。有两套 NKRO 键映射,使用 `hid <joy|key1|key2>` 在它们之间切换。在 NKRO 模式下,键映射是:
* key1`WEDCXZAQ`-按键环,`3`-Select
* key2小键盘`89632147`-按键环,`*`-Select
* 上述两套都有:`F1`-Test `F2`-Service `F3`-投币
* `factory` 用来复位到默认配置。当固件升级时,老配置可能失效,这时候请复位到默认配置,然后重新插拔一下控制器。
## CAD 源文件
我正在使用 OnShape 的免费订阅。它很强大但不能将原始设计存档到本地所以我只能在这里分享链接。STL/DXF/DWG 文件是从这个在线文档导出的。
https://cad.onshape.com/documents/d8b39d27c9cb7990d9ce4d46/w/2c1baa71e391bfd1246f122b/e/f87f0f1c373fe2186ddc5c9c?renderMode=0&uiState=652a665608b4e07137e3861a