

SMA Haptic v2 2
This repository contains all the code necessary for the two demostration for the SMA Haptics project--Painting Alignment and Object Detection.
- Size
- 33 × 39 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 22
- Nets
- 47
- Pads
- 109
- Tracks, vias
- 162, 0
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 22 Apr 2025
- Updated
- 22 Apr 2025
Overview
SMA Haptic v2 2 is an open-source printed circuit board by ansue1234, from the ansue1234/SML_SMA_Haptics repository on GitHub. It is a 2-layer board of 33 × 39 mm with 22 parts on 47 nets, routed with 162 tracks and 0 vias.
It is built around the ESP32-WROOM-32, AP2112K-3.3 and AO3416. Its parts include 10 resistors, 4 capacitors, 4 transistors, 2 ICs and 2 diodes. It belongs with the ESP32 boards of this library.
Main components
3ESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesAP2112K-3.3
SOT253.3V 600mA CMOS Low Dropout Linear Regulator with EnableDiodes IncorporatedUncategorisedAO3416
SOT-23-55℃~+150℃ 1 N-channel 1.1V 1.4W 1.65nF 10nC@4.5V 20V 22mΩ@4.5V 6.5A 87pF SOT-23 MOSFETs ROHSAlpha & Omega SemiconductorMOSFETs
README
README.mdSMA Haptic Demo
This repository contains all the code necessary for the two demostration for the SMA Haptics project--Painting Alignment and Object Detection.
Setup
Hardware Required
- 1x 3.7V Lipo Battery
- 1x 3.3V USB to TTL Converter (i.e. DSDTECH SH-U09C5)
- 1x LAN, could be from a router, could be from a phone hot spot
Software
Python Scripts
- Get Anaconda for your system
- Make sure to install Git(This is for Windows)
- Open Anaconda Prompt
- If you haven't done so, find a place fitting to download this repository and do
git clone https://github.com/ansue1234/SML_SMA_Haptics_Demo.git - Navigate to the location of this repository, e.g.
cd SML_SMA_Haptics_Demo conda env create -f environment.yml
Arduino
IDE Setup
- Make sure you install the VCP driver for your USB to TTL converter. For DSDTECH SH-U09C5, install FTDI VCP driver from here
- Get the suite of ESP32 boards from the Arduino IDE. In the IDE:
- Tools -> Boards -> Board Manager -> Search for esp32 by Espressif Systems -> Install
- Get ESPAsyncWebSrv library:
- Tools -> Manage Libraries -> Search for ESPAsyncWebSrv by dvarrel -> Install
- Open
code.ino, located in thecodedirectory in this repository in the Arduino IDE - Turn on your phone hot spot or start your router
- On line 7 and 8 of
code.inounder the comments//Network Setup, fill in your network credientials - Upload code to the board
Upload Code to Board
- Power up the board, either through battery or power supply at 4.2V
- In the Arduino IDE, select the
ESP32-WROOM-DA Moduleas the board and leave everything else as default, then select the right port. - Turn on the Serial Monitor and set the baud rate to 115200
- Connect the Ground, TX and RX Wires to the GND TX RX labeled headers on the board.
- Note: Due to mistake in labeling, connect TX Header to TX wire of the USB to TTL Converter and RX header to the RX Wire. Don't connect it following the TX->RX and RX->TX convention
- Short the pads that says
ENto reset, if all goes well, you should see a message with "Power boot" or something similar in the Serial Monitor- Note: Make sure to disconnect all peripherals connected to the board when the board is resetting or uploading code, otherwise peripherals can potientially be damaged.
- While shorting the
ENpads, short thePRGPads to put the ESP 32 Chip into programming mode, you should see "Waiting for download" in the Serial Monitor, you can then release theENpads - While shorting the
PRGPads, press upload on the Arduino IDE:- Try to short the
PRGpads until upload is finished with the message "Hardware Reset"
- Try to short the
- Short
ENpads again to reset board.- After waiting for a few seconds after the board is finished setting up
- In the Serial montor, if the board connects to wifi, it would output the board's IP Address. Take note of it.
Comments:
- The green LED denotes whether the board is powered. It turns on if the board is powered.
- The red LED denotes whether the battery needs to be exchanged or not. If the red LED is on, please change the battery
Running the Painting Alignment Demo
- Navigate to
painting_alignment - On line 11 of
alignment.pychange theipvariable to the ip address of the board - On line 12 of
alignment.pychange thecameravariable to 0 if you are using the laptop's internal camera or 1 for an externally connected camera. python alignment.pyin Anaconda Prompt- Once you see the view of the web cam, you can hold and drag LMB (left mouse button) to draw the desired position of the painting.
- Press d to start painting detection and then press s to start sending computed command to the haptic device
- Press q to quit and end the program
Running the Object Detection Demo
- Navigate to
object_detection - On line 11 of
detect.pychange theipvariable to the ip address of the board - On line 12 of
detect.pychange thecameravariable to 0 if you are using the laptop's internal camera or 1 for an externally connected camera. python detect.pyin Anaconda Prompt- All commands are automatically recorded in the
object_detection/command_record
- All commands are automatically recorded in the
- Ctrl + to quit
Other Useful scripts
client_send_cmd.pycd code- Change IP address (line 3)
python client_send_cmd.py- This is to control the haptic via keyboard control
- WASD (up, left, down, right)
- JKR (Counter Clockwise, clockwise, orthogonal)
- The script automatically logs the command you sent and the time the certain command is sent
- Saves in
code/command_record
- Saves in
send_record.pycd code- Change IP and filename location of the record (line 5 and 7)
python send_record.py- The script replays the recorded commands to the haptic.
Parts
22| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 10 kOhm | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R3, R4, R5, R6, R8, R9 |
| 4 | AO3416 | footprints:SOT23_AOS | Q1, Q2, Q3, Q4 |
| 3 | 1 uF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C9, C10, C11 |
| 3 | 330 Ohm | Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolder | R2, R7, R10 |
| 2 | LED_Small | LED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolder | D1, D2 |
| 1 | 100 uF | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1 |
| 1 | AP2112K-3.3 | Package_TO_SOT_SMD:SOT-23-5 | U2 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U1 |
Similar boards
- 2 layers245.7 × 172.6 mm

- 4 layers48 × 87 mm

- 2 layers92.7 × 65.4 mm

Lightweatherv3
dominicmason555/lightweatherv3
Open-Source Hardware and Firmware IO and Temperature/Pressure/Humidity/Gas Sensor MQTT Board
201 parts2CERN-OHL-S-2.0 - 2 layers68.6 × 48.6 mm

Stm32 esp iot
Kikkiu17/espiot
A small board built to measure current and voltage of any appliance.
55 parts2 - 2 layers58 × 26.5 mm

- 4 layers123.6 × 90.8 mm

Playduino sheep tester
playduino/sheep-tester
Raspberry Pi 4B HAT for Playduino Sheep EOL factory test
201 parts1MIT - 2 layers92.7 × 62.2 mm

- 2 layers91 × 31 mm

Electronic Load XY FZ25 ESP32C3-Circuit
M-C-machts/electronic-load-xy-fz25_esp32c3
A custom PCB and firmware add-on for the XY-FZ25 electronic load, replacing the built-in measurement front-end with a more accurate solution based on the Seeed XIAO ESP32C3 and an INA228 high-precision power monitor.
19 parts
Questions
How big is the SMA Haptic v2 2 PCB?
It measures 33 × 39 mm and has 2 copper layers, 1.6 mm thick.
What parts does the SMA Haptic v2 2 use?
22 parts, built around the ESP32-WROOM-32, AP2112K-3.3 and AO3416. 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.
Where can I download the SMA Haptic v2 2 KiCad files?
From the ansue1234/SML_SMA_Haptics repository on GitHub, at the commit this page was made from: the board is Electronics/SMA_Haptic_v2_2.kicad_pcb and its schematic Electronics/SMA_Haptic_v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the SMA Haptic v2 2 design in my own project?
Its repository states no licence, so its author keeps all rights: ask ansue1234 before reusing the design.