SLAA891B April   2019  – February 2020 MSP430FR2512 , MSP430FR2512 , MSP430FR2522 , MSP430FR2522 , MSP430FR2532 , MSP430FR2532 , MSP430FR2533 , MSP430FR2533 , MSP430FR2632 , MSP430FR2632 , MSP430FR2633 , MSP430FR2633 , MSP430FR2672 , MSP430FR2672 , MSP430FR2673 , MSP430FR2673 , MSP430FR2675 , MSP430FR2675 , MSP430FR2676 , MSP430FR2676

 

  1.   Automating Capacitive Touch Sensor PCB Design Using OpenSCAD Scripts
    1.     Trademarks
    2. 1 Introduction
    3. 2 Getting Started
      1. 2.1 Prerequisites
      2. 2.2 Workflow
      3. 2.3 Creating a Sensor
      4. 2.4 Output DXF
      5. 2.5 Batch Files
    4. 3 Slider
    5. 4 Wheel
    6. 5 Curved Slider
    7. 6 Touchpad
    8. 7 PCB CAD Tool
    9. 8 Summary
  2.   Revision History

Touchpad

Touchpad sensors are constructed using a matrix of diamond shaped patterns with an outline that can be square (rectangular), circular, or custom as defined by the script parameter shape. The number of diamonds to create is defined by the script parameters rows and columns. The size of the touchpad area is defined by the script parameters touchpad_width and touchpad_height. The last dimension is the diamond spacing and is defined by the script parameter diamond_spacing. The touchpad script uses these parameters to calculate the diamond size and generates a 2-dimensional matrix of diamonds fitted to the specified shape (see Figure 10).

touchpad-dimensions.gifFigure 10. Touchpad Dimensions

As mentioned, there are four touchpad shapes that can be created, with a few examples shown in Figure 11.

touchpad-shapes.gifFigure 11. Touchpad Shapes

The two example rectangular shapes were created with the shape parameter defined as a square, but using unequal width and height dimensions to create the rectangular shape. To maintain a symmetrical diamond shape, the width and height dimensions should be proportional to the number of rows and columns. For example, the 3x5 (3 rows, 5 cols) rectangle has a height of 30 mm and width of 50 mm. If not proportional, the diamonds become elongated, which is acceptable but can cause a different response to the motion of a finger in the X direction compared to the Y direction.

The custom touchpad in Figure 12 was created by setting the shape parameter to custom. This parameter does not actually create the custom shape, rather it imports any shape outline that can be created by a CAD tool that can create a DXF output, such as AutoCAD. In the touchpad script, an example DXF file, example_ellipse.dxf is specified by default and is provided in the zip file download to let you experiment with this option. You can create custom shapes and export to a DXF file, then substitute the example with dxf = "user_defined_shape.dxf". In addition, there is a parameter that rotates the shape and the diamond matrix together if needed before importing into the PCB CAD tool.

custom-touchpad-example.gifFigure 12. Custom Touchpad Example