Skip to the content
2 layers33 × 39 mmSMA Haptic v2 2, the printed circuit board in 3D

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

3

README

README.md

SMA 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
  1. Get Anaconda for your system
  2. Make sure to install Git(This is for Windows)
  3. Open Anaconda Prompt
  4. 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
  5. Navigate to the location of this repository, e.g. cd SML_SMA_Haptics_Demo
  6. conda env create -f environment.yml

Arduino

IDE Setup
  1. Make sure you install the VCP driver for your USB to TTL converter. For DSDTECH SH-U09C5, install FTDI VCP driver from here
  2. Get the suite of ESP32 boards from the Arduino IDE. In the IDE:
    1. Tools -> Boards -> Board Manager -> Search for esp32 by Espressif Systems -> Install
  3. Get ESPAsyncWebSrv library:
    1. Tools -> Manage Libraries -> Search for ESPAsyncWebSrv by dvarrel -> Install
  4. Open code.ino, located in the code directory in this repository in the Arduino IDE
  5. Turn on your phone hot spot or start your router
  6. On line 7 and 8 of code.ino under the comments //Network Setup, fill in your network credientials
  7. Upload code to the board
Upload Code to Board
  1. Power up the board, either through battery or power supply at 4.2V
  2. In the Arduino IDE, select the ESP32-WROOM-DA Module as the board and leave everything else as default, then select the right port.
  3. Turn on the Serial Monitor and set the baud rate to 115200
  4. 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
  5. Short the pads that says EN to 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.
  6. While shorting the EN pads, short the PRG Pads to put the ESP 32 Chip into programming mode, you should see "Waiting for download" in the Serial Monitor, you can then release the EN pads
  7. While shorting the PRG Pads, press upload on the Arduino IDE:
    • Try to short the PRG pads until upload is finished with the message "Hardware Reset"
  8. Short EN pads again to reset board.
    • After waiting for a few seconds after the board is finished setting up
  9. 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

  1. Navigate to painting_alignment
  2. On line 11 of alignment.py change the ip variable to the ip address of the board
  3. On line 12 of alignment.py change the camera variable to 0 if you are using the laptop's internal camera or 1 for an externally connected camera.
  4. python alignment.py in Anaconda Prompt
  5. 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.
  6. Press d to start painting detection and then press s to start sending computed command to the haptic device
  7. Press q to quit and end the program

Running the Object Detection Demo

  1. Navigate to object_detection
  2. On line 11 of detect.py change the ip variable to the ip address of the board
  3. On line 12 of detect.py change the camera variable to 0 if you are using the laptop's internal camera or 1 for an externally connected camera.
  4. python detect.py in Anaconda Prompt
    • All commands are automatically recorded in the object_detection/command_record
  5. Ctrl + to quit

Other Useful scripts

  • client_send_cmd.py
    • cd 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
  • send_record.py
    • cd 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
QtyValueFootprintReferences
710 kOhmResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R3, R4, R5, R6, R8, R9
4AO3416footprints:SOT23_AOSQ1, Q2, Q3, Q4
31 uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC9, C10, C11
3330 OhmResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R7, R10
2LED_SmallLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1, D2
1100 uFCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1ESP32-WROOM-32RF_Module:ESP32-WROOM-32U1

Similar boards

  • 2 layers245.7 × 172.6 mmPipar point, the printed circuit board in 3D

    Pipar point

    RasmusKoit/pipar

    Pipar is a collection of keyboards

    466 parts56CERN-OHL-S-2.0
  • 4 layers48 × 87 mmWallet, the printed circuit board in 3D

    Wallet

    AmbireTech/ice

    Ambire Ice: secure Safe-focused hardware wallet

    157 parts4
  • 2 layers92.7 × 65.4 mmLightweatherv3, the printed circuit board in 3D

    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 mmStm32 esp iot, the printed circuit board in 3D

    Stm32 esp iot

    Kikkiu17/espiot

    A small board built to measure current and voltage of any appliance.

    55 parts2
  • 2 layers58 × 26.5 mmFireflies, the printed circuit board in 3D

    Fireflies

    cheyao/fireflies

    Fireflies go blink ✨

    52 parts1
  • 4 layers123.6 × 90.8 mmPlayduino sheep tester, the printed circuit board in 3D

    Playduino sheep tester

    playduino/sheep-tester

    Raspberry Pi 4B HAT for Playduino Sheep EOL factory test

    201 parts1MIT
  • 2 layers92.7 × 62.2 mmMgc, the printed circuit board in 3D

    Mgc

    0x007E/mgc

    MeGARCard - Development Platform

    121 parts
  • 2 layers91 × 31 mmElectronic Load XY FZ25 ESP32C3-Circuit, the printed circuit board in 3D

    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.