
Breakout
YueChengPeng/MagDock
The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative…

The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative…
Sensing Device is an open-source printed circuit board by YueChengPeng, from the YueChengPeng/MagDock repository on GitHub. It is a 2-layer board of 110 × 70 mm with 20 parts on 21 nets, routed with 125 tracks and 5 vias.
Its parts include 8 resistors, 4 capacitors, 2 ICs, 2 connectors and 2 switches.

A customizable and reconfigurable haptic modular input interface for computers.
Interacting with computers nowadays, either via touchscreens or keyboards (which are basically all buttons) is BORING!
The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative expression, enable precise input, provide interesting haptic feedback, etc.

The input device consists of two parts: a base (left) and various tactile input components (right). To use, simply snap one input component onto the receptor of the base, which can automatically identify the component and read real-time inputs from it.
This input device can be directly used with laptops, pads, phones, etc. But to meet the requirements for the TECHIN514 course, I made a mockup of the computer using Raspberry Pi. To demonstrate the input potentials, I used a drawing web app (using P5.js on the browser of the Raspberry Pi) as a demonstration to showcase the potential of my design in supporting creative expressions (To be more specific, the joystick component is used to move the brush, the slider to adjust the width of the brush, the rotary knob to change the brush color, and the switch to clear the canvas).
This is just a glimpse of the application! __Other potential applications include software extension inputs (e.g. shortcuts in PS, AI, Figma), music controllers/synthesizers (e.g. volume, mix controls), tailored game controllers (e.g. joysticks), sleek controllers for your next robot, etc.
Details on the sensor device and the display device be elaborated in later sections. This is an overview of how the system architecture looks like:



Magnets, magnets, magnets, magnets! Hooray! In this project, magnets are without doubt the protagonist! It's used as:
Each input component has three kinds of magnets:
The input trigger moves along with the moving part of the input component, causing the magnetic field to change:

Yes.. but how to interpret the raw three-axis magnetic field data?

arccos(By), I can get the solution of the angle of the joystick.In conclusion, this sensor device features a single sensor for configuring diverse inputs from different input devices.


The display device is built around the Raspberry Pi. It runs a Python backend and a frontend using P5.js. The Python reads inputs from a button (capture screenshot) and controls the x27 stepper motor directly via four GPIOs (which is not safe to do so, but the x27 stepper motor consumes little current and is safe to drive using mere GPIOs on the Raspberry Pi. Otherwise H-Bridge should be used, such as the TB6612 IC). The needle of the motor indicates the current stroke width of the brush. A 7-inch LCD display is plugged into the Raspberry Pi using an HDMI cable to show the canvas of the P5.js. An LED is used to indicate if the button is pressed and a screenshot is captured.


After analyzing, I found that Raspberry Pi consumes TONS of power, and it is also very picky on the power supply: the Pi4B requires a good quality USB-C power supply capable of delivering 5V at 3A https://github.com/YueChengPeng/MagDocker/blob/main/datasheet/raspberry-pi-4-datasheet.pdf. I found no Lipo battery or power bank that can supply a current this large. Therefore, it’s better to power it directly via USB-C power cables but not batteries. A good display also consumes a lot of power. Given that, the "days of use" will be "forever" as long as you have the power plugged in.
The usage of power cables is a good tradeoff considering user experience.
| Sensor Device Components | Price | Number | Total Price |
|---|---|---|---|
| XIAO ESP32S3 | 7.49 | 1 | 7.49 |
| 2000mAh Lipo battery | 13.99 | 1 | 13.99 |
| Button | 0.5 | 1 | 0.5 |
| Switch | 0.64 | 1 | 0.64 |
| SMD LED | 0.27 | 1 | 0.27 |
| TLV493DA1B6HTSA2 | 1.5 | 1 | 1.5 |
| JST-PH 2-Pin SMT Right Angle Connector | 0.75 | 1 | 0.75 |
| Acrylic enclosure | 18.99 | 1 | 18.99 |
| Magnets (8mm and 3mm) | 12 | 1 | 12 |
| Resistors & Capacitors | 0.5 | 1 | 0.5 |
| Sum | 56.63 |
| Display Device Components | Price | Number | Total Price |
|---|---|---|---|
| Raspberry Pi 4B | 35 | 1 | 35 |
| stepper motor | 5 | 1 | 5 |
| Button | 0.5 | 1 | 0.5 |
| LED | 0.4 | 1 | 0.4 |
| JST connectors | 1 | 1 | 1 |
| 7inch display | 45.99 | 1 | 45.99 |
| Acrylic enclosure | 5 | 1 | 5 |
| Sum | 92.89 |
| Total Sum | 149.52 |
|---|---|
| Total Sum Purchased by GIX | 97.32 |
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 100Ω | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R5, R7, R8 |
| 2 | 1.2kΩ | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R4, R6 |
| 2 | 100 nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2, C3 |
| 2 | 200 pF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C4 |
| 2 | 4.3kΩ | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R3 |
| 1 | 3.7v Lipo battery | Connector_JST:JST_ZE_SM02B-ZESS-TB_1x02-1MP_P1.50mm_Horizontal | BT1 |
| 1 | 65Ω | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2 |
| 1 | ID_PAD | Screw_connector:40mm_rectangle_M3 | J2 |
| 1 | LS R976 | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D1 |
| 1 | PWR_PAD | Connector_JST:JST_NV_B02P-NV_1x02_P5.00mm_Vertical | J1 |
| 1 | SW_SPDT | Button_Switch_THT:SWITCH_THT_SPDT_11MA1QS1 | SW2 |
| 1 | SW_SPST | Button_Switch_THT:SW_PUSH-12mm | SW1 |
| 1 | TLV493D | Package_TO_SOT_SMD:SOT-23-6 | U2 |
| 1 | ~ | XIAO ESP32 THT:XIAO_ESP32_SENSE | U1 |

YueChengPeng/MagDock
The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative…

YueChengPeng/MagDock
The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative…

YueChengPeng/MagDock
The vision is to develop a new input interface, which supports rich interaction inputs and can be configured to be used in various scenarios to boost user experience, promote working efficiency, spark creative…



atopile/atopile
Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

davidphilipbarr/Sweep
Sweep - a small promicro based keyboard inspired by the Ferris.

rusefi/rusefi
rusefi - GPL internal combustion engine control unit

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

FreeYourStream/freedeck-hardware
all the stuff you need to build your own FreeDeck
It measures 110 × 70 mm and has 2 copper layers, 1.6 mm thick.
20 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the YueChengPeng/MagDock repository on GitHub, at the commit this page was made from: the board is pcb/Sensing Device/Sensing Device.kicad_pcb and its schematic pcb/Display Device/display_rasp/display_rasp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask YueChengPeng before reusing the design.