PastePal

by Arnov Sharma in Circuits > USB

2350 Views, 30 Favorites, 0 Comments

PastePal

14.gif
16.gif
19.gif
gh.jpg
IMG_20240926_103224.jpg

These were the materials used in this project:

  1. Custom PCB (provided by HQ Next PCB)
  2. XIAO SAMD21
  3. Push Button SMD
  4. SSD1306 OLED 128x32
  5. PCB Standoffs
  6. M3 Bolts

Design

20.gif
02.PNG
03.PNG
06.PNG
07.PNG

In the beginning, we built the PastPal model utilizing three PCB layers stacked together with eight PCB STANDOFFS: four for connecting the top layer to the mid layer and another four for connecting the mid layer to the base layer.

Three openings have been made on the top layer: two are for the addition of the switch actuator, and one is for the display.

The mid layer has an XIAO microcontroller on the bottom face of the board and SMD switches and a display on the top face.

To enclose the model from the bottom, there is a third layer dubbed the bottom layer.

The switch actuators are modeled and positioned between the switch actuator slots on the top layer and on top of the SMD switch knob.

Since the switch actuator and the switch knob are positioned exactly on top of one another, pressing the switch actuator also presses the knob, resulting in a registered switch click.

PCB Design

SCH_page-0001.jpg
01.PNG
05.PNG
04.PNG

The PCB design for this project was quite easy to interpret; we included an XIAO SAMD21 microcontroller, whose D0 and D1 I/O pins are used to connect it to two SMD switches. Additionally, we integrated an OLED display using XIAO's I2C pins.

Since the SAMD21 microcontroller inside the XIAO is registered as a human interface device (HID), we can create a tiny two-switch keyboard using the Arduino keyboard library.

We made two boards using the model's dimensions: the top layer board and the mid layer board. Since the mid layer board and the bottom layer have the same outline and mounting holes, we will use it for the bottom layer.

HQ NextPCB Service

IMG_20240921_234542.jpg
01.gif
02.gif

After completing the PCB design, we export the Gerber data and send it to HQ NextPCB for samples.

For the mid and top layer boards, two orders were placed. We ordered Black Solder mask with White Screen for the mid and top-layer layer board.

After placing the order, the PCBs were received within a week, and the PCB quality was pretty great.

In addition, I have to bring in HQDFM to you, which helped me a lot through many projects. Huaqiu’s in-house engineers developed the free Design for Manufacturing software, HQDFM, revolutionizing how PCB designers visualize and verify their designs.

HQDFM: Free Online Gerber Viewer and DFM Analysis Tool

08.PNG
09.PNG

Also, NextPCB has its own Gerber Viewer and DFM analysis software.

Your designs are improved by their HQDFM software (DFM) services. Since I find it annoying to have to wait around for DFM reports from manufacturers, HQDFM is the most efficient method for performing a pre-event self-check.

Here is what online Gerber Viewer shows me. Would not be more clear. However, for full function, like DFM analysis for PCBA, you, need to download the software. The online version only provides a simple PCB DFM report.

With comprehensive Design for Manufacture (DFM) analysis features, HQDFM is a free, sophisticated online PCB Gerber file viewer.

It provides insights into advanced manufacturing by utilizing over 15 years of industry expertise. You guys can check out HQ NextPCB if you want great PCB service at an affordable rate.

PCB Assembly Process

03.gif
04.gif
05.gif
06.gif
07.gif
08.gif
09.gif
  1. Using a solder paste dispenser needle, we begin the PCB assembly process by putting solder paste on each component pad.
  2. Next, we pick and place the SMD Switch in its location using an ESD Tweezer.
  3. Subsequently, we remove the board and set it on our Reflow Hotplate, which raises the PCB's temperature from below to the point at which the solder paste melts and the SMD components are all connected to their pads.
  4. We attached the pads of the two CON7 Female Header Pin connectors that we inserted from the back side of the PCB to the location of the XIAO Microcontroller.
  5. We soldered the OLED into place after adding it from the top side.

Board assembly is now complete.

Layer Assembly Process

10.gif
11.gif
12.gif
13.gif
14.gif
  1. Connecting the 9mm PCB standoffs to the top layer of the board via its four mounting holes is how we begin the layer assembly procedure.
  2. Next, we placed XIAO in its proper spot on the bottom side of the Mid Board.
  3. The top layer board was flipped, and the two 3D printed switches were inserted into their designated slots. Next, the mid layer was positioned from the bottom of the top layer, and the top and mid layer boards were joined together using four 12mm PCB standoffs.
  4. Finally, we position the bottom layer PCB on the standoffs connecting it to the mid layer and fasten it in place with four M3 bolts.

Assembly is now completed.

Main Code

This sketch uses the Adafruit_SSD1306 library to control a small OLED screen and the Keyboard library to send keyboard inputs. Here, this macropad sends copy (Ctrl + C) and paste (Ctrl + V) commands when the respective buttons are pressed. The OLED display is used to show "Copy" or "Paste" for visual feedback whenever the respective button is pressed.

RESULT

15.gif
16.gif
17.gif
18.gif
19.gif

The end result of this quick but interesting project is this: a MACROPAD with two buttons that we have assigned short keys for copying and pasting. Any button can be pressed to see which command is active on the OLED.

We put this device through several tests. We tried this in a notepad, and we even utilize this macropad in our Fusion360 design process, where we just choose a model and use the copy and paste command to create copies of it.

Depending on the use case, the copy paste command in macropad can even be altered. To do this, we just need to edit the code, which is very simple to achieve.

Stay tuned for the next version of this project, which will have more buttons and a mechanical switch.

Special thanks to HQ NextPCB for providing components that I've used in this project, check them out for getting all sorts of PCB or PCBA-related services for less cost.

Thanks for reaching this far, and I will be back with a new project soon.