游戏和临床

824

7

0

Introduction: Game & MINTIA

About: Make it yourself if you cannot buy one!

Step 1: What Is MINTIA?

MINTIA is a multi favor tablet produced by Asahi Group Food, Ltd. in Japan since 1996. The sweet box design make it very easy to take one and only one tablet out when put off the cover, you can see thedemo videohow it works. MINTIA is very popular in Japan, it even have many 3rd parties tailor-made leather case for MINTIA.

甜盒非常薄,平板电脑插座非常适合微USB插头。Mintia超过20岁,Micro USB插头尚未出生于当时!多么巧合!

4年前,我想挤出所有电子元器件,以了解它是多少。这是我在Mintia Sweet Box上建造的第三个项目。

Asahi Mintia页面:

https://www.asahigroup-holdings.com/en/brand/minti...

MINTIA official Facebook page:

https://www.facebook.com/mintia.jp

My previous Mintia projects:

https://www.sledutah.com/arduino-mintia-game -...

//www.sledutah.com/iot-led-matrix/

Step 2: Sweet Box Patch

I would like to hide the NES console under the MINTIA sweet box, so I will keep the original front face unchanged. All magic hide at the back ;>

First of all I need consume all 50 MINTIA tablets. It is an easy job, I can consume box of it every week. Then remove the back face sticker. MINTIA box is well designed, front and back part assembled without glue. So it is very easy to tear apart after put off the tablet outlet cover. I would like to utilize all space in the box, so I will cut out all the internal supports.

现在我可以挤压它里面的所有组件。

第3步:设计背面布局

I would like the NES console look like the Nintendo classic "Game & Watch" series. So I selected a red MINTIA sweet box. Then I use a gold color paper as a cover. Landscape layout, screen at the middle, direction buttons on the left, select and start buttons at the bottom and 2 big buttons on the right. Besides the standard NES buttons, I also require 2 more buttons for save and load status. So I add 2 more small buttons on the upper right.

Step 4: Hardware Selection

ESP32 Dev Board

This NES console is based on my previous instructables,Arduino NES, so it require a ESP32 dev board. Not much dev board can fit into the sweet box, TTGO T7 v1.3 is the small enough one after removed the Lipo Battery socket. The limitation is it does not have PSRAM, it limited the NES ROM can play.

Lipo电池

The Lipo capacity direct limited the console playing life time, so it should be as big as possible. Exclude the room for the ESP32 dev board, there are still enough room for a 30 x 30 x 40 mm 360 mAH Lipo battery. I think it can last over an hour.

Display

1.54“英寸方形显示器,ST7789 IPS LCD,是最大的显示器,可以适合Mintia,仍有足够的空间留在按钮。

Audio board

ESP32可以使用内部DAC或外部I2S DAC。内部DAC仍然需要额外的放大器来驱动扬声器和外部具有更好的音质,因此我选择外部I2S DAC放大器板。没有任何I2S DAC音频分子板可以适合剩余的房间,因此我需要来自MAX98357板的补丁。

Speaker

After MAX98357 patch, there are still have enough room can fit in a 10*18 mm speaker.

原型PCB.

普通PCB太厚,我们需要一个特殊的薄(<= 1 mm)原型PCB,用于保持显示和按钮。

Buttons

For better playing experience, this time I selected some light touch (125 gf / 160 gf operating force) tactile switches from Diptronics.

第5步:修复Dev Board和Lipo

  • Direct soldering Lipo to the original Lipo socket power pins
  • Use hot glue fix the dev board on the sweet box and align the USB socket in the right place (beware hot glue should not touch any GPIO pins)
  • 使用一点点热胶固定Lipo电池
  • 仔细检查甜盒后盖可以在没有问题的情况下重新组装

第6步:I2S DAC板补丁

The MAX98357 board is a tiny square board but it still cannot fit in the sweet box. The upper part is the speaker connector and no any other electronic components. I will cut it out for saving space. The speaker still can connect by soldering the node between 2 capacitors as show in second photo. Then use hot glue fix in the sweet box and double check the sweet box back cover can reassemble without problems.

Then it is the soldering work, here are the connection summary:

ESP32  - > MAX98357 ===== ======== GPIO 15(TD0) - > LRC GPIO 13(TCK) - > BCLK GPIO 14(TMS) - > DIN 5V  - > VIN GND  - > GND  -> 100k欧姆电阻 - >增益(可选15 dB增益)

ref .:

https://datasheets.maximintegrate.com/en/ds/max98 ...

第7步:早期测试

第一个组件连接后,i2 DAC,我我们uld like to check is it works. So switch to software part first.

Step 8: Software Preparation

Arduino IDE

Download and install Arduino IDE if you are not yet do it:

https://www.arduino.cc/en/main/software

ESP32支持

请按照安装说明添加ESP32支持,如果您还没有这样做:

https://github.com/espressif/arduino-esp32

Arduino ESP32文件系统上传器

Follow the installation steps to install Arduino ESP32 filesystem uploader if you are not yet do it:

https://github.com/me-no-dev/arduino-esp32fs-plugi ...

Arduino_GFX Library

Download latest Arduino_GFX libraries: (press "Clone or Download" -> "Download ZIP")

https://github.com/moonournation/arduino_gfx.

Import libraries in Arduino IDE. (Arduino IDE "Sketch" Menu -> "Include Library" -> "Add .ZIP Library" -> select downloaded ZIP file)

Arduino Nofrendo Library

Download latest Arduino Nofrendo libraries: (press "Clone or Download" -> "Download ZIP")

https://github.com/moononournation/arduino-nofrend...

Import libraries in Arduino IDE. (Arduino IDE "Sketch" Menu -> "Include Library" -> "Add .ZIP Library" -> select downloaded ZIP file)

步骤9:配置

  • Open esp32-nofrendo sample code in Arduino IDE ("File" -> "Example" -> "arduino-nofrendo" -> "esp32-nofrendo")
  • 保存为一个新项目
  • Change hardware parameters:

hwconfig.h在线69附近,选择圆形

// Uncomment one of below, ESP32 support SPIFFS SD_MMC and SD /* SPIFFS */ #define FILESYSTEM_BEGIN SPIFFS.begin(false, FSROOT); FS filesystem = SPIFFS; /* 1-bit SD mode SD_MMC, always retry once for begin() failed */ // #define FILESYSTEM_BEGIN (!SD_MMC.begin(FSROOT, true)) && (!SD_MMC.begin(FSROOT, true)); FS filesystem = SD_MMC; /* 4-bit SD mode SD_MMC, always retry once for begin() failed */ // #define FILESYSTEM_BEGIN (!SD_MMC.begin(FSROOT, false)) && (!SD_MMC.begin(FSROOT, false)); FS filesystem = SD_MMC; /* SD using default SPI settings */ // #define FILESYSTEM_BEGIN SD.begin(22 /* SS */, SPI, 8000000, FSROOT); FS filesystem = SD; /* SD using custom SPI settings */ // #define FILESYSTEM_BEGIN SPIClass spi = SPIClass(HSPI); spi.begin(14, 2, 15, 13); SD.begin(13, spi, 8000000, FSROOT); FS filesystem = SD;

hwconfig.h around line 81, set I2S DAC pins

//启用音频#define hw_audio #define hw_audio_extdac #define hw_audio_extdac_wclk 15 #define hw_audio_extdac_bclk 13 #define hw_audio_extdac_dout 14 #define hw_audio_samplege 22050

hwconfig.h around line 89, setting controller GPIO

/ *控制器GPIO * / #定义HW_CONTROLLER_GPIO // #define HW_CONTROLLER_GPIO_ANALOG_JOYSTICK // #define HW_CONTROLLER_GPIO_REVERSE_UD // #define HW_CONTROLLER_GPIO_UP_DOWN 34 // #define HW_CONTROLLER_GPIO_REVERSE_LF // #define HW_CONTROLLER_GPIO_LEFT_RIGHT 35 #define HW_CONTROLLER_GPIO_UP 12 #define HW_CONTROLLER_GPIO_DOWN 32 #define HW_CONTROLLER_GPIO_LEFT 25 #define HW_CONTROLLER_GPIO_RIGHT 27 #define HW_CONTROLLER_GPIO_SELECT 4 #define HW_CONTROLLER_GPIO_START 0 #define HW_CONTROLLER_GPIO_A 22 #define HW_CONTROLLER_GPIO_B 21 #define HW_CONTROLLER_GPIO_X 17 #define HW_CONTROLLER_GPIO_Y 16

if your display is 9-bit SPI LCD, display.h around line 37

// #define tft_brightness 128 / * 0  -  255 * // #define TFT_BL 14 ARDUINO_DATABUS * BUS = NEW ARDUINO_ESP32SPI(-1 / * DC * /,5 / * CS * /,18 / * SCK * /,23 /* mosi * /,-1 / * miso * /);Arduino_St7789 * GFX = New Arduino_St7789(总线,33 / * RST * /,0 / *旋转* /,TRUE / * IPS * /,240 / *宽* /,240 / *高度* /,0 / * COL OFFSET 1* /,80 / *行偏移1 * /);/ * ST7796在面包板上* / // #define TFT_BL 32 // ARDUINO_DATABUS * BUS = NEW ARDUINO_ESP32SPI_DMA(32 / * DC * /,-1 / * CS * /,25 / * SCK * /,33 / * MOSI * /,-1 / * miso * /);// arduino_tft * gfx = new Arduino_st7796(总线,-1 / * RST * /,1 / *旋转* /);/ * st7796在lcdkit * / // #define tft_bl 23 // arduino_esp32spi_dma * bus = new Arduino_esp32spi_dma(19 / * DC * /,5 / * CS * /,22 / * SCK * /,21 / * MOSI * /,-1 / * miso * /);// arduino_st7796 * gfx = new arduino_st7796(总线,18,1 / *旋转* /);

如果您的显示是正常的SPI LCD,DISPLAY.H围绕第37行

// #define TFT_BRIGHTNESS 128 /* 0 - 255 */ // #define TFT_BL 14 Arduino_ESP32SPI_DMA *bus = new Arduino_ESP32SPI_DMA(14 /* DC */, 5 /* CS */, 18 /* SCK */, 23 /* MOSI */, -1 /* MISO */); Arduino_ST7789 *gfx = new Arduino_ST7789(bus, 33 /* RST */, 0 /* rotation */, true /* IPS */, 240 /* width */, 240 /* height */, 0 /* col offset 1 */, 80 /* row offset 1 */); /* ST7796 on breadboard */ // #define TFT_BL 32 // Arduino_DataBus *bus = new Arduino_ESP32SPI_DMA(32 /* DC */, -1 /* CS */, 25 /* SCK */, 33 /* MOSI */, -1 /* MISO */); // Arduino_TFT *gfx = new Arduino_ST7796(bus, -1 /* RST */, 1 /* rotation */); /* ST7796 on LCDKit */ // #define TFT_BL 23 // Arduino_ESP32SPI_DMA *bus = new Arduino_ESP32SPI_DMA(19 /* DC */, 5 /* CS */, 22 /* SCK */, 21 /* MOSI */, -1 /* MISO */); // Arduino_ST7796 *gfx = new Arduino_ST7796(bus, 18, 1 /* rotation */);

第10步:程序

  1. Connect the device with USB cable
  2. Open Arduino IDE
  3. Open esp32-nofrendo sample code ("File" -> "Example" -> "arduino-nofrendo" -> "esp32-nofrendo")
  4. Press Arduino IDE "Upload" button
  5. 在Arduino IDE中选择“工具”菜单 - >“ESP32素描数据上传”将将ROM文件上传到ESP32 Sciffs。

步骤11:序列测试

The dev board have a built-in "Boot" button. This button can help ESP32 enter program mode easily.

Since the boot button (GPIO 0) is mapped to start button in hwconfig.h, press this button after Arduino-nofrendo boot up means press the start button. So I always can test the connected components by pressing the start button. E.g. after connected the I2S DAC board I should able hear game sound by pressing start button.

Step 12: Thin Prototype PCB Patch

NES控制台的第一层已准备就绪,第二层是

The thin prototype PCB is a large plate, simply use scissor can cut to desired shape. The shape should a little smaller than the sweet box, and avoid cover the speaker. The dev board flash chip is the thickest component, so I also trim the PCB to avoid this.

步骤13:连接显示

Please read through the ordered display data sheet before make any connection.

这里有the connection summary:

ESP32 -> Display GPIO 14 -> D/C GPIO 5 -> CS GPIO 18 -> SCK GPIO 23 -> SDA GPIO 33 -> RST 3v3 -> Vcc, LED+ GND -> GND, LED-

连接后,只需打开电源即可检查它是否工作。

Step 14: Sweet Box Patch for Display

步骤15:电源开关

I think redirect the dev board power switch outside the sweet box is the most difficult part. I need to use a tiny 3D printed part help to make it:

https://www.thingiverse.com/thing:4693514

如果您没有3D打印机,只需删除原始开关并将引脚扩展到更大的开关即可是一个好的解决方案。

Step 16: Connect Buttons

这里有the connection summary:

ESP32  - >按钮===== ======= GND  - >所有按钮GPIO 12  - >向上按钮GPIO 32  - >向下按钮GPIO 25  - >左按钮GPIO 27  - >右按钮GPIO 4  - >选择按钮GPIO 0  - >开始按钮GPIO 22  - >按钮GPIO 21  - > B按钮GPIO 17  - > X按钮GPIO 16  - > Y按钮
复选连接随时:

步骤17:盖板

这一步是第二难点。

  • 从文具店选择一个好看的卡纸
  • 将尺寸减小到小于甜盒子
  • Cut the buttons and display one by one

Step 18: Sound Hole

记住一些洞让扬声器在贴上盖板之前发出声音。

第19步:最终装饰

I would like to make it look like Nintendo "Game & Watch" series, so I printed a tiny label "Game & MINTIA" and stick on it ;>

Step 20: Enjoy!

It's time to play and show off what you have done to your friends!

Step 21: What's Next?

4 years ago, I use MINTIA made a Tetris game with a 0.96" display; Now I use a 1.54" display to make a NES console. MINTIA still have many possibilities, let's dig it out together!

Anything Goes Contest

这是一个条目
Anything Goes Contest

Be the First to Share

    Recommendations

    • Anything Goes Contest

      Anything Goes Contest
    • 阻止代码竞赛

      阻止代码竞赛
    • Make it Real Student Design Challenge

      Make it Real Student Design Challenge

    Discussions